Skip to content

Commit

Permalink
ipc4: copier: remove unused endpoint_buffer[]
Browse files Browse the repository at this point in the history
The use of endpoint buffers in gateways was removed some time ago.
endpoint_buffer[] is a leftover from an earlier refactoring, is not used,
and can be removed.

Signed-off-by: Serhiy Katsyuba <[email protected]>
  • Loading branch information
serhiy-katsyuba-intel committed Dec 2, 2024
1 parent 0602a0f commit da2f00b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
10 changes: 4 additions & 6 deletions src/audio/copier/copier.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/audio/copier/copier_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
12 changes: 4 additions & 8 deletions src/audio/copier/copier_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit da2f00b

Please sign in to comment.