From: Mark Brown Date: Fri, 3 Jun 2011 16:09:49 +0000 (+0100) Subject: ASoC: Suppress noop SYSCLK updates in WM8915 X-Git-Tag: v3.3-rc1~14^2~995 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea7b4378364093678ff1724fa91c43913f97774b;p=platform%2Fkernel%2Flinux-stable.git ASoC: Suppress noop SYSCLK updates in WM8915 Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- diff --git a/sound/soc/codecs/wm8915.c b/sound/soc/codecs/wm8915.c index b654fcd1..eecd2c1 100644 --- a/sound/soc/codecs/wm8915.c +++ b/sound/soc/codecs/wm8915.c @@ -55,6 +55,7 @@ struct wm8915_priv { int ldo1ena; int sysclk; + int sysclk_src; int fll_src; int fll_fref; @@ -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, @@ -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; }