mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-08 08:21:04 -04:00
bluez5: deal with missing TX timestamps
There are known controller firmware bugs that cause packet completion reports, mainly for ISO packets, to be missing. To avoid getting stuck e.g. in ISO queue flushing, we should consider a packet completed if sufficient time has passed even if controller (and kernel) don't report it completed. Take 1 s as conservative timeout, the expected values are some ms. These firmware bugs also cause kernel to stop sending packets if too many are left uncompleted, but we cannot detect that.
This commit is contained in:
parent
0869be11f8
commit
d0309b4e1e
3 changed files with 111 additions and 36 deletions
|
|
@ -1315,7 +1315,10 @@ static void media_on_flush_error(struct spa_source *source)
|
|||
if (spa_bt_iso_io_recv_errqueue(this->transport->iso_io) == 0)
|
||||
return;
|
||||
} else {
|
||||
if (spa_bt_latency_recv_errqueue(&this->tx_latency, this->flush_source.fd, this->log) == 0)
|
||||
struct timespec ts;
|
||||
|
||||
spa_system_clock_gettime(this->data_system, CLOCK_REALTIME, &ts);
|
||||
if (spa_bt_latency_recv_errqueue(&this->tx_latency, this->flush_source.fd, SPA_TIMESPEC_TO_NSEC(&ts), this->log) == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue