@@ -469,28 +469,6 @@ static int copier_comp_trigger(struct comp_dev *dev, int cmd)
469469 return ret ;
470470}
471471
472- static int do_endpoint_copy (struct comp_dev * dev )
473- {
474- struct processing_module * mod = comp_get_drvdata (dev );
475- struct copier_data * cd = module_get_private_data (mod );
476-
477- switch (dev -> ipc_config .type ) {
478- case SOF_COMP_HOST :
479- if (!cd -> ipc_gtw )
480- return host_common_copy (cd -> hd , dev , copier_host_dma_cb );
481- break ;
482- case SOF_COMP_DAI :
483- if (cd -> endpoint_num == 1 )
484- return dai_common_copy (cd -> dd [0 ], dev , cd -> converter );
485-
486- return dai_zephyr_multi_endpoint_copy (cd -> dd , dev , cd -> multi_endpoint_buffer ,
487- cd -> endpoint_num );
488- default :
489- break ;
490- }
491- return 0 ;
492- }
493-
494472static int do_conversion_copy (struct comp_dev * dev ,
495473 struct copier_data * cd ,
496474 struct comp_buffer __sparse_cache * src ,
@@ -586,7 +564,8 @@ static int copier_multi_endpoint_dai_copy(struct copier_data *cd, struct comp_de
586564
587565 if (!cd -> bsource_buffer ) {
588566 /* gateway(s) as input */
589- ret = do_endpoint_copy (dev );
567+ ret = dai_zephyr_multi_endpoint_copy (cd -> dd , dev , cd -> multi_endpoint_buffer ,
568+ cd -> endpoint_num );
590569 if (ret < 0 )
591570 return ret ;
592571
@@ -614,7 +593,8 @@ static int copier_multi_endpoint_dai_copy(struct copier_data *cd, struct comp_de
614593 if (ret < 0 )
615594 goto err ;
616595
617- ret = do_endpoint_copy (dev );
596+ ret = dai_zephyr_multi_endpoint_copy (cd -> dd , dev , cd -> multi_endpoint_buffer ,
597+ cd -> endpoint_num );
618598err :
619599 buffer_release (src_c );
620600
@@ -642,7 +622,7 @@ static int copier_copy(struct comp_dev *dev)
642622 switch (dev -> ipc_config .type ) {
643623 case SOF_COMP_HOST :
644624 if (!cd -> ipc_gtw )
645- return do_endpoint_copy ( dev );
625+ return host_common_copy ( cd -> hd , dev , copier_host_dma_cb );
646626
647627 /* do nothing in the gateway copier case */
648628 return 0 ;
0 commit comments