Merge branch 'dma_slave_direction' into next_test_dirn
[linux-2.6-block.git] / sound / soc / samsung / dma.c
index 87a39575fb61431dce968226a0c05e7bd1619907..d400ed0a71f2d9d3e1f5fe4dd4f5a72e253f6a58 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <linux/slab.h>
 #include <linux/dma-mapping.h>
+#include <linux/module.h>
 
 #include <sound/soc.h>
 #include <sound/pcm_params.h>
@@ -198,10 +199,10 @@ static int dma_hw_free(struct snd_pcm_substream *substream)
 
        pr_debug("Entered %s\n", __func__);
 
-       /* TODO - do we need to ensure DMA flushed */
        snd_pcm_set_runtime_buffer(substream, NULL);
 
        if (prtd->params) {
+               prtd->params->ops->flush(prtd->params->ch);
                prtd->params->ops->release(prtd->params->ch,
                                        prtd->params->client);
                prtd->params = NULL;