From patchwork Tue Nov 13 19:46:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 151008 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4816584ljp; Tue, 13 Nov 2018 11:47:09 -0800 (PST) X-Google-Smtp-Source: AJdET5eVYxGl6X1eXLSo3+fgsnsNgBOS1fXkZOg3iTOv+CAyOVbEOn/51ud+Cd3L2aIvkbGZ1As6 X-Received: by 2002:a5d:4b05:: with SMTP id v5-v6mr6081775wrq.5.1542138429917; Tue, 13 Nov 2018 11:47:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542138429; cv=none; d=google.com; s=arc-20160816; b=MSFyqVLG+yVlp/vGyuSK7PFcRvKrbql7+2wfdJlzeH5a7o4hEUyEWynheZgKltsuj/ OnA464FW9ntD/AzZH9qwcFQ2G11aDVTacXe3bJOEumrkfqD66gC0VoSwUjYzGK7yz9w0 nRQO5vi3Z3y8lKS6fSbrotwX8OOqXHuE5FiCgZZnNBKH3ZUfy+m6OqvICEJcc7IBijvh 2u6ljrDlyVvlgQJ4ICa9k9pR/eSui2uOZRlEpr286UP9DW/vEkAOZDiGZhRMj4r+8xOA FfTpK6qS2pFBNjs81D9O+e6+ANrUPhvsYAdpAC3pvZhZTQBQcl3hwip0y7/ewe3Pw5OM t9jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to; bh=5m236lRObBkXDDo+DKiMGDMvJjbF72HThDs+bXGRegY=; b=VjqU2DPBtpp1XKXUTNbPQ9lb/F+7CpmDBOCLcaIJHbJLVyjpESO/mkD1NvkT2ZanaF aksynBwCzIJeZBARSXdqn7j/YpA74n9oAhISb8WW3D8xBA+7DrUfOR2a17JBor0e29VB d87eiVbzgI8lJJ3gEF9n52+EuMJTI/KRFj44mZw3GfuD2WxgccZN7KAFzjp0PTT95X6v s1CnJ1UWJhvLkraz87kzt38GyXX+0xEdhWE65mK1B2eZ5jrhxZBaWiAWFtdamJZg5/H3 rPTChG4pysNzsU6IIuKYPnkxjZA49hnqqdRPHrESZ0OzKWoNGPn4Bmsy5EbKQjQX5bUB wldA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=ag+RMPH9; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id w10-v6si11054557wmc.99.2018.11.13.11.47.09; Tue, 13 Nov 2018 11:47:09 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=ag+RMPH9; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id DBBC4267A61; Tue, 13 Nov 2018 20:47:02 +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 7BB18267AE4; Tue, 13 Nov 2018 20:47:00 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id C838B267A61 for ; Tue, 13 Nov 2018 20:46:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=6cRAhw6jWHvVJEm4Kk7zWwlikVW6MfWuAwzPdgEM3FY=; b=ag+RMPH9vmE2 qV/CXS++YzZBbOzk6Hao3jy2dWFIeLcPmpPX/ZYfwQFAqqb1WxE/BUa2+uMukVeDd5UyARkwnC8mD 9EI5Pd1ec0SIOf72TT0l2J97QAhfiMq6dRSUOILT0rgK+N5X/ejaUMUSgnS7LLdQYRuPRKSqL4Cph k195Y=; Received: from [64.114.255.97] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gMeeD-0002Wp-DF; Tue, 13 Nov 2018 19:46:53 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 860B4440078; Tue, 13 Nov 2018 19:46:47 +0000 (GMT) From: Mark Brown To: Pierre-Louis Bossart In-Reply-To: <20181109193923.30977-1-pierre-louis.bossart@linux.intel.com> Message-Id: <20181113194647.860B4440078@finisterre.ee.mobilebroadband> Date: Tue, 13 Nov 2018 19:46:47 +0000 (GMT) Cc: alsa-devel@alsa-project.org, tiwai@suse.de, Sriram Periyasamy , liam.r.girdwood@linux.intel.com, vkoul@kernel.org, broonie@kernel.org, Sanyog Kale , andriy.shevchenko@linux.intel.com Subject: [alsa-devel] Applied "ASoC: Intel: Power down links before turning off display audio power" to the asoc tree 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 The patch ASoC: Intel: Power down links before turning off display audio power has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 4c10473d6ddf12ec124c9ff71a5d23bb5388478b Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 9 Nov 2018 13:39:23 -0600 Subject: [PATCH] ASoC: Intel: Power down links before turning off display audio power On certain platforms, Display HDMI HDA codec was not going to sleep state after the use when links are powered down after turning off the display power. As per the HW recommendation, links are powered down before turning off the display power to ensure that the codec goes to sleep state. This patch was updated from an earlier version submitted upstream [1] which conflicted with the changes merged for HDaudio codec support with the Intel DSP. [1] https://patchwork.kernel.org/patch/10540213/ Signed-off-by: Sriram Periyasamy Signed-off-by: Sanyog Kale Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown --- sound/soc/codecs/hdac_hdmi.c | 11 +++++------ sound/soc/intel/skylake/skl.c | 12 ++++++------ 2 files changed, 11 insertions(+), 12 deletions(-) -- 2.19.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index 4e9854889a95..e63d6e33df48 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -2187,11 +2187,6 @@ static int hdac_hdmi_runtime_suspend(struct device *dev) */ snd_hdac_codec_read(hdev, hdev->afg, 0, AC_VERB_SET_POWER_STATE, AC_PWRST_D3); - err = snd_hdac_display_power(bus, false); - if (err < 0) { - dev_err(dev, "Cannot turn on display power on i915\n"); - return err; - } hlink = snd_hdac_ext_bus_get_link(bus, dev_name(dev)); if (!hlink) { @@ -2201,7 +2196,11 @@ static int hdac_hdmi_runtime_suspend(struct device *dev) snd_hdac_ext_bus_link_put(bus, hlink); - return 0; + err = snd_hdac_display_power(bus, false); + if (err < 0) + dev_err(dev, "Cannot turn off display power on i915\n"); + + return err; } static int hdac_hdmi_runtime_resume(struct device *dev) diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index 29225623b4b4..1586c97d9450 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -815,6 +815,12 @@ static void skl_probe_work(struct work_struct *work) } } + /* + * we are done probing so decrement link counts + */ + list_for_each_entry(hlink, &bus->hlink_list, list) + snd_hdac_ext_bus_link_put(bus, hlink); + if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) { err = snd_hdac_display_power(bus, false); if (err < 0) { @@ -824,12 +830,6 @@ static void skl_probe_work(struct work_struct *work) } } - /* - * we are done probing so decrement link counts - */ - list_for_each_entry(hlink, &bus->hlink_list, list) - snd_hdac_ext_bus_link_put(bus, hlink); - /* configure PM */ pm_runtime_put_noidle(bus->dev); pm_runtime_allow(bus->dev);