From: Noah Klayman Date: Mon, 19 Sep 2022 12:21:08 +0000 (+0200) Subject: ASoC: SOF: replace ipc4-loader dev_vdbg with tracepoints X-Git-Tag: v6.1-rc5~4^2~17^2~81^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=794cd3bd69315f724532e35fbc1c45dfad9a79e6;p=platform%2Fkernel%2Flinux-starfive.git ASoC: SOF: replace ipc4-loader dev_vdbg with tracepoints This patch replaces dev_vdbg with tracepoints in new ipc4-loader code. Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Noah Klayman Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220919122108.43764-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/include/trace/events/sof.h b/include/trace/events/sof.h index 0375132..21c2a1e 100644 --- a/include/trace/events/sof.h +++ b/include/trace/events/sof.h @@ -98,6 +98,23 @@ TRACE_EVENT(sof_stream_position_ipc_rx, TP_printk("device_name=%s", __get_str(device_name)) ); +TRACE_EVENT(sof_ipc4_fw_config, + TP_PROTO(struct snd_sof_dev *sdev, char *key, u32 value), + TP_ARGS(sdev, key, value), + TP_STRUCT__entry( + __string(device_name, dev_name(sdev->dev)) + __string(key, key) + __field(u32, value) + ), + TP_fast_assign( + __assign_str(device_name, dev_name(sdev->dev)); + __assign_str(key, key); + __entry->value = value; + ), + TP_printk("device_name=%s key=%s value=%d", + __get_str(device_name), __get_str(key), __entry->value) +); + #endif /* _TRACE_SOF_H */ /* This part must be outside protection */ diff --git a/sound/soc/sof/ipc4-loader.c b/sound/soc/sof/ipc4-loader.c index c678f05..e635ae5 100644 --- a/sound/soc/sof/ipc4-loader.c +++ b/sound/soc/sof/ipc4-loader.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "ipc4-priv.h" #include "sof-audio.h" #include "sof-priv.h" @@ -194,13 +195,13 @@ static int sof_ipc4_query_fw_configuration(struct snd_sof_dev *sdev) fw_ver->build); break; case SOF_IPC4_FW_CFG_DL_MAILBOX_BYTES: - dev_vdbg(sdev->dev, "DL mailbox size: %u\n", *tuple->value); + trace_sof_ipc4_fw_config(sdev, "DL mailbox size", *tuple->value); break; case SOF_IPC4_FW_CFG_UL_MAILBOX_BYTES: - dev_vdbg(sdev->dev, "UL mailbox size: %u\n", *tuple->value); + trace_sof_ipc4_fw_config(sdev, "UL mailbox size", *tuple->value); break; case SOF_IPC4_FW_CFG_TRACE_LOG_BYTES: - dev_vdbg(sdev->dev, "Trace log size: %u\n", *tuple->value); + trace_sof_ipc4_fw_config(sdev, "Trace log size", *tuple->value); ipc4_data->mtrace_log_bytes = *tuple->value; break; default: