Skip to content
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

LE Audio: broadcast callbacks #75491

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Thalley
Copy link
Collaborator

@Thalley Thalley commented Jul 5, 2024

Add callbacks that affect the entire broadcast groups

fixes #75252

@Thalley Thalley changed the title LE Audio: BAP broadcast callbacks LE Audio: broadcast callbacks Jul 5, 2024
@Thalley Thalley force-pushed the bap_broadcast_callbacks branch 3 times, most recently from af68d36 to a8a8b47 Compare July 5, 2024 18:44
@Thalley Thalley marked this pull request as ready for review July 5, 2024 20:20
@Thalley Thalley added this to the v4.0.0 milestone Jul 5, 2024
@Thalley
Copy link
Collaborator Author

Thalley commented Jul 7, 2024

There is dependencies in the commits, but this PR can split into multiple smaller ones if requested by reviewers

kruithofa
kruithofa previously approved these changes Jul 9, 2024
kruithofa
kruithofa previously approved these changes Sep 3, 2024
@Thalley
Copy link
Collaborator Author

Thalley commented Sep 9, 2024

Rebased to solve merge conflicts

@Thalley Thalley force-pushed the bap_broadcast_callbacks branch 2 times, most recently from 6b97df9 to 94f8aa9 Compare September 18, 2024 10:00
@Thalley Thalley marked this pull request as draft September 18, 2024 15:58
@Thalley
Copy link
Collaborator Author

Thalley commented Sep 18, 2024

Converted to draft until CI issue is fixed

@Thalley Thalley force-pushed the bap_broadcast_callbacks branch 6 times, most recently from 21db00c to 171c4a8 Compare September 19, 2024 10:56
@Thalley
Copy link
Collaborator Author

Thalley commented Sep 19, 2024

Confirmed to be a controller issue:

This is the valgrind report on the segfault:

d_00: @00:00:26.415894  Stopping broadcast sink 0x853f9e0
d_00: @00:00:26.415894  [00:00:26.415,893] <err> bt_bap_broadcast_sink: bt_bap_broadcast_sink_stop: sink->big 0x853f9e0 0x850a420
==148372== Thread 8:
==148372== Jump to the invalid address stated on the next line
==148372==    at 0x0: ???
==148372==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==148372== 
==148372== 
==148372== Process terminating with default action of signal 11 (SIGSEGV)
==148372==  Bad permissions for mapped region at address 0x0
==148372==    at 0x0: ???
==148372==

The callstack is:

0x0	
isoal_rx_append_to_sdu() at subsys/bluetooth/controller/ll_sw/isoal.c:696 0x8354543	
isoal_rx_unframed_consume() at subsys/bluetooth/controller/ll_sw/isoal.c:954 0x8355530	
isoal_rx_pdu_recombine() at subsys/bluetooth/controller/ll_sw/isoal.c:1,422 0x8356b37	
encode_node() at subsys/bluetooth/controller/hci/hci_driver.c:511 0x83014fa	
process_node() at subsys/bluetooth/controller/hci/hci_driver.c:575 0x830163a	
recv_thread() at subsys/bluetooth/controller/hci/hci_driver.c:721 0x830193a	

@Thalley Thalley force-pushed the bap_broadcast_callbacks branch 2 times, most recently from 381721f to b14a38a Compare September 24, 2024 16:15
Add callbacks that is called for the entire BIG.
The BIG state is from an HCI perspective a single state change
that we previously only propagated as a state change for each
channel.

However it may be simpler for applications and higher layers
to use BIG changes to trigger their behavior.

Signed-off-by: Emil Gydesen <[email protected]>
These callbacks are trigger for changes that affect the entire
broadcast source, such as the BIG started and terminated events.

Signed-off-by: Emil Gydesen <[email protected]>
These callbacks are trigger for changes that affect the entire
broadcast source, such as the BIG started and terminated events.

Signed-off-by: Emil Gydesen <[email protected]>
These callbacks are trigger for changes that affect the entire
broadcast sink, such as the BIG synced and terminated events.

Signed-off-by: Emil Gydesen <[email protected]>
Use the broadcast source callbacks to set the semaphores
rather than the stream callbacks, as the broadcast source callbacks
are better for that as they are called when all streams are ready.

Signed-off-by: Emil Gydesen <[email protected]>
Use the broadcast sink callbacks to set the semaphores
rather than the stream callbacks, as the broadcast sink callbacks
are better for that as they are called when all streams are ready.

Signed-off-by: Emil Gydesen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

Bluetooth: BAP: Add broadcast sink/source callback structs
3 participants