dw-dma: change behavior for preload

Changes behavior for DMA_COPY_PRELOAD flag.
DW-DMA should just start transfer the same way
as for DMA_COPY_ONE_SHOT. It fixes playback
for platforms using DW-DMA for host transfers.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
Tomasz Lauda 2019-07-01 14:45:43 +02:00 committed by Janusz Jankowski
parent 19efb46109
commit b4fc677c70
1 changed files with 2 additions and 6 deletions

View File

@ -1032,12 +1032,8 @@ static int dw_dma_copy(struct dma *dma, unsigned int channel, int bytes,
return -EINVAL;
}
/* do nothing on preload */
if (flags & DMA_COPY_PRELOAD)
return 0;
/* for one shot copy just start DMA */
if (flags & DMA_COPY_ONE_SHOT)
/* for preload or one shot copy just start DMA */
if (flags & (DMA_COPY_PRELOAD | DMA_COPY_ONE_SHOT))
return dw_dma_start(dma, channel);
tracev_dwdma("dw_dma_copy(): dma %d channel %d copy",