summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorFrancois Mazard <f-mazard@ti.com>2011-06-24 15:28:00 +0200
committerSebastien Jan <s-jan@ti.com>2011-07-05 14:29:55 +0200
commit95a0107d9609e222fa6bd377b7832653e928d0aa (patch)
tree53a5b15257b42bd08230dea31f094a4250db894f /sound
parent9e8f0f514523accf403069ef08ca33d589550500 (diff)
ASoc: twl6040: enable FIR in EAR DAC
Change-Id: Ifc55ddbd7e870b02c4c1fa588098c98bd37e2be9 Signed-off-by: Francois Mazard <f-mazard@ti.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/twl6040.c10
1 files changed, 5 insertions, 5 deletions
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));
}