From patchwork Mon Feb 8 23:21:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 378610 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 606C0C433DB for ; Mon, 8 Feb 2021 23:25:30 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8D72D64E7A for ; Mon, 8 Feb 2021 23:25:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8D72D64E7A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DB3DA169D; Tue, 9 Feb 2021 00:24:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DB3DA169D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1612826728; bh=TFQiXPSankAwSS8DA04/59zaydqTzWqf6yIR6B04/Ec=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=YL6o/RvRJl5Oyq7HxvrjerUQYpNiArfO38YBQMI2XQbvxA3XsUlo8uMBciF4ILER2 KzbU7NFJ3YFx54NjzTL0s9XjTlZ4sqMkSOcCWnsIlNrwpOCEU0mwxHPgIELFB0hXTj xL3sIWoYwFKca+Knjp0KL7c4b3zT8DrGNbNNjHwc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 056B9F8027C; Tue, 9 Feb 2021 00:23:49 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E95CDF8028B; Tue, 9 Feb 2021 00:23:47 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 16C58F80240 for ; Tue, 9 Feb 2021 00:23:40 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 16C58F80240 IronPort-SDR: 9tP5bqo4C56OGRRro2uWskG5UXCXcfudDs/oRvBFlaoTPVaDh6ytggcgrGXlFXKs2XO/e9+AFx aJ7j2xmroLHA== X-IronPort-AV: E=McAfee;i="6000,8403,9889"; a="243295587" X-IronPort-AV: E=Sophos;i="5.81,163,1610438400"; d="scan'208";a="243295587" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2021 15:22:16 -0800 IronPort-SDR: tDKVb/LPrsOuCRZ/orn9fqpTHSNkwBWzqVmghl56dbD2OLQwPLjK9f8fguzdeHquncEU+nvMF5 mHxyZBGJ2zmg== X-IronPort-AV: E=Sophos;i="5.81,163,1610438400"; d="scan'208";a="585854674" Received: from pmane-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.145.183]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2021 15:22:15 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 1/5] ASoC: SOF: add missing pm debug Date: Mon, 8 Feb 2021 17:21:45 -0600 Message-Id: <20210208232149.58899-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210208232149.58899-1-pierre-louis.bossart@linux.intel.com> References: <20210208232149.58899-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Curtis Malainey , broonie@kernel.org, Ranjani Sridharan , Pierre-Louis Bossart X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Curtis Malainey Type is not part of debugging parse code. Add it so unknown types don't show up while debugging Reviewed-by: Ranjani Sridharan Signed-off-by: Curtis Malainey Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/ipc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c index fc13bb06dbf3..1bc3d6282f16 100644 --- a/sound/soc/sof/ipc.c +++ b/sound/soc/sof/ipc.c @@ -106,6 +106,8 @@ static void ipc_log_header(struct device *dev, u8 *text, u32 cmd) str2 = "CLK_REQ"; break; case SOF_IPC_PM_CORE_ENABLE: str2 = "CORE_ENABLE"; break; + case SOF_IPC_PM_GATE: + str2 = "GATE"; break; default: str2 = "unknown type"; break; } From patchwork Mon Feb 8 23:21:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 378609 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 464E5C433DB for ; Mon, 8 Feb 2021 23:26:18 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62AC064DFF for ; Mon, 8 Feb 2021 23:26:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62AC064DFF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D8C50826; Tue, 9 Feb 2021 00:25:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D8C50826 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1612826775; bh=15kD3DoDgI1a+I7FMY06AmFCIEqM8+brab7CxtvUB00=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aVYB53YiwcjVJsWYMvoJK/ipyAMW6ae70ae4HxT1wC9l8u35PkKvukm/bzZIquc0S wLBhQxlNSSV/1FFo2bqwLuIqdMXVGAu+O963zQVs6ukoTqcUmF1/5OOOAgJw6o2wnU cel9DBT52X4T8TDEO4XCtWu7fXc85+JGHqn9uars= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B8648F802A0; Tue, 9 Feb 2021 00:23:55 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E4882F802A0; Tue, 9 Feb 2021 00:23:52 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3A825F80277 for ; Tue, 9 Feb 2021 00:23:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3A825F80277 IronPort-SDR: emD0Sx/kVW4K5D8sP5lTzix0/o+8LAdRaDRtknHpYobVFPjJx7Hxa1SAWSRwLkUPRcPC3Iu+zB bjOTLui8ULSw== X-IronPort-AV: E=McAfee;i="6000,8403,9889"; a="243295600" X-IronPort-AV: E=Sophos;i="5.81,163,1610438400"; d="scan'208";a="243295600" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2021 15:22:18 -0800 IronPort-SDR: HmwjYmzDEilhioakjr52Qt39/48t6RNU9+a3kLfLgUIauzchfjZMCk7RKvIgWnGlHZ/5+WSqyF MoTx180zlVBA== X-IronPort-AV: E=Sophos;i="5.81,163,1610438400"; d="scan'208";a="585854683" Received: from pmane-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.145.183]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2021 15:22:17 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 4/5] ASoC: SOF: HDA: (cosmetic) simplify hda_dsp_d0i3_work() Date: Mon, 8 Feb 2021 17:21:48 -0600 Message-Id: <20210208232149.58899-5-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210208232149.58899-1-pierre-louis.bossart@linux.intel.com> References: <20210208232149.58899-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Libin Yang , Guennadi Liakhovetski , Kai Vehmanen , tiwai@suse.de, Ranjani Sridharan , Pierre-Louis Bossart , broonie@kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Guennadi Liakhovetski Simplify hda_dsp_d0i3_work() by returning immediately from it if D0i3 cannot be set. Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Libin Yang Reviewed-by: Keyon Jie Signed-off-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/intel/hda-dsp.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sound/soc/sof/intel/hda-dsp.c b/sound/soc/sof/intel/hda-dsp.c index 72c0b8e9a196..5788fe356960 100644 --- a/sound/soc/sof/intel/hda-dsp.c +++ b/sound/soc/sof/intel/hda-dsp.c @@ -934,19 +934,15 @@ void hda_dsp_d0i3_work(struct work_struct *work) d0i3_work.work); struct hdac_bus *bus = &hdev->hbus.core; struct snd_sof_dev *sdev = dev_get_drvdata(bus->dev); - struct sof_dsp_power_state target_state; + struct sof_dsp_power_state target_state = { + .state = SOF_DSP_PM_D0, + .substate = SOF_HDA_DSP_PM_D0I3, + }; int ret; - target_state.state = SOF_DSP_PM_D0; - /* DSP can enter D0I3 iff only D0I3-compatible streams are active */ - if (snd_sof_dsp_only_d0i3_compatible_stream_active(sdev)) - target_state.substate = SOF_HDA_DSP_PM_D0I3; - else - target_state.substate = SOF_HDA_DSP_PM_D0I0; - - /* remain in D0I0 */ - if (target_state.substate == SOF_HDA_DSP_PM_D0I0) + if (!snd_sof_dsp_only_d0i3_compatible_stream_active(sdev)) + /* remain in D0I0 */ return; /* This can fail but error cannot be propagated */