mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
bluez5: backend-native: set state on synchronous acquire/release
Sinks/sources now expect transport state is set on acquire+release. It doesn't need to be done async, so do it still synchronously.
This commit is contained in:
parent
b69f3fc19e
commit
4d844ee1c6
1 changed files with 4 additions and 0 deletions
|
|
@ -1539,9 +1539,11 @@ static int sco_acquire_cb(void *data, bool optional)
|
|||
}
|
||||
spa_log_debug(backend->log, "transport %p: read_mtu=%u, write_mtu=%u", t, t->read_mtu, t->write_mtu);
|
||||
|
||||
spa_bt_transport_set_state(t, SPA_BT_TRANSPORT_STATE_ACTIVE);
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
spa_bt_transport_set_state(t, SPA_BT_TRANSPORT_STATE_ERROR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -1553,6 +1555,8 @@ static int sco_release_cb(void *data)
|
|||
|
||||
spa_log_info(backend->log, "Transport %s released", t->path);
|
||||
|
||||
spa_bt_transport_set_state(t, SPA_BT_TRANSPORT_STATE_IDLE);
|
||||
|
||||
#ifdef HAVE_BLUEZ_5_BACKEND_HFP_NATIVE
|
||||
rfcomm_hfp_ag_set_cind(td->rfcomm, false);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue