-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Open
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: APIChanges to public APIsChanges to public APIsarea: Bluetootharea: Bluetooth Audio
Description
Summary
The struct bt_bap_ep *ep already belongs to a specific bt_conn where it was discovered. The conn argument is thus not necessary, as we can always do a lookup on bt_conn from the endpoint (but not vice versa, since a single conn may have multiple endpoints)>
Describe the solution you'd like
Remove the conn argument from bt_bap_stream_config:
int bt_bap_stream_config(struct bt_conn *conn, struct bt_bap_stream *stream, struct bt_bap_ep *ep,
struct bt_audio_codec_cfg *codec_cfg);to
int bt_bap_stream_config(struct bt_bap_stream *stream, struct bt_bap_ep *ep,
struct bt_audio_codec_cfg *codec_cfg);This will also affect and simplify some CAP parameters and checks, and, as an added bonus, make the API easier to use as the application does not need to keep manual track of connection objects and endpoints.
Since a bt_bap_stream will always have an ep when configured, it is also possible to remove
/** Connection reference */
struct bt_conn *conn;from struct bt_bap_stream and have users use bt_bap_ep_get_conn from #96365
Alternatives
No response
Additional Context
No response
Metadata
Metadata
Assignees
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: APIChanges to public APIsChanges to public APIsarea: Bluetootharea: Bluetooth Audio
Type
Projects
Status
To do