From fa8abe145c0d464fec6048788c611e9e58a1c12b Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Thu, 8 Feb 2018 20:34:32 +0800 Subject: [PATCH] core: dma: Add DMA copy API. This API allows clients to manually inform the DMAC when they need more data copied. The DMAC can then copy the desired amount of data. Signed-off-by: Liam Girdwood --- src/include/reef/dma.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/include/reef/dma.h b/src/include/reef/dma.h index 77f8f71b9..80ff8d455 100644 --- a/src/include/reef/dma.h +++ b/src/include/reef/dma.h @@ -94,6 +94,7 @@ struct dma_ops { int (*start)(struct dma *dma, int channel); int (*stop)(struct dma *dma, int channel); + int (*copy)(struct dma *dma, int channel, int bytes); int (*pause)(struct dma *dma, int channel); int (*release)(struct dma *dma, int channel); int (*status)(struct dma *dma, int channel, @@ -183,6 +184,11 @@ static inline int dma_stop(struct dma *dma, int channel) return dma->ops->stop(dma, channel); } +static inline int dma_copy(struct dma *dma, int channel, int bytes) +{ + return dma->ops->copy(dma, channel, bytes); +} + static inline int dma_pause(struct dma *dma, int channel) { return dma->ops->pause(dma, channel);