[alsa-devel] [PATCH] ASoC: TWL4030: Add tristate callbacks for HiFi and Voice

Lopez Cruz, Misael x0052729 at ti.com
Fri Jul 3 09:09:30 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...

Definitively, I meant TWL4030_REG_AUDIO_IF. I'll resend the patch in
some minutes. Thanks for your comment.

-Misa

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