Skip to content

Commit

Permalink
ASoC: Flush Samsung DMA on free
Browse files Browse the repository at this point in the history
Ever since it was written the Samsung DMA driver has had a TODO in the
hw_free() function wondering if we need to flush the DMA buffers. Up until
now the answer has been no but with the recent improvements Boojin has
done to the DMA infrastructure for the Samsung port the answer has changed
to yes for at least S3C6410 systems.

If we don't then when we next prepare() the channel the API will get
confused trying to run callbacks on the transfers hanging around from the
previous time the stream was open and oops.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Boojin Kim <boojin.kim@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
  • Loading branch information
Mark Brown authored and Kukjin Kim committed Oct 4, 2011
1 parent 00a351f commit 2ca9576
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/samsung/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,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;
Expand Down

0 comments on commit 2ca9576

Please sign in to comment.