Skip to content

Commit e91495b

Browse files
ujfalusiplbossart
authored andcommitted
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>
1 parent 82cd5d0 commit e91495b

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

sound/soc/sof/sof-priv.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,22 @@ struct snd_sof_ipc_msg {
358358
bool ipc_complete;
359359
};
360360

361+
/**
362+
* struct sof_ipc_fw_tracing_ops - IPC-specific firmware tracing ops
363+
* @init: Function pointer for initialization of the tracing
364+
* @free: Optional function pointer for freeing of the tracing
365+
* @fw_crashed: Optional function pointer to notify the tracing of a firmware crash
366+
* @suspend: Function pointer for system/runtime suspend
367+
* @resume: Function pointer for system/runtime resume
368+
*/
369+
struct sof_ipc_fw_tracing_ops {
370+
int (*init)(struct snd_sof_dev *sdev);
371+
void (*free)(struct snd_sof_dev *sdev);
372+
void (*fw_crashed)(struct snd_sof_dev *sdev);
373+
void (*suspend)(struct snd_sof_dev *sdev, pm_message_t pm_state);
374+
int (*resume)(struct snd_sof_dev *sdev);
375+
};
376+
361377
/**
362378
* struct sof_ipc_pm_ops - IPC-specific PM ops
363379
* @ctx_save: Function pointer for context save
@@ -396,6 +412,7 @@ struct sof_ipc_pcm_ops;
396412
* @pm: Pointer to PM ops
397413
* @pcm: Pointer to PCM ops
398414
* @fw_loader: Pointer to Firmware Loader ops
415+
* @fw_tracing: Pointer to Firmware tracing ops
399416
*
400417
* @tx_msg: Function pointer for sending a 'short' IPC message
401418
* @set_get_data: Function pointer for set/get data ('large' IPC message). This
@@ -416,6 +433,7 @@ struct sof_ipc_ops {
416433
const struct sof_ipc_pm_ops *pm;
417434
const struct sof_ipc_pcm_ops *pcm;
418435
const struct sof_ipc_fw_loader_ops *fw_loader;
436+
const struct sof_ipc_fw_tracing_ops *fw_tracing;
419437

420438
int (*tx_msg)(struct snd_sof_dev *sdev, void *msg_data, size_t msg_bytes,
421439
void *reply_data, size_t reply_bytes, bool no_pm);

0 commit comments

Comments
 (0)