Commit 116bc150 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: SOF: ipc4-topology: introduce DMA config TLV

Starting with LunarLake, the DMIC/SSP/SoundWire audio interfaces will
use the HDaudio DMA. This patch adds the DMA configuration structure
to be passed as a TLV appended at the end of each gateway
configuration.

This patch only provides the definitions for now, the TLV will be
added in the actual blobs separately for each interface.
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230602205620.310879-7-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent e186e1f2
......@@ -242,6 +242,44 @@ struct sof_ipc4_dma_stream_ch_map {
struct sof_ipc4_dma_device_stream_ch_map mapping[SOF_IPC4_DMA_DEVICE_MAX_COUNT];
} __packed;
#define SOF_IPC4_DMA_METHOD_HDA 1
#define SOF_IPC4_DMA_METHOD_GPDMA 2 /* defined for consistency but not used */
/**
* struct sof_ipc4_dma_config: DMA configuration
* @dma_method: HDAudio or GPDMA
* @pre_allocated_by_host: 1 if host driver allocates DMA channels, 0 otherwise
* @dma_channel_id: for HDaudio defined as @stream_id - 1
* @stream_id: HDaudio stream tag
* @dma_stream_channel_map: array of device/channel mappings
* @dma_priv_config_size: currently not used
* @dma_priv_config: currently not used
*/
struct sof_ipc4_dma_config {
uint8_t dma_method;
uint8_t pre_allocated_by_host;
uint16_t rsvd;
uint32_t dma_channel_id;
uint32_t stream_id;
struct sof_ipc4_dma_stream_ch_map dma_stream_channel_map;
uint32_t dma_priv_config_size;
uint8_t dma_priv_config[];
} __packed;
#define SOF_IPC4_GTW_DMA_CONFIG_ID 0x1000
/**
* struct sof_ipc4_dma_config: DMA configuration
* @type: set to SOF_IPC4_GTW_DMA_CONFIG_ID
* @length: sizeof(struct sof_ipc4_dma_config) + dma_config.dma_priv_config_size
* @dma_config: actual DMA configuration
*/
struct sof_ipc4_dma_config_tlv {
uint32_t type;
uint32_t length;
struct sof_ipc4_dma_config dma_config;
} __packed;
/** struct sof_ipc4_alh_configuration_blob: ALH blob
* @gw_attr: Gateway attributes
* @alh_cfg: ALH configuration data
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment