diff options
author | Shengjiu Wang <b02247@freescale.com> | 2014-04-14 14:58:05 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2015-01-15 21:17:58 -0600 |
commit | 43541a8742429f78368e8a430a43c8555dafe3b5 (patch) | |
tree | c947d99bb8bf7a0cf2d26be855c1128f6f66b093 /sound | |
parent | 1f865021bba83c3bbf78d9a00fb69aea3ef51d27 (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 'sound')
-rw-r--r-- | sound/core/pcm_dmaengine.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/core/pcm_dmaengine.c b/sound/core/pcm_dmaengine.c index 94d08733cb38..fe527cff3e2b 100644 --- a/sound/core/pcm_dmaengine.c +++ b/sound/core/pcm_dmaengine.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) { @@ -162,7 +156,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); |