linux/sound/pci/hda
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
..
ca0132_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 32 2019-05-24 17:27:10 +02:00
hda_auto_parser.c ALSA: Convert strlcpy to strscpy when return value is unused 2021-01-08 09:30:05 +01:00
hda_auto_parser.h ALSA: hda/cirrus: Increase AUTO_CFG_MAX_INS from 8 to 18 2021-03-07 09:17:30 +01:00
hda_beep.c ALSA: Use fallthrough pseudo-keyword 2020-07-09 13:01:29 +02:00
hda_beep.h ALSA: hda - Use standard device registration for beep 2019-01-29 18:28:09 +01:00
hda_bind.c ALSA: hda: Avoid spurious unsol event handling during S3/S4 2021-03-10 12:51:49 +01:00
hda_codec.c ALSA: HDA: Add access description in __snd_hda_add_vmaster 2021-04-10 08:46:03 +02:00
hda_controller.c ALSA: hda: Drop the BATCH workaround for AMD controllers 2021-03-08 17:09:25 +01:00
hda_controller.h ALSA: hda: Separate runtime and system suspend 2020-10-28 09:43:08 +01:00
hda_controller_trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hda_eld.c ALSA: Convert strlcpy to strscpy when return value is unused 2021-01-08 09:30:05 +01:00
hda_generic.c ALSA: HDA - remove the custom implementation for the audio LED trigger 2021-03-30 15:35:15 +02:00
hda_generic.h ALSA: HDA - remove the custom implementation for the audio LED trigger 2021-03-30 15:35:15 +02:00
hda_hwdep.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 32 2019-05-24 17:27:10 +02:00
hda_intel.c Merge branch 'for-linus' into for-next 2021-04-09 09:57:03 +02:00
hda_intel.h ALSA: hda: Release resources at error in delayed probe 2020-04-13 18:02:36 +02:00
hda_intel_trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hda_jack.c ALSA: add virtio sound driver 2021-03-07 09:16:24 +01:00
hda_jack.h ALSA: hda - bind headset buttons to the headphone jack 2021-03-05 15:18:24 +01:00
hda_local.h ALSA: control - add generic LED API 2021-03-30 17:42:40 +02:00
hda_proc.c ALSA: hda/proc - print DP-MST connections 2020-12-08 20:04:33 +01:00
hda_sysfs.c ALSA: hda: Fix regressions on clear and reconfig sysfs 2020-12-10 19:55:35 +01:00
hda_tegra.c ALSA: hda/tegra: Remove unnecessary null-check from hda_tegra_runtime_resume() 2021-01-26 07:32:46 +01:00
hp_x360_helper.c ALSA: hda/realtek - Fixup for HP x360 laptops with B&O speakers 2018-05-29 22:33:37 +02:00
ideapad_s740_helper.c ALSA: hda/realtek: Add quirk for Lenovo Ideapad S740 2021-04-16 10:12:50 +02:00
Kconfig ALSA: HDA - remove the custom implementation for the audio LED trigger 2021-03-30 15:35:15 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
patch_analog.c ALSA: hda/analog - Minor optimization for SPDIF mux connections 2020-01-16 17:29:17 +01:00
patch_ca0110.c ALSA: hda: Unify get_response handling 2019-12-13 14:36:52 +01:00
patch_ca0132.c ALSA: HDA - remove the custom implementation for the audio LED trigger 2021-03-30 15:35:15 +02:00
patch_cirrus.c ALSA: hda/cirrus: Make CS8409 driver more generic by using fixups. 2021-03-16 08:19:47 +01:00
patch_cmedia.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 32 2019-05-24 17:27:10 +02:00
patch_conexant.c ALSA: hda/conexant: Apply quirk for another HP ZBook G5 model 2021-04-06 13:40:13 +02:00
patch_hdmi.c ALSA: hda/hdmi: fix race in handling acomp ELD notification at resume 2021-04-16 16:01:21 +02:00
patch_realtek.c ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 445 G7 2021-04-16 14:13:19 +02:00
patch_si3054.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 32 2019-05-24 17:27:10 +02:00
patch_sigmatel.c ALSA: HDA - remove the custom implementation for the audio LED trigger 2021-03-30 15:35:15 +02:00
patch_via.c ALSA: hda/via: Apply the workaround generically for Clevo machines 2021-01-26 18:05:03 +01:00
thinkpad_helper.c ALSA: HDA - remove the custom implementation for the audio LED trigger 2021-03-30 15:35:15 +02:00