From: Takashi Iwai Subject: Re: [PATCH] ALSA: hda - Set SKL+ hda controller power at freeze() and thaw() Date: Fri, 18 Dec 2015 09:51:01 +0100 Message-ID: References: <1450335524-22848-1-git-send-email-xiong.y.zhang@intel.com> <1450416558-27381-1-git-send-email-xiong.y.zhang@intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 1440E265062 for ; Fri, 18 Dec 2015 09:50:58 +0100 (CET) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Takashi Iwai Cc: Xiong Zhang , libin.yang@intel.com, alsa-devel@alsa-project.org, han.lu@intel.com List-Id: alsa-devel@alsa-project.org On Fri, 18 Dec 2015 09:39:45 +0100, Takashi Iwai wrote: > > On Fri, 18 Dec 2015 06:29:18 +0100, > Xiong Zhang wrote: > > > > 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 > > > > Signed-off-by: Xiong Zhang > > Thanks, applied now with a few more fixes. I moved azx_freeze_noirq() > and azx_thaw_noirq() in another ifdef CONFIG_PM_SLEEP, as the place > you added isn't only for CONFIG_PM_SLEEP and it may lead to compile > warnings via randconfig. Also, I added a comment as a brief > explanation in the code. Oh, also I added stable to Cc. Takashi