From 95a0107d9609e222fa6bd377b7832653e928d0aa Mon Sep 17 00:00:00 2001 From: Francois Mazard Date: Fri, 24 Jun 2011 15:28:00 +0200 Subject: ASoc: twl6040: enable FIR in EAR DAC Change-Id: Ifc55ddbd7e870b02c4c1fa588098c98bd37e2be9 Signed-off-by: Francois Mazard --- sound/soc/codecs/twl6040.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 37216ac54b84..c59609176a15 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -115,7 +115,7 @@ static const u8 twl6040_reg[TWL6040_CACHEREGNUM] = { 0x00, /* TWL6040_HSLCTL 0x10 */ 0x00, /* TWL6040_HSRCTL 0x11 */ 0xFF, /* TWL6040_HSGAIN 0x12 */ - 0x1E, /* TWL6040_EARCTL 0x13 */ + 0x3E, /* TWL6040_EARCTL 0x13 */ 0x00, /* TWL6040_HFLCTL 0x14 */ 0x1D, /* TWL6040_HFLGAIN 0x15 */ 0x00, /* TWL6040_HFRCTL 0x16 */ @@ -1012,17 +1012,17 @@ static int twl6040_mute(struct snd_soc_dai *codec_dai, int mute) TWL6040_REG_HSGAIN); twl6040_write(codec, TWL6040_REG_HSGAIN, 0xFF); /* earpiece */ - priv->ear_gain = twl6040_read_reg_cache(codec, - TWL6040_REG_EARCTL) >> 1; data = twl6040_read_reg_volatile(codec, - TWL6040_REG_EARCTL) & 0x01; + TWL6040_REG_EARCTL); + priv->ear_gain = (data >> 1) & 0x0F; + data &= 0x21; twl6040_write(codec, TWL6040_REG_EARCTL, data | 0x1E); } else { /* headset */ twl6040_write(codec, TWL6040_REG_HSGAIN, priv->hs_gain); /* earpiece */ data = twl6040_read_reg_volatile(codec, - TWL6040_REG_EARCTL) & 0x01; + TWL6040_REG_EARCTL) & 0x21; twl6040_write(codec, TWL6040_REG_EARCTL, data | (priv->ear_gain << 1)); } -- cgit v1.2.3