ASoC: qcom: Limit Digital gains on speaker
authorMark Brown <broonie@kernel.org>
Mon, 4 Dec 2023 21:42:29 +0000 (21:42 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 4 Dec 2023 21:42:29 +0000 (21:42 +0000)
commit0a10d15280a385e5971fb58a6d2eddbf7c0aa9f3
tree18dc52481af1ead44c159cbd2129f7b2714d5163
parent29046a78a3c0a1f8fa0427f164caa222f003cf5b
parent716d4e5373e9d1ae993485ab2e3b893bf7104fb1
ASoC: qcom: Limit Digital gains on speaker

Merge series from srinivas.kandagatla@linaro.org:

Limit the speaker digital gains to 0dB so that the users will not damage them.
Currently there is a limit in UCM, but this does not stop the user form
changing the digital gains from command line. So limit this in driver
which makes the speakers more safer without active speaker protection in
place.

Apart from this there is also a range check fix in snd_soc_limit_volume
to allow setting this limit correctly.

Tested on Lenovo X13s.