Bluetooth: Audio: Add BAP unicast client support

Add the BAP unicast client implementation. This role
can discover BAP unicast server services and initiate
BAP audio streams.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2022-01-10 13:57:08 +01:00 committed by Johan Hedberg
commit 59bafc430f
8 changed files with 2911 additions and 3 deletions

View file

@ -28,6 +28,17 @@ config BT_AUDIO_UNICAST_SERVER
This option enables support for Bluetooth Unicast Audio Server
using Isochronous channels.
config BT_AUDIO_UNICAST_CLIENT
bool "Bluetooth Unicast Audio Client Support [EXPERIMENTAL]"
select EXPERIMENTAL
select BT_AUDIO_UNICAST
select BT_CENTRAL
select BT_GATT_CLIENT
select BT_GATT_AUTO_DISCOVER_CCC
help
This option enables support for Bluetooth Unicast Audio Client
using Isochronous channels.
if BT_AUDIO_UNICAST
config BT_CODEC_MAX_DATA_COUNT
@ -62,6 +73,51 @@ config BT_CODEC_MAX_METADATA_LEN
This option defines the maximum value length of an LTV entry a
metadata can store.
if BT_AUDIO_UNICAST_CLIENT
config BT_AUDIO_UNICAST_CLIENT_GROUP_COUNT
int "Basic Audio Unicast Group count"
depends on BT_AUDIO_UNICAST
default BT_ISO_MAX_CIG
range 0 BT_ISO_MAX_CIG
help
This option sets the number of connected audio groups to support as
the unicast client.
config BT_AUDIO_UNICAST_CLIENT_GROUP_STREAM_COUNT
int "Basic Audio Unicast Group Stream count"
depends on BT_AUDIO_UNICAST_CLIENT_GROUP_COUNT > 0
default 1
range 0 BT_ISO_MAX_CHAN if BT_ISO_MAX_CHAN < 31
range 0 31
help
This option sets the maximum number of streams per unicast group
to support.
config BT_AUDIO_UNICAST_CLIENT_PAC_COUNT
int "Basic Audio Profile PAC count"
default 2
range 0 4
help
This option enables caching a number of Published Audio Capabilities
(PAC) for Basic Audio Profile on a per connection basis.
config BT_AUDIO_UNICAST_CLIENT_ASE_SNK_COUNT
int "Basic Audio Profile ASE Sink count"
default 2
range 0 2
help
This option enables caching a number of Audio Stream Endpoint Sink
instances for Basic Audio Profile on a per connection basis.
config BT_AUDIO_UNICAST_CLIENT_ASE_SRC_COUNT
int "Basic Audio Profile ASE Source count"
default 1
range 0 2
help
This option enables caching a number of Audio Stream Endpoint Source
instances for Basic Audio Profile on a per connection basis.
endif # BT_AUDIO_UNICAST_CLIENT
endif # BT_AUDIO_UNICAST
config BT_AUDIO_BROADCAST
@ -116,12 +172,19 @@ config BT_AUDIO_DEBUG_UNICAST_SERVER
Use this option to enable Bluetooth Audio Unicast Server debug logs
for the Bluetooth Audio functionality.
config BT_AUDIO_DEBUG_UNICAST_CLIENT
bool "Basic Audio Profile debug"
depends on BT_AUDIO_UNICAST_CLIENT
help
Use this option to enable Basic Audio Profile debug logs for the
Bluetooth Audio functionality.
endif # BT_AUDIO_DEBUG
config BT_AUDIO_STREAM
# Virtual/hidden option
bool
default y if BT_ASCS
default y if BT_ASCS || BT_AUDIO_UNICAST_CLIENT
config BT_AUDIO_CAPABILITIES
# Virtual/hidden option