[alsa-devel] [PATCH] ASoC: core: Support for limiting the volume

Liam Girdwood lrg at slimlogic.co.uk
Fri May 7 15:56:37 CEST 2010


On Fri, 2010-05-07 at 14:05 +0300, Peter Ujfalusi wrote:
> Add support for the core to limit the maximum volume on an
> existing control.
> The function will modify the soc_mixer_control.max value
> of the given control.
> The new value must be lower than the original one (chip maximum)
> 
> If there is a need for limiting a gain on a given control,
> than machine drivers can do the following in their
> snd_soc_dai_link.init function:
> 
> snd_soc_limit_volume(codec, "TPA6140A2 Headphone Playback Volume", 21);
> 
> This will modify the original 31 (chip maximum) to 21, so user
> space will not be able to set the gain higher than this.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi at nokia.com>
> ---

Acked-by: Liam Girdwood <lrg at slimlogic.co.uk>
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk



More information about the Alsa-devel mailing list