linux/sound
Srinivas Kandagatla ee8bfa62bf ASoC: qdsp6: q6routing: Fix return value from msm_routing_put_audio_mixer
commit 4739d88ad8e1900f809f8a5c98f3c1b65bf76220 upstream.

msm_routing_put_audio_mixer() can return incorrect value in various scenarios.

scenario 1:
amixer cset iface=MIXER,name='SLIMBUS_0_RX Audio Mixer MultiMedia1' 1
amixer cset iface=MIXER,name='SLIMBUS_0_RX Audio Mixer MultiMedia1' 0

return value is 0 instead of 1 eventhough value was changed

scenario 2:
amixer cset iface=MIXER,name='SLIMBUS_0_RX Audio Mixer MultiMedia1' 1
amixer cset iface=MIXER,name='SLIMBUS_0_RX Audio Mixer MultiMedia1' 1

return value is 1 instead of 0 eventhough the value was not changed

scenario 3:
amixer cset iface=MIXER,name='SLIMBUS_0_RX Audio Mixer MultiMedia1' 0
return value is 1 instead of 0 eventhough the value was not changed

Fix this by adding checks, so that change notifications are sent correctly.

Fixes: e3a33673e8 ("ASoC: qdsp6: q6routing: Add q6routing driver")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20211130163110.5628-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-14 14:49:03 +01:00
..
ac97
aoa
arm
atmel
core ALSA: pcm: oss: Handle missing errors in snd_pcm_oss_change_params*() 2021-12-14 14:49:01 +01:00
drivers
firewire
hda ALSA: hda: hdac_stream: fix potential locking issue in snd_hdac_stream_assign() 2021-11-26 10:47:23 +01:00
i2c
isa ALSA: gus: fix null pointer dereference on pointer block 2021-11-26 10:47:16 +01:00
mips
oss
parisc
pci ALSA: hda/realtek - Add headset Mic support for Lenovo ALC897 platform 2021-12-14 14:49:00 +01:00
pcmcia
ppc
sh
soc ASoC: qdsp6: q6routing: Fix return value from msm_routing_put_audio_mixer 2021-12-14 14:49:03 +01:00
sparc
spi
synth ALSA: synth: missing check for possible NULL after the call to kstrdup 2021-11-17 09:48:19 +01:00
usb ALSA: usb-audio: Add registration quirk for JBL Quantum 400 2021-11-17 09:48:19 +01:00
x86
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c