From patchwork Mon Dec 7 21:24:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Subhransu S. Prusty" X-Patchwork-Id: 7787621 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 7E5E4BEEE1 for ; Mon, 7 Dec 2015 16:02:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 85BA3203ED for ; Mon, 7 Dec 2015 16:02:46 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 48E57202FF for ; Mon, 7 Dec 2015 16:02:45 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 935492661EE; Mon, 7 Dec 2015 17:02:42 +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=0.4 required=5.0 tests=BAYES_00, DATE_IN_FUTURE_03_06, RCVD_IN_DNSWL_LOW,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id CE1E0265DB0; Mon, 7 Dec 2015 16:56:25 +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 43DBD265DA9; Mon, 7 Dec 2015 16:56:22 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by alsa0.perex.cz (Postfix) with ESMTP id A342A2657A6 for ; Mon, 7 Dec 2015 16:54:29 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 07 Dec 2015 07:54:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,395,1444719600"; d="scan'208";a="613937731" Received: from subhransu-desktop.iind.intel.com ([10.223.96.57]) by FMSMGA003.fm.intel.com with ESMTP; 07 Dec 2015 07:54:26 -0800 From: "Subhransu S. Prusty" To: alsa-devel@alsa-project.org Date: Tue, 8 Dec 2015 02:54:27 +0530 Message-Id: <1449523469-4395-13-git-send-email-subhransu.s.prusty@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449523469-4395-1-git-send-email-subhransu.s.prusty@intel.com> References: <1449523078-4311-1-git-send-email-subhransu.s.prusty@intel.com> <1449523469-4395-1-git-send-email-subhransu.s.prusty@intel.com> Cc: tiwai@suse.de, lgirdwood@gmail.com, Ramesh Babu , patches.audio@intel.com, broonie@kernel.org, Vinod Koul , "Subhransu S. Prusty" Subject: [alsa-devel] [PATCH v3 13/15] ASoC: hdac_hdmi: Fix to keep display active while enumerating codec 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 From: Ramesh Babu The display power reference count is decremented with the first explicit call to pm_runtime_suspend. Otherwise the display power reference count is balanced with runtime resume/suspend. Rest of the time it is kept off. Signed-off-by: Ramesh Babu Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul --- sound/soc/codecs/hdac_hdmi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index e64e505..008a29f 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -1264,6 +1264,18 @@ static int hdac_hdmi_dev_probe(struct hdac_ext_device *edev) INIT_LIST_HEAD(&hdmi_priv->pin_list); INIT_LIST_HEAD(&hdmi_priv->cvt_list); + /* + * Turned off in the runtime_suspend during the first explicit + * pm_runtime_suspend call. + */ + ret = snd_hdac_display_power(edev->hdac.bus, true); + if (ret < 0) { + dev_err(&edev->hdac.dev, + "Cannot turn on display power on i915 err: %d\n", + ret); + return ret; + } + ret = hdac_hdmi_parse_and_map_nid(edev, &hdmi_dais, &num_dais); if (ret < 0) { dev_err(&codec->dev,