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 "dyn_mem.h" /* defines static and/or dynamic memory for components */
40 //------------------Added from bdroid_buildcfg.h---------------------
41 #ifndef L2CAP_EXTFEA_SUPPORTED_MASK
42 #define L2CAP_EXTFEA_SUPPORTED_MASK (L2CAP_EXTFEA_ENH_RETRANS | L2CAP_EXTFEA_STREAM_MODE | L2CAP_EXTFEA_NO_CRC | L2CAP_EXTFEA_FIXED_CHNLS)
45 #ifndef BTUI_OPS_FORMATS
46 #define BTUI_OPS_FORMATS (BTA_OP_VCARD21_MASK | BTA_OP_ANY_MASK)
49 #ifndef BTA_RFC_MTU_SIZE
50 #define BTA_RFC_MTU_SIZE (L2CAP_MTU_SIZE-L2CAP_MIN_OFFSET-RFCOMM_DATA_OVERHEAD)
53 #ifndef SBC_NO_PCM_CPY_OPTION
54 #define SBC_NO_PCM_CPY_OPTION FALSE
58 #define BTA_INCLUDED TRUE
61 #ifndef BTA_PAN_INCLUDED
62 #define BTA_PAN_INCLUDED TRUE
65 #ifndef BTA_HH_INCLUDED
66 #define BTA_HH_INCLUDED TRUE
70 #define BTA_HH_ROLE BTA_MASTER_ROLE_PREF
73 #ifndef BTA_HH_LE_INCLUDED
74 #define BTA_HH_LE_INCLUDED TRUE
77 #ifndef BTA_AR_INCLUDED
78 #define BTA_AR_INCLUDED TRUE
81 #ifndef BTA_AV_INCLUDED
82 #define BTA_AV_INCLUDED TRUE
85 #ifndef BTA_GATT_INCLUDED
86 #define BTA_GATT_INCLUDED TRUE
89 #ifndef BTA_AV_SINK_INCLUDED
90 #define BTA_AV_SINK_INCLUDED FALSE
93 #ifndef BTA_DISABLE_DELAY
94 #define BTA_DISABLE_DELAY 200 /* in milliseconds */
97 #ifndef SBC_FOR_EMBEDDED_LINUX
98 #define SBC_FOR_EMBEDDED_LINUX TRUE
102 #define AVDT_VERSION 0x0102
105 #ifndef BTA_AG_AT_MAX_LEN
106 #define BTA_AG_AT_MAX_LEN 512
109 #ifndef BTA_AVRCP_FF_RW_SUPPORT
110 #define BTA_AVRCP_FF_RW_SUPPORT TRUE
113 #ifndef BTA_AG_SCO_PKT_TYPES
114 #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)
117 #ifndef BTA_AV_RET_TOUT
118 #define BTA_AV_RET_TOUT 15
121 #ifndef PORCHE_PAIRING_CONFLICT
122 #define PORCHE_PAIRING_CONFLICT TRUE
125 #ifndef BTA_AV_CO_CP_SCMS_T
126 #define BTA_AV_CO_CP_SCMS_T FALSE
129 /* This feature is used to eanble interleaved scan*/
130 #ifndef BTA_HOST_INTERLEAVE_SEARCH
131 #define BTA_HOST_INTERLEAVE_SEARCH FALSE
134 #ifndef BT_USE_TRACES
135 #define BT_USE_TRACES TRUE
138 #ifndef BT_TRACE_VERBOSE
139 #define BT_TRACE_VERBOSE FALSE
142 #ifndef BTA_DM_SDP_DB_SIZE
143 #define BTA_DM_SDP_DB_SIZE 8000
147 #define HL_INCLUDED TRUE
150 #ifndef AG_VOICE_SETTINGS
151 #define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS
154 #ifndef BTIF_DM_OOB_TEST
155 #define BTIF_DM_OOB_TEST TRUE
158 // How long to wait before activating sniff mode after entering the
159 // idle state for FTS, OPS connections
160 #ifndef BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS
161 #define BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 7000
164 //------------------End added from bdroid_buildcfg.h---------------------
167 /******************************************************************************
171 ******************************************************************************/
173 #ifndef BT_DEFAULT_BUFFER_SIZE
174 #define BT_DEFAULT_BUFFER_SIZE (4096 + 16)
177 #ifndef BT_SMALL_BUFFER_SIZE
178 #define BT_SMALL_BUFFER_SIZE 660
181 /* Receives HCI events from the lower-layer. */
182 #ifndef HCI_CMD_BUF_SIZE
183 #define HCI_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
186 /* Sends SDP data packets. */
187 #ifndef SDP_DATA_BUF_SIZE
188 #define SDP_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
191 /* Sends RFCOMM command packets. */
192 #ifndef RFCOMM_CMD_BUF_SIZE
193 #define RFCOMM_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
196 /* Sends RFCOMM data packets. */
197 #ifndef RFCOMM_DATA_BUF_SIZE
198 #define RFCOMM_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
201 /* Sends L2CAP packets to the peer and HCI messages to the controller. */
202 #ifndef L2CAP_CMD_BUF_SIZE
203 #define L2CAP_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
206 #ifndef L2CAP_USER_TX_BUF_SIZE
207 #define L2CAP_USER_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
210 #ifndef L2CAP_USER_RX_BUF_SIZE
211 #define L2CAP_USER_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
214 /* Sends L2CAP segmented packets in ERTM mode */
215 #ifndef L2CAP_FCR_TX_BUF_SIZE
216 #define L2CAP_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
219 /* Receives L2CAP segmented packets in ERTM mode */
220 #ifndef L2CAP_FCR_RX_BUF_SIZE
221 #define L2CAP_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
224 #ifndef L2CAP_FCR_ERTM_BUF_SIZE
225 #define L2CAP_FCR_ERTM_BUF_SIZE (10240 + 24)
228 /* Number of ACL buffers to assign to LE */
230 * TODO: Do we need this?
231 * It was used when the HCI buffers were shared with BR/EDR.
233 #ifndef L2C_DEF_NUM_BLE_BUF_SHARED
234 #define L2C_DEF_NUM_BLE_BUF_SHARED 1
237 /* Used by BTM when it sends HCI commands to the controller. */
238 #ifndef BTM_CMD_BUF_SIZE
239 #define BTM_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
242 #ifndef OBX_LRG_DATA_BUF_SIZE
243 #define OBX_LRG_DATA_BUF_SIZE (8080 + 26)
246 /* Used to send data to L2CAP. */
247 #ifndef GAP_DATA_BUF_SIZE
248 #define GAP_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
252 #define SPP_DB_SIZE BT_DEFAULT_BUFFER_SIZE
255 /* BNEP data and protocol messages. */
256 #ifndef BNEP_BUF_SIZE
257 #define BNEP_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
260 /* AVDTP buffer size for protocol messages */
261 #ifndef AVDT_CMD_BUF_SIZE
262 #define AVDT_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
265 /* AVDTP buffer size for media packets in case of fragmentation */
266 #ifndef AVDT_DATA_BUF_SIZE
267 #define AVDT_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
271 #define PAN_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
274 /* Maximum number of buffers to allocate for PAN */
276 #define PAN_BUF_MAX 100
279 /* AVCTP buffer size for protocol messages */
280 #ifndef AVCT_CMD_BUF_SIZE
281 #define AVCT_CMD_BUF_SIZE 288
284 /* AVRCP buffer size for protocol messages */
285 #ifndef AVRC_CMD_BUF_SIZE
286 #define AVRC_CMD_BUF_SIZE 288
289 /* AVRCP Metadata buffer size for protocol messages */
290 #ifndef AVRC_META_CMD_BUF_SIZE
291 #define AVRC_META_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
294 /* AVRCP buffer size for browsing channel messages */
295 #ifndef AVRC_BROWSE_BUF_SIZE
296 #define AVRC_BROWSE_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
299 #ifndef BTA_HL_USER_TX_BUF_SIZE
300 #define BTA_HL_USER_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
303 #ifndef BTA_HL_LRG_DATA_BUF_SIZE
304 #define BTA_HL_LRG_DATA_BUF_SIZE (10240 + 24)
307 /* GATT Server Database buffer size */
308 #ifndef GATT_DB_BUF_SIZE
309 #define GATT_DB_BUF_SIZE 128
312 /* GATT Data sending buffer size */
313 #ifndef GATT_DATA_BUF_SIZE
314 #define GATT_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
317 /******************************************************************************
319 ** Lower Layer Interface
321 ******************************************************************************/
323 /* Macro for allocating buffer for HCI commands */
324 #ifndef HCI_GET_CMD_BUF
325 #if (!defined(HCI_USE_VARIABLE_SIZE_CMD_BUF) || (HCI_USE_VARIABLE_SIZE_CMD_BUF == FALSE))
326 /* Allocate fixed-size HCI_CMD buffer (default case) */
327 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)osi_getbuf (HCI_CMD_BUF_SIZE))
329 /* Allocate smallest possible buffer (for platforms with limited RAM) */
330 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)osi_getbuf ((UINT16)(BT_HDR_SIZE + HCIC_PREAMBLE_SIZE + (paramlen))))
332 #endif /* HCI_GET_CMD_BUF */
334 /******************************************************************************
338 ******************************************************************************/
340 /* Use 2 second for low-resolution systems, override to 1 for high-resolution systems */
341 #ifndef BT_1SEC_TIMEOUT
342 #define BT_1SEC_TIMEOUT (2)
346 /* if L2CAP_FCR_INCLUDED is TRUE then it should have 100 millisecond resolution */
347 /* if none of them is included then QUICK_TIMER_TICKS_PER_SEC is set to 0 to exclude quick timer */
348 #ifndef QUICK_TIMER_TICKS_PER_SEC
349 #define QUICK_TIMER_TICKS_PER_SEC 10 /* 100ms timer */
352 /******************************************************************************
356 ******************************************************************************/
358 /* Cancel Inquiry on incoming SSP */
359 #ifndef BTM_NO_SSP_ON_INQUIRY
360 #define BTM_NO_SSP_ON_INQUIRY FALSE
363 /* Includes SCO if TRUE */
364 #ifndef BTM_SCO_INCLUDED
365 #define BTM_SCO_INCLUDED TRUE /* TRUE includes SCO code */
368 /* Includes SCO if TRUE */
369 #ifndef BTM_SCO_HCI_INCLUDED
370 #define BTM_SCO_HCI_INCLUDED FALSE /* TRUE includes SCO over HCI code */
373 /* Includes WBS if TRUE */
374 #ifndef BTM_WBS_INCLUDED
375 #define BTM_WBS_INCLUDED FALSE /* TRUE includes WBS code */
378 /* This is used to work around a controller bug that doesn't like Disconnect
379 ** issued while there is a role switch in progress
381 #ifndef BTM_DISC_DURING_RS
382 #define BTM_DISC_DURING_RS TRUE
385 /**************************
386 ** Initial SCO TX credit
387 *************************/
388 /* max TX SCO data packet size */
389 #ifndef BTM_SCO_DATA_SIZE_MAX
390 #define BTM_SCO_DATA_SIZE_MAX 240
393 /* The size in bytes of the BTM inquiry database. */
394 #ifndef BTM_INQ_DB_SIZE
395 #define BTM_INQ_DB_SIZE 40
398 /* The default scan mode */
399 #ifndef BTM_DEFAULT_SCAN_TYPE
400 #define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED
403 /* Should connections to unknown devices be allowed when not discoverable? */
404 #ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
405 #define BTM_ALLOW_CONN_IF_NONDISCOVER TRUE
408 /* Sets the Page_Scan_Window: the length of time that the device is performing a page scan. */
409 #ifndef BTM_DEFAULT_CONN_WINDOW
410 #define BTM_DEFAULT_CONN_WINDOW 0x0012
413 /* Sets the Page_Scan_Activity: the interval between the start of two consecutive page scans. */
414 #ifndef BTM_DEFAULT_CONN_INTERVAL
415 #define BTM_DEFAULT_CONN_INTERVAL 0x0800
418 /* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
419 #ifndef BTM_DEFAULT_DISC_WINDOW
420 #define BTM_DEFAULT_DISC_WINDOW 0x0012
423 /* When automatic inquiry scan is enabled, this sets the inquiry scan interval. */
424 #ifndef BTM_DEFAULT_DISC_INTERVAL
425 #define BTM_DEFAULT_DISC_INTERVAL 0x0800
428 /* Default class of device
429 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
431 * SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
432 * MAJOR_CLASS:0x02 - PHONE
433 * MINOR_CLASS:0x0C - SMART_PHONE
437 #define BTA_DM_COD {0x5A, 0x02, 0x0C}
440 /* The number of SCO links. */
441 #ifndef BTM_MAX_SCO_LINKS
442 #define BTM_MAX_SCO_LINKS 3
445 /* The preferred type of SCO links (2-eSCO, 0-SCO). */
446 #ifndef BTM_DEFAULT_SCO_MODE
447 #define BTM_DEFAULT_SCO_MODE 2
450 /* The number of security records for peer devices. */
451 #ifndef BTM_SEC_MAX_DEVICE_RECORDS
452 #define BTM_SEC_MAX_DEVICE_RECORDS 100
455 /* The number of security records for services. */
456 #ifndef BTM_SEC_MAX_SERVICE_RECORDS
457 #define BTM_SEC_MAX_SERVICE_RECORDS 32
460 /* If True, force a retrieval of remote device name for each bond in case it's changed */
461 #ifndef BTM_SEC_FORCE_RNR_FOR_DBOND
462 #define BTM_SEC_FORCE_RNR_FOR_DBOND FALSE
465 /* Maximum device name length used in btm database. */
466 #ifndef BTM_MAX_REM_BD_NAME_LEN
467 #define BTM_MAX_REM_BD_NAME_LEN 248
470 /* Maximum local device name length stored btm database.
471 '0' disables storage of the local name in BTM */
472 #ifndef BTM_MAX_LOC_BD_NAME_LEN
473 #define BTM_MAX_LOC_BD_NAME_LEN 248
476 /* Fixed Default String. When this is defined as null string, the device's
477 * product model name is used as the default local name.
479 #ifndef BTM_DEF_LOCAL_NAME
480 #define BTM_DEF_LOCAL_NAME ""
483 /* Maximum service name stored with security authorization (0 if not needed) */
484 #ifndef BTM_SEC_SERVICE_NAME_LEN
485 #define BTM_SEC_SERVICE_NAME_LEN BT_MAX_SERVICE_NAME_LEN
488 /* Maximum length of the service name. */
489 #ifndef BT_MAX_SERVICE_NAME_LEN
490 #define BT_MAX_SERVICE_NAME_LEN 21
493 /* ACL buffer size in HCI Host Buffer Size command. */
494 #ifndef BTM_ACL_BUF_SIZE
495 #define BTM_ACL_BUF_SIZE 0
498 /* The maximum number of clients that can register with the power manager. */
499 #ifndef BTM_MAX_PM_RECORDS
500 #define BTM_MAX_PM_RECORDS 2
503 /* This is set to show debug trace messages for the power manager. */
505 #define BTM_PM_DEBUG FALSE
508 /* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */
509 #ifndef BTM_SCO_WAKE_PARKED_LINK
510 #define BTM_SCO_WAKE_PARKED_LINK TRUE
513 /* If the user does not respond to security process requests within this many seconds,
514 * a negative response would be sent automatically.
515 * 30 is LMP response timeout value */
516 #ifndef BTM_SEC_TIMEOUT_VALUE
517 #define BTM_SEC_TIMEOUT_VALUE 35
520 /* Maximum number of callbacks that can be registered using BTM_RegisterForVSEvents */
521 #ifndef BTM_MAX_VSE_CALLBACKS
522 #define BTM_MAX_VSE_CALLBACKS 3
525 /******************************************
527 *******************************************/
528 /* This is set to TRUE if the FEC is required for EIR packet. */
529 #ifndef BTM_EIR_DEFAULT_FEC_REQUIRED
530 #define BTM_EIR_DEFAULT_FEC_REQUIRED TRUE
533 /* The IO capability of the local device (for Simple Pairing) */
534 #ifndef BTM_LOCAL_IO_CAPS
535 #define BTM_LOCAL_IO_CAPS BTM_IO_CAP_IO
538 #ifndef BTM_LOCAL_IO_CAPS_BLE
539 #define BTM_LOCAL_IO_CAPS_BLE BTM_IO_CAP_KBDISP
542 /* The default MITM Protection Requirement (for Simple Pairing)
543 * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
544 #ifndef BTM_DEFAULT_AUTH_REQ
545 #define BTM_DEFAULT_AUTH_REQ BTM_AUTH_SP_NO
548 /* The default MITM Protection Requirement for dedicated bonding using Simple Pairing
549 * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
550 #ifndef BTM_DEFAULT_DD_AUTH_REQ
551 #define BTM_DEFAULT_DD_AUTH_REQ BTM_AUTH_AP_YES
554 /* Include Out-of-Band implementation for Simple Pairing */
555 #ifndef BTM_OOB_INCLUDED
556 #define BTM_OOB_INCLUDED TRUE
559 /* TRUE to include Sniff Subrating */
560 #ifndef BTM_SSR_INCLUDED
561 #define BTM_SSR_INCLUDED TRUE
564 /*************************
565 ** End of Lisbon Features
566 **************************/
568 /* 4.1/4.2 secure connections feature */
569 #ifndef SC_MODE_INCLUDED
570 #define SC_MODE_INCLUDED TRUE
573 /* Used for conformance testing ONLY */
574 #ifndef BTM_BLE_CONFORMANCE_TESTING
575 #define BTM_BLE_CONFORMANCE_TESTING FALSE
578 /******************************************************************************
582 ******************************************************************************/
584 /* The maximum number of simultaneous links that L2CAP can support. */
585 #ifndef MAX_ACL_CONNECTIONS
586 #define MAX_L2CAP_LINKS 7
588 #define MAX_L2CAP_LINKS MAX_ACL_CONNECTIONS
591 /* The maximum number of simultaneous channels that L2CAP can support. */
592 #ifndef MAX_L2CAP_CHANNELS
593 #define MAX_L2CAP_CHANNELS 16
596 /* The maximum number of simultaneous applications that can register with L2CAP. */
597 #ifndef MAX_L2CAP_CLIENTS
598 #define MAX_L2CAP_CLIENTS 15
601 /* The number of seconds of link inactivity before a link is disconnected. */
602 #ifndef L2CAP_LINK_INACTIVITY_TOUT
603 #define L2CAP_LINK_INACTIVITY_TOUT 4
606 /* The number of seconds of link inactivity after bonding before a link is disconnected. */
607 #ifndef L2CAP_BONDING_TIMEOUT
608 #define L2CAP_BONDING_TIMEOUT 3
611 /* The time from the HCI connection complete to disconnect if no channel is established. */
612 #ifndef L2CAP_LINK_STARTUP_TOUT
613 #define L2CAP_LINK_STARTUP_TOUT 60
616 /* The L2CAP MTU; must be in accord with the HCI ACL buffer size. */
617 #ifndef L2CAP_MTU_SIZE
618 #define L2CAP_MTU_SIZE 1691
622 * The L2CAP MPS over Bluetooth; must be in accord with the FCR tx buffer size
623 * and ACL down buffer size.
625 #ifndef L2CAP_MPS_OVER_BR_EDR
626 #define L2CAP_MPS_OVER_BR_EDR 1010
629 /* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */
630 #ifndef L2CAP_HOST_FC_ACL_BUFS
631 #define L2CAP_HOST_FC_ACL_BUFS 20
634 /* This is set to enable L2CAP to take the ACL link out of park mode when ACL data is to be sent. */
635 #ifndef L2CAP_WAKE_PARKED_LINK
636 #define L2CAP_WAKE_PARKED_LINK TRUE
639 /* Whether link wants to be the master or the slave. */
640 #ifndef L2CAP_DESIRED_LINK_ROLE
641 #define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_SLAVE
644 /* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
645 #ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
646 #define L2CAP_NON_FLUSHABLE_PB_INCLUDED TRUE
649 /* Minimum number of ACL credit for high priority link */
650 #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
651 #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5
654 /* used for monitoring HCI ACL credit management */
655 #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
656 #define L2CAP_HCI_FLOW_CONTROL_DEBUG TRUE
659 /* Unicast Connectionless Data */
660 #ifndef L2CAP_UCD_INCLUDED
661 #define L2CAP_UCD_INCLUDED FALSE
664 /* Unicast Connectionless Data MTU */
665 #ifndef L2CAP_UCD_MTU
666 #define L2CAP_UCD_MTU L2CAP_MTU_SIZE
669 /* Unicast Connectionless Data Idle Timeout */
670 #ifndef L2CAP_UCD_IDLE_TIMEOUT
671 #define L2CAP_UCD_IDLE_TIMEOUT 2
674 /* Unicast Connectionless Data Idle Timeout */
675 #ifndef L2CAP_UCD_CH_PRIORITY
676 #define L2CAP_UCD_CH_PRIORITY L2CAP_CHNL_PRIORITY_MEDIUM
679 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
680 /* Excluding L2CAP signaling channel and UCD */
681 #ifndef L2CAP_NUM_FIXED_CHNLS
682 #define L2CAP_NUM_FIXED_CHNLS 32
685 /* First fixed channel supported */
686 #ifndef L2CAP_FIRST_FIXED_CHNL
687 #define L2CAP_FIRST_FIXED_CHNL 4
690 #ifndef L2CAP_LAST_FIXED_CHNL
691 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
694 /* Round Robin service channels in link */
695 #ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
696 #define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE TRUE
699 /* used for monitoring eL2CAP data flow */
700 #ifndef L2CAP_ERTM_STATS
701 #define L2CAP_ERTM_STATS FALSE
704 /* Used for conformance testing ONLY: When TRUE lets scriptwrapper overwrite info response */
705 #ifndef L2CAP_CONFORMANCE_TESTING
706 #define L2CAP_CONFORMANCE_TESTING FALSE
710 * Max bytes per connection to buffer locally before dropping the
711 * connection if local client does not receive it - default is 1MB
713 #ifndef L2CAP_MAX_RX_BUFFER
714 #define L2CAP_MAX_RX_BUFFER 0x100000
718 /******************************************************************************
722 ******************************************************************************/
725 #define BLE_INCLUDED TRUE
728 #ifndef BLE_ANDROID_CONTROLLER_SCAN_FILTER
729 #define BLE_ANDROID_CONTROLLER_SCAN_FILTER TRUE
732 #ifndef LOCAL_BLE_CONTROLLER_ID
733 #define LOCAL_BLE_CONTROLLER_ID (1)
737 * Toggles support for general LE privacy features such as remote address
738 * resolution, local address rotation etc.
740 #ifndef BLE_PRIVACY_SPT
741 #define BLE_PRIVACY_SPT TRUE
745 * Enables or disables support for local privacy (ex. address rotation)
747 #ifndef BLE_LOCAL_PRIVACY_ENABLED
748 #define BLE_LOCAL_PRIVACY_ENABLED TRUE
752 * Toggles support for vendor specific extensions such as RPA offloading,
753 * feature discovery, multi-adv etc.
755 #ifndef BLE_VND_INCLUDED
756 #define BLE_VND_INCLUDED FALSE
759 #ifndef BTM_BLE_ADV_TX_POWER
760 #define BTM_BLE_ADV_TX_POWER {-21, -15, -7, 1, 9}
764 #ifndef BLE_BATCH_SCAN_INCLUDED
765 #define BLE_BATCH_SCAN_INCLUDED TRUE
768 /******************************************************************************
770 ** ATT/GATT Protocol/Profile Settings
772 ******************************************************************************/
773 #ifndef BTA_GATT_INCLUDED
774 #if BLE_INCLUDED == TRUE
775 #define BTA_GATT_INCLUDED TRUE
777 #define BTA_GATT_INCLUDED FALSE
781 #if BTA_GATT_INCLUDED == TRUE && BLE_INCLUDED == FALSE
782 #error "can't have GATT without BLE"
785 #ifndef BLE_LLT_INCLUDED
786 #define BLE_LLT_INCLUDED TRUE
790 #define ATT_INCLUDED TRUE
794 #define ATT_DEBUG TRUE
797 #ifndef BLE_PERIPHERAL_MODE_SUPPORT
798 #define BLE_PERIPHERAL_MODE_SUPPORT TRUE
801 #ifndef BLE_DELAY_REQUEST_ENC
802 /* This flag is to work around IPHONE problem, We need to wait for iPhone ready
803 before send encryption request to iPhone */
804 #define BLE_DELAY_REQUEST_ENC FALSE
807 #ifndef GAP_TRANSPORT_SUPPORTED
808 #define GAP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
811 #ifndef GATTP_TRANSPORT_SUPPORTED
812 #define GATTP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
815 #ifndef GATT_MAX_SR_PROFILES
816 #define GATT_MAX_SR_PROFILES 32 /* max is 32 */
819 #ifndef GATT_MAX_APPS
820 #define GATT_MAX_APPS 32 /* note: 2 apps used internally GATT and GAP */
823 #ifndef GATT_MAX_PHY_CHANNEL
824 #define GATT_MAX_PHY_CHANNEL 7
827 /* Used for conformance testing ONLY */
828 #ifndef GATT_CONFORMANCE_TESTING
829 #define GATT_CONFORMANCE_TESTING FALSE
832 /* number of background connection device allowence, ideally to be the same as WL size
834 #ifndef GATT_MAX_BG_CONN_DEV
835 #define GATT_MAX_BG_CONN_DEV 32
838 /******************************************************************************
842 ******************************************************************************/
844 #if BLE_INCLUDED == TRUE
845 #define SMP_INCLUDED TRUE
847 #define SMP_INCLUDED FALSE
851 #if SMP_INCLUDED == TRUE && BLE_INCLUDED == FALSE
852 #error "can't have SMP without BLE"
856 #define SMP_DEBUG FALSE
859 #ifndef SMP_DEFAULT_AUTH_REQ
860 #define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY
863 #ifndef SMP_MAX_ENC_KEY_SIZE
864 #define SMP_MAX_ENC_KEY_SIZE 16
867 #ifndef SMP_MIN_ENC_KEY_SIZE
868 #define SMP_MIN_ENC_KEY_SIZE 7
871 /* minimum link timeout after SMP pairing is done, leave room for key exchange
872 and racing condition for the following service connection.
873 Prefer greater than 0 second, and no less than default inactivity link idle
874 timer(L2CAP_LINK_INACTIVITY_TOUT) in l2cap) */
875 #ifndef SMP_LINK_TOUT_MIN
876 #if (L2CAP_LINK_INACTIVITY_TOUT > 0)
877 #define SMP_LINK_TOUT_MIN L2CAP_LINK_INACTIVITY_TOUT
879 #define SMP_LINK_TOUT_MIN 2
882 /******************************************************************************
886 ******************************************************************************/
888 /* This is set to enable SDP server functionality. */
889 #ifndef SDP_SERVER_ENABLED
890 #define SDP_SERVER_ENABLED TRUE
893 /* The maximum number of SDP records the server can support. */
894 #ifndef SDP_MAX_RECORDS
895 #define SDP_MAX_RECORDS 30
898 /* The maximum number of attributes in each record. */
899 #ifndef SDP_MAX_REC_ATTR
900 #define SDP_MAX_REC_ATTR 25
903 #ifndef SDP_MAX_PAD_LEN
904 #define SDP_MAX_PAD_LEN 600
907 /* The maximum length, in bytes, of an attribute. */
908 #ifndef SDP_MAX_ATTR_LEN
909 #define SDP_MAX_ATTR_LEN 400
912 /* The maximum number of attribute filters supported by SDP databases. */
913 #ifndef SDP_MAX_ATTR_FILTERS
914 #define SDP_MAX_ATTR_FILTERS 15
917 /* The maximum number of UUID filters supported by SDP databases. */
918 #ifndef SDP_MAX_UUID_FILTERS
919 #define SDP_MAX_UUID_FILTERS 3
922 /* This is set to enable SDP client functionality. */
923 #ifndef SDP_CLIENT_ENABLED
924 #define SDP_CLIENT_ENABLED TRUE
927 /* The maximum number of record handles retrieved in a search. */
928 #ifndef SDP_MAX_DISC_SERVER_RECS
929 #define SDP_MAX_DISC_SERVER_RECS 21
932 /* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */
933 #ifndef SDP_MAX_LIST_BYTE_COUNT
934 #define SDP_MAX_LIST_BYTE_COUNT 4096
937 /* The maximum number of parameters in an SDP protocol element. */
938 #ifndef SDP_MAX_PROTOCOL_PARAMS
939 #define SDP_MAX_PROTOCOL_PARAMS 2
942 /* The maximum number of simultaneous client and server connections. */
943 #ifndef SDP_MAX_CONNECTIONS
944 #define SDP_MAX_CONNECTIONS 4
947 /* The MTU size for the L2CAP configuration. */
949 #define SDP_MTU_SIZE 672
952 /* The flush timeout for the L2CAP configuration. */
954 #define SDP_FLUSH_TO 0xFFFF
957 /* The name for security authorization. */
958 #ifndef SDP_SERVICE_NAME
959 #define SDP_SERVICE_NAME "Service Discovery"
962 /* The security level for BTM. */
963 #ifndef SDP_SECURITY_LEVEL
964 #define SDP_SECURITY_LEVEL BTM_SEC_NONE
967 /******************************************************************************
971 ******************************************************************************/
973 /* The maximum number of ports supported. */
974 #ifndef MAX_RFC_PORTS
975 #define MAX_RFC_PORTS 30
978 /* The maximum simultaneous links to different devices. */
979 #ifndef MAX_ACL_CONNECTIONS
980 #define MAX_BD_CONNECTIONS 7
982 #define MAX_BD_CONNECTIONS MAX_ACL_CONNECTIONS
985 /* The port receive queue low watermark level, in bytes. */
986 #ifndef PORT_RX_LOW_WM
987 #define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
990 /* The port receive queue high watermark level, in bytes. */
991 #ifndef PORT_RX_HIGH_WM
992 #define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
995 /* The port receive queue critical watermark level, in bytes. */
996 #ifndef PORT_RX_CRITICAL_WM
997 #define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
1000 /* The port receive queue low watermark level, in number of buffers. */
1001 #ifndef PORT_RX_BUF_LOW_WM
1002 #define PORT_RX_BUF_LOW_WM 4
1005 /* The port receive queue high watermark level, in number of buffers. */
1006 #ifndef PORT_RX_BUF_HIGH_WM
1007 #define PORT_RX_BUF_HIGH_WM 10
1010 /* The port receive queue critical watermark level, in number of buffers. */
1011 #ifndef PORT_RX_BUF_CRITICAL_WM
1012 #define PORT_RX_BUF_CRITICAL_WM 15
1015 /* The port transmit queue high watermark level, in bytes. */
1016 #ifndef PORT_TX_HIGH_WM
1017 #define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
1020 /* The port transmit queue critical watermark level, in bytes. */
1021 #ifndef PORT_TX_CRITICAL_WM
1022 #define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
1025 /* The port transmit queue high watermark level, in number of buffers. */
1026 #ifndef PORT_TX_BUF_HIGH_WM
1027 #define PORT_TX_BUF_HIGH_WM 10
1030 /* The port transmit queue high watermark level, in number of buffers. */
1031 #ifndef PORT_TX_BUF_CRITICAL_WM
1032 #define PORT_TX_BUF_CRITICAL_WM 15
1035 /* The RFCOMM multiplexer preferred flow control mechanism. */
1036 #ifndef PORT_FC_DEFAULT
1037 #define PORT_FC_DEFAULT PORT_FC_CREDIT
1040 /* The maximum number of credits receiver sends to peer when using credit-based flow control. */
1041 #ifndef PORT_CREDIT_RX_MAX
1042 #define PORT_CREDIT_RX_MAX 16
1045 /* The credit low watermark level. */
1046 #ifndef PORT_CREDIT_RX_LOW
1047 #define PORT_CREDIT_RX_LOW 8
1050 /******************************************************************************
1054 ******************************************************************************/
1056 /* The maximum number of registered servers. */
1057 #ifndef OBX_NUM_SERVERS
1058 #define OBX_NUM_SERVERS 12
1061 /* The maximum number of active clients. */
1062 #ifndef OBX_NUM_CLIENTS
1063 #define OBX_NUM_CLIENTS 8
1067 * Buffer size to reassemble the SDU.
1068 * It will allow buffers to be used that are larger than the L2CAP_MAX_MTU.
1070 #ifndef OBX_USER_RX_BUF_SIZE
1071 #define OBX_USER_RX_BUF_SIZE OBX_LRG_DATA_BUF_SIZE
1075 * Buffer size to hold the SDU.
1076 * It will allow buffers to be used that are larger than the L2CAP_MAX_MTU.
1078 #ifndef OBX_USER_TX_BUF_SIZE
1079 #define OBX_USER_TX_BUF_SIZE OBX_LRG_DATA_BUF_SIZE
1082 /* Buffer size used to hold MPS segments during SDU reassembly. */
1083 #ifndef OBX_FCR_RX_BUF_SIZE
1084 #define OBX_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1088 * Buffer size used to hold MPS segments used in (re)transmissions.
1089 * The size of each buffer must be able to hold the maximum MPS segment size
1090 * passed in L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) +
1091 * L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1093 #ifndef OBX_FCR_TX_BUF_SIZE
1094 #define OBX_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1098 * Size of the transmission window when using enhanced retransmission mode.
1099 * Not used in basic and streaming modes. Range: 1 - 63
1101 #ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR
1102 #define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 20
1106 * Number of transmission attempts for a single I-Frame before taking
1107 * Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1110 * 0 - infinite retransmissions
1111 * 1 - single transmission
1113 #ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT
1114 #define OBX_FCR_OPT_MAX_TX_B4_DISCNT 20
1118 * Retransmission Timeout
1119 * Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF.
1121 #ifndef OBX_FCR_OPT_RETX_TOUT
1122 #define OBX_FCR_OPT_RETX_TOUT 2000
1127 * Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
1129 #ifndef OBX_FCR_OPT_MONITOR_TOUT
1130 #define OBX_FCR_OPT_MONITOR_TOUT 12000
1134 * Maximum PDU payload size.
1135 * Suggestion: The maximum amount of data that will fit into a 3-DH5 packet.
1138 #ifndef OBX_FCR_OPT_MAX_PDU_SIZE
1139 #define OBX_FCR_OPT_MAX_PDU_SIZE L2CAP_MPS_OVER_BR_EDR
1143 /******************************************************************************
1147 ******************************************************************************/
1149 #ifndef BNEP_INCLUDED
1150 #define BNEP_INCLUDED TRUE
1153 /* BNEP status API call is used mainly to get the L2CAP handle */
1154 #ifndef BNEP_SUPPORTS_STATUS_API
1155 #define BNEP_SUPPORTS_STATUS_API TRUE
1159 ** When BNEP connection changes roles after the connection is established
1160 ** we will do an authentication check again on the new role
1162 #ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
1163 #define BNEP_DO_AUTH_FOR_ROLE_SWITCH TRUE
1167 /* Maximum number of protocol filters supported. */
1168 #ifndef BNEP_MAX_PROT_FILTERS
1169 #define BNEP_MAX_PROT_FILTERS 5
1172 /* Maximum number of multicast filters supported. */
1173 #ifndef BNEP_MAX_MULTI_FILTERS
1174 #define BNEP_MAX_MULTI_FILTERS 5
1177 /* Minimum MTU size. */
1178 #ifndef BNEP_MIN_MTU_SIZE
1179 #define BNEP_MIN_MTU_SIZE L2CAP_MTU_SIZE
1182 /* Preferred MTU size. */
1183 #ifndef BNEP_MTU_SIZE
1184 #define BNEP_MTU_SIZE BNEP_MIN_MTU_SIZE
1187 /* Maximum number of buffers allowed in transmit data queue. */
1188 #ifndef BNEP_MAX_XMITQ_DEPTH
1189 #define BNEP_MAX_XMITQ_DEPTH 20
1192 /* Maximum number BNEP of connections supported. */
1193 #ifndef BNEP_MAX_CONNECTIONS
1194 #define BNEP_MAX_CONNECTIONS 7
1198 /******************************************************************************
1202 ******************************************************************************/
1204 #ifndef AVDT_INCLUDED
1205 #define AVDT_INCLUDED TRUE
1208 /* Include reporting capability in AVDTP */
1209 #ifndef AVDT_REPORTING
1210 #define AVDT_REPORTING TRUE
1213 /* Include multiplexing capability in AVDTP */
1214 #ifndef AVDT_MULTIPLEXING
1215 #define AVDT_MULTIPLEXING TRUE
1218 /* Number of simultaneous links to different peer devices. */
1219 #ifndef AVDT_NUM_LINKS
1220 #define AVDT_NUM_LINKS 2
1223 /* Number of simultaneous stream endpoints. */
1224 #ifndef AVDT_NUM_SEPS
1225 #define AVDT_NUM_SEPS 3
1228 /* Number of transport channels setup per media stream(audio or video) */
1229 #ifndef AVDT_NUM_CHANNELS
1231 #if AVDT_REPORTING == TRUE
1232 /* signaling, media and reporting channels */
1233 #define AVDT_NUM_CHANNELS 3
1235 /* signaling and media channels */
1236 #define AVDT_NUM_CHANNELS 2
1237 #endif // AVDT_REPORTING
1239 #endif // AVDT_NUM_CHANNELS
1241 /* Number of transport channels setup by AVDT for all media streams
1242 * AVDT_NUM_CHANNELS * Number of simultaneous streams.
1244 #ifndef AVDT_NUM_TC_TBL
1245 #define AVDT_NUM_TC_TBL 6
1248 /* Maximum size in bytes of the codec capabilities information element. */
1249 #ifndef AVDT_CODEC_SIZE
1250 #define AVDT_CODEC_SIZE 10
1253 /* Maximum size in bytes of the content protection information element. */
1254 #ifndef AVDT_PROTECT_SIZE
1255 #define AVDT_PROTECT_SIZE 90
1258 /* Maximum number of buffers in the fragment queue (for video frames). */
1259 #ifndef AVDT_MAX_FRAG_COUNT
1260 #define AVDT_MAX_FRAG_COUNT 15
1263 /******************************************************************************
1267 ******************************************************************************/
1269 #ifndef PAN_INCLUDED
1270 #define PAN_INCLUDED TRUE
1273 /* This will enable the PANU role */
1274 #ifndef PAN_SUPPORTS_ROLE_PANU
1275 #define PAN_SUPPORTS_ROLE_PANU TRUE
1278 /* This will enable the GN role */
1279 #ifndef PAN_SUPPORTS_ROLE_GN
1280 #define PAN_SUPPORTS_ROLE_GN TRUE
1283 /* This will enable the NAP role */
1284 #ifndef PAN_SUPPORTS_ROLE_NAP
1285 #define PAN_SUPPORTS_ROLE_NAP TRUE
1288 /* This is just for debugging purposes */
1289 #ifndef PAN_SUPPORTS_DEBUG_DUMP
1290 #define PAN_SUPPORTS_DEBUG_DUMP TRUE
1293 /* Maximum number of PAN connections allowed */
1294 #ifndef MAX_PAN_CONNS
1295 #define MAX_PAN_CONNS 7
1298 /* Default service name for NAP role */
1299 #ifndef PAN_NAP_DEFAULT_SERVICE_NAME
1300 #define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service"
1303 /* Default service name for GN role */
1304 #ifndef PAN_GN_DEFAULT_SERVICE_NAME
1305 #define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service"
1308 /* Default service name for PANU role */
1309 #ifndef PAN_PANU_DEFAULT_SERVICE_NAME
1310 #define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service"
1313 /* Default description for NAP role service */
1314 #ifndef PAN_NAP_DEFAULT_DESCRIPTION
1315 #define PAN_NAP_DEFAULT_DESCRIPTION "NAP"
1318 /* Default description for GN role service */
1319 #ifndef PAN_GN_DEFAULT_DESCRIPTION
1320 #define PAN_GN_DEFAULT_DESCRIPTION "GN"
1323 /* Default description for PANU role service */
1324 #ifndef PAN_PANU_DEFAULT_DESCRIPTION
1325 #define PAN_PANU_DEFAULT_DESCRIPTION "PANU"
1328 /* Default Security level for PANU role. */
1329 #ifndef PAN_PANU_SECURITY_LEVEL
1330 #define PAN_PANU_SECURITY_LEVEL 0
1333 /* Default Security level for GN role. */
1334 #ifndef PAN_GN_SECURITY_LEVEL
1335 #define PAN_GN_SECURITY_LEVEL 0
1338 /* Default Security level for NAP role. */
1339 #ifndef PAN_NAP_SECURITY_LEVEL
1340 #define PAN_NAP_SECURITY_LEVEL 0
1343 /******************************************************************************
1347 ******************************************************************************/
1349 #ifndef GAP_INCLUDED
1350 #define GAP_INCLUDED TRUE
1353 /* This is set to enable use of GAP L2CAP connections. */
1354 #ifndef GAP_CONN_INCLUDED
1355 #define GAP_CONN_INCLUDED TRUE
1358 /* This is set to enable posting event for data write */
1359 #ifndef GAP_CONN_POST_EVT_INCLUDED
1360 #define GAP_CONN_POST_EVT_INCLUDED FALSE
1363 /* The maximum number of simultaneous GAP L2CAP connections. */
1364 #ifndef GAP_MAX_CONNECTIONS
1365 #define GAP_MAX_CONNECTIONS 30
1368 /* keep the raw data received from SDP server in database. */
1369 #ifndef SDP_RAW_DATA_INCLUDED
1370 #define SDP_RAW_DATA_INCLUDED TRUE
1373 /* Inquiry duration in 1.28 second units. */
1375 #define SDP_DEBUG TRUE
1378 /******************************************************************************
1382 ******************************************************************************/
1384 #ifndef HID_DEV_SUBCLASS
1385 #define HID_DEV_SUBCLASS COD_MINOR_POINTING
1388 #ifndef HID_CONTROL_BUF_SIZE
1389 #define HID_CONTROL_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1392 #ifndef HID_INTERRUPT_BUF_SIZE
1393 #define HID_INTERRUPT_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1396 /*************************************************************************
1397 ** Definitions for Both HID-Host & Device
1399 #ifndef HID_MAX_SVC_NAME_LEN
1400 #define HID_MAX_SVC_NAME_LEN 32
1403 #ifndef HID_MAX_SVC_DESCR_LEN
1404 #define HID_MAX_SVC_DESCR_LEN 32
1407 #ifndef HID_MAX_PROV_NAME_LEN
1408 #define HID_MAX_PROV_NAME_LEN 32
1411 /*************************************************************************
1412 ** Definitions for HID-Host
1414 #ifndef HID_HOST_INCLUDED
1415 #define HID_HOST_INCLUDED TRUE
1418 #ifndef HID_HOST_MAX_DEVICES
1419 #define HID_HOST_MAX_DEVICES 7
1422 #ifndef HID_HOST_MTU
1423 #define HID_HOST_MTU 640
1426 #ifndef HID_HOST_FLUSH_TO
1427 #define HID_HOST_FLUSH_TO 0xffff
1430 #ifndef HID_HOST_MAX_CONN_RETRY
1431 #define HID_HOST_MAX_CONN_RETRY (3)
1434 #ifndef HID_HOST_REPAGE_WIN
1435 #define HID_HOST_REPAGE_WIN (2)
1438 /*************************************************************************
1441 #ifndef A2D_INCLUDED
1442 #define A2D_INCLUDED TRUE
1445 /******************************************************************************
1449 ******************************************************************************/
1451 /* Number of simultaneous ACL links to different peer devices. */
1452 #ifndef AVCT_NUM_LINKS
1453 #define AVCT_NUM_LINKS 2
1456 /* Number of simultaneous AVCTP connections. */
1457 #ifndef AVCT_NUM_CONN
1458 #define AVCT_NUM_CONN 3
1461 /******************************************************************************
1465 ******************************************************************************/
1467 #ifndef AVRC_METADATA_INCLUDED
1468 #define AVRC_METADATA_INCLUDED TRUE
1471 #ifndef AVRC_ADV_CTRL_INCLUDED
1472 #define AVRC_ADV_CTRL_INCLUDED TRUE
1475 #ifndef AVRC_CTLR_INCLUDED
1476 #define AVRC_CTLR_INCLUDED TRUE
1479 /******************************************************************************
1483 ******************************************************************************/
1484 #ifndef MCA_INCLUDED
1485 #define MCA_INCLUDED FALSE
1488 /* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */
1489 #ifndef MCA_CTRL_MTU
1490 #define MCA_CTRL_MTU 60
1493 /* The maximum number of registered MCAP instances. */
1494 #ifndef MCA_NUM_REGS
1495 #define MCA_NUM_REGS 12
1498 /* The maximum number of control channels (to difference devices) per registered MCAP instances. */
1499 #ifndef MCA_NUM_LINKS
1500 #define MCA_NUM_LINKS 3
1503 /* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */
1504 #ifndef MCA_NUM_DEPS
1505 #define MCA_NUM_DEPS 13
1508 /* The maximum number of MDL link per control channel. */
1509 #ifndef MCA_NUM_MDLS
1510 #define MCA_NUM_MDLS 4
1513 /* Buffer size to reassemble the SDU. */
1514 #ifndef MCA_USER_RX_BUF_SIZE
1515 #define MCA_USER_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1518 /* Buffer size to hold the SDU. */
1519 #ifndef MCA_USER_TX_BUF_SIZE
1520 #define MCA_USER_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1524 * Buffer size used to hold MPS segments during SDU reassembly
1526 #ifndef MCA_FCR_RX_BUF_SIZE
1527 #define MCA_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1531 * Default buffer size used to hold MPS segments used in (re)transmissions.
1532 * The size of each buffer must be able to hold the maximum MPS segment size
1533 * passed in tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) +
1534 * L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1536 #ifndef MCA_FCR_TX_BUF_SIZE
1537 #define MCA_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1540 /* MCAP control channel FCR Option:
1541 Size of the transmission window when using enhanced retransmission mode.
1542 1 is defined by HDP specification for control channel.
1544 #ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
1545 #define MCA_FCR_OPT_TX_WINDOW_SIZE 1
1548 /* MCAP control channel FCR Option:
1549 Number of transmission attempts for a single I-Frame before taking
1550 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1553 0 - infinite retransmissions
1554 1 - single transmission
1556 #ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT
1557 #define MCA_FCR_OPT_MAX_TX_B4_DISCNT 20
1560 /* MCAP control channel FCR Option: Retransmission Timeout
1561 The AVRCP specification set a value in the range of 300 - 2000 ms
1562 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
1563 Range: Minimum 2000 (2 secs) when supporting PBF.
1565 #ifndef MCA_FCR_OPT_RETX_TOUT
1566 #define MCA_FCR_OPT_RETX_TOUT 2000
1569 /* MCAP control channel FCR Option: Monitor Timeout
1570 The AVRCP specification set a value in the range of 300 - 2000 ms
1571 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
1572 Range: Minimum 12000 (12 secs) when supporting PBF.
1574 #ifndef MCA_FCR_OPT_MONITOR_TOUT
1575 #define MCA_FCR_OPT_MONITOR_TOUT 12000
1578 /* MCAP control channel FCR Option: Maximum PDU payload size.
1579 The maximum number of payload octets that the local device can receive in a single PDU.
1581 #ifndef MCA_FCR_OPT_MPS_SIZE
1582 #define MCA_FCR_OPT_MPS_SIZE 1000
1585 /* Shared transport */
1586 #ifndef NFC_SHARED_TRANSPORT_ENABLED
1587 #define NFC_SHARED_TRANSPORT_ENABLED FALSE
1590 /******************************************************************************
1592 ** Sleep Mode (Low Power Mode)
1594 ******************************************************************************/
1596 #ifndef HCILP_INCLUDED
1597 #define HCILP_INCLUDED TRUE
1600 /******************************************************************************
1602 ** APPL - Application Task
1604 ******************************************************************************/
1606 #define L2CAP_FEATURE_REQ_ID 73
1607 #define L2CAP_FEATURE_RSP_ID 173
1609 /******************************************************************************
1613 ******************************************************************************/
1614 /* BTA EIR canned UUID list (default is dynamic) */
1615 #ifndef BTA_EIR_CANNED_UUID_LIST
1616 #define BTA_EIR_CANNED_UUID_LIST FALSE
1619 /* Number of supported customer UUID in EIR */
1620 #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
1621 #define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8
1624 /* CHLD override for bluedroid */
1625 #ifndef BTA_AG_CHLD_VAL_ECC
1626 #define BTA_AG_CHLD_VAL_ECC "(0,1,1x,2,2x,3)"
1629 #ifndef BTA_AG_CHLD_VAL
1630 #define BTA_AG_CHLD_VAL "(0,1,2,3)"
1633 /* Set the CIND to match HFP 1.5 */
1634 #ifndef BTA_AG_CIND_INFO
1635 #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))"
1638 #ifndef BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY
1639 #define BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY TRUE
1642 /******************************************************************************
1644 ** Tracing: Include trace header file here.
1646 ******************************************************************************/
1648 /* Enable/disable BTSnoop memory logging */
1650 #define BTSNOOP_MEM TRUE
1653 #include "bt_trace.h"
1655 #endif /* BT_TARGET_H */