19 May
2009
19 May
'09
7:26 a.m.
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@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@nokia.com