Skip to content

Commit e6475ce

Browse files
ujfalusibroonie
authored andcommitted
ASoC: SOF: ipc4-topology: Update the basecfg for copier earlier
The sof_ipc4_update_resource_usage() call updates the CPC value in basecfg and it must be done prior to making a copy of the copier configuration for the init message. Other module types do the resource update as last step or in case of a process module at the correct time, before the memcpy. Fixes: d8a2c98 ("ASoC: SOF: ipc4-loader/topology: Query the CPC value from manifest") Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Adrian Bonislawski <adrian.bonislawski@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Chao Song <chao.song@linux.intel.com> Link: https://lore.kernel.org/r/20230809125656.27585-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 90219f1 commit e6475ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sound/soc/sof/ipc4-topology.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,6 +1731,9 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
17311731

17321732
*ipc_config_size = ipc_size;
17331733

1734+
/* update pipeline memory usage */
1735+
sof_ipc4_update_resource_usage(sdev, swidget, &copier_data->base_config);
1736+
17341737
/* copy IPC data */
17351738
memcpy(*ipc_config_data, (void *)copier_data, sizeof(*copier_data));
17361739
if (gtw_cfg_config_length)
@@ -1743,9 +1746,6 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
17431746
gtw_cfg_config_length,
17441747
&ipc4_copier->dma_config_tlv, dma_config_tlv_size);
17451748

1746-
/* update pipeline memory usage */
1747-
sof_ipc4_update_resource_usage(sdev, swidget, &copier_data->base_config);
1748-
17491749
return 0;
17501750
}
17511751

0 commit comments

Comments
 (0)