[alsa-devel] [PATCH 02/10] ASoC: twl6040: Combine the custom volsw get, and put functions

Mark Brown broonie at opensource.wolfsonmicro.com
Mon Sep 26 23:21:42 CEST 2011


On Mon, Sep 26, 2011 at 04:26:25PM +0300, Peter Ujfalusi wrote:

Applied, thanks.

> -	ret = snd_soc_put_volsw(kcontrol, ucontrol);
> +	/* call the appropriate handler depending on the rreg */
> +	if (mc->rreg)
> +		ret = snd_soc_put_volsw_2r(kcontrol, ucontrol);
> +	else
> +		ret = snd_soc_put_volsw(kcontrol, ucontrol);
> +

Traditionally this would be done by comparing reg and rreg - if they're
the same they're a mono control.


More information about the Alsa-devel mailing list