ASoC: SOF: ipc4/intel: Add support for chained DMA
authorJyri Sarha <jyri.sarha@intel.com>
Tue, 21 Mar 2023 09:26:54 +0000 (11:26 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 21 Mar 2023 12:13:31 +0000 (12:13 +0000)
commitca5ce0caa67fa9eeecaa29d895c2e4c3151c159e
tree79cf6da268ed8a2a3e8b48c77406586eab4645b8
parentcb3cdef33136baceada86ba2a21ba30cd53a9087
ASoC: SOF: ipc4/intel: Add support for chained DMA

Add logic for setting up and tearing down chained DMA connections.

Since pipelines are not used, all the logic to set the pipeline states
can be bypassed, with only the DMA programming sequences remaining. In
addition the same format needs to be used for host- and link-DMA,
without the usual fixup to use the S32_LE format on the link.

Note however that for convenience and compatibility with existing
definitions, the topology relies on the concept of pipelines with a
'USE_CHAIN_DMA' token indicating that all the logic shall be bypassed.

Unlike 'normal' ALSA sequences, the chain DMA is not programmed in
hw_params/hw_free. The IPC message to set-up and tear-down chained DMA
are sent in sof_ipc4_trigger_pipelines(), but the contents prepared
earlier.

Chained DMA is only supported by the Intel HDA DAI for now, and only
S16_LE and S32_LE formats are supported for now.

Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230321092654.7292-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/uapi/sound/sof/tokens.h
sound/soc/sof/intel/hda-dai-ops.c
sound/soc/sof/ipc4-pcm.c
sound/soc/sof/ipc4-topology.c
sound/soc/sof/ipc4-topology.h