summaryrefslogtreecommitdiff
path: root/sound/soc/sof/ipc.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2022-05-16 13:47:07 +0300
committerMark Brown <broonie@kernel.org>2022-05-19 16:44:15 +0100
commit1dedbe4f223cac603e871d91133b9aa3136fbc21 (patch)
tree3a4a4afd1f6064754cc486768307aecd5302de71 /sound/soc/sof/ipc.c
parent671e0b90051ec19e83c12501905734fb808b944e (diff)
ASoC: SOF: Switch to IPC generic firmware tracing
Introduce new, generic API for firmware tracing with sof_fw_trace_ prefix and switch to use it. At the same time the old IPC3 code can be dropped from trace.c, which is now a generic wrapper for the firmware tracing ops. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220516104711.26115-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/ipc.c')
-rw-r--r--sound/soc/sof/ipc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c
index 41f3a217be5d..c5aef5fc056b 100644
--- a/sound/soc/sof/ipc.c
+++ b/sound/soc/sof/ipc.c
@@ -184,6 +184,12 @@ struct snd_sof_ipc *snd_sof_ipc_init(struct snd_sof_dev *sdev)
return NULL;
}
+ if (ops->fw_tracing && (!ops->fw_tracing->init || !ops->fw_tracing->suspend ||
+ !ops->fw_tracing->resume)) {
+ dev_err(sdev->dev, "Missing firmware tracing ops\n");
+ return NULL;
+ }
+
return ipc;
}
EXPORT_SYMBOL(snd_sof_ipc_init);