diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm8903.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index b5427b47d6fd..134b17532f23 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c | |||
@@ -1465,7 +1465,7 @@ int wm8903_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, | |||
1465 | int det, int shrt) | 1465 | int det, int shrt) |
1466 | { | 1466 | { |
1467 | struct wm8903_priv *wm8903 = codec->private_data; | 1467 | struct wm8903_priv *wm8903 = codec->private_data; |
1468 | int irq_mask = 0; | 1468 | int irq_mask = WM8903_MICDET_EINT | WM8903_MICSHRT_EINT; |
1469 | 1469 | ||
1470 | dev_dbg(codec->dev, "Enabling microphone detection: %x %x\n", | 1470 | dev_dbg(codec->dev, "Enabling microphone detection: %x %x\n", |
1471 | det, shrt); | 1471 | det, shrt); |
@@ -1485,16 +1485,17 @@ int wm8903_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, | |||
1485 | WM8903_MICDET_EINT | WM8903_MICSHRT_EINT, | 1485 | WM8903_MICDET_EINT | WM8903_MICSHRT_EINT, |
1486 | irq_mask); | 1486 | irq_mask); |
1487 | 1487 | ||
1488 | /* Enable mic detection, this may not have been set through | 1488 | if (det && shrt) { |
1489 | * platform data (eg, if the defaults are OK). */ | 1489 | /* Enable mic detection, this may not have been set through |
1490 | snd_soc_update_bits(codec, WM8903_WRITE_SEQUENCER_0, | 1490 | * platform data (eg, if the defaults are OK). */ |
1491 | WM8903_WSEQ_ENA, WM8903_WSEQ_ENA); | 1491 | snd_soc_update_bits(codec, WM8903_WRITE_SEQUENCER_0, |
1492 | snd_soc_update_bits(codec, WM8903_MIC_BIAS_CONTROL_0, | 1492 | WM8903_WSEQ_ENA, WM8903_WSEQ_ENA); |
1493 | WM8903_MICDET_ENA, WM8903_MICDET_ENA); | 1493 | snd_soc_update_bits(codec, WM8903_MIC_BIAS_CONTROL_0, |
1494 | 1494 | WM8903_MICDET_ENA, WM8903_MICDET_ENA); | |
1495 | /* Force the microphone bias on; this will trigger an initial | 1495 | } else { |
1496 | * detection. */ | 1496 | snd_soc_update_bits(codec, WM8903_MIC_BIAS_CONTROL_0, |
1497 | snd_soc_dapm_force_enable_pin(codec, "Mic Bias"); | 1497 | WM8903_MICDET_ENA, 0); |
1498 | } | ||
1498 | 1499 | ||
1499 | return 0; | 1500 | return 0; |
1500 | } | 1501 | } |