Skip to content

Commit

Permalink
ASoC: Suppress noop SYSCLK updates in WM8915
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
  • Loading branch information
Mark Brown committed Jun 6, 2011
1 parent 84abd1b commit ea7b437
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sound/soc/codecs/wm8915.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ struct wm8915_priv {
int ldo1ena;

int sysclk;
int sysclk_src;

int fll_src;
int fll_fref;
Expand Down Expand Up @@ -1834,6 +1835,9 @@ static int wm8915_set_sysclk(struct snd_soc_dai *dai,
int src;
int old;

if (freq == wm8915->sysclk && clk_id == wm8915->sysclk_src)
return 0;

/* Disable SYSCLK while we reconfigure */
old = snd_soc_read(codec, WM8915_AIF_CLOCKING_1) & WM8915_SYSCLK_ENA;
snd_soc_update_bits(codec, WM8915_AIF_CLOCKING_1,
Expand Down Expand Up @@ -1885,6 +1889,8 @@ static int wm8915_set_sysclk(struct snd_soc_dai *dai,
snd_soc_update_bits(codec, WM8915_AIF_CLOCKING_1,
WM8915_SYSCLK_ENA, old);

wm8915->sysclk_src = clk_id;

return 0;
}

Expand Down

0 comments on commit ea7b437

Please sign in to comment.