bluez5: handle any quantum in a2dp-sink

Remove quantum limitation from a2dp-sink, and adjust how flushing is
done.

The "low-latency" A2DP codecs are not able to flush all data at once, so
for them flush based on a timeout, such that "excess samples" for each
quantum is bounded.  We also limit excess samples for the other A2DP
codecs, based on some testing on flaky headset/adapter combinations (for
most cases, this does not appear to matter).

Leave decision of packet sizes to the codecs. Currently, we send packets
based on min_latency, but sendinf full packets might help with stutter
on some headset/adapter combinations.  The slightly increased latency
hardly matters against the 100ms delays in BT headsets.

Bump codec API version.
This commit is contained in:
Pauli Virtanen 2021-11-06 12:54:02 +02:00
parent 9377ae5fcd
commit 377bc16eb5
5 changed files with 107 additions and 34 deletions

View file

@ -60,9 +60,6 @@ extern "C" {
#define PIPEWIRE_BATTERY_PROVIDER "/org/freedesktop/pipewire/battery"
#define MIN_LATENCY 512
#define MAX_LATENCY 1024
#define OBJECT_MANAGER_INTROSPECT_XML \
DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
"<node>\n" \