summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorShengjiu Wang <b02247@freescale.com>2014-04-14 14:58:05 +0800
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 08:58:20 -0500
commit405588f31e432e5c6634a0817e4d804ead87882b (patch)
tree373a0540b4a5ea45811ad2647a9242db1c0f8a6c /sound
parentbf7902d0cae3d90dfda6e9f6e463955dfde9c382 (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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-dmaengine-pcm.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/soc/soc-dmaengine-pcm.c b/sound/soc/soc-dmaengine-pcm.c
index aa924d9b7986..f762ac0f9f1c 100644
--- a/sound/soc/soc-dmaengine-pcm.c
+++ b/sound/soc/soc-dmaengine-pcm.c
@@ -5,6 +5,7 @@
* Based on:
* imx-pcm-dma-mx2.c, Copyright 2009 Sascha Hauer <s.hauer@pengutronix.de>
* mxs-pcm.c, Copyright (C) 2011 Freescale Semiconductor, Inc.
+ * imx-pcm-dma.c, Copyright (C) 2014 Freescale Semiconductor, Inc.
* ep93xx-pcm.c, Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
* Copyright (C) 2006 Applied Data Systems
*
@@ -28,13 +29,6 @@
#include <sound/dmaengine_pcm.h>
-struct dmaengine_pcm_runtime_data {
- struct dma_chan *dma_chan;
- dma_cookie_t cookie;
-
- unsigned int pos;
-};
-
static inline struct dmaengine_pcm_runtime_data *substream_to_prtd(
const struct snd_pcm_substream *substream)
{
@@ -166,7 +160,10 @@ static int dmaengine_pcm_prepare_and_submit(struct snd_pcm_substream *substream)
if (!desc)
return -ENOMEM;
- desc->callback = dmaengine_pcm_dma_complete;
+ if (prtd->callback)
+ desc->callback = prtd->callback;
+ else
+ desc->callback = dmaengine_pcm_dma_complete;
desc->callback_param = substream;
prtd->cookie = dmaengine_submit(desc);