android_kernel_samsung_msm8976/sound
Takashi Iwai 5ebcb3c532 ALSA: usb-audio: Fix the missing ctl name suffix at parsing SU
commit 5a15f289ee87eaf33f13f08a4909ec99d837ec5f upstream.

The commit 89b89d121ffc ("ALSA: usb-audio: Add check return value for
usb_string()") added the check of the return value from
snd_usb_copy_string_desc(), which is correct per se, but it introduced
a regression.  In the original code, either the "Clock Source",
"Playback Source" or "Capture Source" suffix is added after the
terminal string, while the commit changed it to add the suffix only
when get_term_name() is failing.  It ended up with an incorrect ctl
name like "PCM" instead of "PCM Capture Source".

Also, even the original code has a similar bug: when the ctl name is
generated from snd_usb_copy_string_desc() for the given iSelector, it
also doesn't put the suffix.

This patch addresses these issues: the suffix is added always when no
static mapping is found.  Also the patch tries to put more comments
and cleans up the if/else block for better readability in order to
avoid the same pitfall again.

Fixes: 89b89d121ffc ("ALSA: usb-audio: Add check return value for usb_string()")
Reported-and-tested-by: Mauro Santos <registo.mailling@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 21:46:20 +02:00
..
aoa
arm ASoC: fix broken pxa SoC support 2015-10-22 14:37:50 -07:00
atmel
core ALSA: rawmidi: Avoid racy info ioctl via ctl device 2019-07-27 21:46:17 +02:00
drivers ALSA: dummy: Fix a use-after-free at closing 2019-07-27 21:41:56 +02:00
firewire
i2c
isa
mips
oss
parisc
pci This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
pcmcia
ppc
sh
soc sound: soc: msm8952_rt5659: Handle defer while probing 2019-07-27 21:45:58 +02:00
sparc
spi
synth ALSA: synth: Fix conflicting OSS device registration on AWE32 2015-10-22 14:37:50 -07:00
usb ALSA: usb-audio: Fix the missing ctl name suffix at parsing SU 2019-07-27 21:46:20 +02:00
Kconfig
Makefile
ac97_bus.c
last.c
sound_core.c
sound_firmware.c