[pulseaudio-discuss] audio video out of sync

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Sun Feb 16 03:24:48 PST 2014


On Sat, 2014-02-15 at 02:52 +0100, Malte Gell wrote:
> I get these sync issues when I use my bluetooth headphone.
> 
> It seems pulseaudio has an issue with bluetooth audio, I find these
> messages in /var/log/messages:
> 
> module-bluetooth-device.c: Skipping 306252 us (= 54020 bytes) in audio
> stream
> 
> Is this a bug that needs to be fixed or can it be fixed with
> configuration changes?

The skipping of audio is not necessarily abnormal, because wireless
links are inherently unreliable. Packets get dropped, there's nothing we
can do about that.

On the topic of audio/video sync, synchronization requires accurate
latency information. PulseAudio doesn't have that information. If the
audio lags by a constant amount all the time, then you can work around
the problem by configuring the latency offset with e.g. pavucontrol.

If the audio lags more and more over time, however, that's means that
buffering increases somewhere, and the configurable latency offset is
not a viable solution. I don't think PulseAudio increases any of its
buffering, so the buffers grow either in the kernel, in the local
Bluetooth chip or in the remote device. It would be good if the kernel
could tell PulseAudio how big the local buffers are and what is their
fill level, but I don't know if there's any interface for that. If there
is, PulseAudio doesn't use it currently. It would be valuable
information if someone could research this and tell if there is such
interface, or if such interface could be added. Then PulseAudio's
Bluetooth latency handling could be improved. If the buffering increases
in the remote device, however, then there's absolutely nothing that we
can do (assuming that there's no interface in the Bluetooth spec for
reporting the latency information from the remote device to the local
device).

-- 
Tanu



More information about the pulseaudio-discuss mailing list