[Sound-open-firmware] [PATCH 1/8] core: dma: Add DMA copy API.
Keyon Jie
yang.jie at linux.intel.com
Thu Feb 8 13:48:06 CET 2018
From: Liam Girdwood <liam.r.girdwood at linux.intel.com>
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 <liam.r.girdwood at linux.intel.com>
---
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 77f8f71..80ff8d4 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);
--
2.11.0
More information about the Sound-open-firmware
mailing list