linux/sound
Kai Vehmanen 0c37e2eb6b ALSA: hda/hdmi: fix race in handling acomp ELD notification at resume
When snd-hda-codec-hdmi is used with ASoC HDA controller like SOF (acomp
used for ELD notifications), display connection change done during suspend,
can be lost due to following sequence of events:

  1. system in S3 suspend
  2. DP/HDMI receiver connected
  3. system resumed
  4. HDA controller resumed, but card->deferred_resume_work not complete
  5. acomp eld_notify callback
  6. eld_notify ignored as power state is not CTL_POWER_D0
  7. HDA resume deferred work completed, power state set to CTL_POWER_D0

This results in losing the notification, and the jack state reported to
user-space is not correct.

The check on step 6 was added in commit 8ae743e82f ("ALSA: hda - Skip
ELD notification during system suspend"). It would seem with the deferred
resume logic in ASoC core, this check is not safe.

Fix the issue by modifying the check to use "dev.power.power_state.event"
instead of ALSA specific card power state variable.

BugLink: https://github.com/thesofproject/linux/issues/2825
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210416131157.1881366-1-kai.vehmanen@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-04-16 16:01:21 +02:00
..
ac97 ALSA: ac97: Constify static struct attribute_group 2021-01-31 09:49:58 +01:00
aoa ALSA: Convert strlcpy to strscpy when return value is unused 2021-01-08 09:30:05 +01:00
arm ARM updates for 5.12-rc1: 2021-02-22 14:27:07 -08:00
atmel ALSA: atmel: ac97: clarify operator precedence 2020-09-03 09:27:34 +02:00
core ALSA: control: Fix racy management of user ctl memory size account 2021-04-16 09:57:49 +02:00
drivers Merge branch 'for-linus' into for-next 2021-04-09 09:57:03 +02:00
firewire ALSA: control - add generic LED API 2021-03-30 17:42:40 +02:00
hda ALSA: control - add generic LED API 2021-03-30 17:42:40 +02:00
i2c ALSA: Convert strlcpy to strscpy when return value is unused 2021-01-08 09:30:05 +01:00
isa module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
mips module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
oss ALSA: Convert strlcpy to strscpy when return value is unused 2021-01-08 09:30:05 +01:00
parisc
pci ALSA: hda/hdmi: fix race in handling acomp ELD notification at resume 2021-04-16 16:01:21 +02:00
pcmcia module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
ppc ALSA: control - add generic LED API 2021-03-30 17:42:40 +02:00
sh module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
soc ASoC: fsl_esai: Fix TDM slot setup for I2S mode 2021-04-02 16:24:16 +01:00
sparc module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
spi
synth
usb ALSA: usb-audio: Apply implicit feedback mode for BOSS devices 2021-04-14 14:24:22 +02:00
virtio ALSA: virtio: use module_virtio_driver() to simplify the code 2021-04-12 12:15:34 +02:00
x86 module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
xen module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
ac97_bus.c
Kconfig ALSA: virtio: add virtio sound driver 2021-03-07 09:07:16 +01:00
last.c
Makefile ALSA: virtio: add virtio sound driver 2021-03-07 09:07:16 +01:00
sound_core.c