Skip to content

Commit

Permalink
samples: Bluetooth: Broadcast sink: Refactor audio RX path
Browse files Browse the repository at this point in the history
Refactor everything related to RX in the sample.
The existing code will moved to new files with more specific
functionality, so that each file will become cleaner and use
fewer #ifdefs.

The USB part will be refactored a bit to follow the design used
by the LE audio shell, to make it easier to maintain both in
a similar way.

Signed-off-by: Emil Gydesen <[email protected]>
  • Loading branch information
Thalley committed Jan 28, 2025
1 parent 4455cd7 commit 604bc35
Show file tree
Hide file tree
Showing 11 changed files with 1,304 additions and 482 deletions.
4 changes: 4 additions & 0 deletions samples/bluetooth/bap_broadcast_sink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ project(bap_unicast_server)

target_sources(app PRIVATE
src/main.c
src/stream_rx.c
)

zephyr_sources_ifdef(CONFIG_LIBLC3 src/lc3.c)
zephyr_sources_ifdef(CONFIG_USB_DEVICE_AUDIO src/usb.c)

zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth)
7 changes: 7 additions & 0 deletions samples/bluetooth/bap_broadcast_sink/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,11 @@ config TARGET_BROADCAST_CHANNEL
Channel Audio Location to sync to. These corresponds to the bt_audio_location,
supporting mono, left and right channels

config INFO_REPORTING_INTERVAL
int "Number of SDUs received between each information report"
default 1000
help
Determines how often information about received data is logged.
Set to 0 to disable reporting.

source "Kconfig.zephyr"
4 changes: 2 additions & 2 deletions samples/bluetooth/bap_broadcast_sink/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ CONFIG_BT_ISO_SYNC_RECEIVER=y
CONFIG_BT_BAP_BROADCAST_SINK=y
CONFIG_BT_BAP_SCAN_DELEGATOR=y
CONFIG_BT_ISO_MAX_CHAN=2
# Allocate 2 RX buffers per channel
CONFIG_BT_ISO_RX_BUF_COUNT=4
# Allocate 4 RX buffers per channel
CONFIG_BT_ISO_RX_BUF_COUNT=8
CONFIG_BT_BAP_BROADCAST_SNK_SUBGROUP_COUNT=2
CONFIG_BT_BAP_BROADCAST_SNK_STREAM_COUNT=2
CONFIG_BT_BAP_BASS_MAX_SUBGROUPS=2
Expand Down
Loading

0 comments on commit 604bc35

Please sign in to comment.