]> 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)
commit5959b6605610ea5abbcfb807bf6af856cd1e4694
tree2fd5f87afd592eabc3afd290f9812329dd4e33f3
parent104cdbcd010067f88729055941a539a2383fadc2
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: 597d1abb25d0 ("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