0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef __SOUND_SOC_SOF_IPC3_PRIV_H
0010 #define __SOUND_SOC_SOF_IPC3_PRIV_H
0011
0012 #include "sof-priv.h"
0013
0014
0015 extern const struct sof_ipc_pcm_ops ipc3_pcm_ops;
0016 extern const struct sof_ipc_tplg_ops ipc3_tplg_ops;
0017 extern const struct sof_ipc_tplg_control_ops tplg_ipc3_control_ops;
0018 extern const struct sof_ipc_fw_loader_ops ipc3_loader_ops;
0019 extern const struct sof_ipc_fw_tracing_ops ipc3_dtrace_ops;
0020
0021
0022 int sof_ipc3_get_ext_windows(struct snd_sof_dev *sdev,
0023 const struct sof_ipc_ext_data_hdr *ext_hdr);
0024 int sof_ipc3_get_cc_info(struct snd_sof_dev *sdev,
0025 const struct sof_ipc_ext_data_hdr *ext_hdr);
0026 int sof_ipc3_validate_fw_version(struct snd_sof_dev *sdev);
0027
0028
0029 int ipc3_dtrace_posn_update(struct snd_sof_dev *sdev,
0030 struct sof_ipc_dma_trace_posn *posn);
0031
0032
0033 static inline int sof_dtrace_host_init(struct snd_sof_dev *sdev,
0034 struct snd_dma_buffer *dmatb,
0035 struct sof_ipc_dma_trace_params_ext *dtrace_params)
0036 {
0037 struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops;
0038
0039 if (dsp_ops->trace_init)
0040 return dsp_ops->trace_init(sdev, dmatb, dtrace_params);
0041
0042 return 0;
0043 }
0044
0045 static inline int sof_dtrace_host_release(struct snd_sof_dev *sdev)
0046 {
0047 struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops;
0048
0049 if (dsp_ops->trace_release)
0050 return dsp_ops->trace_release(sdev);
0051
0052 return 0;
0053 }
0054
0055 static inline int sof_dtrace_host_trigger(struct snd_sof_dev *sdev, int cmd)
0056 {
0057 struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops;
0058
0059 if (dsp_ops->trace_trigger)
0060 return dsp_ops->trace_trigger(sdev, cmd);
0061
0062 return 0;
0063 }
0064
0065 #endif