mbox series

[0/2] ASoC: qcom: Limit Digital gains on speaker

Message ID 20231204124736.132185-1-srinivas.kandagatla@linaro.org
Headers show
Series ASoC: qcom: Limit Digital gains on speaker | expand

Message

Srinivas Kandagatla Dec. 4, 2023, 12:47 p.m. UTC
From: Srinivas Kandagatla <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.

Srinivas Kandagatla (2):
  ASoC: ops: add correct range check for limiting volume
  ASoC: qcom: sc8280xp: Limit speaker digital volumes

 sound/soc/qcom/sc8280xp.c | 17 +++++++++++++++++
 sound/soc/soc-ops.c       |  2 +-
 2 files changed, 18 insertions(+), 1 deletion(-)

Comments

Mark Brown Dec. 5, 2023, 1:11 p.m. UTC | #1
On Mon, 04 Dec 2023 12:47:34 +0000, srinivas.kandagatla@linaro.org wrote:
> 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.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: ops: add correct range check for limiting volume
      commit: fb9ad24485087e0f00d84bee7a5914640b2b9024
[2/2] ASoC: qcom: sc8280xp: Limit speaker digital volumes
      commit: 716d4e5373e9d1ae993485ab2e3b893bf7104fb1

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
Greg Kroah-Hartman Dec. 11, 2023, 12:54 p.m. UTC | #2
On Mon, Dec 11, 2023 at 01:40:52PM +0100, Greg Kroah-Hartman wrote:
> On Mon, Dec 11, 2023 at 09:08:03AM +0100, Johan Hovold wrote:
> > Hi Greg and Sasha,
> > 
> > On Mon, Dec 04, 2023 at 12:47:34PM +0000, srinivas.kandagatla@linaro.org wrote:
> > > From: Srinivas Kandagatla <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.
> > > 
> > > Srinivas Kandagatla (2):
> > >   ASoC: ops: add correct range check for limiting volume
> > >   ASoC: qcom: sc8280xp: Limit speaker digital volumes
> > 
> > These were unfortunately not marked for stable, but could you pick them
> > up for 6.6?
> > 
> > The upstream commits are:
> > 
> > 	fb9ad2448508 ("ASoC: ops: add correct range check for limiting volume")
> > 	716d4e5373e9 ("ASoC: qcom: sc8280xp: Limit speaker digital volumes")
> 
> Now queued up, thanks.

Oops, no, this breaks the build on 6.6.y, can you send a series that is
at least built for this series successfully?  :)

thanks,

greg k-h