From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Ujfalusi Subject: Re: [PATCH] ASoC: TWL4030: Add tristate callbacks for HiFi and Voice Date: Fri, 3 Jul 2009 07:45:33 +0300 Message-ID: <200907030745.34488.peter.ujfalusi@nokia.com> References: <67059DBF19D7214F9C66BB0EA91BA90E39685527@dlee04.ent.ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mgw-mx03.nokia.com (smtp.nokia.com [192.100.122.230]) by alsa0.perex.cz (Postfix) with ESMTP id D810424775 for ; Fri, 3 Jul 2009 06:45:51 +0200 (CEST) In-Reply-To: <67059DBF19D7214F9C66BB0EA91BA90E39685527@dlee04.ent.ti.com> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: "ext Lopez Cruz, Misael" Cc: "alsa-devel@alsa-project.org" , Mark Brown List-Id: alsa-devel@alsa-project.org 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 > +static int twl4030_set_tristate(struct snd_soc_dai *dai, int tristate) > +{ > + struct snd_soc_codec *codec =3D dai->codec; > + u8 reg =3D 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 |=3D TWL4030_AIF_TRI_EN; > + else > + reg &=3D ~TWL4030_AIF_TRI_EN; > + > + return twl4030_write(codec, TWL4030_REG_AUDIO_IF, reg); > +} > + -- = P=E9ter