ASoC: cs42l42: Use two thresholds and increased wait time for manual type detection
authorStefan Binding <sbinding@opensource.cirrus.com>
Mon, 27 Sep 2021 11:14:37 +0000 (12:14 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 27 Sep 2021 12:01:02 +0000 (13:01 +0100)
commitedd6dffdc6670836909972b32a324dbf6c150757
tree5285d8d62f58d1b05d953a6d09d6726fe6adaf7b
parent9943ab72fd37062a850a4a58eac2c74269e28432
ASoC: cs42l42: Use two thresholds and increased wait time for manual type detection

Some headsets require very different comparator thresholds for type detection,
as well as longer settling times. In order to detect a larger number of headsets,
use 2 thresholds to give maximum coverage (1.25V and 1.75V), as well as a longer
settling time of 100ms. This will not affect default audotodetect mode
and applies to manual mode type detection only.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210927111437.18113-1-vitalyr@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42l42.c
sound/soc/codecs/cs42l42.h