Skip to content

bluez5: sources: separate clock from recv + handle buffering

P V requested to merge pvir/pipewire:bt-source-rewrite into master

SCO and A2DP sources don't currently work quite right with audioconvert2, since they don't do any rate matching etc., and as drivers generate clock events at irregular intervals.

Rework both sources to generate regular clock cycles as driver, and handle buffering explicitly.

Rate match to keep the buffer level constant at a determined "safe" value.

The BT packet reception intervals are very jittery especially for A2DP, and tend to have regular interval variation patterns, so use small bandwidth DLL to try to smooth over that. Maybe a better filter with less overshooting could be used here, might allow reducing the minimum latency a bit.


See #2492 (closed), #2460 (closed)

Edited by P V

Merge request reports