]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: cs42l42: Report initial jack state
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Fri, 19 Nov 2021 12:48:54 +0000 (12:48 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 22 Nov 2021 15:40:32 +0000 (15:40 +0000)
commitdc6193500f42ca7b8d1be6be2c398316b8ec8940
tree2fd5f87afd592eabc3afd290f9812329dd4e33f3
parent497b0fb9e68a4e850ef4688aa0adf8cd164d1b35
ASoC: cs42l42: Report initial jack state

When a jack handler is registered in cs42l42_set_jack() the
initial state should be reported if an attached headphone/headset
has already been detected.

The jack detect sequence takes around 1 second: typically long
enough for the machine driver to probe and register the jack handler
in time to receive the first report from the interrupt handler. So
it is possible on some systems that the correct initial state was seen
simply because of lucky timing. Modular builds were more likely to
miss the reporting of the initial state.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 6143490f78f2 ("ASoC: cs42l42: Always enable TS_PLUG and TS_UNPLUG interrupts")
Link: https://lore.kernel.org/r/20211119124854.58939-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42l42.c
sound/soc/codecs/cs42l42.h