[alsa-devel] [PATCH 2/3 - RESEND] ASoC: TWL4030: Add control for selecting codec operation mode

Peter Ujfalusi peter.ujfalusi at nokia.com
Tue May 19 07:26:37 CEST 2009


On Monday 18 May 2009 19:52:55 ext Lopez Cruz, Misael wrote:
> Add a control for selecting the codec operation mode. TWL4030 codec
> has two modes:
> - Option 1. Audio only (4 audio DACs)
> - Option 2. Voice/Audio (2 audio DACs and voice ADC/DAC)
>
> Control is restricted when a stream is ongoing, since codec's
> operation mode cannot be changed on-the-fly.
>
> Signed-off-by: Misael Lopez Cruz <x0052729 at ti.com>
> ---

> +int snd_soc_put_twl4030_opmode_enum_double(struct snd_kcontrol *kcontrol,
> +	struct snd_ctl_elem_value *ucontrol)
...
> +	for (bitmask = 1; bitmask < e->max; bitmask <<= 1)
> +		;
> +	if (ucontrol->value.enumerated.item[0] > e->max - 1)
> +		return -EINVAL;

I would still switch these... I know that this is the sequence also in soc-
core.c in the snd_soc_put_enum_double function.

If it is OK for Mark, than

Acked-by: Peter Ujflausi <peter.ujfalusi at nokia.com>



More information about the Alsa-devel mailing list