diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-09-26 18:29:11 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-10-04 05:59:44 -0400 |
commit | 2ca95769350348e5e3765f604b2ff51e73557bcd (patch) | |
tree | 0b1c99e10c01169b78b0e0e6bcb6b7c6144c7a01 /sound/soc/samsung | |
parent | 00a351f273a85b23a3fc9e7740b4c0080e69c9a1 (diff) |
ASoC: Flush Samsung DMA on free
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>
Diffstat (limited to 'sound/soc/samsung')
-rw-r--r-- | sound/soc/samsung/dma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c index 851346f7d68d..2d622b635e68 100644 --- a/sound/soc/samsung/dma.c +++ b/sound/soc/samsung/dma.c | |||
@@ -198,10 +198,10 @@ static int dma_hw_free(struct snd_pcm_substream *substream) | |||
198 | 198 | ||
199 | pr_debug("Entered %s\n", __func__); | 199 | pr_debug("Entered %s\n", __func__); |
200 | 200 | ||
201 | /* TODO - do we need to ensure DMA flushed */ | ||
202 | snd_pcm_set_runtime_buffer(substream, NULL); | 201 | snd_pcm_set_runtime_buffer(substream, NULL); |
203 | 202 | ||
204 | if (prtd->params) { | 203 | if (prtd->params) { |
204 | prtd->params->ops->flush(prtd->params->ch); | ||
205 | prtd->params->ops->release(prtd->params->ch, | 205 | prtd->params->ops->release(prtd->params->ch, |
206 | prtd->params->client); | 206 | prtd->params->client); |
207 | prtd->params = NULL; | 207 | prtd->params = NULL; |