linux/sound/soc/qcom
Johan Hovold 1673211a38 ASoC: qcom: sc8280xp: limit speaker volumes
commit c481016bb4 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@vger.kernel.org>	# 6.5
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://msgid.link/r/20240122181819.4038-3-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-02-05 20:17:11 +00:00
..
qdsp6 ASoC: qcom: q6apm-lpass-dais: pass max number of channels to Audioreach 2023-10-25 17:21:40 +01:00
apq8016_sbc.c ASoC: qcom: reduce number of binding headers includes 2023-10-09 13:14:19 +01:00
apq8096.c ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
common.c ASoC: qcom: reduce number of binding headers includes 2023-10-09 13:14:19 +01:00
common.h ASoC: qcom: Fix building APQ8016 machine driver without SOUNDWIRE 2023-01-09 13:04:14 +00:00
Kconfig ASoC: qcom: Fix building APQ8016 machine driver without SOUNDWIRE 2023-01-09 13:04:14 +00:00
lpass-apq8016.c ASoC: qcom: lpass: Make asoc_qcom_lpass_cpu_platform_remove() return void 2023-10-23 13:29:47 +01:00
lpass-cdc-dma.c ASoC: DT matching and header cleanups 2023-10-09 23:14:18 +01:00
lpass-cpu.c ASoC: qcom: lpass: Make asoc_qcom_lpass_cpu_platform_remove() return void 2023-10-23 13:29:47 +01:00
lpass-hdmi.c ASoC: qcom: lpass-hdmi: remove useless return 2021-03-10 13:01:49 +00:00
lpass-hdmi.h ASoC: qcom: Add support for lpass hdmi driver 2020-10-08 20:27:34 +01:00
lpass-ipq806x.c ASoC: qcom: lpass: Make asoc_qcom_lpass_cpu_platform_remove() return void 2023-10-23 13:29:47 +01:00
lpass-lpaif-reg.h ASoC: qcom: Add register definition for codec rddma and wrdma 2022-02-24 20:21:42 +00:00
lpass-platform.c ASoC: DT matching and header cleanups 2023-10-09 23:14:18 +01:00
lpass-sc7180.c ASoC: qcom: lpass: Make asoc_qcom_lpass_cpu_platform_remove() return void 2023-10-23 13:29:47 +01:00
lpass-sc7280.c ASoC: qcom: lpass: Make asoc_qcom_lpass_cpu_platform_remove() return void 2023-10-23 13:29:47 +01:00
lpass.h ASoC: qcom: lpass: Make asoc_qcom_lpass_cpu_platform_remove() return void 2023-10-23 13:29:47 +01:00
Makefile ASoC: qcom: Fix building APQ8016 machine driver without SOUNDWIRE 2023-01-09 13:04:14 +00:00
sc7180.c ASoC: qcom: sc7180: Add support for qdsp6 baked sound 2023-10-25 17:21:38 +01:00
sc7280.c ASoC: DT matching and header cleanups 2023-10-09 23:14:18 +01:00
sc8280xp.c ASoC: qcom: sc8280xp: limit speaker volumes 2024-02-05 20:17:11 +00:00
sdm845.c ASoC: DT matching and header cleanups 2023-10-09 23:14:18 +01:00
sdw.c ASoC: qcom: reduce number of binding headers includes 2023-10-09 13:14:19 +01:00
sdw.h ASoC: qcom: Fix building APQ8016 machine driver without SOUNDWIRE 2023-01-09 13:04:14 +00:00
sm8250.c ASoC: DT matching and header cleanups 2023-10-09 23:14:18 +01:00
storm.c ASoC: qcom: convert not to use asoc_xxx() 2023-09-25 14:16:25 +02:00