aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-10-16 11:27:55 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-17 17:49:28 -0400
commit151b75995a5180834a0609dced3d76ab978cae3b (patch)
tree3221514d62f6db8f905924492ce9e0d68cc91bdc /sound/soc
parentdf3431b74e72c73e8750bfe1b2a5c99eff958356 (diff)
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>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm8900.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c
index 082040eda8a2..b16522ff3ae1 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,
844 case WM8900_DAC_CLKDIV: 844 case WM8900_DAC_CLKDIV:
845 reg = snd_soc_read(codec, WM8900_REG_CLOCKING2); 845 reg = snd_soc_read(codec, WM8900_REG_CLOCKING2);
846 snd_soc_write(codec, WM8900_REG_CLOCKING2, 846 snd_soc_write(codec, WM8900_REG_CLOCKING2,
847 div | (reg & WM8900_REG_CLOCKING2_DAC_CLKDIV)); 847 div | (reg & ~WM8900_REG_CLOCKING2_DAC_CLKDIV));
848 break; 848 break;
849 case WM8900_ADC_CLKDIV: 849 case WM8900_ADC_CLKDIV:
850 reg = snd_soc_read(codec, WM8900_REG_CLOCKING2); 850 reg = snd_soc_read(codec, WM8900_REG_CLOCKING2);
851 snd_soc_write(codec, WM8900_REG_CLOCKING2, 851 snd_soc_write(codec, WM8900_REG_CLOCKING2,
852 div | (reg & WM8900_REG_CLOCKING2_ADC_CLKDIV)); 852 div | (reg & ~WM8900_REG_CLOCKING2_ADC_CLKDIV));
853 break; 853 break;
854 case WM8900_LRCLK_MODE: 854 case WM8900_LRCLK_MODE:
855 reg = snd_soc_read(codec, WM8900_REG_DACCTRL); 855 reg = snd_soc_read(codec, WM8900_REG_DACCTRL);
856 snd_soc_write(codec, WM8900_REG_DACCTRL, 856 snd_soc_write(codec, WM8900_REG_DACCTRL,
857 div | (reg & WM8900_REG_DACCTRL_AIF_LRCLKRATE)); 857 div | (reg & ~WM8900_REG_DACCTRL_AIF_LRCLKRATE));
858 break; 858 break;
859 default: 859 default:
860 return -EINVAL; 860 return -EINVAL;