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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
> ---

> +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@xxxxxxxxx>

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux