blob: b2550739c58a33dbccc856f1abea9a59c6fce5fa [file] [log] [blame]
The Android Open Source Project5738f832012-12-12 16:00:35 -08001/******************************************************************************
2 *
Hemant Gupta41d4a262013-08-19 18:33:01 +05303 * Copyright (c) 2014 The Android Open Source Project
The Android Open Source Project5738f832012-12-12 16:00:35 -08004 * Copyright (C) 1999-2012 Broadcom Corporation
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at:
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 ******************************************************************************/
19
20#ifndef BT_TARGET_H
21#define BT_TARGET_H
22
23#ifndef BUILDCFG
24#define BUILDCFG
25#endif
The Android Open Source Project5738f832012-12-12 16:00:35 -080026
27#if !defined(HAS_BDROID_BUILDCFG) && !defined(HAS_NO_BDROID_BUILDCFG)
28#error "An Android.mk file did not include bdroid_CFLAGS and possibly not bdorid_C_INCLUDES"
29#endif
30
31#ifdef HAS_BDROID_BUILDCFG
32#include "bdroid_buildcfg.h"
33#endif
34
Sharvil Nanavati24ff5af2014-12-29 10:24:15 -080035#include "bt_types.h" /* This must be defined AFTER buildcfg.h */
The Android Open Source Project5738f832012-12-12 16:00:35 -080036
37/* Include common GKI definitions used by this platform */
38#include "gki_target.h"
The Android Open Source Project5738f832012-12-12 16:00:35 -080039#include "dyn_mem.h" /* defines static and/or dynamic memory for components */
40
Matthew Xie7f3e4292013-09-30 12:44:10 -070041//------------------Added from bdroid_buildcfg.h---------------------
The Android Open Source Project5738f832012-12-12 16:00:35 -080042#ifndef L2CAP_EXTFEA_SUPPORTED_MASK
43#define L2CAP_EXTFEA_SUPPORTED_MASK (L2CAP_EXTFEA_ENH_RETRANS | L2CAP_EXTFEA_STREAM_MODE | L2CAP_EXTFEA_NO_CRC | L2CAP_EXTFEA_FIXED_CHNLS)
44#endif
45
46#ifndef BTUI_OPS_FORMATS
47#define BTUI_OPS_FORMATS (BTA_OP_VCARD21_MASK | BTA_OP_ANY_MASK)
48#endif
49
50#ifndef BTA_RFC_MTU_SIZE
51#define BTA_RFC_MTU_SIZE (L2CAP_MTU_SIZE-L2CAP_MIN_OFFSET-RFCOMM_DATA_OVERHEAD)
52#endif
53
The Android Open Source Project5738f832012-12-12 16:00:35 -080054#ifndef SBC_NO_PCM_CPY_OPTION
55#define SBC_NO_PCM_CPY_OPTION FALSE
56#endif
57
The Android Open Source Project5738f832012-12-12 16:00:35 -080058#ifndef BTA_INCLUDED
59#define BTA_INCLUDED TRUE
60#endif
61
The Android Open Source Project5738f832012-12-12 16:00:35 -080062#ifndef BTA_PAN_INCLUDED
63#define BTA_PAN_INCLUDED TRUE
64#endif
65
The Android Open Source Project5738f832012-12-12 16:00:35 -080066#ifndef BTA_HH_INCLUDED
67#define BTA_HH_INCLUDED TRUE
68#endif
69
70#ifndef BTA_HH_ROLE
71#define BTA_HH_ROLE BTA_MASTER_ROLE_PREF
72#endif
73
Andre Eisenbach2e7fa682013-08-08 15:42:48 -070074#ifndef BTA_HH_LE_INCLUDED
75#define BTA_HH_LE_INCLUDED TRUE
76#endif
77
The Android Open Source Project5738f832012-12-12 16:00:35 -080078#ifndef BTA_AR_INCLUDED
79#define BTA_AR_INCLUDED TRUE
80#endif
81
82#ifndef BTA_AV_INCLUDED
83#define BTA_AV_INCLUDED TRUE
84#endif
85
Ganesh Ganapathi Batta7fa4fba2014-04-16 16:50:09 -070086#ifndef BTA_GATT_INCLUDED
87#define BTA_GATT_INCLUDED TRUE
The Android Open Source Project5738f832012-12-12 16:00:35 -080088#endif
89
lungtsai_lin6718c6d2014-07-02 20:39:02 +080090#ifndef BTA_AV_SINK_INCLUDED
91#define BTA_AV_SINK_INCLUDED FALSE
92#endif
Hemant Guptaf7dd9f52013-10-24 15:37:17 +053093
The Android Open Source Project5738f832012-12-12 16:00:35 -080094#ifndef BTA_DISABLE_DELAY
95#define BTA_DISABLE_DELAY 200 /* in milliseconds */
96#endif
97
Matthew Xiee6c363b2014-12-02 17:06:03 -080098// If the next wakeup time is less than this threshold, we should acquire
99// a wakelock instead of setting a wake alarm so we're not bouncing in
100// and out of suspend frequently.
101// in millisecond
Chris Mantone97508e2014-09-24 10:27:52 -0700102// TODO(zachoverflow): reinstate in alarm code
Matthew Xiee6c363b2014-12-02 17:06:03 -0800103#ifndef GKI_TIMER_INTERVAL_FOR_WAKELOCK
104#define GKI_TIMER_INTERVAL_FOR_WAKELOCK 3000
105#endif
106
The Android Open Source Project5738f832012-12-12 16:00:35 -0800107#ifndef BTA_SYS_TIMER_PERIOD
108#define BTA_SYS_TIMER_PERIOD 100
109#endif
110
The Android Open Source Project5738f832012-12-12 16:00:35 -0800111#ifndef SBC_FOR_EMBEDDED_LINUX
112#define SBC_FOR_EMBEDDED_LINUX TRUE
113#endif
114
The Android Open Source Project5738f832012-12-12 16:00:35 -0800115#ifndef AVDT_VERSION
116#define AVDT_VERSION 0x0102
117#endif
118
119#ifndef BTA_AG_AT_MAX_LEN
120#define BTA_AG_AT_MAX_LEN 512
121#endif
122
123#ifndef BTA_AVRCP_FF_RW_SUPPORT
124#define BTA_AVRCP_FF_RW_SUPPORT TRUE
125#endif
126
127#ifndef BTA_AG_SCO_PKT_TYPES
128#define BTA_AG_SCO_PKT_TYPES (BTM_SCO_LINK_ONLY_MASK | BTM_SCO_PKT_TYPES_MASK_EV3 | BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 | BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 | BTM_SCO_PKT_TYPES_MASK_NO_3_EV5)
129#endif
130
The Android Open Source Project5738f832012-12-12 16:00:35 -0800131#ifndef BTA_AV_RET_TOUT
132#define BTA_AV_RET_TOUT 15
133#endif
134
135#ifndef PORCHE_PAIRING_CONFLICT
136#define PORCHE_PAIRING_CONFLICT TRUE
137#endif
138
139#ifndef BTA_AV_CO_CP_SCMS_T
140#define BTA_AV_CO_CP_SCMS_T FALSE
141#endif
142
Matthew Xie7f3e4292013-09-30 12:44:10 -0700143/* This feature is used to eanble interleaved scan*/
144#ifndef BTA_HOST_INTERLEAVE_SEARCH
145#define BTA_HOST_INTERLEAVE_SEARCH FALSE
146#endif
147
The Android Open Source Project5738f832012-12-12 16:00:35 -0800148#ifndef BT_USE_TRACES
149#define BT_USE_TRACES TRUE
150#endif
151
152#ifndef BT_TRACE_BTIF
153#define BT_TRACE_BTIF TRUE
154#endif
155
The Android Open Source Project5738f832012-12-12 16:00:35 -0800156#ifndef BT_TRACE_VERBOSE
157#define BT_TRACE_VERBOSE FALSE
158#endif
159
The Android Open Source Project5738f832012-12-12 16:00:35 -0800160#ifndef BTA_DM_SDP_DB_SIZE
161#define BTA_DM_SDP_DB_SIZE 8000
162#endif
163
The Android Open Source Project5738f832012-12-12 16:00:35 -0800164#ifndef HL_INCLUDED
165#define HL_INCLUDED TRUE
166#endif
167
The Android Open Source Project5738f832012-12-12 16:00:35 -0800168#ifndef AG_VOICE_SETTINGS
169#define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS
170#endif
171
172#ifndef BTIF_DM_OOB_TEST
173#define BTIF_DM_OOB_TEST TRUE
174#endif
Matthew Xie7f3e4292013-09-30 12:44:10 -0700175
Fred Quintana0963a672014-09-03 16:23:14 -0700176// How long to wait before activating sniff mode after entering the
177// idle state for FTS, OPS connections
178#ifndef BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS
179#define BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 7000
180#endif
181
Matthew Xie7f3e4292013-09-30 12:44:10 -0700182//------------------End added from bdroid_buildcfg.h---------------------
The Android Open Source Project5738f832012-12-12 16:00:35 -0800183
184
The Android Open Source Project5738f832012-12-12 16:00:35 -0800185/******************************************************************************
186**
187** GKI Buffer Pools
188**
189******************************************************************************/
190
191/* Receives HCI events from the lower-layer. */
192#ifndef HCI_CMD_POOL_ID
193#define HCI_CMD_POOL_ID GKI_POOL_ID_2
194#endif
195
196#ifndef HCI_CMD_POOL_BUF_SIZE
197#define HCI_CMD_POOL_BUF_SIZE GKI_BUF2_SIZE
198#endif
199
200/* Receives ACL data packets from thelower-layer. */
201#ifndef HCI_ACL_POOL_ID
202#define HCI_ACL_POOL_ID GKI_POOL_ID_3
203#endif
204
The Android Open Source Project5738f832012-12-12 16:00:35 -0800205/* Maximum number of buffers available for ACL receive data. */
206#ifndef HCI_ACL_BUF_MAX
207#define HCI_ACL_BUF_MAX GKI_BUF3_MAX
208#endif
209
210/* Receives SCO data packets from the lower-layer. */
211#ifndef HCI_SCO_POOL_ID
212#define HCI_SCO_POOL_ID GKI_POOL_ID_6
213#endif
214
The Android Open Source Project5738f832012-12-12 16:00:35 -0800215/* Sends SDP data packets. */
216#ifndef SDP_POOL_ID
217#define SDP_POOL_ID 3
218#endif
219
220/* Sends RFCOMM command packets. */
221#ifndef RFCOMM_CMD_POOL_ID
222#define RFCOMM_CMD_POOL_ID GKI_POOL_ID_2
223#endif
224
The Android Open Source Project5738f832012-12-12 16:00:35 -0800225/* Sends RFCOMM data packets. */
226#ifndef RFCOMM_DATA_POOL_ID
227#define RFCOMM_DATA_POOL_ID GKI_POOL_ID_3
228#endif
229
230#ifndef RFCOMM_DATA_POOL_BUF_SIZE
231#define RFCOMM_DATA_POOL_BUF_SIZE GKI_BUF3_SIZE
232#endif
233
234/* Sends L2CAP packets to the peer and HCI messages to the controller. */
235#ifndef L2CAP_CMD_POOL_ID
236#define L2CAP_CMD_POOL_ID GKI_POOL_ID_2
237#endif
238
239/* Sends L2CAP segmented packets in ERTM mode */
240#ifndef L2CAP_FCR_TX_POOL_ID
241#define L2CAP_FCR_TX_POOL_ID HCI_ACL_POOL_ID
242#endif
243
244/* Receives L2CAP segmented packets in ERTM mode */
245#ifndef L2CAP_FCR_RX_POOL_ID
246#define L2CAP_FCR_RX_POOL_ID HCI_ACL_POOL_ID
247#endif
248
Andre Eisenbach12c3f492013-04-24 16:02:04 -0700249/* Number of ACL buffers to assign to LE
250 if the HCI buffer pool is shared with BR/EDR */
251#ifndef L2C_DEF_NUM_BLE_BUF_SHARED
252#define L2C_DEF_NUM_BLE_BUF_SHARED 1
253#endif
254
The Android Open Source Project5738f832012-12-12 16:00:35 -0800255/* Used by BTM when it sends HCI commands to the controller. */
256#ifndef BTM_CMD_POOL_ID
257#define BTM_CMD_POOL_ID GKI_POOL_ID_2
258#endif
259
Kim Schulz8372aa52015-03-25 10:39:40 +0100260#ifndef OBX_LRG_DATA_POOL_SIZE
261#define OBX_LRG_DATA_POOL_SIZE GKI_BUF4_SIZE
262#endif
263
264#ifndef OBX_LRG_DATA_POOL_ID
265#define OBX_LRG_DATA_POOL_ID GKI_POOL_ID_4
266#endif
The Android Open Source Project5738f832012-12-12 16:00:35 -0800267/* Used to send data to L2CAP. */
268#ifndef GAP_DATA_POOL_ID
269#define GAP_DATA_POOL_ID GKI_POOL_ID_3
270#endif
271
The Android Open Source Project5738f832012-12-12 16:00:35 -0800272#ifndef SPP_DB_SIZE
273#define SPP_DB_SIZE GKI_BUF3_SIZE
274#endif
275
The Android Open Source Project5738f832012-12-12 16:00:35 -0800276/* BNEP data and protocol messages. */
277#ifndef BNEP_POOL_ID
278#define BNEP_POOL_ID GKI_POOL_ID_3
279#endif
280
281/* RPC pool for temporary trace message buffers. */
282#ifndef RPC_SCRATCH_POOL_ID
283#define RPC_SCRATCH_POOL_ID GKI_POOL_ID_2
284#endif
285
The Android Open Source Project5738f832012-12-12 16:00:35 -0800286/* AVDTP pool for protocol messages */
287#ifndef AVDT_CMD_POOL_ID
288#define AVDT_CMD_POOL_ID GKI_POOL_ID_2
289#endif
290
291/* AVDTP pool size for media packets in case of fragmentation */
292#ifndef AVDT_DATA_POOL_SIZE
293#define AVDT_DATA_POOL_SIZE GKI_BUF3_SIZE
294#endif
295
296#ifndef PAN_POOL_ID
297#define PAN_POOL_ID GKI_POOL_ID_3
Zhenye Zhu95ca3c42014-08-26 14:26:56 -0700298/* Maximum amount of the shared buffer to allocate for PAN */
299#define PAN_POOL_MAX (GKI_BUF3_MAX / 4)
The Android Open Source Project5738f832012-12-12 16:00:35 -0800300#endif
301
The Android Open Source Project5738f832012-12-12 16:00:35 -0800302/* AVCTP pool for protocol messages */
303#ifndef AVCT_CMD_POOL_ID
304#define AVCT_CMD_POOL_ID GKI_POOL_ID_1
305#endif
306
The Android Open Source Project5738f832012-12-12 16:00:35 -0800307/* AVRCP pool for protocol messages */
308#ifndef AVRC_CMD_POOL_ID
309#define AVRC_CMD_POOL_ID GKI_POOL_ID_1
310#endif
311
312/* AVRCP pool size for protocol messages */
313#ifndef AVRC_CMD_POOL_SIZE
314#define AVRC_CMD_POOL_SIZE GKI_BUF1_SIZE
315#endif
316
317/* AVRCP Metadata pool for protocol messages */
318#ifndef AVRC_META_CMD_POOL_ID
319#define AVRC_META_CMD_POOL_ID GKI_POOL_ID_2
320#endif
321
322/* AVRCP Metadata pool size for protocol messages */
323#ifndef AVRC_META_CMD_POOL_SIZE
324#define AVRC_META_CMD_POOL_SIZE GKI_BUF2_SIZE
325#endif
326
327
328/* AVRCP buffer size for browsing channel messages */
329#ifndef AVRC_BROWSE_POOL_SIZE
330#define AVRC_BROWSE_POOL_SIZE GKI_MAX_BUF_SIZE
331#endif
332
The Android Open Source Project5738f832012-12-12 16:00:35 -0800333#ifndef BTA_HL_LRG_DATA_POOL_ID
334#define BTA_HL_LRG_DATA_POOL_ID GKI_POOL_ID_7
335#endif
336
337/* GATT Server Database pool ID */
338#ifndef GATT_DB_POOL_ID
339#define GATT_DB_POOL_ID GKI_POOL_ID_8
340#endif
341
Andre Eisenbach17b04bd2014-03-28 14:54:22 -0700342/* GATT Data sending buffer pool ID, use default ACL pool for fix channel data */
343#ifndef GATT_BUF_POOL_ID
344#define GATT_BUF_POOL_ID HCI_ACL_POOL_ID
345#endif
346
The Android Open Source Project5738f832012-12-12 16:00:35 -0800347/******************************************************************************
348**
349** Lower Layer Interface
350**
351******************************************************************************/
352
The Android Open Source Project5738f832012-12-12 16:00:35 -0800353/* Macro for allocating buffer for HCI commands */
354#ifndef HCI_GET_CMD_BUF
355#if (!defined(HCI_USE_VARIABLE_SIZE_CMD_BUF) || (HCI_USE_VARIABLE_SIZE_CMD_BUF == FALSE))
356/* Allocate fixed-size buffer from HCI_CMD_POOL (default case) */
357#define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getpoolbuf (HCI_CMD_POOL_ID))
358#else
359/* Allocate smallest possible buffer (for platforms with limited RAM) */
360#define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getbuf ((UINT16)(BT_HDR_SIZE + HCIC_PREAMBLE_SIZE + (paramlen))))
361#endif
362#endif /* HCI_GET_CMD_BUF */
363
364/******************************************************************************
365**
366** HCI Services (H4)
367**
368******************************************************************************/
The Android Open Source Project5738f832012-12-12 16:00:35 -0800369
The Android Open Source Project5738f832012-12-12 16:00:35 -0800370/* Use 2 second for low-resolution systems, override to 1 for high-resolution systems */
371#ifndef BT_1SEC_TIMEOUT
372#define BT_1SEC_TIMEOUT (2)
373#endif
374
375/* Quick Timer */
376/* if L2CAP_FCR_INCLUDED is TRUE then it should have 100 millisecond resolution */
377/* if none of them is included then QUICK_TIMER_TICKS_PER_SEC is set to 0 to exclude quick timer */
378#ifndef QUICK_TIMER_TICKS_PER_SEC
Chris Manton18023292014-08-29 09:12:06 -0700379#define QUICK_TIMER_TICKS_PER_SEC 10 /* 100ms timer */
The Android Open Source Project5738f832012-12-12 16:00:35 -0800380#endif
381
382/******************************************************************************
383**
384** BTM
385**
386******************************************************************************/
The Android Open Source Project5738f832012-12-12 16:00:35 -0800387
388/* Cancel Inquiry on incoming SSP */
389#ifndef BTM_NO_SSP_ON_INQUIRY
390#define BTM_NO_SSP_ON_INQUIRY FALSE
391#endif
392
The Android Open Source Project5738f832012-12-12 16:00:35 -0800393/* Includes SCO if TRUE */
394#ifndef BTM_SCO_INCLUDED
395#define BTM_SCO_INCLUDED TRUE /* TRUE includes SCO code */
396#endif
397
398/* Includes SCO if TRUE */
399#ifndef BTM_SCO_HCI_INCLUDED
400#define BTM_SCO_HCI_INCLUDED FALSE /* TRUE includes SCO over HCI code */
401#endif
402
403/* Includes WBS if TRUE */
404#ifndef BTM_WBS_INCLUDED
405#define BTM_WBS_INCLUDED FALSE /* TRUE includes WBS code */
406#endif
407
The Android Open Source Project5738f832012-12-12 16:00:35 -0800408/* This is used to work around a controller bug that doesn't like Disconnect
409** issued while there is a role switch in progress
410*/
411#ifndef BTM_DISC_DURING_RS
412#define BTM_DISC_DURING_RS TRUE
413#endif
414
415/**************************
416** Initial SCO TX credit
417*************************/
418/* max TX SCO data packet size */
419#ifndef BTM_SCO_DATA_SIZE_MAX
420#define BTM_SCO_DATA_SIZE_MAX 240
421#endif
422
The Android Open Source Project5738f832012-12-12 16:00:35 -0800423/* The size in bytes of the BTM inquiry database. */
424#ifndef BTM_INQ_DB_SIZE
425#define BTM_INQ_DB_SIZE 40
426#endif
427
The Android Open Source Project5738f832012-12-12 16:00:35 -0800428/* The default scan mode */
429#ifndef BTM_DEFAULT_SCAN_TYPE
430#define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED
431#endif
432
433/* Should connections to unknown devices be allowed when not discoverable? */
434#ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
435#define BTM_ALLOW_CONN_IF_NONDISCOVER TRUE
436#endif
437
The Android Open Source Project5738f832012-12-12 16:00:35 -0800438/* Sets the Page_Scan_Window: the length of time that the device is performing a page scan. */
439#ifndef BTM_DEFAULT_CONN_WINDOW
440#define BTM_DEFAULT_CONN_WINDOW 0x0012
441#endif
442
443/* Sets the Page_Scan_Activity: the interval between the start of two consecutive page scans. */
444#ifndef BTM_DEFAULT_CONN_INTERVAL
445#define BTM_DEFAULT_CONN_INTERVAL 0x0800
446#endif
447
The Android Open Source Project5738f832012-12-12 16:00:35 -0800448/* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
449#ifndef BTM_DEFAULT_DISC_WINDOW
450#define BTM_DEFAULT_DISC_WINDOW 0x0012
451#endif
452
453/* When automatic inquiry scan is enabled, this sets the inquiry scan interval. */
454#ifndef BTM_DEFAULT_DISC_INTERVAL
455#define BTM_DEFAULT_DISC_INTERVAL 0x0800
456#endif
457
The Android Open Source Project5738f832012-12-12 16:00:35 -0800458/* Default class of device
459* {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
460*
461* SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
462* MAJOR_CLASS:0x02 - PHONE
463* MINOR_CLASS:0x0C - SMART_PHONE
464*
465*/
466#ifndef BTA_DM_COD
467#define BTA_DM_COD {0x5A, 0x02, 0x0C}
468#endif
469
470/* The number of SCO links. */
471#ifndef BTM_MAX_SCO_LINKS
Nitin Srivastava90a32532014-03-14 16:19:58 -0700472#define BTM_MAX_SCO_LINKS 3
The Android Open Source Project5738f832012-12-12 16:00:35 -0800473#endif
474
475/* The preferred type of SCO links (2-eSCO, 0-SCO). */
476#ifndef BTM_DEFAULT_SCO_MODE
477#define BTM_DEFAULT_SCO_MODE 2
478#endif
479
480/* The number of security records for peer devices. */
481#ifndef BTM_SEC_MAX_DEVICE_RECORDS
482#define BTM_SEC_MAX_DEVICE_RECORDS 100
483#endif
484
485/* The number of security records for services. */
486#ifndef BTM_SEC_MAX_SERVICE_RECORDS
487#define BTM_SEC_MAX_SERVICE_RECORDS 32
488#endif
489
490/* If True, force a retrieval of remote device name for each bond in case it's changed */
491#ifndef BTM_SEC_FORCE_RNR_FOR_DBOND
492#define BTM_SEC_FORCE_RNR_FOR_DBOND FALSE
493#endif
494
495/* Maximum device name length used in btm database. */
496#ifndef BTM_MAX_REM_BD_NAME_LEN
497#define BTM_MAX_REM_BD_NAME_LEN 248
498#endif
499
500/* Maximum local device name length stored btm database.
501 '0' disables storage of the local name in BTM */
502#ifndef BTM_MAX_LOC_BD_NAME_LEN
503#define BTM_MAX_LOC_BD_NAME_LEN 248
504#endif
505
Matthew Xie1e5109b2012-11-09 18:26:26 -0800506/* Fixed Default String. When this is defined as null string, the device's
507 * product model name is used as the default local name.
508 */
The Android Open Source Project5738f832012-12-12 16:00:35 -0800509#ifndef BTM_DEF_LOCAL_NAME
510#define BTM_DEF_LOCAL_NAME ""
511#endif
512
513/* Maximum service name stored with security authorization (0 if not needed) */
514#ifndef BTM_SEC_SERVICE_NAME_LEN
515#define BTM_SEC_SERVICE_NAME_LEN BT_MAX_SERVICE_NAME_LEN
516#endif
517
The Android Open Source Project5738f832012-12-12 16:00:35 -0800518/* Maximum length of the service name. */
519#ifndef BT_MAX_SERVICE_NAME_LEN
520#define BT_MAX_SERVICE_NAME_LEN 21
521#endif
522
523/* ACL buffer size in HCI Host Buffer Size command. */
524#ifndef BTM_ACL_BUF_SIZE
525#define BTM_ACL_BUF_SIZE 0
526#endif
527
The Android Open Source Project5738f832012-12-12 16:00:35 -0800528/* The maximum number of clients that can register with the power manager. */
529#ifndef BTM_MAX_PM_RECORDS
530#define BTM_MAX_PM_RECORDS 2
531#endif
532
533/* This is set to show debug trace messages for the power manager. */
534#ifndef BTM_PM_DEBUG
535#define BTM_PM_DEBUG FALSE
536#endif
537
538/* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */
539#ifndef BTM_SCO_WAKE_PARKED_LINK
540#define BTM_SCO_WAKE_PARKED_LINK TRUE
541#endif
542
The Android Open Source Project5738f832012-12-12 16:00:35 -0800543/* If the user does not respond to security process requests within this many seconds,
544 * a negative response would be sent automatically.
The Android Open Source Project5738f832012-12-12 16:00:35 -0800545 * 30 is LMP response timeout value */
546#ifndef BTM_SEC_TIMEOUT_VALUE
547#define BTM_SEC_TIMEOUT_VALUE 35
548#endif
549
550/* Maximum number of callbacks that can be registered using BTM_RegisterForVSEvents */
551#ifndef BTM_MAX_VSE_CALLBACKS
552#define BTM_MAX_VSE_CALLBACKS 3
553#endif
554
The Android Open Source Project5738f832012-12-12 16:00:35 -0800555/******************************************
556** Lisbon Features
557*******************************************/
The Android Open Source Project5738f832012-12-12 16:00:35 -0800558/* This is set to TRUE if the FEC is required for EIR packet. */
559#ifndef BTM_EIR_DEFAULT_FEC_REQUIRED
560#define BTM_EIR_DEFAULT_FEC_REQUIRED TRUE
561#endif
562
The Android Open Source Project5738f832012-12-12 16:00:35 -0800563/* The IO capability of the local device (for Simple Pairing) */
564#ifndef BTM_LOCAL_IO_CAPS
565#define BTM_LOCAL_IO_CAPS BTM_IO_CAP_IO
566#endif
567
Andre Eisenbach26fa02b2014-11-18 09:39:00 -0800568#ifndef BTM_LOCAL_IO_CAPS_BLE
569#define BTM_LOCAL_IO_CAPS_BLE BTM_IO_CAP_KBDISP
570#endif
571
The Android Open Source Project5738f832012-12-12 16:00:35 -0800572/* The default MITM Protection Requirement (for Simple Pairing)
573 * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
574#ifndef BTM_DEFAULT_AUTH_REQ
575#define BTM_DEFAULT_AUTH_REQ BTM_AUTH_SP_NO
576#endif
577
578/* The default MITM Protection Requirement for dedicated bonding using Simple Pairing
579 * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
580#ifndef BTM_DEFAULT_DD_AUTH_REQ
581#define BTM_DEFAULT_DD_AUTH_REQ BTM_AUTH_AP_YES
582#endif
583
584/* Include Out-of-Band implementation for Simple Pairing */
585#ifndef BTM_OOB_INCLUDED
586#define BTM_OOB_INCLUDED TRUE
587#endif
588
589/* TRUE to include Sniff Subrating */
590#ifndef BTM_SSR_INCLUDED
591#define BTM_SSR_INCLUDED TRUE
592#endif
593
594/*************************
595** End of Lisbon Features
596**************************/
597
598/* Used for conformance testing ONLY */
599#ifndef BTM_BLE_CONFORMANCE_TESTING
600#define BTM_BLE_CONFORMANCE_TESTING FALSE
601#endif
602
The Android Open Source Project5738f832012-12-12 16:00:35 -0800603/******************************************************************************
604**
605** L2CAP
606**
607******************************************************************************/
608
The Android Open Source Project5738f832012-12-12 16:00:35 -0800609/* The maximum number of simultaneous links that L2CAP can support. */
610#ifndef MAX_ACL_CONNECTIONS
611#define MAX_L2CAP_LINKS 7
612#else
613#define MAX_L2CAP_LINKS MAX_ACL_CONNECTIONS
614#endif
615
616/* The maximum number of simultaneous channels that L2CAP can support. */
617#ifndef MAX_L2CAP_CHANNELS
Ganesh Ganapathi Battaead3cde2013-02-05 15:22:31 -0800618#define MAX_L2CAP_CHANNELS 16
The Android Open Source Project5738f832012-12-12 16:00:35 -0800619#endif
620
621/* The maximum number of simultaneous applications that can register with L2CAP. */
622#ifndef MAX_L2CAP_CLIENTS
623#define MAX_L2CAP_CLIENTS 15
624#endif
625
626/* The number of seconds of link inactivity before a link is disconnected. */
627#ifndef L2CAP_LINK_INACTIVITY_TOUT
628#define L2CAP_LINK_INACTIVITY_TOUT 4
629#endif
630
631/* The number of seconds of link inactivity after bonding before a link is disconnected. */
632#ifndef L2CAP_BONDING_TIMEOUT
633#define L2CAP_BONDING_TIMEOUT 3
634#endif
635
636/* The time from the HCI connection complete to disconnect if no channel is established. */
637#ifndef L2CAP_LINK_STARTUP_TOUT
638#define L2CAP_LINK_STARTUP_TOUT 60
639#endif
640
641/* The L2CAP MTU; must be in accord with the HCI ACL pool size. */
642#ifndef L2CAP_MTU_SIZE
643#define L2CAP_MTU_SIZE 1691
644#endif
645
646/* The L2CAP MPS over Bluetooth; must be in accord with the FCR tx pool size and ACL down buffer size. */
647#ifndef L2CAP_MPS_OVER_BR_EDR
648#define L2CAP_MPS_OVER_BR_EDR 1010
649#endif
650
The Android Open Source Project5738f832012-12-12 16:00:35 -0800651/* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */
652#ifndef L2CAP_HOST_FC_ACL_BUFS
653#define L2CAP_HOST_FC_ACL_BUFS 20
654#endif
655
The Android Open Source Project5738f832012-12-12 16:00:35 -0800656/* This is set to enable L2CAP to take the ACL link out of park mode when ACL data is to be sent. */
657#ifndef L2CAP_WAKE_PARKED_LINK
658#define L2CAP_WAKE_PARKED_LINK TRUE
659#endif
660
661/* Whether link wants to be the master or the slave. */
662#ifndef L2CAP_DESIRED_LINK_ROLE
663#define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_SLAVE
664#endif
665
666/* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
667#ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
668#define L2CAP_NON_FLUSHABLE_PB_INCLUDED TRUE
669#endif
670
671/* Minimum number of ACL credit for high priority link */
672#ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
The Android Open Source Project689d66b2012-12-12 17:18:15 -0800673#define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5
The Android Open Source Project5738f832012-12-12 16:00:35 -0800674#endif
675
676/* used for monitoring HCI ACL credit management */
677#ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
678#define L2CAP_HCI_FLOW_CONTROL_DEBUG TRUE
679#endif
680
681/* Used for calculating transmit buffers off of */
682#ifndef L2CAP_NUM_XMIT_BUFFS
683#define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
684#endif
685
686/* Unicast Connectionless Data */
687#ifndef L2CAP_UCD_INCLUDED
688#define L2CAP_UCD_INCLUDED FALSE
689#endif
690
691/* Unicast Connectionless Data MTU */
692#ifndef L2CAP_UCD_MTU
693#define L2CAP_UCD_MTU L2CAP_MTU_SIZE
694#endif
695
696/* Unicast Connectionless Data Idle Timeout */
697#ifndef L2CAP_UCD_IDLE_TIMEOUT
698#define L2CAP_UCD_IDLE_TIMEOUT 2
699#endif
700
701/* Unicast Connectionless Data Idle Timeout */
702#ifndef L2CAP_UCD_CH_PRIORITY
703#define L2CAP_UCD_CH_PRIORITY L2CAP_CHNL_PRIORITY_MEDIUM
704#endif
705
The Android Open Source Project5738f832012-12-12 16:00:35 -0800706/* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
707/* Excluding L2CAP signaling channel and UCD */
708#ifndef L2CAP_NUM_FIXED_CHNLS
Kim Schulz8372aa52015-03-25 10:39:40 +0100709#define L2CAP_NUM_FIXED_CHNLS 32
The Android Open Source Project5738f832012-12-12 16:00:35 -0800710#endif
711
712/* First fixed channel supported */
713#ifndef L2CAP_FIRST_FIXED_CHNL
Satya Calloji444a8da2015-03-06 10:38:22 -0800714#define L2CAP_FIRST_FIXED_CHNL 4
The Android Open Source Project5738f832012-12-12 16:00:35 -0800715#endif
716
717#ifndef L2CAP_LAST_FIXED_CHNL
718#define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
719#endif
720
721/* Round Robin service channels in link */
722#ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
723#define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE TRUE
724#endif
725
726/* Used for calculating transmit buffers off of */
727#ifndef L2CAP_NUM_XMIT_BUFFS
728#define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
729#endif
730
The Android Open Source Project5738f832012-12-12 16:00:35 -0800731/* used for monitoring eL2CAP data flow */
732#ifndef L2CAP_ERTM_STATS
733#define L2CAP_ERTM_STATS FALSE
734#endif
735
The Android Open Source Project5738f832012-12-12 16:00:35 -0800736/* Used for conformance testing ONLY: When TRUE lets scriptwrapper overwrite info response */
737#ifndef L2CAP_CONFORMANCE_TESTING
738#define L2CAP_CONFORMANCE_TESTING FALSE
739#endif
740
Kim Schulz8372aa52015-03-25 10:39:40 +0100741/*
742 * Max bytes per connection to buffer locally before dropping the
743 * connection if local client does not receive it - default is 1MB
744 */
745#ifndef L2CAP_MAX_RX_BUFFER
746#define L2CAP_MAX_RX_BUFFER 0x100000
747#endif
748
749
The Android Open Source Project5738f832012-12-12 16:00:35 -0800750#ifndef TIMER_PARAM_TYPE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800751#define TIMER_PARAM_TYPE UINT32
752#endif
The Android Open Source Project5738f832012-12-12 16:00:35 -0800753
754/******************************************************************************
755**
756** BLE
757**
758******************************************************************************/
759
Ganesh Ganapathi Batta4af5f3e2013-04-08 08:32:01 -0700760#ifndef BLE_INCLUDED
Ganesh Ganapathi Battaead3cde2013-02-05 15:22:31 -0800761#define BLE_INCLUDED TRUE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800762#endif
763
Andre Eisenbachb203d472013-11-20 17:23:06 -0800764#ifndef BLE_ANDROID_CONTROLLER_SCAN_FILTER
765#define BLE_ANDROID_CONTROLLER_SCAN_FILTER TRUE
766#endif
767
The Android Open Source Project5738f832012-12-12 16:00:35 -0800768#ifndef LOCAL_BLE_CONTROLLER_ID
769#define LOCAL_BLE_CONTROLLER_ID (1)
770#endif
771
Andre Eisenbach3e0dc732014-10-24 09:55:34 -0700772/*
773 * Toggles support for general LE privacy features such as remote address
774 * resolution, local address rotation etc.
775 */
Ganesh Ganapathi Batta7fa4fba2014-04-16 16:50:09 -0700776#ifndef BLE_PRIVACY_SPT
Chris Manton0aee3312014-06-12 12:52:33 -0700777#define BLE_PRIVACY_SPT TRUE
Zhihai Xu8b35b3f2014-03-11 15:01:45 -0700778#endif
779
Andre Eisenbach3e0dc732014-10-24 09:55:34 -0700780/*
781 * Enables or disables support for local privacy (ex. address rotation)
782 */
783#ifndef BLE_LOCAL_PRIVACY_ENABLED
784#define BLE_LOCAL_PRIVACY_ENABLED TRUE
785#endif
786
787/*
788 * Toggles support for vendor specific extensions such as RPA offloading,
789 * feature discovery, multi-adv etc.
790 */
Wei Wanged534e32014-05-20 06:30:13 +0000791#ifndef BLE_VND_INCLUDED
Prerepa Viswanadham16fe0822014-08-07 11:38:06 -0700792#define BLE_VND_INCLUDED FALSE
Wei Wanged534e32014-05-20 06:30:13 +0000793#endif
git-zhenye.broadcom.comd77eec92014-08-07 12:50:16 -0700794
795#ifndef BTM_BLE_ADV_TX_POWER
796#define BTM_BLE_ADV_TX_POWER {-21, -15, -7, 1, 9}
797#endif
798
799
800#ifndef BLE_BATCH_SCAN_INCLUDED
801#define BLE_BATCH_SCAN_INCLUDED TRUE
802#endif
803
The Android Open Source Project5738f832012-12-12 16:00:35 -0800804/******************************************************************************
805**
806** ATT/GATT Protocol/Profile Settings
807**
808******************************************************************************/
Mike J. Chen597c5772014-02-11 16:23:31 -0800809#ifndef BTA_GATT_INCLUDED
810#if BLE_INCLUDED == TRUE
811#define BTA_GATT_INCLUDED TRUE
812#else
813#define BTA_GATT_INCLUDED FALSE
814#endif
815#endif
816
817#if BTA_GATT_INCLUDED == TRUE && BLE_INCLUDED == FALSE
818#error "can't have GATT without BLE"
819#endif
820
Ganesh Ganapathi Batta7fa4fba2014-04-16 16:50:09 -0700821#ifndef BLE_LLT_INCLUDED
822#define BLE_LLT_INCLUDED TRUE
823#endif
Chris Mantone97508e2014-09-24 10:27:52 -0700824
The Android Open Source Project5738f832012-12-12 16:00:35 -0800825#ifndef ATT_INCLUDED
Ganesh Ganapathi Battaead3cde2013-02-05 15:22:31 -0800826#define ATT_INCLUDED TRUE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800827#endif
828
829#ifndef ATT_DEBUG
Ganesh Ganapathi Battaead3cde2013-02-05 15:22:31 -0800830#define ATT_DEBUG TRUE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800831#endif
832
Zhihai Xu602162a2014-02-10 10:57:13 -0800833#ifndef BLE_PERIPHERAL_MODE_SUPPORT
Ganesh Ganapathi Batta7fa4fba2014-04-16 16:50:09 -0700834#define BLE_PERIPHERAL_MODE_SUPPORT TRUE
Zhihai Xu602162a2014-02-10 10:57:13 -0800835#endif
836
Zhihai Xu5702d5c2014-03-18 15:27:05 -0700837#ifndef BLE_DELAY_REQUEST_ENC
838/* This flag is to work around IPHONE problem, We need to wait for iPhone ready
839 before send encryption request to iPhone */
840#define BLE_DELAY_REQUEST_ENC FALSE
841#endif
842
Zhihai Xua0cf8d62014-04-05 00:25:20 -0700843#ifndef GAP_TRANSPORT_SUPPORTED
844#define GAP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
845#endif
846
847#ifndef GATTP_TRANSPORT_SUPPORTED
848#define GATTP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
849#endif
850
The Android Open Source Project5738f832012-12-12 16:00:35 -0800851#ifndef GATT_MAX_SR_PROFILES
852#define GATT_MAX_SR_PROFILES 32 /* max is 32 */
853#endif
854
855#ifndef GATT_MAX_APPS
Wei Wang845961f2014-08-06 21:27:16 -0700856#define GATT_MAX_APPS 32 /* note: 2 apps used internally GATT and GAP */
The Android Open Source Project5738f832012-12-12 16:00:35 -0800857#endif
858
The Android Open Source Project5738f832012-12-12 16:00:35 -0800859#ifndef GATT_MAX_PHY_CHANNEL
Andre Eisenbach8dc42c62013-11-01 14:47:52 -0700860#define GATT_MAX_PHY_CHANNEL 7
The Android Open Source Project5738f832012-12-12 16:00:35 -0800861#endif
862
863/* Used for conformance testing ONLY */
864#ifndef GATT_CONFORMANCE_TESTING
865#define GATT_CONFORMANCE_TESTING FALSE
866#endif
867
868/* number of background connection device allowence, ideally to be the same as WL size
869*/
870#ifndef GATT_MAX_BG_CONN_DEV
871#define GATT_MAX_BG_CONN_DEV 32
872#endif
873
874/******************************************************************************
875**
876** SMP
877**
878******************************************************************************/
879#ifndef SMP_INCLUDED
Mike J. Chena2c51a72014-02-11 13:50:32 -0800880#if BLE_INCLUDED == TRUE
Ganesh Ganapathi Battaead3cde2013-02-05 15:22:31 -0800881#define SMP_INCLUDED TRUE
Mike J. Chena2c51a72014-02-11 13:50:32 -0800882#else
883#define SMP_INCLUDED FALSE
884#endif
885#endif
886
887#if SMP_INCLUDED == TRUE && BLE_INCLUDED == FALSE
888#error "can't have SMP without BLE"
The Android Open Source Project5738f832012-12-12 16:00:35 -0800889#endif
890
891#ifndef SMP_DEBUG
Andre Eisenbacha7246ca2014-12-09 14:08:58 -0800892#define SMP_DEBUG FALSE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800893#endif
894
895#ifndef SMP_DEFAULT_AUTH_REQ
896#define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY
897#endif
898
899#ifndef SMP_MAX_ENC_KEY_SIZE
900#define SMP_MAX_ENC_KEY_SIZE 16
901#endif
902
903#ifndef SMP_MIN_ENC_KEY_SIZE
904#define SMP_MIN_ENC_KEY_SIZE 7
905#endif
906
Satya Calloji444a8da2015-03-06 10:38:22 -0800907/* minimum link timeout after SMP pairing is done, leave room for key exchange
908 and racing condition for the following service connection.
909 Prefer greater than 0 second, and no less than default inactivity link idle
910 timer(L2CAP_LINK_INACTIVITY_TOUT) in l2cap) */
911#ifndef SMP_LINK_TOUT_MIN
912#if (L2CAP_LINK_INACTIVITY_TOUT > 0)
913#define SMP_LINK_TOUT_MIN L2CAP_LINK_INACTIVITY_TOUT
914#else
915#define SMP_LINK_TOUT_MIN 2
The Android Open Source Project5738f832012-12-12 16:00:35 -0800916#endif
Satya Calloji444a8da2015-03-06 10:38:22 -0800917#endif
The Android Open Source Project5738f832012-12-12 16:00:35 -0800918/******************************************************************************
919**
920** SDP
921**
922******************************************************************************/
923
924/* This is set to enable SDP server functionality. */
925#ifndef SDP_SERVER_ENABLED
926#define SDP_SERVER_ENABLED TRUE
927#endif
928
929/* The maximum number of SDP records the server can support. */
930#ifndef SDP_MAX_RECORDS
Kim Schulz8372aa52015-03-25 10:39:40 +0100931#define SDP_MAX_RECORDS 30
The Android Open Source Project5738f832012-12-12 16:00:35 -0800932#endif
933
934/* The maximum number of attributes in each record. */
935#ifndef SDP_MAX_REC_ATTR
The Android Open Source Project5738f832012-12-12 16:00:35 -0800936#define SDP_MAX_REC_ATTR 25
The Android Open Source Project5738f832012-12-12 16:00:35 -0800937#endif
938
939#ifndef SDP_MAX_PAD_LEN
940#define SDP_MAX_PAD_LEN 600
941#endif
942
943/* The maximum length, in bytes, of an attribute. */
944#ifndef SDP_MAX_ATTR_LEN
The Android Open Source Project5738f832012-12-12 16:00:35 -0800945#define SDP_MAX_ATTR_LEN 400
946#endif
947
948/* The maximum number of attribute filters supported by SDP databases. */
949#ifndef SDP_MAX_ATTR_FILTERS
950#define SDP_MAX_ATTR_FILTERS 15
951#endif
952
953/* The maximum number of UUID filters supported by SDP databases. */
954#ifndef SDP_MAX_UUID_FILTERS
955#define SDP_MAX_UUID_FILTERS 3
956#endif
957
958/* This is set to enable SDP client functionality. */
959#ifndef SDP_CLIENT_ENABLED
960#define SDP_CLIENT_ENABLED TRUE
961#endif
962
963/* The maximum number of record handles retrieved in a search. */
964#ifndef SDP_MAX_DISC_SERVER_RECS
965#define SDP_MAX_DISC_SERVER_RECS 21
966#endif
967
968/* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */
969#ifndef SDP_MAX_LIST_BYTE_COUNT
970#define SDP_MAX_LIST_BYTE_COUNT 4096
971#endif
972
973/* The maximum number of parameters in an SDP protocol element. */
974#ifndef SDP_MAX_PROTOCOL_PARAMS
975#define SDP_MAX_PROTOCOL_PARAMS 2
976#endif
977
978/* The maximum number of simultaneous client and server connections. */
979#ifndef SDP_MAX_CONNECTIONS
980#define SDP_MAX_CONNECTIONS 4
981#endif
982
983/* The MTU size for the L2CAP configuration. */
984#ifndef SDP_MTU_SIZE
Matthew Xief8d46a62014-01-15 21:49:32 -0800985#define SDP_MTU_SIZE 672
The Android Open Source Project5738f832012-12-12 16:00:35 -0800986#endif
987
988/* The flush timeout for the L2CAP configuration. */
989#ifndef SDP_FLUSH_TO
990#define SDP_FLUSH_TO 0xFFFF
991#endif
992
993/* The name for security authorization. */
994#ifndef SDP_SERVICE_NAME
995#define SDP_SERVICE_NAME "Service Discovery"
996#endif
997
998/* The security level for BTM. */
999#ifndef SDP_SECURITY_LEVEL
1000#define SDP_SECURITY_LEVEL BTM_SEC_NONE
1001#endif
1002
The Android Open Source Project5738f832012-12-12 16:00:35 -08001003/******************************************************************************
1004**
1005** RFCOMM
1006**
1007******************************************************************************/
1008
The Android Open Source Project5738f832012-12-12 16:00:35 -08001009/* The maximum number of ports supported. */
1010#ifndef MAX_RFC_PORTS
1011#define MAX_RFC_PORTS 30
1012#endif
1013
1014/* The maximum simultaneous links to different devices. */
1015#ifndef MAX_ACL_CONNECTIONS
1016#define MAX_BD_CONNECTIONS 7
1017#else
1018#define MAX_BD_CONNECTIONS MAX_ACL_CONNECTIONS
1019#endif
1020
1021/* The port receive queue low watermark level, in bytes. */
1022#ifndef PORT_RX_LOW_WM
1023#define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
1024#endif
1025
1026/* The port receive queue high watermark level, in bytes. */
1027#ifndef PORT_RX_HIGH_WM
1028#define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
1029#endif
1030
1031/* The port receive queue critical watermark level, in bytes. */
1032#ifndef PORT_RX_CRITICAL_WM
1033#define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
1034#endif
1035
1036/* The port receive queue low watermark level, in number of buffers. */
1037#ifndef PORT_RX_BUF_LOW_WM
1038#define PORT_RX_BUF_LOW_WM 4
1039#endif
1040
1041/* The port receive queue high watermark level, in number of buffers. */
1042#ifndef PORT_RX_BUF_HIGH_WM
1043#define PORT_RX_BUF_HIGH_WM 10
1044#endif
1045
1046/* The port receive queue critical watermark level, in number of buffers. */
1047#ifndef PORT_RX_BUF_CRITICAL_WM
1048#define PORT_RX_BUF_CRITICAL_WM 15
1049#endif
1050
1051/* The port transmit queue high watermark level, in bytes. */
1052#ifndef PORT_TX_HIGH_WM
1053#define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
1054#endif
1055
1056/* The port transmit queue critical watermark level, in bytes. */
1057#ifndef PORT_TX_CRITICAL_WM
1058#define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
1059#endif
1060
1061/* The port transmit queue high watermark level, in number of buffers. */
1062#ifndef PORT_TX_BUF_HIGH_WM
1063#define PORT_TX_BUF_HIGH_WM 10
1064#endif
1065
1066/* The port transmit queue high watermark level, in number of buffers. */
1067#ifndef PORT_TX_BUF_CRITICAL_WM
1068#define PORT_TX_BUF_CRITICAL_WM 15
1069#endif
1070
1071/* The RFCOMM multiplexer preferred flow control mechanism. */
1072#ifndef PORT_FC_DEFAULT
1073#define PORT_FC_DEFAULT PORT_FC_CREDIT
1074#endif
1075
1076/* The maximum number of credits receiver sends to peer when using credit-based flow control. */
1077#ifndef PORT_CREDIT_RX_MAX
1078#define PORT_CREDIT_RX_MAX 16
1079#endif
1080
1081/* The credit low watermark level. */
1082#ifndef PORT_CREDIT_RX_LOW
1083#define PORT_CREDIT_RX_LOW 8
1084#endif
1085
The Android Open Source Project5738f832012-12-12 16:00:35 -08001086/* if application like BTA, Java or script test engine is running on other than BTU thread, */
1087/* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_lock() or GKI_disable() */
1088#ifndef PORT_SCHEDULE_LOCK
1089#define PORT_SCHEDULE_LOCK GKI_disable()
1090#endif
1091
1092/* if application like BTA, Java or script test engine is running on other than BTU thread, */
1093/* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_unlock() or GKI_enable() */
1094#ifndef PORT_SCHEDULE_UNLOCK
1095#define PORT_SCHEDULE_UNLOCK GKI_enable()
1096#endif
1097
1098/******************************************************************************
1099**
Kim Schulz8372aa52015-03-25 10:39:40 +01001100** OBEX
1101**
1102******************************************************************************/
1103#define OBX_14_INCLUDED FALSE
1104/* This option is application when OBX_14_INCLUDED=TRUE
1105 Pool ID where to reassemble the SDU.
1106 This Pool will allow buffers to be used that are larger than
1107 the L2CAP_MAX_MTU. */
1108#ifndef OBX_USER_RX_POOL_ID
1109#define OBX_USER_RX_POOL_ID OBX_LRG_DATA_POOL_ID
1110#endif
1111
1112/* This option is application when OBX_14_INCLUDED=TRUE
1113 Pool ID where to hold the SDU.
1114 This Pool will allow buffers to be used that are larger than
1115 the L2CAP_MAX_MTU. */
1116#ifndef OBX_USER_TX_POOL_ID
1117#define OBX_USER_TX_POOL_ID OBX_LRG_DATA_POOL_ID
1118#endif
1119
1120/* This option is application when OBX_14_INCLUDED=TRUE
1121GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
1122*/
1123#ifndef OBX_FCR_RX_POOL_ID
1124#define OBX_FCR_RX_POOL_ID HCI_ACL_POOL_ID
1125#endif
1126
1127/* This option is application when OBX_14_INCLUDED=TRUE
1128GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
1129L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
1130Note: This pool needs to have enough buffers to hold two times the window size negotiated
1131 in the L2CA_SetFCROptions (2 * tx_win_size) to allow for retransmissions.
1132 The size of each buffer must be able to hold the maximum MPS segment size passed in
1133 L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1134*/
1135#ifndef OBX_FCR_TX_POOL_ID
1136#define OBX_FCR_TX_POOL_ID HCI_ACL_POOL_ID
1137#endif
1138
1139/* This option is application when OBX_14_INCLUDED=TRUE
1140Size of the transmission window when using enhanced retransmission mode. Not used
1141in basic and streaming modes. Range: 1 - 63
1142*/
1143#ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR
1144#define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 20
1145#endif
1146
1147/* This option is application when OBX_14_INCLUDED=TRUE
1148Number of transmission attempts for a single I-Frame before taking
1149Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1150Streaming modes.
1151Range: 0, 1-0xFF
11520 - infinite retransmissions
11531 - single transmission
1154*/
1155#ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT
1156#define OBX_FCR_OPT_MAX_TX_B4_DISCNT 20
1157#endif
1158
1159/* This option is application when OBX_14_INCLUDED=TRUE
1160Retransmission Timeout
1161Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF.
1162 */
1163#ifndef OBX_FCR_OPT_RETX_TOUT
1164#define OBX_FCR_OPT_RETX_TOUT 2000
1165#endif
1166
1167/* This option is application when OBX_14_INCLUDED=TRUE
1168Monitor Timeout
1169Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
1170*/
1171#ifndef OBX_FCR_OPT_MONITOR_TOUT
1172#define OBX_FCR_OPT_MONITOR_TOUT 12000
1173#endif
1174
1175/* This option is application when OBX_14_INCLUDED=TRUE
1176Maximum PDU payload size.
1177Suggestion: The maximum amount of data that will fit into a 3-DH5 packet.
1178Range: 2 octets
1179*/
1180#ifndef OBX_FCR_OPT_MAX_PDU_SIZE
1181#define OBX_FCR_OPT_MAX_PDU_SIZE L2CAP_MPS_OVER_BR_EDR
1182#endif
1183
1184
1185/******************************************************************************
1186**
The Android Open Source Project5738f832012-12-12 16:00:35 -08001187** BNEP
1188**
1189******************************************************************************/
1190
1191#ifndef BNEP_INCLUDED
1192#define BNEP_INCLUDED TRUE
1193#endif
1194
The Android Open Source Project5738f832012-12-12 16:00:35 -08001195/* BNEP status API call is used mainly to get the L2CAP handle */
1196#ifndef BNEP_SUPPORTS_STATUS_API
1197#define BNEP_SUPPORTS_STATUS_API TRUE
1198#endif
1199
The Android Open Source Project5738f832012-12-12 16:00:35 -08001200/*
1201** When BNEP connection changes roles after the connection is established
1202** we will do an authentication check again on the new role
1203*/
1204#ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
1205#define BNEP_DO_AUTH_FOR_ROLE_SWITCH TRUE
1206#endif
1207
1208
1209/* Maximum number of protocol filters supported. */
1210#ifndef BNEP_MAX_PROT_FILTERS
1211#define BNEP_MAX_PROT_FILTERS 5
1212#endif
1213
1214/* Maximum number of multicast filters supported. */
1215#ifndef BNEP_MAX_MULTI_FILTERS
1216#define BNEP_MAX_MULTI_FILTERS 5
1217#endif
1218
1219/* Minimum MTU size. */
1220#ifndef BNEP_MIN_MTU_SIZE
1221#define BNEP_MIN_MTU_SIZE L2CAP_MTU_SIZE
1222#endif
1223
1224/* Preferred MTU size. */
1225#ifndef BNEP_MTU_SIZE
1226#define BNEP_MTU_SIZE BNEP_MIN_MTU_SIZE
1227#endif
1228
The Android Open Source Project5738f832012-12-12 16:00:35 -08001229/* Maximum number of buffers allowed in transmit data queue. */
1230#ifndef BNEP_MAX_XMITQ_DEPTH
1231#define BNEP_MAX_XMITQ_DEPTH 20
1232#endif
1233
1234/* Maximum number BNEP of connections supported. */
1235#ifndef BNEP_MAX_CONNECTIONS
1236#define BNEP_MAX_CONNECTIONS 7
1237#endif
1238
1239
1240/******************************************************************************
1241**
1242** AVDTP
1243**
1244******************************************************************************/
1245
1246#ifndef AVDT_INCLUDED
1247#define AVDT_INCLUDED TRUE
1248#endif
1249
1250/* Include reporting capability in AVDTP */
1251#ifndef AVDT_REPORTING
1252#define AVDT_REPORTING TRUE
1253#endif
1254
1255/* Include multiplexing capability in AVDTP */
1256#ifndef AVDT_MULTIPLEXING
1257#define AVDT_MULTIPLEXING TRUE
1258#endif
1259
1260/* Number of simultaneous links to different peer devices. */
1261#ifndef AVDT_NUM_LINKS
1262#define AVDT_NUM_LINKS 2
1263#endif
1264
1265/* Number of simultaneous stream endpoints. */
1266#ifndef AVDT_NUM_SEPS
1267#define AVDT_NUM_SEPS 3
1268#endif
1269
1270/* Number of transport channels setup per media stream(audio or video) */
1271#ifndef AVDT_NUM_CHANNELS
1272
1273#if AVDT_REPORTING == TRUE
1274/* signaling, media and reporting channels */
1275#define AVDT_NUM_CHANNELS 3
1276#else
1277/* signaling and media channels */
1278#define AVDT_NUM_CHANNELS 2
Chris Mantonf857d642014-09-26 13:31:41 -07001279#endif // AVDT_REPORTING
The Android Open Source Project5738f832012-12-12 16:00:35 -08001280
Chris Mantonf857d642014-09-26 13:31:41 -07001281#endif // AVDT_NUM_CHANNELS
The Android Open Source Project5738f832012-12-12 16:00:35 -08001282
1283/* Number of transport channels setup by AVDT for all media streams
1284 * AVDT_NUM_CHANNELS * Number of simultaneous streams.
1285 */
1286#ifndef AVDT_NUM_TC_TBL
1287#define AVDT_NUM_TC_TBL 6
1288#endif
1289
The Android Open Source Project5738f832012-12-12 16:00:35 -08001290/* Maximum size in bytes of the codec capabilities information element. */
1291#ifndef AVDT_CODEC_SIZE
1292#define AVDT_CODEC_SIZE 10
1293#endif
1294
1295/* Maximum size in bytes of the content protection information element. */
1296#ifndef AVDT_PROTECT_SIZE
1297#define AVDT_PROTECT_SIZE 90
1298#endif
1299
1300/* Maximum number of GKI buffers in the fragment queue (for video frames).
1301 * Must be less than the number of buffers in the buffer pool of size AVDT_DATA_POOL_SIZE */
1302#ifndef AVDT_MAX_FRAG_COUNT
1303#define AVDT_MAX_FRAG_COUNT 15
1304#endif
1305
1306/******************************************************************************
1307**
1308** PAN
1309**
1310******************************************************************************/
1311
1312#ifndef PAN_INCLUDED
1313#define PAN_INCLUDED TRUE
1314#endif
1315
1316/* This will enable the PANU role */
1317#ifndef PAN_SUPPORTS_ROLE_PANU
1318#define PAN_SUPPORTS_ROLE_PANU TRUE
1319#endif
1320
1321/* This will enable the GN role */
1322#ifndef PAN_SUPPORTS_ROLE_GN
1323#define PAN_SUPPORTS_ROLE_GN TRUE
1324#endif
1325
1326/* This will enable the NAP role */
1327#ifndef PAN_SUPPORTS_ROLE_NAP
1328#define PAN_SUPPORTS_ROLE_NAP TRUE
1329#endif
1330
1331/* This is just for debugging purposes */
1332#ifndef PAN_SUPPORTS_DEBUG_DUMP
1333#define PAN_SUPPORTS_DEBUG_DUMP TRUE
1334#endif
1335
The Android Open Source Project5738f832012-12-12 16:00:35 -08001336/* Maximum number of PAN connections allowed */
1337#ifndef MAX_PAN_CONNS
1338#define MAX_PAN_CONNS 7
1339#endif
1340
1341/* Default service name for NAP role */
1342#ifndef PAN_NAP_DEFAULT_SERVICE_NAME
1343#define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service"
1344#endif
1345
1346/* Default service name for GN role */
1347#ifndef PAN_GN_DEFAULT_SERVICE_NAME
1348#define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service"
1349#endif
1350
1351/* Default service name for PANU role */
1352#ifndef PAN_PANU_DEFAULT_SERVICE_NAME
1353#define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service"
1354#endif
1355
1356/* Default description for NAP role service */
1357#ifndef PAN_NAP_DEFAULT_DESCRIPTION
1358#define PAN_NAP_DEFAULT_DESCRIPTION "NAP"
1359#endif
1360
1361/* Default description for GN role service */
1362#ifndef PAN_GN_DEFAULT_DESCRIPTION
1363#define PAN_GN_DEFAULT_DESCRIPTION "GN"
1364#endif
1365
1366/* Default description for PANU role service */
1367#ifndef PAN_PANU_DEFAULT_DESCRIPTION
1368#define PAN_PANU_DEFAULT_DESCRIPTION "PANU"
1369#endif
1370
1371/* Default Security level for PANU role. */
1372#ifndef PAN_PANU_SECURITY_LEVEL
1373#define PAN_PANU_SECURITY_LEVEL 0
1374#endif
1375
1376/* Default Security level for GN role. */
1377#ifndef PAN_GN_SECURITY_LEVEL
1378#define PAN_GN_SECURITY_LEVEL 0
1379#endif
1380
1381/* Default Security level for NAP role. */
1382#ifndef PAN_NAP_SECURITY_LEVEL
1383#define PAN_NAP_SECURITY_LEVEL 0
1384#endif
1385
The Android Open Source Project5738f832012-12-12 16:00:35 -08001386/******************************************************************************
1387**
1388** GAP
1389**
1390******************************************************************************/
1391
Kim Schulz8372aa52015-03-25 10:39:40 +01001392#ifndef GAP_INCLUDED
1393#define GAP_INCLUDED TRUE
1394#endif
1395
1396/* This is set to enable use of GAP L2CAP connections. */
1397#ifndef GAP_CONN_INCLUDED
1398#define GAP_CONN_INCLUDED TRUE
1399#endif
1400
1401/* This is set to enable posting event for data write */
1402#ifndef GAP_CONN_POST_EVT_INCLUDED
1403#define GAP_CONN_POST_EVT_INCLUDED FALSE
1404#endif
1405
1406/* The maximum number of simultaneous GAP L2CAP connections. */
1407#ifndef GAP_MAX_CONNECTIONS
1408#define GAP_MAX_CONNECTIONS 30
1409#endif
1410
The Android Open Source Project5738f832012-12-12 16:00:35 -08001411/* keep the raw data received from SDP server in database. */
1412#ifndef SDP_RAW_DATA_INCLUDED
1413#define SDP_RAW_DATA_INCLUDED TRUE
1414#endif
1415
The Android Open Source Project5738f832012-12-12 16:00:35 -08001416/* Inquiry duration in 1.28 second units. */
1417#ifndef SDP_DEBUG
1418#define SDP_DEBUG TRUE
1419#endif
1420
1421/******************************************************************************
1422**
The Android Open Source Project5738f832012-12-12 16:00:35 -08001423** HID
1424**
1425******************************************************************************/
1426
The Android Open Source Project5738f832012-12-12 16:00:35 -08001427#ifndef HID_DEV_SUBCLASS
1428#define HID_DEV_SUBCLASS COD_MINOR_POINTING
1429#endif
1430
The Android Open Source Project5738f832012-12-12 16:00:35 -08001431#ifndef HID_CONTROL_POOL_ID
1432#define HID_CONTROL_POOL_ID 2
1433#endif
1434
1435#ifndef HID_INTERRUPT_POOL_ID
1436#define HID_INTERRUPT_POOL_ID 2
1437#endif
1438
1439/*************************************************************************
1440** Definitions for Both HID-Host & Device
1441*/
1442#ifndef HID_MAX_SVC_NAME_LEN
1443#define HID_MAX_SVC_NAME_LEN 32
1444#endif
1445
1446#ifndef HID_MAX_SVC_DESCR_LEN
1447#define HID_MAX_SVC_DESCR_LEN 32
1448#endif
1449
1450#ifndef HID_MAX_PROV_NAME_LEN
1451#define HID_MAX_PROV_NAME_LEN 32
1452#endif
1453
1454/*************************************************************************
1455** Definitions for HID-Host
1456*/
1457#ifndef HID_HOST_INCLUDED
1458#define HID_HOST_INCLUDED TRUE
1459#endif
1460
1461#ifndef HID_HOST_MAX_DEVICES
1462#define HID_HOST_MAX_DEVICES 7
1463#endif
1464
1465#ifndef HID_HOST_MTU
1466#define HID_HOST_MTU 640
1467#endif
1468
1469#ifndef HID_HOST_FLUSH_TO
1470#define HID_HOST_FLUSH_TO 0xffff
1471#endif
1472
1473#ifndef HID_HOST_MAX_CONN_RETRY
1474#define HID_HOST_MAX_CONN_RETRY (3)
1475#endif
1476
1477#ifndef HID_HOST_REPAGE_WIN
1478#define HID_HOST_REPAGE_WIN (2)
1479#endif
1480
The Android Open Source Project5738f832012-12-12 16:00:35 -08001481/*************************************************************************
1482 * A2DP Definitions
1483 */
1484#ifndef A2D_INCLUDED
1485#define A2D_INCLUDED TRUE
1486#endif
1487
The Android Open Source Project5738f832012-12-12 16:00:35 -08001488/******************************************************************************
1489**
1490** AVCTP
1491**
1492******************************************************************************/
1493
The Android Open Source Project5738f832012-12-12 16:00:35 -08001494/* Number of simultaneous ACL links to different peer devices. */
1495#ifndef AVCT_NUM_LINKS
1496#define AVCT_NUM_LINKS 2
1497#endif
1498
1499/* Number of simultaneous AVCTP connections. */
1500#ifndef AVCT_NUM_CONN
1501#define AVCT_NUM_CONN 3
1502#endif
1503
The Android Open Source Project5738f832012-12-12 16:00:35 -08001504/******************************************************************************
1505**
1506** AVRCP
1507**
1508******************************************************************************/
1509
Ravi Nagarajan9adddf42013-03-06 05:29:48 -08001510#ifndef AVRC_METADATA_INCLUDED
1511#define AVRC_METADATA_INCLUDED TRUE
1512#endif
1513
Satya Calloji247c68f2013-08-01 02:14:43 -07001514#ifndef AVRC_ADV_CTRL_INCLUDED
1515#define AVRC_ADV_CTRL_INCLUDED TRUE
1516#endif
1517
Mike Lockwood93912472014-06-26 11:08:24 -07001518#ifndef AVRC_CTLR_INCLUDED
1519#define AVRC_CTLR_INCLUDED TRUE
1520#endif
1521
The Android Open Source Project5738f832012-12-12 16:00:35 -08001522/******************************************************************************
1523**
1524** MCAP
1525**
1526******************************************************************************/
1527#ifndef MCA_INCLUDED
1528#define MCA_INCLUDED FALSE
1529#endif
1530
The Android Open Source Project5738f832012-12-12 16:00:35 -08001531/* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */
1532#ifndef MCA_CTRL_MTU
1533#define MCA_CTRL_MTU 60
1534#endif
1535
1536/* The maximum number of registered MCAP instances. */
1537#ifndef MCA_NUM_REGS
Priti Agheraf8f30c22013-04-02 15:31:19 -07001538#define MCA_NUM_REGS 12
The Android Open Source Project5738f832012-12-12 16:00:35 -08001539#endif
1540
1541/* The maximum number of control channels (to difference devices) per registered MCAP instances. */
1542#ifndef MCA_NUM_LINKS
1543#define MCA_NUM_LINKS 3
1544#endif
1545
1546/* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */
1547#ifndef MCA_NUM_DEPS
Priti Agheraf8f30c22013-04-02 15:31:19 -07001548#define MCA_NUM_DEPS 13
The Android Open Source Project5738f832012-12-12 16:00:35 -08001549#endif
1550
1551/* The maximum number of MDL link per control channel. */
1552#ifndef MCA_NUM_MDLS
1553#define MCA_NUM_MDLS 4
1554#endif
1555
1556/* Pool ID where to reassemble the SDU. */
1557#ifndef MCA_USER_RX_POOL_ID
1558#define MCA_USER_RX_POOL_ID HCI_ACL_POOL_ID
1559#endif
1560
1561/* Pool ID where to hold the SDU. */
1562#ifndef MCA_USER_TX_POOL_ID
1563#define MCA_USER_TX_POOL_ID HCI_ACL_POOL_ID
1564#endif
1565
1566/*
1567GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
1568*/
1569#ifndef MCA_FCR_RX_POOL_ID
1570#define MCA_FCR_RX_POOL_ID HCI_ACL_POOL_ID
1571#endif
1572
1573/*
1574GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
1575L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
1576Note: This pool needs to have enough buffers to hold two times the window size negotiated
1577 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
1578 The size of each buffer must be able to hold the maximum MPS segment size passed in
1579 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1580*/
1581#ifndef MCA_FCR_TX_POOL_ID
1582#define MCA_FCR_TX_POOL_ID HCI_ACL_POOL_ID
1583#endif
1584
1585/* MCAP control channel FCR Option:
1586Size of the transmission window when using enhanced retransmission mode.
15871 is defined by HDP specification for control channel.
1588*/
1589#ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
1590#define MCA_FCR_OPT_TX_WINDOW_SIZE 1
1591#endif
1592
1593/* MCAP control channel FCR Option:
1594Number of transmission attempts for a single I-Frame before taking
1595Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1596Streaming modes.
1597Range: 0, 1-0xFF
15980 - infinite retransmissions
15991 - single transmission
1600*/
1601#ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT
1602#define MCA_FCR_OPT_MAX_TX_B4_DISCNT 20
1603#endif
1604
1605/* MCAP control channel FCR Option: Retransmission Timeout
1606The AVRCP specification set a value in the range of 300 - 2000 ms
1607Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
1608Range: Minimum 2000 (2 secs) when supporting PBF.
1609 */
1610#ifndef MCA_FCR_OPT_RETX_TOUT
1611#define MCA_FCR_OPT_RETX_TOUT 2000
1612#endif
1613
1614/* MCAP control channel FCR Option: Monitor Timeout
1615The AVRCP specification set a value in the range of 300 - 2000 ms
1616Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
1617Range: Minimum 12000 (12 secs) when supporting PBF.
1618*/
1619#ifndef MCA_FCR_OPT_MONITOR_TOUT
1620#define MCA_FCR_OPT_MONITOR_TOUT 12000
1621#endif
1622
1623/* MCAP control channel FCR Option: Maximum PDU payload size.
1624The maximum number of payload octets that the local device can receive in a single PDU.
1625*/
1626#ifndef MCA_FCR_OPT_MPS_SIZE
1627#define MCA_FCR_OPT_MPS_SIZE 1000
1628#endif
1629
1630/* Shared transport */
1631#ifndef NFC_SHARED_TRANSPORT_ENABLED
1632#define NFC_SHARED_TRANSPORT_ENABLED FALSE
1633#endif
1634
1635/******************************************************************************
1636**
The Android Open Source Project5738f832012-12-12 16:00:35 -08001637** Sleep Mode (Low Power Mode)
1638**
1639******************************************************************************/
1640
1641#ifndef HCILP_INCLUDED
1642#define HCILP_INCLUDED TRUE
1643#endif
1644
1645/******************************************************************************
1646**
The Android Open Source Project5738f832012-12-12 16:00:35 -08001647** APPL - Application Task
1648**
1649******************************************************************************/
The Android Open Source Project5738f832012-12-12 16:00:35 -08001650
The Android Open Source Project5738f832012-12-12 16:00:35 -08001651#define L2CAP_FEATURE_REQ_ID 73
1652#define L2CAP_FEATURE_RSP_ID 173
1653
The Android Open Source Project5738f832012-12-12 16:00:35 -08001654/******************************************************************************
1655**
1656** BTA
1657**
1658******************************************************************************/
1659/* BTA EIR canned UUID list (default is dynamic) */
1660#ifndef BTA_EIR_CANNED_UUID_LIST
1661#define BTA_EIR_CANNED_UUID_LIST FALSE
1662#endif
1663
1664/* Number of supported customer UUID in EIR */
1665#ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
1666#define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8
1667#endif
1668
1669/* CHLD override for bluedroid */
1670#ifndef BTA_AG_CHLD_VAL_ECC
1671#define BTA_AG_CHLD_VAL_ECC "(0,1,1x,2,2x,3)"
1672#endif
1673
1674#ifndef BTA_AG_CHLD_VAL
1675#define BTA_AG_CHLD_VAL "(0,1,2,3)"
1676#endif
1677
1678/* Set the CIND to match HFP 1.5 */
1679#ifndef BTA_AG_CIND_INFO
1680#define BTA_AG_CIND_INFO "(\"call\",(0,1)),(\"callsetup\",(0-3)),(\"service\",(0-1)),(\"signal\",(0-5)),(\"roam\",(0,1)),(\"battchg\",(0-5)),(\"callheld\",(0-2))"
1681#endif
1682
Mattias Agren9647e912013-04-08 12:23:42 +02001683#ifndef BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY
1684#define BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY TRUE
1685#endif
The Android Open Source Project5738f832012-12-12 16:00:35 -08001686
1687/******************************************************************************
1688**
The Android Open Source Project5738f832012-12-12 16:00:35 -08001689** Tracing: Include trace header file here.
1690**
1691******************************************************************************/
1692
1693#include "bt_trace.h"
1694
1695#endif /* BT_TARGET_H */