@@ -156,6 +156,7 @@ static gboolean state_in_use(transport_state_t state)
switch (state) {
case TRANSPORT_STATE_IDLE:
case TRANSPORT_STATE_PENDING:
+ case TRANSPORT_STATE_BROADCASTING:
return FALSE;
case TRANSPORT_STATE_REQUESTING:
case TRANSPORT_STATE_ACTIVE:
@@ -1299,8 +1300,14 @@ static void transport_update_playing(struct media_transport *transport,
if (transport->owner != NULL)
media_transport_remove_owner(transport);
}
- } else if (transport->state == TRANSPORT_STATE_IDLE)
- transport_set_state(transport, TRANSPORT_STATE_PENDING);
+ } else if (transport->state == TRANSPORT_STATE_IDLE) {
+ if (!strcmp(media_endpoint_get_uuid(transport->endpoint),
+ BCAA_SERVICE_UUID))
+ transport_set_state(transport,
+ TRANSPORT_STATE_BROADCASTING);
+ else
+ transport_set_state(transport, TRANSPORT_STATE_PENDING);
+ }
}
static DBusMessage *select_transport(DBusConnection *conn, DBusMessage *msg,
@@ -1682,10 +1689,7 @@ static void bap_state_changed(struct bt_bap_stream *stream, uint8_t old_state,
bap_update_qos(transport);
else if (bt_bap_stream_io_dir(stream) != BT_BAP_BCAST_SOURCE)
bap_update_bcast_qos(transport);
- if (bt_bap_stream_io_dir(stream) == BT_BAP_BCAST_SOURCE)
- transport_update_playing(transport, TRUE);
- else
- transport_update_playing(transport, FALSE);
+ transport_update_playing(transport, FALSE);
return;
case BT_BAP_STREAM_STATE_DISABLING:
return;