From patchwork Fri Dec 18 09:42:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 7881711 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1169DBEEE5 for ; Fri, 18 Dec 2015 09:44:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 43A3F204AE for ; Fri, 18 Dec 2015 09:44:29 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 18F80204AB for ; Fri, 18 Dec 2015 09:44:28 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C1D1F265DF6; Fri, 18 Dec 2015 10:44:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C3B22266018; Fri, 18 Dec 2015 10:40:43 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id F18C9266646; Fri, 18 Dec 2015 10:40:41 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by alsa0.perex.cz (Postfix) with ESMTP id A583D265DF3 for ; Fri, 18 Dec 2015 10:39:23 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 18 Dec 2015 01:39:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,445,1444719600"; d="scan'208";a="876325688" Received: from vkoul-udesk7.iind.intel.com ([10.223.84.135]) by fmsmga002.fm.intel.com with ESMTP; 18 Dec 2015 01:39:20 -0800 From: Vinod Koul To: alsa-devel@alsa-project.org Date: Fri, 18 Dec 2015 15:12:05 +0530 Message-Id: <1450431729-27259-10-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450431729-27259-1-git-send-email-vinod.koul@intel.com> References: <1450431729-27259-1-git-send-email-vinod.koul@intel.com> Cc: tiwai@suse.de, Jayachandran B , patches.audio@intel.com, liam.r.girdwood@linux.intel.com, Vinod Koul , broonie@kernel.org, "Subhransu S. Prusty" Subject: [alsa-devel] [PATCH v4 09/13] ASoC: Intel: Skylake: manage link power in active suspend X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP When device enters active suspend, we should turn off the links as they are not in use. Similarly we need to bring back links when we exit active suspend. Signed-off-by: Jayachandran B Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul --- sound/soc/intel/skylake/skl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index 85d47cedd125..5987509507ba 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -223,6 +223,7 @@ static int skl_suspend(struct device *dev) * running, we need to save the state for these and continue */ if (skl->supend_active) { + snd_hdac_ext_bus_link_power_down_all(ebus); pci_save_state(pci); pci_disable_device(pci); return 0; @@ -245,6 +246,7 @@ static int skl_resume(struct device *dev) if (skl->supend_active) { pci_restore_state(pci); ret = pci_enable_device(pci); + snd_hdac_ext_bus_link_power_up_all(ebus); } else { ret = _skl_resume(ebus); }