From patchwork Tue Oct 18 13:38:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 616070 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 156F0C433FE for ; Tue, 18 Oct 2022 13:39:23 +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 770618C74; Tue, 18 Oct 2022 15:38:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 770618C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1666100361; bh=p+MDVVA/bJ2AmKjsTI6U0xnwldHtoLIYFUmjH+IJ+qU=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Xsg2JWuWtuwfgb7K1wMNuvFLeM6Gw9iRlvDKqDM6LZfO7bpbnPvWASsrLE7xA1EQx 7CLVAbPI8nOk4BQjoRu7p67F/v7+TxE7irr2D5bBNC0ZbPnSYBvqrno8JORn2/8Xg8 qJbuXzThlqiUgsufYu2dSDXaE3X6PYp78nEu3HI8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 22FB1F800E5; Tue, 18 Oct 2022 15:38:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 392D0F8024C; Tue, 18 Oct 2022 15:38:29 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 30C52F800AA for ; Tue, 18 Oct 2022 15:38:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 30C52F800AA Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="noFbK31q" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666100307; x=1697636307; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=p+MDVVA/bJ2AmKjsTI6U0xnwldHtoLIYFUmjH+IJ+qU=; b=noFbK31qHS6uOE6s6/lJOsAeWgCERcZQwxLyzUbtAW+ZLAnWwRuJC7E4 C5ARiyhXAon8Bd5O9QeOcUuqBQD6GTMQCXn0yYNEvg6Z3Dji5pnEbpnBi f9uCgKRKrmaYBO+wOefi8vniHPTwiB0MniegdDTFWHH9P2zCi8OTP3oJ6 dmYO6xVPXZ/H36IvYS4YdXZZ5KGX+8vIhx7j1DkX3I/8SSEQLWKkYM0N8 UnAe+2oThiIkVHOBB6EpgWDYB9UvmP92L1K2Nh2w9wyEBykfTZnhsbZTO uUeIskF4C7jSvgGA0eCHKOvOnErifnS/7LevYiAv/JYDMYTmgKnIdoxdH g==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="332650646" X-IronPort-AV: E=Sophos;i="5.95,193,1661842800"; d="scan'208";a="332650646" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2022 06:38:22 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="691810122" X-IronPort-AV: E=Sophos;i="5.95,193,1661842800"; d="scan'208";a="691810122" Received: from mariaca1-mobl.ger.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.252.27.127]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2022 06:38:20 -0700 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org Subject: [PATCH] ASoC: SOF: ipc3: Log the tx message before sending it Date: Tue, 18 Oct 2022 16:38:43 +0300 Message-Id: <20221018133843.16958-1-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.intel.com, kai.vehmanen@linux.intel.com, ranjani.sridharan@linux.intel.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" It makes more sense to log the message before it is sent to the DSP. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao --- sound/soc/sof/ipc3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/ipc3.c b/sound/soc/sof/ipc3.c index b28af3a48b70..1fef4dcc0936 100644 --- a/sound/soc/sof/ipc3.c +++ b/sound/soc/sof/ipc3.c @@ -329,6 +329,8 @@ static int ipc3_tx_msg_unlocked(struct snd_sof_ipc *ipc, struct snd_sof_dev *sdev = ipc->sdev; int ret; + ipc3_log_header(sdev->dev, "ipc tx", hdr->cmd); + ret = sof_ipc_send_msg(sdev, msg_data, msg_bytes, reply_bytes); if (ret) { @@ -338,8 +340,6 @@ static int ipc3_tx_msg_unlocked(struct snd_sof_ipc *ipc, return ret; } - ipc3_log_header(sdev->dev, "ipc tx", hdr->cmd); - /* now wait for completion */ return ipc3_wait_tx_done(ipc, reply_data); }