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 #ifndef SBC_FOR_EMBEDDED_LINUX
99 #define SBC_FOR_EMBEDDED_LINUX TRUE
103 #define AVDT_VERSION 0x0102
106 #ifndef BTA_AG_AT_MAX_LEN
107 #define BTA_AG_AT_MAX_LEN 512
110 #ifndef BTA_AVRCP_FF_RW_SUPPORT
111 #define BTA_AVRCP_FF_RW_SUPPORT TRUE
114 #ifndef BTA_AG_SCO_PKT_TYPES
115 #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)
118 #ifndef BTA_AV_RET_TOUT
119 #define BTA_AV_RET_TOUT 15
122 #ifndef PORCHE_PAIRING_CONFLICT
123 #define PORCHE_PAIRING_CONFLICT TRUE
126 #ifndef BTA_AV_CO_CP_SCMS_T
127 #define BTA_AV_CO_CP_SCMS_T FALSE
130 /* This feature is used to eanble interleaved scan*/
131 #ifndef BTA_HOST_INTERLEAVE_SEARCH
132 #define BTA_HOST_INTERLEAVE_SEARCH FALSE
135 #ifndef BT_USE_TRACES
136 #define BT_USE_TRACES TRUE
139 #ifndef BT_TRACE_VERBOSE
140 #define BT_TRACE_VERBOSE FALSE
143 #ifndef BTA_DM_SDP_DB_SIZE
144 #define BTA_DM_SDP_DB_SIZE 8000
148 #define HL_INCLUDED TRUE
151 #ifndef AG_VOICE_SETTINGS
152 #define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS
155 #ifndef BTIF_DM_OOB_TEST
156 #define BTIF_DM_OOB_TEST TRUE
159 // How long to wait before activating sniff mode after entering the
160 // idle state for FTS, OPS connections
161 #ifndef BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS
162 #define BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 7000
165 //------------------End added from bdroid_buildcfg.h---------------------
168 /******************************************************************************
172 ******************************************************************************/
174 #ifndef BT_DEFAULT_BUFFER_SIZE
175 #define BT_DEFAULT_BUFFER_SIZE (4096 + 16)
178 #ifndef BT_SMALL_BUFFER_SIZE
179 #define BT_SMALL_BUFFER_SIZE 660
182 /* Receives HCI events from the lower-layer. */
183 #ifndef HCI_CMD_BUF_SIZE
184 #define HCI_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
187 /* Sends SDP data packets. */
188 #ifndef SDP_DATA_BUF_SIZE
189 #define SDP_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
192 /* Sends RFCOMM command packets. */
193 #ifndef RFCOMM_CMD_BUF_SIZE
194 #define RFCOMM_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
197 /* Sends RFCOMM data packets. */
198 #ifndef RFCOMM_DATA_BUF_SIZE
199 #define RFCOMM_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
202 /* Sends L2CAP packets to the peer and HCI messages to the controller. */
203 #ifndef L2CAP_CMD_BUF_SIZE
204 #define L2CAP_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
207 #ifndef L2CAP_USER_TX_BUF_SIZE
208 #define L2CAP_USER_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
211 #ifndef L2CAP_USER_RX_BUF_SIZE
212 #define L2CAP_USER_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
215 /* Sends L2CAP segmented packets in ERTM mode */
216 #ifndef L2CAP_FCR_TX_BUF_SIZE
217 #define L2CAP_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
220 /* Receives L2CAP segmented packets in ERTM mode */
221 #ifndef L2CAP_FCR_RX_BUF_SIZE
222 #define L2CAP_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
225 #ifndef L2CAP_FCR_ERTM_BUF_SIZE
226 #define L2CAP_FCR_ERTM_BUF_SIZE (10240 + 24)
229 /* Number of ACL buffers to assign to LE */
231 * TODO: Do we need this?
232 * It was used when the HCI buffers were shared with BR/EDR.
234 #ifndef L2C_DEF_NUM_BLE_BUF_SHARED
235 #define L2C_DEF_NUM_BLE_BUF_SHARED 1
238 /* Used by BTM when it sends HCI commands to the controller. */
239 #ifndef BTM_CMD_BUF_SIZE
240 #define BTM_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
243 #ifndef OBX_LRG_DATA_BUF_SIZE
244 #define OBX_LRG_DATA_BUF_SIZE (8080 + 26)
247 /* Used to send data to L2CAP. */
248 #ifndef GAP_DATA_BUF_SIZE
249 #define GAP_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
253 #define SPP_DB_SIZE BT_DEFAULT_BUFFER_SIZE
256 /* BNEP data and protocol messages. */
257 #ifndef BNEP_BUF_SIZE
258 #define BNEP_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
261 /* AVDTP buffer size for protocol messages */
262 #ifndef AVDT_CMD_BUF_SIZE
263 #define AVDT_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
266 /* AVDTP buffer size for media packets in case of fragmentation */
267 #ifndef AVDT_DATA_BUF_SIZE
268 #define AVDT_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
272 #define PAN_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
275 /* Maximum number of buffers to allocate for PAN */
277 #define PAN_BUF_MAX 100
280 /* AVCTP buffer size for protocol messages */
281 #ifndef AVCT_CMD_BUF_SIZE
282 #define AVCT_CMD_BUF_SIZE 288
285 /* AVRCP buffer size for protocol messages */
286 #ifndef AVRC_CMD_BUF_SIZE
287 #define AVRC_CMD_BUF_SIZE 288
290 /* AVRCP Metadata buffer size for protocol messages */
291 #ifndef AVRC_META_CMD_BUF_SIZE
292 #define AVRC_META_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
295 /* AVRCP buffer size for browsing channel messages */
296 #ifndef AVRC_BROWSE_BUF_SIZE
297 #define AVRC_BROWSE_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
300 #ifndef BTA_HL_USER_TX_BUF_SIZE
301 #define BTA_HL_USER_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
304 #ifndef BTA_HL_LRG_DATA_BUF_SIZE
305 #define BTA_HL_LRG_DATA_BUF_SIZE (10240 + 24)
308 /* GATT Server Database buffer size */
309 #ifndef GATT_DB_BUF_SIZE
310 #define GATT_DB_BUF_SIZE 128
313 /* GATT Data sending buffer size */
314 #ifndef GATT_DATA_BUF_SIZE
315 #define GATT_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
318 /******************************************************************************
320 ** Lower Layer Interface
322 ******************************************************************************/
324 /* Macro for allocating buffer for HCI commands */
325 #ifndef HCI_GET_CMD_BUF
326 #if (!defined(HCI_USE_VARIABLE_SIZE_CMD_BUF) || (HCI_USE_VARIABLE_SIZE_CMD_BUF == FALSE))
327 /* Allocate fixed-size HCI_CMD buffer (default case) */
328 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getbuf (HCI_CMD_BUF_SIZE))
330 /* Allocate smallest possible buffer (for platforms with limited RAM) */
331 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getbuf ((UINT16)(BT_HDR_SIZE + HCIC_PREAMBLE_SIZE + (paramlen))))
333 #endif /* HCI_GET_CMD_BUF */
335 /******************************************************************************
339 ******************************************************************************/
341 /* Use 2 second for low-resolution systems, override to 1 for high-resolution systems */
342 #ifndef BT_1SEC_TIMEOUT
343 #define BT_1SEC_TIMEOUT (2)
347 /* if L2CAP_FCR_INCLUDED is TRUE then it should have 100 millisecond resolution */
348 /* if none of them is included then QUICK_TIMER_TICKS_PER_SEC is set to 0 to exclude quick timer */
349 #ifndef QUICK_TIMER_TICKS_PER_SEC
350 #define QUICK_TIMER_TICKS_PER_SEC 10 /* 100ms timer */
353 /******************************************************************************
357 ******************************************************************************/
359 /* Cancel Inquiry on incoming SSP */
360 #ifndef BTM_NO_SSP_ON_INQUIRY
361 #define BTM_NO_SSP_ON_INQUIRY FALSE
364 /* Includes SCO if TRUE */
365 #ifndef BTM_SCO_INCLUDED
366 #define BTM_SCO_INCLUDED TRUE /* TRUE includes SCO code */
369 /* Includes SCO if TRUE */
370 #ifndef BTM_SCO_HCI_INCLUDED
371 #define BTM_SCO_HCI_INCLUDED FALSE /* TRUE includes SCO over HCI code */
374 /* Includes WBS if TRUE */
375 #ifndef BTM_WBS_INCLUDED
376 #define BTM_WBS_INCLUDED FALSE /* TRUE includes WBS code */
379 /* This is used to work around a controller bug that doesn't like Disconnect
380 ** issued while there is a role switch in progress
382 #ifndef BTM_DISC_DURING_RS
383 #define BTM_DISC_DURING_RS TRUE
386 /**************************
387 ** Initial SCO TX credit
388 *************************/
389 /* max TX SCO data packet size */
390 #ifndef BTM_SCO_DATA_SIZE_MAX
391 #define BTM_SCO_DATA_SIZE_MAX 240
394 /* The size in bytes of the BTM inquiry database. */
395 #ifndef BTM_INQ_DB_SIZE
396 #define BTM_INQ_DB_SIZE 40
399 /* The default scan mode */
400 #ifndef BTM_DEFAULT_SCAN_TYPE
401 #define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED
404 /* Should connections to unknown devices be allowed when not discoverable? */
405 #ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
406 #define BTM_ALLOW_CONN_IF_NONDISCOVER TRUE
409 /* Sets the Page_Scan_Window: the length of time that the device is performing a page scan. */
410 #ifndef BTM_DEFAULT_CONN_WINDOW
411 #define BTM_DEFAULT_CONN_WINDOW 0x0012
414 /* Sets the Page_Scan_Activity: the interval between the start of two consecutive page scans. */
415 #ifndef BTM_DEFAULT_CONN_INTERVAL
416 #define BTM_DEFAULT_CONN_INTERVAL 0x0800
419 /* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
420 #ifndef BTM_DEFAULT_DISC_WINDOW
421 #define BTM_DEFAULT_DISC_WINDOW 0x0012
424 /* When automatic inquiry scan is enabled, this sets the inquiry scan interval. */
425 #ifndef BTM_DEFAULT_DISC_INTERVAL
426 #define BTM_DEFAULT_DISC_INTERVAL 0x0800
429 /* Default class of device
430 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
432 * SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
433 * MAJOR_CLASS:0x02 - PHONE
434 * MINOR_CLASS:0x0C - SMART_PHONE
438 #define BTA_DM_COD {0x5A, 0x02, 0x0C}
441 /* The number of SCO links. */
442 #ifndef BTM_MAX_SCO_LINKS
443 #define BTM_MAX_SCO_LINKS 3
446 /* The preferred type of SCO links (2-eSCO, 0-SCO). */
447 #ifndef BTM_DEFAULT_SCO_MODE
448 #define BTM_DEFAULT_SCO_MODE 2
451 /* The number of security records for peer devices. */
452 #ifndef BTM_SEC_MAX_DEVICE_RECORDS
453 #define BTM_SEC_MAX_DEVICE_RECORDS 100
456 /* The number of security records for services. */
457 #ifndef BTM_SEC_MAX_SERVICE_RECORDS
458 #define BTM_SEC_MAX_SERVICE_RECORDS 32
461 /* If True, force a retrieval of remote device name for each bond in case it's changed */
462 #ifndef BTM_SEC_FORCE_RNR_FOR_DBOND
463 #define BTM_SEC_FORCE_RNR_FOR_DBOND FALSE
466 /* Maximum device name length used in btm database. */
467 #ifndef BTM_MAX_REM_BD_NAME_LEN
468 #define BTM_MAX_REM_BD_NAME_LEN 248
471 /* Maximum local device name length stored btm database.
472 '0' disables storage of the local name in BTM */
473 #ifndef BTM_MAX_LOC_BD_NAME_LEN
474 #define BTM_MAX_LOC_BD_NAME_LEN 248
477 /* Fixed Default String. When this is defined as null string, the device's
478 * product model name is used as the default local name.
480 #ifndef BTM_DEF_LOCAL_NAME
481 #define BTM_DEF_LOCAL_NAME ""
484 /* Maximum service name stored with security authorization (0 if not needed) */
485 #ifndef BTM_SEC_SERVICE_NAME_LEN
486 #define BTM_SEC_SERVICE_NAME_LEN BT_MAX_SERVICE_NAME_LEN
489 /* Maximum length of the service name. */
490 #ifndef BT_MAX_SERVICE_NAME_LEN
491 #define BT_MAX_SERVICE_NAME_LEN 21
494 /* ACL buffer size in HCI Host Buffer Size command. */
495 #ifndef BTM_ACL_BUF_SIZE
496 #define BTM_ACL_BUF_SIZE 0
499 /* The maximum number of clients that can register with the power manager. */
500 #ifndef BTM_MAX_PM_RECORDS
501 #define BTM_MAX_PM_RECORDS 2
504 /* This is set to show debug trace messages for the power manager. */
506 #define BTM_PM_DEBUG FALSE
509 /* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */
510 #ifndef BTM_SCO_WAKE_PARKED_LINK
511 #define BTM_SCO_WAKE_PARKED_LINK TRUE
514 /* If the user does not respond to security process requests within this many seconds,
515 * a negative response would be sent automatically.
516 * 30 is LMP response timeout value */
517 #ifndef BTM_SEC_TIMEOUT_VALUE
518 #define BTM_SEC_TIMEOUT_VALUE 35
521 /* Maximum number of callbacks that can be registered using BTM_RegisterForVSEvents */
522 #ifndef BTM_MAX_VSE_CALLBACKS
523 #define BTM_MAX_VSE_CALLBACKS 3
526 /******************************************
528 *******************************************/
529 /* This is set to TRUE if the FEC is required for EIR packet. */
530 #ifndef BTM_EIR_DEFAULT_FEC_REQUIRED
531 #define BTM_EIR_DEFAULT_FEC_REQUIRED TRUE
534 /* The IO capability of the local device (for Simple Pairing) */
535 #ifndef BTM_LOCAL_IO_CAPS
536 #define BTM_LOCAL_IO_CAPS BTM_IO_CAP_IO
539 #ifndef BTM_LOCAL_IO_CAPS_BLE
540 #define BTM_LOCAL_IO_CAPS_BLE BTM_IO_CAP_KBDISP
543 /* The default MITM Protection Requirement (for Simple Pairing)
544 * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
545 #ifndef BTM_DEFAULT_AUTH_REQ
546 #define BTM_DEFAULT_AUTH_REQ BTM_AUTH_SP_NO
549 /* The default MITM Protection Requirement for dedicated bonding using Simple Pairing
550 * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
551 #ifndef BTM_DEFAULT_DD_AUTH_REQ
552 #define BTM_DEFAULT_DD_AUTH_REQ BTM_AUTH_AP_YES
555 /* Include Out-of-Band implementation for Simple Pairing */
556 #ifndef BTM_OOB_INCLUDED
557 #define BTM_OOB_INCLUDED TRUE
560 /* TRUE to include Sniff Subrating */
561 #ifndef BTM_SSR_INCLUDED
562 #define BTM_SSR_INCLUDED TRUE
565 /*************************
566 ** End of Lisbon Features
567 **************************/
569 /* 4.1/4.2 secure connections feature */
570 #ifndef SC_MODE_INCLUDED
571 #define SC_MODE_INCLUDED TRUE
574 /* Used for conformance testing ONLY */
575 #ifndef BTM_BLE_CONFORMANCE_TESTING
576 #define BTM_BLE_CONFORMANCE_TESTING FALSE
579 /******************************************************************************
583 ******************************************************************************/
585 /* The maximum number of simultaneous links that L2CAP can support. */
586 #ifndef MAX_ACL_CONNECTIONS
587 #define MAX_L2CAP_LINKS 7
589 #define MAX_L2CAP_LINKS MAX_ACL_CONNECTIONS
592 /* The maximum number of simultaneous channels that L2CAP can support. */
593 #ifndef MAX_L2CAP_CHANNELS
594 #define MAX_L2CAP_CHANNELS 16
597 /* The maximum number of simultaneous applications that can register with L2CAP. */
598 #ifndef MAX_L2CAP_CLIENTS
599 #define MAX_L2CAP_CLIENTS 15
602 /* The number of seconds of link inactivity before a link is disconnected. */
603 #ifndef L2CAP_LINK_INACTIVITY_TOUT
604 #define L2CAP_LINK_INACTIVITY_TOUT 4
607 /* The number of seconds of link inactivity after bonding before a link is disconnected. */
608 #ifndef L2CAP_BONDING_TIMEOUT
609 #define L2CAP_BONDING_TIMEOUT 3
612 /* The time from the HCI connection complete to disconnect if no channel is established. */
613 #ifndef L2CAP_LINK_STARTUP_TOUT
614 #define L2CAP_LINK_STARTUP_TOUT 60
617 /* The L2CAP MTU; must be in accord with the HCI ACL buffer size. */
618 #ifndef L2CAP_MTU_SIZE
619 #define L2CAP_MTU_SIZE 1691
623 * The L2CAP MPS over Bluetooth; must be in accord with the FCR tx buffer size
624 * and ACL down buffer size.
626 #ifndef L2CAP_MPS_OVER_BR_EDR
627 #define L2CAP_MPS_OVER_BR_EDR 1010
630 /* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */
631 #ifndef L2CAP_HOST_FC_ACL_BUFS
632 #define L2CAP_HOST_FC_ACL_BUFS 20
635 /* This is set to enable L2CAP to take the ACL link out of park mode when ACL data is to be sent. */
636 #ifndef L2CAP_WAKE_PARKED_LINK
637 #define L2CAP_WAKE_PARKED_LINK TRUE
640 /* Whether link wants to be the master or the slave. */
641 #ifndef L2CAP_DESIRED_LINK_ROLE
642 #define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_SLAVE
645 /* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
646 #ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
647 #define L2CAP_NON_FLUSHABLE_PB_INCLUDED TRUE
650 /* Minimum number of ACL credit for high priority link */
651 #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
652 #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5
655 /* used for monitoring HCI ACL credit management */
656 #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
657 #define L2CAP_HCI_FLOW_CONTROL_DEBUG TRUE
660 /* Unicast Connectionless Data */
661 #ifndef L2CAP_UCD_INCLUDED
662 #define L2CAP_UCD_INCLUDED FALSE
665 /* Unicast Connectionless Data MTU */
666 #ifndef L2CAP_UCD_MTU
667 #define L2CAP_UCD_MTU L2CAP_MTU_SIZE
670 /* Unicast Connectionless Data Idle Timeout */
671 #ifndef L2CAP_UCD_IDLE_TIMEOUT
672 #define L2CAP_UCD_IDLE_TIMEOUT 2
675 /* Unicast Connectionless Data Idle Timeout */
676 #ifndef L2CAP_UCD_CH_PRIORITY
677 #define L2CAP_UCD_CH_PRIORITY L2CAP_CHNL_PRIORITY_MEDIUM
680 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
681 /* Excluding L2CAP signaling channel and UCD */
682 #ifndef L2CAP_NUM_FIXED_CHNLS
683 #define L2CAP_NUM_FIXED_CHNLS 32
686 /* First fixed channel supported */
687 #ifndef L2CAP_FIRST_FIXED_CHNL
688 #define L2CAP_FIRST_FIXED_CHNL 4
691 #ifndef L2CAP_LAST_FIXED_CHNL
692 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
695 /* Round Robin service channels in link */
696 #ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
697 #define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE TRUE
700 /* used for monitoring eL2CAP data flow */
701 #ifndef L2CAP_ERTM_STATS
702 #define L2CAP_ERTM_STATS FALSE
705 /* Used for conformance testing ONLY: When TRUE lets scriptwrapper overwrite info response */
706 #ifndef L2CAP_CONFORMANCE_TESTING
707 #define L2CAP_CONFORMANCE_TESTING FALSE
711 * Max bytes per connection to buffer locally before dropping the
712 * connection if local client does not receive it - default is 1MB
714 #ifndef L2CAP_MAX_RX_BUFFER
715 #define L2CAP_MAX_RX_BUFFER 0x100000
719 #ifndef TIMER_PARAM_TYPE
720 #define TIMER_PARAM_TYPE void*
723 /******************************************************************************
727 ******************************************************************************/
730 #define BLE_INCLUDED TRUE
733 #ifndef BLE_ANDROID_CONTROLLER_SCAN_FILTER
734 #define BLE_ANDROID_CONTROLLER_SCAN_FILTER TRUE
737 #ifndef LOCAL_BLE_CONTROLLER_ID
738 #define LOCAL_BLE_CONTROLLER_ID (1)
742 * Toggles support for general LE privacy features such as remote address
743 * resolution, local address rotation etc.
745 #ifndef BLE_PRIVACY_SPT
746 #define BLE_PRIVACY_SPT TRUE
750 * Enables or disables support for local privacy (ex. address rotation)
752 #ifndef BLE_LOCAL_PRIVACY_ENABLED
753 #define BLE_LOCAL_PRIVACY_ENABLED TRUE
757 * Toggles support for vendor specific extensions such as RPA offloading,
758 * feature discovery, multi-adv etc.
760 #ifndef BLE_VND_INCLUDED
761 #define BLE_VND_INCLUDED FALSE
764 #ifndef BTM_BLE_ADV_TX_POWER
765 #define BTM_BLE_ADV_TX_POWER {-21, -15, -7, 1, 9}
769 #ifndef BLE_BATCH_SCAN_INCLUDED
770 #define BLE_BATCH_SCAN_INCLUDED TRUE
773 /******************************************************************************
775 ** ATT/GATT Protocol/Profile Settings
777 ******************************************************************************/
778 #ifndef BTA_GATT_INCLUDED
779 #if BLE_INCLUDED == TRUE
780 #define BTA_GATT_INCLUDED TRUE
782 #define BTA_GATT_INCLUDED FALSE
786 #if BTA_GATT_INCLUDED == TRUE && BLE_INCLUDED == FALSE
787 #error "can't have GATT without BLE"
790 #ifndef BLE_LLT_INCLUDED
791 #define BLE_LLT_INCLUDED TRUE
795 #define ATT_INCLUDED TRUE
799 #define ATT_DEBUG TRUE
802 #ifndef BLE_PERIPHERAL_MODE_SUPPORT
803 #define BLE_PERIPHERAL_MODE_SUPPORT TRUE
806 #ifndef BLE_DELAY_REQUEST_ENC
807 /* This flag is to work around IPHONE problem, We need to wait for iPhone ready
808 before send encryption request to iPhone */
809 #define BLE_DELAY_REQUEST_ENC FALSE
812 #ifndef GAP_TRANSPORT_SUPPORTED
813 #define GAP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
816 #ifndef GATTP_TRANSPORT_SUPPORTED
817 #define GATTP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
820 #ifndef GATT_MAX_SR_PROFILES
821 #define GATT_MAX_SR_PROFILES 32 /* max is 32 */
824 #ifndef GATT_MAX_APPS
825 #define GATT_MAX_APPS 32 /* note: 2 apps used internally GATT and GAP */
828 #ifndef GATT_MAX_PHY_CHANNEL
829 #define GATT_MAX_PHY_CHANNEL 7
832 /* Used for conformance testing ONLY */
833 #ifndef GATT_CONFORMANCE_TESTING
834 #define GATT_CONFORMANCE_TESTING FALSE
837 /* number of background connection device allowence, ideally to be the same as WL size
839 #ifndef GATT_MAX_BG_CONN_DEV
840 #define GATT_MAX_BG_CONN_DEV 32
843 /******************************************************************************
847 ******************************************************************************/
849 #if BLE_INCLUDED == TRUE
850 #define SMP_INCLUDED TRUE
852 #define SMP_INCLUDED FALSE
856 #if SMP_INCLUDED == TRUE && BLE_INCLUDED == FALSE
857 #error "can't have SMP without BLE"
861 #define SMP_DEBUG FALSE
864 #ifndef SMP_DEFAULT_AUTH_REQ
865 #define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY
868 #ifndef SMP_MAX_ENC_KEY_SIZE
869 #define SMP_MAX_ENC_KEY_SIZE 16
872 #ifndef SMP_MIN_ENC_KEY_SIZE
873 #define SMP_MIN_ENC_KEY_SIZE 7
876 /* minimum link timeout after SMP pairing is done, leave room for key exchange
877 and racing condition for the following service connection.
878 Prefer greater than 0 second, and no less than default inactivity link idle
879 timer(L2CAP_LINK_INACTIVITY_TOUT) in l2cap) */
880 #ifndef SMP_LINK_TOUT_MIN
881 #if (L2CAP_LINK_INACTIVITY_TOUT > 0)
882 #define SMP_LINK_TOUT_MIN L2CAP_LINK_INACTIVITY_TOUT
884 #define SMP_LINK_TOUT_MIN 2
887 /******************************************************************************
891 ******************************************************************************/
893 /* This is set to enable SDP server functionality. */
894 #ifndef SDP_SERVER_ENABLED
895 #define SDP_SERVER_ENABLED TRUE
898 /* The maximum number of SDP records the server can support. */
899 #ifndef SDP_MAX_RECORDS
900 #define SDP_MAX_RECORDS 30
903 /* The maximum number of attributes in each record. */
904 #ifndef SDP_MAX_REC_ATTR
905 #define SDP_MAX_REC_ATTR 25
908 #ifndef SDP_MAX_PAD_LEN
909 #define SDP_MAX_PAD_LEN 600
912 /* The maximum length, in bytes, of an attribute. */
913 #ifndef SDP_MAX_ATTR_LEN
914 #define SDP_MAX_ATTR_LEN 400
917 /* The maximum number of attribute filters supported by SDP databases. */
918 #ifndef SDP_MAX_ATTR_FILTERS
919 #define SDP_MAX_ATTR_FILTERS 15
922 /* The maximum number of UUID filters supported by SDP databases. */
923 #ifndef SDP_MAX_UUID_FILTERS
924 #define SDP_MAX_UUID_FILTERS 3
927 /* This is set to enable SDP client functionality. */
928 #ifndef SDP_CLIENT_ENABLED
929 #define SDP_CLIENT_ENABLED TRUE
932 /* The maximum number of record handles retrieved in a search. */
933 #ifndef SDP_MAX_DISC_SERVER_RECS
934 #define SDP_MAX_DISC_SERVER_RECS 21
937 /* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */
938 #ifndef SDP_MAX_LIST_BYTE_COUNT
939 #define SDP_MAX_LIST_BYTE_COUNT 4096
942 /* The maximum number of parameters in an SDP protocol element. */
943 #ifndef SDP_MAX_PROTOCOL_PARAMS
944 #define SDP_MAX_PROTOCOL_PARAMS 2
947 /* The maximum number of simultaneous client and server connections. */
948 #ifndef SDP_MAX_CONNECTIONS
949 #define SDP_MAX_CONNECTIONS 4
952 /* The MTU size for the L2CAP configuration. */
954 #define SDP_MTU_SIZE 672
957 /* The flush timeout for the L2CAP configuration. */
959 #define SDP_FLUSH_TO 0xFFFF
962 /* The name for security authorization. */
963 #ifndef SDP_SERVICE_NAME
964 #define SDP_SERVICE_NAME "Service Discovery"
967 /* The security level for BTM. */
968 #ifndef SDP_SECURITY_LEVEL
969 #define SDP_SECURITY_LEVEL BTM_SEC_NONE
972 /******************************************************************************
976 ******************************************************************************/
978 /* The maximum number of ports supported. */
979 #ifndef MAX_RFC_PORTS
980 #define MAX_RFC_PORTS 30
983 /* The maximum simultaneous links to different devices. */
984 #ifndef MAX_ACL_CONNECTIONS
985 #define MAX_BD_CONNECTIONS 7
987 #define MAX_BD_CONNECTIONS MAX_ACL_CONNECTIONS
990 /* The port receive queue low watermark level, in bytes. */
991 #ifndef PORT_RX_LOW_WM
992 #define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
995 /* The port receive queue high watermark level, in bytes. */
996 #ifndef PORT_RX_HIGH_WM
997 #define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
1000 /* The port receive queue critical watermark level, in bytes. */
1001 #ifndef PORT_RX_CRITICAL_WM
1002 #define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
1005 /* The port receive queue low watermark level, in number of buffers. */
1006 #ifndef PORT_RX_BUF_LOW_WM
1007 #define PORT_RX_BUF_LOW_WM 4
1010 /* The port receive queue high watermark level, in number of buffers. */
1011 #ifndef PORT_RX_BUF_HIGH_WM
1012 #define PORT_RX_BUF_HIGH_WM 10
1015 /* The port receive queue critical watermark level, in number of buffers. */
1016 #ifndef PORT_RX_BUF_CRITICAL_WM
1017 #define PORT_RX_BUF_CRITICAL_WM 15
1020 /* The port transmit queue high watermark level, in bytes. */
1021 #ifndef PORT_TX_HIGH_WM
1022 #define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
1025 /* The port transmit queue critical watermark level, in bytes. */
1026 #ifndef PORT_TX_CRITICAL_WM
1027 #define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
1030 /* The port transmit queue high watermark level, in number of buffers. */
1031 #ifndef PORT_TX_BUF_HIGH_WM
1032 #define PORT_TX_BUF_HIGH_WM 10
1035 /* The port transmit queue high watermark level, in number of buffers. */
1036 #ifndef PORT_TX_BUF_CRITICAL_WM
1037 #define PORT_TX_BUF_CRITICAL_WM 15
1040 /* The RFCOMM multiplexer preferred flow control mechanism. */
1041 #ifndef PORT_FC_DEFAULT
1042 #define PORT_FC_DEFAULT PORT_FC_CREDIT
1045 /* The maximum number of credits receiver sends to peer when using credit-based flow control. */
1046 #ifndef PORT_CREDIT_RX_MAX
1047 #define PORT_CREDIT_RX_MAX 16
1050 /* The credit low watermark level. */
1051 #ifndef PORT_CREDIT_RX_LOW
1052 #define PORT_CREDIT_RX_LOW 8
1055 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1056 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_lock() or GKI_disable() */
1057 #ifndef PORT_SCHEDULE_LOCK
1058 #define PORT_SCHEDULE_LOCK GKI_disable()
1061 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1062 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_unlock() or GKI_enable() */
1063 #ifndef PORT_SCHEDULE_UNLOCK
1064 #define PORT_SCHEDULE_UNLOCK GKI_enable()
1067 /******************************************************************************
1071 ******************************************************************************/
1073 /* The maximum number of registered servers. */
1074 #ifndef OBX_NUM_SERVERS
1075 #define OBX_NUM_SERVERS 12
1078 /* The maximum number of active clients. */
1079 #ifndef OBX_NUM_CLIENTS
1080 #define OBX_NUM_CLIENTS 8
1084 * Buffer size to reassemble the SDU.
1085 * It will allow buffers to be used that are larger than the L2CAP_MAX_MTU.
1087 #ifndef OBX_USER_RX_BUF_SIZE
1088 #define OBX_USER_RX_BUF_SIZE OBX_LRG_DATA_BUF_SIZE
1092 * Buffer size to hold the SDU.
1093 * It will allow buffers to be used that are larger than the L2CAP_MAX_MTU.
1095 #ifndef OBX_USER_TX_BUF_SIZE
1096 #define OBX_USER_TX_BUF_SIZE OBX_LRG_DATA_BUF_SIZE
1099 /* Buffer size used to hold MPS segments during SDU reassembly. */
1100 #ifndef OBX_FCR_RX_BUF_SIZE
1101 #define OBX_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1105 * Buffer size used to hold MPS segments used in (re)transmissions.
1106 * The size of each buffer must be able to hold the maximum MPS segment size
1107 * passed in L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) +
1108 * L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1110 #ifndef OBX_FCR_TX_BUF_SIZE
1111 #define OBX_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1115 * Size of the transmission window when using enhanced retransmission mode.
1116 * Not used in basic and streaming modes. Range: 1 - 63
1118 #ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR
1119 #define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 20
1123 * Number of transmission attempts for a single I-Frame before taking
1124 * Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1127 * 0 - infinite retransmissions
1128 * 1 - single transmission
1130 #ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT
1131 #define OBX_FCR_OPT_MAX_TX_B4_DISCNT 20
1135 * Retransmission Timeout
1136 * Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF.
1138 #ifndef OBX_FCR_OPT_RETX_TOUT
1139 #define OBX_FCR_OPT_RETX_TOUT 2000
1144 * Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
1146 #ifndef OBX_FCR_OPT_MONITOR_TOUT
1147 #define OBX_FCR_OPT_MONITOR_TOUT 12000
1151 * Maximum PDU payload size.
1152 * Suggestion: The maximum amount of data that will fit into a 3-DH5 packet.
1155 #ifndef OBX_FCR_OPT_MAX_PDU_SIZE
1156 #define OBX_FCR_OPT_MAX_PDU_SIZE L2CAP_MPS_OVER_BR_EDR
1160 /******************************************************************************
1164 ******************************************************************************/
1166 #ifndef BNEP_INCLUDED
1167 #define BNEP_INCLUDED TRUE
1170 /* BNEP status API call is used mainly to get the L2CAP handle */
1171 #ifndef BNEP_SUPPORTS_STATUS_API
1172 #define BNEP_SUPPORTS_STATUS_API TRUE
1176 ** When BNEP connection changes roles after the connection is established
1177 ** we will do an authentication check again on the new role
1179 #ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
1180 #define BNEP_DO_AUTH_FOR_ROLE_SWITCH TRUE
1184 /* Maximum number of protocol filters supported. */
1185 #ifndef BNEP_MAX_PROT_FILTERS
1186 #define BNEP_MAX_PROT_FILTERS 5
1189 /* Maximum number of multicast filters supported. */
1190 #ifndef BNEP_MAX_MULTI_FILTERS
1191 #define BNEP_MAX_MULTI_FILTERS 5
1194 /* Minimum MTU size. */
1195 #ifndef BNEP_MIN_MTU_SIZE
1196 #define BNEP_MIN_MTU_SIZE L2CAP_MTU_SIZE
1199 /* Preferred MTU size. */
1200 #ifndef BNEP_MTU_SIZE
1201 #define BNEP_MTU_SIZE BNEP_MIN_MTU_SIZE
1204 /* Maximum number of buffers allowed in transmit data queue. */
1205 #ifndef BNEP_MAX_XMITQ_DEPTH
1206 #define BNEP_MAX_XMITQ_DEPTH 20
1209 /* Maximum number BNEP of connections supported. */
1210 #ifndef BNEP_MAX_CONNECTIONS
1211 #define BNEP_MAX_CONNECTIONS 7
1215 /******************************************************************************
1219 ******************************************************************************/
1221 #ifndef AVDT_INCLUDED
1222 #define AVDT_INCLUDED TRUE
1225 /* Include reporting capability in AVDTP */
1226 #ifndef AVDT_REPORTING
1227 #define AVDT_REPORTING TRUE
1230 /* Include multiplexing capability in AVDTP */
1231 #ifndef AVDT_MULTIPLEXING
1232 #define AVDT_MULTIPLEXING TRUE
1235 /* Number of simultaneous links to different peer devices. */
1236 #ifndef AVDT_NUM_LINKS
1237 #define AVDT_NUM_LINKS 2
1240 /* Number of simultaneous stream endpoints. */
1241 #ifndef AVDT_NUM_SEPS
1242 #define AVDT_NUM_SEPS 3
1245 /* Number of transport channels setup per media stream(audio or video) */
1246 #ifndef AVDT_NUM_CHANNELS
1248 #if AVDT_REPORTING == TRUE
1249 /* signaling, media and reporting channels */
1250 #define AVDT_NUM_CHANNELS 3
1252 /* signaling and media channels */
1253 #define AVDT_NUM_CHANNELS 2
1254 #endif // AVDT_REPORTING
1256 #endif // AVDT_NUM_CHANNELS
1258 /* Number of transport channels setup by AVDT for all media streams
1259 * AVDT_NUM_CHANNELS * Number of simultaneous streams.
1261 #ifndef AVDT_NUM_TC_TBL
1262 #define AVDT_NUM_TC_TBL 6
1265 /* Maximum size in bytes of the codec capabilities information element. */
1266 #ifndef AVDT_CODEC_SIZE
1267 #define AVDT_CODEC_SIZE 10
1270 /* Maximum size in bytes of the content protection information element. */
1271 #ifndef AVDT_PROTECT_SIZE
1272 #define AVDT_PROTECT_SIZE 90
1275 /* Maximum number of buffers in the fragment queue (for video frames). */
1276 #ifndef AVDT_MAX_FRAG_COUNT
1277 #define AVDT_MAX_FRAG_COUNT 15
1280 /******************************************************************************
1284 ******************************************************************************/
1286 #ifndef PAN_INCLUDED
1287 #define PAN_INCLUDED TRUE
1290 /* This will enable the PANU role */
1291 #ifndef PAN_SUPPORTS_ROLE_PANU
1292 #define PAN_SUPPORTS_ROLE_PANU TRUE
1295 /* This will enable the GN role */
1296 #ifndef PAN_SUPPORTS_ROLE_GN
1297 #define PAN_SUPPORTS_ROLE_GN TRUE
1300 /* This will enable the NAP role */
1301 #ifndef PAN_SUPPORTS_ROLE_NAP
1302 #define PAN_SUPPORTS_ROLE_NAP TRUE
1305 /* This is just for debugging purposes */
1306 #ifndef PAN_SUPPORTS_DEBUG_DUMP
1307 #define PAN_SUPPORTS_DEBUG_DUMP TRUE
1310 /* Maximum number of PAN connections allowed */
1311 #ifndef MAX_PAN_CONNS
1312 #define MAX_PAN_CONNS 7
1315 /* Default service name for NAP role */
1316 #ifndef PAN_NAP_DEFAULT_SERVICE_NAME
1317 #define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service"
1320 /* Default service name for GN role */
1321 #ifndef PAN_GN_DEFAULT_SERVICE_NAME
1322 #define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service"
1325 /* Default service name for PANU role */
1326 #ifndef PAN_PANU_DEFAULT_SERVICE_NAME
1327 #define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service"
1330 /* Default description for NAP role service */
1331 #ifndef PAN_NAP_DEFAULT_DESCRIPTION
1332 #define PAN_NAP_DEFAULT_DESCRIPTION "NAP"
1335 /* Default description for GN role service */
1336 #ifndef PAN_GN_DEFAULT_DESCRIPTION
1337 #define PAN_GN_DEFAULT_DESCRIPTION "GN"
1340 /* Default description for PANU role service */
1341 #ifndef PAN_PANU_DEFAULT_DESCRIPTION
1342 #define PAN_PANU_DEFAULT_DESCRIPTION "PANU"
1345 /* Default Security level for PANU role. */
1346 #ifndef PAN_PANU_SECURITY_LEVEL
1347 #define PAN_PANU_SECURITY_LEVEL 0
1350 /* Default Security level for GN role. */
1351 #ifndef PAN_GN_SECURITY_LEVEL
1352 #define PAN_GN_SECURITY_LEVEL 0
1355 /* Default Security level for NAP role. */
1356 #ifndef PAN_NAP_SECURITY_LEVEL
1357 #define PAN_NAP_SECURITY_LEVEL 0
1360 /******************************************************************************
1364 ******************************************************************************/
1366 #ifndef GAP_INCLUDED
1367 #define GAP_INCLUDED TRUE
1370 /* This is set to enable use of GAP L2CAP connections. */
1371 #ifndef GAP_CONN_INCLUDED
1372 #define GAP_CONN_INCLUDED TRUE
1375 /* This is set to enable posting event for data write */
1376 #ifndef GAP_CONN_POST_EVT_INCLUDED
1377 #define GAP_CONN_POST_EVT_INCLUDED FALSE
1380 /* The maximum number of simultaneous GAP L2CAP connections. */
1381 #ifndef GAP_MAX_CONNECTIONS
1382 #define GAP_MAX_CONNECTIONS 30
1385 /* keep the raw data received from SDP server in database. */
1386 #ifndef SDP_RAW_DATA_INCLUDED
1387 #define SDP_RAW_DATA_INCLUDED TRUE
1390 /* Inquiry duration in 1.28 second units. */
1392 #define SDP_DEBUG TRUE
1395 /******************************************************************************
1399 ******************************************************************************/
1401 #ifndef HID_DEV_SUBCLASS
1402 #define HID_DEV_SUBCLASS COD_MINOR_POINTING
1405 #ifndef HID_CONTROL_BUF_SIZE
1406 #define HID_CONTROL_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1409 #ifndef HID_INTERRUPT_BUF_SIZE
1410 #define HID_INTERRUPT_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1413 /*************************************************************************
1414 ** Definitions for Both HID-Host & Device
1416 #ifndef HID_MAX_SVC_NAME_LEN
1417 #define HID_MAX_SVC_NAME_LEN 32
1420 #ifndef HID_MAX_SVC_DESCR_LEN
1421 #define HID_MAX_SVC_DESCR_LEN 32
1424 #ifndef HID_MAX_PROV_NAME_LEN
1425 #define HID_MAX_PROV_NAME_LEN 32
1428 /*************************************************************************
1429 ** Definitions for HID-Host
1431 #ifndef HID_HOST_INCLUDED
1432 #define HID_HOST_INCLUDED TRUE
1435 #ifndef HID_HOST_MAX_DEVICES
1436 #define HID_HOST_MAX_DEVICES 7
1439 #ifndef HID_HOST_MTU
1440 #define HID_HOST_MTU 640
1443 #ifndef HID_HOST_FLUSH_TO
1444 #define HID_HOST_FLUSH_TO 0xffff
1447 #ifndef HID_HOST_MAX_CONN_RETRY
1448 #define HID_HOST_MAX_CONN_RETRY (3)
1451 #ifndef HID_HOST_REPAGE_WIN
1452 #define HID_HOST_REPAGE_WIN (2)
1455 /*************************************************************************
1458 #ifndef A2D_INCLUDED
1459 #define A2D_INCLUDED TRUE
1462 /******************************************************************************
1466 ******************************************************************************/
1468 /* Number of simultaneous ACL links to different peer devices. */
1469 #ifndef AVCT_NUM_LINKS
1470 #define AVCT_NUM_LINKS 2
1473 /* Number of simultaneous AVCTP connections. */
1474 #ifndef AVCT_NUM_CONN
1475 #define AVCT_NUM_CONN 3
1478 /******************************************************************************
1482 ******************************************************************************/
1484 #ifndef AVRC_METADATA_INCLUDED
1485 #define AVRC_METADATA_INCLUDED TRUE
1488 #ifndef AVRC_ADV_CTRL_INCLUDED
1489 #define AVRC_ADV_CTRL_INCLUDED TRUE
1492 #ifndef AVRC_CTLR_INCLUDED
1493 #define AVRC_CTLR_INCLUDED TRUE
1496 /******************************************************************************
1500 ******************************************************************************/
1501 #ifndef MCA_INCLUDED
1502 #define MCA_INCLUDED FALSE
1505 /* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */
1506 #ifndef MCA_CTRL_MTU
1507 #define MCA_CTRL_MTU 60
1510 /* The maximum number of registered MCAP instances. */
1511 #ifndef MCA_NUM_REGS
1512 #define MCA_NUM_REGS 12
1515 /* The maximum number of control channels (to difference devices) per registered MCAP instances. */
1516 #ifndef MCA_NUM_LINKS
1517 #define MCA_NUM_LINKS 3
1520 /* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */
1521 #ifndef MCA_NUM_DEPS
1522 #define MCA_NUM_DEPS 13
1525 /* The maximum number of MDL link per control channel. */
1526 #ifndef MCA_NUM_MDLS
1527 #define MCA_NUM_MDLS 4
1530 /* Buffer size to reassemble the SDU. */
1531 #ifndef MCA_USER_RX_BUF_SIZE
1532 #define MCA_USER_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1535 /* Buffer size to hold the SDU. */
1536 #ifndef MCA_USER_TX_BUF_SIZE
1537 #define MCA_USER_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1541 * Buffer size used to hold MPS segments during SDU reassembly
1543 #ifndef MCA_FCR_RX_BUF_SIZE
1544 #define MCA_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1548 * Default buffer size used to hold MPS segments used in (re)transmissions.
1549 * The size of each buffer must be able to hold the maximum MPS segment size
1550 * passed in tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) +
1551 * L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1553 #ifndef MCA_FCR_TX_BUF_SIZE
1554 #define MCA_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1557 /* MCAP control channel FCR Option:
1558 Size of the transmission window when using enhanced retransmission mode.
1559 1 is defined by HDP specification for control channel.
1561 #ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
1562 #define MCA_FCR_OPT_TX_WINDOW_SIZE 1
1565 /* MCAP control channel FCR Option:
1566 Number of transmission attempts for a single I-Frame before taking
1567 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1570 0 - infinite retransmissions
1571 1 - single transmission
1573 #ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT
1574 #define MCA_FCR_OPT_MAX_TX_B4_DISCNT 20
1577 /* MCAP control channel FCR Option: Retransmission Timeout
1578 The AVRCP specification set a value in the range of 300 - 2000 ms
1579 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
1580 Range: Minimum 2000 (2 secs) when supporting PBF.
1582 #ifndef MCA_FCR_OPT_RETX_TOUT
1583 #define MCA_FCR_OPT_RETX_TOUT 2000
1586 /* MCAP control channel FCR Option: Monitor Timeout
1587 The AVRCP specification set a value in the range of 300 - 2000 ms
1588 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
1589 Range: Minimum 12000 (12 secs) when supporting PBF.
1591 #ifndef MCA_FCR_OPT_MONITOR_TOUT
1592 #define MCA_FCR_OPT_MONITOR_TOUT 12000
1595 /* MCAP control channel FCR Option: Maximum PDU payload size.
1596 The maximum number of payload octets that the local device can receive in a single PDU.
1598 #ifndef MCA_FCR_OPT_MPS_SIZE
1599 #define MCA_FCR_OPT_MPS_SIZE 1000
1602 /* Shared transport */
1603 #ifndef NFC_SHARED_TRANSPORT_ENABLED
1604 #define NFC_SHARED_TRANSPORT_ENABLED FALSE
1607 /******************************************************************************
1609 ** Sleep Mode (Low Power Mode)
1611 ******************************************************************************/
1613 #ifndef HCILP_INCLUDED
1614 #define HCILP_INCLUDED TRUE
1617 /******************************************************************************
1619 ** APPL - Application Task
1621 ******************************************************************************/
1623 #define L2CAP_FEATURE_REQ_ID 73
1624 #define L2CAP_FEATURE_RSP_ID 173
1626 /******************************************************************************
1630 ******************************************************************************/
1631 /* BTA EIR canned UUID list (default is dynamic) */
1632 #ifndef BTA_EIR_CANNED_UUID_LIST
1633 #define BTA_EIR_CANNED_UUID_LIST FALSE
1636 /* Number of supported customer UUID in EIR */
1637 #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
1638 #define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8
1641 /* CHLD override for bluedroid */
1642 #ifndef BTA_AG_CHLD_VAL_ECC
1643 #define BTA_AG_CHLD_VAL_ECC "(0,1,1x,2,2x,3)"
1646 #ifndef BTA_AG_CHLD_VAL
1647 #define BTA_AG_CHLD_VAL "(0,1,2,3)"
1650 /* Set the CIND to match HFP 1.5 */
1651 #ifndef BTA_AG_CIND_INFO
1652 #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))"
1655 #ifndef BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY
1656 #define BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY TRUE
1659 /******************************************************************************
1661 ** Tracing: Include trace header file here.
1663 ******************************************************************************/
1665 /* Enable/disable BTSnoop memory logging */
1667 #define BTSNOOP_MEM TRUE
1670 #include "bt_trace.h"
1672 #endif /* BT_TARGET_H */