diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-10-16 23:27:55 +0800 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-17 22:49:28 +0100 |
commit | 151b75995a5180834a0609dced3d76ab978cae3b (patch) | |
tree | 3221514d62f6db8f905924492ce9e0d68cc91bdc | |
parent | df3431b74e72c73e8750bfe1b2a5c99eff958356 (diff) | |
download | op-kernel-dev-151b75995a5180834a0609dced3d76ab978cae3b.zip op-kernel-dev-151b75995a5180834a0609dced3d76ab978cae3b.tar.gz |
ASoC: wm8900: Fix wrong mask for setting DAC_CLKDIV/ADC_CLKDIV/LRCLK_MODE
After checking the datasheet, I think what we want to do here is to
clear the WM8900_REG_CLOCKING2_DAC_CLKDIV/WM8900_REG_CLOCKING2_ADC_CLKDIV/
WM8900_REG_DACCTRL_AIF_LRCLKRATE bits and then OR with div value.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/codecs/wm8900.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c index 082040e..b16522f 100644 --- a/sound/soc/codecs/wm8900.c +++ b/sound/soc/codecs/wm8900.c @@ -844,17 +844,17 @@ static int wm8900_set_dai_clkdiv(struct snd_soc_dai *codec_dai, case WM8900_DAC_CLKDIV: reg = snd_soc_read(codec, WM8900_REG_CLOCKING2); snd_soc_write(codec, WM8900_REG_CLOCKING2, - div | (reg & WM8900_REG_CLOCKING2_DAC_CLKDIV)); + div | (reg & ~WM8900_REG_CLOCKING2_DAC_CLKDIV)); break; case WM8900_ADC_CLKDIV: reg = snd_soc_read(codec, WM8900_REG_CLOCKING2); snd_soc_write(codec, WM8900_REG_CLOCKING2, - div | (reg & WM8900_REG_CLOCKING2_ADC_CLKDIV)); + div | (reg & ~WM8900_REG_CLOCKING2_ADC_CLKDIV)); break; case WM8900_LRCLK_MODE: reg = snd_soc_read(codec, WM8900_REG_DACCTRL); snd_soc_write(codec, WM8900_REG_DACCTRL, - div | (reg & WM8900_REG_DACCTRL_AIF_LRCLKRATE)); + div | (reg & ~WM8900_REG_DACCTRL_AIF_LRCLKRATE)); break; default: return -EINVAL; |