Skip to content

Commit

Permalink
shared/bap: Do stream configuration in bap_bcast_config
Browse files Browse the repository at this point in the history
Stream configuration for BAP broadcast streams should be done inside
bap_bcast_config and not when setting the user data.
  • Loading branch information
ainxp authored and Vudentz committed Mar 1, 2024
1 parent 98aba4a commit 2ec513f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/shared/bap.c
Expand Up @@ -1693,11 +1693,8 @@ static unsigned int bap_bcast_config(struct bt_bap_stream *stream,
bt_bap_stream_func_t func, void *user_data)
{
stream->qos = *qos;
if (stream->lpac->type == BT_BAP_BCAST_SINK) {
if (data)
stream_config(stream, data, NULL);
stream_set_state(stream, BT_BAP_STREAM_STATE_CONFIG);
}
stream->lpac->ops->config(stream, stream->cc, &stream->qos,
ep_config_cb, stream->lpac->user_data);

return 1;
}
Expand Down Expand Up @@ -5369,10 +5366,6 @@ bool bt_bap_stream_set_user_data(struct bt_bap_stream *stream, void *user_data)

stream->user_data = user_data;

if (bt_bap_stream_get_type(stream) == BT_BAP_STREAM_TYPE_BCAST)
stream->lpac->ops->config(stream, stream->cc, &stream->qos,
ep_config_cb, stream->lpac->user_data);

return true;
}

Expand Down

0 comments on commit 2ec513f

Please sign in to comment.