mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 06:34:12 +08:00
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> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://msgid.link/r/20240213123007.29956-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
20c0c9b352
commit
e49676a5fc
@ -598,7 +598,11 @@ static int sof_ipc4_widget_setup_comp_dai(struct snd_sof_widget *swidget)
|
||||
}
|
||||
|
||||
ipc4_copier->copier_config = (uint32_t *)blob;
|
||||
ipc4_copier->data.gtw_cfg.config_length = sizeof(*blob) >> 2;
|
||||
/* set data.gtw_cfg.config_length based on device_count */
|
||||
ipc4_copier->data.gtw_cfg.config_length = (sizeof(blob->gw_attr) +
|
||||
sizeof(blob->alh_cfg.device_count) +
|
||||
sizeof(*blob->alh_cfg.mapping) *
|
||||
blob->alh_cfg.device_count) >> 2;
|
||||
break;
|
||||
}
|
||||
case SOF_DAI_INTEL_SSP:
|
||||
|
Loading…
Reference in New Issue
Block a user