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

samples: Add USB Audio to broadcast audio source #64601

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions samples/bluetooth/broadcast_audio_source/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,13 @@ config ENABLE_LC3
select LIBLC3
select FPU

config USE_USB_AUDIO_INPUT
bool "Use USB Audio as input"
# By default, use the USB Audio path is disabled.
default n
depends on ENABLE_LC3
Comment on lines +34 to +35
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rather than doing

CONFIG_USE_USB_AUDIO_INPUT=y

in samples/bluetooth/broadcast_audio_source/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf, you could follow the approach above and do

default y if SOC_NRF5340_CPUAPP

So that is is applied for both the regular and audio kit

select USB_DEVICE_STACK
select USB_DEVICE_AUDIO
select RING_BUFFER

source "Kconfig.zephyr"
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# The LC3 codec uses a large amount of stack. This app runs the codec in the work-queue, hence
# inctease stack size for that thread.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
CONFIG_MAIN_STACK_SIZE=4096

# Use USB Audio as input
CONFIG_USE_USB_AUDIO_INPUT=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr Broadcast Source"

Comment on lines +3 to +5
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would be interesting to find a way to set CONFIG_USB_DEVICE_PRODUCT="Zephyr Broadcast Source" for any device that enables USB, and not just the nRF5340 ADK

# Two streams in one subgroup (stereo)
CONFIG_BT_BAP_BROADCAST_SRC_SUBGROUP_COUNT=1
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
# The LC3 codec uses a large amount of stack. This app runs the codec in the work-queue, hence
# inctease stack size for that thread.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
CONFIG_MAIN_STACK_SIZE=4096
2 changes: 0 additions & 2 deletions samples/bluetooth/broadcast_audio_source/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ CONFIG_BT_ISO_TX_BUF_COUNT=4
CONFIG_BT_ISO_TX_MTU=60

CONFIG_BT_DEVICE_NAME="Broadcast Audio Source"

CONFIG_BT_TINYCRYPT_ECC=y
larsgk marked this conversation as resolved.
Show resolved Hide resolved
Loading
Loading