summaryrefslogtreecommitdiff
path: root/sound/soc/sof/ipc4.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2025-06-20 11:33:05 +0100
committerMark Brown <broonie@kernel.org>2025-06-20 11:33:05 +0100
commitf186a1a985d349f59ab67af36dfacd2f28d2540a (patch)
treec53caeb67be41c73d65d154a09bbfc804bb313c7 /sound/soc/sof/ipc4.c
parent07651feeeefbc65e6dae4fbb6fc8d8c785bea574 (diff)
parent2756b7f08ff6ca7c68c8c7dd61c8dc6895c9de34 (diff)
ASoC: SOF: ipc4-pcm: Harmonize set pipeline state dbg
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: The series harmonizes the debug prints for pipeline state changes. Currently we only print readable state change for single pipeline changes but when multiple pipeline's state is changed, it is omitted. Use human readable information in both cases in a harmonized way to aid debugging.
Diffstat (limited to 'sound/soc/sof/ipc4.c')
-rw-r--r--sound/soc/sof/ipc4.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/sound/soc/sof/ipc4.c b/sound/soc/sof/ipc4.c
index 0ba0e8e615ae..a4a090e6724a 100644
--- a/sound/soc/sof/ipc4.c
+++ b/sound/soc/sof/ipc4.c
@@ -237,6 +237,26 @@ static void sof_ipc4_log_header(struct device *dev, u8 *text, struct sof_ipc4_ms
msg->extension, str);
}
}
+
+const char *sof_ipc4_pipeline_state_str(enum sof_ipc4_pipeline_state state)
+{
+ switch (state) {
+ case SOF_IPC4_PIPE_INVALID_STATE:
+ return " (INVALID_STATE)";
+ case SOF_IPC4_PIPE_UNINITIALIZED:
+ return " (UNINITIALIZED)";
+ case SOF_IPC4_PIPE_RESET:
+ return " (RESET)";
+ case SOF_IPC4_PIPE_PAUSED:
+ return " (PAUSED)";
+ case SOF_IPC4_PIPE_RUNNING:
+ return " (RUNNING)";
+ case SOF_IPC4_PIPE_EOS:
+ return " (EOS)";
+ default:
+ return " (<unknown>)";
+ }
+}
#else /* CONFIG_SND_SOC_SOF_DEBUG_VERBOSE_IPC */
static void sof_ipc4_log_header(struct device *dev, u8 *text, struct sof_ipc4_msg *msg,
bool data_size_valid)
@@ -254,6 +274,11 @@ static void sof_ipc4_log_header(struct device *dev, u8 *text, struct sof_ipc4_ms
else
dev_dbg(dev, "%s: %#x|%#x\n", text, msg->primary, msg->extension);
}
+
+const char *sof_ipc4_pipeline_state_str(enum sof_ipc4_pipeline_state state)
+{
+ return "";
+}
#endif
static void sof_ipc4_dump_payload(struct snd_sof_dev *sdev,