OSDN Git Service

Remove L2CAP_CORRUPT_ERTM_PKTS macro
[android-x86/system-bt.git] / include / bt_target.h
1 /******************************************************************************
2  *
3  *  Copyright (c) 2014 The Android Open Source Project
4  *  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
26 #include "data_types.h"
27
28 #ifdef BUILDCFG
29
30 #if !defined(HAS_BDROID_BUILDCFG) && !defined(HAS_NO_BDROID_BUILDCFG)
31 #error "An Android.mk file did not include bdroid_CFLAGS and possibly not bdorid_C_INCLUDES"
32 #endif
33
34 #ifdef HAS_BDROID_BUILDCFG
35 #include "bdroid_buildcfg.h"
36 #endif
37
38 #endif  // BUILDCFG
39
40 /* Include common GKI definitions used by this platform */
41 #include "gki_target.h"
42
43 #include "bt_types.h"   /* This must be defined AFTER buildcfg.h */
44 #include "dyn_mem.h"    /* defines static and/or dynamic memory for components */
45
46 //------------------Added from bdroid_buildcfg.h---------------------
47 #ifndef L2CAP_EXTFEA_SUPPORTED_MASK
48 #define L2CAP_EXTFEA_SUPPORTED_MASK (L2CAP_EXTFEA_ENH_RETRANS | L2CAP_EXTFEA_STREAM_MODE | L2CAP_EXTFEA_NO_CRC | L2CAP_EXTFEA_FIXED_CHNLS)
49 #endif
50
51 #ifndef BTUI_OPS_FORMATS
52 #define BTUI_OPS_FORMATS (BTA_OP_VCARD21_MASK | BTA_OP_ANY_MASK)
53 #endif
54
55 #ifndef BTA_RFC_MTU_SIZE
56 #define BTA_RFC_MTU_SIZE (L2CAP_MTU_SIZE-L2CAP_MIN_OFFSET-RFCOMM_DATA_OVERHEAD)
57 #endif
58
59 #ifndef SBC_NO_PCM_CPY_OPTION
60 #define SBC_NO_PCM_CPY_OPTION FALSE
61 #endif
62
63 #ifndef BTA_INCLUDED
64 #define BTA_INCLUDED TRUE
65 #endif
66
67 #ifndef BTA_AG_INCLUDED
68 #define BTA_AG_INCLUDED  TRUE
69 #endif
70
71 #ifndef BTA_BI_INCLUDED
72 #define BTA_BI_INCLUDED FALSE
73 #endif
74
75 #ifndef BTA_SC_INCLUDED
76 #define BTA_SC_INCLUDED FALSE
77 #endif
78
79 #ifndef BTA_PAN_INCLUDED
80 #define BTA_PAN_INCLUDED TRUE
81 #endif
82
83 #ifndef BTA_HH_INCLUDED
84 #define BTA_HH_INCLUDED TRUE
85 #endif
86
87 #ifndef BTA_HH_ROLE
88 #define BTA_HH_ROLE BTA_MASTER_ROLE_PREF
89 #endif
90
91 #ifndef BTA_HH_LE_INCLUDED
92 #define BTA_HH_LE_INCLUDED TRUE
93 #endif
94
95 #ifndef BTA_AR_INCLUDED
96 #define BTA_AR_INCLUDED TRUE
97 #endif
98
99 #ifndef BTA_AV_INCLUDED
100 #define BTA_AV_INCLUDED TRUE
101 #endif
102
103 #ifndef BTA_GATT_INCLUDED
104 #define BTA_GATT_INCLUDED TRUE
105 #endif
106
107 #ifndef BTA_AV_SINK_INCLUDED
108 #define BTA_AV_SINK_INCLUDED FALSE
109 #endif
110
111 #ifndef BTA_DISABLE_DELAY
112 #define BTA_DISABLE_DELAY 200 /* in milliseconds */
113 #endif
114
115 #ifndef ANDROID_APP_INCLUDED
116 #define ANDROID_APP_INCLUDED  TRUE
117 #endif
118
119 #ifndef ANDROID_USE_LOGCAT
120 #define ANDROID_USE_LOGCAT  TRUE
121 #endif
122
123 // If the next wakeup time is less than this threshold, we should acquire
124 // a wakelock instead of setting a wake alarm so we're not bouncing in
125 // and out of suspend frequently.
126 // in millisecond
127 // TODO(zachoverflow): reinstate in alarm code
128 #ifndef GKI_TIMER_INTERVAL_FOR_WAKELOCK
129 #define GKI_TIMER_INTERVAL_FOR_WAKELOCK 3000
130 #endif
131
132 #ifndef BTA_SYS_TIMER_PERIOD
133 #define BTA_SYS_TIMER_PERIOD  100
134 #endif
135
136 #ifndef GKI_SHUTDOWN_EVT
137 #define GKI_SHUTDOWN_EVT  APPL_EVT_7
138 #endif
139
140 #ifndef SBC_FOR_EMBEDDED_LINUX
141 #define SBC_FOR_EMBEDDED_LINUX TRUE
142 #endif
143
144 #ifndef AVDT_VERSION
145 #define AVDT_VERSION  0x0102
146 #endif
147
148 #ifndef BTA_AG_AT_MAX_LEN
149 #define BTA_AG_AT_MAX_LEN  512
150 #endif
151
152 #ifndef BTA_AVRCP_FF_RW_SUPPORT
153 #define BTA_AVRCP_FF_RW_SUPPORT TRUE
154 #endif
155
156 #ifndef BTA_AG_SCO_PKT_TYPES
157 #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)
158 #endif
159
160 #ifndef BTA_AV_RET_TOUT
161 #define BTA_AV_RET_TOUT 15
162 #endif
163
164 #ifndef PORCHE_PAIRING_CONFLICT
165 #define PORCHE_PAIRING_CONFLICT  TRUE
166 #endif
167
168 #ifndef BTA_AV_CO_CP_SCMS_T
169 #define BTA_AV_CO_CP_SCMS_T  FALSE
170 #endif
171
172 /* This feature is used to eanble interleaved scan*/
173 #ifndef BTA_HOST_INTERLEAVE_SEARCH
174 #define BTA_HOST_INTERLEAVE_SEARCH FALSE
175 #endif
176
177 #ifndef BT_USE_TRACES
178 #define BT_USE_TRACES  TRUE
179 #endif
180
181 #ifndef BT_TRACE_BTIF
182 #define BT_TRACE_BTIF  TRUE
183 #endif
184
185 #ifndef BT_TRACE_VERBOSE
186 #define BT_TRACE_VERBOSE  FALSE
187 #endif
188
189 #ifndef BTA_DM_SDP_DB_SIZE
190 #define BTA_DM_SDP_DB_SIZE  8000
191 #endif
192
193 #ifndef HL_INCLUDED
194 #define HL_INCLUDED  TRUE
195 #endif
196
197 #ifndef AG_VOICE_SETTINGS
198 #define AG_VOICE_SETTINGS  HCI_DEFAULT_VOICE_SETTINGS
199 #endif
200
201 #ifndef BTIF_DM_OOB_TEST
202 #define BTIF_DM_OOB_TEST  TRUE
203 #endif
204
205 // How long to wait before activating sniff mode after entering the
206 // idle state for FTS, OPS connections
207 #ifndef BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS
208 #define BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 7000
209 #endif
210
211 //------------------End added from bdroid_buildcfg.h---------------------
212
213
214 /******************************************************************************
215 **
216 ** GKI Buffer Pools
217 **
218 ******************************************************************************/
219
220 /* Receives HCI events from the lower-layer. */
221 #ifndef HCI_CMD_POOL_ID
222 #define HCI_CMD_POOL_ID             GKI_POOL_ID_2
223 #endif
224
225 #ifndef HCI_CMD_POOL_BUF_SIZE
226 #define HCI_CMD_POOL_BUF_SIZE       GKI_BUF2_SIZE
227 #endif
228
229 /* Receives ACL data packets from thelower-layer. */
230 #ifndef HCI_ACL_POOL_ID
231 #define HCI_ACL_POOL_ID             GKI_POOL_ID_3
232 #endif
233
234 /* Maximum number of buffers available for ACL receive data. */
235 #ifndef HCI_ACL_BUF_MAX
236 #define HCI_ACL_BUF_MAX             GKI_BUF3_MAX
237 #endif
238
239 /* Receives SCO data packets from the lower-layer. */
240 #ifndef HCI_SCO_POOL_ID
241 #define HCI_SCO_POOL_ID             GKI_POOL_ID_6
242 #endif
243
244 /* Sends SDP data packets. */
245 #ifndef SDP_POOL_ID
246 #define SDP_POOL_ID                 3
247 #endif
248
249 /* Sends RFCOMM command packets. */
250 #ifndef RFCOMM_CMD_POOL_ID
251 #define RFCOMM_CMD_POOL_ID          GKI_POOL_ID_2
252 #endif
253
254 /* Sends RFCOMM data packets. */
255 #ifndef RFCOMM_DATA_POOL_ID
256 #define RFCOMM_DATA_POOL_ID         GKI_POOL_ID_3
257 #endif
258
259 #ifndef RFCOMM_DATA_POOL_BUF_SIZE
260 #define RFCOMM_DATA_POOL_BUF_SIZE   GKI_BUF3_SIZE
261 #endif
262
263 /* Sends L2CAP packets to the peer and HCI messages to the controller. */
264 #ifndef L2CAP_CMD_POOL_ID
265 #define L2CAP_CMD_POOL_ID           GKI_POOL_ID_2
266 #endif
267
268 /* Sends L2CAP segmented packets in ERTM mode */
269 #ifndef L2CAP_FCR_TX_POOL_ID
270 #define L2CAP_FCR_TX_POOL_ID        HCI_ACL_POOL_ID
271 #endif
272
273 /* Receives L2CAP segmented packets in ERTM mode */
274 #ifndef L2CAP_FCR_RX_POOL_ID
275 #define L2CAP_FCR_RX_POOL_ID        HCI_ACL_POOL_ID
276 #endif
277
278 /* Number of ACL buffers to assign to LE
279    if the HCI buffer pool is shared with BR/EDR */
280 #ifndef L2C_DEF_NUM_BLE_BUF_SHARED
281 #define L2C_DEF_NUM_BLE_BUF_SHARED      1
282 #endif
283
284 /* Used by BTM when it sends HCI commands to the controller. */
285 #ifndef BTM_CMD_POOL_ID
286 #define BTM_CMD_POOL_ID             GKI_POOL_ID_2
287 #endif
288
289 #ifndef OBX_LRG_DATA_POOL_SIZE
290 #define OBX_LRG_DATA_POOL_SIZE      GKI_BUF4_SIZE
291 #endif
292
293 #ifndef OBX_LRG_DATA_POOL_ID
294 #define OBX_LRG_DATA_POOL_ID        GKI_POOL_ID_4
295 #endif
296
297 /* Used to send data to L2CAP. */
298 #ifndef GAP_DATA_POOL_ID
299 #define GAP_DATA_POOL_ID            GKI_POOL_ID_3
300 #endif
301
302 #ifndef SPP_DB_SIZE
303 #define SPP_DB_SIZE                 GKI_BUF3_SIZE
304 #endif
305
306 /* BNEP data and protocol messages. */
307 #ifndef BNEP_POOL_ID
308 #define BNEP_POOL_ID                GKI_POOL_ID_3
309 #endif
310
311 /* RPC pool for temporary trace message buffers. */
312 #ifndef RPC_SCRATCH_POOL_ID
313 #define RPC_SCRATCH_POOL_ID         GKI_POOL_ID_2
314 #endif
315
316 /* AVDTP pool for protocol messages */
317 #ifndef AVDT_CMD_POOL_ID
318 #define AVDT_CMD_POOL_ID            GKI_POOL_ID_2
319 #endif
320
321 /* AVDTP pool size for media packets in case of fragmentation */
322 #ifndef AVDT_DATA_POOL_SIZE
323 #define AVDT_DATA_POOL_SIZE         GKI_BUF3_SIZE
324 #endif
325
326 #ifndef PAN_POOL_ID
327 #define PAN_POOL_ID                 GKI_POOL_ID_3
328 /* Maximum amount of the shared buffer to allocate for PAN */
329 #define PAN_POOL_MAX                (GKI_BUF3_MAX / 4)
330 #endif
331
332 /* AVCTP pool for protocol messages */
333 #ifndef AVCT_CMD_POOL_ID
334 #define AVCT_CMD_POOL_ID            GKI_POOL_ID_1
335 #endif
336
337 /* AVRCP pool for protocol messages */
338 #ifndef AVRC_CMD_POOL_ID
339 #define AVRC_CMD_POOL_ID            GKI_POOL_ID_1
340 #endif
341
342 /* AVRCP pool size for protocol messages */
343 #ifndef AVRC_CMD_POOL_SIZE
344 #define AVRC_CMD_POOL_SIZE          GKI_BUF1_SIZE
345 #endif
346
347 /* AVRCP Metadata pool for protocol messages */
348 #ifndef AVRC_META_CMD_POOL_ID
349 #define AVRC_META_CMD_POOL_ID       GKI_POOL_ID_2
350 #endif
351
352 /* AVRCP Metadata pool size for protocol messages */
353 #ifndef AVRC_META_CMD_POOL_SIZE
354 #define AVRC_META_CMD_POOL_SIZE     GKI_BUF2_SIZE
355 #endif
356
357
358 /* AVRCP buffer size for browsing channel messages */
359 #ifndef AVRC_BROWSE_POOL_SIZE
360 #define AVRC_BROWSE_POOL_SIZE     GKI_MAX_BUF_SIZE
361 #endif
362
363 #ifndef BTA_HL_LRG_DATA_POOL_ID
364 #define BTA_HL_LRG_DATA_POOL_ID        GKI_POOL_ID_7
365 #endif
366
367 /* GATT Server Database pool ID */
368 #ifndef GATT_DB_POOL_ID
369 #define GATT_DB_POOL_ID                 GKI_POOL_ID_8
370 #endif
371
372 /* GATT Data sending buffer pool ID, use default ACL pool for fix channel data */
373 #ifndef GATT_BUF_POOL_ID
374 #define GATT_BUF_POOL_ID                HCI_ACL_POOL_ID
375 #endif
376
377 /******************************************************************************
378 **
379 ** Lower Layer Interface
380 **
381 ******************************************************************************/
382
383 /* Macro for allocating buffer for HCI commands */
384 #ifndef HCI_GET_CMD_BUF
385 #if (!defined(HCI_USE_VARIABLE_SIZE_CMD_BUF) || (HCI_USE_VARIABLE_SIZE_CMD_BUF == FALSE))
386 /* Allocate fixed-size buffer from HCI_CMD_POOL (default case) */
387 #define HCI_GET_CMD_BUF(paramlen)    ((BT_HDR *)GKI_getpoolbuf (HCI_CMD_POOL_ID))
388 #else
389 /* Allocate smallest possible buffer (for platforms with limited RAM) */
390 #define HCI_GET_CMD_BUF(paramlen)    ((BT_HDR *)GKI_getbuf ((UINT16)(BT_HDR_SIZE + HCIC_PREAMBLE_SIZE + (paramlen))))
391 #endif
392 #endif  /* HCI_GET_CMD_BUF */
393
394 /******************************************************************************
395 **
396 ** HCI Services (H4)
397 **
398 ******************************************************************************/
399 #ifdef __cplusplus
400 extern "C" {
401 #endif
402
403 #ifdef __cplusplus
404 }
405 #endif
406
407 /* Use 2 second for low-resolution systems, override to 1 for high-resolution systems */
408 #ifndef BT_1SEC_TIMEOUT
409 #define BT_1SEC_TIMEOUT             (2)
410 #endif
411
412 /* Quick Timer */
413 /* if L2CAP_FCR_INCLUDED is TRUE then it should have 100 millisecond resolution */
414 /* if none of them is included then QUICK_TIMER_TICKS_PER_SEC is set to 0 to exclude quick timer */
415 #ifndef QUICK_TIMER_TICKS_PER_SEC
416 #define QUICK_TIMER_TICKS_PER_SEC   10       /* 100ms timer */
417 #endif
418
419 /******************************************************************************
420 **
421 ** BTM
422 **
423 ******************************************************************************/
424 /* Include inquiry code. */
425 #ifndef BTM_INQUIRY_INCLUDED
426 #define BTM_INQUIRY_INCLUDED        TRUE
427 #endif
428
429 /* Cancel Inquiry on incoming SSP */
430 #ifndef BTM_NO_SSP_ON_INQUIRY
431 #define BTM_NO_SSP_ON_INQUIRY       FALSE
432 #endif
433
434 /* Includes SCO if TRUE */
435 #ifndef BTM_SCO_INCLUDED
436 #define BTM_SCO_INCLUDED            TRUE       /* TRUE includes SCO code */
437 #endif
438
439 /* Includes SCO if TRUE */
440 #ifndef BTM_SCO_HCI_INCLUDED
441 #define BTM_SCO_HCI_INCLUDED            FALSE       /* TRUE includes SCO over HCI code */
442 #endif
443
444 /* Includes WBS if TRUE */
445 #ifndef BTM_WBS_INCLUDED
446 #define BTM_WBS_INCLUDED            FALSE       /* TRUE includes WBS code */
447 #endif
448
449 /* Includes PCM2 support if TRUE */
450 #ifndef BTM_PCM2_INCLUDED
451 #define BTM_PCM2_INCLUDED           FALSE
452 #endif
453
454 /*  This is used to work around a controller bug that doesn't like Disconnect
455 **  issued while there is a role switch in progress
456 */
457 #ifndef BTM_DISC_DURING_RS
458 #define BTM_DISC_DURING_RS TRUE
459 #endif
460
461 /**************************
462 ** Initial SCO TX credit
463 *************************/
464 /* max TX SCO data packet size */
465 #ifndef BTM_SCO_DATA_SIZE_MAX
466 #define BTM_SCO_DATA_SIZE_MAX       240
467 #endif
468
469 /* The size in bytes of the BTM inquiry database. */
470 #ifndef BTM_INQ_DB_SIZE
471 #define BTM_INQ_DB_SIZE             40
472 #endif
473
474 /* TRUE if controller does not support inquiry event filtering. */
475 #ifndef BTM_BYPASS_EVENT_FILTERING
476 #define BTM_BYPASS_EVENT_FILTERING  FALSE
477 #endif
478
479 /* TRUE if inquiry filtering is desired from BTM. */
480 #ifndef BTM_USE_INQ_RESULTS_FILTER
481 #define BTM_USE_INQ_RESULTS_FILTER  TRUE
482 #endif
483
484 /* The default scan mode */
485 #ifndef BTM_DEFAULT_SCAN_TYPE
486 #define BTM_DEFAULT_SCAN_TYPE       BTM_SCAN_TYPE_INTERLACED
487 #endif
488
489 /* Should connections to unknown devices be allowed when not discoverable? */
490 #ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
491 #define BTM_ALLOW_CONN_IF_NONDISCOVER   TRUE
492 #endif
493
494 /* Sets the Page_Scan_Window:  the length of time that the device is performing a page scan. */
495 #ifndef BTM_DEFAULT_CONN_WINDOW
496 #define BTM_DEFAULT_CONN_WINDOW     0x0012
497 #endif
498
499 /* Sets the Page_Scan_Activity:  the interval between the start of two consecutive page scans. */
500 #ifndef BTM_DEFAULT_CONN_INTERVAL
501 #define BTM_DEFAULT_CONN_INTERVAL   0x0800
502 #endif
503
504 /* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
505 #ifndef BTM_DEFAULT_DISC_WINDOW
506 #define BTM_DEFAULT_DISC_WINDOW     0x0012
507 #endif
508
509 /* When automatic inquiry scan is enabled, this sets the inquiry scan interval. */
510 #ifndef BTM_DEFAULT_DISC_INTERVAL
511 #define BTM_DEFAULT_DISC_INTERVAL   0x0800
512 #endif
513
514 /* Default class of device
515 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
516 *
517 * SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
518 * MAJOR_CLASS:0x02 - PHONE
519 * MINOR_CLASS:0x0C - SMART_PHONE
520 *
521 */
522 #ifndef BTA_DM_COD
523 #define BTA_DM_COD {0x5A, 0x02, 0x0C}
524 #endif
525
526 /* The number of SCO links. */
527 #ifndef BTM_MAX_SCO_LINKS
528 #define BTM_MAX_SCO_LINKS           3
529 #endif
530
531 /* The preferred type of SCO links (2-eSCO, 0-SCO). */
532 #ifndef BTM_DEFAULT_SCO_MODE
533 #define BTM_DEFAULT_SCO_MODE        2
534 #endif
535
536 /* The number of security records for peer devices. */
537 #ifndef BTM_SEC_MAX_DEVICE_RECORDS
538 #define BTM_SEC_MAX_DEVICE_RECORDS  100
539 #endif
540
541 /* The number of security records for services. */
542 #ifndef BTM_SEC_MAX_SERVICE_RECORDS
543 #define BTM_SEC_MAX_SERVICE_RECORDS 32
544 #endif
545
546 /* If True, force a retrieval of remote device name for each bond in case it's changed */
547 #ifndef BTM_SEC_FORCE_RNR_FOR_DBOND
548 #define BTM_SEC_FORCE_RNR_FOR_DBOND  FALSE
549 #endif
550
551 /* Maximum device name length used in btm database. */
552 #ifndef BTM_MAX_REM_BD_NAME_LEN
553 #define BTM_MAX_REM_BD_NAME_LEN     248
554 #endif
555
556 /* Maximum local device name length stored btm database.
557   '0' disables storage of the local name in BTM */
558 #ifndef BTM_MAX_LOC_BD_NAME_LEN
559 #define BTM_MAX_LOC_BD_NAME_LEN     248
560 #endif
561
562 /* Fixed Default String. When this is defined as null string, the device's
563  * product model name is used as the default local name.
564  */
565 #ifndef BTM_DEF_LOCAL_NAME
566 #define BTM_DEF_LOCAL_NAME      ""
567 #endif
568
569 /* Maximum service name stored with security authorization (0 if not needed) */
570 #ifndef BTM_SEC_SERVICE_NAME_LEN
571 #define BTM_SEC_SERVICE_NAME_LEN    BT_MAX_SERVICE_NAME_LEN
572 #endif
573
574 /* Maximum length of the service name. */
575 #ifndef BT_MAX_SERVICE_NAME_LEN
576 #define BT_MAX_SERVICE_NAME_LEN     21
577 #endif
578
579 /* ACL buffer size in HCI Host Buffer Size command. */
580 #ifndef BTM_ACL_BUF_SIZE
581 #define BTM_ACL_BUF_SIZE            0
582 #endif
583
584 /* This is set to use the BTM power manager. */
585 #ifndef BTM_PWR_MGR_INCLUDED
586 #define BTM_PWR_MGR_INCLUDED        TRUE
587 #endif
588
589 /* The maximum number of clients that can register with the power manager. */
590 #ifndef BTM_MAX_PM_RECORDS
591 #define BTM_MAX_PM_RECORDS          2
592 #endif
593
594 /* This is set to show debug trace messages for the power manager. */
595 #ifndef BTM_PM_DEBUG
596 #define BTM_PM_DEBUG                FALSE
597 #endif
598
599 /* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */
600 #ifndef BTM_SCO_WAKE_PARKED_LINK
601 #define BTM_SCO_WAKE_PARKED_LINK    TRUE
602 #endif
603
604 /* This is set to TRUE if the busy level change event is desired. (replace ACL change event) */
605 #ifndef BTM_BUSY_LEVEL_CHANGE_INCLUDED
606 #define BTM_BUSY_LEVEL_CHANGE_INCLUDED  TRUE
607 #endif
608
609 /* If the user does not respond to security process requests within this many seconds,
610  * a negative response would be sent automatically.
611  * It's recommended to use a value between 30 and OBX_TIMEOUT_VALUE
612  * 30 is LMP response timeout value */
613 #ifndef BTM_SEC_TIMEOUT_VALUE
614 #define BTM_SEC_TIMEOUT_VALUE           35
615 #endif
616
617 /* Maximum number of callbacks that can be registered using BTM_RegisterForVSEvents */
618 #ifndef BTM_MAX_VSE_CALLBACKS
619 #define BTM_MAX_VSE_CALLBACKS           3
620 #endif
621
622 /******************************************
623 **    Lisbon Features
624 *******************************************/
625 /* This is set to TRUE if the server Extended Inquiry Response feature is desired. */
626 /* server sends EIR to client */
627 #ifndef BTM_EIR_SERVER_INCLUDED
628 #define BTM_EIR_SERVER_INCLUDED         TRUE
629 #endif
630
631 /* This is set to TRUE if the client Extended Inquiry Response feature is desired. */
632 /* client inquiry to server */
633 #ifndef BTM_EIR_CLIENT_INCLUDED
634 #define BTM_EIR_CLIENT_INCLUDED         TRUE
635 #endif
636
637 /* This is set to TRUE if the FEC is required for EIR packet. */
638 #ifndef BTM_EIR_DEFAULT_FEC_REQUIRED
639 #define BTM_EIR_DEFAULT_FEC_REQUIRED    TRUE
640 #endif
641
642 /* User defined UUID look up table */
643 #ifndef BTM_EIR_UUID_LKUP_TBL
644 #endif
645
646 /* The IO capability of the local device (for Simple Pairing) */
647 #ifndef BTM_LOCAL_IO_CAPS
648 #define BTM_LOCAL_IO_CAPS               BTM_IO_CAP_IO
649 #endif
650
651 #ifndef BTM_LOCAL_IO_CAPS_BLE
652 #define BTM_LOCAL_IO_CAPS_BLE           BTM_IO_CAP_KBDISP
653 #endif
654
655 /* The default MITM Protection Requirement (for Simple Pairing)
656  * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
657 #ifndef BTM_DEFAULT_AUTH_REQ
658 #define BTM_DEFAULT_AUTH_REQ            BTM_AUTH_SP_NO
659 #endif
660
661 /* The default MITM Protection Requirement for dedicated bonding using Simple Pairing
662  * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
663 #ifndef BTM_DEFAULT_DD_AUTH_REQ
664 #define BTM_DEFAULT_DD_AUTH_REQ            BTM_AUTH_AP_YES
665 #endif
666
667 /* Include Out-of-Band implementation for Simple Pairing */
668 #ifndef BTM_OOB_INCLUDED
669 #define BTM_OOB_INCLUDED                TRUE
670 #endif
671
672 /* TRUE to include Sniff Subrating */
673 #ifndef BTM_SSR_INCLUDED
674 #define BTM_SSR_INCLUDED                TRUE
675 #endif
676
677 /*************************
678 ** End of Lisbon Features
679 **************************/
680
681 /* Used for conformance testing ONLY */
682 #ifndef BTM_BLE_CONFORMANCE_TESTING
683 #define BTM_BLE_CONFORMANCE_TESTING           FALSE
684 #endif
685
686 /******************************************************************************
687 **
688 ** L2CAP
689 **
690 ******************************************************************************/
691
692 /* Flow control and retransmission mode */
693
694 #ifndef L2CAP_FCR_INCLUDED
695 #define L2CAP_FCR_INCLUDED TRUE
696 #endif
697
698 /* The maximum number of simultaneous links that L2CAP can support. */
699 #ifndef MAX_ACL_CONNECTIONS
700 #define MAX_L2CAP_LINKS             7
701 #else
702 #define MAX_L2CAP_LINKS             MAX_ACL_CONNECTIONS
703 #endif
704
705 /* The maximum number of simultaneous channels that L2CAP can support. */
706 #ifndef MAX_L2CAP_CHANNELS
707 #define MAX_L2CAP_CHANNELS          16
708 #endif
709
710 /* The maximum number of simultaneous applications that can register with L2CAP. */
711 #ifndef MAX_L2CAP_CLIENTS
712 #define MAX_L2CAP_CLIENTS           15
713 #endif
714
715 /* The number of seconds of link inactivity before a link is disconnected. */
716 #ifndef L2CAP_LINK_INACTIVITY_TOUT
717 #define L2CAP_LINK_INACTIVITY_TOUT  4
718 #endif
719
720 /* The number of seconds of link inactivity after bonding before a link is disconnected. */
721 #ifndef L2CAP_BONDING_TIMEOUT
722 #define L2CAP_BONDING_TIMEOUT       3
723 #endif
724
725 /* The time from the HCI connection complete to disconnect if no channel is established. */
726 #ifndef L2CAP_LINK_STARTUP_TOUT
727 #define L2CAP_LINK_STARTUP_TOUT     60
728 #endif
729
730 /* The L2CAP MTU; must be in accord with the HCI ACL pool size. */
731 #ifndef L2CAP_MTU_SIZE
732 #define L2CAP_MTU_SIZE              1691
733 #endif
734
735 /* The L2CAP MPS over Bluetooth; must be in accord with the FCR tx pool size and ACL down buffer size. */
736 #ifndef L2CAP_MPS_OVER_BR_EDR
737 #define L2CAP_MPS_OVER_BR_EDR       1010
738 #endif
739
740 /* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */
741 #ifndef L2CAP_HOST_FC_ACL_BUFS
742 #define L2CAP_HOST_FC_ACL_BUFS      20
743 #endif
744
745 /* This is set to enable L2CAP to  take the ACL link out of park mode when ACL data is to be sent. */
746 #ifndef L2CAP_WAKE_PARKED_LINK
747 #define L2CAP_WAKE_PARKED_LINK      TRUE
748 #endif
749
750 /* Whether link wants to be the master or the slave. */
751 #ifndef L2CAP_DESIRED_LINK_ROLE
752 #define L2CAP_DESIRED_LINK_ROLE     HCI_ROLE_SLAVE
753 #endif
754
755 /* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
756 #ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
757 #define L2CAP_NON_FLUSHABLE_PB_INCLUDED     TRUE
758 #endif
759
760 /* Minimum number of ACL credit for high priority link */
761 #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
762 #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA       5
763 #endif
764
765 /* used for monitoring HCI ACL credit management */
766 #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
767 #define L2CAP_HCI_FLOW_CONTROL_DEBUG        TRUE
768 #endif
769
770 /* Used for calculating transmit buffers off of */
771 #ifndef L2CAP_NUM_XMIT_BUFFS
772 #define L2CAP_NUM_XMIT_BUFFS                HCI_ACL_BUF_MAX
773 #endif
774
775 /* Unicast Connectionless Data */
776 #ifndef L2CAP_UCD_INCLUDED
777 #define L2CAP_UCD_INCLUDED                  FALSE
778 #endif
779
780 /* Unicast Connectionless Data MTU */
781 #ifndef L2CAP_UCD_MTU
782 #define L2CAP_UCD_MTU                       L2CAP_MTU_SIZE
783 #endif
784
785 /* Unicast Connectionless Data Idle Timeout */
786 #ifndef L2CAP_UCD_IDLE_TIMEOUT
787 #define L2CAP_UCD_IDLE_TIMEOUT              2
788 #endif
789
790 /* Unicast Connectionless Data Idle Timeout */
791 #ifndef L2CAP_UCD_CH_PRIORITY
792 #define L2CAP_UCD_CH_PRIORITY               L2CAP_CHNL_PRIORITY_MEDIUM
793 #endif
794
795 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
796 /* Excluding L2CAP signaling channel and UCD */
797 #ifndef L2CAP_NUM_FIXED_CHNLS
798 #define L2CAP_NUM_FIXED_CHNLS               4
799 #endif
800
801 /* First fixed channel supported */
802 #ifndef L2CAP_FIRST_FIXED_CHNL
803 #define L2CAP_FIRST_FIXED_CHNL              3
804 #endif
805
806 #ifndef L2CAP_LAST_FIXED_CHNL
807 #define L2CAP_LAST_FIXED_CHNL           (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
808 #endif
809
810 /* Round Robin service channels in link */
811 #ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
812 #define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE   TRUE
813 #endif
814
815 /* Used for calculating transmit buffers off of */
816 #ifndef L2CAP_NUM_XMIT_BUFFS
817 #define L2CAP_NUM_XMIT_BUFFS                HCI_ACL_BUF_MAX
818 #endif
819
820 /* used for monitoring eL2CAP data flow */
821 #ifndef L2CAP_ERTM_STATS
822 #define L2CAP_ERTM_STATS                    FALSE
823 #endif
824
825 /* Used for conformance testing ONLY:  When TRUE lets scriptwrapper overwrite info response */
826 #ifndef L2CAP_CONFORMANCE_TESTING
827 #define L2CAP_CONFORMANCE_TESTING           FALSE
828 #endif
829
830 #ifndef TIMER_PARAM_TYPE
831 #define TIMER_PARAM_TYPE    UINT32
832 #endif
833
834 /******************************************************************************
835 **
836 ** BLE
837 **
838 ******************************************************************************/
839
840 #ifndef BLE_INCLUDED
841 #define BLE_INCLUDED            TRUE
842 #endif
843
844 #ifndef BLE_ANDROID_CONTROLLER_SCAN_FILTER
845 #define BLE_ANDROID_CONTROLLER_SCAN_FILTER            TRUE
846 #endif
847
848 #ifndef LOCAL_BLE_CONTROLLER_ID
849 #define LOCAL_BLE_CONTROLLER_ID         (1)
850 #endif
851
852 /*
853  * Toggles support for general LE privacy features such as remote address
854  * resolution, local address rotation etc.
855  */
856 #ifndef BLE_PRIVACY_SPT
857 #define BLE_PRIVACY_SPT         TRUE
858 #endif
859
860 /*
861  * Enables or disables support for local privacy (ex. address rotation)
862  */
863 #ifndef BLE_LOCAL_PRIVACY_ENABLED
864 #define BLE_LOCAL_PRIVACY_ENABLED         TRUE
865 #endif
866
867 /*
868  * Toggles support for vendor specific extensions such as RPA offloading,
869  * feature discovery, multi-adv etc.
870  */
871 #ifndef BLE_VND_INCLUDED
872 #define BLE_VND_INCLUDED        FALSE
873 #endif
874
875 #ifndef BTM_BLE_ADV_TX_POWER
876 #define BTM_BLE_ADV_TX_POWER {-21, -15, -7, 1, 9}
877 #endif
878
879
880 #ifndef BLE_BATCH_SCAN_INCLUDED
881 #define BLE_BATCH_SCAN_INCLUDED  TRUE
882 #endif
883
884 /******************************************************************************
885 **
886 ** ATT/GATT Protocol/Profile Settings
887 **
888 ******************************************************************************/
889 #ifndef BTA_GATT_INCLUDED
890 #if BLE_INCLUDED == TRUE
891 #define BTA_GATT_INCLUDED TRUE
892 #else
893 #define BTA_GATT_INCLUDED FALSE
894 #endif
895 #endif
896
897 #if BTA_GATT_INCLUDED == TRUE && BLE_INCLUDED == FALSE
898 #error "can't have GATT without BLE"
899 #endif
900
901 #ifndef BLE_LLT_INCLUDED
902 #define BLE_LLT_INCLUDED    TRUE
903 #endif
904
905 #ifndef ATT_INCLUDED
906 #define ATT_INCLUDED         TRUE
907 #endif
908
909 #ifndef ATT_DEBUG
910 #define ATT_DEBUG           TRUE
911 #endif
912
913 #ifndef BLE_PERIPHERAL_MODE_SUPPORT
914 #define BLE_PERIPHERAL_MODE_SUPPORT  TRUE
915 #endif
916
917 #ifndef BLE_PERIPHERAL_ADV_NAME
918 #define BLE_PERIPHERAL_ADV_NAME      FALSE
919 #endif
920
921 #ifndef BLE_DELAY_REQUEST_ENC
922 /* This flag is to work around IPHONE problem, We need to wait for iPhone ready
923    before send encryption request to iPhone */
924 #define BLE_DELAY_REQUEST_ENC        FALSE
925 #endif
926
927 #ifndef GAP_TRANSPORT_SUPPORTED
928 #define GAP_TRANSPORT_SUPPORTED      GATT_TRANSPORT_LE_BR_EDR
929 #endif
930
931 #ifndef GATTP_TRANSPORT_SUPPORTED
932 #define GATTP_TRANSPORT_SUPPORTED    GATT_TRANSPORT_LE_BR_EDR
933 #endif
934
935 #ifndef GATT_MAX_SR_PROFILES
936 #define GATT_MAX_SR_PROFILES        32 /* max is 32 */
937 #endif
938
939 #ifndef GATT_MAX_APPS
940 #define GATT_MAX_APPS            32 /* note: 2 apps used internally GATT and GAP */
941 #endif
942
943 #ifndef GATT_MAX_PHY_CHANNEL
944 #define GATT_MAX_PHY_CHANNEL        7
945 #endif
946
947 /* Used for conformance testing ONLY */
948 #ifndef GATT_CONFORMANCE_TESTING
949 #define GATT_CONFORMANCE_TESTING           FALSE
950 #endif
951
952 /* number of background connection device allowence, ideally to be the same as WL size
953 */
954 #ifndef GATT_MAX_BG_CONN_DEV
955 #define GATT_MAX_BG_CONN_DEV        32
956 #endif
957
958 /******************************************************************************
959 **
960 ** SMP
961 **
962 ******************************************************************************/
963 #ifndef SMP_INCLUDED
964 #if BLE_INCLUDED == TRUE
965 #define SMP_INCLUDED         TRUE
966 #else
967 #define SMP_INCLUDED         FALSE
968 #endif
969 #endif
970
971 #if SMP_INCLUDED == TRUE && BLE_INCLUDED == FALSE
972 #error "can't have SMP without BLE"
973 #endif
974
975 #ifndef SMP_DEBUG
976 #define SMP_DEBUG            FALSE
977 #endif
978
979 #ifndef SMP_DEFAULT_AUTH_REQ
980 #define SMP_DEFAULT_AUTH_REQ    SMP_AUTH_NB_ENC_ONLY
981 #endif
982
983 #ifndef SMP_MAX_ENC_KEY_SIZE
984 #define SMP_MAX_ENC_KEY_SIZE    16
985 #endif
986
987 #ifndef SMP_MIN_ENC_KEY_SIZE
988 #define SMP_MIN_ENC_KEY_SIZE    7
989 #endif
990
991 /* Used for conformance testing ONLY */
992 #ifndef SMP_CONFORMANCE_TESTING
993 #define SMP_CONFORMANCE_TESTING           FALSE
994 #endif
995
996 /******************************************************************************
997 **
998 ** SDP
999 **
1000 ******************************************************************************/
1001
1002 /* This is set to enable SDP server functionality. */
1003 #ifndef SDP_SERVER_ENABLED
1004 #define SDP_SERVER_ENABLED          TRUE
1005 #endif
1006
1007 /* The maximum number of SDP records the server can support. */
1008 #ifndef SDP_MAX_RECORDS
1009 #define SDP_MAX_RECORDS             20
1010 #endif
1011
1012 /* The maximum number of attributes in each record. */
1013 #ifndef SDP_MAX_REC_ATTR
1014 #define SDP_MAX_REC_ATTR            25
1015 #endif
1016
1017 #ifndef SDP_MAX_PAD_LEN
1018 #define SDP_MAX_PAD_LEN             600
1019 #endif
1020
1021 /* The maximum length, in bytes, of an attribute. */
1022 #ifndef SDP_MAX_ATTR_LEN
1023 #define SDP_MAX_ATTR_LEN            400
1024 #endif
1025
1026 /* The maximum number of attribute filters supported by SDP databases. */
1027 #ifndef SDP_MAX_ATTR_FILTERS
1028 #define SDP_MAX_ATTR_FILTERS        15
1029 #endif
1030
1031 /* The maximum number of UUID filters supported by SDP databases. */
1032 #ifndef SDP_MAX_UUID_FILTERS
1033 #define SDP_MAX_UUID_FILTERS        3
1034 #endif
1035
1036 /* This is set to enable SDP client functionality. */
1037 #ifndef SDP_CLIENT_ENABLED
1038 #define SDP_CLIENT_ENABLED          TRUE
1039 #endif
1040
1041 /* The maximum number of record handles retrieved in a search. */
1042 #ifndef SDP_MAX_DISC_SERVER_RECS
1043 #define SDP_MAX_DISC_SERVER_RECS    21
1044 #endif
1045
1046 /* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */
1047 #ifndef SDP_MAX_LIST_BYTE_COUNT
1048 #define SDP_MAX_LIST_BYTE_COUNT     4096
1049 #endif
1050
1051 /* The maximum number of parameters in an SDP protocol element. */
1052 #ifndef SDP_MAX_PROTOCOL_PARAMS
1053 #define SDP_MAX_PROTOCOL_PARAMS     2
1054 #endif
1055
1056 /* The maximum number of simultaneous client and server connections. */
1057 #ifndef SDP_MAX_CONNECTIONS
1058 #define SDP_MAX_CONNECTIONS         4
1059 #endif
1060
1061 /* The MTU size for the L2CAP configuration. */
1062 #ifndef SDP_MTU_SIZE
1063 #define SDP_MTU_SIZE                672
1064 #endif
1065
1066 /* The flush timeout for the L2CAP configuration. */
1067 #ifndef SDP_FLUSH_TO
1068 #define SDP_FLUSH_TO                0xFFFF
1069 #endif
1070
1071 /* The name for security authorization. */
1072 #ifndef SDP_SERVICE_NAME
1073 #define SDP_SERVICE_NAME            "Service Discovery"
1074 #endif
1075
1076 /* The security level for BTM. */
1077 #ifndef SDP_SECURITY_LEVEL
1078 #define SDP_SECURITY_LEVEL          BTM_SEC_NONE
1079 #endif
1080
1081 /******************************************************************************
1082 **
1083 ** RFCOMM
1084 **
1085 ******************************************************************************/
1086
1087 #ifndef RFCOMM_INCLUDED
1088 #define RFCOMM_INCLUDED             TRUE
1089 #endif
1090
1091 /* The maximum number of ports supported. */
1092 #ifndef MAX_RFC_PORTS
1093 #define MAX_RFC_PORTS               30
1094 #endif
1095
1096 /* The maximum simultaneous links to different devices. */
1097 #ifndef MAX_ACL_CONNECTIONS
1098 #define MAX_BD_CONNECTIONS          7
1099 #else
1100 #define MAX_BD_CONNECTIONS          MAX_ACL_CONNECTIONS
1101 #endif
1102
1103 /* The port receive queue low watermark level, in bytes. */
1104 #ifndef PORT_RX_LOW_WM
1105 #define PORT_RX_LOW_WM              (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
1106 #endif
1107
1108 /* The port receive queue high watermark level, in bytes. */
1109 #ifndef PORT_RX_HIGH_WM
1110 #define PORT_RX_HIGH_WM             (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
1111 #endif
1112
1113 /* The port receive queue critical watermark level, in bytes. */
1114 #ifndef PORT_RX_CRITICAL_WM
1115 #define PORT_RX_CRITICAL_WM         (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
1116 #endif
1117
1118 /* The port receive queue low watermark level, in number of buffers. */
1119 #ifndef PORT_RX_BUF_LOW_WM
1120 #define PORT_RX_BUF_LOW_WM          4
1121 #endif
1122
1123 /* The port receive queue high watermark level, in number of buffers. */
1124 #ifndef PORT_RX_BUF_HIGH_WM
1125 #define PORT_RX_BUF_HIGH_WM         10
1126 #endif
1127
1128 /* The port receive queue critical watermark level, in number of buffers. */
1129 #ifndef PORT_RX_BUF_CRITICAL_WM
1130 #define PORT_RX_BUF_CRITICAL_WM     15
1131 #endif
1132
1133 /* The port transmit queue high watermark level, in bytes. */
1134 #ifndef PORT_TX_HIGH_WM
1135 #define PORT_TX_HIGH_WM             (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
1136 #endif
1137
1138 /* The port transmit queue critical watermark level, in bytes. */
1139 #ifndef PORT_TX_CRITICAL_WM
1140 #define PORT_TX_CRITICAL_WM         (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
1141 #endif
1142
1143 /* The port transmit queue high watermark level, in number of buffers. */
1144 #ifndef PORT_TX_BUF_HIGH_WM
1145 #define PORT_TX_BUF_HIGH_WM         10
1146 #endif
1147
1148 /* The port transmit queue high watermark level, in number of buffers. */
1149 #ifndef PORT_TX_BUF_CRITICAL_WM
1150 #define PORT_TX_BUF_CRITICAL_WM     15
1151 #endif
1152
1153 /* The RFCOMM multiplexer preferred flow control mechanism. */
1154 #ifndef PORT_FC_DEFAULT
1155 #define PORT_FC_DEFAULT             PORT_FC_CREDIT
1156 #endif
1157
1158 /* The maximum number of credits receiver sends to peer when using credit-based flow control. */
1159 #ifndef PORT_CREDIT_RX_MAX
1160 #define PORT_CREDIT_RX_MAX          16
1161 #endif
1162
1163 /* The credit low watermark level. */
1164 #ifndef PORT_CREDIT_RX_LOW
1165 #define PORT_CREDIT_RX_LOW          8
1166 #endif
1167
1168 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1169 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_lock() or GKI_disable() */
1170 #ifndef PORT_SCHEDULE_LOCK
1171 #define PORT_SCHEDULE_LOCK          GKI_disable()
1172 #endif
1173
1174 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1175 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_unlock() or GKI_enable() */
1176 #ifndef PORT_SCHEDULE_UNLOCK
1177 #define PORT_SCHEDULE_UNLOCK        GKI_enable()
1178 #endif
1179
1180 /******************************************************************************
1181 **
1182 ** TCS
1183 **
1184 ******************************************************************************/
1185
1186 #ifndef TCS_INCLUDED
1187 #define TCS_INCLUDED                FALSE
1188 #endif
1189
1190 /* To include/exclude point-to-multipoint broadcast SETUP configuration. */
1191 #ifndef TCS_BCST_SETUP_INCLUDED
1192 #define TCS_BCST_SETUP_INCLUDED     TRUE
1193 #endif
1194
1195 /* To include/exclude WUG member role. */
1196 #ifndef TCS_WUG_MEMBER_INCLUDED
1197 #define TCS_WUG_MEMBER_INCLUDED     TRUE
1198 #endif
1199
1200 /******************************************************************************
1201 **
1202 ** OBX
1203 **
1204 ******************************************************************************/
1205 #ifndef OBX_INCLUDED
1206 #define OBX_INCLUDED               FALSE
1207 #endif
1208
1209 #ifndef OBX_CLIENT_INCLUDED
1210 #define OBX_CLIENT_INCLUDED        TRUE
1211 #endif
1212
1213 #ifndef OBX_SERVER_INCLUDED
1214 #define OBX_SERVER_INCLUDED        TRUE
1215 #endif
1216
1217 /* TRUE to include OBEX authentication/MD5 code */
1218 #ifndef OBX_MD5_INCLUDED
1219 #define OBX_MD5_INCLUDED           TRUE
1220 #endif
1221
1222 /* TRUE to include OBEX 1.4 enhancement (including Obex Over L2CAP) */
1223 #ifndef OBX_14_INCLUDED
1224 #define OBX_14_INCLUDED             FALSE
1225 #endif
1226 /* MD5 code is required to use OBEX 1.4 features (Reliable session) */
1227 #if (OBX_MD5_INCLUDED == FALSE)
1228 #undef OBX_14_INCLUDED
1229 #define OBX_14_INCLUDED             FALSE
1230 #endif
1231
1232 /* L2CAP FCR/eRTM mode is required to use OBEX Over L2CAP */
1233 #if (L2CAP_FCR_INCLUDED == FALSE)
1234 #undef OBX_14_INCLUDED
1235 #define OBX_14_INCLUDED             FALSE
1236 #endif
1237
1238 /* The idle timeout value. 0 for no timeout event. */
1239 #ifndef OBX_TIMEOUT_VALUE
1240 #define OBX_TIMEOUT_VALUE           60
1241 #endif
1242
1243 /* The maximum number of registered servers. */
1244 #ifndef OBX_NUM_SERVERS
1245 #define OBX_NUM_SERVERS             12
1246 #endif
1247
1248 /* The maximum number of sessions per registered server. */
1249 #ifndef OBX_MAX_SR_SESSION
1250 #define OBX_MAX_SR_SESSION          4
1251 #endif
1252
1253 /* The maximum number of sessions per registered server.
1254  * must be less than MAX_BD_CONNECTIONS */
1255 #ifndef OBX_MAX_SR_SESSION
1256 #define OBX_MAX_SR_SESSION          4
1257 #endif
1258
1259 /* The maximum number of suspended sessions per registered servers. */
1260 #ifndef OBX_MAX_SUSPEND_SESSIONS
1261 #define OBX_MAX_SUSPEND_SESSIONS    4
1262 #endif
1263
1264 /* The maximum number of active clients. */
1265 #ifndef OBX_NUM_CLIENTS
1266 #define OBX_NUM_CLIENTS             8
1267 #endif
1268
1269 /* The maximum length of OBEX target header.*/
1270 #ifndef OBX_MAX_TARGET_LEN
1271 #define OBX_MAX_TARGET_LEN          16
1272 #endif
1273
1274 /* This option is application when OBX_14_INCLUDED=TRUE
1275 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
1276 */
1277 #ifndef OBX_FCR_RX_POOL_ID
1278 #define OBX_FCR_RX_POOL_ID      HCI_ACL_POOL_ID
1279 #endif
1280
1281 /* This option is application when OBX_14_INCLUDED=TRUE
1282 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
1283 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
1284 Note:  This pool needs to have enough buffers to hold two times the window size negotiated
1285  in the L2CA_SetFCROptions (2 * tx_win_size)  to allow for retransmissions.
1286  The size of each buffer must be able to hold the maximum MPS segment size passed in
1287  L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1288 */
1289 #ifndef OBX_FCR_TX_POOL_ID
1290 #define OBX_FCR_TX_POOL_ID      HCI_ACL_POOL_ID
1291 #endif
1292
1293 /******************************************************************************
1294 **
1295 ** BNEP
1296 **
1297 ******************************************************************************/
1298
1299 #ifndef BNEP_INCLUDED
1300 #define BNEP_INCLUDED               TRUE
1301 #endif
1302
1303 /* Protocol filtering is an optional feature. Bydefault it will be turned on */
1304 #ifndef BNEP_SUPPORTS_PROT_FILTERS
1305 #define BNEP_SUPPORTS_PROT_FILTERS          TRUE
1306 #endif
1307
1308 /* Multicast filtering is an optional feature. Bydefault it will be turned on */
1309 #ifndef BNEP_SUPPORTS_MULTI_FILTERS
1310 #define BNEP_SUPPORTS_MULTI_FILTERS         TRUE
1311 #endif
1312
1313 /* BNEP status API call is used mainly to get the L2CAP handle */
1314 #ifndef BNEP_SUPPORTS_STATUS_API
1315 #define BNEP_SUPPORTS_STATUS_API            TRUE
1316 #endif
1317
1318 /* This is just a debug function */
1319 #ifndef BNEP_SUPPORTS_DEBUG_DUMP
1320 #define BNEP_SUPPORTS_DEBUG_DUMP            TRUE
1321 #endif
1322
1323 #ifndef BNEP_SUPPORTS_ALL_UUID_LENGTHS
1324 #define BNEP_SUPPORTS_ALL_UUID_LENGTHS      TRUE    /* Otherwise it will support only 16bit UUIDs */
1325 #endif
1326
1327 /*
1328 ** When BNEP connection changes roles after the connection is established
1329 ** we will do an authentication check again on the new role
1330 */
1331 #ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
1332 #define BNEP_DO_AUTH_FOR_ROLE_SWITCH        TRUE
1333 #endif
1334
1335
1336 /* Maximum number of protocol filters supported. */
1337 #ifndef BNEP_MAX_PROT_FILTERS
1338 #define BNEP_MAX_PROT_FILTERS       5
1339 #endif
1340
1341 /* Maximum number of multicast filters supported. */
1342 #ifndef BNEP_MAX_MULTI_FILTERS
1343 #define BNEP_MAX_MULTI_FILTERS      5
1344 #endif
1345
1346 /* Minimum MTU size. */
1347 #ifndef BNEP_MIN_MTU_SIZE
1348 #define BNEP_MIN_MTU_SIZE           L2CAP_MTU_SIZE
1349 #endif
1350
1351 /* Preferred MTU size. */
1352 #ifndef BNEP_MTU_SIZE
1353 #define BNEP_MTU_SIZE               BNEP_MIN_MTU_SIZE
1354 #endif
1355
1356 /* Maximum number of buffers allowed in transmit data queue. */
1357 #ifndef BNEP_MAX_XMITQ_DEPTH
1358 #define BNEP_MAX_XMITQ_DEPTH        20
1359 #endif
1360
1361 /* Maximum number BNEP of connections supported. */
1362 #ifndef BNEP_MAX_CONNECTIONS
1363 #define BNEP_MAX_CONNECTIONS        7
1364 #endif
1365
1366
1367 /******************************************************************************
1368 **
1369 ** AVDTP
1370 **
1371 ******************************************************************************/
1372
1373 #ifndef AVDT_INCLUDED
1374 #define AVDT_INCLUDED               TRUE
1375 #endif
1376
1377 /* Include reporting capability in AVDTP */
1378 #ifndef AVDT_REPORTING
1379 #define AVDT_REPORTING              TRUE
1380 #endif
1381
1382 /* Include multiplexing capability in AVDTP */
1383 #ifndef AVDT_MULTIPLEXING
1384 #define AVDT_MULTIPLEXING           TRUE
1385 #endif
1386
1387 /* Number of simultaneous links to different peer devices. */
1388 #ifndef AVDT_NUM_LINKS
1389 #define AVDT_NUM_LINKS              2
1390 #endif
1391
1392 /* Number of simultaneous stream endpoints. */
1393 #ifndef AVDT_NUM_SEPS
1394 #define AVDT_NUM_SEPS               3
1395 #endif
1396
1397 /* Number of transport channels setup per media stream(audio or video) */
1398 #ifndef AVDT_NUM_CHANNELS
1399
1400 #if AVDT_REPORTING == TRUE
1401 /* signaling, media and reporting channels */
1402 #define AVDT_NUM_CHANNELS   3
1403 #else
1404 /* signaling and media channels */
1405 #define AVDT_NUM_CHANNELS   2
1406 #endif  // AVDT_REPORTING
1407
1408 #endif  // AVDT_NUM_CHANNELS
1409
1410 /* Number of transport channels setup by AVDT for all media streams
1411  * AVDT_NUM_CHANNELS * Number of simultaneous streams.
1412  */
1413 #ifndef AVDT_NUM_TC_TBL
1414 #define AVDT_NUM_TC_TBL             6
1415 #endif
1416
1417 /* Maximum size in bytes of the codec capabilities information element. */
1418 #ifndef AVDT_CODEC_SIZE
1419 #define AVDT_CODEC_SIZE             10
1420 #endif
1421
1422 /* Maximum size in bytes of the content protection information element. */
1423 #ifndef AVDT_PROTECT_SIZE
1424 #define AVDT_PROTECT_SIZE           90
1425 #endif
1426
1427 /* Maximum number of GKI buffers in the fragment queue (for video frames).
1428  * Must be less than the number of buffers in the buffer pool of size AVDT_DATA_POOL_SIZE */
1429 #ifndef AVDT_MAX_FRAG_COUNT
1430 #define AVDT_MAX_FRAG_COUNT         15
1431 #endif
1432
1433 /******************************************************************************
1434 **
1435 ** PAN
1436 **
1437 ******************************************************************************/
1438
1439 #ifndef PAN_INCLUDED
1440 #define PAN_INCLUDED                     TRUE
1441 #endif
1442
1443 /* This will enable the PANU role */
1444 #ifndef PAN_SUPPORTS_ROLE_PANU
1445 #define PAN_SUPPORTS_ROLE_PANU              TRUE
1446 #endif
1447
1448 /* This will enable the GN role */
1449 #ifndef PAN_SUPPORTS_ROLE_GN
1450 #define PAN_SUPPORTS_ROLE_GN                TRUE
1451 #endif
1452
1453 /* This will enable the NAP role */
1454 #ifndef PAN_SUPPORTS_ROLE_NAP
1455 #define PAN_SUPPORTS_ROLE_NAP               TRUE
1456 #endif
1457
1458 /* This is just for debugging purposes */
1459 #ifndef PAN_SUPPORTS_DEBUG_DUMP
1460 #define PAN_SUPPORTS_DEBUG_DUMP             TRUE
1461 #endif
1462
1463 /* Maximum number of PAN connections allowed */
1464 #ifndef MAX_PAN_CONNS
1465 #define MAX_PAN_CONNS                    7
1466 #endif
1467
1468 /* Default service name for NAP role */
1469 #ifndef PAN_NAP_DEFAULT_SERVICE_NAME
1470 #define PAN_NAP_DEFAULT_SERVICE_NAME    "Network Access Point Service"
1471 #endif
1472
1473 /* Default service name for GN role */
1474 #ifndef PAN_GN_DEFAULT_SERVICE_NAME
1475 #define PAN_GN_DEFAULT_SERVICE_NAME     "Group Network Service"
1476 #endif
1477
1478 /* Default service name for PANU role */
1479 #ifndef PAN_PANU_DEFAULT_SERVICE_NAME
1480 #define PAN_PANU_DEFAULT_SERVICE_NAME   "PAN User Service"
1481 #endif
1482
1483 /* Default description for NAP role service */
1484 #ifndef PAN_NAP_DEFAULT_DESCRIPTION
1485 #define PAN_NAP_DEFAULT_DESCRIPTION     "NAP"
1486 #endif
1487
1488 /* Default description for GN role service */
1489 #ifndef PAN_GN_DEFAULT_DESCRIPTION
1490 #define PAN_GN_DEFAULT_DESCRIPTION      "GN"
1491 #endif
1492
1493 /* Default description for PANU role service */
1494 #ifndef PAN_PANU_DEFAULT_DESCRIPTION
1495 #define PAN_PANU_DEFAULT_DESCRIPTION    "PANU"
1496 #endif
1497
1498 /* Default Security level for PANU role. */
1499 #ifndef PAN_PANU_SECURITY_LEVEL
1500 #define PAN_PANU_SECURITY_LEVEL          0
1501 #endif
1502
1503 /* Default Security level for GN role. */
1504 #ifndef PAN_GN_SECURITY_LEVEL
1505 #define PAN_GN_SECURITY_LEVEL            0
1506 #endif
1507
1508 /* Default Security level for NAP role. */
1509 #ifndef PAN_NAP_SECURITY_LEVEL
1510 #define PAN_NAP_SECURITY_LEVEL           0
1511 #endif
1512
1513 /******************************************************************************
1514 **
1515 ** GAP
1516 **
1517 ******************************************************************************/
1518
1519 #ifndef GAP_INCLUDED
1520 #define GAP_INCLUDED                TRUE
1521 #endif
1522
1523 /* This is set to enable use of GAP L2CAP connections. */
1524 #ifndef GAP_CONN_INCLUDED
1525 #define GAP_CONN_INCLUDED           TRUE
1526 #endif
1527
1528 /* This is set to enable posting event for data write */
1529 #ifndef GAP_CONN_POST_EVT_INCLUDED
1530 #define GAP_CONN_POST_EVT_INCLUDED  FALSE
1531 #endif
1532
1533 /* The maximum number of simultaneous GAP L2CAP connections. */
1534 #ifndef GAP_MAX_CONNECTIONS
1535 #define GAP_MAX_CONNECTIONS         8
1536 #endif
1537
1538 /******************************************************************************
1539 **
1540 ** CTP
1541 **
1542 ******************************************************************************/
1543
1544 #ifndef CTP_INCLUDED
1545 #define CTP_INCLUDED                FALSE
1546 #endif
1547
1548 /* The CTP discovery record size. */
1549 #ifndef CTP_DISC_REC_SIZE
1550 #define CTP_DISC_REC_SIZE           60
1551 #endif
1552
1553 /******************************************************************************
1554 **
1555 ** ICP
1556 **
1557 ******************************************************************************/
1558
1559 #ifndef ICP_INCLUDED
1560 #define ICP_INCLUDED                FALSE
1561 #endif
1562
1563 /******************************************************************************
1564 **
1565 ** SPP
1566 **
1567 ******************************************************************************/
1568
1569 #ifndef SPP_INCLUDED
1570 #define SPP_INCLUDED                FALSE
1571 #endif
1572
1573 /* The SPP discovery record size. */
1574 #ifndef SPP_DISC_REC_SIZE
1575 #define SPP_DISC_REC_SIZE           60
1576 #endif
1577
1578 /* keep the raw data received from SDP server in database. */
1579 #ifndef SDP_RAW_DATA_INCLUDED
1580 #define SDP_RAW_DATA_INCLUDED       TRUE
1581 #endif
1582
1583 /* Inquiry duration in 1.28 second units. */
1584 #ifndef SDP_DEBUG
1585 #define SDP_DEBUG                   TRUE
1586 #endif
1587
1588 /******************************************************************************
1589 **
1590 ** HSP2, HFP
1591 **
1592 ******************************************************************************/
1593
1594 #ifndef HSP2_INCLUDED
1595 #define HSP2_INCLUDED               FALSE
1596 #endif
1597
1598 /* The time in seconds to wait for completion of a partial AT command or response from the peer. */
1599 #ifndef HSP2_AT_TO_INTERVAL
1600 #define HSP2_AT_TO_INTERVAL         30
1601 #endif
1602
1603 #ifndef HSP2_MAX_AT_VAL_LENGTH
1604 #if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
1605 #define HSP2_MAX_AT_VAL_LENGTH       310
1606 #else
1607 #define HSP2_MAX_AT_VAL_LENGTH       5
1608 #endif
1609 #endif
1610
1611 /******************************************************************************
1612 **
1613 ** HFP
1614 **
1615 ******************************************************************************/
1616
1617 #ifndef HFP_INCLUDED
1618 #define HFP_INCLUDED                FALSE
1619 #endif
1620
1621 /******************************************************************************
1622 **
1623 ** HID
1624 **
1625 ******************************************************************************/
1626
1627 /* HID Device Role Included */
1628 #ifndef HID_DEV_INCLUDED
1629 #define HID_DEV_INCLUDED             FALSE
1630 #endif
1631
1632 #ifndef HID_DEV_PM_INCLUDED
1633 #define HID_DEV_PM_INCLUDED         TRUE
1634 #endif
1635
1636 #ifndef HID_DEV_SUBCLASS
1637 #define HID_DEV_SUBCLASS            COD_MINOR_POINTING
1638 #endif
1639
1640 #ifndef HID_CONTROL_POOL_ID
1641 #define HID_CONTROL_POOL_ID             2
1642 #endif
1643
1644 #ifndef HID_INTERRUPT_POOL_ID
1645 #define HID_INTERRUPT_POOL_ID           2
1646 #endif
1647
1648 /*************************************************************************
1649 ** Definitions for Both HID-Host & Device
1650 */
1651 #ifndef HID_MAX_SVC_NAME_LEN
1652 #define HID_MAX_SVC_NAME_LEN  32
1653 #endif
1654
1655 #ifndef HID_MAX_SVC_DESCR_LEN
1656 #define HID_MAX_SVC_DESCR_LEN 32
1657 #endif
1658
1659 #ifndef HID_MAX_PROV_NAME_LEN
1660 #define HID_MAX_PROV_NAME_LEN 32
1661 #endif
1662
1663 /*************************************************************************
1664 ** Definitions for HID-Host
1665 */
1666 #ifndef  HID_HOST_INCLUDED
1667 #define HID_HOST_INCLUDED           TRUE
1668 #endif
1669
1670 #ifndef HID_HOST_MAX_DEVICES
1671 #define HID_HOST_MAX_DEVICES        7
1672 #endif
1673
1674 #ifndef HID_HOST_MTU
1675 #define HID_HOST_MTU                640
1676 #endif
1677
1678 #ifndef HID_HOST_FLUSH_TO
1679 #define HID_HOST_FLUSH_TO                 0xffff
1680 #endif
1681
1682 #ifndef HID_HOST_MAX_CONN_RETRY
1683 #define HID_HOST_MAX_CONN_RETRY     (3)
1684 #endif
1685
1686 #ifndef HID_HOST_REPAGE_WIN
1687 #define HID_HOST_REPAGE_WIN          (2)
1688 #endif
1689
1690 /******************************************************************************
1691 **
1692 ** DUN and FAX
1693 **
1694 ******************************************************************************/
1695
1696 #ifndef DUN_INCLUDED
1697 #define DUN_INCLUDED                FALSE
1698 #endif
1699
1700 /******************************************************************************
1701 **
1702 ** GOEP
1703 **
1704 ******************************************************************************/
1705
1706 #ifndef GOEP_INCLUDED
1707 #define GOEP_INCLUDED               FALSE
1708 #endif
1709
1710 /******************************************************************************
1711 **
1712 ** OPP
1713 **
1714 ******************************************************************************/
1715
1716 #ifndef OPP_INCLUDED
1717 #define OPP_INCLUDED                FALSE
1718 #endif
1719
1720 /******************************************************************************
1721 **
1722 ** BPP Printer
1723 **
1724 ******************************************************************************/
1725 #ifndef BPP_INCLUDED
1726 #define BPP_INCLUDED                FALSE
1727 #endif
1728
1729 #ifndef BPP_SND_INCLUDED
1730 #define BPP_SND_INCLUDED            FALSE
1731 #endif
1732
1733 /******************************************************************************
1734 **
1735 ** BIP
1736 **
1737 ******************************************************************************/
1738 #ifndef BIP_INCLUDED
1739 #define BIP_INCLUDED                FALSE
1740 #endif
1741
1742 /******************************************************************************
1743 **
1744 ** HCRP
1745 **
1746 ******************************************************************************/
1747
1748 #ifndef HCRP_INCLUDED
1749 #define HCRP_INCLUDED               FALSE
1750 #endif
1751
1752 /* This is set to enable server. */
1753 #ifndef HCRP_SERVER_INCLUDED
1754 #define HCRP_SERVER_INCLUDED       FALSE
1755 #endif
1756
1757 /* This is set to enable client. */
1758 #ifndef HCRP_CLIENT_INCLUDED
1759 #define HCRP_CLIENT_INCLUDED        FALSE
1760 #endif
1761
1762 /******************************************************************************
1763 **
1764 ** PAN
1765 **
1766 ******************************************************************************/
1767
1768 #ifndef PAN_INCLUDED
1769 #define PAN_INCLUDED                FALSE
1770 #endif
1771
1772 /******************************************************************************
1773 **
1774 ** SAP
1775 **
1776 ******************************************************************************/
1777
1778 #ifndef SAP_SERVER_INCLUDED
1779 #define SAP_SERVER_INCLUDED         FALSE
1780 #endif
1781
1782 /*************************************************************************
1783  * A2DP Definitions
1784  */
1785 #ifndef A2D_INCLUDED
1786 #define A2D_INCLUDED            TRUE
1787 #endif
1788
1789 /* TRUE to include SBC utility functions */
1790 #ifndef A2D_SBC_INCLUDED
1791 #define A2D_SBC_INCLUDED        A2D_INCLUDED
1792 #endif
1793
1794 /******************************************************************************
1795 **
1796 ** AVCTP
1797 **
1798 ******************************************************************************/
1799
1800 #ifndef AVCT_INCLUDED
1801 #define AVCT_INCLUDED               TRUE
1802 #endif
1803
1804 /* Number of simultaneous ACL links to different peer devices. */
1805 #ifndef AVCT_NUM_LINKS
1806 #define AVCT_NUM_LINKS              2
1807 #endif
1808
1809 /* Number of simultaneous AVCTP connections. */
1810 #ifndef AVCT_NUM_CONN
1811 #define AVCT_NUM_CONN               3
1812 #endif
1813
1814 /******************************************************************************
1815 **
1816 ** AVRCP
1817 **
1818 ******************************************************************************/
1819
1820 #ifndef AVRC_INCLUDED
1821 #define AVRC_INCLUDED               TRUE
1822 #endif
1823
1824 #ifndef AVRC_METADATA_INCLUDED
1825 #define AVRC_METADATA_INCLUDED      TRUE
1826 #endif
1827
1828 #ifndef AVRC_ADV_CTRL_INCLUDED
1829 #define AVRC_ADV_CTRL_INCLUDED      TRUE
1830 #endif
1831
1832 #ifndef AVRC_CTLR_INCLUDED
1833 #define AVRC_CTLR_INCLUDED          TRUE
1834 #endif
1835
1836 /******************************************************************************
1837 **
1838 ** MCAP
1839 **
1840 ******************************************************************************/
1841 #ifndef MCA_INCLUDED
1842 #define MCA_INCLUDED                FALSE
1843 #endif
1844
1845 /* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */
1846 #ifndef MCA_CTRL_MTU
1847 #define MCA_CTRL_MTU    60
1848 #endif
1849
1850 /* The maximum number of registered MCAP instances. */
1851 #ifndef MCA_NUM_REGS
1852 #define MCA_NUM_REGS    12
1853 #endif
1854
1855 /* The maximum number of control channels (to difference devices) per registered MCAP instances. */
1856 #ifndef MCA_NUM_LINKS
1857 #define MCA_NUM_LINKS   3
1858 #endif
1859
1860 /* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */
1861 #ifndef MCA_NUM_DEPS
1862 #define MCA_NUM_DEPS    13
1863 #endif
1864
1865 /* The maximum number of MDL link per control channel. */
1866 #ifndef MCA_NUM_MDLS
1867 #define MCA_NUM_MDLS    4
1868 #endif
1869
1870 /* Pool ID where to reassemble the SDU. */
1871 #ifndef MCA_USER_RX_POOL_ID
1872 #define MCA_USER_RX_POOL_ID     HCI_ACL_POOL_ID
1873 #endif
1874
1875 /* Pool ID where to hold the SDU. */
1876 #ifndef MCA_USER_TX_POOL_ID
1877 #define MCA_USER_TX_POOL_ID     HCI_ACL_POOL_ID
1878 #endif
1879
1880 /*
1881 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
1882 */
1883 #ifndef MCA_FCR_RX_POOL_ID
1884 #define MCA_FCR_RX_POOL_ID      HCI_ACL_POOL_ID
1885 #endif
1886
1887 /*
1888 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
1889 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
1890 Note:  This pool needs to have enough buffers to hold two times the window size negotiated
1891  in the tL2CAP_FCR_OPTIONS (2 * tx_win_size)  to allow for retransmissions.
1892  The size of each buffer must be able to hold the maximum MPS segment size passed in
1893  tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1894 */
1895 #ifndef MCA_FCR_TX_POOL_ID
1896 #define MCA_FCR_TX_POOL_ID      HCI_ACL_POOL_ID
1897 #endif
1898
1899 /* MCAP control channel FCR Option:
1900 Size of the transmission window when using enhanced retransmission mode.
1901 1 is defined by HDP specification for control channel.
1902 */
1903 #ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
1904 #define MCA_FCR_OPT_TX_WINDOW_SIZE      1
1905 #endif
1906
1907 /* MCAP control channel FCR Option:
1908 Number of transmission attempts for a single I-Frame before taking
1909 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1910 Streaming modes.
1911 Range: 0, 1-0xFF
1912 0 - infinite retransmissions
1913 1 - single transmission
1914 */
1915 #ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT
1916 #define MCA_FCR_OPT_MAX_TX_B4_DISCNT    20
1917 #endif
1918
1919 /* MCAP control channel FCR Option: Retransmission Timeout
1920 The AVRCP specification set a value in the range of 300 - 2000 ms
1921 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
1922 Range: Minimum 2000 (2 secs) when supporting PBF.
1923  */
1924 #ifndef MCA_FCR_OPT_RETX_TOUT
1925 #define MCA_FCR_OPT_RETX_TOUT           2000
1926 #endif
1927
1928 /* MCAP control channel FCR Option: Monitor Timeout
1929 The AVRCP specification set a value in the range of 300 - 2000 ms
1930 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
1931 Range: Minimum 12000 (12 secs) when supporting PBF.
1932 */
1933 #ifndef MCA_FCR_OPT_MONITOR_TOUT
1934 #define MCA_FCR_OPT_MONITOR_TOUT        12000
1935 #endif
1936
1937 /* MCAP control channel FCR Option: Maximum PDU payload size.
1938 The maximum number of payload octets that the local device can receive in a single PDU.
1939 */
1940 #ifndef MCA_FCR_OPT_MPS_SIZE
1941 #define MCA_FCR_OPT_MPS_SIZE            1000
1942 #endif
1943
1944 /* Shared transport */
1945 #ifndef NFC_SHARED_TRANSPORT_ENABLED
1946 #define NFC_SHARED_TRANSPORT_ENABLED    FALSE
1947 #endif
1948
1949 /******************************************************************************
1950 **
1951 ** SER
1952 **
1953 ******************************************************************************/
1954
1955 #ifndef SER_INCLUDED
1956 #define SER_INCLUDED                FALSE
1957 #endif
1958
1959 /* Mailbox used by serial application. */
1960 #ifndef SER_MBOX
1961 #define SER_MBOX                    TASK_MBOX_1
1962 #endif
1963
1964 /******************************************************************************
1965 **
1966 ** Sleep Mode (Low Power Mode)
1967 **
1968 ******************************************************************************/
1969
1970 #ifndef HCILP_INCLUDED
1971 #define HCILP_INCLUDED                  TRUE
1972 #endif
1973
1974 /******************************************************************************
1975 **
1976 ** SAP - Sample applications
1977 **
1978 ******************************************************************************/
1979
1980 #ifndef MMI_INCLUDED
1981 #define MMI_INCLUDED                FALSE
1982 #endif
1983
1984 /******************************************************************************
1985 **
1986 ** APPL - Application Task
1987 **
1988 ******************************************************************************/
1989 /* When TRUE indicates that an application task is to be run */
1990 #ifndef APPL_INCLUDED
1991 #define APPL_INCLUDED                TRUE
1992 #endif
1993
1994 #define L2CAP_FEATURE_REQ_ID      73
1995 #define L2CAP_FEATURE_RSP_ID     173
1996
1997 /******************************************************************************
1998 **
1999 ** BTA
2000 **
2001 ******************************************************************************/
2002 /* BTA EIR canned UUID list (default is dynamic) */
2003 #ifndef BTA_EIR_CANNED_UUID_LIST
2004 #define BTA_EIR_CANNED_UUID_LIST FALSE
2005 #endif
2006
2007 /* Number of supported customer UUID in EIR */
2008 #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
2009 #define BTA_EIR_SERVER_NUM_CUSTOM_UUID     8
2010 #endif
2011
2012 /* CHLD override for bluedroid */
2013 #ifndef BTA_AG_CHLD_VAL_ECC
2014 #define BTA_AG_CHLD_VAL_ECC  "(0,1,1x,2,2x,3)"
2015 #endif
2016
2017 #ifndef BTA_AG_CHLD_VAL
2018 #define BTA_AG_CHLD_VAL  "(0,1,2,3)"
2019 #endif
2020
2021 /* Set the CIND to match HFP 1.5 */
2022 #ifndef BTA_AG_CIND_INFO
2023 #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))"
2024 #endif
2025
2026 #ifndef BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY
2027 #define BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY TRUE
2028 #endif
2029
2030 /******************************************************************************
2031 **
2032 ** Tracing:  Include trace header file here.
2033 **
2034 ******************************************************************************/
2035
2036 #include "bt_trace.h"
2037
2038 #endif /* BT_TARGET_H */