linux/sound/pci/hda
Hui Wang b5a236c175 ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec
Recently we found the audio jack detection stop working after suspend
on many machines with Realtek codec. Sometimes the audio selection
dialogue didn't show up after users plugged headhphone/headset into
the headset jack, sometimes after uses plugged headphone/headset, then
click the sound icon on the upper-right corner of gnome-desktop, it
also showed the speaker rather than the headphone.

The root cause is that before suspend, the codec already call the
runtime_suspend since this codec is not used by any apps, then in
resume, it will not call runtime_resume for this codec. But for some
realtek codec (so far, alc236, alc255 and alc891) with the specific
BIOS, if it doesn't run runtime_resume after suspend, all codec
functions including jack detection stop working anymore.

This problem existed for a long time, but it was not exposed, that is
because when problem happens, if users play sound or open
sound-setting to check audio device, this will trigger calling to
runtime_resume (via snd_hda_power_up), then the codec starts working
again before users notice this problem.

Since we don't know how many codec and BIOS combinations have this
problem, to fix it, let the driver call runtime_resume for all codecs
in pm_resume, maybe for some codecs, this is not needed, but it is
harmless. After a codec is runtime resumed, if it is not used by any
apps, it will be runtime suspended soon and furthermore we don't run
suspend frequently, this change will not add much power consumption.

Fixes: cc72da7d4d ("ALSA: hda - Use standard runtime PM for codec power-save control")
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-03-19 06:54:24 +01:00
..
ca0132_regs.h ALSA: hda: ca0132_regs.h: Fix typo in include guard 2014-08-22 11:24:11 +02:00
hda_auto_parser.c ALSA: hda: move hda_codec.h to include/sound 2018-08-30 15:45:10 +01:00
hda_auto_parser.h ALSA: hda - Sort input pins depending on amp caps 2014-09-23 15:57:32 +02:00
hda_beep.c ALSA: hda - Use standard device registration for beep 2019-01-29 18:28:09 +01: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 - Serialize codec registrations 2019-02-01 11:30:09 +01:00
hda_codec.c ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec 2019-03-19 06:54:24 +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: Refactor display power management 2018-12-11 08:06:55 +01:00
hda_controller.h ALSA: hda - Revert DSP detection on legacy HD-audio driver 2019-01-01 20:43:01 +01:00
hda_eld.c ALSA: hda: move hda_codec.h to include/sound 2018-08-30 15:45:10 +01:00
hda_generic.c ALSA: hda - Support led audio trigger 2018-11-28 23:25:22 +01:00
hda_generic.h ALSA: hda - Support led audio trigger 2018-11-28 23:25:22 +01:00
hda_hwdep.c ALSA: hda: move hda_codec.h to include/sound 2018-08-30 15:45:10 +01: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 - Don't trigger jackpoll_work in azx_resume 2019-03-19 06:52:19 +01:00
hda_intel.h ALSA: hda - Enable runtime PM only for discrete GPU 2018-09-13 17:58:30 +02:00
hda_jack.c ALSA: hda - Add jack button support 2018-12-07 11:42:36 +01:00
hda_jack.h ALSA: hda - Add jack button support 2018-12-07 11:42:36 +01:00
hda_local.h ALSA: hda - Fix runtime PM 2018-05-24 20:16:47 +02:00
hda_proc.c ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
hda_sysfs.c ALSA: hda: move hda_codec.h to include/sound 2018-08-30 15:45:10 +01:00
hda_tegra.c ALSA: hda/tegra: avoid build error without CONFIG_PM 2019-03-13 11:27:54 +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
Kconfig ALSA: hda - Revert DSP detection on legacy HD-audio driver 2019-01-01 20:43:01 +01: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: move hda_codec.h to include/sound 2018-08-30 15:45:10 +01:00
patch_ca0110.c ALSA: hda: move hda_codec.h to include/sound 2018-08-30 15:45:10 +01:00
patch_ca0132.c ALSA: hda/ca0132 - Fix build error without CONFIG_PCI 2019-02-06 07:17:17 +01:00
patch_cirrus.c ALSA: hda: move hda_codec.h to include/sound 2018-08-30 15:45:10 +01:00
patch_cmedia.c ALSA: hda: move hda_codec.h to include/sound 2018-08-30 15:45:10 +01:00
patch_conexant.c ALSA: hda - add more quirks for HP Z2 G4 and HP Z240 2019-03-13 14:41:55 +01:00
patch_hdmi.c ALSA: hda: hdmi - add Icelake support 2019-03-13 21:25:44 +01:00
patch_realtek.c ALSA: hda/realtek - Add support headset mode for New DELL WYSE NB 2019-03-14 10:31:02 +01:00
patch_si3054.c ALSA: hda: move hda_codec.h to include/sound 2018-08-30 15:45:10 +01:00
patch_sigmatel.c ALSA: hda/sigmatel - Disable automute for Elo VuPoint 2018-10-04 21:22:47 +02:00
patch_via.c ALSA: hda: move hda_codec.h to include/sound 2018-08-30 15:45:10 +01:00
thinkpad_helper.c ALSA: hda - Support led audio trigger 2018-11-28 23:25:22 +01:00