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:
bLength 0x12
bDescriptorType 0x01
bcdUSB 0x0100 (USB spec. 01.00)
bDeviceClass 0x00 (ifc's specify own)
bDeviceSubClass 0x00
bDeviceProtocol 0x00
bMaxPacketSize0 0x40
idVendor 0x0A4D (unknown)
idProduct 0x008C
bcdDevice 0x0252 (release 02.52)
iManufacturer 0x01
Language ID 0x0409
iManufacturer String Evolution Electronics Ltd.
iProduct 0x02
Language ID 0x0409
iProduct String MK-249 USB MIDI keyboard
iSerialNumber 0x00
bNumConfigurations 0x01 (1)
Configuration Descriptor, Index 0x00
bLength 0x09
bDescriptorType 0x02
wTotalLength 0x0065 (101)
bNumInterfaces 0x02 (2)
bConfigurationValue 0x01
iConfiguration 0x03
Language ID 0x0409
iConfiguration String Audio Class
bmAttributes 0xC0 (self & bus powered)
MaxPower 0x00 (0 mA)
INTERFACE Descriptor (Number 0x00, Alternate Setting 0x00)
bLength 0x09
bDescriptorType 0x04
bInterfaceNumber 0x00
bAlternateSetting 0x00
bNumEndpoints 0x00 (only uses Endpoint
0)
bInterfaceClass 0x01 (USB specified device
class)
bInterfaceSubClass 0x01
bInterfaceProtocol 0x00 (not vendor or class
specific)
iInterface 0x00
INTERFACE Descriptor (Number 0x01, Alternate Setting 0x00)
bLength 0x09
bDescriptorType 0x04
bInterfaceNumber 0x01
bAlternateSetting 0x00
bNumEndpoints 0x02
bInterfaceClass 0x01 (USB specified device
class)
bInterfaceSubClass 0x03
bInterfaceProtocol 0x00 (not vendor or class
specific)
iInterface 0x00
Endpoint Descriptor 0x81
bLength 0x09
bDescriptorType 0x05
bEndpointAddress 0x81 (ep #1, IN)
bmAttributes 0x02 (Transfer Type :
Bulk)
wMaxPacketSize 0x0040
bInterval 0x00 (0 milliseconds)
Extra Bytes 0x00 0x00
Endpoint Descriptor 0x02
bLength 0x09
bDescriptorType 0x05
bEndpointAddress 0x02 (ep #2, OUT)
bmAttributes 0x02 (Transfer Type :
Bulk)
wMaxPacketSize 0x0040
bInterval 0x00 (0 milliseconds)
Extra Bytes 0x00 0x00
NonStandard Descriptor
bLength 0x09
bDescriptorType 0x24
Data 0x01 0x00 0x01 0x09 0x00
0x01 0x01
NonStandard Descriptor
bLength 0x07
bDescriptorType 0x24
Data 0x01 0x00 0x01 0x41 0x00
NonStandard Descriptor
bLength 0x06
bDescriptorType 0x24
Data 0x02 0x01 0x01 0x00
NonStandard Descriptor
bLength 0x06
bDescriptorType 0x24
Data 0x02 0x02 0x02 0x00
NonStandard Descriptor
bLength 0x09
bDescriptorType 0x24
Data 0x03 0x01 0x03 0x01 0x02
0x01 0x00
NonStandard Descriptor
bLength 0x09
bDescriptorType 0x24
Data 0x03 0x02 0x04 0x01 0x01
0x01 0x00
NonStandard Descriptor
bLength 0x05
bDescriptorType 0x25
Data 0x01 0x01 0x03
NonStandard Descriptor
bLength 0x05
bDescriptorType 0x25
Data 0x01 0x01 0x01