Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293422
b: refs/heads/master
c: b9e67e5
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Feb 29, 2012
1 parent 52fb9d8 commit bee44bc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6334018f70ca61bcf86194bf5c04d1ac6bd6ec1b
refs/heads/master: b9e67e5ef3c14453e10f41468b6e601d37291a82
25 changes: 13 additions & 12 deletions trunk/sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -3170,16 +3170,16 @@ static void wm8958_default_micdet(u16 status, void *data)
snd_soc_update_bits(codec, WM8958_MIC_DETECT_1,
WM8958_MICD_ENA, 0);

wm1811_jackdet_set_mode(codec,
WM1811_JACKDET_MODE_JACK);

if (wm8994->pdata->jd_ext_cap) {
mutex_lock(&codec->mutex);
snd_soc_dapm_disable_pin(&codec->dapm,
"MICBIAS2");
snd_soc_dapm_sync(&codec->dapm);
mutex_unlock(&codec->mutex);
}

wm1811_jackdet_set_mode(codec,
WM1811_JACKDET_MODE_JACK);
}
}

Expand Down Expand Up @@ -3235,23 +3235,24 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data)
snd_soc_update_bits(codec, WM8958_MICBIAS2,
WM8958_MICB2_DISCH, 0);

/* If required for an external cap force MICBIAS on */
if (wm8994->pdata->jd_ext_cap) {
mutex_lock(&codec->mutex);
snd_soc_dapm_force_enable_pin(&codec->dapm,
"MICBIAS2");
snd_soc_dapm_sync(&codec->dapm);
mutex_unlock(&codec->mutex);
}

/*
* Start off measument of microphone impedence to find
* out what's actually there.
*/
wm8994->mic_detecting = true;
wm1811_jackdet_set_mode(codec, WM1811_JACKDET_MODE_MIC);

snd_soc_update_bits(codec, WM8958_MIC_DETECT_1,
WM8958_MICD_ENA, WM8958_MICD_ENA);

/* If required for an external cap force MICBIAS on */
if (wm8994->pdata->jd_ext_cap) {
mutex_lock(&codec->mutex);
snd_soc_dapm_force_enable_pin(&codec->dapm,
"MICBIAS2");
snd_soc_dapm_sync(&codec->dapm);
mutex_unlock(&codec->mutex);
}
} else {
dev_dbg(codec->dev, "Jack not detected\n");

Expand Down

0 comments on commit bee44bc

Please sign in to comment.