1# Bluetooth Audio - Call control configuration options
2#
3# Copyright (c) 2020 Bose Corporation
4#
5# SPDX-License-Identifier: Apache-2.0
6#
7
8if BT_AUDIO
9
10#####################  Telephone Bearer Service #####################
11
12config BT_TBS
13	bool "Telephone Bearer Service Support"
14	select BT_CCID
15	select BT_GATT_DYNAMIC_DB
16	help
17	  This option enables support for Telephone Bearer Service.
18
19if BT_TBS
20
21# TODO: BT_GTBS is mandatory if you support the call control server role.
22# Need to enforce this.
23config BT_GTBS
24	bool "Generic Telephone Bearer Service Support"
25	default y
26	help
27	  This option enables support for Generic Telephone Bearer Service.
28
29config BT_TBS_PROVIDER_NAME
30	string "Telephone Bearer Service Provider Name"
31	default "Unknown"
32	help
33	  Sets the name of the service provider for the bearer.
34
35config BT_TBS_UCI
36	string "Telephone Bearer Service Uniform Caller Identifier (UCI)"
37	default "un000"
38	help
39	  Sets the UCI of the bearer. See
40		https://www.bluetooth.com/specifications/assigned-numbers/uniform-caller-identifiers/
41		for a table of valid UCIs.
42
43config BT_TBS_TECHNOLOGY
44	int "Telephone Bearer Service Technology"
45	range 1 10
46	help
47	  Sets the technology used for the bearer, e.g. GSM, LTE and 5G.
48	  1 : 3G
49	  2 : 4G
50	  3 : LTE
51	  4 : Wi-Fi
52	  5 : 5G
53	  6 : GSM
54	  7 : CDMA
55	  8 : 2G
56	  9 : WCDMA
57	  10: IP
58
59config BT_TBS_URI_SCHEMES_LIST
60	string "Telephone Bearer Service URI schemes Supported List"
61	default "tel,skype"
62	help
63	  Sets a list of URI schemes that are supported by the bearer,
64	  e.g. "tel" or "skype".
65	  Multiple values shall be comma (,) separated, e.g. "tel,skype".
66
67config BT_TBS_SIGNAL_STRENGTH_INTERVAL
68	int "Telephone Bearer Service Signal Strength Reporting Interval"
69	default 0
70	range 0 $(UINT8_MAX)
71	help
72	  Sets the interval of reporting the signal strength in seconds.
73		If the value is 0, the signal will not be reported.
74
75config BT_TBS_STATUS_FLAGS
76	int "Telephone Bearer Service Features and Status value"
77	default 0
78	range 0 3
79	help
80	  Bitfield to set feature and status flags.
81	  	Bit 0: In-band ringtone
82		Bit 1: Silent mode
83		Bits 2-15: Reserved for future use
84
85config BT_TBS_SUPPORTED_FEATURES
86	int "Telephone Bearer Service Supported Features"
87	default 1
88	range 0 3
89	help
90	  Bitfield to set supported features of the bearer.
91		Bit 0: Local Hold and Retrieve
92		Bit 1: Join calls within Telephone Bearer Service
93
94config BT_TBS_MAX_CALLS
95	int "Telephone Bearer Service Maximum Number Of Calls Supported"
96	default 3
97	range 1 16
98	help
99	  Sets the maximum number of calls the service supports per bearer.
100
101config BT_TBS_BEARER_COUNT
102	int "How many bearer instances the device instantiates"
103	default 1
104	range 1 $(UINT8_MAX)
105	help
106	  Sets the number of TBS instances that are instantiated
107
108config BT_TBS_SERVICE_COUNT
109	int "Number of instantiated bearer service instances"
110	default BT_TBS_BEARER_COUNT
111	range 0 BT_TBS_BEARER_COUNT if BT_GTBS
112	range BT_TBS_BEARER_COUNT BT_TBS_BEARER_COUNT
113	help
114	  Sets the number of TBS service instances that are instantiated
115
116config BT_TBS_MAX_SCHEME_LIST_LENGTH
117	int "The maximum length of the URI scheme list"
118	default 30
119	range 0 512
120	help
121	  Sets the maximum length of the URI scheme list. If BT_GTBS is enabled,
122	  then the maximum length should be maximum 512 / BT_TBS_BEARER_COUNT.
123
124config BT_TBS_AUTHORIZATION
125	bool "TBS authorization requirement"
126	help
127	  If set to true, then any writable characteristics will require
128	  authorization per connection.
129
130endif # BT_TBS
131
132
133##################### Call Control Client #####################
134
135config BT_TBS_CLIENT_GTBS
136	bool "Generic Telephone Bearer Service client support"
137	help
138	  This option enables support for the GTBS-oriented Call Control client.
139
140config BT_TBS_CLIENT_TBS
141	bool "Telephone Bearer Service client support"
142	help
143	  This option enables support for the TBS-oriented Call Control client.
144
145config BT_TBS_CLIENT
146	def_bool BT_TBS_CLIENT_GTBS || BT_TBS_CLIENT_TBS
147	select BT_GATT_CLIENT
148	select BT_GATT_AUTO_DISCOVER_CCC
149
150if BT_TBS_CLIENT
151
152config BT_TBS_CLIENT_MAX_CALLS
153	int "Maximum Number Of Calls Supported"
154	default 1
155	help
156	  Sets the maximum number of calls the client supports per TBS instance.
157
158config BT_TBS_CLIENT_MAX_TBS_INSTANCES
159	int "Maximum number of TBS instances to setup"
160	depends on BT_TBS_CLIENT_TBS
161	default 1
162	range 1 3
163	help
164	  Sets the maximum number of Telephone Bearer Service (TBS)
165	  instances to setup and use.
166
167config BT_TBS_CLIENT_MINIMAL
168	bool "Minimal TBS Client without optional procedures"
169	default n
170	help
171	  This option disables all optional procedures in the TBS Client.
172
173config BT_TBS_CLIENT_BEARER_PROVIDER_NAME
174	bool "Support reading Bearer Provider Name"
175	default !BT_TBS_CLIENT_MINIMAL
176	help
177	  This option enables support for reading Bearer Provider Name.
178
179config BT_TBS_CLIENT_BEARER_UCI
180	bool "Support reading Bearer UCI"
181	default !BT_TBS_CLIENT_MINIMAL
182	help
183	  This option enables support for reading Bearer UCI.
184
185config BT_TBS_CLIENT_BEARER_TECHNOLOGY
186	bool "Support reading Bearer Technology"
187	default !BT_TBS_CLIENT_MINIMAL
188	help
189	  This option enables support for reading Bearer Technology.
190
191config BT_TBS_CLIENT_BEARER_URI_SCHEMES_SUPPORTED_LIST
192	bool "Support reading Bearer URI Schemes Supported List"
193	default !BT_TBS_CLIENT_MINIMAL
194	help
195	  This option enables support for reading Bearer URI Schemes Supported
196	  List.
197
198config BT_TBS_CLIENT_BEARER_SIGNAL_STRENGTH
199	bool "Support reading Bearer Signal Strength"
200	default !BT_TBS_CLIENT_MINIMAL
201	help
202	  This option enables support for reading Bearer Signal Strength.
203
204config BT_TBS_CLIENT_READ_BEARER_SIGNAL_INTERVAL
205	bool "Support reading Bearer Signal Strength Reporting Interval"
206	default !BT_TBS_CLIENT_MINIMAL
207	help
208	  This option enables support for reading Bearer Signal Strength
209	  Reporting Interval.
210
211config BT_TBS_CLIENT_SET_BEARER_SIGNAL_INTERVAL
212	bool "Support setting Bearer Signal Strength Reporting Interval"
213	default !BT_TBS_CLIENT_MINIMAL
214	help
215	  This option enables support for setting Bearer Signal Strength
216	  Reporting Interval.
217
218config BT_TBS_CLIENT_BEARER_LIST_CURRENT_CALLS
219	bool "Support reading Bearer List Current Calls"
220	default !BT_TBS_CLIENT_MINIMAL
221	help
222	  This option enables support for reading Bearer List Current Calls.
223
224config BT_TBS_CLIENT_CCID
225	bool "Support reading Content Control ID"
226	default !BT_TBS_CLIENT_MINIMAL
227	help
228	  This option enables support for reading Content Control ID.
229
230config BT_TBS_CLIENT_INCOMING_URI
231	bool "Support reading Incoming Call Target Bearer URI"
232	default !BT_TBS_CLIENT_MINIMAL
233	help
234	  This option enables support for reading Incoming Call Target Bearer
235	  URI.
236
237config BT_TBS_CLIENT_STATUS_FLAGS
238	bool "Support reading Status Flags"
239	default !BT_TBS_CLIENT_MINIMAL
240	help
241	  This option enables support for reading Status Flags.
242
243config BT_TBS_CLIENT_CP_PROCEDURES
244	def_bool y
245	depends on (BT_TBS_CLIENT_ACCEPT_CALL || \
246		    BT_TBS_CLIENT_TERMINATE_CALL || \
247		    BT_TBS_CLIENT_HOLD_CALL || \
248		    BT_TBS_CLIENT_RETRIEVE_CALL || \
249		    BT_TBS_CLIENT_ORIGINATE_CALL || \
250		    BT_TBS_CLIENT_JOIN_CALLS)
251	help
252	  This hidden option indicates that there are at least one control
253	  point procedure available.
254	  When this option is disabled it indicates that the control point can
255	  be optimized away.
256
257config BT_TBS_CLIENT_ACCEPT_CALL
258	bool "Support Accept Call"
259	default !BT_TBS_CLIENT_MINIMAL
260	help
261	  This option enables support for answering an incoming call.
262
263config BT_TBS_CLIENT_TERMINATE_CALL
264	bool "Support Terminate Call"
265	default !BT_TBS_CLIENT_MINIMAL
266	help
267	  This option enables support for terminating a call.
268
269config BT_TBS_CLIENT_HOLD_CALL
270	bool "Support Hold Call"
271	default !BT_TBS_CLIENT_MINIMAL
272	help
273	  This option enables support for putting a call on hold.
274
275config BT_TBS_CLIENT_RETRIEVE_CALL
276	bool "Support Retrieve Call"
277	default !BT_TBS_CLIENT_MINIMAL
278	help
279	  This option enables support for retrieving a call on hold.
280
281config BT_TBS_CLIENT_ORIGINATE_CALL
282	bool "Support Originate Call"
283	default !BT_TBS_CLIENT_MINIMAL
284	help
285	  This option enables support for originating a call.
286
287config BT_TBS_CLIENT_JOIN_CALLS
288	bool "Support Join Calls"
289	depends on BT_TBS_CLIENT_MAX_CALLS > 1
290	default !BT_TBS_CLIENT_MINIMAL
291	help
292	  This option enables support for joining calls.
293
294config BT_TBS_CLIENT_OPTIONAL_OPCODES
295	bool "Support reading Optional Opcodes"
296	default !BT_TBS_CLIENT_MINIMAL
297	help
298	  This option enables support for reading Optional Opcodes.
299
300config BT_TBS_CLIENT_INCOMING_CALL
301	bool "Support reading Incoming Call"
302	default !BT_TBS_CLIENT_MINIMAL
303	help
304	  This option enables support for reading Incoming Call.
305
306config BT_TBS_CLIENT_CALL_FRIENDLY_NAME
307	bool "Support reading Call Friendly Name"
308	default !BT_TBS_CLIENT_MINIMAL
309	help
310	  This option enables support for reading Call Friendly Name.
311
312endif # BT_TBS_CLIENT
313
314if BT_TBS || BT_TBS_CLIENT
315
316config BT_TBS_MAX_URI_LENGTH
317	int "The maximum length of the call URI supported"
318	default 30
319	range 4 253
320	help
321	  Sets the maximum length of the call URI supported. Note that if this
322	  value is lower than a call URI, the call request will be rejected.
323
324config BT_TBS_MAX_PROVIDER_NAME_LENGTH
325	int "The maximum length of the bearer provider name"
326	default 30
327	range 0 512
328	help
329	  Sets the maximum length of the bearer provider name.
330
331endif # BT_TBS || BT_TBS_CLIENT
332
333endif # BT_AUDIO
334