summaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorShengjiu Wang <b02247@freescale.com>2014-04-14 14:58:05 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-23 16:57:50 +0300
commit62677aff497134169940c5542d83e3041042c543 (patch)
tree6621399efebf2789131b9bc2967d7d16b79806da /include/sound
parentf9aa5d4973382d12d6984766b4c747805e32515d (diff)
MLK-11429-8: ASoC: dmaengine: Add two function for dmaengine_pcm
cherry-pick below patch from imx_3.14.y 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/sound')
-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 67be2445941a..57eadbe0b4ef 100644
--- a/include/sound/dmaengine_pcm.h
+++ b/include/sound/dmaengine_pcm.h
@@ -74,6 +74,8 @@ struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream)
* @chan_name: Custom channel name to use when requesting DMA channel.
* @fifo_size: FIFO size of the DAI controller in bytes
* @flags: PCM_DAI flags, only SND_DMAENGINE_PCM_DAI_FLAG_PACK for now
+ * @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;
@@ -84,6 +86,16 @@ struct snd_dmaengine_dai_dma_data {
const char *chan_name;
unsigned int fifo_size;
unsigned int flags;
+ 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(