diff --git a/src/audio/dai-zephyr.c b/src/audio/dai-zephyr.c index a9662254b75c..0038728b9128 100644 --- a/src/audio/dai-zephyr.c +++ b/src/audio/dai-zephyr.c @@ -751,8 +751,17 @@ static int dai_set_dma_config(struct dai_data *dd, struct comp_dev *dev) for (i = 0; i < dma_cfg->block_count; i++) { dma_block_cfg->dest_scatter_en = config->scatter; dma_block_cfg->block_size = config->elem_array.elems[i].size; - dma_block_cfg->source_address = config->elem_array.elems[i].src; - dma_block_cfg->dest_address = config->elem_array.elems[i].dest; + if (dev->direction == SOF_IPC_STREAM_PLAYBACK) { + dma_block_cfg->source_address = + local_to_host(config->elem_array.elems[i].src); + dma_block_cfg->dest_address = + config->elem_array.elems[i].dest; + } else { + dma_block_cfg->source_address = + config->elem_array.elems[i].src; + dma_block_cfg->dest_address = + local_to_host(config->elem_array.elems[i].dest); + } if (dev->direction == SOF_IPC_STREAM_PLAYBACK) { dma_block_cfg->source_addr_adj = DMA_ADDR_ADJ_DECREMENT; dma_block_cfg->dest_addr_adj = DMA_ADDR_ADJ_INCREMENT;