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 255
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 255
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
136	bool "Telephone Bearer Service client"
137	select BT_GATT_CLIENT
138	select BT_GATT_AUTO_DISCOVER_CCC
139	help
140	  This option enables support for Telephone Bearer Service client.
141
142if BT_TBS_CLIENT
143
144config BT_TBS_CLIENT_GTBS
145	bool "Telephone Bearer Service client GTBS support"
146	default y
147	help
148	  This option enables support for the generic TBS for the
149	  Call Control client.
150
151config BT_TBS_CLIENT_MAX_CALLS
152	int "Maximum Number Of Calls Supported"
153	default 1
154	help
155	  Sets the maximum number of calls the client supports per TBS instance.
156
157config BT_TBS_CLIENT_MAX_TBS_INSTANCES
158	int "Maximum number of TBS instances to setup"
159	default 1
160	range 0 3 if BT_TBS_CLIENT_GTBS
161	range 1 3
162	help
163	  Sets the maximum number of Telephone Bearer Service (TBS)
164	  instances to setup and use.
165
166config BT_TBS_CLIENT_MINIMAL
167	bool "Minimal TBS Client without optional procedures"
168	default n
169	help
170	  This option disables all optional procedures in the TBS Client.
171
172config BT_TBS_CLIENT_BEARER_PROVIDER_NAME
173	bool "Support reading Bearer Provider Name"
174	default !BT_TBS_CLIENT_MINIMAL
175	help
176	  This option enables support for reading Bearer Provider Name.
177
178config BT_TBS_CLIENT_BEARER_UCI
179	bool "Support reading Bearer UCI"
180	default !BT_TBS_CLIENT_MINIMAL
181	help
182	  This option enables support for reading Bearer UCI.
183
184config BT_TBS_CLIENT_BEARER_TECHNOLOGY
185	bool "Support reading Bearer Technology"
186	default !BT_TBS_CLIENT_MINIMAL
187	help
188	  This option enables support for reading Bearer Technology.
189
190config BT_TBS_CLIENT_BEARER_URI_SCHEMES_SUPPORTED_LIST
191	bool "Support reading Bearer URI Schemes Supported List"
192	default !BT_TBS_CLIENT_MINIMAL
193	help
194	  This option enables support for reading Bearer URI Schemes Supported
195	  List.
196
197config BT_TBS_CLIENT_BEARER_SIGNAL_STRENGTH
198	bool "Support reading Bearer Signal Strength"
199	default !BT_TBS_CLIENT_MINIMAL
200	help
201	  This option enables support for reading Bearer Signal Strength.
202
203config BT_TBS_CLIENT_READ_BEARER_SIGNAL_INTERVAL
204	bool "Support reading Bearer Signal Strength Reporting Interval"
205	default !BT_TBS_CLIENT_MINIMAL
206	help
207	  This option enables support for reading Bearer Signal Strength
208	  Reporting Interval.
209
210config BT_TBS_CLIENT_SET_BEARER_SIGNAL_INTERVAL
211	bool "Support setting Bearer Signal Strength Reporting Interval"
212	default !BT_TBS_CLIENT_MINIMAL
213	help
214	  This option enables support for setting Bearer Signal Strength
215	  Reporting Interval.
216
217config BT_TBS_CLIENT_BEARER_LIST_CURRENT_CALLS
218	bool "Support reading Bearer List Current Calls"
219	default !BT_TBS_CLIENT_MINIMAL
220	help
221	  This option enables support for reading Bearer List Current Calls.
222
223config BT_TBS_CLIENT_CCID
224	bool "Support reading Content Control ID"
225	default !BT_TBS_CLIENT_MINIMAL
226	help
227	  This option enables support for reading Content Control ID.
228
229config BT_TBS_CLIENT_INCOMING_URI
230	bool "Support reading Incoming Call Target Bearer URI"
231	default !BT_TBS_CLIENT_MINIMAL
232	help
233	  This option enables support for reading Incoming Call Target Bearer
234	  URI.
235
236config BT_TBS_CLIENT_STATUS_FLAGS
237	bool "Support reading Status Flags"
238	default !BT_TBS_CLIENT_MINIMAL
239	help
240	  This option enables support for reading Status Flags.
241
242config BT_TBS_CLIENT_CP_PROCEDURES
243	def_bool y
244	depends on (BT_TBS_CLIENT_ACCEPT_CALL || \
245		    BT_TBS_CLIENT_TERMINATE_CALL || \
246		    BT_TBS_CLIENT_HOLD_CALL || \
247		    BT_TBS_CLIENT_RETRIEVE_CALL || \
248		    BT_TBS_CLIENT_ORIGINATE_CALL || \
249		    BT_TBS_CLIENT_JOIN_CALLS)
250	help
251	  This hidden option indicates that there are at least one control
252	  point procedure available.
253	  When this option is disabled it indicates that the control point can
254	  be optimized away.
255
256config BT_TBS_CLIENT_ACCEPT_CALL
257	bool "Support Accept Call"
258	default !BT_TBS_CLIENT_MINIMAL
259	help
260	  This option enables support for answering an incoming call.
261
262config BT_TBS_CLIENT_TERMINATE_CALL
263	bool "Support Terminate Call"
264	default !BT_TBS_CLIENT_MINIMAL
265	help
266	  This option enables support for terminating a call.
267
268config BT_TBS_CLIENT_HOLD_CALL
269	bool "Support Hold Call"
270	default !BT_TBS_CLIENT_MINIMAL
271	help
272	  This option enables support for putting a call on hold.
273
274config BT_TBS_CLIENT_RETRIEVE_CALL
275	bool "Support Retrieve Call"
276	default !BT_TBS_CLIENT_MINIMAL
277	help
278	  This option enables support for retrieving a call on hold.
279
280config BT_TBS_CLIENT_ORIGINATE_CALL
281	bool "Support Originate Call"
282	default !BT_TBS_CLIENT_MINIMAL
283	help
284	  This option enables support for originating a call.
285
286config BT_TBS_CLIENT_JOIN_CALLS
287	bool "Support Join Calls"
288	depends on BT_TBS_CLIENT_MAX_CALLS > 1
289	default !BT_TBS_CLIENT_MINIMAL
290	help
291	  This option enables support for joining calls.
292
293config BT_TBS_CLIENT_OPTIONAL_OPCODES
294	bool "Support reading Optional Opcodes"
295	default !BT_TBS_CLIENT_MINIMAL
296	help
297	  This option enables support for reading Optional Opcodes.
298
299config BT_TBS_CLIENT_INCOMING_CALL
300	bool "Support reading Incoming Call"
301	default !BT_TBS_CLIENT_MINIMAL
302	help
303	  This option enables support for reading Incoming Call.
304
305config BT_TBS_CLIENT_CALL_FRIENDLY_NAME
306	bool "Support reading Call Friendly Name"
307	default !BT_TBS_CLIENT_MINIMAL
308	help
309	  This option enables support for reading Call Friendly Name.
310
311endif # BT_TBS_CLIENT
312
313if BT_TBS || BT_TBS_CLIENT
314
315config BT_TBS_MAX_URI_LENGTH
316	int "The maximum length of the call URI supported"
317	default 30
318	range 4 253
319	help
320	  Sets the maximum length of the call URI supported. Note that if this
321	  value is lower than a call URI, the call request will be rejected.
322
323config BT_TBS_MAX_PROVIDER_NAME_LENGTH
324	int "The maximum length of the bearer provider name"
325	default 30
326	range 0 512
327	help
328	  Sets the maximum length of the bearer provider name.
329
330endif # BT_TBS || BT_TBS_CLIENT
331
332endif # BT_AUDIO
333