summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShengjiu Wang <b02247@freescale.com>2014-04-14 14:58:05 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-01-15 21:17:58 -0600
commit43541a8742429f78368e8a430a43c8555dafe3b5 (patch)
treec947d99bb8bf7a0cf2d26be855c1128f6f66b093 /include
parent1f865021bba83c3bbf78d9a00fb69aea3ef51d27 (diff)
ENGR00307835-2 ASoC: dmaengine: Add two function for dmaengine_pcm
Add check_xrun and device_reset for dmaengine_pcm Signed-off-by: Shengjiu Wang <b02247@freescale.com> (cherry picked from commit 405588f31e432e5c6634a0817e4d804ead87882b)
Diffstat (limited to 'include')
-rw-r--r--include/sound/dmaengine_pcm.h12
1 files changed, 12 insertions, 0 deletions
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(