[pulseaudio-discuss] [PATCH 00/13] loopback: Make module-loopback honor requested latency (v5)

Georg Chini georg at chini.tk
Fri Nov 20 00:08:53 PST 2015


>> Tested. This secret patch (which essentially provides a new rate 
>> controller based on the rate estimator, used when the old deadband 
>> logic snaps) with adjust_time=1 yields https://imgur.com/a/xTFmQ .
>>
>> It's a pity that the deadband logic sometimes unsnaps spuriously, so 
>> I changed the 2.5 in the deadband condition with 5.0. Result: 
>> https://imgur.com/a/WKsT7 , looks better than the original deadband 
>> logic, but I'd say this needs more investigation (and experiments) 
>> from my side, because it is not clear whether these oscillations will 
>> eventually decay. I will lok more into this on weekends.
>>
> It is not a "spuriously unsnapping" but part of the regulation 
> process. In my opinion the phase jump
> comes first and then the controller kicks in to correct it. Take a 
> look at the reported latency values
> when you run with debugging: First there is a jump in the latency and 
> then the controller reacts. That
> is exactly how it is supposed to be. It also looks like those jumps 
> are no artifacts because the next
> reported value is consistent with the regulation. I believe this is 
> somehow connected to changing
> the sample rate (by only 1 Hz) because it does not occur when the rate 
> is kept constant.
>
> Maybe the hardware sometimes takes a millisecond to switch the rate.
>
> I wonder how good you think we can get. Even including the jump, the 
> latency is kept within
> around 500 usec of the expected value, if you disregard the peak we 
> are talking about 200 usec.
>

I think I found the reason for the remaining issues with the regulation. 
It looks like there
is some latency hidden in the resampler which is not taken into account.
If I set the resampling method to trivial everything is working fine and 
the latency error
nearly disappears. With the standard resampler I occasionally see 
latency jumps of about
1 ms when the rate is switched. Those jumps completely disappear with 
the trivial resampler.

Alexander, could you please re-test with the trivial resampler?
Any idea how to retrieve the required information from the resampler?




More information about the pulseaudio-discuss mailing list