WSL2-Linux-Kernel/sound/soc
Kai Vehmanen fd64f8bc06 ASoC: rt5682: do not block workqueue if card is unbound
[ Upstream commit 4c33de0673 ]

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:12:29 +01:00
..
adi
amd
atmel
au1x
bcm
cirrus
codecs ASoC: rt5682: do not block workqueue if card is unbound 2022-03-08 19:12:29 +01:00
dwc
fsl ASoC: fsl: Add missing error handling in pcm030_fabric_probe 2022-02-08 18:34:10 +01:00
generic ASoC: simple-card: fix probe failure on platform component 2022-02-08 18:34:10 +01:00
hisilicon
img
intel ASoC: Intel: catpt: Test dmaengine_submit() result before moving on 2022-01-27 11:04:14 +01:00
jz4740
kirkwood
mediatek ASoC: mediatek: mt8183: fix device_node leak 2022-01-27 11:05:04 +01:00
meson ASoC: meson: aiu: Move AIU_I2S_MISC hold setting to aiu-fifo-i2s 2021-12-29 12:28:52 +01:00
mxs
pxa
qcom ASoC: qcom: Actually clear DMA interrupt register for HDMI 2022-02-23 12:03:15 +01:00
rockchip ASoC: rockchip: i2s: Fix concurrency between tx/rx 2021-09-03 16:19:01 +01:00
samsung ASoC: samsung: idma: Check of ioremap return value 2022-01-27 11:04:17 +01:00
sh ASoC: rsnd: fixup DMAEngine API 2021-11-25 09:49:07 +01:00
sof ASoC: SOF: Intel: pci-tgl: add ADL-N support 2021-12-29 12:29:01 +01:00
spear
sprd
sti
stm ASoC: stm32: i2s: fix 32 bits channel length without mclk 2021-12-01 09:04:47 +01:00
sunxi
tegra ASoC: tegra: Restore headphones jack name on Nyan Big 2021-12-29 12:28:52 +01:00
ti
uniphier ASoC: uniphier: drop selecting non-existing SND_SOC_UNIPHIER_AIO_DMA 2022-01-27 11:04:06 +01:00
ux500
xilinx ASoC: xilinx: xlnx_formatter_pcm: Make buffer bytes multiple of period bytes 2022-02-08 18:34:10 +01:00
xtensa
Kconfig
Makefile
soc-ac97.c
soc-acpi.c
soc-card.c
soc-component.c
soc-compress.c
soc-core.c ASoC: soc-core: fix null-ptr-deref in snd_soc_del_component_unlocked() 2021-10-11 13:19:14 +01:00
soc-dai.c
soc-dapm.c ASoC: DAPM: Cover regression by kctl change notification fix 2021-11-25 09:49:07 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c
soc-jack.c
soc-link.c
soc-ops.c ASoC: ops: Fix stereo change notifications in snd_soc_put_xr_sx() 2022-02-23 12:03:14 +01:00
soc-pcm.c
soc-topology-test.c
soc-topology.c ASoC: topology: Add missing rwsem around snd_ctl_remove() calls 2021-12-01 09:04:46 +01:00
soc-utils.c