Skip to content

Commit b6cdc75

Browse files
iganakovkv2019i
authored andcommitted
ipc4: add host_dma_config array
Add host_dma_config array to be able to keep multiple DMA tlv pointers. This change is needed to enable SNDW FW aggregation using HD-A DMA on LNL Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
1 parent ec90f1f commit b6cdc75

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/include/sof/audio/ipc-config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ struct ipc_config_dai {
7575
uint32_t feature_mask; /**< copier feature mask (set directly from
7676
* ipc4_copier_module_cfg on init)
7777
*/
78-
struct ipc_dma_config *host_dma_config; /**< DMA config - required for ACE 2.0 and newer */
78+
/**< DMA configs - required for ACE 2.0 and newer */
79+
struct ipc_dma_config *host_dma_config[GTW_DMA_DEVICE_MAX_COUNT];
7980
const struct ipc4_audio_format *out_fmt;/**< audio format for output pin 0 - required
8081
* for ACE 2.0 and newer
8182
*/

src/include/sof/ipc/topology.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ int ipc4_pipeline_complete(struct ipc *ipc, uint32_t comp_id, uint32_t cmd);
6060
int ipc4_find_dma_config(struct ipc_config_dai *dai, uint8_t *data_buffer, uint32_t size);
6161
int ipc4_pipeline_prepare(struct ipc_comp_dev *ppl_icd, uint32_t cmd);
6262
int ipc4_pipeline_trigger(struct ipc_comp_dev *ppl_icd, uint32_t cmd, bool *delayed);
63-
6463
#else
6564
#error "No or invalid IPC MAJOR version selected."
6665
#endif

src/ipc/ipc4/dai.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void dai_set_link_hda_config(uint16_t *link_config,
4444
case SOF_DAI_INTEL_SSP:
4545
link_cfg.full = 0;
4646
link_cfg.part.dir = common_config->direction;
47-
link_cfg.part.stream = common_config->host_dma_config->stream_id;
47+
link_cfg.part.stream = common_config->host_dma_config[0]->stream_id;
4848
break;
4949
case SOF_DAI_INTEL_DMIC:
5050
link_cfg.full = 0;
@@ -57,7 +57,7 @@ void dai_set_link_hda_config(uint16_t *link_config,
5757
} else {
5858
link_cfg.part.hchan = out_fmt->channels_count - 1;
5959
}
60-
link_cfg.part.stream = common_config->host_dma_config->stream_id;
60+
link_cfg.part.stream = common_config->host_dma_config[0]->stream_id;
6161
break;
6262
default:
6363
/* other types of DAIs not need link_config */
@@ -79,8 +79,8 @@ int dai_config_dma_channel(struct dai_data *dd, struct comp_dev *dev, const void
7979
case SOF_DAI_INTEL_DMIC:
8080
channel = 0;
8181
#if defined(CONFIG_ACE_VERSION_2_0)
82-
if (dai->host_dma_config->pre_allocated_by_host)
83-
channel = dai->host_dma_config->dma_channel_id;
82+
if (dai->host_dma_config[0]->pre_allocated_by_host)
83+
channel = dai->host_dma_config[0]->dma_channel_id;
8484
#endif
8585
break;
8686
case SOF_DAI_INTEL_HDA:

src/ipc/ipc4/helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ int ipc4_find_dma_config(struct ipc_config_dai *dai, uint8_t *data_buffer, uint3
10431043
if (*dma_config_id != GTW_DMA_CONFIG_ID)
10441044
return IPC4_INVALID_REQUEST;
10451045

1046-
dai->host_dma_config = GET_IPC_DMA_CONFIG(data_buffer, size);
1046+
dai->host_dma_config[0] = GET_IPC_DMA_CONFIG(data_buffer, size);
10471047
#endif
10481048
return IPC4_SUCCESS;
10491049
}

0 commit comments

Comments
 (0)