diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-14 19:23:37 +0800 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-14 19:35:14 +0800 |
commit | 45ba82d81741398ec4f097fedf2c204704d53b6b (patch) | |
tree | b905d02c610261e46ee98b958e09cd9a694dc980 /sound/soc | |
parent | a3462490b4d354c94031bfe644c65d374fc04aa6 (diff) |
ASoC: Tune the accessory detection rates for WM8996
Use longer intervals when the microphone is not inserted to increase
robustness against leisurely insertion.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/wm8996.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index 8f88f5a9c985..da7acaefa9d9 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c @@ -2572,8 +2572,10 @@ static void wm8996_micd(struct snd_soc_codec *codec) SND_JACK_BTN_0); snd_soc_update_bits(codec, WM8996_MIC_DETECT_1, - WM8996_MICD_RATE_MASK, - WM8996_MICD_RATE_MASK); + WM8996_MICD_RATE_MASK | + WM8996_MICD_BIAS_STARTTIME_MASK, + WM8996_MICD_RATE_MASK | + 9 << WM8996_MICD_BIAS_STARTTIME_SHIFT); return; } @@ -2590,8 +2592,10 @@ static void wm8996_micd(struct snd_soc_codec *codec) /* Increase poll rate to give better responsiveness * for buttons */ snd_soc_update_bits(codec, WM8996_MIC_DETECT_1, - WM8996_MICD_RATE_MASK, - 5 << WM8996_MICD_RATE_SHIFT); + WM8996_MICD_RATE_MASK | + WM8996_MICD_BIAS_STARTTIME_MASK, + 5 << WM8996_MICD_RATE_SHIFT | + 7 << WM8996_MICD_BIAS_STARTTIME_SHIFT); } else { dev_dbg(codec->dev, "Mic button up\n"); snd_soc_jack_report(wm8996->jack, 0, SND_JACK_BTN_0); @@ -2639,8 +2643,10 @@ static void wm8996_micd(struct snd_soc_codec *codec) * responsiveness. */ snd_soc_update_bits(codec, WM8996_MIC_DETECT_1, - WM8996_MICD_RATE_MASK, - 7 << WM8996_MICD_RATE_SHIFT); + WM8996_MICD_RATE_MASK | + WM8996_MICD_BIAS_STARTTIME_MASK, + 7 << WM8996_MICD_RATE_SHIFT | + 7 << WM8996_MICD_BIAS_STARTTIME_SHIFT); } } } |