diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-21 12:20:00 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-22 12:40:31 +0100 |
commit | f79e7ff85223e054c2967820d3be1c125a903bd4 (patch) | |
tree | 61ab24c9d183287e2082dadb8c91b770c7d3e139 | |
parent | 7691cd74c5d6b173e1483277fb70d7798e97d2fa (diff) | |
download | blackbird-op-linux-f79e7ff85223e054c2967820d3be1c125a903bd4.tar.gz blackbird-op-linux-f79e7ff85223e054c2967820d3be1c125a903bd4.zip |
ASoC: Ensure we only run Speyside WM8962 bias level callbacks once
We get called once per DAPM context but only need to run once. When DAPM
was serialized this was a series of noops but now it can run in parallel
we need to take proper care.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
-rw-r--r-- | sound/soc/samsung/speyside_wm8962.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/samsung/speyside_wm8962.c b/sound/soc/samsung/speyside_wm8962.c index 0b9eb5f7ec4c..72535f2daaf2 100644 --- a/sound/soc/samsung/speyside_wm8962.c +++ b/sound/soc/samsung/speyside_wm8962.c @@ -23,6 +23,9 @@ static int speyside_wm8962_set_bias_level(struct snd_soc_card *card, struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai; int ret; + if (dapm->dev != codec_dai->dev) + return 0; + switch (level) { case SND_SOC_BIAS_PREPARE: if (dapm->bias_level == SND_SOC_BIAS_STANDBY) { @@ -57,6 +60,9 @@ static int speyside_wm8962_set_bias_level_post(struct snd_soc_card *card, struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai; int ret; + if (dapm->dev != codec_dai->dev) + return 0; + switch (level) { case SND_SOC_BIAS_STANDBY: ret = snd_soc_dai_set_sysclk(codec_dai, WM8962_SYSCLK_MCLK, |