]> Gentwo Git Trees - linux/.git/commit
ASoC: nau8821: Avoid unnecessary blocking in IRQ handler
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Fri, 3 Oct 2025 18:03:27 +0000 (21:03 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 13 Oct 2025 12:18:02 +0000 (13:18 +0100)
commitee70bacef1c6050e4836409927294d744dbcfa72
tree958d8bdfdab16c8d5b5107a0445100912a1ec884
parent2b4eda7bf7d8a4e2f7575a98f55d8336dec0f302
ASoC: nau8821: Avoid unnecessary blocking in IRQ handler

The interrupt handler offloads the microphone detection logic to
nau8821_jdet_work(), which implies a sleep operation.  However, before
being able to process any subsequent hotplug event, the interrupt
handler needs to wait for any prior scheduled work to complete.

Move the sleep out of jdet_work by converting it to a delayed work.
This eliminates the undesired blocking in the interrupt handler when
attempting to cancel a recently scheduled work item and should help
reducing transient input reports that might confuse user-space.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://patch.msgid.link/20251003-nau8821-jdet-fixes-v1-5-f7b0e2543f09@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/nau8821.c
sound/soc/codecs/nau8821.h