]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
ALSA: hda - Set SKL+ hda controller power at freeze() and thaw()
authorXiong Zhang <xiong.y.zhang@intel.com>
Fri, 18 Dec 2015 05:29:18 +0000 (13:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jan 2016 05:49:29 +0000 (21:49 -0800)
commit4b98be841c36660c6d624e1cb8d78b36c08123db
tree26619798d4de615f8bc8b270856d08436544d6d8
parentae8ca6a01960835451ee12002a30da4c23ec90ca
ALSA: hda - Set SKL+ hda controller power at freeze() and thaw()

commit 3e6db33aaf1d42a30339f831ec4850570d6cc7a3 upstream.

It takes three minutes to enter into hibernation on some OEM SKL
machines and we see many codec spurious response after thaw() opertion.
This is because HDA is still in D0 state after freeze() call and
pci_pm_freeze/pci_pm_freeze_noirq() don't set D3 hot in pci_bus driver.
It seems bios still access HDA when system enter into freeze state,
HDA will receive codec response interrupt immediately after thaw() call.
Because of this unexpected interrupt, HDA enter into a abnormal
state and slow down the system enter into hibernation.

In this patch, we put HDA into D3 hot state in azx_freeze_noirq() and
put HDA into D0 state in azx_thaw_noirq().

V2: Only apply this fix to SKL+
    Fix compile error when CONFIG_PM_SLEEP isn't defined

[Yet another fix for CONFIG_PM_SLEEP ifdef and the additional comment
 by tiwai]

Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/hda_intel.c