[PATCH 0/4] ASoC: cancel pending delayed works on component remove
From: Tristan Madani
Date: Mon Oct 26 2026 - 07:35:29 EST
From: Tristan Madani <tristan@xxxxxxxxxxxxxxxxxxx>
Four ASoC codec drivers initialise delayed works that are not
cancelled during component removal. If the card is unbound while
these works are pending, callbacks fire after DAPM widgets are freed.
rt5668 and rt5659 share the same pattern: the IRQ handler reschedules
work after the codec is reset. Track IRQ acquisition so that
disable_irq() only quiesces a line the driver owns, then drain all
delayed works before resetting the hardware.
twl6040 frees the plug-detect IRQ but does not drain the work that the
handler schedules.
wm8994 frees IRQs and firmware but does not cancel any of the four
delayed works that IRQ handlers and DAPM events schedule.
Tristan Madani (4):
ASoC: rt5668: cancel pending delayed works on component remove
ASoC: rt5659: cancel jack_detect_work on component remove
ASoC: twl6040: cancel headset jack work on component remove
ASoC: wm8994: drain all delayed works on component remove
sound/soc/codecs/rt5659.c | 17 ++++++++++++++++-
sound/soc/codecs/rt5659.h | 2 ++
sound/soc/codecs/rt5668.c | 20 +++++++++++++++++++-
sound/soc/codecs/twl6040.c | 1 +
sound/soc/codecs/wm8994.c | 4 ++++
5 files changed, 42 insertions(+), 2 deletions(-)
--
2.47.3