LF-3665-2 ASoC: SOF: Refactor ipc_msg_data to prepare for compress API
authorDaniel Baluta <daniel.baluta@nxp.com>
Mon, 18 Jan 2021 13:46:31 +0000 (15:46 +0200)
committerDaniel Baluta <daniel.baluta@nxp.com>
Wed, 28 Apr 2021 12:27:52 +0000 (15:27 +0300)
commitdc33c8e1ff4a0d0b5be0d0643b4dce22f1f95b31
tree0fda7f9cd278df051e85e34d94a773a5553c9eb2
parent2318f37545dc9dee0d2f24d02b99f6dd856ce017
LF-3665-2 ASoC: SOF: Refactor ipc_msg_data to prepare for 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.

snd_sof_pcm_stream holds the information for a PCM stream like:
* page_table buffer for sharing data with the DSP
* snd_pcm_substream
* workqueue for handling period elapsed notifications.

Most of these fields are also useful for compress implementation. So,
snd_sof_pcm_stream will be extended to be used for compress
implementation.

First step, is to make ipc_msg_data parameters more generic:

       void (*ipc_msg_data)(struct snd_sof_dev *sdev,
-                            struct snd_pcm_substream *substream,
+                            struct snd_sof_pcm_stream *sps,
                             void *p, size_t sz); /* mandatory */

With this case we can use ipc_msg_data, to retrieve information from DSP
for both PCM/Compress API.

Note:
     - snd_sof_pcm_stream, will be updated with a new member of type
       snd_compr_stream to account for Compress streams.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
sound/soc/sof/imx/imx8.c
sound/soc/sof/imx/imx8m.c
sound/soc/sof/intel/hda-ipc.c
sound/soc/sof/intel/hda.h
sound/soc/sof/intel/intel-ipc.c
sound/soc/sof/ipc.c
sound/soc/sof/ops.h
sound/soc/sof/sof-priv.h