-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Bluetooth: BAP: BA: Refactor discover to not do read #91587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Bluetooth: BAP: BA: Refactor discover to not do read #91587
Conversation
953bea5
to
ec091ef
Compare
ec091ef
to
34ffd28
Compare
@Thalley can you update this to target 4.3 migration guide? |
34ffd28
to
d3a7ba6
Compare
Should the bap_broadcast_assistant sample also be updated? |
d3a7ba6
to
daa2496
Compare
Updated the sample |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request refactors the Bluetooth BAP Broadcast Assistant discover function to simplify its behavior by removing automatic receive state reads at the end of discovery. This breaking change requires users to manually read receive states using the existing API if needed.
- Simplified
bt_bap_broadcast_assistant_discover
to only perform discovery without automatic receive state reads - Removed complex read callback logic that handled both discovery and receive state operations
- Updated sample application to manually read receive states after discovery completion
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
subsys/bluetooth/audio/bap_broadcast_assistant.c | Refactored discover function and simplified read callback by removing automatic receive state reads |
samples/bluetooth/bap_broadcast_assistant/src/main.c | Added manual receive state reading after discovery to maintain functionality |
doc/releases/migration-guide-4.3.rst | Documented the breaking change for users |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
8cf296d
to
03db072
Compare
Rebased to solve merge conflicts |
b8d2459
to
59ddb60
Compare
272229b
to
572875b
Compare
The failing test passes locally. I've tried a few different offsets and random seeds, but can't really find something that passes locally and in CI :( |
572875b
to
8f353cb
Compare
8f353cb
to
71f1041
Compare
71f1041
to
074a719
Compare
Refactor the bt_bap_broadcast_assistant_discover function to not read receives at the end of discovery. This makes the function more true to what it is supposed to do, and significantly reduces the complexity of the procedure and the read callback. Users will be required to, if wanted, to read the receive state themselves with the existing bt_bap_broadcast_assistant_read_recv_state. The start_offset had to be modified to avoid issues with PA sync. Signed-off-by: Emil Gydesen <[email protected]>
Once the BASS has been discovered, the sample will now attempt to read all the receive states on the remote device. The receive states will only be logged, and the sample will not (yet) perform any logic on them (to e.g. determiner whether it needs to perform a remove source operation before the add source, or perform a modify source). That behavior is postponed to a future commit, as the purpose of this is to showcase reading the receive states. Signed-off-by: Emil Gydesen <[email protected]>
Modify and add some printk statements for the tests, as some were missing the newline. Signed-off-by: Emil Gydesen <[email protected]>
When using PAST, it is best not to use an ACL that is a multiple of the PA or ISO interval to avoid overlaps. Signed-off-by: Emil Gydesen <[email protected]>
074a719
to
cbd41a5
Compare
|
Refactor the bt_bap_broadcast_assistant_discover function to not read receives at the end of discovery.
This makes the function more true to what it is supposed to do, and significantly reduces the complexity of the procedure and the read callback.
Users will be required to, if wanted, to read the
receive state themselves with the existing
bt_bap_broadcast_assistant_read_recv_state.