summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel/hda.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-02-08 18:58:10 +0000
committerMark Brown <broonie@kernel.org>2022-02-08 18:58:10 +0000
commit960a89045e146025f019647d3305b7eeddde68c6 (patch)
tree1b4480b834232f8ba78e97ccbc87a85ad0f3d6d9 /sound/soc/sof/intel/hda.h
parentdcc2c012c76913a7e95025f9b000a3eeddc9dc50 (diff)
parentbab05b508ebfde32a14880696a13820d54510fcb (diff)
downloadlwn-960a89045e146025f019647d3305b7eeddde68c6.tar.gz
lwn-960a89045e146025f019647d3305b7eeddde68c6.zip
ASoC: SOF: dma-trace: Change trace_init() ops parameter list
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: Hi, the DMA trace implementation on AMD platform assumes that the stream_tag pointer is pointing the stream_tag member of struct sof_ipc_dma_trace_params_ext, which is true at the moment, but it can not be guarantied and a change in the dtrace core can cause out of bound accesses for AMD. For this reason, change the API to pass the struct itself which will remove the assumption and makes it clear from both sides what is expected to be sent via the parameter list. This opens up a window to clean up the intel and AMD implementation at the same time. Regards, Peter --- Peter Ujfalusi (2): ASoC: SOF: intel: hda-trace: Pass the dma buffer pointer to hda_dsp_trace_prepare ASoC: SOF: dma-trace: Pass pointer to params_ext struct in trace_init() sound/soc/sof/amd/acp-trace.c | 38 ++++++++------------------------- sound/soc/sof/amd/acp.h | 3 ++- sound/soc/sof/intel/hda-trace.c | 17 ++++++++------- sound/soc/sof/intel/hda.h | 3 ++- sound/soc/sof/ops.h | 4 ++-- sound/soc/sof/sof-priv.h | 2 +- sound/soc/sof/trace.c | 2 +- 7 files changed, 26 insertions(+), 43 deletions(-) -- 2.35.0
Diffstat (limited to 'sound/soc/sof/intel/hda.h')
-rw-r--r--sound/soc/sof/intel/hda.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h
index 7838a998ea95..2390561906dd 100644
--- a/sound/soc/sof/intel/hda.h
+++ b/sound/soc/sof/intel/hda.h
@@ -670,7 +670,8 @@ static inline int hda_codec_i915_exit(struct snd_sof_dev *sdev) { return 0; }
/*
* Trace Control.
*/
-int hda_dsp_trace_init(struct snd_sof_dev *sdev, u32 *stream_tag);
+int hda_dsp_trace_init(struct snd_sof_dev *sdev,
+ struct sof_ipc_dma_trace_params_ext *dtrace_params);
int hda_dsp_trace_release(struct snd_sof_dev *sdev);
int hda_dsp_trace_trigger(struct snd_sof_dev *sdev, int cmd);