bluez5: change sink/source run state follow transport state

Allow asynchronous changes in transport state in the sinks/sources.

Also allow transport acquire to be actually synchronous, in this case it
must set transport state during acquire call.

Separate driver start/stop from transport start/stop.
This commit is contained in:
Pauli Virtanen 2023-03-06 22:40:33 +02:00 committed by P V
parent 60718c4b4f
commit 1d5c693d33
5 changed files with 439 additions and 145 deletions

View file

@ -539,9 +539,10 @@ int spa_bt_sco_io_write(struct spa_bt_sco_io *io, uint8_t *data, int size);
#define SPA_BT_VOLUME_A2DP_MAX 127
enum spa_bt_transport_state {
SPA_BT_TRANSPORT_STATE_IDLE,
SPA_BT_TRANSPORT_STATE_PENDING,
SPA_BT_TRANSPORT_STATE_ACTIVE,
SPA_BT_TRANSPORT_STATE_ERROR = -1,
SPA_BT_TRANSPORT_STATE_IDLE = 0,
SPA_BT_TRANSPORT_STATE_PENDING = 1,
SPA_BT_TRANSPORT_STATE_ACTIVE = 2,
};
struct spa_bt_transport_events {