[alsa-devel] [PATCH] ASoC: core: Fix for the volume limiting when invert is in use

Liam Girdwood lrg at slimlogic.co.uk
Mon May 10 20:56:22 CEST 2010

On Mon, 2010-05-10 at 14:39 +0300, Peter Ujfalusi wrote:
> If the register for the volume needs invert, than the inversion
> need to be done from the chip maximum, and not from the platform
> dependent limit.
> Introduce soc_mixer_control.platform_max value, which initially
> equals to chip maximum.
> The snd_soc_limit_volume function only modify the platform_max,
> all volsw_info call returns this as well.
> The .max value holds the chip default (maximum), and it is used
> for the inversion, if it is needed.
> Additional check in the volsw_info call has been added to check
> the validity of the platform_max in case, when custom macros
> used by codec drivers are not initializing it correctly.
> 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.

More information about the Alsa-devel mailing list