@@ -243,11 +243,11 @@ static int dai_get_fifo(struct dai *dai, int direction, int stream_id)
243243}
244244
245245/* this is called by DMA driver every time descriptor has completed */
246- static enum dma_cb_status
246+ static enum sof_dma_cb_status
247247dai_dma_cb (struct dai_data * dd , struct comp_dev * dev , uint32_t bytes ,
248248 pcm_converter_func * converter )
249249{
250- enum dma_cb_status dma_status = DMA_CB_STATUS_RELOAD ;
250+ enum sof_dma_cb_status dma_status = SOF_DMA_CB_STATUS_RELOAD ;
251251 int ret ;
252252
253253 comp_dbg (dev , "dai_dma_cb()" );
@@ -258,7 +258,7 @@ dai_dma_cb(struct dai_data *dd, struct comp_dev *dev, uint32_t bytes,
258258 dai_trigger_op (dd -> dai , COMP_TRIGGER_STOP , dev -> direction );
259259
260260 /* tell DMA not to reload */
261- dma_status = DMA_CB_STATUS_END ;
261+ dma_status = SOF_DMA_CB_STATUS_END ;
262262 }
263263
264264 /* is our pipeline handling an XRUN ? */
@@ -401,11 +401,11 @@ dai_dma_cb(struct dai_data *dd, struct comp_dev *dev, uint32_t bytes,
401401}
402402
403403/* this is called by DMA driver every time descriptor has completed */
404- static enum dma_cb_status
404+ static enum sof_dma_cb_status
405405dai_dma_multi_endpoint_cb (struct dai_data * dd , struct comp_dev * dev , uint32_t frames ,
406406 struct comp_buffer * multi_endpoint_buffer )
407407{
408- enum dma_cb_status dma_status = DMA_CB_STATUS_RELOAD ;
408+ enum sof_dma_cb_status dma_status = SOF_DMA_CB_STATUS_RELOAD ;
409409 uint32_t i , bytes ;
410410
411411 comp_dbg (dev , "dai_dma_multi_endpoint_cb()" );
@@ -416,7 +416,7 @@ dai_dma_multi_endpoint_cb(struct dai_data *dd, struct comp_dev *dev, uint32_t fr
416416 dai_trigger_op (dd -> dai , COMP_TRIGGER_STOP , dev -> direction );
417417
418418 /* tell DMA not to reload */
419- dma_status = DMA_CB_STATUS_END ;
419+ dma_status = SOF_DMA_CB_STATUS_END ;
420420 }
421421
422422 /* is our pipeline handling an XRUN ? */
@@ -477,9 +477,9 @@ int dai_common_new(struct dai_data *dd, struct comp_dev *dev,
477477
478478 /* request GP LP DMA with shared access privilege */
479479 dir = dai_cfg -> direction == SOF_IPC_STREAM_PLAYBACK ?
480- DMA_DIR_MEM_TO_DEV : DMA_DIR_DEV_TO_MEM ;
480+ SOF_DMA_DIR_MEM_TO_DEV : SOF_DMA_DIR_DEV_TO_MEM ;
481481
482- dd -> dma = dma_get (dir , dd -> dai -> dma_caps , dd -> dai -> dma_dev , DMA_ACCESS_SHARED );
482+ dd -> dma = dma_get (dir , dd -> dai -> dma_caps , dd -> dai -> dma_dev , SOF_DMA_ACCESS_SHARED );
483483 if (!dd -> dma ) {
484484 dai_put (dd -> dai );
485485 comp_err (dev , "dma_get() failed to get shared access to DMA." );
@@ -730,13 +730,13 @@ static int dai_set_sg_config(struct dai_data *dd, struct comp_dev *dev, uint32_t
730730 /* set up DMA configuration */
731731 if (dev -> direction == SOF_IPC_STREAM_PLAYBACK ) {
732732 dd -> process = pcm_get_conversion_function (local_fmt , dma_fmt );
733- config -> direction = DMA_DIR_MEM_TO_DEV ;
733+ config -> direction = SOF_DMA_DIR_MEM_TO_DEV ;
734734 err = dai_get_dma_slot (dd , dev , & config -> dest_dev );
735735 if (err < 0 )
736736 return err ;
737737 } else {
738738 dd -> process = pcm_get_conversion_function (dma_fmt , local_fmt );
739- config -> direction = DMA_DIR_DEV_TO_MEM ;
739+ config -> direction = SOF_DMA_DIR_DEV_TO_MEM ;
740740 err = dai_get_dma_slot (dd , dev , & config -> src_dev );
741741 if (err < 0 )
742742 return err ;
@@ -1123,7 +1123,7 @@ int dai_common_config_prepare(struct dai_data *dd, struct comp_dev *dev)
11231123 comp_dbg (dev , "channel = %d" , channel );
11241124
11251125 /* do nothing for asking for channel free, for compatibility. */
1126- if (channel == DMA_CHAN_INVALID ) {
1126+ if (channel == SOF_DMA_CHAN_INVALID ) {
11271127 comp_err (dev , "dai_config is not set yet!" );
11281128 return - EINVAL ;
11291129 }
@@ -1292,7 +1292,7 @@ static int dai_comp_trigger_internal(struct dai_data *dd, struct comp_dev *dev,
12921292 * Only applies to non HD-DMA links as HD-DMA read/write pointer
12931293 * is not reset during stop/config/start
12941294 */
1295- if (!(dd -> dai -> dma_caps & DMA_CAP_HDA ))
1295+ if (!(dd -> dai -> dma_caps & SOF_DMA_CAP_HDA ))
12961296 audio_stream_reset (& dd -> dma_buffer -> stream );
12971297
12981298 /* only start the DAI if we are not XRUN handling */
@@ -1543,7 +1543,7 @@ int dai_zephyr_multi_endpoint_copy(struct dai_data **dd, struct comp_dev *dev,
15431543 }
15441544
15451545 for (i = 0 ; i < num_endpoints ; i ++ ) {
1546- enum dma_cb_status status ;
1546+ enum sof_dma_cb_status status ;
15471547 uint32_t copy_bytes ;
15481548
15491549 /* trigger optional DAI_TRIGGER_COPY which prepares dai to copy */
@@ -1552,7 +1552,7 @@ int dai_zephyr_multi_endpoint_copy(struct dai_data **dd, struct comp_dev *dev,
15521552 comp_warn (dev , "dai trigger copy failed" );
15531553
15541554 status = dai_dma_multi_endpoint_cb (dd [i ], dev , frames , multi_endpoint_buffer );
1555- if (status == DMA_CB_STATUS_END )
1555+ if (status == SOF_DMA_CB_STATUS_END )
15561556 dma_stop (dd [i ]-> chan -> dma -> z_dev , dd [i ]-> chan -> index );
15571557
15581558 copy_bytes = frames * audio_stream_frame_bytes (& dd [i ]-> dma_buffer -> stream );
@@ -1742,7 +1742,7 @@ int dai_common_copy(struct dai_data *dd, struct comp_dev *dev, pcm_converter_fun
17421742 if (ret < 0 )
17431743 comp_warn (dev , "dai trigger copy failed" );
17441744
1745- if (dai_dma_cb (dd , dev , copy_bytes , converter ) == DMA_CB_STATUS_END )
1745+ if (dai_dma_cb (dd , dev , copy_bytes , converter ) == SOF_DMA_CB_STATUS_END )
17461746 dma_stop (dd -> chan -> dma -> z_dev , dd -> chan -> index );
17471747
17481748 ret = dma_reload (dd -> chan -> dma -> z_dev , dd -> chan -> index , 0 , 0 , copy_bytes );
0 commit comments