summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMahesh Mahadevan <r9aadq@freescale.com>2011-11-10 17:20:31 -0600
committerJason Liu <r64343@freescale.com>2012-01-09 21:06:11 +0800
commit7eb3cf821b7a250dbfb4f7b3e04c0ec837f941d0 (patch)
treefc43a1747d1816b467daca0d89d5ca0a1f374ed4 /sound
parent81b754382098766cb7c75fef5131e84308f019aa (diff)
ENGR00162035 Fix usage of snd_soc_update_bits() func in SGTL5000 driver
Some calls to the snd_soc_update_bits() uses an incorrect value for the mask field Signed-off-by: Mahesh Mahadevan <r9aadq@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/sgtl5000.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 41a988dfb963..8a4230949b4b 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -967,7 +967,9 @@ static int sgtl5000_pcm_hw_params(struct snd_pcm_substream *substream,
return -EINVAL;
}
- snd_soc_update_bits(codec, SGTL5000_CHIP_I2S_CTRL, i2s_ctl, i2s_ctl);
+ snd_soc_update_bits(codec, SGTL5000_CHIP_I2S_CTRL,
+ SGTL5000_I2S_DLEN_MASK | SGTL5000_I2S_SCLKFREQ_MASK,
+ i2s_ctl);
return 0;
}
@@ -1391,7 +1393,7 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
vag = (vag - SGTL5000_ANA_GND_BASE) / SGTL5000_ANA_GND_STP;
snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL,
- vag << SGTL5000_ANA_GND_SHIFT,
+ SGTL5000_ANA_GND_MASK,
vag << SGTL5000_ANA_GND_SHIFT);
/* set line out VAG to vddio / 2, in range (0.8v, 1.675v) */
@@ -1406,9 +1408,8 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
SGTL5000_LINE_OUT_GND_STP;
snd_soc_update_bits(codec, SGTL5000_CHIP_LINE_OUT_CTRL,
- vag << SGTL5000_LINE_OUT_GND_SHIFT |
- SGTL5000_LINE_OUT_CURRENT_360u <<
- SGTL5000_LINE_OUT_CURRENT_SHIFT,
+ SGTL5000_LINE_OUT_GND_MASK |
+ SGTL5000_LINE_OUT_CURRENT_MASK,
vag << SGTL5000_LINE_OUT_GND_SHIFT |
SGTL5000_LINE_OUT_CURRENT_360u <<
SGTL5000_LINE_OUT_CURRENT_SHIFT);