diff options
author | Daniel Baluta <daniel.baluta@nxp.com> | 2023-01-17 15:25:30 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-01-17 16:37:51 +0300 |
commit | 1b905942d6cd182b7ef14e9f095178376d3847e6 (patch) | |
tree | 72e3b01f3b18449a4ebdfd1683f5f31b373b6c09 /sound/soc/sof/intel | |
parent | 738455858a2d21b769f673892546cf8300c9fd78 (diff) | |
download | linux-1b905942d6cd182b7ef14e9f095178376d3847e6.tar.xz |
ASoC: SOF: Prepare ipc_msg_data to be used with compress API
Make second parameter of ipc_msg_data generic
in order to be able to support compressed streams.
This patch doesn't hold any functional change.
With this case we can use ipc_msg_data, to retrieve information from
DSP for both PCM/Compress API.
Reviewed-by: Paul Olaru <paul.olaru@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20230117122533.201708-2-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel')
-rw-r--r-- | sound/soc/sof/intel/hda-ipc.c | 5 | ||||
-rw-r--r-- | sound/soc/sof/intel/hda.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/sof/intel/hda-ipc.c b/sound/soc/sof/intel/hda-ipc.c index a7c454e03952..5705279d0707 100644 --- a/sound/soc/sof/intel/hda-ipc.c +++ b/sound/soc/sof/intel/hda-ipc.c @@ -361,12 +361,13 @@ int hda_dsp_ipc_get_window_offset(struct snd_sof_dev *sdev, u32 id) } int hda_ipc_msg_data(struct snd_sof_dev *sdev, - struct snd_pcm_substream *substream, + struct snd_sof_pcm_stream *sps, void *p, size_t sz) { - if (!substream || !sdev->stream_box.size) { + if (!sps || !sdev->stream_box.size) { sof_mailbox_read(sdev, sdev->dsp_box.offset, p, sz); } else { + struct snd_pcm_substream *substream = sps->substream; struct hdac_stream *hstream = substream->runtime->private_data; struct sof_intel_hda_stream *hda_stream; diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index caccaf8fba9c..e6f1ff591332 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -656,7 +656,7 @@ int hda_dsp_stream_spib_config(struct snd_sof_dev *sdev, int enable, u32 size); int hda_ipc_msg_data(struct snd_sof_dev *sdev, - struct snd_pcm_substream *substream, + struct snd_sof_pcm_stream *sps, void *p, size_t sz); int hda_set_stream_data_offset(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, |