linux-stable/sound
Johan Hovold 725a9ac717 ASoC: codecs: lpass-wsa-macro: fix compander volume hack
commit 46188db080 upstream.

The LPASS WSA macro codec driver is updating the digital gain settings
behind the back of user space on DAPM events if companding has been
enabled.

As compander control is exported to user space, this can result in the
digital gain setting being incremented (or decremented) every time the
sound server is started and the codec suspended depending on what the
UCM configuration looks like.

Soon enough playback will become distorted (or too quiet).

This is specifically a problem on the Lenovo ThinkPad X13s as this
bypasses the limit for the digital gain setting that has been set by the
machine driver.

Fix this by simply dropping the compander gain offset hack. If someone
cares about modelling the impact of the compander setting this can
possibly be done by exporting it as a volume control later.

Note that the volume registers still need to be written after enabling
clocks in order for any prior updates to take effect.

Fixes: 2c4066e5d4 ("ASoC: codecs: lpass-wsa-macro: add dapm widgets and route")
Cc: stable@vger.kernel.org      # 5.11
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://msgid.link/r/20240119112420.7446-4-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-23 08:54:55 +01:00
..
ac97
aoa ALSA: aoa: Fix I2S device accounting 2022-11-03 23:59:18 +09:00
arm
atmel
core ALSA: pcm: fix out-of-bounds in snd_pcm_state_names 2023-12-13 18:36:42 +01:00
drivers ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt 2022-12-31 13:14:16 +01:00
firewire ALSA: firewire-digi00x: prevent potential use after free 2023-05-24 17:36:49 +01:00
hda ALSA: hda: intel-dspcfg: add filters for ARL-S and ARL 2024-02-23 08:54:47 +01:00
i2c ALSA: i2c/cs8427: fix iec958 mixer control deactivation 2023-04-20 12:13:51 +02:00
isa ALSA: wavefront: Proper check of get_user() error 2022-05-25 09:57:27 +02:00
mips
oss sound/oss/dmasound: fix 'dmasound_setup' defined but not used 2023-05-11 23:00:40 +09:00
parisc
pci ALSA: hda/conexant: Fix headset auto detect fail in cx8070 and SN6140 2024-02-23 08:54:49 +01:00
pcmcia
ppc
sh
soc ASoC: codecs: lpass-wsa-macro: fix compander volume hack 2024-02-23 08:54:55 +01:00
sparc
spi ALSA: spi: Add check for clk_enable() 2022-04-08 14:23:19 +02:00
synth ALSA: emux: Avoid potential array out-of-bound in snd_emux_xg_control() 2023-02-14 19:17:56 +01:00
usb ALSA: usb-audio: Add delay quirk for MOTU M Series 2nd revision 2024-02-23 08:54:45 +01:00
virtio
x86 ALSA: intel_hdmi: Fix the missing snd_card_free() call at probe error 2022-04-20 09:34:07 +02:00
xen
Kconfig um: Fix hostaudio build errors 2023-09-19 12:22:49 +02:00
Makefile
ac97_bus.c
last.c
sound_core.c