bluez5: align audio output of all BAP sinks

Make BAP nodes align the first sample of their packets at multiples of
the ISO interval, counted in the shared graph sample position.  This
skips a few samples (< 10ms) at the start of playback to ensure the
alignment.

Since the sinks align their flush timing to the graph time, this also
results to them sending packets corresponding to the same graph time at
the same real time instants.

Due to packet queues in kernel/controller, the playback may still be off
by multiples of packets. Kernel changes are needed to address that part.

This works towards making BAP left and right channels to be
synchronized in TWS headsets, where the two earpieces currently appear
as different devices.
This commit is contained in:
Pauli Virtanen 2023-03-19 14:14:27 +02:00
parent 2bc48e1c18
commit aa06c547d9
2 changed files with 149 additions and 20 deletions

View file

@ -80,6 +80,7 @@ if get_option('spa-plugins').allowed()
summary({'Opus': opus_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs')
lc3_dep = dependency('lc3', required : get_option('bluez5-codec-lc3'))
summary({'LC3': lc3_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs')
cdata.set('HAVE_BLUETOOTH_BAP', get_option('bluez5-codec-lc3plus').allowed() and lc3plus_dep.found())
if get_option('bluez5-backend-hsp-native').allowed() or get_option('bluez5-backend-hfp-native').allowed()
mm_dep = dependency('ModemManager', version : '>= 1.10.0', required : get_option('bluez5-backend-native-mm'))
summary({'ModemManager': mm_dep.found()}, bool_yn: true, section: 'Bluetooth backends')