Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193371
b: refs/heads/master
c: 6926686
h: refs/heads/master
i:
  193369: 487fb7d
  193367: 3b27b0e
v: v3
  • Loading branch information
Mark Brown committed Mar 22, 2010
1 parent c7cacd7 commit a7a57d5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 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: f06bce9c8c54354ea4ff96852bd92e10204c8cfb
refs/heads/master: 69266866a5790080d7fe80094b28d670ff8aa765
23 changes: 12 additions & 11 deletions trunk/sound/soc/codecs/wm8903.c
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ int wm8903_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
int det, int shrt)
{
struct wm8903_priv *wm8903 = codec->private_data;
int irq_mask = 0;
int irq_mask = WM8903_MICDET_EINT | WM8903_MICSHRT_EINT;

dev_dbg(codec->dev, "Enabling microphone detection: %x %x\n",
det, shrt);
Expand All @@ -1485,16 +1485,17 @@ int wm8903_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
WM8903_MICDET_EINT | WM8903_MICSHRT_EINT,
irq_mask);

/* Enable mic detection, this may not have been set through
* platform data (eg, if the defaults are OK). */
snd_soc_update_bits(codec, WM8903_WRITE_SEQUENCER_0,
WM8903_WSEQ_ENA, WM8903_WSEQ_ENA);
snd_soc_update_bits(codec, WM8903_MIC_BIAS_CONTROL_0,
WM8903_MICDET_ENA, WM8903_MICDET_ENA);

/* Force the microphone bias on; this will trigger an initial
* detection. */
snd_soc_dapm_force_enable_pin(codec, "Mic Bias");
if (det && shrt) {
/* Enable mic detection, this may not have been set through
* platform data (eg, if the defaults are OK). */
snd_soc_update_bits(codec, WM8903_WRITE_SEQUENCER_0,
WM8903_WSEQ_ENA, WM8903_WSEQ_ENA);
snd_soc_update_bits(codec, WM8903_MIC_BIAS_CONTROL_0,
WM8903_MICDET_ENA, WM8903_MICDET_ENA);
} else {
snd_soc_update_bits(codec, WM8903_MIC_BIAS_CONTROL_0,
WM8903_MICDET_ENA, 0);
}

return 0;
}
Expand Down

0 comments on commit a7a57d5

Please sign in to comment.