kernel_optimize_test/sound/usb
Takashi Iwai 19418ed317 ALSA: usb-audio: scarlett2: Fix wrong resume call
commit 785b6f29a795f109685f286b91e0250c206fbffb upstream.

The current way of the scarlett2 mixer code managing the
usb_mixer_elem_info object is wrong in two ways: it passes its
internal index to the head.id field, and the val_type field is
uninitialized.  This ended up with the wrong execution at the resume
because a bogus unit id is passed wrongly.  Also, in the later code
extensions, we'll have more mixer elements, and passing the index will
overflow the unit id size (of 256).

This patch corrects those issues.  It introduces a new value type,
USB_MIXER_BESPOKEN, which indicates a non-standard mixer element, and
use this type for all scarlett2 mixer elements, as well as
initializing the fixed unit id 0 for avoiding the overflow.

Tested-by: Geoffrey D. Bennett <g@b4.vu>
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/49721219f45b7e175e729b0d9d9c142fd8f4342a.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-14 16:55:35 +02:00
..
6fire
bcd2000
caiaq
hiface
line6 ALSA: line6: Fix racy initialization of LINE6 MIDI 2021-05-26 12:06:51 +02:00
misc
usx2y Revert "Revert "ALSA: usx2y: Fix potential NULL pointer dereference"" 2021-06-03 09:00:51 +02:00
card.c ALSA: usb-audio: Add error checks for usb_driver_claim_interface() calls 2021-05-14 09:50:33 +02:00
card.h
clock.c ALSA: usb-audio: Explicitly set up the clock selector 2021-05-11 14:47:32 +02:00
clock.h
debug.h
endpoint.c ALSA: usb-audio: Don't avoid stopping the stream at disconnection 2021-03-20 10:43:44 +01:00
endpoint.h
format.c ALSA: usb-audio: fix rate on Ozone Z90 USB headset 2021-07-14 16:55:35 +02:00
format.h
helper.c
helper.h
Kconfig
Makefile
media.c
media.h
midi.c ALSA: usb-audio: Validate MS endpoint descriptors 2021-05-26 12:06:51 +02:00
midi.h
mixer_maps.c ALSA: usb-audio: Add dB range mapping for Sennheiser Communications Headset PC 8 2021-05-11 14:47:32 +02:00
mixer_quirks.c ALSA: usb-audio: scarlett2: Improve driver startup messages 2021-06-03 09:00:27 +02:00
mixer_quirks.h
mixer_s1810c.c
mixer_s1810c.h
mixer_scarlett_gen2.c ALSA: usb-audio: scarlett2: Fix wrong resume call 2021-07-14 16:55:35 +02:00
mixer_scarlett_gen2.h ALSA: usb-audio: scarlett2: Improve driver startup messages 2021-06-03 09:00:27 +02:00
mixer_scarlett.c
mixer_scarlett.h
mixer_us16x08.c ALSA: usb-audio: US16x08: fix value count for level meters 2020-11-27 14:56:40 +01:00
mixer_us16x08.h
mixer.c ALSA: usb-audio: scarlett2: Fix wrong resume call 2021-07-14 16:55:35 +02:00
mixer.h ALSA: usb-audio: scarlett2: Fix wrong resume call 2021-07-14 16:55:35 +02:00
pcm.c ALSA: usb-audio: Don't avoid stopping the stream at disconnection 2021-03-20 10:43:44 +01:00
pcm.h
power.c
power.h
proc.c
proc.h
quirks-table.h ALSA: usb-audio: Add MIDI quirk for Vox ToneLab EX 2021-05-07 11:04:33 +02:00
quirks.c ALSA: usb-audio: Add error checks for usb_driver_claim_interface() calls 2021-05-14 09:50:33 +02:00
quirks.h
stream.c ALSA: usb-audio: Fix control 'access overflow' errors from chmap 2020-12-21 13:30:07 +01:00
stream.h
usbaudio.h ALSA: usb-audio: Add error checks for usb_driver_claim_interface() calls 2021-05-14 09:50:33 +02:00
validate.c