Skip to content

Commit 9822b4c

Browse files
ranj063broonie
authored andcommitted
ASoC: SOF: ipc4-topology: Do not set ALH node_id for aggregated DAIs
For aggregated DAIs, the node ID is set to the group_id during the DAI widget's ipc_prepare op. With the current logic, setting the dai_index for node_id in the dai_config is redundant as it will be overwritten with the group_id anyway. Removing it will also prevent any accidental clearing/resetting of the group_id for aggregated DAIs due to the dai_config calls could that happen before the allocated group_id is freed. Signed-off-by: Ranjani Sridharan <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Signed-off-by: Bard Liao <[email protected]> All: [email protected] # 6.10.x 6.11.x Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 3692a4c commit 9822b4c

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

sound/soc/sof/ipc4-topology.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3129,9 +3129,20 @@ static int sof_ipc4_dai_config(struct snd_sof_dev *sdev, struct snd_sof_widget *
31293129
* group_id during copier's ipc_prepare op.
31303130
*/
31313131
if (flags & SOF_DAI_CONFIG_FLAGS_HW_PARAMS) {
3132+
struct sof_ipc4_alh_configuration_blob *blob;
3133+
3134+
blob = (struct sof_ipc4_alh_configuration_blob *)ipc4_copier->copier_config;
31323135
ipc4_copier->dai_index = data->dai_node_id;
3133-
copier_data->gtw_cfg.node_id &= ~SOF_IPC4_NODE_INDEX_MASK;
3134-
copier_data->gtw_cfg.node_id |= SOF_IPC4_NODE_INDEX(data->dai_node_id);
3136+
3137+
/*
3138+
* no need to set the node_id for aggregated DAI's. These will be assigned
3139+
* a group_id during widget ipc_prepare
3140+
*/
3141+
if (blob->alh_cfg.device_count == 1) {
3142+
copier_data->gtw_cfg.node_id &= ~SOF_IPC4_NODE_INDEX_MASK;
3143+
copier_data->gtw_cfg.node_id |=
3144+
SOF_IPC4_NODE_INDEX(data->dai_node_id);
3145+
}
31353146
}
31363147

31373148
break;

0 commit comments

Comments
 (0)