mirror of https://github.com/thesofproject/sof.git
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:
parent
378de84293
commit
fa8abe145c
|
@ -94,6 +94,7 @@ struct dma_ops {
|
||||||
|
|
||||||
int (*start)(struct dma *dma, int channel);
|
int (*start)(struct dma *dma, int channel);
|
||||||
int (*stop)(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 (*pause)(struct dma *dma, int channel);
|
||||||
int (*release)(struct dma *dma, int channel);
|
int (*release)(struct dma *dma, int channel);
|
||||||
int (*status)(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);
|
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)
|
static inline int dma_pause(struct dma *dma, int channel)
|
||||||
{
|
{
|
||||||
return dma->ops->pause(dma, channel);
|
return dma->ops->pause(dma, channel);
|
||||||
|
|
Loading…
Reference in New Issue