diff options
author | Mark Brown <broonie@linaro.org> | 2014-03-12 23:03:58 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-12 23:03:58 +0000 |
commit | 53a2c4db8cf229047de88b3f1bd41d5a5d2756eb (patch) | |
tree | 46ab33e4c837e0b893ddf8fb3817dd3f6042eb32 /sound/soc/codecs/adav80x.c | |
parent | da8ab21cfea80655a0f7bbbc3f2fa0975970b8cb (diff) | |
parent | f9fa2b1855a9ece2ec2a4f54b7f9131cd89257d6 (diff) | |
download | linux-53a2c4db8cf229047de88b3f1bd41d5a5d2756eb.tar.gz linux-53a2c4db8cf229047de88b3f1bd41d5a5d2756eb.tar.bz2 linux-53a2c4db8cf229047de88b3f1bd41d5a5d2756eb.zip |
Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next
Diffstat (limited to 'sound/soc/codecs/adav80x.c')
-rw-r--r-- | sound/soc/codecs/adav80x.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c index d50cf5b29a27..f0f18ea680ac 100644 --- a/sound/soc/codecs/adav80x.c +++ b/sound/soc/codecs/adav80x.c @@ -541,6 +541,7 @@ static int adav80x_set_sysclk(struct snd_soc_codec *codec, unsigned int freq, int dir) { struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); + struct snd_soc_dapm_context *dapm = &codec->dapm; if (dir == SND_SOC_CLOCK_IN) { switch (clk_id) { @@ -573,7 +574,7 @@ static int adav80x_set_sysclk(struct snd_soc_codec *codec, regmap_write(adav80x->regmap, ADAV80X_ICLK_CTRL2, iclk_ctrl2); - snd_soc_dapm_sync(&codec->dapm); + snd_soc_dapm_sync(dapm); } } else { unsigned int mask; @@ -600,17 +601,21 @@ static int adav80x_set_sysclk(struct snd_soc_codec *codec, adav80x->sysclk_pd[clk_id] = false; } + snd_soc_dapm_mutex_lock(dapm); + if (adav80x->sysclk_pd[0]) - snd_soc_dapm_disable_pin(&codec->dapm, "PLL1"); + snd_soc_dapm_disable_pin_unlocked(dapm, "PLL1"); else - snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL1"); + snd_soc_dapm_force_enable_pin_unlocked(dapm, "PLL1"); if (adav80x->sysclk_pd[1] || adav80x->sysclk_pd[2]) - snd_soc_dapm_disable_pin(&codec->dapm, "PLL2"); + snd_soc_dapm_disable_pin_unlocked(dapm, "PLL2"); else - snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL2"); + snd_soc_dapm_force_enable_pin_unlocked(dapm, "PLL2"); - snd_soc_dapm_sync(&codec->dapm); + snd_soc_dapm_sync_unlocked(dapm); + + snd_soc_dapm_mutex_unlock(dapm); } return 0; |