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 <liam.r.girdwood@linux.intel.com>
This commit is contained in:
Liam Girdwood 2018-02-08 20:34:32 +08:00
parent 378de84293
commit fa8abe145c
1 changed files with 6 additions and 0 deletions

View File

@ -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);