On 01/06/2015 07:39 AM, Clemens Ladisch wrote:
> Paul Bonser wrote:
>> This device incorrectly reports its bInterfaceClass as 255, when it
>> should really be 1 (USB_CLASS_AUDIO).
>>
>> +++ b/sound/usb/quirks-table.h
>> +{
>> + /* Akai MPC Element */
>> + USB_DEVICE(0x09e8, 0x0021),
>> + .bInterfaceClass = USB_CLASS_AUDIO,
>> +},
>
> This is not a correct usb_device_id entry.
I based it on an existing entry in the same file:
/* KeithMcMillen Stringport */
{
USB_DEVICE(0x1f38, 0x0001),
.bInterfaceClass = USB_CLASS_AUDIO,
},
It built with no complaints and functioned as expected (showed up as a
MIDI device and sent/recived commands via ALSA MIDI whereas before it
didn't). The only interfaces it has are audio interfaces, so if this
overrides every interface, that's fine.
I'm sure it's possible that the Stringport entry is also incorrect, so
is there a different format that would be more proper to use?
>
> Show the output of "lsusb -v" for this device.
The device actually has two modes: a low power mode (where the LEDs are
lit up dimly or not at all), and a high power mode (where the LEDs have
their full functionality). In the low power mode, it gives a MaxPower of
100mA, and in the high power mode it gives 500mA. It's the high power
mode where the bInterfaceClass is set to 255. Everthing else, aside from
MaxPower is the same.
"Low power mode":
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x09e8 AKAI Professional M.I. Corp.
idProduct 0x0021
bcdDevice 1.12
iManufacturer 1
iProduct 2
iSerial 4
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 120
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 0
iInterface 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 18
bInCollection 1
baInterfaceNr( 0) 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 3 MIDI Streaming
bInterfaceProtocol 0
iInterface 3
MIDIStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 84
MIDIStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (MIDI_IN_JACK)
bJackType 1 Embedded
bJackID 1
iJack 6
MIDIStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (MIDI_IN_JACK)
bJackType 1 Embedded
bJackID 2
iJack 7
MIDIStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (MIDI_IN_JACK)
bJackType 1 Embedded
bJackID 3
iJack 8
MIDIStreaming Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (MIDI_OUT_JACK)
bJackType 1 Embedded
bJackID 4
bNrInputPins 1
baSourceID( 0) 1
BaSourcePin( 0) 1
iJack 13
MIDIStreaming Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (MIDI_OUT_JACK)
bJackType 1 Embedded
bJackID 5
bNrInputPins 1
baSourceID( 0) 2
BaSourcePin( 0) 1
iJack 14
MIDIStreaming Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (MIDI_OUT_JACK)
bJackType 1 Embedded
bJackID 6
bNrInputPins 1
baSourceID( 0) 3
BaSourcePin( 0) 1
iJack 15
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
bRefresh 0
bSynchAddress 0
MIDIStreaming Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (GENERAL)
bNumEmbMIDIJack 3
baAssocJackID( 0) 1
baAssocJackID( 1) 2
baAssocJackID( 2) 3
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
bRefresh 0
bSynchAddress 0
MIDIStreaming Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (GENERAL)
bNumEmbMIDIJack 3
baAssocJackID( 0) 4
baAssocJackID( 1) 5
baAssocJackID( 2) 6
Default mode (with some notes I added when I was first investigating this):
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x09e8 AKAI Professional M.I. Corp.
idProduct 0x0021
bcdDevice 1.12
iManufacturer 1
iProduct 2
iSerial 4
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 120
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 1
bInterfaceProtocol 0
iInterface 0
** UNRECOGNIZED: 09 24 01 00 01 12 00 01 01
Note, this is the same AudioControl Interface Descriptor, but
since the bInterfaceClass was changed to 255, it isn't
recognized.
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 3
bInterfaceProtocol 0
iInterface 3
** UNRECOGNIZED: 07 24 01 00 01 54 00
MIDIStreaming HEADER
** UNRECOGNIZED: 06 24 02 01 01 06
MIDIStreaming MIDI_IN_JACK 1
** UNRECOGNIZED: 06 24 02 01 02 07
MIDIStreaming MIDI_IN_JACK 2
** UNRECOGNIZED: 06 24 02 01 03 08
MIDIStreaming MIDI_IN_JACK 3
** UNRECOGNIZED: 09 24 03 01 04 01 01 01 0d
MIDIStreaming MIDI_OUT_JACK 4
** UNRECOGNIZED: 09 24 03 01 05 01 02 01 0e
MIDIStreaming MIDI_OUT_JACK 5
** UNRECOGNIZED: 09 24 03 01 06 01 03 01 0f
MIDIStreaming MIDI_OUT_JACK 6
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
bRefresh 0
bSynchAddress 0
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
bRefresh 0
bSynchAddress 0
>
> And read Documentation/SubmittingPatches.
Sorry, first kernel patch in 7+ years, and my second one ever. If I'm
reading this correctly, I should have sent he email to you (since you're
the USB MIDI maintainer), and CCd the [email protected] and
[email protected] lists?
Once we've worked out the proper format for this entry, should I re-send
it following that pattern?
>
>
> Regards,
> Clemens
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html