3 Jul
2009
3 Jul
'09
6:45 a.m.
On Friday 03 July 2009 06:11:40 ext Lopez Cruz, Misael wrote:
Add "set_tristate" callbacks for HiFi and Voice DAIs. Machine drivers can enable and disable tristate for each DAI with "snd_soc_dai_set_tristate" function provided by SoC core.
Signed-off-by: Misael Lopez Cruz x0052729@ti.com
+static int twl4030_set_tristate(struct snd_soc_dai *dai, int tristate) +{
- struct snd_soc_codec *codec = dai->codec;
- u8 reg = twl4030_read_reg_cache(codec, TWL4030_REG_VOICE_IF);
I think you wanted to read the TWL4030_REG_AUDIO_IF register here...
- if (tristate)
reg |= TWL4030_AIF_TRI_EN;
- else
reg &= ~TWL4030_AIF_TRI_EN;
- return twl4030_write(codec, TWL4030_REG_AUDIO_IF, reg);
+}
--
Péter