@@ -2748,13 +2748,15 @@ static void bap_state_bcast_sink(struct bt_bap_stream *stream,
case BT_BAP_STREAM_STATE_CONFIG:
if (!setup)
break;
- if (old_state ==
- BT_BAP_STREAM_STATE_CONFIG)
- setup_create_io(data, setup, stream, defer);
if (old_state ==
BT_BAP_STREAM_STATE_STREAMING)
setup_io_close(setup, NULL);
break;
+ case BT_BAP_STREAM_STATE_ENABLING:
+ if (!setup)
+ break;
+ setup_create_io(data, setup, stream, defer);
+ break;
}
}
@@ -2116,7 +2116,7 @@ static unsigned int bap_bcast_sink_enable(struct bt_bap_stream *stream,
bt_bap_stream_func_t func,
void *user_data)
{
- stream_set_state(stream, BT_BAP_STREAM_STATE_CONFIG);
+ stream_set_state(stream, BT_BAP_STREAM_STATE_ENABLING);
return 1;
}