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

@ -43,7 +43,7 @@
#define SPA_TYPE_INTERFACE_Bluez5CodecA2DP SPA_TYPE_INFO_INTERFACE_BASE "Bluez5:Codec:A2DP:Private"
#define SPA_VERSION_BLUEZ5_CODEC_A2DP 0
#define SPA_VERSION_BLUEZ5_CODEC_A2DP 1
struct spa_bluez5_codec_a2dp {
struct spa_interface iface;