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

Bluetooth samples: Add USB Audio to Broadcast Sink sample #65014

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

fredrikdanebjer
Copy link
Contributor

Added USB Audio output for the Broadcast Sink sample. In addition offloading of the LC3 codec was also made.

@@ -15,4 +15,8 @@ CONFIG_BT_BUF_ACL_TX_SIZE=251

CONFIG_BT_DEVICE_NAME="Broadcast Audio Sink"

CONFIG_BT_TINYCRYPT_ECC=y
# LC3 Needs these
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know we should not add these, as they are board specific to whatever board we have that will be using LC3, however I need some input from reviewers on how to solve this properly.

There are two issues:

  1. I have added these here since the BSIM zephyr/tests/bsim/bluetooth/audio_samples/broadcast_audio_sink/tests_scripts/broadcast_audio.sh will by default compile to nrf53_bsim, which today will not pick up the board specific conf file.

If I do overwrite the current overlay file (which I dont want, I want to append it), it will also:

  1. pick the USB component (as it should), however it will then not be able to find the USB device in the device tree. I'm not really sure how to overcome this, as there are currently no examples on how to add a dtsi file when compiling for BSIM.

And and all help would be appreciated!

@aescolar , @Thalley , @MariuszSkamra , @larsgk

samples/bluetooth/broadcast_audio_sink/Kconfig Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Jan 23, 2024
@larsgk larsgk removed the Stale label Jan 23, 2024
@fredrikdanebjer fredrikdanebjer marked this pull request as draft January 24, 2024 07:54
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, so aside from the stereo/mono things, it looks pretty good

samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
@larsgk
Copy link
Contributor

larsgk commented Jan 24, 2024

I can add that I tried this draft PR on an nRF5340 Audio DK, stressing it as much as I could today (connect/disconnect/restarting source) and it has not failed yet. Audio was crisp and clear when reconnecting to the source.

@fredrikdanebjer fredrikdanebjer marked this pull request as ready for review January 26, 2024 14:52
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.

The sample is still in some weird limbo state between support multiple streams only a single stream.

The existing parts that supports multiple streams should not be reduced to a single stream, simply because we add USB support.

samples/bluetooth/broadcast_audio_sink/Kconfig Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/Kconfig Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/Kconfig Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/Kconfig Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/Kconfig Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.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.

One minor comment left, otherwise LGTM

samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
samples/bluetooth/broadcast_audio_sink/src/main.c Outdated Show resolved Hide resolved
Added USB Audio output for the Broadcast Sink sample. In addition
offloading of the LC3 codec was also made. The sample supports only
mono, and a KConfig option was added to configure which audio
location to sync to.

Signed-off-by: Fredrik Danebjer <[email protected]>
@carlescufi carlescufi merged commit c948f83 into zephyrproject-rtos:main Feb 1, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants