ASoC: da7219: Fix pole orientation detection on OMTP headsets when playing music
authorDavid Rau <we730128@gmail.com>
Mon, 21 Nov 2022 05:07:44 +0000 (05:07 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 1 Dec 2022 11:22:13 +0000 (11:22 +0000)
commit969357ec94e670571d6593f2a93aba25e4577d4f
tree490d83391e2c65ed0ed2b9b24de2dae1983d6219
parentc1dd6bf6199752890d8c59d895dd45094da51d1f
ASoC: da7219: Fix pole orientation detection on OMTP headsets when playing music

The OMTP pin define headsets can be mis-detected as line out
instead of OMTP, causing obvious issues with audio quality.
This patch is to put increased resistances within
the device at a suitable point.

To solve this issue better, the new mechanism setup
ground switches with conditional delay control
and these allow for more stabile detection process
to operate as intended. This conditional delay control
will not impact the hardware process
but use extra system resource.

This commit improves control of ground switches in the AAD logic.

Signed-off-by: David Rau <david.rau.zg@renesas.com>
Link: https://lore.kernel.org/r/20221121050744.2278-1-david.rau.zg@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/da7219-aad.c
sound/soc/codecs/da7219-aad.h