[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZaqUw-9XulJGKH7v@hovoldconsulting.com>
Date: Fri, 19 Jan 2024 16:26:59 +0100
From: Johan Hovold <johan@...nel.org>
To: Johan Hovold <johan+linaro@...nel.org>
Cc: Mark Brown <broonie@...nel.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Banajit Goswami <bgoswami@...cinc.com>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
alsa-devel@...a-project.org, linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v4 2/4] ASoC: qcom: sc8280xp: limit speaker volumes
On Fri, Jan 19, 2024 at 12:24:18PM +0100, Johan Hovold wrote:
> 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.
I tracked the down the root cause for this, which appears to be a bug
(feature) in pulseaudio that causes it to reject the dB range if the
maximum is negative:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/447
This happened to work with v3 which limited the PA volume to the single
lowest setting, but would similarly break if anyone wants to set a -1.5
dB limit.
Johan
Powered by blists - more mailing lists