bluez5: bap: determine SDU interval from codec frame duration

BlueZ API as BAP Server gives us the ISO interval, instead of the SDU
interval, in the MediaTransport.QoS.Interval property.  They are not
necessarily the same. What we need is the SDU interval.

The SDU interval is the interval between packets the encoder outputs, so
it is determined by the codec configuration, and for LC3 is equal to the
frame duration.

Add codec method get_interval() that returns the correct interval, and
use it in iso-io.
This commit is contained in:
Pauli Virtanen 2024-04-01 17:26:35 +03:00
parent b9ac79e99a
commit 5ae0dfb239
5 changed files with 47 additions and 16 deletions

View file

@ -659,7 +659,6 @@ struct spa_bt_transport {
uint8_t bap_cis;
uint8_t bap_big;
uint8_t bap_bis;
uint32_t bap_interval;
struct spa_bt_iso_io *iso_io;
struct spa_bt_sco_io *sco_io;