Skip to content

Commit

Permalink
Merge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Brown committed Jun 17, 2014
2 parents 6b0e233 + b383141 commit 6385723
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -3505,21 +3505,18 @@ static irqreturn_t wm8994_mic_irq(int irq, void *data)
return IRQ_HANDLED;
}

/* Should be called with accdet_lock held */
static void wm1811_micd_stop(struct snd_soc_codec *codec)
{
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);

if (!wm8994->jackdet)
return;

mutex_lock(&wm8994->accdet_lock);

snd_soc_update_bits(codec, WM8958_MIC_DETECT_1, WM8958_MICD_ENA, 0);

wm1811_jackdet_set_mode(codec, WM1811_JACKDET_MODE_JACK);

mutex_unlock(&wm8994->accdet_lock);

if (wm8994->wm8994->pdata.jd_ext_cap)
snd_soc_dapm_disable_pin(&codec->dapm,
"MICBIAS2");
Expand Down Expand Up @@ -3560,10 +3557,10 @@ static void wm8958_open_circuit_work(struct work_struct *work)
open_circuit_work.work);
struct device *dev = wm8994->wm8994->dev;

wm1811_micd_stop(wm8994->hubs.codec);

mutex_lock(&wm8994->accdet_lock);

wm1811_micd_stop(wm8994->hubs.codec);

dev_dbg(dev, "Reporting open circuit\n");

wm8994->jack_mic = false;
Expand Down

0 comments on commit 6385723

Please sign in to comment.