ASoC: samsung: dma: Implement audio pause/resume callback operations
authorHuang Chao <chao7.huang@samsung.com>
Fri, 13 Jun 2014 05:28:36 +0000 (13:28 +0800)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:59:50 +0000 (11:59 +0900)
When the dma operations get called from audio platform driver, and
users want to pause or resume the audio pcm stream when playback music,
there should be the related pause and release callback operations for
such requirements. This patch just implements the audio pause/resume
callback operations by simply call the corresponding functions from
the dma engine subsystem.

Change-Id: Ifed8d2acf1cbc09f1bd5d37151dcf74255b20da0
Signed-off-by: Huang Chao <chao7.huang@samsung.com>
arch/arm/plat-samsung/dma-ops.c

index ec0d731..011f232 100644 (file)
@@ -122,6 +122,16 @@ static inline int samsung_dmadev_flush(unsigned ch)
        return dmaengine_terminate_all((struct dma_chan *)ch);
 }
 
+static inline int samsung_dmadev_pause(unsigned ch)
+{
+       return dmaengine_pause((struct dma_chan *)ch);
+}
+
+static inline int samsung_dmadev_resume(unsigned ch)
+{
+       return dmaengine_resume((struct dma_chan *)ch);
+}
+
 static struct samsung_dma_ops dmadev_ops = {
        .request        = samsung_dmadev_request,
        .release        = samsung_dmadev_release,
@@ -131,6 +141,8 @@ static struct samsung_dma_ops dmadev_ops = {
        .started        = NULL,
        .flush          = samsung_dmadev_flush,
        .stop           = samsung_dmadev_flush,
+       .pause          = samsung_dmadev_pause,
+       .resume         = samsung_dmadev_resume,
 };
 
 void *samsung_dmadev_get_ops(void)