From patchwork Thu Sep 14 12:51:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 723205 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 3A7E4CA0EF6 for ; Thu, 14 Sep 2023 12:52:52 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4CC26950; Thu, 14 Sep 2023 14:52:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4CC26950 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1694695970; bh=k4H1kCDpxdvBelZv86gyII9rf1L8hcN6IJKE4EGFcSs=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=XSi1yWZ4RPRPk3qBj+R2cUZxgQlMi/bz8UWCTUulV5X3Mp/eV9aozJw9LChAWZPxq XWTx+a2Nr+cdhN30pGdqzTt9WChc6mbaNxthIZUp5vA+9oUKZXQqfot1x+6x1BJNoF BdzbKfVrHuGnfIzeYOVLzebqSbxZXKJSyKLtqU6Y= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8B6C0F80425; Thu, 14 Sep 2023 14:51:32 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 48D4BF8047D; Thu, 14 Sep 2023 14:51:32 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2C268F80431; Thu, 14 Sep 2023 14:51:28 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) (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 93EE3F80141 for ; Thu, 14 Sep 2023 14:51:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 93EE3F80141 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=b5KkS0CL DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694695876; x=1726231876; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=k4H1kCDpxdvBelZv86gyII9rf1L8hcN6IJKE4EGFcSs=; b=b5KkS0CLKKD2Xjy17WVegh0DA8Za3cK7CsoP6tj9KHDsWc7urh0w+/qZ a/q+nbRHM7oPAjk/LvYCgoh/pQqZ1P00P7nBFwVs52Ntpmt7UWPi24Mde tEcHjROQr9wZn5l4S+9UZS0gF7mXsTY5QADwOPc8Fj/a/akWij4cus8yM bLC4MkTNnN/O14eluHac3qZJEQubj1u26xht8IdvhHpjIpeyiWQVbp8Tm W3Z5yhuDJ4Gdr2zHRT0PifG0YBJwrToEEJjlS+FoH3qR1HGaAh5mI/eW0 7k2I5B6T5xZ4Bnh10j7VUeKf35goWfZ7Ln1uTnC9QfALbZ8EH17s0QALi g==; X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="369212284" X-IronPort-AV: E=Sophos;i="6.02,146,1688454000"; d="scan'208";a="369212284" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 05:51:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="810044354" X-IronPort-AV: E=Sophos;i="6.02,146,1688454000"; d="scan'208";a="810044354" Received: from pakurapo-mobl3.ger.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.252.37.8]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 05:51:10 -0700 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org Cc: alsa-devel@alsa-project.org, pierre-louis.bossart@linux.intel.com, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com Subject: [PATCH] ASoC: SOF: ipc4: Dump the payload also when set_get_data fails Date: Thu, 14 Sep 2023 15:51:15 +0300 Message-ID: <20230914125115.30904-1-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Message-ID-Hash: TLTIC7BPXTECXMOFGBJ7QWMJFDG7ELU4 X-Message-ID-Hash: TLTIC7BPXTECXMOFGBJ7QWMJFDG7ELU4 X-MailFrom: peter.ujfalusi@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Move the out label to dump the message payload when the IPC message fails. The payload contains important information on what might have caused the error in firmware. Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart --- sound/soc/sof/ipc4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/ipc4.c b/sound/soc/sof/ipc4.c index ab6eddd91bb7..9744627d6978 100644 --- a/sound/soc/sof/ipc4.c +++ b/sound/soc/sof/ipc4.c @@ -513,10 +513,10 @@ static int sof_ipc4_set_get_data(struct snd_sof_dev *sdev, void *data, if (!set && payload_bytes != offset) ipc4_msg->data_size = offset; +out: if (sof_debug_check_flag(SOF_DBG_DUMP_IPC_MESSAGE_PAYLOAD)) sof_ipc4_dump_payload(sdev, ipc4_msg->data_ptr, ipc4_msg->data_size); -out: mutex_unlock(&sdev->ipc->tx_mutex); return ret;