1# Bluetooth Audio - Basic Audio Profile configuration options 2# 3# Copyright (c) 2020 Intel Corporation 4# Copyright (c) 2022-2023 Nordic Semiconductor ASA 5 6# SPDX-License-Identifier: Apache-2.0 7# 8 9config BT_BAP_UNICAST 10 def_bool BT_BAP_UNICAST_SERVER || BT_BAP_UNICAST_CLIENT 11 12config BT_BAP_UNICAST_SERVER 13 bool "Bluetooth Unicast Audio Server Support" 14 depends on BT_GATT_DYNAMIC_DB 15 depends on BT_GATT_CACHING 16 depends on BT_PERIPHERAL 17 depends on BT_ISO_PERIPHERAL 18 depends on BT_ASCS 19 depends on BT_BONDABLE 20 select BT_PAC_SRC if BT_ASCS_ASE_SNK 21 select BT_PAC_SNK if BT_ASCS_ASE_SRC 22 help 23 This option enables support for Bluetooth Unicast Audio Server 24 using Isochronous channels. 25 26config BT_BAP_UNICAST_CLIENT 27 bool "Bluetooth Unicast Audio Client Support" 28 depends on BT_GATT_CLIENT 29 depends on BT_GATT_AUTO_DISCOVER_CCC 30 depends on BT_GATT_AUTO_UPDATE_MTU 31 depends on BT_CENTRAL 32 depends on BT_ISO_CENTRAL 33 depends on BT_BONDABLE 34 help 35 This option enables support for Bluetooth Unicast Audio Client 36 using Isochronous channels. 37 38config BT_AUDIO_CODEC_CFG_MAX_DATA_SIZE 39 int "Codec Specific Configuration Data Size" 40 default 19 41 range 0 $(UINT8_MAX) 42 help 43 Number of octets to support for Codec Specific Configuration data. 44 The default value 19 matches the required fields for the LC3 codec. 45 46config BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE 47 int "Codec Specific Configuration Metadata Size" 48 default 4 49 range 0 $(UINT8_MAX) 50 help 51 Number of octets to support for Codec Specific Configuration metadata. 52 53config BT_BAP_BASS_MAX_SUBGROUPS 54 int "Maximum number of subgroups supported for the BASS receive states" 55 default 1 56 range 1 24 57 help 58 This option sets the maximum number of subgroups supported. 59 Due to limitations in advertising data, the maximum size of all subgroups are 249. 60 The minimum size of a subgroup is 10 octets. 61 So effectively there can be a maximum of 24 subgroups in a BASE. 62 63config BT_AUDIO_CODEC_CAP_MAX_DATA_SIZE 64 int "Codec Capabilities Data Size" 65 default 19 66 range 0 $(UINT8_MAX) 67 help 68 Number of octets to support for Codec Specific Capabilities data. 69 The default value 19 matches the required fields for the LC3 codec. 70 71config BT_AUDIO_CODEC_CAP_MAX_METADATA_SIZE 72 int "Codec Capabilities Metadata Size" 73 default 4 74 range 0 $(UINT8_MAX) 75 help 76 Number of octets to support for Codec Specific Capabilities metadata. 77 78if BT_BAP_UNICAST_CLIENT 79config BT_BAP_UNICAST_CLIENT_GROUP_COUNT 80 int "Basic Audio Unicast Group count" 81 default BT_ISO_MAX_CIG 82 range 1 BT_ISO_MAX_CIG 83 help 84 This option sets the number of connected audio groups to support as 85 the unicast client. 86 87config BT_BAP_UNICAST_CLIENT_GROUP_STREAM_COUNT 88 int "Basic Audio Profile Unicast Group Connected Isochronous Stream (CIS) count" 89 depends on BT_BAP_UNICAST_CLIENT_GROUP_COUNT > 0 90 default 1 91 range 1 BT_ISO_MAX_CHAN if BT_ISO_MAX_CHAN < 31 92 range 1 31 93 help 94 This option sets the maximum number of CIS per unicast group to support. 95 Since BAP streams are unidirectional, two BAP streams may use a single CIS, the number of 96 BAP audio streams per group may be up to twice of this value. 97 98config BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT 99 int "Basic Audio Profile ASE Sink count" 100 default 2 101 range 0 $(UINT8_MAX) 102 help 103 This option enables caching a number of Audio Stream Endpoint Sink 104 instances for Basic Audio Profile on a per connection basis. 105 106config BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT 107 int "Basic Audio Profile ASE Source count" 108 default 2 109 range 0 $(UINT8_MAX) 110 help 111 This option enables caching a number of Audio Stream Endpoint Source 112 instances for Basic Audio Profile on a per connection basis. 113 114config BT_BAP_UNICAST_CLIENT_ASE_SNK 115 def_bool BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT > 0 116 117config BT_BAP_UNICAST_CLIENT_ASE_SRC 118 def_bool BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT > 0 119 120endif # BT_BAP_UNICAST_CLIENT 121 122config BT_BAP_BROADCAST_SOURCE 123 bool "Bluetooth Broadcast Source Audio Support" 124 depends on BT_ISO_BROADCASTER 125 help 126 This option enables support for Bluetooth Broadcast Source Audio using 127 Isochronous channels. 128if BT_BAP_BROADCAST_SOURCE 129 130config BT_BAP_BROADCAST_SRC_SUBGROUP_COUNT 131 int "Basic Audio Broadcast Source subgroup count" 132 default 1 133 range 1 BT_ISO_MAX_CHAN if BT_ISO_MAX_CHAN < 31 134 range 1 31 135 help 136 This option sets the maximum number of subgroups per broadcast source 137 to support. 138 139config BT_BAP_BROADCAST_SRC_COUNT 140 int "Basic Audio Broadcaster source count" 141 default 1 142 range 1 BT_ISO_MAX_BIG 143 help 144 This option sets the number of broadcast sources to support. 145 One broadcast source can send multiple streams 146 (up to BT_BAP_BROADCAST_SRC_STREAM_COUNT per broadcast source). 147 148 149config BT_BAP_BROADCAST_SRC_STREAM_COUNT 150 int "Basic Audio Broadcast Source Stream count" 151 default 1 152 range 1 BT_ISO_MAX_CHAN if BT_ISO_MAX_CHAN < 31 153 range 1 31 154 help 155 This option sets the maximum number of streams per broadcast source 156 to support. 157 158endif # BT_BAP_BROADCAST_SOURCE 159 160config BT_BAP_BROADCAST_SINK 161 bool "Bluetooth Broadcast Sink Audio Support" 162 depends on BT_ISO_SYNC_RECEIVER 163 depends on BT_PAC_SNK 164 depends on BT_PERIPHERAL 165 depends on BT_BAP_SCAN_DELEGATOR 166 help 167 This option enables support for Bluetooth Broadcast Sink Audio using 168 Isochronous channels. 169 170if BT_BAP_BROADCAST_SINK 171 172config BT_BAP_BROADCAST_SNK_SUBGROUP_COUNT 173 int "Basic Audio Profile Broadcast Sink subgroup count" 174 default BT_BAP_BASS_MAX_SUBGROUPS 175 range 1 BT_BAP_BASS_MAX_SUBGROUPS 176 help 177 This option sets the maximum number of subgroups per broadcast sink 178 to support. 179 180config BT_BAP_BROADCAST_SNK_COUNT 181 int "Basic Audio Broadcaster Sink count" 182 default 1 183 range 0 BT_ISO_MAX_BIG 184 help 185 This option sets the number of broadcast sinks to support. 186 One broadcast sink can receive multiple streams 187 (up to BT_BAP_BROADCAST_SNK_STREAM_COUNT per broadcast sink). 188 189config BT_BAP_BROADCAST_SNK_STREAM_COUNT 190 int "Basic Audio Broadcast Sink Stream count" 191 depends on BT_BAP_BROADCAST_SNK_COUNT > 0 192 default 1 193 range 1 BT_ISO_MAX_CHAN if BT_ISO_MAX_CHAN < 31 194 range 1 31 195 help 196 This option sets the maximum number of streams per broadcast sink 197 to support. 198 199endif # BT_BAP_BROADCAST_SINK 200 201config BT_BAP_SCAN_DELEGATOR 202 bool "Basic Audio Profile Scan Delegator role support" 203 depends on BT_EXT_ADV 204 depends on BT_PER_ADV_SYNC 205 depends on BT_ISO_SYNC_RECEIVER 206 depends on BT_OBSERVER 207 depends on BT_GATT_DYNAMIC_DB 208 depends on BT_BONDABLE 209 help 210 This option enables support for the Scan Delegator role and the 211 Broadcast Audio Scan Service (BASS). 212 213if BT_BAP_SCAN_DELEGATOR 214 215config BT_BAP_SCAN_DELEGATOR_RECV_STATE_COUNT 216 int "Scan Delegator Receive State Count" 217 default 1 218 range 1 3 219 help 220 Sets the number of receive state characteristics present on the 221 server. Each characteristic may hold information to sync to a 222 periodic advertise or a broadcast isochronous stream. 223 224config BT_BAP_SCAN_DELEGATOR_BUF_TIMEOUT 225 int "Milliseconds of timeout when handle concurrent access to the long read ASE buffer" 226 range 0 1000 227 default 50 228 help 229 The maximum number of milliseconds that the scan delegator implementation will wait 230 before rejecting a read or dropping a notification if the scan delegator state is 231 being accessed by another thread. 232 233endif # BT_BAP_SCAN_DELEGATOR 234 235config BT_BAP_BROADCAST_ASSISTANT 236 bool "Basic Audio Profile Broadcast Assistant role support" 237 depends on BT_EXT_ADV 238 depends on BT_PER_ADV_SYNC 239 depends on BT_ISO_SYNC_RECEIVER 240 depends on BT_GATT_CLIENT 241 depends on BT_GATT_AUTO_DISCOVER_CCC 242 depends on BT_GATT_AUTO_UPDATE_MTU 243 depends on BT_OBSERVER 244 depends on BT_BONDABLE 245 help 246 This option enables support for the Broadcast Assistant role. 247 248if BT_BAP_BROADCAST_ASSISTANT 249 250config BT_BAP_BROADCAST_ASSISTANT_RECV_STATE_COUNT 251 int "Broadcast Assistant Max Receive State Count" 252 default 1 253 range 1 $(UINT8_MAX) 254 help 255 Sets the number of maximum receive stat characteristics that will be 256 discovered and ready to use. Each characteristic may hold information 257 to sync to a periodic advertise or a broadcast isochronous stream. 258 259endif # BT_BAP_BROADCAST_ASSISTANT 260 261config BT_BAP_DEBUG_STREAM_DATA 262 bool "Bluetooth Audio Stream data debug" 263 depends on BT_BAP_STREAM_LOG_LEVEL_DBG 264 help 265 Use this option to enable Bluetooth Audio Stream data debug logs for 266 the Bluetooth Audio functionality. This will enable debug logs for all 267 audio data received and sent. 268 269config BT_BAP_STREAM 270 # Virtual/hidden option 271 bool 272 default y if BT_ASCS || BT_BAP_UNICAST_CLIENT || \ 273 BT_BAP_BROADCAST_SOURCE || BT_BAP_BROADCAST_SINK 274 275config BT_BAP_DEBUG_STREAM_SEQ_NUM 276 bool "Bluetooth Audio Stream sequence number debug" 277 depends on BT_BAP_STREAM_LOG_LEVEL >= BT_BAP_STREAM_LOG_LEVEL_WRN 278 default y 279 help 280 Use this option to enable Bluetooth Audio Stream sequence number debugging logs for 281 the Bluetooth Audio functionality. This will provide a warning if the application 282 provides unexpected sequence numbers. 283 284config BT_BAP_BASE 285 def_bool BT_BAP_BROADCAST_SINK || BT_BAP_BROADCAST_ASSISTANT || BT_BAP_SCAN_DELEGATOR 286 287rsource "Kconfig.pacs" 288rsource "Kconfig.ascs" 289