linux/sound/pci/hda
Mohan Kumar 6ddc2f7496 ALSA: hda: Avoid unsol event during RPM suspending
There is a corner case with unsol event handling during codec runtime
suspending state. When the codec runtime suspend call initiated, the
codec->in_pm atomic variable would be 0, currently the codec runtime
suspend function calls snd_hdac_enter_pm() which will just increments
the codec->in_pm atomic variable. Consider unsol event happened just
after this step and before snd_hdac_leave_pm() in the codec runtime
suspend function. The snd_hdac_power_up_pm() in the unsol event
flow in hdmi_present_sense_via_verbs() function would just increment
the codec->in_pm atomic variable without calling pm_runtime_get_sync
function.

As codec runtime suspend flow is already in progress and in parallel
unsol event is also accessing the codec verbs, as soon as codec
suspend flow completes and clocks are  switched off before completing
the unsol event handling as both functions doesn't wait for each other.
This will result in below errors

[  589.428020] tegra-hda 3510000.hda: azx_get_response timeout, switching
to polling mode: last cmd=0x505f2f57
[  589.428344] tegra-hda 3510000.hda: spurious response 0x80000074:0x5,
last cmd=0x505f2f57
[  589.428547] tegra-hda 3510000.hda: spurious response 0x80000065:0x5,
last cmd=0x505f2f57

To avoid this, the unsol event flow should not perform any codec verb
related operations during RPM_SUSPENDING state.

Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220329155940.26331-1-mkumard@nvidia.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-03-30 10:20:27 +02:00
..
ca0132_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 32 2019-05-24 17:27:10 +02:00
cs35l41_hda_i2c.c ALSA: hda: cs35l41: Make cs35l41_hda_remove() return void 2022-01-18 14:08:05 +01:00
cs35l41_hda_spi.c ALSA: hda: cs35l41: Make cs35l41_hda_remove() return void 2022-01-18 14:08:05 +01:00
cs35l41_hda.c ALSA: hda: cs35l41: Make cs35l41_hda_remove() return void 2022-01-18 14:08:05 +01:00
cs35l41_hda.h ALSA: hda: cs35l41: Make cs35l41_hda_remove() return void 2022-01-18 14:08:05 +01:00
hda_auto_parser.c ALSA: hda: Fix signedness of sscanf() arguments 2022-01-28 09:22:45 +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: Do disconnect jacks at codec unbind 2021-11-17 14:41:16 +01:00
hda_codec.c ALSA: hda: Expose codec cleanup and power-save functions 2022-02-21 10:56:38 +01:00
hda_component.h ALSA: hda: cs35l41: Add support for CS35L41 in HDA systems 2022-01-05 17:08:16 +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_controller.c ALSA: hda: Make proper use of timecounter 2021-11-29 17:42:31 +01:00
hda_controller.h ALSA: hda: intel: Allow repeatedly probing on codec configuration errors 2021-10-07 09:15:22 +02: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: Fix UAF of leds class devs at unbinding 2022-01-26 15:56:35 +01:00
hda_generic.h ALSA: hda: Fix UAF of leds class devs at unbinding 2022-01-26 15:56:35 +01:00
hda_hwdep.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 32 2019-05-24 17:27:10 +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_intel.c ALSA: hda: Add AlderLake-PS variant PCI ID 2022-03-09 10:49:26 +01:00
hda_intel.h ALSA: hda: intel: Allow repeatedly probing on codec configuration errors 2021-10-07 09:15:22 +02:00
hda_jack.c ALSA: hda: Do disconnect jacks at codec unbind 2021-11-17 14:41:16 +01:00
hda_jack.h ALSA: hda: Do disconnect jacks at codec unbind 2021-11-17 14:41:16 +01:00
hda_local.h ALSA: hda: Expose codec cleanup and power-save functions 2022-02-21 10:56:38 +01: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: Hardcode GCAP ISS value on T234 2022-02-21 11:03:35 +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/hdmi: add keep-alive support for ADL-P and DG2 2022-02-17 09:46:01 +01:00
Makefile ALSA: hda: cs35l41: Add support for CS35L41 in HDA systems 2022-01-05 17:08:16 +01:00
patch_analog.c ALSA: hda/analog - Sink ad198x_shutup() and shuffle CONFIG_PM guards 2021-08-18 07:51:09 +02:00
patch_ca0110.c ALSA: hda: Unify get_response handling 2019-12-13 14:36:52 +01:00
patch_ca0132.c ALSA: hda: Nuke unused reboot_notify callback 2021-08-14 08:39:38 +02:00
patch_cirrus.c ALSA: hda/cirrus: Move CS8409 HDA bridge to separate module 2021-08-12 13:41:36 +02: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: Nuke unused reboot_notify callback 2021-08-14 08:39:38 +02:00
patch_cs8409-tables.c ALSA: hda/cs8409: Add new Dolphin HW variants 2022-03-28 18:33:20 +02:00
patch_cs8409.c ALSA: hda/cs8409: Disable HSBIAS_SENSE_EN for Cyborg 2022-03-28 18:33:02 +02:00
patch_cs8409.h ALSA: hda/cs8409: Support new Warlock MLK Variants 2022-03-28 18:32:36 +02:00
patch_hdmi.c ALSA: hda: Avoid unsol event during RPM suspending 2022-03-30 10:20:27 +02:00
patch_realtek.c ALSA: hda/realtek: Fix audio regression on Mi Notebook Pro 2020 2022-03-30 10:17:35 +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/sigmatel - Sink stac_shutup() into stac_suspend() 2021-08-18 07:51:02 +02:00
patch_via.c ALSA: hda/via: Apply runtime PM workaround for ASUS B23E 2021-08-17 08:02:44 +02:00
thinkpad_helper.c ALSA: HDA - remove the custom implementation for the audio LED trigger 2021-03-30 15:35:15 +02:00