I am an android platform developer, recently I am doing some investigation about audio latency,and i have two question about it , could you help me on that?
1st question:
I just read the FastMixer code of LP5.0, when play a sound pool stream, a fast track such as fast track1 will be created and audio flinger will also write zero data to fast track0 , finally both of them will be mixed in fast mixer thread.
My question is why we need audio flinger audio_Out thread write zero data to fast track0 and then mixed with fast track1,as i known, it will add more latency for sound pool playback. Whether we can mix fast track 1-7 directly by fast mixer thread and write them to HAL?
2nd question is:
The definition of warm latency in CDD is:
"warm output latency" is defined to be the interval between when an application requests audio playback and when sound begins playing, when the audio system has been recently used but is currently idle (that is, silent).
As I known, when the audio system has been recently used but is currently idle, audio_out thread in audio flinger will write zero data to SRAM(at most 3 seconds), when application requests audio playback, should the warm latency include the delay caused by SRAM zero data?
Thank you firstly.