Skip to content

Commit c0ee625

Browse files
committed
ipc: eliminate multiple memcpy() calls
Eliminate multiple instances of IPC4 data copying, use simple type- casts instead. This removes stack objects and replaces run-time copying with compile-time pointer substitution. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent a37cdd6 commit c0ee625

4 files changed

Lines changed: 112 additions & 145 deletions

File tree

src/include/sof/audio/component_ext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct comp_driver_list {
3737
#if CONFIG_IPC_MAJOR_3
3838
struct comp_dev *comp_new(struct sof_ipc_comp *comp);
3939
#elif CONFIG_IPC_MAJOR_4
40-
struct comp_dev *comp_new_ipc4(struct ipc4_module_init_instance *module_init);
40+
struct comp_dev *comp_new_ipc4(const struct ipc4_module_init_instance *module_init);
4141
#endif
4242

4343
/** See comp_ops::free */

src/include/sof/ipc/topology.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ struct comp_driver;
5656
struct comp_dev *comp_new_ipc4_user(struct ipc4_message_request *ipc4,
5757
const struct comp_driver *drv);
5858
#endif
59-
int ipc4_chain_manager_create(struct ipc4_chain_dma *cdma);
60-
int ipc4_chain_dma_state(struct comp_dev *dev, struct ipc4_chain_dma *cdma);
59+
int ipc4_chain_manager_create(const struct ipc4_chain_dma *cdma);
60+
int ipc4_chain_dma_state(struct comp_dev *dev, const struct ipc4_chain_dma *cdma);
6161
int ipc4_create_chain_dma(struct ipc *ipc, struct ipc4_chain_dma *cdma);
6262
int ipc4_trigger_chain_dma(struct ipc *ipc, struct ipc4_chain_dma *cdma, bool *delay);
6363
int ipc4_process_on_core(uint32_t core, bool blocking);

0 commit comments

Comments
 (0)