Skip to content

Commit

Permalink
ASoC: DaVinci: pcm, fix underrun by using sram
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Troy Kisky authored and Mark Brown committed Nov 19, 2009
1 parent 1587ea3 commit 1e224f3
Show file tree
Hide file tree
Showing 4 changed files with 481 additions and 44 deletions.
2 changes: 2 additions & 0 deletions arch/arm/mach-davinci/include/mach/asp.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ struct snd_platform_data {
* when compared to previous behavior.
*/
unsigned enable_channel_combine:1;
unsigned sram_size_playback;
unsigned sram_size_capture;

/* McASP specific fields */
int tdm_slots;
Expand Down
7 changes: 6 additions & 1 deletion sound/soc/davinci/davinci-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 1e224f3

Please sign in to comment.