[Sound-open-firmware] how to find a suitable value for the TFT/RFT parameter on multi-platform

zhigangw zhigang.wu at linux.intel.com
Fri May 18 03:30:58 CEST 2018



On 2018年05月17日 21:25, Pierre-Louis Bossart wrote:
> On 5/17/18 4:31 AM, zhigangw wrote:
>> Hello Liam:
>>
>>          I think it is better to mention this status again in the 
>> mail list.
>>
>> I am working on playback with the TDM8(4slot used)-48KHz-32bit on 
>> APL-GPMRB platform.
>>
>> Currently the status is:
>>
>> The music can be heard from the all four channels.
>>
>> But the it has the noise on the background. the noise exists all the 
>> time during playing.
>>
>> No xrun happened during the audio playing.
>>
>> I have not tried the pause/resume feature.
>>
>> I have not tried keyon's patch for the noise issue.
>
> Looks to me like you've answered to your own question:
> if there is no xrun, the problem is not related to TFT settings, so 
> please try with known workarounds to remove the noise issue.
>

Sorry! I think I miss one point in this description:
After I set the TFT = 4 hardcoded, the play can continue. If I follow 
the old code, the TFT = 16.
the XRUN will happen 100%, the DMA IRQ interval is less than 1ms,
the XRUN is caused by this.
the noise issue will be a next step, i will try keyon's patch later.
>>
>>
>> Issue:
>>
>> During the development, the TFT (in SSP's SSC3 register) parameter 
>> will affect the playing operation.
>>
>> If we keep code: tft = active_tx_slots * 4;  the tft will be 16.
>>
>> during the playing, i found the DMA IRQ will happened very 
>> frequently, less than 1ms,
>>
>> which will cause XRUN during playing. But it will be normal if the 
>> tft value is below 8 (tft < 8).
>
> Doesn't this point to a DMA configuration issue? the IRQ should only 
> come after a set of burst transfers related to the TFT settings. In 
> other words, if you reduce TFT you should increase the number of 
> bursts to keep the IRQ rate constant.
>
> There is a clear note in the code on this btw, the RFT/TFT settings 
> cannot be modified in isolation, you need to have a related change on 
> the DMA side.
>
This is not related to DMA configuration, it is about the SSP configuration.
I did the experiment on my own APL-GPMRB, change the TFT will affect the 
DMA's IRQ interval.
I will check the DMA's configuration about the burst you mentioned.

there is communication mechanism between the SSP and DMA,
when the TFT (FIFO threshold) is reached, the SSP will send request 
signal to DMA, the DMA will start to coping (into SSP's FIFO).
this mechanism is black to software level.
the TFT/RFT configuration determined when SSP sends request to DMA,

thanks
br
~zhigang

>
>>
>>
>> I did some tests on other platform. but I have not found suitable way 
>> to fit all of them.
>>
>> the RFT also have the similar concern.
>>
>>
>> Do you have any suggestions about this?
>>
>>
>> thank you
>>
>> br
>>
>> ~zhigang
>>
>>
>>
>> _______________________________________________
>> Sound-open-firmware mailing list
>> Sound-open-firmware at alsa-project.org
>> http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
>



More information about the Sound-open-firmware mailing list