Skip to content

Commit f54991b

Browse files
Thalleykartben
authored andcommitted
samples: Bluetooth: Broadcast sink: Refactor audio RX path
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]>
1 parent 10e12ba commit f54991b

File tree

11 files changed

+1304
-482
lines changed

11 files changed

+1304
-482
lines changed

samples/bluetooth/bap_broadcast_sink/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ project(bap_unicast_server)
66

77
target_sources(app PRIVATE
88
src/main.c
9+
src/stream_rx.c
910
)
1011

12+
zephyr_sources_ifdef(CONFIG_LIBLC3 src/lc3.c)
13+
zephyr_sources_ifdef(CONFIG_USB_DEVICE_AUDIO src/usb.c)
14+
1115
zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth)

samples/bluetooth/bap_broadcast_sink/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,11 @@ config TARGET_BROADCAST_CHANNEL
8080
Channel Audio Location to sync to. These corresponds to the bt_audio_location,
8181
supporting mono, left and right channels
8282

83+
config INFO_REPORTING_INTERVAL
84+
int "Number of SDUs received between each information report"
85+
default 1000
86+
help
87+
Determines how often information about received data is logged.
88+
Set to 0 to disable reporting.
89+
8390
source "Kconfig.zephyr"

samples/bluetooth/bap_broadcast_sink/prj.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ CONFIG_BT_ISO_SYNC_RECEIVER=y
1212
CONFIG_BT_BAP_BROADCAST_SINK=y
1313
CONFIG_BT_BAP_SCAN_DELEGATOR=y
1414
CONFIG_BT_ISO_MAX_CHAN=2
15-
# Allocate 2 RX buffers per channel
16-
CONFIG_BT_ISO_RX_BUF_COUNT=4
15+
# Allocate 4 RX buffers per channel
16+
CONFIG_BT_ISO_RX_BUF_COUNT=8
1717
CONFIG_BT_BAP_BROADCAST_SNK_SUBGROUP_COUNT=2
1818
CONFIG_BT_BAP_BROADCAST_SNK_STREAM_COUNT=2
1919
CONFIG_BT_BAP_BASS_MAX_SUBGROUPS=2

0 commit comments

Comments
 (0)