ASoC: SOF: ipc4: store number of playback/capture streams
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tue, 13 Feb 2024 10:12:37 +0000 (12:12 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 13 Feb 2024 13:28:55 +0000 (13:28 +0000)
commit426476344f01096c7dae6c5413cc8a8d9bbdea29
tree31c2d8b906a7419d9006504f88a77707e13024d0
parenta5b7767723e739c700f5c56841790a85bd7f13ae
ASoC: SOF: ipc4: store number of playback/capture streams

The CHAIN_DMA IPC needs the number of playback streams as a start
offset for the dma_id of a capture stream.

This offset can be retrieved on Intel platforms from the GCAP
information, and stored in the sof_ipc4_fw_data structure.

One could argue that the fields added are not really dependent on any
firmware definitions but rather on hardware capabilities, but they are
required for the IPC CHAIN_DMA definitions so adding them in
ipc4_fw_data isn't completely silly.

The CHAIN_DMA IPC is currently only functional on Intel HDaudio DMAs,
and gated by the snd_sof_is_chain_dma_supported() helper.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://msgid.link/r/20240213101247.28887-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-stream.c
sound/soc/sof/ipc4-priv.h