]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Fix case when USB MIDI interface has more than one extra endpoint...
authorAndreas Steinmetz <ast@domdv.de>
Tue, 31 Mar 2020 12:25:54 +0000 (14:25 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 31 Mar 2020 12:34:28 +0000 (14:34 +0200)
commita988bc507e7837368ade316c69d9c6423f3cd8bf
tree40c16ff0a6cf645181f67595b42a670ddac8b132
parente148b277046657718f8fb46e170cd3b267285fce
ALSA: usb-audio: Fix case when USB MIDI interface has more than one extra endpoint descriptor

The Miditech MIDIFACE 16x16 (USB ID 1290:1749) has more than one extra
endpoint descriptor.

The first extra descriptor is: 0x06 0x30 0x00 0x00 0x00 0x00

As the code in snd_usbmidi_get_ms_info() looks only at the
first extra descriptor to find USB_DT_CS_ENDPOINT the device
as such is recognized but there is neither input nor output
configured.

The patch iterates through the extra descriptors to find the
proper one. With this patch the device is correctly configured.

Signed-off-by: Andreas Steinmetz <ast@domdv.de>
Link: https://lore.kernel.org/r/1c3b431a86f69e1d60745b6110cdb93c299f120b.camel@domdv.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/midi.c