diff --git a/src/audio/copier/copier.h b/src/audio/copier/copier.h index 41bca7afc287..7b490e53c384 100644 --- a/src/audio/copier/copier.h +++ b/src/audio/copier/copier.h @@ -246,10 +246,9 @@ struct copier_data { void *gtw_cfg; enum ipc4_gateway_type gtw_type; struct comp_dev *endpoint[IPC4_COPIER_MODULE_OUTPUT_PINS_COUNT]; - struct comp_buffer *endpoint_buffer[IPC4_COPIER_MODULE_OUTPUT_PINS_COUNT]; uint32_t endpoint_num; - /* buffer to mux/demux data from/to multiple endpoint buffers for ALH multi-gateway case */ + /* buffer to mux/demux data from/to multiple endpoints for ALH multi-gateway case */ struct comp_buffer *multi_endpoint_buffer; bool bsource_buffer; @@ -284,10 +283,9 @@ pcm_converter_func get_converter_func(const struct ipc4_audio_format *in_fmt, uint32_t chmap); struct comp_ipc_config; -int create_endpoint_buffer(struct comp_dev *dev, - struct copier_data *cd, - const struct ipc4_copier_module_cfg *copier_cfg, - bool create_multi_endpoint_buffer); +int create_multi_endpoint_buffer(struct comp_dev *dev, + struct copier_data *cd, + const struct ipc4_copier_module_cfg *copier_cfg); enum sof_ipc_stream_direction get_gateway_direction(enum ipc4_connector_node_id_type node_id_type); diff --git a/src/audio/copier/copier_dai.c b/src/audio/copier/copier_dai.c index f79c2b225255..587a133ebd75 100644 --- a/src/audio/copier/copier_dai.c +++ b/src/audio/copier/copier_dai.c @@ -351,7 +351,7 @@ int copier_dai_create(struct comp_dev *dev, struct copier_data *cd, /* create multi_endpoint_buffer for ALH multi-gateway case */ if (dai_count > 1) { - ret = create_endpoint_buffer(dev, cd, copier, true); + ret = create_multi_endpoint_buffer(dev, cd, copier); if (ret < 0) return ret; } diff --git a/src/audio/copier/copier_generic.c b/src/audio/copier/copier_generic.c index ac9e900e9157..a4fc8ca6c9a1 100644 --- a/src/audio/copier/copier_generic.c +++ b/src/audio/copier/copier_generic.c @@ -347,10 +347,9 @@ void copier_update_params(struct copier_data *cd, struct comp_dev *dev, } } -int create_endpoint_buffer(struct comp_dev *dev, - struct copier_data *cd, - const struct ipc4_copier_module_cfg *copier_cfg, - bool create_multi_endpoint_buffer) +int create_multi_endpoint_buffer(struct comp_dev *dev, + struct copier_data *cd, + const struct ipc4_copier_module_cfg *copier_cfg) { struct comp_ipc_config *config = &dev->ipc_config; enum sof_ipc_frame in_frame_fmt, out_frame_fmt; @@ -438,10 +437,7 @@ int create_endpoint_buffer(struct comp_dev *dev, audio_buffer_set_hw_params_configured(&buffer->audio_buffer); - if (create_multi_endpoint_buffer) - cd->multi_endpoint_buffer = buffer; - else - cd->endpoint_buffer[cd->endpoint_num] = buffer; + cd->multi_endpoint_buffer = buffer; return 0; }