From patchwork Fri Jan 28 13:36:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?P=C3=A9ter_Ujfalusi?= X-Patchwork-Id: 539003 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A3342C433F5 for ; Fri, 28 Jan 2022 13:37:30 +0000 (UTC) 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 C9ED7178F; Fri, 28 Jan 2022 14:36:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C9ED7178F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1643377048; bh=0YzJJYy9DlJ1gVtMXK1hSqwlqLo2WyJjF2puxviO9e0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=P5xL9byfycovPzUd6I+0FQ02/RS+sc9mFZzMGxqGBrmFtUsqoXKTS6TgOuKjAEhby 0uOwOEMVghzM/DNolkT0OYHIC4BkrDN0FtFqddBBy/SgojXx5efLmHAXcR23y/dA0I eraMuRvP809wH342o4vgcpXl8Y0u91vGVHcNH4jI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 67071F8050F; Fri, 28 Jan 2022 14:36:02 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1BF73F8050F; Fri, 28 Jan 2022 14:36:01 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 6EDCCF80118 for ; Fri, 28 Jan 2022 14:35:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6EDCCF80118 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="bv8cfVPO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643376955; x=1674912955; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0YzJJYy9DlJ1gVtMXK1hSqwlqLo2WyJjF2puxviO9e0=; b=bv8cfVPOznBROGFcYGMfPwOA+eWMlqTFCqneVDXNrDx2/UAR3rXjejqe w+tBZCxW2tbzTrJQFkfuj8wCWQWywLvdN9HMTCCghqOXuMWaMR9i6SqfM Z+hc6us1BLUDNEFDLYJ0Vr/AIcpXee94C7bTyc9hu0SduWtuaIfHwJZSc hW3kz3LlBSk4PQhDwiJziDouJm8KgCRXieMH/DT7I4vqojnbT46jWqrlw S/0duxs6czEnpaKSxRZNShdhiJ0Usdv/YE3ZivdKW02N9CB3RyO89J/s7 PCUIzQ2wbIa5ub8GODF4VMcZduw2xpZBvYInQa646zl9MQFGbW9D9cIhf w==; X-IronPort-AV: E=McAfee;i="6200,9189,10240"; a="227790493" X-IronPort-AV: E=Sophos;i="5.88,324,1635231600"; d="scan'208";a="227790493" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2022 05:35:51 -0800 X-IronPort-AV: E=Sophos;i="5.88,324,1635231600"; d="scan'208";a="536132825" Received: from dlita-mobl2.ger.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.249.43.152]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2022 05:35:48 -0800 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org Subject: [PATCH 1/3] ASoC: SOF: Intel: cnl: Use pm_gate->hdr.cmd in cnl_compact_ipc_compress() Date: Fri, 28 Jan 2022 15:36:18 +0200 Message-Id: <20220128133620.9411-2-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220128133620.9411-1-peter.ujfalusi@linux.intel.com> References: <20220128133620.9411-1-peter.ujfalusi@linux.intel.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.intel.com, ranjani.sridharan@linux.intel.com, rander.wang@intel.com, daniel.baluta@nxp.com 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" Instead of first checking the msg->header (which is the hdr.cmd), use directly the cmd from the message itself. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Daniel Baluta Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart --- sound/soc/sof/intel/cnl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/sof/intel/cnl.c b/sound/soc/sof/intel/cnl.c index e615125d575e..1911e104f113 100644 --- a/sound/soc/sof/intel/cnl.c +++ b/sound/soc/sof/intel/cnl.c @@ -161,11 +161,9 @@ static void cnl_ipc_dsp_done(struct snd_sof_dev *sdev) static bool cnl_compact_ipc_compress(struct snd_sof_ipc_msg *msg, u32 *dr, u32 *dd) { - struct sof_ipc_pm_gate *pm_gate; - - if (msg->header == (SOF_IPC_GLB_PM_MSG | SOF_IPC_PM_GATE)) { - pm_gate = msg->msg_data; + struct sof_ipc_pm_gate *pm_gate = msg->msg_data; + if (pm_gate->hdr.cmd == (SOF_IPC_GLB_PM_MSG | SOF_IPC_PM_GATE)) { /* send the compact message via the primary register */ *dr = HDA_IPC_MSG_COMPACT | HDA_IPC_PM_GATE;