Bluetooth: Audio: Add BAP broadcast sink support

Add support for the BAP broadcast sink role. This role
allows a device to sync to a broadcast ISO stream.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2022-01-10 15:34:37 +01:00 committed by Johan Hedberg
commit cf06fa85f2
6 changed files with 1087 additions and 4 deletions

View file

@ -149,6 +149,40 @@ config BT_AUDIO_BROADCAST_SRC_STREAM_COUNT
endif # BT_AUDIO_BROADCAST_SOURCE
config BT_AUDIO_BROADCAST_SINK
bool "Bluetooth Broadcast Sink Audio Support [EXPERIMENTAL]"
select EXPERIMENTAL
select BT_ISO_SYNC_RECEIVER
help
This option enables support for Bluetooth Broadcast Sink Audio using
Isochronous channels.
if BT_AUDIO_BROADCAST_SINK
config BT_AUDIO_BROADCAST_SUBGROUP_COUNT
int # hidden: TODO: Update once the API supports it
default 1
config BT_AUDIO_BROADCAST_SNK_COUNT
int "Basic Audio Broadcaster Sink count"
default 1
range 0 BT_ISO_MAX_BIG
help
This option sets the number of broadcast sinks to support.
One broadcast sink can receive multiple streams
(up to BT_AUDIO_BROADCAST_SNK_STREAM_COUNT per broadcast sink).
config BT_AUDIO_BROADCAST_SNK_STREAM_COUNT
int "Basic Audio Broadcast Sink Stream count"
depends on BT_AUDIO_BROADCAST_SNK_COUNT > 0
default 1
range 1 BT_ISO_MAX_CHAN
help
This option sets the maximum number of streams per broadcast sink
to support.
endif # BT_AUDIO_BROADCAST_SINK
config BT_AUDIO_DEBUG
bool "Enable debug logs"
depends on BT_DEBUG
@ -207,17 +241,25 @@ config BT_AUDIO_DEBUG_BROADCAST_SOURCE
Use this option to enable Bluetooth Audio Broadcast Source debug logs
for the Bluetooth Audio functionality.
config BT_AUDIO_DEBUG_BROADCAST_SINK
bool "Bluetooth Audio Broadcast Sink debug"
depends on BT_AUDIO_BROADCAST_SINK
help
Use this option to enable Bluetooth Audio Broadcast Sink debug logs
for the Bluetooth Audio functionality.
endif # BT_AUDIO_DEBUG
config BT_AUDIO_STREAM
# Virtual/hidden option
bool
default y if BT_ASCS || BT_AUDIO_UNICAST_CLIENT || BT_AUDIO_BROADCAST_SOURCE
default y if BT_ASCS || BT_AUDIO_UNICAST_CLIENT || \
BT_AUDIO_BROADCAST_SOURCE || BT_AUDIO_BROADCAST_SINK
config BT_AUDIO_CAPABILITIES
# Virtual/hidden option
bool
default y if BT_ASCS
default y if BT_ASCS || BT_AUDIO_BROADCAST_SINK
rsource "Kconfig.pacs"
rsource "Kconfig.ascs"