[alsa-devel] [PATCH 2/2] ASoC: samsung: Use ASoC dmaengine code where possible

Padma Venkat padma.kvr at gmail.com
Thu Nov 28 10:59:31 CET 2013


Hi Mark,

On Wed, Nov 27, 2013 at 8:35 PM, Mark Brown <broonie at kernel.org> wrote:
> On Wed, Nov 27, 2013 at 06:08:47PM +0530, Padma Venkat wrote:
>> On Tue, Nov 26, 2013 at 5:50 PM, Mark Brown <broonie at kernel.org> wrote:
>
>> > So this is 16 bit stereo or something, and did it work beforehand?  Like
>> > I say I suspect the DMA is ending up being configured with the wrong
>> > transfer size, can you check what actually happens there please - what's
>> > different about the configuration that the DMA controller gets?  I don't
>> > have any Exynos systems with mainline audio support so I can't test
>> > anything myself.
>
>> This stream was working before. dma_size in i2s_hw_params not getting
>> effected as dma_data is getting initialized only at dai probe time. So
>> by default the dma_size is always 4 which is initialized at driver
>> probe time. The fifo_size of dai is also always 0. It is not getting
>> passed from dai driver. I just hard coded the dma_size to 2 and
>
> But if it's initialised at probe time then when is it getting
> overwritten?  This must be something triggered by DT which unfortunately
> I can't test.  It's a bit of a shame that the flows are different
> between the DT and non-DT cases.

it's getting overwritten in i2s_hw_params which is happening after
dma_data got initialized in dai probe. Based on mono or stereo channel
this value getting initialized to 2 or 4 respectively in
i2s_hw_params. This value is not triggered by DT now.

>
> The FIFO size looks like a difference between the pl330 and pl080, it
> doesn't seem to matter for pl080.  We just need to set it though.

fifo_size seems doesn't have any effect even in this case.

>
>> fifo_size to 32 then I can hear the audio only on right ear phone.
>> Still underrun error message appears.
>
> Are you sure that dma_size should be 2?  The i2s DAI driver seems to be
> hard coding it to 4.

I think for mono files the dma_size should be 2 only. Right now based
on mono or stereo this value getting overwritten in i2s_hw_params.
Initially it is hardcoded to 4. Due to this commit "ASoC: samsung:
Allow mono in i2s driver" which was not there earlier, I got confused.
Now it seems clear except that underrun message which I am still
debugging.

Thanks
Padma


More information about the Alsa-devel mailing list