-
Notifications
You must be signed in to change notification settings - Fork 8.2k
LE Audio: BAP scan delegator #51679
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
Merged
carlescufi
merged 31 commits into
zephyrproject-rtos:main
from
Thalley:bap_scan_delegator
Apr 11, 2023
Merged
LE Audio: BAP scan delegator #51679
carlescufi
merged 31 commits into
zephyrproject-rtos:main
from
Thalley:bap_scan_delegator
Apr 11, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94b4169 to
aebbcef
Compare
813dbf3 to
1c06e90
Compare
276fd81 to
93862b1
Compare
The scan delegator will no longer be responsible for handling the actual synchronization of the periodic advertisers, and will offload this to higher layers. The reason for this, is that scanning is a global state, and should be avoided autonousmly by the stack. The application is much better suited for handling this. Signed-off-by: Emil Gydesen <[email protected]>
Add a callback that is called when the broadcast assistant supplies a broadcast code. Signed-off-by: Emil Gydesen <[email protected]>
The requested_bis_sync value is not part of the BASS receive state. Moving the field makes it possible to use the recv_state struct in more situations. Signed-off-by: Emil Gydesen <[email protected]>
The bt_bap_scan_delegator_remove_source failed due to invalid length, as the buffer supplied to scan_delegator_rem_src should not contain the opcode. Signed-off-by: Emil Gydesen <[email protected]>
Add support for adding a source from the scan delegator itself. This is useful if e.g. the broadcast sink syncs to a PA. Signed-off-by: Emil Gydesen <[email protected]>
The check did not work when aggregated_bis_syncs was 0. Also modfied the function to be more readable. Signed-off-by: Emil Gydesen <[email protected]>
Add a test case that tests the scan delegator and broadcast assistant features when the scan delegator syncs to a PA without being asked to by the broadcast assistant. Signed-off-by: Emil Gydesen <[email protected]>
Add BSIM testing for bt_bap_scan_delegator_set_bis_sync_state. Signed-off-by: Emil Gydesen <[email protected]>
The scan delegator attempted to put the subgroup pointer into the metadata data, instead of the metadata. Signed-off-by: Emil Gydesen <[email protected]>
Add function for the scan delegator to modify the metadata of a receive state locally. Signed-off-by: Emil Gydesen <[email protected]>
Add testing fo the scan delegator mod source functionality. Signed-off-by: Emil Gydesen <[email protected]>
Add command for the scan delegator to add a source locally based on a PA sync. Signed-off-by: Emil Gydesen <[email protected]>
Add cmd_bap_scan_delegator_mod_src to modify a BASS receive state source as the scan delegator in the shell. Signed-off-by: Emil Gydesen <[email protected]>
Add the cmd_bap_scan_delegator_rem_src to remove receive state sources locally as the Scan Delegator. Signed-off-by: Emil Gydesen <[email protected]>
…tate The field is added/modified by bt_bap_scan_delegator_add_src and bt_bap_scan_delegator_mod_src. This makes it easier to modify the BIG sync state, without worrying about the encryption state. Signed-off-by: Emil Gydesen <[email protected]>
Add bt_bap_scan_delegator_foreach_state and bt_bap_scan_delegator_find_state to support finding specific receive states. Signed-off-by: Emil Gydesen <[email protected]>
This integrates the Scan Delegator functionality with the Broadcast Sink functionality. The Broadcast Sink will automatically update the receive state for the PA and BIG sync values, based on state of the Broadcast Sink. Similarly, a request to terminate the BIG or PA sync from a Broadcast Assistant will terminate the Broadcast Sinks' PA or BIG syncs. Signed-off-by: Emil Gydesen <[email protected]>
Add support to create a broadcast sink from a PA sync, rather than using the broadcast sink scan functions. This allows for the scan delegator implementation to autonoumsly add broadcast sinks. This refactors how the broadcast sink uses flags, to ensure thread safetyness. Signed-off-by: Emil Gydesen <[email protected]>
Add callback to notify the application about which BIS it should sync to when requested by the Broadcast Asssitant. Signed-off-by: Emil Gydesen <[email protected]>
Add support for the Scan Delegator for the Broadcast Audio Sink sample. This include advertising connectable as well as handling PAST. Signed-off-by: Emil Gydesen <[email protected]>
Added command to terminate the PA sync as the scan delegator. This can also be used to cancel any pending PA syncs. Signed-off-by: Emil Gydesen <[email protected]>
add the `bap_` prefix for the BAP BASS tests. Signed-off-by: Emil Gydesen <[email protected]>
Modify the BAP Scan Delegator test to only use the FLAG macros, instead of volatile booleans, to be more similar to the other LE Audio BSIM tests. Signed-off-by: Emil Gydesen <[email protected]>
Modify the BAP Broadcast Assistant test to only use the FLAG macros, instead of volatile booleans, to be more similar to the other LE Audio BSIM tests. Signed-off-by: Emil Gydesen <[email protected]>
371a18b to
9ebfefc
Compare
sjanc
approved these changes
Apr 6, 2023
szymon-czapracki
approved these changes
Apr 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Heavily refactors the existing scan delegator implementation.
The main points are to move the PA and BIS sync out from the stack, and into the application. This allows for more flexibility, and avoids numerous issues that could appear with the existing implementation (e.g. handling the scan state).
Fixes #41183
Depends on #51308