linux-stable/sound
Sameer Pujar 70a6404ff6
ASoC: rt5640: Fix sleep in atomic context
Following prints are observed while testing audio on Jetson AGX Orin which
has onboard RT5640 audio codec:

  BUG: sleeping function called from invalid context at kernel/workqueue.c:3027
  in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/0
  preempt_count: 10001, expected: 0
  RCU nest depth: 0, expected: 0
  ------------[ cut here ]------------
  WARNING: CPU: 0 PID: 0 at kernel/irq/handle.c:159 __handle_irq_event_percpu+0x1e0/0x270
  ---[ end trace ad1c64905aac14a6 ]-

The IRQ handler rt5640_irq() runs in interrupt context and can sleep
during cancel_delayed_work_sync().

Fix this by running IRQ handler, rt5640_irq(), in thread context.
Hence replace request_irq() calls with devm_request_threaded_irq().

Fixes: 051dade346 ("ASoC: rt5640: Fix the wrong state of JD1 and JD2")
Cc: stable@vger.kernel.org
Cc: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1688015537-31682-4-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-29 11:40:28 +01:00
..
ac97
aoa Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
arm ALSA: pxa2xx: Convert to platform remove callback returning void 2023-03-20 13:07:00 +00:00
atmel ALSA: atmel: ac97: Convert to platform remove callback returning void 2023-03-20 13:07:01 +00:00
core ALSA: oss: avoid missing-prototype warnings 2023-05-17 16:56:09 +02:00
drivers ASoC: Updates for v6.4 2023-04-24 15:15:31 +02:00
firewire ALSA: firewire-digi00x: prevent potential use after free 2023-05-12 10:18:05 +02:00
hda ASoC: do not include pm_runtime.h if not used 2023-05-23 13:55:55 +01:00
i2c ALSA: i2c/cs8427: fix iec958 mixer control deactivation 2023-04-06 08:09:36 +02:00
isa
mips ALSA: mips/sgio2audio: Convert to platform remove callback returning void 2023-03-20 13:07:05 +00:00
oss
parisc
pci ES8316 audio codec fixes on Rock5B 2023-05-30 20:41:29 +01:00
pcmcia
ppc ASoC: Updates for v6.4 2023-04-24 15:15:31 +02:00
sh ALSA: sh_dac_audio: Convert to platform remove callback returning void 2023-03-20 13:07:08 +00:00
soc ASoC: rt5640: Fix sleep in atomic context 2023-06-29 11:40:28 +01:00
sparc ALSA: sparc/dbri: Convert to platform remove callback returning void 2023-03-20 13:09:37 +00:00
spi
synth
usb ALSA: usb-audio: Add a sample rate workaround for Line6 Pod Go 2023-05-12 10:19:55 +02:00
virtio
x86
xen
ac97_bus.c ALSA: ac97: Remove redundant driver match function 2023-03-20 08:50:02 +01:00
Kconfig
last.c
Makefile
sound_core.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00