android_kernel_motorola_sm6375/sound
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kai Vehmanen 7b6d98f869 ASoC: rt5682: do not block workqueue if card is unbound
[ Upstream commit 4c33de0673ced9c7c37b3bbd9bfe0fda72340b2a ]

The current rt5682_jack_detect_handler() assumes the component
and card will always show up and implements an infinite usleep
loop waiting for them to show up.

This does not hold true if a codec interrupt (or other
event) occurs when the card is unbound. The codec driver's
remove  or shutdown functions cannot cancel the workqueue due
to the wait loop. As a result, code can either end up blocking
the workqueue, or hit a kernel oops when the card is freed.

Fix the issue by rescheduling the jack detect handler in
case the card is not ready. In case card never shows up,
the shutdown/remove/suspend calls can now cancel the detect
task.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20220207153000.3452802-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-03-08 19:07:45 +01:00
..
ac97
aoa
arm
atmel
core ALSA: seq: Set upper limit of processed events 2022-01-27 09:19:48 +01:00
drivers ALSA: drivers: opl3: Fix incorrect use of vp->state 2021-12-29 12:23:36 +01:00
firewire
hda ALSA: hda: hdac_stream: fix potential locking issue in snd_hdac_stream_assign() 2021-11-26 10:47:23 +01:00
i2c
isa ALSA: gus: fix null pointer dereference on pointer block 2021-11-26 10:47:16 +01:00
mips
oss
parisc
pci ALSA: hda: Fix missing codec probe on Shenker Dock 15 2022-02-23 11:59:58 +01:00
pcmcia
ppc
sh
soc ASoC: rt5682: do not block workqueue if card is unbound 2022-03-08 19:07:45 +01:00
sparc
spi
synth ALSA: synth: missing check for possible NULL after the call to kstrdup 2021-11-17 09:48:19 +01:00
usb ALSA: usb-audio: Simplify quirk entries with a macro 2022-02-08 18:24:27 +01:00
x86
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c