bluez5: rework sco i/o + autodetect mtu

Move SCO polling to a single place, and abstract mtu handling.
Autodetect suitable tx packet size based on rx, instead of relying on
the kernel providing correct values.
This commit is contained in:
Pauli Virtanen 2020-12-23 15:10:04 +02:00
parent 518365e350
commit 368182d963
9 changed files with 423 additions and 79 deletions

View file

@ -265,6 +265,11 @@ static int sco_release_cb(void *data)
spa_log_info(backend->log, "Transport %s released", t->path);
if (t->sco_io) {
spa_bt_sco_io_destroy(t->sco_io);
t->sco_io = NULL;
}
/* Shutdown and close the socket */
shutdown(t->fd, SHUT_RDWR);
close(t->fd);