linux-stable/sound/usb
Andreas Steinmetz 78483c1c77 ALSA: usb-audio: Fix case when USB MIDI interface has more than one extra endpoint descriptor
[ Upstream commit 5c6cd7021a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-01 13:12:40 +02:00
..
6fire ALSA: 6fire: Use common error handling code in usb6fire_chip_probe() 2017-09-07 10:29:35 +02:00
bcd2000 ALSA: bcd2000: Add a sanity check for invalid EPs 2018-02-25 11:07:48 +01:00
caiaq ALSA: caiaq: Add a sanity check for invalid EPs 2018-02-25 11:07:48 +01:00
hiface ALSA: usb: constify snd_pcm_ops structures 2017-08-19 11:02:27 +02:00
line6 ALSA: line6: Perform sanity check for each URB creation 2020-07-22 09:22:25 +02:00
misc ALSA: usb: constify snd_pcm_ops structures 2017-08-19 11:02:27 +02:00
usx2y ALSA: usx2y: Fix potential NULL dereference 2020-05-02 17:24:22 +02:00
card.c ALSA: usb-audio: Fix inconsistent card PM state after resume 2020-06-20 10:25:00 +02:00
card.h ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109 2020-08-21 09:48:15 +02:00
clock.c ALSA: usb-audio: Add sanity checks in v2 clock parsers 2017-11-30 08:40:48 +00:00
clock.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
endpoint.c Revert "ALSA: usb-audio: Improve frames size computation" 2020-07-09 09:36:32 +02:00
endpoint.h Revert "ALSA: usb-audio: Improve frames size computation" 2020-07-09 09:36:32 +02:00
format.c ALSA: usb-audio: Filter out unsupported sample rates on Focusrite devices 2020-05-02 17:24:23 +02:00
format.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
helper.c ALSA: usb-audio: correct speed checking 2016-05-08 11:42:04 +02:00
helper.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig ALSA: us122l: enable compile testing 2017-05-15 11:02:14 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
midi.c ALSA: usb-audio: Fix case when USB MIDI interface has more than one extra endpoint descriptor 2020-10-01 13:12:40 +02:00
midi.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mixer.c ALSA: usb-audio: Fix OOB access of mixer element list 2020-06-30 15:38:02 -04:00
mixer.h ALSA: usb-audio: Fix OOB access of mixer element list 2020-06-30 15:38:02 -04:00
mixer_maps.c ALSA: usb-audio: Add mixer workaround for TRX40 and co 2020-04-24 08:00:33 +02:00
mixer_quirks.c ALSA: usb-audio: Creative USB X-Fi Pro SB1095 volume knob support 2020-08-21 09:48:14 +02:00
mixer_quirks.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mixer_scarlett.c ALSA: usb-audio: Clean up mixer element list traverse 2020-06-30 15:38:02 -04:00
mixer_scarlett.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mixer_us16x08.c ALSA: usb: Avoid VLA in mixer_us16x08.c 2017-05-31 08:46:19 +02:00
mixer_us16x08.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pcm.c ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109 2020-08-21 09:48:15 +02:00
pcm.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
power.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
proc.c ALSA: usb-audio: Avoid nested autoresume calls 2015-08-26 15:38:25 +02:00
proc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
quirks-table.h ALSA: usb-audio: Update documentation comment for MS2109 quirk 2020-09-03 11:22:34 +02:00
quirks.c ALSA: usb-audio: Add delay quirk for H570e USB headsets 2020-10-01 13:12:27 +02:00
quirks.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stream.c ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109 2020-08-21 09:48:15 +02:00
stream.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
usbaudio.h ALSA: usb-audio: Fix inconsistent card PM state after resume 2020-06-20 10:25:00 +02:00