[pulseaudio-discuss] bluetooth latency gets gradually worse over time

mudrunka at spoje.net mudrunka at spoje.net
Mon May 2 20:13:31 UTC 2016


Dne 2016-05-02 16:53, Jerome Leclanche napsal:
> On Mon, May 2, 2016 at 5:06 PM, Arun Raghavan <arun at accosted.net> 
> wrote:
>> On 1 May 2016 at 08:07,  <mudrunka at spoje.net> wrote:
>>> Hello,
>>> i have issue with bluetooth speaker. it creates loud pop when it's
>>> (un)suspended by module-suspend-on-idle. so i proceeded to disable
>>> suspend-on-idle, but when i leave it on for few hours, the latency 
>>> gets
>>> huge. Like 2 seconds or more. I suppose it has something to do with 
>>> DAC
>>> clock (or samplerate) in bluetooth speakers being little bit slower 
>>> than
>>> nominal. And the error adds up over time resulting in growing 
>>> latency.
>>> 
>>> When i manualy reconnect to speaker it gets fixed.
>>> 
>>> Do you have any idea how to fix this? I think it needs something that 
>>> will
>>> reset the stream when no audio is played, pretty much like 
>>> suspend-on-idle
>>> does, but without powering the bt device off (which causes pop). it's 
>>> really
>>> annoying. sometimes it scares the crap out of me, when speakers are 
>>> on full
>>> volume and it pops when i eg. receive IM mesage. :-) also it's 
>>> probably not
>>> healthy for the speakers (i use conventional speakers with amp and bt
>>> receiver).
>>> 
>>> I know the popping is mostly HW error. But it can be worked around by
>>> disabling suspend-on-idle, which then causes latency problems (also 
>>> somehow
>>> HW related). And i think the latency problem can be somehow fixed in 
>>> SW by
>>> restarting the stream or cleaning some buffer that causes the 
>>> latency...
>>> 
>>> BTW 2 seconds of latency are quite a lot... Is there even chance, 
>>> that cheap
>>> BT device has 2 second buffer? Maybe it's pulse audio that has 2 
>>> second
>>> latency. And it would be easily fixed by not buffering silence. Or by
>>> deleting this buffer when idle.
>> 
>> That does sound like a large latency. Could you file a bug about that,
>> and hopefully I'll get some time to test this out to see if it happens
>> locally too? If we do fix that, it looks like your problem should just
>> be fixed.
>> 
>> Cheers,
>> Arun
>> _______________________________________________
>> pulseaudio-discuss mailing list
>> pulseaudio-discuss at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
> 
> I missed that original email, but this is something that's familiar to 
> me.
> I've been able to reproduce this exact issue very easily on the
> bluetooth Parrot Zik and Parrot Zik 2 models with my btusb receiver by
> running out of range of the receiver.
> When out of range, a popping sound can be heard while the sound cuts
> for a few milliseconds, and the sound then resumes where it initially
> left off, creating a latency buffer which keeps growing every time the
> headset goes out of range again.
> The buffer resets when the card profile is turned off and back on (eg.
> pactl set-card-profile bluez_card.... off && pactl set-card-profile
> bluez_card.... a2dp_sink).
> 
> Worth noting the issue does not happen on the Parrot Zik 3, which is
> compatible with Bluetooth 4.x (unlike the versions 1 and 2).
> 
> J. Leclanche


So do you think it will be possible to easily fix this in software for 
BT 2?
I think you are true that it's related to the signal. I think i've 
noticed it gets worse during signal disturbances...

Tomas


> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss



More information about the pulseaudio-discuss mailing list