mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
ASoC: SOF: ipc4: Add sof_ipc4_pipeline_state_str() for debugging
Add sof_ipc4_pipeline_state_str() to translate enum sof_ipc4_pipeline_state into human readable form. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/20250619121121.25241-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
d9f38d9824
commit
ecd41e0e25
|
|
@ -123,4 +123,7 @@ size_t sof_ipc4_find_debug_slot_offset_by_type(struct snd_sof_dev *sdev,
|
|||
|
||||
void sof_ipc4_mic_privacy_state_change(struct snd_sof_dev *sdev, bool state);
|
||||
|
||||
enum sof_ipc4_pipeline_state;
|
||||
const char *sof_ipc4_pipeline_state_str(enum sof_ipc4_pipeline_state state);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user