1# Bluetooth Audio - Call control configuration options
2#
3# Copyright (c) 2020 Bose Corporation
4# Copyright (c) 2024 Nordic Semiconductor ASA
5#
6# SPDX-License-Identifier: Apache-2.0
7#
8
9if BT_AUDIO
10
11#####################  Telephone Bearer Service #####################
12
13config BT_TBS
14	bool "Telephone Bearer Service Support"
15	depends on BT_GATT_DYNAMIC_DB
16	depends on BT_SMP
17	depends on UTF8
18	help
19	  This option enables support for Telephone Bearer Service. By default this only
20	  initializes the GTBS service. If specific TBS services are wanted, they need to be
21	  enabled by setting BT_TBS_BEARER_COUNT to a non-zero value.
22
23if BT_TBS
24
25config BT_TBS_SUPPORTED_FEATURES
26	int "Telephone Bearer Service Supported Features"
27	default 1
28	range 0 3
29	help
30	  Bitfield to set supported features of the bearer.
31	  Bit 0: Local Hold and Retrieve
32	  Bit 1: Join calls within Telephone Bearer Service
33
34config BT_TBS_MAX_CALLS
35	int "Telephone Bearer Service Maximum Number Of Calls Supported"
36	default 3
37	range 1 16
38	help
39	  Sets the maximum number of calls the service supports per bearer.
40
41config BT_TBS_BEARER_COUNT
42	int "How many bearer instances the device instantiates"
43	default 0
44	range 0 $(UINT8_MAX)
45	help
46	  Sets the number of TBS instances that are instantiated
47
48config BT_TBS_MAX_SCHEME_LIST_LENGTH
49	int "The maximum length of the URI scheme list"
50	default 30
51	range 0 512
52	help
53	  Sets the maximum length of the URI scheme list.
54
55config BT_TBS_LOCK_TIMEOUT
56	int "Milliseconds of timeout when handling concurrent operations"
57	range 0 1000
58	default 10
59	help
60	  The number of milliseconds that the TBS implementation will maximum wait before rejecting
61	  an write request if another is already in progress in another thread.
62
63endif # BT_TBS
64
65
66##################### Call Control Client #####################
67
68config BT_TBS_CLIENT_GTBS
69	bool "Generic Telephone Bearer Service client support"
70	depends on BT_GATT_CLIENT
71	depends on BT_GATT_AUTO_DISCOVER_CCC
72	depends on BT_SMP
73	depends on UTF8
74	help
75	  This option enables support for the GTBS-oriented Call Control client.
76
77config BT_TBS_CLIENT_TBS
78	bool "Telephone Bearer Service client support"
79	depends on BT_GATT_CLIENT
80	depends on BT_GATT_AUTO_DISCOVER_CCC
81	depends on BT_SMP
82	depends on UTF8
83	help
84	  This option enables support for the TBS-oriented Call Control client.
85
86config BT_TBS_CLIENT
87	def_bool BT_TBS_CLIENT_GTBS || BT_TBS_CLIENT_TBS
88
89if BT_TBS_CLIENT
90
91config BT_TBS_CLIENT_MAX_CALLS
92	int "Maximum Number Of Calls Supported"
93	default 1
94	help
95	  Sets the maximum number of calls the client supports per TBS instance.
96
97config BT_TBS_CLIENT_MAX_TBS_INSTANCES
98	int "Maximum number of TBS instances to setup"
99	depends on BT_TBS_CLIENT_TBS
100	default 1
101	range 1 3
102	help
103	  Sets the maximum number of Telephone Bearer Service (TBS)
104	  instances to setup and use.
105
106config BT_TBS_CLIENT_MINIMAL
107	bool "Minimal TBS Client without optional procedures"
108	default n
109	help
110	  This option disables all optional procedures in the TBS Client.
111
112config BT_TBS_CLIENT_BEARER_PROVIDER_NAME
113	bool "Support reading Bearer Provider Name"
114	default !BT_TBS_CLIENT_MINIMAL
115	help
116	  This option enables support for reading Bearer Provider Name.
117
118config BT_TBS_CLIENT_BEARER_UCI
119	bool "Support reading Bearer UCI"
120	default !BT_TBS_CLIENT_MINIMAL
121	help
122	  This option enables support for reading Bearer UCI.
123
124config BT_TBS_CLIENT_BEARER_TECHNOLOGY
125	bool "Support reading Bearer Technology"
126	default !BT_TBS_CLIENT_MINIMAL
127	help
128	  This option enables support for reading Bearer Technology.
129
130config BT_TBS_CLIENT_BEARER_URI_SCHEMES_SUPPORTED_LIST
131	bool "Support reading Bearer URI Schemes Supported List"
132	default !BT_TBS_CLIENT_MINIMAL
133	help
134	  This option enables support for reading Bearer URI Schemes Supported
135	  List.
136
137config BT_TBS_CLIENT_BEARER_SIGNAL_STRENGTH
138	bool "Support reading Bearer Signal Strength"
139	default !BT_TBS_CLIENT_MINIMAL
140	help
141	  This option enables support for reading Bearer Signal Strength.
142
143config BT_TBS_CLIENT_READ_BEARER_SIGNAL_INTERVAL
144	bool "Support reading Bearer Signal Strength Reporting Interval"
145	default !BT_TBS_CLIENT_MINIMAL
146	help
147	  This option enables support for reading Bearer Signal Strength
148	  Reporting Interval.
149
150config BT_TBS_CLIENT_SET_BEARER_SIGNAL_INTERVAL
151	bool "Support setting Bearer Signal Strength Reporting Interval"
152	default !BT_TBS_CLIENT_MINIMAL
153	help
154	  This option enables support for setting Bearer Signal Strength
155	  Reporting Interval.
156
157config BT_TBS_CLIENT_BEARER_LIST_CURRENT_CALLS
158	bool "Support reading Bearer List Current Calls"
159	default !BT_TBS_CLIENT_MINIMAL
160	help
161	  This option enables support for reading Bearer List Current Calls.
162
163config BT_TBS_CLIENT_CCID
164	bool "Support reading Content Control ID"
165	default !BT_TBS_CLIENT_MINIMAL
166	help
167	  This option enables support for reading Content Control ID.
168
169config BT_TBS_CLIENT_INCOMING_URI
170	bool "Support reading Incoming Call Target Bearer URI"
171	default !BT_TBS_CLIENT_MINIMAL
172	help
173	  This option enables support for reading Incoming Call Target Bearer
174	  URI.
175
176config BT_TBS_CLIENT_STATUS_FLAGS
177	bool "Support reading Status Flags"
178	default !BT_TBS_CLIENT_MINIMAL
179	help
180	  This option enables support for reading Status Flags.
181
182config BT_TBS_CLIENT_CP_PROCEDURES
183	def_bool y
184	depends on (BT_TBS_CLIENT_ACCEPT_CALL || \
185		    BT_TBS_CLIENT_TERMINATE_CALL || \
186		    BT_TBS_CLIENT_HOLD_CALL || \
187		    BT_TBS_CLIENT_RETRIEVE_CALL || \
188		    BT_TBS_CLIENT_ORIGINATE_CALL || \
189		    BT_TBS_CLIENT_JOIN_CALLS)
190	help
191	  This hidden option indicates that there are at least one control
192	  point procedure available.
193	  When this option is disabled it indicates that the control point can
194	  be optimized away.
195
196config BT_TBS_CLIENT_ACCEPT_CALL
197	bool "Support Accept Call"
198	default !BT_TBS_CLIENT_MINIMAL
199	help
200	  This option enables support for answering an incoming call.
201
202config BT_TBS_CLIENT_TERMINATE_CALL
203	bool "Support Terminate Call"
204	default !BT_TBS_CLIENT_MINIMAL
205	help
206	  This option enables support for terminating a call.
207
208config BT_TBS_CLIENT_HOLD_CALL
209	bool "Support Hold Call"
210	default !BT_TBS_CLIENT_MINIMAL
211	help
212	  This option enables support for putting a call on hold.
213
214config BT_TBS_CLIENT_RETRIEVE_CALL
215	bool "Support Retrieve Call"
216	default !BT_TBS_CLIENT_MINIMAL
217	help
218	  This option enables support for retrieving a call on hold.
219
220config BT_TBS_CLIENT_ORIGINATE_CALL
221	bool "Support Originate Call"
222	default !BT_TBS_CLIENT_MINIMAL
223	help
224	  This option enables support for originating a call.
225
226config BT_TBS_CLIENT_JOIN_CALLS
227	bool "Support Join Calls"
228	depends on BT_TBS_CLIENT_MAX_CALLS > 1
229	default !BT_TBS_CLIENT_MINIMAL
230	help
231	  This option enables support for joining calls.
232
233config BT_TBS_CLIENT_OPTIONAL_OPCODES
234	bool "Support reading Optional Opcodes"
235	default !BT_TBS_CLIENT_MINIMAL
236	help
237	  This option enables support for reading Optional Opcodes.
238
239config BT_TBS_CLIENT_INCOMING_CALL
240	bool "Support reading Incoming Call"
241	default !BT_TBS_CLIENT_MINIMAL
242	help
243	  This option enables support for reading Incoming Call.
244
245config BT_TBS_CLIENT_CALL_FRIENDLY_NAME
246	bool "Support reading Call Friendly Name"
247	default !BT_TBS_CLIENT_MINIMAL
248	help
249	  This option enables support for reading Call Friendly Name.
250
251endif # BT_TBS_CLIENT
252
253if BT_TBS || BT_TBS_CLIENT
254
255config BT_TBS_MAX_URI_LENGTH
256	int "The maximum length of the call URI supported"
257	default 30
258	range 4 253
259	help
260	  Sets the maximum length of the call URI supported. Note that if this
261	  value is lower than a call URI, the call request will be rejected.
262
263config BT_TBS_MAX_PROVIDER_NAME_LENGTH
264	int "The maximum length of the bearer provider name"
265	default 30
266	range 0 512
267	help
268	  Sets the maximum length of the bearer provider name.
269
270endif # BT_TBS || BT_TBS_CLIENT
271
272endif # BT_AUDIO
273