]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda: Separate runtime and system suspend
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Tue, 27 Oct 2020 13:00:37 +0000 (21:00 +0800)
committerTakashi Iwai <tiwai@suse.de>
Wed, 28 Oct 2020 08:43:08 +0000 (09:43 +0100)
commit517fb66f201a4ef2b90d05eb1af683efdec02848
tree084c6e622f1e3c723ce81c804bb23ddd03afa507
parent3562889743c8c8f9086ba93ed8ce57393b10684f
ALSA: hda: Separate runtime and system suspend

Both pm_runtime_force_suspend() and pm_runtime_force_resume() have
some implicit checks, so it can make code flow more straightforward if
we separate runtime and system suspend callbacks.

High Definition Audio Specification, 4.5.9.3 Codec Wake From System S3
states that codec can wake the system up from S3 if WAKEEN is toggled.
Since HDA controller has different wakeup settings for runtime and
system susend, we also need to explicitly disable direct-complete which
can be enabled automatically by PCI core. In addition to that, avoid
waking up codec if runtime resume is for system suspend, to not break
direct-complete for codecs.

While at it, also remove AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP, as the
original bug commit e9cf4fb2c977 ("ALSA: hda: Workaround for spurious
wakeups on some Intel platforms") solves doesn't happen with this
patch.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20201027130038.16463-3-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_controller.h
sound/pci/hda/hda_intel.c