1 /******************************************************************************
3 * Copyright (c) 2014 The Android Open Source Project
4 * Copyright (C) 1999-2012 Broadcom Corporation
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:
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 ******************************************************************************/
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"
31 #ifdef HAS_BDROID_BUILDCFG
32 #include "bdroid_buildcfg.h"
35 #include "bt_types.h" /* This must be defined AFTER buildcfg.h */
37 /* Include common GKI definitions used by this platform */
38 #include "gki_target.h"
39 #include "dyn_mem.h" /* defines static and/or dynamic memory for components */
41 //------------------Added from bdroid_buildcfg.h---------------------
42 #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)
46 #ifndef BTUI_OPS_FORMATS
47 #define BTUI_OPS_FORMATS (BTA_OP_VCARD21_MASK | BTA_OP_ANY_MASK)
50 #ifndef BTA_RFC_MTU_SIZE
51 #define BTA_RFC_MTU_SIZE (L2CAP_MTU_SIZE-L2CAP_MIN_OFFSET-RFCOMM_DATA_OVERHEAD)
54 #ifndef SBC_NO_PCM_CPY_OPTION
55 #define SBC_NO_PCM_CPY_OPTION FALSE
59 #define BTA_INCLUDED TRUE
62 #ifndef BTA_PAN_INCLUDED
63 #define BTA_PAN_INCLUDED TRUE
66 #ifndef BTA_HH_INCLUDED
67 #define BTA_HH_INCLUDED TRUE
71 #define BTA_HH_ROLE BTA_MASTER_ROLE_PREF
74 #ifndef BTA_HH_LE_INCLUDED
75 #define BTA_HH_LE_INCLUDED TRUE
78 #ifndef BTA_AR_INCLUDED
79 #define BTA_AR_INCLUDED TRUE
82 #ifndef BTA_AV_INCLUDED
83 #define BTA_AV_INCLUDED TRUE
86 #ifndef BTA_GATT_INCLUDED
87 #define BTA_GATT_INCLUDED TRUE
90 #ifndef BTA_AV_SINK_INCLUDED
91 #define BTA_AV_SINK_INCLUDED FALSE
94 #ifndef BTA_DISABLE_DELAY
95 #define BTA_DISABLE_DELAY 200 /* in milliseconds */
98 // 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.
102 // TODO(zachoverflow): reinstate in alarm code
103 #ifndef GKI_TIMER_INTERVAL_FOR_WAKELOCK
104 #define GKI_TIMER_INTERVAL_FOR_WAKELOCK 3000
107 #ifndef BTA_SYS_TIMER_PERIOD
108 #define BTA_SYS_TIMER_PERIOD 100
111 #ifndef SBC_FOR_EMBEDDED_LINUX
112 #define SBC_FOR_EMBEDDED_LINUX TRUE
116 #define AVDT_VERSION 0x0102
119 #ifndef BTA_AG_AT_MAX_LEN
120 #define BTA_AG_AT_MAX_LEN 512
123 #ifndef BTA_AVRCP_FF_RW_SUPPORT
124 #define BTA_AVRCP_FF_RW_SUPPORT TRUE
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)
131 #ifndef BTA_AV_RET_TOUT
132 #define BTA_AV_RET_TOUT 15
135 #ifndef PORCHE_PAIRING_CONFLICT
136 #define PORCHE_PAIRING_CONFLICT TRUE
139 #ifndef BTA_AV_CO_CP_SCMS_T
140 #define BTA_AV_CO_CP_SCMS_T FALSE
143 /* This feature is used to eanble interleaved scan*/
144 #ifndef BTA_HOST_INTERLEAVE_SEARCH
145 #define BTA_HOST_INTERLEAVE_SEARCH FALSE
148 #ifndef BT_USE_TRACES
149 #define BT_USE_TRACES TRUE
152 #ifndef BT_TRACE_BTIF
153 #define BT_TRACE_BTIF TRUE
156 #ifndef BT_TRACE_VERBOSE
157 #define BT_TRACE_VERBOSE FALSE
160 #ifndef BTA_DM_SDP_DB_SIZE
161 #define BTA_DM_SDP_DB_SIZE 8000
165 #define HL_INCLUDED TRUE
168 #ifndef AG_VOICE_SETTINGS
169 #define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS
172 #ifndef BTIF_DM_OOB_TEST
173 #define BTIF_DM_OOB_TEST TRUE
176 // 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
182 //------------------End added from bdroid_buildcfg.h---------------------
185 /******************************************************************************
189 ******************************************************************************/
191 /* Receives HCI events from the lower-layer. */
192 #ifndef HCI_CMD_POOL_ID
193 #define HCI_CMD_POOL_ID GKI_POOL_ID_2
196 #ifndef HCI_CMD_POOL_BUF_SIZE
197 #define HCI_CMD_POOL_BUF_SIZE GKI_BUF2_SIZE
200 /* Receives ACL data packets from thelower-layer. */
201 #ifndef HCI_ACL_POOL_ID
202 #define HCI_ACL_POOL_ID GKI_POOL_ID_3
205 /* Maximum number of buffers available for ACL receive data. */
206 #ifndef HCI_ACL_BUF_MAX
207 #define HCI_ACL_BUF_MAX GKI_BUF3_MAX
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
215 /* Sends SDP data packets. */
217 #define SDP_POOL_ID 3
220 /* Sends RFCOMM command packets. */
221 #ifndef RFCOMM_CMD_POOL_ID
222 #define RFCOMM_CMD_POOL_ID GKI_POOL_ID_2
225 /* Sends RFCOMM data packets. */
226 #ifndef RFCOMM_DATA_POOL_ID
227 #define RFCOMM_DATA_POOL_ID GKI_POOL_ID_3
230 #ifndef RFCOMM_DATA_POOL_BUF_SIZE
231 #define RFCOMM_DATA_POOL_BUF_SIZE GKI_BUF3_SIZE
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
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
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
249 /* 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
255 /* 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
260 #ifndef OBX_LRG_DATA_POOL_SIZE
261 #define OBX_LRG_DATA_POOL_SIZE GKI_BUF4_SIZE
264 #ifndef OBX_LRG_DATA_POOL_ID
265 #define OBX_LRG_DATA_POOL_ID GKI_POOL_ID_4
267 /* Used to send data to L2CAP. */
268 #ifndef GAP_DATA_POOL_ID
269 #define GAP_DATA_POOL_ID GKI_POOL_ID_3
273 #define SPP_DB_SIZE GKI_BUF3_SIZE
276 /* BNEP data and protocol messages. */
278 #define BNEP_POOL_ID GKI_POOL_ID_3
281 /* RPC pool for temporary trace message buffers. */
282 #ifndef RPC_SCRATCH_POOL_ID
283 #define RPC_SCRATCH_POOL_ID GKI_POOL_ID_2
286 /* AVDTP pool for protocol messages */
287 #ifndef AVDT_CMD_POOL_ID
288 #define AVDT_CMD_POOL_ID GKI_POOL_ID_2
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
297 #define PAN_POOL_ID GKI_POOL_ID_3
298 /* Maximum amount of the shared buffer to allocate for PAN */
299 #define PAN_POOL_MAX (GKI_BUF3_MAX / 4)
302 /* AVCTP pool for protocol messages */
303 #ifndef AVCT_CMD_POOL_ID
304 #define AVCT_CMD_POOL_ID GKI_POOL_ID_1
307 /* AVRCP pool for protocol messages */
308 #ifndef AVRC_CMD_POOL_ID
309 #define AVRC_CMD_POOL_ID GKI_POOL_ID_1
312 /* AVRCP pool size for protocol messages */
313 #ifndef AVRC_CMD_POOL_SIZE
314 #define AVRC_CMD_POOL_SIZE GKI_BUF1_SIZE
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
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
328 /* AVRCP buffer size for browsing channel messages */
329 #ifndef AVRC_BROWSE_POOL_SIZE
330 #define AVRC_BROWSE_POOL_SIZE GKI_MAX_BUF_SIZE
333 #ifndef BTA_HL_LRG_DATA_POOL_ID
334 #define BTA_HL_LRG_DATA_POOL_ID GKI_POOL_ID_7
337 /* GATT Server Database pool ID */
338 #ifndef GATT_DB_POOL_ID
339 #define GATT_DB_POOL_ID GKI_POOL_ID_8
342 /* 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
347 /******************************************************************************
349 ** Lower Layer Interface
351 ******************************************************************************/
353 /* 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))
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))))
362 #endif /* HCI_GET_CMD_BUF */
364 /******************************************************************************
368 ******************************************************************************/
370 /* 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)
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
379 #define QUICK_TIMER_TICKS_PER_SEC 10 /* 100ms timer */
382 /******************************************************************************
386 ******************************************************************************/
388 /* Cancel Inquiry on incoming SSP */
389 #ifndef BTM_NO_SSP_ON_INQUIRY
390 #define BTM_NO_SSP_ON_INQUIRY FALSE
393 /* Includes SCO if TRUE */
394 #ifndef BTM_SCO_INCLUDED
395 #define BTM_SCO_INCLUDED TRUE /* TRUE includes SCO code */
398 /* Includes SCO if TRUE */
399 #ifndef BTM_SCO_HCI_INCLUDED
400 #define BTM_SCO_HCI_INCLUDED FALSE /* TRUE includes SCO over HCI code */
403 /* Includes WBS if TRUE */
404 #ifndef BTM_WBS_INCLUDED
405 #define BTM_WBS_INCLUDED FALSE /* TRUE includes WBS code */
408 /* This is used to work around a controller bug that doesn't like Disconnect
409 ** issued while there is a role switch in progress
411 #ifndef BTM_DISC_DURING_RS
412 #define BTM_DISC_DURING_RS TRUE
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
423 /* The size in bytes of the BTM inquiry database. */
424 #ifndef BTM_INQ_DB_SIZE
425 #define BTM_INQ_DB_SIZE 40
428 /* The default scan mode */
429 #ifndef BTM_DEFAULT_SCAN_TYPE
430 #define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED
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
438 /* 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
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
448 /* 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
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
458 /* Default class of device
459 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
461 * SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
462 * MAJOR_CLASS:0x02 - PHONE
463 * MINOR_CLASS:0x0C - SMART_PHONE
467 #define BTA_DM_COD {0x5A, 0x02, 0x0C}
470 /* The number of SCO links. */
471 #ifndef BTM_MAX_SCO_LINKS
472 #define BTM_MAX_SCO_LINKS 3
475 /* The preferred type of SCO links (2-eSCO, 0-SCO). */
476 #ifndef BTM_DEFAULT_SCO_MODE
477 #define BTM_DEFAULT_SCO_MODE 2
480 /* The number of security records for peer devices. */
481 #ifndef BTM_SEC_MAX_DEVICE_RECORDS
482 #define BTM_SEC_MAX_DEVICE_RECORDS 100
485 /* The number of security records for services. */
486 #ifndef BTM_SEC_MAX_SERVICE_RECORDS
487 #define BTM_SEC_MAX_SERVICE_RECORDS 32
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
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
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
506 /* Fixed Default String. When this is defined as null string, the device's
507 * product model name is used as the default local name.
509 #ifndef BTM_DEF_LOCAL_NAME
510 #define BTM_DEF_LOCAL_NAME ""
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
518 /* Maximum length of the service name. */
519 #ifndef BT_MAX_SERVICE_NAME_LEN
520 #define BT_MAX_SERVICE_NAME_LEN 21
523 /* ACL buffer size in HCI Host Buffer Size command. */
524 #ifndef BTM_ACL_BUF_SIZE
525 #define BTM_ACL_BUF_SIZE 0
528 /* 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
533 /* This is set to show debug trace messages for the power manager. */
535 #define BTM_PM_DEBUG FALSE
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
543 /* If the user does not respond to security process requests within this many seconds,
544 * a negative response would be sent automatically.
545 * 30 is LMP response timeout value */
546 #ifndef BTM_SEC_TIMEOUT_VALUE
547 #define BTM_SEC_TIMEOUT_VALUE 35
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
555 /******************************************
557 *******************************************/
558 /* 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
563 /* 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
568 #ifndef BTM_LOCAL_IO_CAPS_BLE
569 #define BTM_LOCAL_IO_CAPS_BLE BTM_IO_CAP_KBDISP
572 /* 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
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
584 /* Include Out-of-Band implementation for Simple Pairing */
585 #ifndef BTM_OOB_INCLUDED
586 #define BTM_OOB_INCLUDED TRUE
589 /* TRUE to include Sniff Subrating */
590 #ifndef BTM_SSR_INCLUDED
591 #define BTM_SSR_INCLUDED TRUE
594 /*************************
595 ** End of Lisbon Features
596 **************************/
598 /* 4.1/4.2 secure connections feature */
599 #ifndef SC_MODE_INCLUDED
600 #define SC_MODE_INCLUDED TRUE
603 /* Used for conformance testing ONLY */
604 #ifndef BTM_BLE_CONFORMANCE_TESTING
605 #define BTM_BLE_CONFORMANCE_TESTING FALSE
608 /******************************************************************************
612 ******************************************************************************/
614 /* The maximum number of simultaneous links that L2CAP can support. */
615 #ifndef MAX_ACL_CONNECTIONS
616 #define MAX_L2CAP_LINKS 7
618 #define MAX_L2CAP_LINKS MAX_ACL_CONNECTIONS
621 /* The maximum number of simultaneous channels that L2CAP can support. */
622 #ifndef MAX_L2CAP_CHANNELS
623 #define MAX_L2CAP_CHANNELS 16
626 /* The maximum number of simultaneous applications that can register with L2CAP. */
627 #ifndef MAX_L2CAP_CLIENTS
628 #define MAX_L2CAP_CLIENTS 15
631 /* The number of seconds of link inactivity before a link is disconnected. */
632 #ifndef L2CAP_LINK_INACTIVITY_TOUT
633 #define L2CAP_LINK_INACTIVITY_TOUT 4
636 /* The number of seconds of link inactivity after bonding before a link is disconnected. */
637 #ifndef L2CAP_BONDING_TIMEOUT
638 #define L2CAP_BONDING_TIMEOUT 3
641 /* The time from the HCI connection complete to disconnect if no channel is established. */
642 #ifndef L2CAP_LINK_STARTUP_TOUT
643 #define L2CAP_LINK_STARTUP_TOUT 60
646 /* The L2CAP MTU; must be in accord with the HCI ACL pool size. */
647 #ifndef L2CAP_MTU_SIZE
648 #define L2CAP_MTU_SIZE 1691
651 /* The L2CAP MPS over Bluetooth; must be in accord with the FCR tx pool size and ACL down buffer size. */
652 #ifndef L2CAP_MPS_OVER_BR_EDR
653 #define L2CAP_MPS_OVER_BR_EDR 1010
656 /* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */
657 #ifndef L2CAP_HOST_FC_ACL_BUFS
658 #define L2CAP_HOST_FC_ACL_BUFS 20
661 /* This is set to enable L2CAP to take the ACL link out of park mode when ACL data is to be sent. */
662 #ifndef L2CAP_WAKE_PARKED_LINK
663 #define L2CAP_WAKE_PARKED_LINK TRUE
666 /* Whether link wants to be the master or the slave. */
667 #ifndef L2CAP_DESIRED_LINK_ROLE
668 #define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_SLAVE
671 /* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
672 #ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
673 #define L2CAP_NON_FLUSHABLE_PB_INCLUDED TRUE
676 /* Minimum number of ACL credit for high priority link */
677 #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
678 #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5
681 /* used for monitoring HCI ACL credit management */
682 #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
683 #define L2CAP_HCI_FLOW_CONTROL_DEBUG TRUE
686 /* Used for calculating transmit buffers off of */
687 #ifndef L2CAP_NUM_XMIT_BUFFS
688 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
691 /* Unicast Connectionless Data */
692 #ifndef L2CAP_UCD_INCLUDED
693 #define L2CAP_UCD_INCLUDED FALSE
696 /* Unicast Connectionless Data MTU */
697 #ifndef L2CAP_UCD_MTU
698 #define L2CAP_UCD_MTU L2CAP_MTU_SIZE
701 /* Unicast Connectionless Data Idle Timeout */
702 #ifndef L2CAP_UCD_IDLE_TIMEOUT
703 #define L2CAP_UCD_IDLE_TIMEOUT 2
706 /* Unicast Connectionless Data Idle Timeout */
707 #ifndef L2CAP_UCD_CH_PRIORITY
708 #define L2CAP_UCD_CH_PRIORITY L2CAP_CHNL_PRIORITY_MEDIUM
711 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
712 /* Excluding L2CAP signaling channel and UCD */
713 #ifndef L2CAP_NUM_FIXED_CHNLS
714 #define L2CAP_NUM_FIXED_CHNLS 32
717 /* First fixed channel supported */
718 #ifndef L2CAP_FIRST_FIXED_CHNL
719 #define L2CAP_FIRST_FIXED_CHNL 4
722 #ifndef L2CAP_LAST_FIXED_CHNL
723 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
726 /* Round Robin service channels in link */
727 #ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
728 #define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE TRUE
731 /* Used for calculating transmit buffers off of */
732 #ifndef L2CAP_NUM_XMIT_BUFFS
733 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
736 /* used for monitoring eL2CAP data flow */
737 #ifndef L2CAP_ERTM_STATS
738 #define L2CAP_ERTM_STATS FALSE
741 /* Used for conformance testing ONLY: When TRUE lets scriptwrapper overwrite info response */
742 #ifndef L2CAP_CONFORMANCE_TESTING
743 #define L2CAP_CONFORMANCE_TESTING FALSE
747 * Max bytes per connection to buffer locally before dropping the
748 * connection if local client does not receive it - default is 1MB
750 #ifndef L2CAP_MAX_RX_BUFFER
751 #define L2CAP_MAX_RX_BUFFER 0x100000
755 #ifndef TIMER_PARAM_TYPE
756 #define TIMER_PARAM_TYPE void*
759 /******************************************************************************
763 ******************************************************************************/
766 #define BLE_INCLUDED TRUE
769 #ifndef BLE_ANDROID_CONTROLLER_SCAN_FILTER
770 #define BLE_ANDROID_CONTROLLER_SCAN_FILTER TRUE
773 #ifndef LOCAL_BLE_CONTROLLER_ID
774 #define LOCAL_BLE_CONTROLLER_ID (1)
778 * Toggles support for general LE privacy features such as remote address
779 * resolution, local address rotation etc.
781 #ifndef BLE_PRIVACY_SPT
782 #define BLE_PRIVACY_SPT TRUE
786 * Enables or disables support for local privacy (ex. address rotation)
788 #ifndef BLE_LOCAL_PRIVACY_ENABLED
789 #define BLE_LOCAL_PRIVACY_ENABLED TRUE
793 * Toggles support for vendor specific extensions such as RPA offloading,
794 * feature discovery, multi-adv etc.
796 #ifndef BLE_VND_INCLUDED
797 #define BLE_VND_INCLUDED FALSE
800 #ifndef BTM_BLE_ADV_TX_POWER
801 #define BTM_BLE_ADV_TX_POWER {-21, -15, -7, 1, 9}
805 #ifndef BLE_BATCH_SCAN_INCLUDED
806 #define BLE_BATCH_SCAN_INCLUDED TRUE
809 /******************************************************************************
811 ** ATT/GATT Protocol/Profile Settings
813 ******************************************************************************/
814 #ifndef BTA_GATT_INCLUDED
815 #if BLE_INCLUDED == TRUE
816 #define BTA_GATT_INCLUDED TRUE
818 #define BTA_GATT_INCLUDED FALSE
822 #if BTA_GATT_INCLUDED == TRUE && BLE_INCLUDED == FALSE
823 #error "can't have GATT without BLE"
826 #ifndef BLE_LLT_INCLUDED
827 #define BLE_LLT_INCLUDED TRUE
831 #define ATT_INCLUDED TRUE
835 #define ATT_DEBUG TRUE
838 #ifndef BLE_PERIPHERAL_MODE_SUPPORT
839 #define BLE_PERIPHERAL_MODE_SUPPORT TRUE
842 #ifndef BLE_DELAY_REQUEST_ENC
843 /* This flag is to work around IPHONE problem, We need to wait for iPhone ready
844 before send encryption request to iPhone */
845 #define BLE_DELAY_REQUEST_ENC FALSE
848 #ifndef GAP_TRANSPORT_SUPPORTED
849 #define GAP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
852 #ifndef GATTP_TRANSPORT_SUPPORTED
853 #define GATTP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
856 #ifndef GATT_MAX_SR_PROFILES
857 #define GATT_MAX_SR_PROFILES 32 /* max is 32 */
860 #ifndef GATT_MAX_APPS
861 #define GATT_MAX_APPS 32 /* note: 2 apps used internally GATT and GAP */
864 #ifndef GATT_MAX_PHY_CHANNEL
865 #define GATT_MAX_PHY_CHANNEL 7
868 /* Used for conformance testing ONLY */
869 #ifndef GATT_CONFORMANCE_TESTING
870 #define GATT_CONFORMANCE_TESTING FALSE
873 /* number of background connection device allowence, ideally to be the same as WL size
875 #ifndef GATT_MAX_BG_CONN_DEV
876 #define GATT_MAX_BG_CONN_DEV 32
879 /******************************************************************************
883 ******************************************************************************/
885 #if BLE_INCLUDED == TRUE
886 #define SMP_INCLUDED TRUE
888 #define SMP_INCLUDED FALSE
892 #if SMP_INCLUDED == TRUE && BLE_INCLUDED == FALSE
893 #error "can't have SMP without BLE"
897 #define SMP_DEBUG FALSE
900 #ifndef SMP_DEFAULT_AUTH_REQ
901 #define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY
904 #ifndef SMP_MAX_ENC_KEY_SIZE
905 #define SMP_MAX_ENC_KEY_SIZE 16
908 #ifndef SMP_MIN_ENC_KEY_SIZE
909 #define SMP_MIN_ENC_KEY_SIZE 7
912 /* minimum link timeout after SMP pairing is done, leave room for key exchange
913 and racing condition for the following service connection.
914 Prefer greater than 0 second, and no less than default inactivity link idle
915 timer(L2CAP_LINK_INACTIVITY_TOUT) in l2cap) */
916 #ifndef SMP_LINK_TOUT_MIN
917 #if (L2CAP_LINK_INACTIVITY_TOUT > 0)
918 #define SMP_LINK_TOUT_MIN L2CAP_LINK_INACTIVITY_TOUT
920 #define SMP_LINK_TOUT_MIN 2
923 /******************************************************************************
927 ******************************************************************************/
929 /* This is set to enable SDP server functionality. */
930 #ifndef SDP_SERVER_ENABLED
931 #define SDP_SERVER_ENABLED TRUE
934 /* The maximum number of SDP records the server can support. */
935 #ifndef SDP_MAX_RECORDS
936 #define SDP_MAX_RECORDS 30
939 /* The maximum number of attributes in each record. */
940 #ifndef SDP_MAX_REC_ATTR
941 #define SDP_MAX_REC_ATTR 25
944 #ifndef SDP_MAX_PAD_LEN
945 #define SDP_MAX_PAD_LEN 600
948 /* The maximum length, in bytes, of an attribute. */
949 #ifndef SDP_MAX_ATTR_LEN
950 #define SDP_MAX_ATTR_LEN 400
953 /* The maximum number of attribute filters supported by SDP databases. */
954 #ifndef SDP_MAX_ATTR_FILTERS
955 #define SDP_MAX_ATTR_FILTERS 15
958 /* The maximum number of UUID filters supported by SDP databases. */
959 #ifndef SDP_MAX_UUID_FILTERS
960 #define SDP_MAX_UUID_FILTERS 3
963 /* This is set to enable SDP client functionality. */
964 #ifndef SDP_CLIENT_ENABLED
965 #define SDP_CLIENT_ENABLED TRUE
968 /* The maximum number of record handles retrieved in a search. */
969 #ifndef SDP_MAX_DISC_SERVER_RECS
970 #define SDP_MAX_DISC_SERVER_RECS 21
973 /* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */
974 #ifndef SDP_MAX_LIST_BYTE_COUNT
975 #define SDP_MAX_LIST_BYTE_COUNT 4096
978 /* The maximum number of parameters in an SDP protocol element. */
979 #ifndef SDP_MAX_PROTOCOL_PARAMS
980 #define SDP_MAX_PROTOCOL_PARAMS 2
983 /* The maximum number of simultaneous client and server connections. */
984 #ifndef SDP_MAX_CONNECTIONS
985 #define SDP_MAX_CONNECTIONS 4
988 /* The MTU size for the L2CAP configuration. */
990 #define SDP_MTU_SIZE 672
993 /* The flush timeout for the L2CAP configuration. */
995 #define SDP_FLUSH_TO 0xFFFF
998 /* The name for security authorization. */
999 #ifndef SDP_SERVICE_NAME
1000 #define SDP_SERVICE_NAME "Service Discovery"
1003 /* The security level for BTM. */
1004 #ifndef SDP_SECURITY_LEVEL
1005 #define SDP_SECURITY_LEVEL BTM_SEC_NONE
1008 /******************************************************************************
1012 ******************************************************************************/
1014 /* The maximum number of ports supported. */
1015 #ifndef MAX_RFC_PORTS
1016 #define MAX_RFC_PORTS 30
1019 /* The maximum simultaneous links to different devices. */
1020 #ifndef MAX_ACL_CONNECTIONS
1021 #define MAX_BD_CONNECTIONS 7
1023 #define MAX_BD_CONNECTIONS MAX_ACL_CONNECTIONS
1026 /* The port receive queue low watermark level, in bytes. */
1027 #ifndef PORT_RX_LOW_WM
1028 #define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
1031 /* The port receive queue high watermark level, in bytes. */
1032 #ifndef PORT_RX_HIGH_WM
1033 #define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
1036 /* The port receive queue critical watermark level, in bytes. */
1037 #ifndef PORT_RX_CRITICAL_WM
1038 #define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
1041 /* The port receive queue low watermark level, in number of buffers. */
1042 #ifndef PORT_RX_BUF_LOW_WM
1043 #define PORT_RX_BUF_LOW_WM 4
1046 /* The port receive queue high watermark level, in number of buffers. */
1047 #ifndef PORT_RX_BUF_HIGH_WM
1048 #define PORT_RX_BUF_HIGH_WM 10
1051 /* The port receive queue critical watermark level, in number of buffers. */
1052 #ifndef PORT_RX_BUF_CRITICAL_WM
1053 #define PORT_RX_BUF_CRITICAL_WM 15
1056 /* The port transmit queue high watermark level, in bytes. */
1057 #ifndef PORT_TX_HIGH_WM
1058 #define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
1061 /* The port transmit queue critical watermark level, in bytes. */
1062 #ifndef PORT_TX_CRITICAL_WM
1063 #define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
1066 /* The port transmit queue high watermark level, in number of buffers. */
1067 #ifndef PORT_TX_BUF_HIGH_WM
1068 #define PORT_TX_BUF_HIGH_WM 10
1071 /* The port transmit queue high watermark level, in number of buffers. */
1072 #ifndef PORT_TX_BUF_CRITICAL_WM
1073 #define PORT_TX_BUF_CRITICAL_WM 15
1076 /* The RFCOMM multiplexer preferred flow control mechanism. */
1077 #ifndef PORT_FC_DEFAULT
1078 #define PORT_FC_DEFAULT PORT_FC_CREDIT
1081 /* The maximum number of credits receiver sends to peer when using credit-based flow control. */
1082 #ifndef PORT_CREDIT_RX_MAX
1083 #define PORT_CREDIT_RX_MAX 16
1086 /* The credit low watermark level. */
1087 #ifndef PORT_CREDIT_RX_LOW
1088 #define PORT_CREDIT_RX_LOW 8
1091 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1092 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_lock() or GKI_disable() */
1093 #ifndef PORT_SCHEDULE_LOCK
1094 #define PORT_SCHEDULE_LOCK GKI_disable()
1097 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1098 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_unlock() or GKI_enable() */
1099 #ifndef PORT_SCHEDULE_UNLOCK
1100 #define PORT_SCHEDULE_UNLOCK GKI_enable()
1103 /******************************************************************************
1107 ******************************************************************************/
1108 #define OBX_14_INCLUDED FALSE
1110 /* The maximum number of registered servers. */
1111 #ifndef OBX_NUM_SERVERS
1112 #define OBX_NUM_SERVERS 12
1115 /* The maximum number of active clients. */
1116 #ifndef OBX_NUM_CLIENTS
1117 #define OBX_NUM_CLIENTS 8
1120 /* This option is application when OBX_14_INCLUDED=TRUE
1121 Pool ID where to reassemble the SDU.
1122 This Pool will allow buffers to be used that are larger than
1123 the L2CAP_MAX_MTU. */
1124 #ifndef OBX_USER_RX_POOL_ID
1125 #define OBX_USER_RX_POOL_ID OBX_LRG_DATA_POOL_ID
1128 /* This option is application when OBX_14_INCLUDED=TRUE
1129 Pool ID where to hold the SDU.
1130 This Pool will allow buffers to be used that are larger than
1131 the L2CAP_MAX_MTU. */
1132 #ifndef OBX_USER_TX_POOL_ID
1133 #define OBX_USER_TX_POOL_ID OBX_LRG_DATA_POOL_ID
1136 /* This option is application when OBX_14_INCLUDED=TRUE
1137 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
1139 #ifndef OBX_FCR_RX_POOL_ID
1140 #define OBX_FCR_RX_POOL_ID HCI_ACL_POOL_ID
1143 /* This option is application when OBX_14_INCLUDED=TRUE
1144 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
1145 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
1146 Note: This pool needs to have enough buffers to hold two times the window size negotiated
1147 in the L2CA_SetFCROptions (2 * tx_win_size) to allow for retransmissions.
1148 The size of each buffer must be able to hold the maximum MPS segment size passed in
1149 L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1151 #ifndef OBX_FCR_TX_POOL_ID
1152 #define OBX_FCR_TX_POOL_ID HCI_ACL_POOL_ID
1155 /* This option is application when OBX_14_INCLUDED=TRUE
1156 Size of the transmission window when using enhanced retransmission mode. Not used
1157 in basic and streaming modes. Range: 1 - 63
1159 #ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR
1160 #define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 20
1163 /* This option is application when OBX_14_INCLUDED=TRUE
1164 Number of transmission attempts for a single I-Frame before taking
1165 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1168 0 - infinite retransmissions
1169 1 - single transmission
1171 #ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT
1172 #define OBX_FCR_OPT_MAX_TX_B4_DISCNT 20
1175 /* This option is application when OBX_14_INCLUDED=TRUE
1176 Retransmission Timeout
1177 Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF.
1179 #ifndef OBX_FCR_OPT_RETX_TOUT
1180 #define OBX_FCR_OPT_RETX_TOUT 2000
1183 /* This option is application when OBX_14_INCLUDED=TRUE
1185 Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
1187 #ifndef OBX_FCR_OPT_MONITOR_TOUT
1188 #define OBX_FCR_OPT_MONITOR_TOUT 12000
1191 /* This option is application when OBX_14_INCLUDED=TRUE
1192 Maximum PDU payload size.
1193 Suggestion: The maximum amount of data that will fit into a 3-DH5 packet.
1196 #ifndef OBX_FCR_OPT_MAX_PDU_SIZE
1197 #define OBX_FCR_OPT_MAX_PDU_SIZE L2CAP_MPS_OVER_BR_EDR
1201 /******************************************************************************
1205 ******************************************************************************/
1207 #ifndef BNEP_INCLUDED
1208 #define BNEP_INCLUDED TRUE
1211 /* BNEP status API call is used mainly to get the L2CAP handle */
1212 #ifndef BNEP_SUPPORTS_STATUS_API
1213 #define BNEP_SUPPORTS_STATUS_API TRUE
1217 ** When BNEP connection changes roles after the connection is established
1218 ** we will do an authentication check again on the new role
1220 #ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
1221 #define BNEP_DO_AUTH_FOR_ROLE_SWITCH TRUE
1225 /* Maximum number of protocol filters supported. */
1226 #ifndef BNEP_MAX_PROT_FILTERS
1227 #define BNEP_MAX_PROT_FILTERS 5
1230 /* Maximum number of multicast filters supported. */
1231 #ifndef BNEP_MAX_MULTI_FILTERS
1232 #define BNEP_MAX_MULTI_FILTERS 5
1235 /* Minimum MTU size. */
1236 #ifndef BNEP_MIN_MTU_SIZE
1237 #define BNEP_MIN_MTU_SIZE L2CAP_MTU_SIZE
1240 /* Preferred MTU size. */
1241 #ifndef BNEP_MTU_SIZE
1242 #define BNEP_MTU_SIZE BNEP_MIN_MTU_SIZE
1245 /* Maximum number of buffers allowed in transmit data queue. */
1246 #ifndef BNEP_MAX_XMITQ_DEPTH
1247 #define BNEP_MAX_XMITQ_DEPTH 20
1250 /* Maximum number BNEP of connections supported. */
1251 #ifndef BNEP_MAX_CONNECTIONS
1252 #define BNEP_MAX_CONNECTIONS 7
1256 /******************************************************************************
1260 ******************************************************************************/
1262 #ifndef AVDT_INCLUDED
1263 #define AVDT_INCLUDED TRUE
1266 /* Include reporting capability in AVDTP */
1267 #ifndef AVDT_REPORTING
1268 #define AVDT_REPORTING TRUE
1271 /* Include multiplexing capability in AVDTP */
1272 #ifndef AVDT_MULTIPLEXING
1273 #define AVDT_MULTIPLEXING TRUE
1276 /* Number of simultaneous links to different peer devices. */
1277 #ifndef AVDT_NUM_LINKS
1278 #define AVDT_NUM_LINKS 2
1281 /* Number of simultaneous stream endpoints. */
1282 #ifndef AVDT_NUM_SEPS
1283 #define AVDT_NUM_SEPS 3
1286 /* Number of transport channels setup per media stream(audio or video) */
1287 #ifndef AVDT_NUM_CHANNELS
1289 #if AVDT_REPORTING == TRUE
1290 /* signaling, media and reporting channels */
1291 #define AVDT_NUM_CHANNELS 3
1293 /* signaling and media channels */
1294 #define AVDT_NUM_CHANNELS 2
1295 #endif // AVDT_REPORTING
1297 #endif // AVDT_NUM_CHANNELS
1299 /* Number of transport channels setup by AVDT for all media streams
1300 * AVDT_NUM_CHANNELS * Number of simultaneous streams.
1302 #ifndef AVDT_NUM_TC_TBL
1303 #define AVDT_NUM_TC_TBL 6
1306 /* Maximum size in bytes of the codec capabilities information element. */
1307 #ifndef AVDT_CODEC_SIZE
1308 #define AVDT_CODEC_SIZE 10
1311 /* Maximum size in bytes of the content protection information element. */
1312 #ifndef AVDT_PROTECT_SIZE
1313 #define AVDT_PROTECT_SIZE 90
1316 /* Maximum number of GKI buffers in the fragment queue (for video frames).
1317 * Must be less than the number of buffers in the buffer pool of size AVDT_DATA_POOL_SIZE */
1318 #ifndef AVDT_MAX_FRAG_COUNT
1319 #define AVDT_MAX_FRAG_COUNT 15
1322 /******************************************************************************
1326 ******************************************************************************/
1328 #ifndef PAN_INCLUDED
1329 #define PAN_INCLUDED TRUE
1332 /* This will enable the PANU role */
1333 #ifndef PAN_SUPPORTS_ROLE_PANU
1334 #define PAN_SUPPORTS_ROLE_PANU TRUE
1337 /* This will enable the GN role */
1338 #ifndef PAN_SUPPORTS_ROLE_GN
1339 #define PAN_SUPPORTS_ROLE_GN TRUE
1342 /* This will enable the NAP role */
1343 #ifndef PAN_SUPPORTS_ROLE_NAP
1344 #define PAN_SUPPORTS_ROLE_NAP TRUE
1347 /* This is just for debugging purposes */
1348 #ifndef PAN_SUPPORTS_DEBUG_DUMP
1349 #define PAN_SUPPORTS_DEBUG_DUMP TRUE
1352 /* Maximum number of PAN connections allowed */
1353 #ifndef MAX_PAN_CONNS
1354 #define MAX_PAN_CONNS 7
1357 /* Default service name for NAP role */
1358 #ifndef PAN_NAP_DEFAULT_SERVICE_NAME
1359 #define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service"
1362 /* Default service name for GN role */
1363 #ifndef PAN_GN_DEFAULT_SERVICE_NAME
1364 #define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service"
1367 /* Default service name for PANU role */
1368 #ifndef PAN_PANU_DEFAULT_SERVICE_NAME
1369 #define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service"
1372 /* Default description for NAP role service */
1373 #ifndef PAN_NAP_DEFAULT_DESCRIPTION
1374 #define PAN_NAP_DEFAULT_DESCRIPTION "NAP"
1377 /* Default description for GN role service */
1378 #ifndef PAN_GN_DEFAULT_DESCRIPTION
1379 #define PAN_GN_DEFAULT_DESCRIPTION "GN"
1382 /* Default description for PANU role service */
1383 #ifndef PAN_PANU_DEFAULT_DESCRIPTION
1384 #define PAN_PANU_DEFAULT_DESCRIPTION "PANU"
1387 /* Default Security level for PANU role. */
1388 #ifndef PAN_PANU_SECURITY_LEVEL
1389 #define PAN_PANU_SECURITY_LEVEL 0
1392 /* Default Security level for GN role. */
1393 #ifndef PAN_GN_SECURITY_LEVEL
1394 #define PAN_GN_SECURITY_LEVEL 0
1397 /* Default Security level for NAP role. */
1398 #ifndef PAN_NAP_SECURITY_LEVEL
1399 #define PAN_NAP_SECURITY_LEVEL 0
1402 /******************************************************************************
1406 ******************************************************************************/
1408 #ifndef GAP_INCLUDED
1409 #define GAP_INCLUDED TRUE
1412 /* This is set to enable use of GAP L2CAP connections. */
1413 #ifndef GAP_CONN_INCLUDED
1414 #define GAP_CONN_INCLUDED TRUE
1417 /* This is set to enable posting event for data write */
1418 #ifndef GAP_CONN_POST_EVT_INCLUDED
1419 #define GAP_CONN_POST_EVT_INCLUDED FALSE
1422 /* The maximum number of simultaneous GAP L2CAP connections. */
1423 #ifndef GAP_MAX_CONNECTIONS
1424 #define GAP_MAX_CONNECTIONS 30
1427 /* keep the raw data received from SDP server in database. */
1428 #ifndef SDP_RAW_DATA_INCLUDED
1429 #define SDP_RAW_DATA_INCLUDED TRUE
1432 /* Inquiry duration in 1.28 second units. */
1434 #define SDP_DEBUG TRUE
1437 /******************************************************************************
1441 ******************************************************************************/
1443 #ifndef HID_DEV_SUBCLASS
1444 #define HID_DEV_SUBCLASS COD_MINOR_POINTING
1447 #ifndef HID_CONTROL_POOL_ID
1448 #define HID_CONTROL_POOL_ID 2
1451 #ifndef HID_INTERRUPT_POOL_ID
1452 #define HID_INTERRUPT_POOL_ID 2
1455 /*************************************************************************
1456 ** Definitions for Both HID-Host & Device
1458 #ifndef HID_MAX_SVC_NAME_LEN
1459 #define HID_MAX_SVC_NAME_LEN 32
1462 #ifndef HID_MAX_SVC_DESCR_LEN
1463 #define HID_MAX_SVC_DESCR_LEN 32
1466 #ifndef HID_MAX_PROV_NAME_LEN
1467 #define HID_MAX_PROV_NAME_LEN 32
1470 /*************************************************************************
1471 ** Definitions for HID-Host
1473 #ifndef HID_HOST_INCLUDED
1474 #define HID_HOST_INCLUDED TRUE
1477 #ifndef HID_HOST_MAX_DEVICES
1478 #define HID_HOST_MAX_DEVICES 7
1481 #ifndef HID_HOST_MTU
1482 #define HID_HOST_MTU 640
1485 #ifndef HID_HOST_FLUSH_TO
1486 #define HID_HOST_FLUSH_TO 0xffff
1489 #ifndef HID_HOST_MAX_CONN_RETRY
1490 #define HID_HOST_MAX_CONN_RETRY (3)
1493 #ifndef HID_HOST_REPAGE_WIN
1494 #define HID_HOST_REPAGE_WIN (2)
1497 /*************************************************************************
1500 #ifndef A2D_INCLUDED
1501 #define A2D_INCLUDED TRUE
1504 /******************************************************************************
1508 ******************************************************************************/
1510 /* Number of simultaneous ACL links to different peer devices. */
1511 #ifndef AVCT_NUM_LINKS
1512 #define AVCT_NUM_LINKS 2
1515 /* Number of simultaneous AVCTP connections. */
1516 #ifndef AVCT_NUM_CONN
1517 #define AVCT_NUM_CONN 3
1520 /******************************************************************************
1524 ******************************************************************************/
1526 #ifndef AVRC_METADATA_INCLUDED
1527 #define AVRC_METADATA_INCLUDED TRUE
1530 #ifndef AVRC_ADV_CTRL_INCLUDED
1531 #define AVRC_ADV_CTRL_INCLUDED TRUE
1534 #ifndef AVRC_CTLR_INCLUDED
1535 #define AVRC_CTLR_INCLUDED TRUE
1538 /******************************************************************************
1542 ******************************************************************************/
1543 #ifndef MCA_INCLUDED
1544 #define MCA_INCLUDED FALSE
1547 /* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */
1548 #ifndef MCA_CTRL_MTU
1549 #define MCA_CTRL_MTU 60
1552 /* The maximum number of registered MCAP instances. */
1553 #ifndef MCA_NUM_REGS
1554 #define MCA_NUM_REGS 12
1557 /* The maximum number of control channels (to difference devices) per registered MCAP instances. */
1558 #ifndef MCA_NUM_LINKS
1559 #define MCA_NUM_LINKS 3
1562 /* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */
1563 #ifndef MCA_NUM_DEPS
1564 #define MCA_NUM_DEPS 13
1567 /* The maximum number of MDL link per control channel. */
1568 #ifndef MCA_NUM_MDLS
1569 #define MCA_NUM_MDLS 4
1572 /* Pool ID where to reassemble the SDU. */
1573 #ifndef MCA_USER_RX_POOL_ID
1574 #define MCA_USER_RX_POOL_ID HCI_ACL_POOL_ID
1577 /* Pool ID where to hold the SDU. */
1578 #ifndef MCA_USER_TX_POOL_ID
1579 #define MCA_USER_TX_POOL_ID HCI_ACL_POOL_ID
1583 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
1585 #ifndef MCA_FCR_RX_POOL_ID
1586 #define MCA_FCR_RX_POOL_ID HCI_ACL_POOL_ID
1590 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
1591 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
1592 Note: This pool needs to have enough buffers to hold two times the window size negotiated
1593 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
1594 The size of each buffer must be able to hold the maximum MPS segment size passed in
1595 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1597 #ifndef MCA_FCR_TX_POOL_ID
1598 #define MCA_FCR_TX_POOL_ID HCI_ACL_POOL_ID
1601 /* MCAP control channel FCR Option:
1602 Size of the transmission window when using enhanced retransmission mode.
1603 1 is defined by HDP specification for control channel.
1605 #ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
1606 #define MCA_FCR_OPT_TX_WINDOW_SIZE 1
1609 /* MCAP control channel FCR Option:
1610 Number of transmission attempts for a single I-Frame before taking
1611 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1614 0 - infinite retransmissions
1615 1 - single transmission
1617 #ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT
1618 #define MCA_FCR_OPT_MAX_TX_B4_DISCNT 20
1621 /* MCAP control channel FCR Option: Retransmission Timeout
1622 The AVRCP specification set a value in the range of 300 - 2000 ms
1623 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
1624 Range: Minimum 2000 (2 secs) when supporting PBF.
1626 #ifndef MCA_FCR_OPT_RETX_TOUT
1627 #define MCA_FCR_OPT_RETX_TOUT 2000
1630 /* MCAP control channel FCR Option: Monitor Timeout
1631 The AVRCP specification set a value in the range of 300 - 2000 ms
1632 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
1633 Range: Minimum 12000 (12 secs) when supporting PBF.
1635 #ifndef MCA_FCR_OPT_MONITOR_TOUT
1636 #define MCA_FCR_OPT_MONITOR_TOUT 12000
1639 /* MCAP control channel FCR Option: Maximum PDU payload size.
1640 The maximum number of payload octets that the local device can receive in a single PDU.
1642 #ifndef MCA_FCR_OPT_MPS_SIZE
1643 #define MCA_FCR_OPT_MPS_SIZE 1000
1646 /* Shared transport */
1647 #ifndef NFC_SHARED_TRANSPORT_ENABLED
1648 #define NFC_SHARED_TRANSPORT_ENABLED FALSE
1651 /******************************************************************************
1653 ** Sleep Mode (Low Power Mode)
1655 ******************************************************************************/
1657 #ifndef HCILP_INCLUDED
1658 #define HCILP_INCLUDED TRUE
1661 /******************************************************************************
1663 ** APPL - Application Task
1665 ******************************************************************************/
1667 #define L2CAP_FEATURE_REQ_ID 73
1668 #define L2CAP_FEATURE_RSP_ID 173
1670 /******************************************************************************
1674 ******************************************************************************/
1675 /* BTA EIR canned UUID list (default is dynamic) */
1676 #ifndef BTA_EIR_CANNED_UUID_LIST
1677 #define BTA_EIR_CANNED_UUID_LIST FALSE
1680 /* Number of supported customer UUID in EIR */
1681 #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
1682 #define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8
1685 /* CHLD override for bluedroid */
1686 #ifndef BTA_AG_CHLD_VAL_ECC
1687 #define BTA_AG_CHLD_VAL_ECC "(0,1,1x,2,2x,3)"
1690 #ifndef BTA_AG_CHLD_VAL
1691 #define BTA_AG_CHLD_VAL "(0,1,2,3)"
1694 /* Set the CIND to match HFP 1.5 */
1695 #ifndef BTA_AG_CIND_INFO
1696 #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))"
1699 #ifndef BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY
1700 #define BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY TRUE
1703 /******************************************************************************
1705 ** Tracing: Include trace header file here.
1707 ******************************************************************************/
1709 /* Enable/disable BTSnoop memory logging */
1711 #define BTSNOOP_MEM TRUE
1714 #include "bt_trace.h"
1716 #endif /* BT_TARGET_H */