ASoC: wm8994: Make sure we don't have MICBIAS on during jackdet mode
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
6334018f70
commit
b9e67e5ef3
1 changed files with 13 additions and 12 deletions
|
@ -3170,9 +3170,6 @@ static void wm8958_default_micdet(u16 status, void *data)
|
||||||
snd_soc_update_bits(codec, WM8958_MIC_DETECT_1,
|
snd_soc_update_bits(codec, WM8958_MIC_DETECT_1,
|
||||||
WM8958_MICD_ENA, 0);
|
WM8958_MICD_ENA, 0);
|
||||||
|
|
||||||
wm1811_jackdet_set_mode(codec,
|
|
||||||
WM1811_JACKDET_MODE_JACK);
|
|
||||||
|
|
||||||
if (wm8994->pdata->jd_ext_cap) {
|
if (wm8994->pdata->jd_ext_cap) {
|
||||||
mutex_lock(&codec->mutex);
|
mutex_lock(&codec->mutex);
|
||||||
snd_soc_dapm_disable_pin(&codec->dapm,
|
snd_soc_dapm_disable_pin(&codec->dapm,
|
||||||
|
@ -3180,6 +3177,9 @@ static void wm8958_default_micdet(u16 status, void *data)
|
||||||
snd_soc_dapm_sync(&codec->dapm);
|
snd_soc_dapm_sync(&codec->dapm);
|
||||||
mutex_unlock(&codec->mutex);
|
mutex_unlock(&codec->mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wm1811_jackdet_set_mode(codec,
|
||||||
|
WM1811_JACKDET_MODE_JACK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3235,6 +3235,16 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data)
|
||||||
snd_soc_update_bits(codec, WM8958_MICBIAS2,
|
snd_soc_update_bits(codec, WM8958_MICBIAS2,
|
||||||
WM8958_MICB2_DISCH, 0);
|
WM8958_MICB2_DISCH, 0);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 required for an external cap force MICBIAS on */
|
||||||
if (wm8994->pdata->jd_ext_cap) {
|
if (wm8994->pdata->jd_ext_cap) {
|
||||||
mutex_lock(&codec->mutex);
|
mutex_lock(&codec->mutex);
|
||||||
|
@ -3243,15 +3253,6 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data)
|
||||||
snd_soc_dapm_sync(&codec->dapm);
|
snd_soc_dapm_sync(&codec->dapm);
|
||||||
mutex_unlock(&codec->mutex);
|
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);
|
|
||||||
} else {
|
} else {
|
||||||
dev_dbg(codec->dev, "Jack not detected\n");
|
dev_dbg(codec->dev, "Jack not detected\n");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue