Skip to content

Commit e59fce2

Browse files
committed
ASoC: SOF: ipc4-topology: set config_length based on device_count
Set ipc4_copier->data.gtw_cfg.config_length dynamically based on blob->alh_cfg.device_count to align with the other OS. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent 288b0b7 commit e59fce2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

sound/soc/sof/ipc4-topology.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,11 @@ static int sof_ipc4_widget_setup_comp_dai(struct snd_sof_widget *swidget)
601601
}
602602

603603
ipc4_copier->copier_config = (uint32_t *)blob;
604-
ipc4_copier->data.gtw_cfg.config_length = sizeof(*blob) >> 2;
604+
/* set data.gtw_cfg.config_length based on device_count */
605+
ipc4_copier->data.gtw_cfg.config_length = (sizeof(blob->gw_attr) +
606+
sizeof(blob->alh_cfg.device_count) +
607+
sizeof(*blob->alh_cfg.mapping) *
608+
blob->alh_cfg.device_count) >> 2;
605609
break;
606610
}
607611
case SOF_DAI_INTEL_SSP:

0 commit comments

Comments
 (0)