diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2012-03-22 15:34:52 +0530 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-04-05 08:40:57 -0700 |
commit | 3dac5c7cf1838d72ecfb1d0fe5ebbf5ead3066c8 (patch) | |
tree | 2fa3acdeb408a97bc4bde3e6c32f0dc58d0bacc1 /sound/soc | |
parent | e8c243d5d09d1a552b66df7a8a0a0313047ebbac (diff) |
sound: soc: tegra: Use tegra_dma_cancel() to abort request
To terminate request from dma, use the tegra_dma_cancel() inplace of
tegra_dma_dequeue().
The api tegra_dma_dequeue() is getting to be obsolete.
Change-Id: Id2a888a726086fb1e4ade04ac047442554188bee
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/91754
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/tegra/tegra_pcm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c index f277d282fbd4..00bd7aa2e59d 100644 --- a/sound/soc/tegra/tegra_pcm.c +++ b/sound/soc/tegra/tegra_pcm.c @@ -262,8 +262,11 @@ static int tegra_pcm_trigger(struct snd_pcm_substream *substream, int cmd) spin_lock_irqsave(&prtd->lock, flags); prtd->running = 0; spin_unlock_irqrestore(&prtd->lock, flags); - tegra_dma_dequeue_req(prtd->dma_chan, &prtd->dma_req[0]); - tegra_dma_dequeue_req(prtd->dma_chan, &prtd->dma_req[1]); + tegra_dma_cancel(prtd->dma_chan); + if (prtd->dma_req[0].status == -TEGRA_DMA_REQ_ERROR_ABORTED) + prtd->dma_req[0].complete(&prtd->dma_req[0]); + if (prtd->dma_req[1].status == -TEGRA_DMA_REQ_ERROR_ABORTED) + prtd->dma_req[1].complete(&prtd->dma_req[1]); break; default: return -EINVAL; |