Skip to content

Commit 541bc53

Browse files
ranj063lgirdwood
authored andcommitted
audio: copier: Remove get_endpoint_buffer()
It is only used in the multi-endpoint case, so use the multi_endpoint_buffer directly. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
1 parent e424b87 commit 541bc53

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

src/audio/copier/copier.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -469,12 +469,6 @@ static int copier_comp_trigger(struct comp_dev *dev, int cmd)
469469
return ret;
470470
}
471471

472-
static inline struct comp_buffer *get_endpoint_buffer(struct copier_data *cd)
473-
{
474-
return cd->multi_endpoint_buffer ? cd->multi_endpoint_buffer :
475-
cd->endpoint_buffer[IPC4_COPIER_GATEWAY_PIN];
476-
}
477-
478472
static int do_endpoint_copy(struct comp_dev *dev)
479473
{
480474
struct processing_module *mod = comp_get_drvdata(dev);
@@ -596,7 +590,7 @@ static int copier_multi_endpoint_dai_copy(struct copier_data *cd, struct comp_de
596590
if (ret < 0)
597591
return ret;
598592

599-
src_c = buffer_acquire(get_endpoint_buffer(cd));
593+
src_c = buffer_acquire(cd->multi_endpoint_buffer);
600594
ret = copier_copy_to_sinks(cd, dev, src_c, &processed_data);
601595
buffer_release(src_c);
602596

@@ -613,7 +607,7 @@ static int copier_multi_endpoint_dai_copy(struct copier_data *cd, struct comp_de
613607
src_c = buffer_acquire(src);
614608

615609
/* gateway(s) on output */
616-
sink_c = buffer_acquire(get_endpoint_buffer(cd));
610+
sink_c = buffer_acquire(cd->multi_endpoint_buffer);
617611
ret = do_conversion_copy(dev, cd, src_c, sink_c, &processed_data);
618612
buffer_release(sink_c);
619613

0 commit comments

Comments
 (0)