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

@ -246,6 +246,11 @@ static int ofono_audio_release(void *data)
spa_log_debug(backend->log, NAME": transport %p: Release %s",
transport, transport->path);
if (transport->sco_io) {
spa_bt_sco_io_destroy(transport->sco_io);
transport->sco_io = NULL;
}
/* shutdown to make sure connection is dropped immediately */
shutdown(transport->fd, SHUT_RDWR);
close(transport->fd);