summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2022-05-16 13:47:04 +0300
committerMark Brown <broonie@kernel.org>2022-05-19 16:44:11 +0100
commit0cfbaee21fcbf131f02c475dbc15f8a18ee621bc (patch)
treed60a4d768fb9348dbc40d8ed6ab1a33d1c4cb10c /sound
parentec432e2a51412bde3d2d9fa785d3812f55ccd696 (diff)
downloadlinux-0cfbaee21fcbf131f02c475dbc15f8a18ee621bc.tar.bz2
ASoC: SOF: Introduce IPC independent ops for firmware tracing support
The current (dma-)trace is only supported with IPC3, it is not available when IPC4 is used. 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-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/sof/sof-priv.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h
index 8ea196305e4b..a7ffb6ecf332 100644
--- a/sound/soc/sof/sof-priv.h
+++ b/sound/soc/sof/sof-priv.h
@@ -358,6 +358,22 @@ struct snd_sof_ipc_msg {
};
/**
+ * struct sof_ipc_fw_tracing_ops - IPC-specific firmware tracing ops
+ * @init: Function pointer for initialization of the tracing
+ * @free: Optional function pointer for freeing of the tracing
+ * @fw_crashed: Optional function pointer to notify the tracing of a firmware crash
+ * @suspend: Function pointer for system/runtime suspend
+ * @resume: Function pointer for system/runtime resume
+ */
+struct sof_ipc_fw_tracing_ops {
+ int (*init)(struct snd_sof_dev *sdev);
+ void (*free)(struct snd_sof_dev *sdev);
+ void (*fw_crashed)(struct snd_sof_dev *sdev);
+ void (*suspend)(struct snd_sof_dev *sdev, pm_message_t pm_state);
+ int (*resume)(struct snd_sof_dev *sdev);
+};
+
+/**
* struct sof_ipc_pm_ops - IPC-specific PM ops
* @ctx_save: Function pointer for context save
* @ctx_restore: Function pointer for context restore
@@ -395,6 +411,7 @@ struct sof_ipc_pcm_ops;
* @pm: Pointer to PM ops
* @pcm: Pointer to PCM ops
* @fw_loader: Pointer to Firmware Loader ops
+ * @fw_tracing: Pointer to Firmware tracing ops
*
* @tx_msg: Function pointer for sending a 'short' IPC message
* @set_get_data: Function pointer for set/get data ('large' IPC message). This
@@ -415,6 +432,7 @@ struct sof_ipc_ops {
const struct sof_ipc_pm_ops *pm;
const struct sof_ipc_pcm_ops *pcm;
const struct sof_ipc_fw_loader_ops *fw_loader;
+ const struct sof_ipc_fw_tracing_ops *fw_tracing;
int (*tx_msg)(struct snd_sof_dev *sdev, void *msg_data, size_t msg_bytes,
void *reply_data, size_t reply_bytes, bool no_pm);