Skip to content

Commit

Permalink
ASoC: WM8804: Power down the PLL correctly
Browse files Browse the repository at this point in the history
The PLL is disabled when the corresponding bit is set not the other
way around.  This commit depends on my other commit with Subject
"ASoC: WM8804: Refactor set_pll code to avoid GCC warnings".

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Dimitris Papastamos authored and Mark Brown committed Oct 4, 2010
1 parent 86ce6c9 commit 6c20c80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/soc/codecs/wm8804.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ static int wm8804_set_pll(struct snd_soc_dai *dai, int pll_id,
codec = dai->codec;
if (!freq_in || !freq_out) {
/* disable the PLL */
snd_soc_update_bits(codec, WM8804_PWRDN, 0x1, 0);
snd_soc_update_bits(codec, WM8804_PWRDN, 0x1, 0x1);
return 0;
} else {
int ret;
Expand All @@ -406,7 +406,7 @@ static int wm8804_set_pll(struct snd_soc_dai *dai, int pll_id,
return ret;

/* power down the PLL before reprogramming it */
snd_soc_update_bits(codec, WM8804_PWRDN, 0x1, 0);
snd_soc_update_bits(codec, WM8804_PWRDN, 0x1, 0x1);

if (!freq_in || !freq_out)
return 0;
Expand All @@ -423,7 +423,7 @@ static int wm8804_set_pll(struct snd_soc_dai *dai, int pll_id,
snd_soc_write(codec, WM8804_PLL3, pll_div.k >> 16);

/* power up the PLL */
snd_soc_update_bits(codec, WM8804_PWRDN, 0x1, 0x1);
snd_soc_update_bits(codec, WM8804_PWRDN, 0x1, 0);
}

return 0;
Expand Down

0 comments on commit 6c20c80

Please sign in to comment.