diff options
author | Mark Brown <broonie@linaro.org> | 2014-03-12 19:03:58 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-12 19:03:58 -0400 |
commit | 53a2c4db8cf229047de88b3f1bd41d5a5d2756eb (patch) | |
tree | 46ab33e4c837e0b893ddf8fb3817dd3f6042eb32 /sound/soc/codecs/adav80x.c | |
parent | da8ab21cfea80655a0f7bbbc3f2fa0975970b8cb (diff) | |
parent | f9fa2b1855a9ece2ec2a4f54b7f9131cd89257d6 (diff) |
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, | |||
541 | unsigned int freq, int dir) | 541 | unsigned int freq, int dir) |
542 | { | 542 | { |
543 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 543 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); |
544 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
544 | 545 | ||
545 | if (dir == SND_SOC_CLOCK_IN) { | 546 | if (dir == SND_SOC_CLOCK_IN) { |
546 | switch (clk_id) { | 547 | switch (clk_id) { |
@@ -573,7 +574,7 @@ static int adav80x_set_sysclk(struct snd_soc_codec *codec, | |||
573 | regmap_write(adav80x->regmap, ADAV80X_ICLK_CTRL2, | 574 | regmap_write(adav80x->regmap, ADAV80X_ICLK_CTRL2, |
574 | iclk_ctrl2); | 575 | iclk_ctrl2); |
575 | 576 | ||
576 | snd_soc_dapm_sync(&codec->dapm); | 577 | snd_soc_dapm_sync(dapm); |
577 | } | 578 | } |
578 | } else { | 579 | } else { |
579 | unsigned int mask; | 580 | unsigned int mask; |
@@ -600,17 +601,21 @@ static int adav80x_set_sysclk(struct snd_soc_codec *codec, | |||
600 | adav80x->sysclk_pd[clk_id] = false; | 601 | adav80x->sysclk_pd[clk_id] = false; |
601 | } | 602 | } |
602 | 603 | ||
604 | snd_soc_dapm_mutex_lock(dapm); | ||
605 | |||
603 | if (adav80x->sysclk_pd[0]) | 606 | if (adav80x->sysclk_pd[0]) |
604 | snd_soc_dapm_disable_pin(&codec->dapm, "PLL1"); | 607 | snd_soc_dapm_disable_pin_unlocked(dapm, "PLL1"); |
605 | else | 608 | else |
606 | snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL1"); | 609 | snd_soc_dapm_force_enable_pin_unlocked(dapm, "PLL1"); |
607 | 610 | ||
608 | if (adav80x->sysclk_pd[1] || adav80x->sysclk_pd[2]) | 611 | if (adav80x->sysclk_pd[1] || adav80x->sysclk_pd[2]) |
609 | snd_soc_dapm_disable_pin(&codec->dapm, "PLL2"); | 612 | snd_soc_dapm_disable_pin_unlocked(dapm, "PLL2"); |
610 | else | 613 | else |
611 | snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL2"); | 614 | snd_soc_dapm_force_enable_pin_unlocked(dapm, "PLL2"); |
612 | 615 | ||
613 | snd_soc_dapm_sync(&codec->dapm); | 616 | snd_soc_dapm_sync_unlocked(dapm); |
617 | |||
618 | snd_soc_dapm_mutex_unlock(dapm); | ||
614 | } | 619 | } |
615 | 620 | ||
616 | return 0; | 621 | return 0; |