[alsa-devel] [PATCH] ASoC: TWL4030: Add tristate callbacks for HiFi and Voice
Peter Ujfalusi
peter.ujfalusi at nokia.com
Fri Jul 3 06:45:33 CEST 2009
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 at 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
More information about the Alsa-devel
mailing list