mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
5ebcb3c532
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> |
||
---|---|---|
.. | ||
6fire | ||
caiaq | ||
misc | ||
usx2y | ||
card.c | ||
card.h | ||
clock.c | ||
clock.h | ||
debug.h | ||
endpoint.c | ||
endpoint.h | ||
format.c | ||
format.h | ||
helper.c | ||
helper.h | ||
Kconfig | ||
Makefile | ||
midi.c | ||
midi.h | ||
mixer.c | ||
mixer.h | ||
mixer_maps.c | ||
mixer_quirks.c | ||
mixer_quirks.h | ||
pcm.c | ||
pcm.h | ||
power.h | ||
proc.c | ||
proc.h | ||
quirks-table.h | ||
quirks.c | ||
quirks.h | ||
stream.c | ||
stream.h | ||
usbaudio.h |