aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8510.c
diff options
context:
space:
mode:
authorJonas Andersson <jonas@microbit.se>2009-03-04 02:24:26 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-03-04 09:47:39 -0500
commit86027ae78c9294bb450b76eec28cfb431a8fb3ee (patch)
tree4e2634b23e5f050f0065ad4ff2a6845409f1e532 /sound/soc/codecs/wm8510.c
parentec67624d33d5639bcc6ee6918cb1fc0bd1bac3a8 (diff)
ASoC: wm8510 pll settings
When setting WM8510_MCLKDIV the pll was turned off. When setting pll frequency you got twice the expected freq, because the code calculated with postscaler of 8, but the hardware divide by 4. Signed-off-by: Jonas Andersson <jonas@microbit.se> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8510.c')
-rw-r--r--sound/soc/codecs/wm8510.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c
index f01078cfbd72..6d4ef71e9195 100644
--- a/sound/soc/codecs/wm8510.c
+++ b/sound/soc/codecs/wm8510.c
@@ -336,7 +336,7 @@ static int wm8510_set_dai_pll(struct snd_soc_dai *codec_dai,
336 return 0; 336 return 0;
337 } 337 }
338 338
339 pll_factors(freq_out*8, freq_in); 339 pll_factors(freq_out*4, freq_in);
340 340
341 wm8510_write(codec, WM8510_PLLN, (pll_div.pre_div << 4) | pll_div.n); 341 wm8510_write(codec, WM8510_PLLN, (pll_div.pre_div << 4) | pll_div.n);
342 wm8510_write(codec, WM8510_PLLK1, pll_div.k >> 18); 342 wm8510_write(codec, WM8510_PLLK1, pll_div.k >> 18);
@@ -367,7 +367,7 @@ static int wm8510_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
367 wm8510_write(codec, WM8510_GPIO, reg | div); 367 wm8510_write(codec, WM8510_GPIO, reg | div);
368 break; 368 break;
369 case WM8510_MCLKDIV: 369 case WM8510_MCLKDIV:
370 reg = wm8510_read_reg_cache(codec, WM8510_CLOCK) & 0x1f; 370 reg = wm8510_read_reg_cache(codec, WM8510_CLOCK) & 0x11f;
371 wm8510_write(codec, WM8510_CLOCK, reg | div); 371 wm8510_write(codec, WM8510_CLOCK, reg | div);
372 break; 372 break;
373 case WM8510_ADCCLK: 373 case WM8510_ADCCLK: