diff mbox series

[9/9] ASoC: SOF: ipc4: handle EXCEPTION_CAUGHT notification from firmware

Message ID 20230919092416.4137-10-peter.ujfalusi@linux.intel.com (mailing list archive)
State Accepted
Commit c1c48fd6bbe788458e3685fea74bdb3cb148ff93
Headers show
Series ASoC: SOF: ipc4/Intel: Support for firmware exception handling | expand

Commit Message

Peter Ujfalusi Sept. 19, 2023, 9:24 a.m. UTC
From: Rander Wang <rander.wang@intel.com>

Driver will receive exception IPC message and process it by
snd_sof_dsp_panic.

Signed-off-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
---
 sound/soc/sof/ipc4.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/sound/soc/sof/ipc4.c b/sound/soc/sof/ipc4.c
index 82f2f196c9c2..3f4d57dba972 100644
--- a/sound/soc/sof/ipc4.c
+++ b/sound/soc/sof/ipc4.c
@@ -645,6 +645,9 @@  static void sof_ipc4_rx_msg(struct snd_sof_dev *sdev)
 	case SOF_IPC4_NOTIFY_LOG_BUFFER_STATUS:
 		sof_ipc4_mtrace_update_pos(sdev, SOF_IPC4_LOG_CORE_GET(ipc4_msg->primary));
 		break;
+	case SOF_IPC4_NOTIFY_EXCEPTION_CAUGHT:
+		snd_sof_dsp_panic(sdev, 0, true);
+		break;
 	default:
 		dev_dbg(sdev->dev, "Unhandled DSP message: %#x|%#x\n",
 			ipc4_msg->primary, ipc4_msg->extension);