Re: [Alsa-user] ALSA USB MIDI Input

2002-08-22 Thread Clemens Ladisch

On Tue, 20 Aug 2002, Pedro Lopez-Cabanillas wrote:
 El Mar 20 Ago 2002 10:10, Clemens Ladisch escribió:
  IMHO there's nothing wrong with loading the driver when the keyboard is
  plugged in. I'd suggest to list only the OSS drivers in the blacklist file.

 Hotplug can't load the snd-usb-midi module, except for the vendor/product ids
 listed in MODULE_DEVICE_TABLE(usb, snd_usbmidi_usb_id_table). Michael has an
 Evolution keyboard, a standard USB class compliant device, AFAIK.

 Hotplug only looks for the first interface descriptor found for each device.

This is true for the user mode hotplug call only (e.g., for the daemon).
For kernel drivers, Linux checks all interfaces.

 The only workaround I know for now, is blacklist snd-usb-audio module and
 load snd-usb-midi by hand or like any other ALSA module: kmod + modules.conf

It isn't necessary to blacklist the snd-usb-audio module (see above).

Martin Langer reported that his Evolution keyboard works.


Regards,
Clemens



---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user



Re: [Alsa-user] ALSA USB MIDI Input

2002-08-22 Thread Clemens Ladisch

(sorry for the delay)

On Tue, 20 Aug 2002, Michael Martin wrote:
 But I'm having difficulty setting up my /etc/modules.conf file
 Do I need to set the USB device as a new sound card? What do I do?
 Also are there any docs for getting OSS Emulation to work for the
 USB MIDI Device?

The driver should work without any driver-specific entries in
modules.conf, it will then pick the first free sound card number.

You would need to modify modules.con if you wanted to change some module
parameters, or if you want to use OSS emulation. An example and an
explanation can be found in the installation instructions which can be
reached from http://www.alsa-project.org/alsa-doc/.


HTH
Clemens



---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user



Re: [Alsa-user] ALSA USB MIDI Input

2002-08-22 Thread Clemens Ladisch

On Tue, 20 Aug 2002, Michael Martin wrote:
 The kernel had this to say

 Aug 20 15:55:36 linux kernel: hub.c: USB new device connect on bus1/2,
 assigned device number 3
 Aug 20 15:55:36 linux kernel: snd-usb-midi: using interface 1
 Aug 20 15:55:36 linux kernel: snd-usb-midi: MIDIStreaming version 01.00
 Aug 20 15:55:36 linux kernel: snd-usb-midi: detected 1 input jack(s) on
 endpoint 1
 Aug 20 15:55:36 linux kernel: snd-usb-midi: detected 1 output jack(s) on
 endpoint 2
 Aug 20 15:55:36 linux kernel: snd-usb-midi: detected Evolution Electronics
 Ltd. MK-249 USB MIDI keyboard
 Aug 20 15:55:36 linux kernel: ALSA ../alsa-kernel/usb/usbmidi.c:1196: cannot
 create card (error code -12)

 but 15:55:36 was when I unplugged and re plugged in the keyboard. I want
 hotplugging.

The hotplugging code works, but for some reason, the driver isn't able to
create the sound card object. I'd guess that the snd_cards_limit parameter
is set to 1, so that ALSA refuses to use more than one sound card.
(Maybe the SuSE installation sets this to 1 because it doesn't know about
USB MIDI.)

The following lines for /etc/modules.conf should work for your
configuration:

alias char-major-116 snd
options snd snd_cards_limit=2

alias snd-card-0 snd-cmipci
options snd-cmipci snd_index=0

alias snd-card-1 snd-usb-midi
options snd-usb-midi snd_index=1

# (entries for OSS omitted, see my other mail)


HTH
Clemens



---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user



RE: [Alsa-user] ALSA USB MIDI Input

2002-08-22 Thread Michael Martin

Fantastic. aconnect -i now lists:
client 72: 'Evolution Electronics Ltd. USB MIDI keyboard'
   1 'USB MIDI keyboard Port 1'

BUT now my snd-cmipci card doesn't work. My /etc/modules.conf
(attached) looks like this at the sound area:

# WL76.leFtcOMtGx0:CMI8738/C3DX PCI Audio Device

#

# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF verion 0.9.0 ---
alias char-major-116 snd
alias snd-card-0 snd-cmipci
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
options snd snd_major=116 snd_cards_limit=2
options snd-cmipci snd_index=0
alias snd-card-1 snd-usb-midi
options snd-usb-midi snd_index=1
# --- END: Generated by ALSACONF, do not edit. ---

NB: I edited the bit inside the ALSACONF area (which I don't think matters?)
to include settings for the usb audio device aswell as the snd-cmipci card

Mike

-Original Message-
From: Clemens Ladisch [mailto:[EMAIL PROTECTED]]
Sent: 22 August 2002 09:22
To: Michael Martin
Cc: Alsa Users (E-mail)
Subject: Re: [Alsa-user] ALSA USB MIDI Input


On Tue, 20 Aug 2002, Michael Martin wrote:
 The kernel had this to say

 Aug 20 15:55:36 linux kernel: hub.c: USB new device connect on bus1/2,
 assigned device number 3
 Aug 20 15:55:36 linux kernel: snd-usb-midi: using interface 1
 Aug 20 15:55:36 linux kernel: snd-usb-midi: MIDIStreaming version 01.00
 Aug 20 15:55:36 linux kernel: snd-usb-midi: detected 1 input jack(s) on
 endpoint 1
 Aug 20 15:55:36 linux kernel: snd-usb-midi: detected 1 output jack(s) on
 endpoint 2
 Aug 20 15:55:36 linux kernel: snd-usb-midi: detected Evolution Electronics
 Ltd. MK-249 USB MIDI keyboard
 Aug 20 15:55:36 linux kernel: ALSA ../alsa-kernel/usb/usbmidi.c:1196:
cannot
 create card (error code -12)

 but 15:55:36 was when I unplugged and re plugged in the keyboard. I want
 hotplugging.

The hotplugging code works, but for some reason, the driver isn't able to
create the sound card object. I'd guess that the snd_cards_limit parameter
is set to 1, so that ALSA refuses to use more than one sound card.
(Maybe the SuSE installation sets this to 1 because it doesn't know about
USB MIDI.)

The following lines for /etc/modules.conf should work for your
configuration:

alias char-major-116 snd
options snd snd_cards_limit=2

alias snd-card-0 snd-cmipci
options snd-cmipci snd_index=0

alias snd-card-1 snd-usb-midi
options snd-usb-midi snd_index=1

# (entries for OSS omitted, see my other mail)


HTH
Clemens


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user



RE: [Alsa-user] ALSA USB MIDI Input

2002-08-21 Thread Michael Martin

The Evolution USB MIDI Devices are standard USB class compliant devices.
I've added
audio
usb-midi
snd-usb-midi
snd-usb-audio
to my blacklist file, although I would really like to know how to setup
my /etc/modules.conf file properly to use these modules.

The vendor id is: 0a4d
The product id is: 008c

I ran a USB check on the device and the results are in the attached text
file.

Do I need to edit the MODULE_DEVICE_TABLE or something?

Mike



-Original Message-
From: Pedro Lopez-Cabanillas [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2002 21:26
To: Clemens Ladisch
Cc: Michael Martin; [EMAIL PROTECTED]; Takashi Iwai
Subject: Re: [Alsa-user] ALSA USB MIDI Input


El Mar 20 Ago 2002 10:10, Clemens Ladisch escribi:
 Pedro Lopez-Cabanillas wrote:
  I suggest you to add these modules to the /etc/hotplug/blacklist file:
  # cat /etc/hotplug/blacklist
  audio
  usb-midi
  snd-usb-audio
  snd-usb-midi
 
  You can see that I include the ALSA modules here. This prevents hotplug
  from loading them when you plug the keyboard, but this is not a problem
  if you use the right /etc/modules.conf setup, and the alsasound script.

 IMHO there's nothing wrong with loading the driver when the keyboard is
 plugged in. I'd suggest to list only the OSS drivers in the blacklist
file.

Hotplug can't load the snd-usb-midi module, except for the vendor/product
ids 
listed in MODULE_DEVICE_TABLE(usb, snd_usbmidi_usb_id_table). Michael has an

Evolution keyboard, a standard USB class compliant device, AFAIK.

Hotplug only looks for the first interface descriptor found for each device.

And the standard for USB MIDI is an AudioControl interface descriptor 
(SubClass=1). This interface don't match with the first entry in your table:

static usb_device_id_t snd_usbmidi_usb_id_table[] = {
{ match_flags: USB_DEVICE_ID_MATCH_INT_CLASS |
   USB_DEVICE_ID_MATCH_INT_SUBCLASS,
  bInterfaceClass: USB_CLASS_AUDIO,
  bInterfaceSubClass: USB_SUBCLASS_MIDISTREAMING }, ...

But it matches with the corresponding table in usbaudio.c:

static struct usb_device_id usb_audio_ids [] = {
{ .match_flags = (USB_DEVICE_ID_MATCH_INT_CLASS | 
USB_DEVICE_ID_MATCH_INT_SUBCLASS),
  .bInterfaceClass = USB_CLASS_AUDIO,
  .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL },
{ } /* Terminating entry */
};

You can read a bit about this in 
http://linux-hotplug.sourceforge.net/?selected=usb

variable: INTERFACE 
example: 3/1/1 
notes: bInterfaceClass/bInterfaceSubClass/bInterfaceProtocol, from _first_ 
interface descriptor. Available only for device class zero. Numbers are 
decimal. 

As a result, when you plug a true standard USB MIDI thing, hotplug invokes
the 
user.agent script with only information about the AudioControl interface,
and 
user.agent probe() the snd-usb-audio module, that fails for MIDI-only  
devices. The snd-usb-midi module is never loaded neither probed.

The only workaround I know for now, is blacklist snd-usb-audio module and  
load snd-usb-midi by hand or like any other ALSA module: kmod + modules.conf

A clean solution for future development, IMHO, can be a third snd-usb
module, 
a kind of ALSA-USB arbitrator, responsible for the descriptor parsing code, 
register in USB and ALSA subsystems, and for loading the audio or midi 
modules. This can be useful also for integration of some mixed audio/midi 
devices, as Mr. Takashi asked for. 

Regards,
Pedro



All Descriptors Report (10:39 - 21/8/102)
Device Descriptor Fields:  
bLength0x12
bDescriptorType0x01
bcdUSB 0x0100 (USB spec. 01.00)
bDeviceClass   0x00 (ifc's specify own)
bDeviceSubClass0x00
bDeviceProtocol0x00
bMaxPacketSize00x40
idVendor   0x0A4D (unknown)
idProduct  0x008C
bcdDevice  0x0252 (release 02.52)
iManufacturer  0x01
Language ID0x0409
iManufacturer String   Evolution Electronics Ltd.
iProduct   0x02
Language ID0x0409
iProduct StringMK-249 USB MIDI keyboard
iSerialNumber  0x00
bNumConfigurations 0x01 (1)
   
Configuration Descriptor, Index 0x00

Re: [Alsa-user] ALSA USB MIDI Input

2002-08-20 Thread Clemens Ladisch

Pedro Lopez-Cabanillas wrote:
  I see both usb-midi and usbmidi. Could this be because I've got the daemon
  installed as well?
 
 No, but you should uninstall it if you are going to use the driver instead the
 daemon.

To uninstall the daemon, run make uninstall in the usbmidid-x.x.x directory.
(I forgot to document this in the readme)

Both usb-midi and usbmidi are from messages from the OSS driver.
The daemon uses usbmidid, the ALSA driver uses snd-usb-midi.

 I suggest you to add these modules to the /etc/hotplug/blacklist file:
 # cat /etc/hotplug/blacklist
 audio
 usb-midi
 snd-usb-audio
 snd-usb-midi
 
 You can see that I include the ALSA modules here. This prevents hotplug from
 loading them when you plug the keyboard, but this is not a problem if you use
 the right /etc/modules.conf setup, and the alsasound script.

IMHO there's nothing wrong with loading the driver when the keyboard is
plugged in. I'd suggest to list only the OSS drivers in the blacklist file.

In theory, the kernel should be configured without the OSS drivers when
ALSA is used, but not everyone takes the trouble of recompiling the kernel.


HTH
Clemens


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user



RE: [Alsa-user] ALSA USB MIDI Input

2002-08-20 Thread Michael Martin

I've re-installed Linux (SuSE 8.0 Pro), compiled the ALSA 0.9.0r3
Drivers, Libs and Utils as well as Aseqview.

But I'm having difficulty setting up my /etc/modules.conf file
Do I need to set the USB device as a new sound card? What do I do?
Also are there any docs for getting OSS Emulation to work for the
USB MIDI Device?

Mike

-Original Message-
From: Clemens Ladisch [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2002 09:10
To: Pedro Lopez-Cabanillas
Cc: Michael Martin; [EMAIL PROTECTED]
Subject: Re: [Alsa-user] ALSA USB MIDI Input


Pedro Lopez-Cabanillas wrote:
  I see both usb-midi and usbmidi. Could this be because I've got the
daemon
  installed as well?
 
 No, but you should uninstall it if you are going to use the driver instead
the
 daemon.

To uninstall the daemon, run make uninstall in the usbmidid-x.x.x
directory.
(I forgot to document this in the readme)

Both usb-midi and usbmidi are from messages from the OSS driver.
The daemon uses usbmidid, the ALSA driver uses snd-usb-midi.

 I suggest you to add these modules to the /etc/hotplug/blacklist file:
 # cat /etc/hotplug/blacklist
 audio
 usb-midi
 snd-usb-audio
 snd-usb-midi
 
 You can see that I include the ALSA modules here. This prevents hotplug
from
 loading them when you plug the keyboard, but this is not a problem if you
use
 the right /etc/modules.conf setup, and the alsasound script.

IMHO there's nothing wrong with loading the driver when the keyboard is
plugged in. I'd suggest to list only the OSS drivers in the blacklist file.

In theory, the kernel should be configured without the OSS drivers when
ALSA is used, but not everyone takes the trouble of recompiling the kernel.


HTH
Clemens


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user



RE: [Alsa-user] ALSA USB MIDI Input

2002-08-20 Thread Michael Martin

The kernel had this to say

Aug 20 15:54:54 linux kernel: C-Media PCI soundcard not found or device busy
Aug 20 15:54:54 linux insmod:
/lib/modules/2.4.18-4GB/kernel/sound/pci/snd-cmipci.o: init_module: No such
device
Aug 20 15:54:54 linux insmod: Hint: insmod errors can be caused by incorrect
module parameters, including invalid IO or IRQ parameters
Aug 20 15:54:54 linux insmod:
/lib/modules/2.4.18-4GB/kernel/sound/pci/snd-cmipci.o: insmod sound-slot-0
failed
Aug 20 15:54:55 linux kernel: C-Media PCI soundcard not found or device busy
Aug 20 15:54:55 linux insmod:
/lib/modules/2.4.18-4GB/kernel/sound/pci/snd-cmipci.o: init_module: No such
device
Aug 20 15:54:55 linux insmod: Hint: insmod errors can be caused by incorrect
module parameters, including invalid IO or IRQ parameters
Aug 20 15:54:55 linux insmod:
/lib/modules/2.4.18-4GB/kernel/sound/pci/snd-cmipci.o: insmod sound-slot-0
failed
Aug 20 15:55:32 linux kernel: usb.c: USB disconnect on device 2
Aug 20 15:55:36 linux kernel: hub.c: USB new device connect on bus1/2,
assigned device number 3
Aug 20 15:55:36 linux kernel: snd-usb-midi: using interface 1
Aug 20 15:55:36 linux kernel: snd-usb-midi: MIDIStreaming version 01.00
Aug 20 15:55:36 linux kernel: snd-usb-midi: detected 1 input jack(s) on
endpoint 1
Aug 20 15:55:36 linux kernel: snd-usb-midi: detected 1 output jack(s) on
endpoint 2
Aug 20 15:55:36 linux kernel: snd-usb-midi: detected Evolution Electronics
Ltd. MK-249 USB MIDI keyboard
Aug 20 15:55:36 linux kernel: ALSA ../alsa-kernel/usb/usbmidi.c:1196: cannot
create card (error code -12)

cmi-pci is my sound card. I did an insmod cmi-pci.
but 15:55:36 was when I unplugged and re plugged in the keyboard. I want
hotplugging.

Mike


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user



Re: [Alsa-user] ALSA USB MIDI Input

2002-08-19 Thread Pedro Lopez-Cabanillas

El Lun 19 Ago 2002 15:34, Michael Martin escribió:
 Hi,

 I downloaded, compiled, installed the alsa drivers (0.9.0rc3)

You need alsa-lib and alsa-utils packages also.

 I did modprobe snd-cmipci
 I did modprobe usb-midi
 All successful.

 But then I did aconnect -i and I could only see my sound card's External
 MIDI interface, not the usb-midi interface.

usb-midi is the old OSS driver. If you want to use ALSA, try modprobe 
snd-usb-midi instead.

You can use OSS programs with ALSA drivers, thanks to the OSS emulation 
included in ALSA, but not vice versa; aconnect will only work with ALSA 
drivers.

 Do I need to add any lines to my /etc/modules.conf to make usb midi work?

If you set your /etc/modules.conf properly, the alsasound script (installed in 
/etc/rc.d/init.d by 'make install') will load your modules automatically 
every time you boot, or by hand running that script anytime.

Quoting an early post in this list about modules.conf:
Really detailled instructions for almost every supported card are
at http://www.alsa-project.org/alsa-doc/
for example this module snippet: 

# ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-cmipci
alias snd-card-1 snd-usb-midi
# module options should go here

# OSS/Free portion
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
alias sound-slot-1 snd-card-1

# only needed for 1st card
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

Regards,
Pedro


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user



RE: [Alsa-user] ALSA USB MIDI Input

2002-08-19 Thread Michael Martin

Followed Pedro's advice. I compiled and install successfully the ALSA lib,
utils and kernel driver packages.

modprobe snd-usb-midi worked.

I checked my /var/log/messages file after plugging the usb device in and
here are the results:

Aug 19 17:11:56 linux kernel: hub.c: USB new device connect on bus1/2,
assigned device number 6
Aug 19 17:11:56 linux kernel: usbaudio: device 6 audiocontrol interface 0
interface 1 MIDIStreaming not supported
Aug 19 17:11:56 linux kernel: usbaudio: device 6 audiocontrol interface 0
has 0 input and 0 output AudioStreaming interfaces
Aug 19 17:11:56 linux kernel: usb-midi: Found MIDISTREAMING on dev
0a4d:008c, iface 1
Aug 19 17:11:56 linux kernel: usb-midi: Found MIDIStreaming device
corresponding to Release 1.00 of spec.
Aug 19 17:11:56 linux kernel: usb-midi: Found IN Jack 0x01 EMBEDDED
Aug 19 17:11:56 linux kernel: usb-midi: Found IN Jack 0x02 EXTERNAL
Aug 19 17:11:56 linux kernel: usb-midi: Found OUT Jack 0x03 EMBEDDED, 1 pins
Aug 19 17:11:56 linux kernel: usb-midi: Found OUT Jack 0x04 EXTERNAL, 1 pins
Aug 19 17:11:56 linux kernel: string descriptor 0 found (length = 4)
Aug 19 17:11:56 linux kernel: usb-midi: langid(0) 0x0409
Aug 19 17:11:56 linux kernel: usb-midi: langid(match) 0x0409
Aug 19 17:11:56 linux kernel: usb-midi: fetchString(2)
Aug 19 17:11:56 linux kernel: usb-midi: fetchString = 24
Aug 19 17:11:56 linux kernel: usbmidi: found [ MK-249 USB MIDI keyboard ]
(0x0a4d:0x008c), attached:
Aug 19 17:11:56 linux kernel: usbmidi: /dev/midi01: in (ep:81 cid: 0 bufsiz:
0) out (ep:02 cid: 0 bufsiz:64)
Aug 19 17:11:57 linux kernel: usb.c: registered new driver snd-usb-audio
Aug 19 17:11:57 linux kernel: usbaudio: device 6 audiocontrol interface 0
interface 1 MIDIStreaming not supported
Aug 19 17:11:57 linux kernel: usbaudio: device 6 audiocontrol interface 0
has 0 input and 0 output AudioStreaming interfaces
Aug 19 17:11:57 linux kernel: ALSA ../alsa-kernel/usb/usbaudio.c:1966:
cannot create a card instance 0
Aug 19 17:11:57 linux insmod: Using
/lib/modules/2.4.18-4GB/kernel/sound/usb/snd-usb-audio.o

Where am I going wrong? When I did aconnect -i no usb device was shown.
Aug 19 17:11:57 linux kernel: ALSA ../alsa-kernel/usb/usbaudio.c:1966:
cannot create a card instance 0

MK-249 USB MIDI keyboard is the Evolution keyboard. 

I see both usb-midi and usbmidi. Could this be because I've got the daemon
installed as well?

-Original Message-
From: Pedro Lopez-Cabanillas [mailto:[EMAIL PROTECTED]]
Sent: 19 August 2002 16:29
To: Michael Martin
Cc: alsa-user
Subject: Re: [Alsa-user] ALSA USB MIDI Input


El Lun 19 Ago 2002 15:34, Michael Martin escribi:
 Hi,

 I downloaded, compiled, installed the alsa drivers (0.9.0rc3)

You need alsa-lib and alsa-utils packages also.

 I did modprobe snd-cmipci
 I did modprobe usb-midi
 All successful.

 But then I did aconnect -i and I could only see my sound card's External
 MIDI interface, not the usb-midi interface.

usb-midi is the old OSS driver. If you want to use ALSA, try modprobe 
snd-usb-midi instead.

You can use OSS programs with ALSA drivers, thanks to the OSS emulation 
included in ALSA, but not vice versa; aconnect will only work with ALSA 
drivers.

 Do I need to add any lines to my /etc/modules.conf to make usb midi work?

If you set your /etc/modules.conf properly, the alsasound script (installed
in 
/etc/rc.d/init.d by 'make install') will load your modules automatically 
every time you boot, or by hand running that script anytime.

Quoting an early post in this list about modules.conf:
Really detailled instructions for almost every supported card are
at http://www.alsa-project.org/alsa-doc/
for example this module snippet: 

# ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-cmipci
alias snd-card-1 snd-usb-midi
# module options should go here

# OSS/Free portion
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
alias sound-slot-1 snd-card-1

# only needed for 1st card
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

Regards,
Pedro


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user



Re: [Alsa-user] ALSA USB MIDI Input

2002-08-19 Thread Pedro Lopez-Cabanillas

El Lun 19 Ago 2002 18:24, Michael Martin escribió:

 Where am I going wrong? When I did aconnect -i no usb device was shown.
 Aug 19 17:11:57 linux kernel: ALSA ../alsa-kernel/usb/usbaudio.c:1966:
 cannot create a card instance 0

 MK-249 USB MIDI keyboard is the Evolution keyboard.

 I see both usb-midi and usbmidi. Could this be because I've got the daemon
 installed as well?

No, but you should uninstall it if you are going to use the driver instead the 
daemon.

When you plug in some usb device, the linux-hotplug program tries to find a 
suitable driver, and then modprobe it. That is what happened: first, hotplug 
has tried the audio.o module (OSS), but this driver is for digital audio, not 
MIDI, and cannot work with it:
 Aug 19 17:11:56 linux kernel: hub.c: USB new device connect on bus1/2,
 assigned device number 6
 Aug 19 17:11:56 linux kernel: usbaudio: device 6 audiocontrol interface 0
 interface 1 MIDIStreaming not supported
 Aug 19 17:11:56 linux kernel: usbaudio: device 6 audiocontrol interface 0
 has 0 input and 0 output AudioStreaming interfaces

Then, it probed the usb-midi (OSS) driver, that claimed your device 
succesfully:
 Aug 19 17:11:56 linux kernel: usb-midi: Found MIDISTREAMING on dev
 0a4d:008c, iface 1
 Aug 19 17:11:56 linux kernel: usb-midi: Found MIDIStreaming device
 corresponding to Release 1.00 of spec.
 Aug 19 17:11:56 linux kernel: usb-midi: Found IN Jack 0x01 EMBEDDED
 Aug 19 17:11:56 linux kernel: usb-midi: Found IN Jack 0x02 EXTERNAL
 Aug 19 17:11:56 linux kernel: usb-midi: Found OUT Jack 0x03 EMBEDDED, 1
 pins Aug 19 17:11:56 linux kernel: usb-midi: Found OUT Jack 0x04 EXTERNAL,
 1 pins Aug 19 17:11:56 linux kernel: string descriptor 0 found (length = 4)
 Aug 19 17:11:56 linux kernel: usb-midi: langid(0) 0x0409
 Aug 19 17:11:56 linux kernel: usb-midi: langid(match) 0x0409
 Aug 19 17:11:56 linux kernel: usb-midi: fetchString(2)
 Aug 19 17:11:56 linux kernel: usb-midi: fetchString = 24
 Aug 19 17:11:56 linux kernel: usbmidi: found [ MK-249 USB MIDI keyboard ]
 (0x0a4d:0x008c), attached:
 Aug 19 17:11:56 linux kernel: usbmidi: /dev/midi01: in (ep:81 cid: 0
 bufsiz: 0) out (ep:02 cid: 0 bufsiz:64)

At this point, you can use your keyboard with this driver, reading and writing  
to /dev/midi01. This is not ALSA, but OSS.

After, you tried modprobe snd-usb-audio:
 Aug 19 17:11:57 linux kernel: usb.c: registered new driver snd-usb-audio
 Aug 19 17:11:57 linux kernel: usbaudio: device 6 audiocontrol interface 0
 interface 1 MIDIStreaming not supported
 Aug 19 17:11:57 linux kernel: usbaudio: device 6 audiocontrol interface 0
 has 0 input and 0 output AudioStreaming interfaces
 Aug 19 17:11:57 linux kernel: ALSA ../alsa-kernel/usb/usbaudio.c:1966:
 cannot create a card instance 0
 Aug 19 17:11:57 linux insmod: Using
 /lib/modules/2.4.18-4GB/kernel/sound/usb/snd-usb-audio.o

Of course, this module can't find any hardware to work with, and fails.
If you do a lsmod command, you should see the 'audio' and 'usb-midi' 
drivers. To unload them:
# rmmod audio usb-midi

I suggest you to add these modules to the /etc/hotplug/blacklist file:
# cat /etc/hotplug/blacklist
audio
usb-midi
snd-usb-audio
snd-usb-midi

You can see that I include the ALSA modules here. This prevents hotplug from 
loading them when you plug the keyboard, but this is not a problem if you use 
the right /etc/modules.conf setup, and the alsasound script.

HTH

Pedro



---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user



Re: [Alsa-user] ALSA USB MIDI Input

2002-08-14 Thread Pedro Lopez-Cabanillas

El Mié 14 Ago 2002 14:57, Michael Martin escribió:
 Does anyone know what the situation is with ALSA and usb midi in?

I'm using successfully two USB-MIDI devices: a Roland/Edirol UM-2 and a 
Midiman Midisport 2x2 with ALSA. I have seen some reports about many other 
USB MIDI devices working, including Evolution's keyboards.

 I'm having trouble setting this up. I compiled and installed successfully
 (I think) the midid (usb midi daemon from http://
 www.informatik.uni-halle.de/~ladischc/usbmidid.html), plugged a USB MIDI
 Compatible input device, followed instructions and the system log reported
 that I could not find the correct driver.

The daemon loading system is based in linux-hotplug. I had seen that if a 
device has an AudioControl interface and a MIDIStreaming one, certain hotplug 
versions only report the AudioControl interface to the loader. You can try a 
dirty workaround for  this, changing the first line of 
/etc/hotplug/usb.usermap from:
snd-usbmidi  0x0180 0 0 0 0 0 0 0 0x01 0x03 0 0
to:
snd-usbmidi  0x0180 0 0 0 0 0 0 0 0x01 0x01 0 0

Note that if you have also some USB digital audio devices in your system, this 
will try to load (erroneusly) the ALSA USB-MIDI daemon for these devices, as 
the AudioControl interface is a common interface subclass for both device 
types.

Another reversed problem with hotplug may be that some kernel USB-audio  
modules can claim (erroneusly again) the MIDI divices. In this case, you can 
include the offending driver name in /etc/hotplug/blacklist and load the ALSA 
kernel drivers with kmod and /etc/modules.conf 

 According to the URL above, usb midi has been integrated into the ALSA
 kernel, should I therefore download the latest ALSA, compile and install?
 If so, which version?

The USB-MIDI daemon (user space driver) is deprecated now, and doesn't provide 
a rawmidi interface, only the sequencer client. You can try the kernel driver 
version instead. It is in the current CVS. See:
http://www.alsa-project.org/download.php3

After you (hopefully) success with this stuff, a report about your working 
devices will be appreciated (CC: alsa-devel list), in order to include them 
in the alsa-matrix: http://www.alsa-project.org/alsa-doc/

Regards,
Pedro



---
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
___
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user



Re: [Alsa-user] ALSA USB MIDI Input

2002-08-14 Thread Clemens Ladisch

Michael Martin wrote:
 I'm having trouble setting this up. I compiled and installed successfully (I
 think) the midid (usb midi daemon from http://
 www.informatik.uni-halle.de/~ladischc/usbmidid.html), plugged a USB MIDI
 Compatible input device, followed instructions and the system log reported
 that I could not find the correct driver.

What is the exact error messsage?

The problem is probably that described in Pedro's mail.

If it says something like device 123 is not claimed by any driver, this
is OK, because usbmidid is not a driver but a daemon, and is loaded after
that message has been printed.

 I compiled your usbmidid program and managed to install it fine, but I still
 need to know simply how to monitor MIDI input like a sysex or midi monitor
 program that can connect to the usb driver and how it connects to the usb
 driver?

The usbmidid program creates ALSA sequencer ports. The alsa-lib package
contains a test program for this named seq in the alsa-lib/test/
directory. Use ./seq client to show all clients (in most cases,
usbmidid is client number 128), and ./seq port 128 to show all ports
of that client. To monitor input events from port 0 on client 128, use
./seq decoder 128.0. The output is very verbose, but you should be
able to see what's going on.

You could use any other program which supports the ALSA sequencer, but
there aren't (yet) many such programs, and from those, most use the API
from ALSA version 0.5.x, which is outdated. The current ALSA version is
0.9.x, and is not backwards compatible.

Most programs support the 'old' OSS API (RawMidi, the API used by the
current Linux kernel drivers). The daemon doesn't support the OSS API,
but ALSA can emulate it for its kernel drivers. Therefore, I'd suggest
to use ALSA's kernel driver instead.

 According to the URL above, usb midi has been integrated into the ALSA
 kernel, should I therefore download the latest ALSA, compile and install? If
 so, which version?

The latest released version is 0.9.0rc2 (from the ALSA homepage).
This version does _not_ contain the USB MIDI driver, so you have to
get the latest version from CVS, see
http://www.alsa-project.org/download.php3 (at the bottom).
There are scripts named cvscompile to compile the packages, see the
INSTALL files for details.

 Do you know where I can find more information about USB MIDI with ALSA and
 USB MIDI on Linux? We're trying to test our USB Keyboard Controllers
 (Evolution keyboards are really just MIDI Input Controller devices) in
 Linux, but there seems to be little information to go on.

(alsa-user readers: please don't read the next paragraph ;-)
There is an OSS driver from Nagano Daisuke at
http://member.nifty.ne.jp/Breeze/softwares/unix/usbmidi-e.html.
This is worth considering because it doesn't require installation of
the entire ALSA package, and, for the time being, an OSS driver may be
adequate for most users.

Some information about the ALSA driver can be found at
http://www.alsa-project.org/alsa-doc/doc-php/template.php3?module=usb-midi.
The section titled Before you start is only relevant for devices from
Midiman.
This page can be reached from the ALSA Soundcard Matrix at
http://www.alsa-project.org/alsa-doc/. Evolution keyboards aren't
yet listed there; yesterday, Patrick wrote:
| I'm collecting them for now until I or Dan get the energy to add 
| them to the matrix.

I don't think we can expect normal users to be able to download the
latest code via CVS. It is probably better to wait until the next
release (candidate) is released as an easy-to-install package.


HTH
Clemens


---
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
___
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user