Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257485
b: refs/heads/master
c: e6a9be0
h: refs/heads/master
i:
  257483: 9fe5d86
v: v3
  • Loading branch information
Mark Brown committed Jun 2, 2011
1 parent d5bf894 commit c4ee93a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 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: 1e025a3692014e7a29a0b0b01de5cdc2b6ade3cf
refs/heads/master: e6a9be0bb018466896632969ba4b496d1a7caea9
20 changes: 14 additions & 6 deletions trunk/sound/soc/codecs/wm8915.c
Original file line number Diff line number Diff line change
Expand Up @@ -2288,6 +2288,12 @@ static void wm8915_micd(struct snd_soc_codec *codec)
SND_JACK_HEADSET | SND_JACK_BTN_0);
wm8915->jack_mic = true;
wm8915->detecting = false;

/* Increase poll rate to give better responsiveness
* for buttons */
snd_soc_update_bits(codec, WM8915_MIC_DETECT_1,
WM8915_MICD_RATE_MASK,
5 << WM8915_MICD_RATE_SHIFT);
}

/* If we detected a lower impedence during initial startup
Expand Down Expand Up @@ -2328,15 +2334,17 @@ static void wm8915_micd(struct snd_soc_codec *codec)
SND_JACK_HEADPHONE,
SND_JACK_HEADSET |
SND_JACK_BTN_0);

/* Increase the detection rate a bit for
* responsiveness.
*/
snd_soc_update_bits(codec, WM8915_MIC_DETECT_1,
WM8915_MICD_RATE_MASK,
7 << WM8915_MICD_RATE_SHIFT);

wm8915->detecting = false;
}
}

/* Increase poll rate to give better responsiveness for buttons */
if (!wm8915->detecting)
snd_soc_update_bits(codec, WM8915_MIC_DETECT_1,
WM8915_MICD_RATE_MASK,
5 << WM8915_MICD_RATE_SHIFT);
}

static irqreturn_t wm8915_irq(int irq, void *data)
Expand Down

0 comments on commit c4ee93a

Please sign in to comment.