]> www.infradead.org Git - users/dwmw2/linux.git/commit
ASoC: cs42l84: leverage ring sense IRQs to correctly detect headsets
authorJames Calligeros <jcalligeros99@gmail.com>
Sat, 19 Oct 2024 14:47:33 +0000 (00:47 +1000)
committerMark Brown <broonie@kernel.org>
Thu, 24 Oct 2024 15:09:19 +0000 (16:09 +0100)
commit2391b8719d686b1947b5f81250281fa112da91dc
treea408dd43bece00f521666d9b96af57e0e3cba5cd
parent250304a0fb34bb74f4726645ae24dc31d7582a22
ASoC: cs42l84: leverage ring sense IRQs to correctly detect headsets

Some jacks integrated on devices with this codec, such as certain
Apple Silicon Macs, have quite trigger-happy tip sense switches that
cause a tip sense IRQ before the plug is fully seated. If users are
unfortunate with their timing, this can lead to headsets being detected
as mic-less headphones among other issues with the codec's device
detection routines.

Introduce some rudimentary ring sense interrupt handling so that we
can re-trigger the codec's detection routines when we are certain
that the plug is fully seated.

This seems to differ from what other Cirrus drivers do, but is
necessary for devices to be reliably detected properly here.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Link: https://patch.msgid.link/20241020-cs42l84-v2-3-37ba2b6721d9@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42l84.c