summaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci/davinci-i2s.c
diff options
context:
space:
mode:
authorTroy Kisky <troy.kisky@boundarydevices.com>2009-11-18 17:49:53 -0700
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-11-19 10:48:08 +0000
commit1e224f322bf22280957a5f76164d848526ed9b08 (patch)
treebdf7af09be46172aa6048bb25fda35980e8b2159 /sound/soc/davinci/davinci-i2s.c
parent1587ea31572e25a0a2c9c491b7f8c937b6c0454e (diff)
downloadlinux-1e224f322bf22280957a5f76164d848526ed9b08.tar.gz
linux-1e224f322bf22280957a5f76164d848526ed9b08.tar.bz2
linux-1e224f322bf22280957a5f76164d848526ed9b08.zip
ASoC: DaVinci: pcm, fix underrun by using sram
Fix underruns by using dma to copy 1st to sram in a ping/pong buffer style and then copying from the sram to the ASP. This also has the advantage of tolerating very long interrupt latency on dma completion. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/davinci/davinci-i2s.c')
-rw-r--r--sound/soc/davinci/davinci-i2s.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c
index b2a5372ef72c..6362ca05506e 100644
--- a/sound/soc/davinci/davinci-i2s.c
+++ b/sound/soc/davinci/davinci-i2s.c
@@ -545,8 +545,13 @@ static int davinci_i2s_probe(struct platform_device *pdev)
ret = -ENOMEM;
goto err_release_region;
}
- if (pdata)
+ if (pdata) {
dev->enable_channel_combine = pdata->enable_channel_combine;
+ dev->dma_params[SNDRV_PCM_STREAM_PLAYBACK].sram_size =
+ pdata->sram_size_playback;
+ dev->dma_params[SNDRV_PCM_STREAM_CAPTURE].sram_size =
+ pdata->sram_size_capture;
+ }
dev->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(dev->clk)) {
ret = -ENODEV;