[alsa-devel] [PATCH 1/4] ASoC: Suppress noop SYSCLK updates in WM8915
Mark Brown
broonie at opensource.wolfsonmicro.com
Fri Jun 3 19:47:00 CEST 2011
Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
---
sound/soc/codecs/wm8915.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/wm8915.c b/sound/soc/codecs/wm8915.c
index 5a59ef7..c61bc32 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);
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;
}
--
1.7.5.3
More information about the Alsa-devel
mailing list