bluez5: use BT_PKT_SEQNUM for ISO packet sequence numbers

Use kernel BT_PKT_SEQNUM (likely in Linux v6.17) to provide the ISO
packets sequence numbers. Fall back to counting packets if kernel is too
old to support the feature.
This commit is contained in:
Pauli Virtanen 2025-07-13 20:08:22 +03:00 committed by Wim Taymans
parent 79a069c886
commit e8fa7929b7
3 changed files with 42 additions and 21 deletions

View file

@ -81,10 +81,11 @@ static void sco_io_on_ready(struct spa_source *source)
if (SPA_FLAG_IS_SET(source->rmask, SPA_IO_IN)) {
int res;
int dummy;
uint64_t rx_time = 0;
read_again:
res = spa_bt_recvmsg(&io->recv, io->read_buffer, SPA_MIN(io->read_mtu, MAX_MTU), &rx_time);
res = spa_bt_recvmsg(&io->recv, io->read_buffer, SPA_MIN(io->read_mtu, MAX_MTU), &rx_time, &dummy);
if (res <= 0) {
if (errno == EINTR) {
/* retry if interrupted */