Skip to content

Conversation

rasmushoeg
Copy link

This PR introduces the initial version of the bap_broadcast_snk.c module, which implements the Bluetooth Basic Audio Profile (BAP) broadcast sink functionality.

Key features:
Handles PA sync, BASE reception, BIS sync, and stream lifecycle
Integrates with broadcast assistant and scan delegator callbacks
Prepares the system for future thread-based state machine integration

This module is foundational for receiving and processing Broadcast Isochronous Streams (BIS) in BAP.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend that we remove these two empty lines

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we only more ad data and a call to init_bap_sink (an api call that should handle its own dependencies), I have a hard time to understand why all these new includes are needed. We should probably take a look and see which ones we dont need to add here :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we add this? I cant see this function implementation added

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it also seems to be a copy'n'paste thing (look below)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The static here was removed so that it could be reached in bap_broadcast_snk.c as I understand. Since default_conn is only used for NULL checks there, I would suggest to see if it makes sense to replace those checks with api calls to bap_unicast_sr.c instead, since default_conn "belongs" to this file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed it back.
Now it's called over the bap_unicast_sr.h - which refs bap_unicast_sr_has_connection.
I don't know if that is what you had in mind.
Please provide feedback, so i can adjust it to a better solution. :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since a lot of this code has been copied, the original Copyright note must be here as well, all the notices from the original file(s).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

endchoice # HAP_HA_HEARING_AID_LOCATION

endmenu
endmenu
Copy link
Contributor

@larsgk larsgk Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing newline - but in any case... now there are no real changes to the file, so maybe just discard it from the commit?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
Adjusted back.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forced pushed
I'm not sure why it stays? As i believe it has been adjusted back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

the last line has a space removed

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does give an error with the checkpatch.
Should i just ignore that? : )

This PR adds the initial base functionality of the broadcast sink.
The functionality is test on a NRF5340 audio.

Signed-off-by: Rasmus Moeller <[email protected]>
Copy link

sonarqubecloud bot commented Oct 6, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants