dmaengine: omap-dma: Restore the CLINK_CTRL in resume path
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Tue, 16 Sep 2014 19:45:57 +0000 (22:45 +0300)
committerVinod Koul <vinod.koul@intel.com>
Tue, 23 Sep 2014 12:52:55 +0000 (18:22 +0530)
When the audio stream is paused or suspended we stop the sDMA and when it
is unpaused/resumed we start the channel without reconfiguring it.
The omap_dma_stop() clears the link configuration when we pause the dma, but
it is not setting it back on start. This will result only one audio buffer
to be played back and the DMA will stop, since the linking is disabled.
We need to restore the CLINK_CTRL register in case of resume.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/omap-dma.c

index c01ea505ee7c6e3b4f36228bfd8c1695f13069a1..bbea8243f9e806a0b0626da6c3336ef644a0dc25 100644 (file)
@@ -1019,6 +1019,9 @@ static int omap_dma_resume(struct omap_chan *c)
        if (c->paused) {
                mb();
 
+               /* Restore channel link register */
+               omap_dma_chan_write(c, CLNK_CTRL, c->desc->clnk_ctrl);
+
                omap_dma_start(c, c->desc);
                c->paused = false;
        }