* S3C2440 DMA broken
@ 2013-01-30 13:10 Alexey Galakhov
0 siblings, 0 replies; only message in thread
From: Alexey Galakhov @ 2013-01-30 13:10 UTC (permalink / raw)
To: Boojin Kim; +Cc: linux-samsung-soc, ben-linux, Kukjin Kim
Hello,
I found that audio on S3C2440 was broken since commit 344b4c4 (ASoC:
Samsung: Update DMA interface). Each audio buffer is played multiple times.
An investigation of the issue has shown that it is caused by incorrect
buffer length passed to s3c2410_dma_enqueue() in the s3c_dma_prepare()
function (file arch/arm/plat-samsung/s3c-dma-ops.c). To be more precise:
int len = (param->cap == DMA_CYCLIC) ? param->period : param->len;
The buffer length is set in sound/soc/samsung/dma.c like that:
dma_info.period = prtd->dma_period;
dma_info.len = prtd->dma_period*limit;
So the "limit" multiplier is used twice. To prove it, I changed the line
in s3c-dma-ops.c to the following:
int len = /*(param->cap == DMA_CYCLIC)*/1 ? param->period : param->len;
and the audio was played correctly.
What is the intended behavior of s3c_dma_prepare()? Where shoild the
length to be fixed - in s3c_dma_prepare() or in dma.c ?
Regards,
--
Alex
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-01-30 13:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-30 13:10 S3C2440 DMA broken Alexey Galakhov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.