From patchwork Fri Sep 23 13:36:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 609160 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 AD5FAECAAD8 for ; Fri, 23 Sep 2022 13:37:12 +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 BC0B3210; Fri, 23 Sep 2022 15:36:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BC0B3210 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663940230; bh=HvYNsvlok+RU+Wk3bol1LDURCPosUvc8hrylzY0u54c=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=KAp+SpazITfW9QV/CZLgBPlWg5O7EvuzcL+fXbkxj1cPEyYtr81Kp9xqHxEKN241q bOHGL7BqaII/u29iszowOYls/ikJXYBZu8uAbddtRlQLP/tWtfSD0PEpVyS4lk9p4s gbpLlyQqR+eIbtTHuRcOisdoUlxkUMdCmVf/RHJk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4C5A5F804D1; Fri, 23 Sep 2022 15:36:20 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C7DA6F80538; Fri, 23 Sep 2022 15:36:18 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 1EE3CF80124 for ; Fri, 23 Sep 2022 15:36:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1EE3CF80124 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="e2e5Ccbq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663940173; x=1695476173; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HvYNsvlok+RU+Wk3bol1LDURCPosUvc8hrylzY0u54c=; b=e2e5CcbqnbZRfaL33YOn4dN4N04H4tpCqPZSCYjqohB66i9YzKQRBz2K dy9Z7ZO9uqogp/ulEc0G9Zh/dudcnfj/hmlPkbs5/rnhfQw7OAiRRyTnr ORXQm8cIId3Knmf2niXzvRRnQx2bLCRvl2C6moVpQ5GRD+k5CAT5uRK+p FtM+PZVOKEhCXLqEarIFzcLyAId/HGfcZ87Hih+6d+1kgVtdLIlgfM88k kfqtrzsmIbyM9TFOJ0f/ZCC1lZL+gz6ZAU7B1abHLIlkbMORQbjItF+G2 vyWLSQPPYQJ8W7zs9BOzs7+R8xKf57I4rOsJ0y+mAbXc7vkER03y2kHDf Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10479"; a="300575612" X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="300575612" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 06:36:10 -0700 X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="571375291" Received: from acarr-mobl1.ger.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.252.3.209]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 06:36:07 -0700 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Subject: [PATCH 1/6] ASoC: SOF: Intel: cnl: Add separate ops for ipc_dump for IPC4 Date: Fri, 23 Sep 2022 16:36:11 +0300 Message-Id: <20220923133616.26267-2-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220923133616.26267-1-peter.ujfalusi@linux.intel.com> References: <20220923133616.26267-1-peter.ujfalusi@linux.intel.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, rander.wang@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" The use of the IPC registers are different between IPC3 and IPC4. The ipc_dump needs to use different prints depending on the used IPC protocol. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Kai Vehmanen Reviewed-by: Rander Wang --- sound/soc/sof/intel/cnl.c | 28 +++++++++++++++++++++++++++- sound/soc/sof/intel/hda-ipc.h | 1 + sound/soc/sof/intel/icl.c | 7 ++++++- sound/soc/sof/intel/tgl.c | 7 ++++++- 4 files changed, 40 insertions(+), 3 deletions(-) diff --git a/sound/soc/sof/intel/cnl.c b/sound/soc/sof/intel/cnl.c index 180001d0a38a..1e71f6dc604e 100644 --- a/sound/soc/sof/intel/cnl.c +++ b/sound/soc/sof/intel/cnl.c @@ -332,6 +332,27 @@ void cnl_ipc_dump(struct snd_sof_dev *sdev) hipcida, hipctdr, hipcctl); } +void cnl_ipc4_dump(struct snd_sof_dev *sdev) +{ + u32 hipcidr, hipcidd, hipcida, hipctdr, hipctdd, hipctda, hipcctl; + + hda_ipc_irq_dump(sdev); + + hipcidr = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCIDR); + hipcidd = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCIDD); + hipcida = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCIDA); + hipctdr = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCTDR); + hipctdd = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCTDD); + hipctda = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCTDA); + hipcctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCCTL); + + /* dump the IPC regs */ + /* TODO: parse the raw msg */ + dev_err(sdev->dev, + "Host IPC initiator: %#x|%#x|%#x, target: %#x|%#x|%#x, ctl: %#x\n", + hipcidr, hipcidd, hipcida, hipctdr, hipctdd, hipctda, hipcctl); +} + /* cannonlake ops */ struct snd_sof_dsp_ops sof_cnl_ops; EXPORT_SYMBOL_NS(sof_cnl_ops, SND_SOC_SOF_INTEL_HDA_COMMON); @@ -351,6 +372,9 @@ int sof_cnl_ops_init(struct snd_sof_dev *sdev) /* ipc */ sof_cnl_ops.send_msg = cnl_ipc_send_msg; + + /* debug */ + sof_cnl_ops.ipc_dump = cnl_ipc_dump; } if (sdev->pdata->ipc_type == SOF_INTEL_IPC4) { @@ -370,6 +394,9 @@ int sof_cnl_ops_init(struct snd_sof_dev *sdev) /* ipc */ sof_cnl_ops.send_msg = cnl_ipc4_send_msg; + + /* debug */ + sof_cnl_ops.ipc_dump = cnl_ipc4_dump; } /* set DAI driver ops */ @@ -378,7 +405,6 @@ int sof_cnl_ops_init(struct snd_sof_dev *sdev) /* debug */ sof_cnl_ops.debug_map = cnl_dsp_debugfs; sof_cnl_ops.debug_map_count = ARRAY_SIZE(cnl_dsp_debugfs); - sof_cnl_ops.ipc_dump = cnl_ipc_dump; /* pre/post fw run */ sof_cnl_ops.post_fw_run = hda_dsp_post_fw_run; diff --git a/sound/soc/sof/intel/hda-ipc.h b/sound/soc/sof/intel/hda-ipc.h index 10fbca5939db..8ec5e9f6f8d7 100644 --- a/sound/soc/sof/intel/hda-ipc.h +++ b/sound/soc/sof/intel/hda-ipc.h @@ -51,5 +51,6 @@ irqreturn_t cnl_ipc_irq_thread(int irq, void *context); int cnl_ipc_send_msg(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg); void cnl_ipc_dump(struct snd_sof_dev *sdev); +void cnl_ipc4_dump(struct snd_sof_dev *sdev); #endif diff --git a/sound/soc/sof/intel/icl.c b/sound/soc/sof/intel/icl.c index 59ce3132fada..f1018c6db5c2 100644 --- a/sound/soc/sof/intel/icl.c +++ b/sound/soc/sof/intel/icl.c @@ -113,6 +113,9 @@ int sof_icl_ops_init(struct snd_sof_dev *sdev) /* ipc */ sof_icl_ops.send_msg = cnl_ipc_send_msg; + + /* debug */ + sof_icl_ops.ipc_dump = cnl_ipc_dump; } if (sdev->pdata->ipc_type == SOF_INTEL_IPC4) { @@ -132,12 +135,14 @@ int sof_icl_ops_init(struct snd_sof_dev *sdev) /* ipc */ sof_icl_ops.send_msg = cnl_ipc4_send_msg; + + /* debug */ + sof_icl_ops.ipc_dump = cnl_ipc4_dump; } /* debug */ sof_icl_ops.debug_map = icl_dsp_debugfs; sof_icl_ops.debug_map_count = ARRAY_SIZE(icl_dsp_debugfs); - sof_icl_ops.ipc_dump = cnl_ipc_dump; /* pre/post fw run */ sof_icl_ops.post_fw_run = icl_dsp_post_fw_run; diff --git a/sound/soc/sof/intel/tgl.c b/sound/soc/sof/intel/tgl.c index 5135e1c7e6cf..c606c3691de7 100644 --- a/sound/soc/sof/intel/tgl.c +++ b/sound/soc/sof/intel/tgl.c @@ -68,6 +68,9 @@ int sof_tgl_ops_init(struct snd_sof_dev *sdev) /* ipc */ sof_tgl_ops.send_msg = cnl_ipc_send_msg; + + /* debug */ + sof_tgl_ops.ipc_dump = cnl_ipc_dump; } if (sdev->pdata->ipc_type == SOF_INTEL_IPC4) { @@ -87,6 +90,9 @@ int sof_tgl_ops_init(struct snd_sof_dev *sdev) /* ipc */ sof_tgl_ops.send_msg = cnl_ipc4_send_msg; + + /* debug */ + sof_tgl_ops.ipc_dump = cnl_ipc4_dump; } /* set DAI driver ops */ @@ -95,7 +101,6 @@ int sof_tgl_ops_init(struct snd_sof_dev *sdev) /* debug */ sof_tgl_ops.debug_map = tgl_dsp_debugfs; sof_tgl_ops.debug_map_count = ARRAY_SIZE(tgl_dsp_debugfs); - sof_tgl_ops.ipc_dump = cnl_ipc_dump; /* pre/post fw run */ sof_tgl_ops.post_fw_run = hda_dsp_post_fw_run; From patchwork Fri Sep 23 13:36:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 608602 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 B9762C6FA8B for ; Fri, 23 Sep 2022 13:37:14 +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 D0579829; Fri, 23 Sep 2022 15:36:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D0579829 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663940232; bh=c1uRWvjMaU36ufmDOGK9V1tkqGszO2YYsllnQkagJck=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=c1rk3aiVXGhjaqlAKyIHSaqsL/FmSFwwu0YbuEz23fTEe4tlFp8DckC0hDbcmE2wK xleAXUim+f/ZeG5xqkmg9e8nkKmIzr7yZ16KGltV2YQZvY63TueqwSIoQnmLoCsz/1 Mv9YLCUlLmO4CNsLoLiBIqQ1tK4aJ55X1AbqwoeQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6D337F80269; Fri, 23 Sep 2022 15:36:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D3500F8053A; Fri, 23 Sep 2022 15:36:20 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 1F7F6F80269 for ; Fri, 23 Sep 2022 15:36:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1F7F6F80269 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Ni5bV6Z1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663940175; x=1695476175; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=c1uRWvjMaU36ufmDOGK9V1tkqGszO2YYsllnQkagJck=; b=Ni5bV6Z1lKwhL78/WUTVbfsR3P9ewqMBYTy/gYWZXJzJm6yEQynmIcv2 e64lYgwaFVX3+99fL/sjwo5FD8wDOqzOu4pqOCTj0XeOW5s5g57ZItpss S0xejPnWZhI8Qfss7MUZfGKCo8w44xGdSucW7QZLuZ5ki9RSrzvvg18/3 MYtv9KhG2JDt/tr8/Fij13dfotKz7RPDzX/VkNx62u1vk448Ru7WAKx0q hic/PdW9WCijORx3JHlHflUq+kEWK6Dbd/VJkXzsJrZmjs3v9tnNM16CS BOTcfNYFW8jxoGJc05yx6yp4fvia8/XDKvEZs9WKcWQa7TiffCoYduKXC Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10479"; a="300575619" X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="300575619" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 06:36:12 -0700 X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="571375299" Received: from acarr-mobl1.ger.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.252.3.209]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 06:36:10 -0700 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Subject: [PATCH 2/6] ASoC: SOF: Intel: hda: Add separate ops for ipc_dump for IPC4 Date: Fri, 23 Sep 2022 16:36:12 +0300 Message-Id: <20220923133616.26267-3-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220923133616.26267-1-peter.ujfalusi@linux.intel.com> References: <20220923133616.26267-1-peter.ujfalusi@linux.intel.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, rander.wang@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" The use of the IPC registers are different between IPC3 and IPC4. The ipc_dump needs to use different prints depending on the used IPC protocol. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Kai Vehmanen Reviewed-by: Rander Wang --- sound/soc/sof/intel/apl.c | 7 ++++++- sound/soc/sof/intel/hda.c | 18 ++++++++++++++++++ sound/soc/sof/intel/hda.h | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/sound/soc/sof/intel/apl.c b/sound/soc/sof/intel/apl.c index 295df44be271..37d12e821c10 100644 --- a/sound/soc/sof/intel/apl.c +++ b/sound/soc/sof/intel/apl.c @@ -45,6 +45,9 @@ int sof_apl_ops_init(struct snd_sof_dev *sdev) /* ipc */ sof_apl_ops.send_msg = hda_dsp_ipc_send_msg; + + /* debug */ + sof_apl_ops.ipc_dump = hda_ipc_dump; } if (sdev->pdata->ipc_type == SOF_INTEL_IPC4) { @@ -64,6 +67,9 @@ int sof_apl_ops_init(struct snd_sof_dev *sdev) /* ipc */ sof_apl_ops.send_msg = hda_dsp_ipc4_send_msg; + + /* debug */ + sof_apl_ops.ipc_dump = hda_ipc4_dump; } /* set DAI driver ops */ @@ -72,7 +78,6 @@ int sof_apl_ops_init(struct snd_sof_dev *sdev) /* debug */ sof_apl_ops.debug_map = apl_dsp_debugfs; sof_apl_ops.debug_map_count = ARRAY_SIZE(apl_dsp_debugfs); - sof_apl_ops.ipc_dump = hda_ipc_dump; /* firmware run */ sof_apl_ops.run = hda_dsp_cl_boot_firmware; diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index f7068a7e2e81..ca648d2a9da7 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -662,6 +662,24 @@ void hda_ipc_dump(struct snd_sof_dev *sdev) hipcie, hipct, hipcctl); } +void hda_ipc4_dump(struct snd_sof_dev *sdev) +{ + u32 hipci, hipcie, hipct, hipcte, hipcctl; + + hda_ipc_irq_dump(sdev); + + hipci = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCI); + hipcie = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCIE); + hipct = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCT); + hipcte = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCTE); + hipcctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCCTL); + + /* dump the IPC regs */ + /* TODO: parse the raw msg */ + dev_err(sdev->dev, "Host IPC initiator: %#x|%#x, target: %#x|%#x, ctl: %#x\n", + hipci, hipcie, hipct, hipcte, hipcctl); +} + static int hda_init(struct snd_sof_dev *sdev) { struct hda_bus *hbus; diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index 2013a94020c6..c3a9f89b726d 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -851,6 +851,7 @@ irqreturn_t cnl_ipc4_irq_thread(int irq, void *context); int cnl_ipc4_send_msg(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg); irqreturn_t hda_dsp_ipc4_irq_thread(int irq, void *context); int hda_dsp_ipc4_send_msg(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg); +void hda_ipc4_dump(struct snd_sof_dev *sdev); extern struct sdw_intel_ops sdw_callback; #endif From patchwork Fri Sep 23 13:36:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 608601 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 F220DC6FA82 for ; Fri, 23 Sep 2022 13:37:41 +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 24B3F886; Fri, 23 Sep 2022 15:36:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 24B3F886 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663940260; bh=gPpwHxbPRFqh5h7ecA3eLrRwC/kVhAzYYbNSOQ7tHv0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rWNOa9LAn1QwCes0b1Tq6rqj6G6F0g/532oV8tF2AcqGW3uECboBBytA12TAN8jtE 5Fmff0Af8HqS5Pkit8O6fIvD+1oKS2h0haQdvOpKGwLJ6Dp8L4dbn2ewoydNi2lQ8e I08WSacrR2XS4CodzmqFjWavTrTD0FzBWCENhyKU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 21568F80124; Fri, 23 Sep 2022 15:36:26 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 96EF8F80549; Fri, 23 Sep 2022 15:36:24 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 62B39F80224 for ; Fri, 23 Sep 2022 15:36:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 62B39F80224 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Q13bDgRM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663940178; x=1695476178; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gPpwHxbPRFqh5h7ecA3eLrRwC/kVhAzYYbNSOQ7tHv0=; b=Q13bDgRMeJL/YtDngApvMRDBSiQKxxYFQU07CXR5uPd7FevHEeBqtgOe xgbl4VkMB6GXdHRy5rZqardtD+jIkb5+hVYFhkS2rVbuoDqNPxQMlhm6J OeulshOHgQ46AdDBAc5eIapW0uRqvuDXX/V6sK0BdgHv5B3SRSVjkn8ho h+D++uiMAXsxalY1SD9+qPXtxxxvKI4l1A4g2fTGIfBglDOGHprGakqQU 4eb7gcIWfFVhvSGX0fMMW6ZDzmsWG6k+20khadxOrlnx06nfh6MZibqPA SbmOeXcUQZEMVu4C4+kUvdXOVa9/Hn7KWn/x9Fy8xAGYcW5Y5Hcp36fqf g==; X-IronPort-AV: E=McAfee;i="6500,9779,10479"; a="300575624" X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="300575624" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 06:36:14 -0700 X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="571375304" Received: from acarr-mobl1.ger.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.252.3.209]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 06:36:12 -0700 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Subject: [PATCH 3/6] ASoC: SOF: Intel: skl: Use the ipc4 version of the ipc_dump Date: Fri, 23 Sep 2022 16:36:13 +0300 Message-Id: <20220923133616.26267-4-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220923133616.26267-1-peter.ujfalusi@linux.intel.com> References: <20220923133616.26267-1-peter.ujfalusi@linux.intel.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, rander.wang@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" The use of the IPC registers are different between IPC3 and IPC4. The ipc_dump needs to use different prints depending on the used IPC protocol. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Kai Vehmanen Reviewed-by: Rander Wang --- sound/soc/sof/intel/skl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/intel/skl.c b/sound/soc/sof/intel/skl.c index f05905e00368..eba166fe4d33 100644 --- a/sound/soc/sof/intel/skl.c +++ b/sound/soc/sof/intel/skl.c @@ -87,7 +87,7 @@ int sof_skl_ops_init(struct snd_sof_dev *sdev) /* debug */ sof_skl_ops.debug_map = skl_dsp_debugfs; sof_skl_ops.debug_map_count = ARRAY_SIZE(skl_dsp_debugfs); - sof_skl_ops.ipc_dump = hda_ipc_dump; + sof_skl_ops.ipc_dump = hda_ipc4_dump; /* firmware run */ sof_skl_ops.run = hda_dsp_cl_boot_firmware_skl; From patchwork Fri Sep 23 13:36:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 609158 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 5FC3FECAAD8 for ; Fri, 23 Sep 2022 13:38:07 +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 947A6201; Fri, 23 Sep 2022 15:37:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 947A6201 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663940285; bh=KZkC4MI6zo3Os+9Y5h4Sq/zaZ19Auz4Su68d8fx8AnA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=e8vuJKcW2ZXldpcUsHp7CX9uXEgf4JLXO8gZ1vLFc9EOiI2KKSv9boiv3cUw6JP8o 3xAxZpPexo5gJS4x4s7jogBd6GYz67PyiyfLlWj3ktIqjfeawiGglCOP/2OGXiMFDz lCoL7XeCNB2spkfykTzPYlLlVGMUibu9IYi7nY+E= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 956C6F80553; Fri, 23 Sep 2022 15:36:28 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2F7B7F80549; Fri, 23 Sep 2022 15:36:26 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 6589BF804E4 for ; Fri, 23 Sep 2022 15:36:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6589BF804E4 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MD4dYu2z" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663940178; x=1695476178; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KZkC4MI6zo3Os+9Y5h4Sq/zaZ19Auz4Su68d8fx8AnA=; b=MD4dYu2zpRAMkWxEWudgLu0XetqpVTY+vPHQtdTG9ms3ZHCIy9LBQJQ3 SRp85X5uHMtCi/eTdeYiegqH1a0U/kJVIPRTrIQpPOEri+Qxyn1K2o5PL WzW4S6H/Z96igsoMUID8jenqQYVGYVt24V7T5Hs3+uv1PQ3uZjQt1cxZs JywjTk+8ol3+5Af3wZ44GFpi5//epdMJWmVivDpS7zO2eWjrktQgV8J+o L4+wbqeNzv8Z28s1nVpstLnpSP5HurKQvV9rldK7xN6grkiy+PvoUPToq 6QX3XnrmfnJzgy5NhU05+MYiRDWnNY/9mlxVlaFoW1syKZ0ABJAeHrOdT A==; X-IronPort-AV: E=McAfee;i="6500,9779,10479"; a="300575627" X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="300575627" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 06:36:16 -0700 X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="571375315" Received: from acarr-mobl1.ger.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.252.3.209]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 06:36:14 -0700 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Subject: [PATCH 4/6] ASoC: SOF: Intel: mtl: Print relevant register in ipc_dump Date: Fri, 23 Sep 2022 16:36:14 +0300 Message-Id: <20220923133616.26267-5-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220923133616.26267-1-peter.ujfalusi@linux.intel.com> References: <20220923133616.26267-1-peter.ujfalusi@linux.intel.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, rander.wang@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" The use of the IPC registers are different between IPC3 and IPC4. The ipc_dump needs to use different prints depending on the used IPC protocol. The existing code was printing registers relevant for IPC3, which is not even supported on MTL. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Kai Vehmanen Reviewed-by: Rander Wang --- sound/soc/sof/intel/mtl.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sound/soc/sof/intel/mtl.c b/sound/soc/sof/intel/mtl.c index 5408c34b04ef..61bcaa1556f6 100644 --- a/sound/soc/sof/intel/mtl.c +++ b/sound/soc/sof/intel/mtl.c @@ -698,20 +698,19 @@ static int mtl_dsp_runtime_resume(struct snd_sof_dev *sdev) static void mtl_ipc_dump(struct snd_sof_dev *sdev) { - u32 hipcctl; - u32 hipcida; - u32 hipctdr; + u32 hipcidr, hipcidd, hipcida, hipctdr, hipctdd, hipctda, hipcctl; - /* read IPC status */ + hipcidr = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXIDR); + hipcidd = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXIDDY); hipcida = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXIDA); - hipcctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXCTL); hipctdr = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXTDR); + hipctdd = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXTDDY); + hipctda = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXTDA); + hipcctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP_REG_HFIPCXCTL); - /* dump the IPC regs */ - /* TODO: parse the raw msg */ dev_err(sdev->dev, - "error: host status 0x%8.8x dsp status 0x%8.8x mask 0x%8.8x\n", - hipcida, hipctdr, hipcctl); + "Host IPC initiator: %#x|%#x|%#x, target: %#x|%#x|%#x, ctl: %#x\n", + hipcidr, hipcidd, hipcida, hipctdr, hipctdd, hipctda, hipcctl); } /* Meteorlake ops */ From patchwork Fri Sep 23 13:36:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 608600 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 E8DE1C6FA82 for ; Fri, 23 Sep 2022 13:38:15 +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 20B43820; Fri, 23 Sep 2022 15:37:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 20B43820 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663940294; bh=xdbdpsk5UyKue9kmH3hrd4xI1x3OlgEGELc/EKBGydY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vpZUaTK+cDB3se6vKicr7+ImKym1bULw/W5wcs6EnQdksQV3ZF8i6z3ioizSV33Km 0xTyQcpZi6kkZecL/KtDsDhIDaHB7gQ9tgbSp8hnxbdi8hQQkzzjhPfT0rYQGDCLyu h7XCB47KhelyQIfHpaelgauZK66zpfaGd1J4q19Q= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 55A41F8055B; Fri, 23 Sep 2022 15:36:29 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 47D35F80431; Fri, 23 Sep 2022 15:36:26 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 AD0C4F80538 for ; Fri, 23 Sep 2022 15:36:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AD0C4F80538 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="IuPCpMcg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663940180; x=1695476180; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xdbdpsk5UyKue9kmH3hrd4xI1x3OlgEGELc/EKBGydY=; b=IuPCpMcgp+jFQk8oVlSuKtdJe5AzzKca2Dtc+Ydj2BLOwWEsbXoYrJrz cr/wXpnWibbEhi9vXnMjgiAjtEHTtc8ktF8i1T5lm69GyKIJIOLK4fmEL mKYF4+HjUbGbcTPXf4xbSdXLPbXotuYOscnUqf+cLERgRU8BgD58l0Puo cI3TGotcAI8+3Q3AaMY8rtx83+2B4IlMQ90gXhJ9M2oyuOHYfltKY27GI jj7yniRFel7HM04Q8JPjom/zpu9d83dALAmcL5soDD8r26U82GhV0AXCH RIkiZhrJIAOsiyFZdeD6VvPg3BdW9mxjzgBeJC9xMFkWxx22nQlFAo/a0 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10479"; a="300575632" X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="300575632" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 06:36:19 -0700 X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="571375328" Received: from acarr-mobl1.ger.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.252.3.209]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 06:36:17 -0700 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Subject: [PATCH 5/6] ASoC: SOF: Intel: hda: Only dump firmware registers for IPC3 Date: Fri, 23 Sep 2022 16:36:15 +0300 Message-Id: <20220923133616.26267-6-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220923133616.26267-1-peter.ujfalusi@linux.intel.com> References: <20220923133616.26267-1-peter.ujfalusi@linux.intel.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, rander.wang@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" The firmware register dump is IPC3 specific, it is not available for other IPC versions. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Kai Vehmanen Reviewed-by: Rander Wang --- sound/soc/sof/intel/hda.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index ca648d2a9da7..e00062f3b21c 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -598,7 +598,8 @@ void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags) /* print ROM/FW status */ hda_dsp_get_state(sdev, level); - if (flags & SOF_DBG_DUMP_REGS) { + /* The firmware register dump only available with IPC3 */ + if (flags & SOF_DBG_DUMP_REGS && sdev->pdata->ipc_type == SOF_IPC) { u32 status = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_SRAM_REG_FW_STATUS); u32 panic = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_SRAM_REG_FW_TRACEP); From patchwork Fri Sep 23 13:36:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 609157 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 CFFF1C6FA82 for ; Fri, 23 Sep 2022 13:38:33 +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 09552E0F; Fri, 23 Sep 2022 15:37:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 09552E0F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663940312; bh=66D35Ue/4cPcp224E03ZAKNGYbtBq6D921MmLBu9344=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=pv6V3oyleYWoemAUOhzzKZ1UjuVkB/NFosNvc76mXBY+8sIHUojQV4JdlLym2N9wb sa+rjfHW9apY/ZqpRldWW9awwuZrHE6MigXeuxygOPrDMtbBcoEtIYKFPJ8MRNrhLT LztOAPxHsUdBY7Zp50B7R6p2pzFKO2M9ip10Oby8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D0990F8055C; Fri, 23 Sep 2022 15:36:30 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B0864F80566; Fri, 23 Sep 2022 15:36:29 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 1A557F80542 for ; Fri, 23 Sep 2022 15:36:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1A557F80542 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="USbxS3R4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663940183; x=1695476183; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=66D35Ue/4cPcp224E03ZAKNGYbtBq6D921MmLBu9344=; b=USbxS3R42MHr5wS0zn2D5nzBM8xkt4Ldp6FH2sOIN2iAqgVxEabB0Sk2 sYfARcjK/V9hQNIySKCxNpuw6QnUYmV6t3Yx3Z0+HZGvb0SrUkGFfwlgT X4uDU3+kiyvGEe0hfCDCsCkj7yyZDWmsxm+YAsQDcEwTDypyFmCq8Tv4r JRpvoO5SMkt/BuhPJI3++UG8nRaJjlRxTwwiQvFfQoQ1/S42Qghsa4pel mgo5ETpbwwWMaQQy4LWhz8unwZN/XYu3x93o0mlpBtjg0Tnk1tEIi1FG1 b1DMyKClmvI25nQe+bF/z2T7QIoEiQIkvKIlMd8dfVxcNhLUKiNU6fK7T A==; X-IronPort-AV: E=McAfee;i="6500,9779,10479"; a="300575655" X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="300575655" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 06:36:21 -0700 X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="571375333" Received: from acarr-mobl1.ger.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.252.3.209]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 06:36:19 -0700 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Subject: [PATCH 6/6] ASoC: SOF: ipc4: Call snd_sof_handle_fw_exception() in case of timeout Date: Fri, 23 Sep 2022 16:36:16 +0300 Message-Id: <20220923133616.26267-7-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220923133616.26267-1-peter.ujfalusi@linux.intel.com> References: <20220923133616.26267-1-peter.ujfalusi@linux.intel.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, rander.wang@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 can help debugging IPC timeout issues (like we do with IPC3) if we dump the IPC and DSP information. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Kai Vehmanen Reviewed-by: Rander Wang --- sound/soc/sof/ipc4.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/sof/ipc4.c b/sound/soc/sof/ipc4.c index 0d830020556d..6eaa18e27e5a 100644 --- a/sound/soc/sof/ipc4.c +++ b/sound/soc/sof/ipc4.c @@ -295,6 +295,7 @@ static int ipc4_wait_tx_done(struct snd_sof_ipc *ipc, void *reply_data) if (ret == 0) { dev_err(sdev->dev, "ipc timed out for %#x|%#x\n", ipc4_msg->primary, ipc4_msg->extension); + snd_sof_handle_fw_exception(ipc->sdev, "IPC timeout"); return -ETIMEDOUT; }