[alsa-devel] How to add a new MIDI device to the usbaudio driver

Daniel Mack zonque at gmail.com
Mon Aug 22 13:49:12 CEST 2011


On Mon, Aug 22, 2011 at 1:40 PM, Kristian Amlie <kristian at amlie.name> wrote:
> On 08/22/11 12:54, Daniel Mack wrote:
>> On Mon, Aug 22, 2011 at 12:52 PM, Kristian Amlie <kristian at amlie.name> wrote:
>>> I have just received a new MIDI instrument (Starr Labs Z7S) which is not
>>> recognized by the kernel, and I'd like to add support for it. I'm hoping
>>> that it uses a standard MIDI interface and it's just a matter of adding
>>> the correct entry in the table of devices.
>>>
>>> I have tried to add an entry to sound/usb/usbquirks.h
>>> (sound/usb/quirks-table.h in later kernels), but so far I haven't
>>> succeeded. Is there any documentation for how to do this, and which
>>> options to use? Google hasn't really turned up anything...
>>
>> The USB descriptors should give us a hint. Can you send your "lsusb
>> -v" output, please?
>
> Sure! Here is the lsusb -v output for the device:

It doesn't seem to be using a standard MIDI interface, but there's a
chance that it accepts raw MIDI byte streams. Can you check the patch
below?


Daniel


diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index a42e3ef..0f8aa11 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -39,6 +39,16 @@
        .idProduct = prod, \
        .bInterfaceClass = USB_CLASS_VENDOR_SPEC

+/* Starr Labs MIDI USB device */
+{
+       USB_DEVICE(0x0403, 0xb8d8),
+       .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+               /* .vendor_name = "STARR LABS", */
+               /* .product_name = "Starr Labs MIDI USB device", */
+               .ifnum = 0,
+               .type = QUIRK_MIDI_RAW_BYTES
+       }
+},
 /* Creative/Toshiba Multimedia Center SB-0500 */
 {
        USB_DEVICE(0x041e, 0x3048),


More information about the Alsa-devel mailing list