Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283832
b: refs/heads/master
c: 157a75e
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Dec 1, 2011
1 parent 54bcf92 commit 982e932
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 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: 4585790d1cde32a5719c24412e9845e031358e08
refs/heads/master: 157a75e664f8c811c660de1d1b9abb16a1f72579
12 changes: 6 additions & 6 deletions trunk/sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -3051,7 +3051,7 @@ static void wm8958_default_micdet(u16 status, void *data)
if (!(status & WM8958_MICD_STS)) {
dev_dbg(codec->dev, "Detected open circuit\n");
wm8994->jack_mic = false;
wm8994->detecting = true;
wm8994->mic_detecting = true;

wm8958_micd_set_rate(codec);

Expand All @@ -3064,10 +3064,10 @@ static void wm8958_default_micdet(u16 status, void *data)
/* If the measurement is showing a high impedence we've got a
* microphone.
*/
if (wm8994->detecting && (status & 0x600)) {
if (wm8994->mic_detecting && (status & 0x600)) {
dev_dbg(codec->dev, "Detected microphone\n");

wm8994->detecting = false;
wm8994->mic_detecting = false;
wm8994->jack_mic = true;

wm8958_micd_set_rate(codec);
Expand All @@ -3077,9 +3077,9 @@ static void wm8958_default_micdet(u16 status, void *data)
}


if (wm8994->detecting && status & 0x4) {
if (wm8994->mic_detecting && status & 0x4) {
dev_dbg(codec->dev, "Detected headphone\n");
wm8994->detecting = false;
wm8994->mic_detecting = false;

wm8958_micd_set_rate(codec);

Expand Down Expand Up @@ -3157,7 +3157,7 @@ int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
wm8994->jack_cb = cb;
wm8994->jack_cb_data = cb_data;

wm8994->detecting = true;
wm8994->mic_detecting = true;
wm8994->jack_mic = false;

wm8958_micd_set_rate(codec);
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/codecs/wm8994.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ struct wm8994_priv {
struct soc_enum enh_eq_enum;

struct wm8994_micdet micdet[2];
bool detecting;
bool mic_detecting;
bool jack_mic;
int btn_mask;

Expand Down

0 comments on commit 982e932

Please sign in to comment.