diff options
author | Hans de Goede <hdegoede@redhat.com> | 2018-03-04 17:35:57 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-03-07 15:55:29 +0300 |
commit | ee68096826fa16bca2f7bb555b3e0cbbe798d330 (patch) | |
tree | 36a661694a93a3dc13e3c98cbd4e66e3252ba7f2 /sound/soc/codecs/rt5651.h | |
parent | 0fe9474598890b4bd8a7228c9b1872ed7fe3c2c5 (diff) | |
download | linux-ee68096826fa16bca2f7bb555b3e0cbbe798d330.tar.xz |
ASoC: rt5651: Rewrite jack-type detection
We get the insertion event before the jack is fully inserted at which point
the second ring on a TRRS connector may short the 2nd ring and sleeve
contacts. Testing has shown that this short-circuit may happen as late
as 500ms after the insertion event, but it never lasts longer then 300ms.
This commit changes the detection algorithm to require 5 identical OVCD
values in a row at 100 ms intervals to fix the jack-type sometimes getting
mis-detected.
Tested-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5651.h')
-rw-r--r-- | sound/soc/codecs/rt5651.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt5651.h b/sound/soc/codecs/rt5651.h index 71738ab93fb9..f20c9be94fb2 100644 --- a/sound/soc/codecs/rt5651.h +++ b/sound/soc/codecs/rt5651.h @@ -2072,7 +2072,7 @@ struct rt5651_priv { struct snd_soc_component *component; struct regmap *regmap; struct snd_soc_jack *hp_jack; - struct delayed_work jack_detect_work; + struct work_struct jack_detect_work; enum rt5651_jd_src jd_src; unsigned int ovcd_th; unsigned int ovcd_sf; |