S3C2440 DMA broken

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux