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

Add implementation for Public Broadcast Profile and dedicated sample apps #60777

Conversation

andreeaDumitrache
Copy link
Contributor

@andreeaDumitrache andreeaDumitrache commented Jul 25, 2023

PBP API allows sources to create a Public Broadcast Announcement.
PBP API to parse a Public Broadcast Announcement.

public_broadcast_source application starts extended advertising and
includes a Public Broadcast Announcement. The advertised broadcast
audio stream quality will cycle between high and standard quality.

public_broadcast_sink application scans for broadcast sources and
synchronizes to the first found source which defines a Public Broadcast
Announcement including a High Quality Public Broadcast Audio Stream
configuration.

Add bsim tests for Public Broadcast Profile APIs.

Add shell implementation for Public Broadcast Profile APIs.

fixes #41226

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello @andreeaDumitrache, and thank you very much for your first pull request to the Zephyr project!

A project maintainer just triggered our CI pipeline to run it against your PR and ensure it's compliant and doesn't cause any issues. You might want to take this opportunity to review the project's Contributor Expectations and make any updates to your pull request if necessary. 😊

Copy link
Member

@aescolar aescolar left a comment

Choose a reason for hiding this comment

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

@andreeaDumitrache

tests/bsim/bluetooth/audio/test_scripts/pbp.sh

Remember to give execute permissions to that new script

@kartben kartben requested review from kartben and removed request for szymon-czapracki July 26, 2023 00:47
include/zephyr/bluetooth/audio/pbp.h Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
Comment on lines 21 to 40
enum bt_pbp_encryption {
BT_PBP_STREAMS_NOT_ENCRYPTED = 0,
BT_PBP_STREAMS_ENCRYPTED = 1,
};

enum bt_pbp_quality {
BT_PBP_AUDIO_CONFIG_NOT_PRESENT = 0,
BT_PBP_AUDIO_CONFIG_PRESENT = 1,
};

enum bt_pbp_announcement_features {
BT_PBP_ANNOUNCEMENT_FEATURE_ENCRYPTION = BIT(0),
BT_PBP_ANNOUNCEMENT_FEATURE_STANDARD_QUALITY = BIT(1),
BT_PBP_ANNOUNCEMENT_FEATURE_HIGH_QUALITY = BIT(2),
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing Doxygen comments?

@andreeaDumitrache andreeaDumitrache force-pushed the add_public_broadcast_profile branch 3 times, most recently from d93b9ff to 036ceac Compare July 27, 2023 14:12
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
subsys/bluetooth/audio/pbp.c Outdated Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
subsys/bluetooth/audio/pbp.c Outdated Show resolved Hide resolved
subsys/bluetooth/audio/pbp.c Outdated Show resolved Hide resolved
Copy link
Collaborator

@Thalley Thalley left a comment

Choose a reason for hiding this comment

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

I've only reviewed the public header file so far.

I don't think the functions supplied in that file really warrant a pbp.c implementation, as the functions do not really implement any requirements from the PBP spec, but do require significant amount of memory for very simple things that probably are best left up to the application.

Let's discuss and resolve my comments before I start reviewing the samples, tests and implementation

include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
@andreeaDumitrache andreeaDumitrache force-pushed the add_public_broadcast_profile branch 3 times, most recently from 3372312 to 0417393 Compare December 5, 2023 12:03
Copy link
Collaborator

@Thalley Thalley left a comment

Choose a reason for hiding this comment

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

Looks pretty good now. Some final comments regarding the passing and generation of the PBA

subsys/bluetooth/audio/pbp.c Outdated Show resolved Hide resolved
subsys/bluetooth/audio/pbp.c Outdated Show resolved Hide resolved
subsys/bluetooth/audio/pbp.c Outdated Show resolved Hide resolved
subsys/bluetooth/audio/Kconfig.pbp Outdated Show resolved Hide resolved
subsys/bluetooth/audio/pbp.c Outdated Show resolved Hide resolved
subsys/bluetooth/audio/shell/pbp.c Outdated Show resolved Hide resolved
subsys/bluetooth/audio/shell/pbp.c Outdated Show resolved Hide resolved
@andreeaDumitrache andreeaDumitrache changed the title Add implementation for Public Broadcast Profile and update TMAP broadcast sample apps Add implementation for Public Broadcast Profile and dedicated sample apps Dec 6, 2023
@andreeaDumitrache andreeaDumitrache force-pushed the add_public_broadcast_profile branch 5 times, most recently from 9bc7642 to cbec895 Compare December 13, 2023 13:17
Copy link
Collaborator

@Thalley Thalley left a comment

Choose a reason for hiding this comment

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

A few minor comments to the header file, otherwise LGTM

include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
include/zephyr/bluetooth/audio/pbp.h Outdated Show resolved Hide resolved
PBP API allows sources to create a Public Broadcast Announcement.
PBP API to parse a Public Broadcast Announcement.

public_broadcast_source application starts extended advertising and
includes a Public Broadcast Announcement. The advertised broadcast
audio stream quality will cycle between high and standard quality.

public_broadcast_sink application scans for broadcast sources and
synchronizes to the first found source which defines a Public Broadcast
Announcement including a High Quality Public Broadcast Audio Stream
configuration.

Add bsim tests for Public Broadcast Profile APIs.

Add shell implementation for Public Broadcast Profile APIs.

Signed-off-by: Daniela Andreea Dumitrache <[email protected]>
@Thalley
Copy link
Collaborator

Thalley commented Dec 19, 2023

@kartben Will you approve or remove your change request so we can get this merged please?

@Thalley
Copy link
Collaborator

Thalley commented Jan 9, 2024

@kartben please re-review or dismiss your review :)

Copy link
Collaborator

@kartben kartben left a comment

Choose a reason for hiding this comment

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

Nice to see Bluetooth samples using zephyr:code-sample sphinx directive!

@kartben
Copy link
Collaborator

kartben commented Jan 9, 2024

@kartben please re-review or dismiss your review :)

Missed this before the holidays, sorry

@carlescufi carlescufi merged commit 3bfb2e3 into zephyrproject-rtos:main Jan 9, 2024
21 checks passed
Copy link

github-actions bot commented Jan 9, 2024

Hi @andreeaDumitrache!
Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a fantastic achievement, and we're thrilled to have you as part of our community!

To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge.

Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁

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

Successfully merging this pull request may close these issues.

LE Audio: Public Broadcast Profile (PBP)
8 participants