提交 ecd1732f 编写于 作者: M Mark Brown

ASoC: wm8994: Don't lock CODEC mutex to do DAPM sync

DAPM now has a DAPM-level lock which it manages itself so we don't need
to take the CODEC mutex to call DAPM any more.  Also remove a redundant
call to snd_soc_dapm_sync(), jack reporting also triggers a DAPM sync.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 77caabaa
...@@ -3247,9 +3247,6 @@ static void wm8958_default_micdet(u16 status, void *data) ...@@ -3247,9 +3247,6 @@ static void wm8958_default_micdet(u16 status, void *data)
wm8958_micd_set_rate(codec); wm8958_micd_set_rate(codec);
snd_soc_jack_report(wm8994->micdet[0].jack, SND_JACK_HEADPHONE,
SND_JACK_HEADSET);
/* If we have jackdet that will detect removal */ /* If we have jackdet that will detect removal */
if (wm8994->jackdet) { if (wm8994->jackdet) {
mutex_lock(&wm8994->accdet_lock); mutex_lock(&wm8994->accdet_lock);
...@@ -3262,14 +3259,13 @@ static void wm8958_default_micdet(u16 status, void *data) ...@@ -3262,14 +3259,13 @@ static void wm8958_default_micdet(u16 status, void *data)
mutex_unlock(&wm8994->accdet_lock); mutex_unlock(&wm8994->accdet_lock);
if (wm8994->pdata->jd_ext_cap) { if (wm8994->pdata->jd_ext_cap)
mutex_lock(&codec->mutex);
snd_soc_dapm_disable_pin(&codec->dapm, snd_soc_dapm_disable_pin(&codec->dapm,
"MICBIAS2"); "MICBIAS2");
snd_soc_dapm_sync(&codec->dapm);
mutex_unlock(&codec->mutex);
}
} }
snd_soc_jack_report(wm8994->micdet[0].jack, SND_JACK_HEADPHONE,
SND_JACK_HEADSET);
} }
/* Report short circuit as a button */ /* Report short circuit as a button */
...@@ -3358,16 +3354,11 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data) ...@@ -3358,16 +3354,11 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data)
/* If required for an external cap force MICBIAS on */ /* If required for an external cap force MICBIAS on */
if (wm8994->pdata->jd_ext_cap) { if (wm8994->pdata->jd_ext_cap) {
mutex_lock(&codec->mutex);
if (present) if (present)
snd_soc_dapm_force_enable_pin(&codec->dapm, snd_soc_dapm_force_enable_pin(&codec->dapm,
"MICBIAS2"); "MICBIAS2");
else else
snd_soc_dapm_disable_pin(&codec->dapm, "MICBIAS2"); snd_soc_dapm_disable_pin(&codec->dapm, "MICBIAS2");
snd_soc_dapm_sync(&codec->dapm);
mutex_unlock(&codec->mutex);
} }
if (present) if (present)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册