From 43541a8742429f78368e8a430a43c8555dafe3b5 Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Mon, 14 Apr 2014 14:58:05 +0800 Subject: ENGR00307835-2 ASoC: dmaengine: Add two function for dmaengine_pcm Add check_xrun and device_reset for dmaengine_pcm Signed-off-by: Shengjiu Wang (cherry picked from commit 405588f31e432e5c6634a0817e4d804ead87882b) --- include/sound/dmaengine_pcm.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h index eb73a3a39ec2..8c031add8eb9 100644 --- a/include/sound/dmaengine_pcm.h +++ b/include/sound/dmaengine_pcm.h @@ -63,6 +63,8 @@ struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream) * requesting the DMA channel. * @chan_name: Custom channel name to use when requesting DMA channel. * @fifo_size: FIFO size of the DAI controller in bytes + * @check_xrun: check if hardware xrun happen in the cpu dai. + * @device_reset: if xrun happened, then do cpu dai reset. */ struct snd_dmaengine_dai_dma_data { dma_addr_t addr; @@ -72,6 +74,16 @@ struct snd_dmaengine_dai_dma_data { void *filter_data; const char *chan_name; unsigned int fifo_size; + bool (*check_xrun)(struct snd_pcm_substream *substream); + void (*device_reset)(struct snd_pcm_substream *substream, bool stop); +}; + +struct dmaengine_pcm_runtime_data { + struct dma_chan *dma_chan; + dma_cookie_t cookie; + + unsigned int pos; + dma_async_tx_callback callback; }; void snd_dmaengine_pcm_set_config_from_dai_data( -- cgit v1.2.3