This is a note to let you know that I've just added the patch titled ASoC: qcom: sc8280xp: limit speaker volumes to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: asoc-qcom-sc8280xp-limit-speaker-volumes.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From c481016bb4f8a9c059c39ac06e7b65e233a61f6a Mon Sep 17 00:00:00 2001 From: Johan Hovold <johan+linaro@xxxxxxxxxx> Date: Mon, 22 Jan 2024 19:18:17 +0100 Subject: ASoC: qcom: sc8280xp: limit speaker volumes From: Johan Hovold <johan+linaro@xxxxxxxxxx> commit c481016bb4f8a9c059c39ac06e7b65e233a61f6a upstream. The UCM configuration for the Lenovo ThinkPad X13s has up until now been setting the speaker PA volume to the minimum -3 dB when enabling the speakers, but this does not prevent the user from increasing the volume further. Limit the digital gain and PA volumes to a combined -3 dB in the machine driver to reduce the risk of speaker damage until we have active speaker protection in place (or higher safe levels have been established). Note that the PA volume limit cannot be set lower than 0 dB or PulseAudio gets confused when the first 16 levels all map to -3 dB. Also note that this will probably need to be generalised using machine-specific limits, but a common limit should do for now. Cc: <stable@xxxxxxxxxxxxxxx> # 6.5 Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx> Link: https://msgid.link/r/20240122181819.4038-3-johan+linaro@xxxxxxxxxx Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- sound/soc/qcom/sc8280xp.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) --- a/sound/soc/qcom/sc8280xp.c +++ b/sound/soc/qcom/sc8280xp.c @@ -34,12 +34,14 @@ static int sc8280xp_snd_init(struct snd_ case WSA_CODEC_DMA_RX_0: case WSA_CODEC_DMA_RX_1: /* - * set limit of 0dB on Digital Volume for Speakers, - * this can prevent damage of speakers to some extent without - * active speaker protection + * Set limit of -3 dB on Digital Volume and 0 dB on PA Volume + * to reduce the risk of speaker damage until we have active + * speaker protection in place. */ - snd_soc_limit_volume(card, "WSA_RX0 Digital Volume", 84); - snd_soc_limit_volume(card, "WSA_RX1 Digital Volume", 84); + snd_soc_limit_volume(card, "WSA_RX0 Digital Volume", 81); + snd_soc_limit_volume(card, "WSA_RX1 Digital Volume", 81); + snd_soc_limit_volume(card, "SpkrLeft PA Volume", 17); + snd_soc_limit_volume(card, "SpkrRight PA Volume", 17); break; default: break; Patches currently in stable-queue which might be from johan+linaro@xxxxxxxxxx are queue-6.6/asoc-codecs-wcd938x-fix-headphones-volume-controls.patch queue-6.6/asoc-codecs-lpass-wsa-macro-fix-compander-volume-hack.patch queue-6.6/asoc-codecs-wsa883x-fix-pa-volume-control.patch queue-6.6/asoc-qcom-sc8280xp-limit-speaker-volumes.patch