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 #ifndef BTIF_A2DP_SRC_SAMPLING_RATE
130 #define BTIF_A2DP_SRC_SAMPLING_RATE 44100
133 #ifndef BTIF_A2DP_SRC_BIT_DEPTH
134 #define BTIF_A2DP_SRC_BIT_DEPTH 16
137 #ifndef BTIF_A2DP_SRC_NUM_CHANNELS
138 #define BTIF_A2DP_SRC_NUM_CHANNELS 2
141 /* This feature is used to eanble interleaved scan*/
142 #ifndef BTA_HOST_INTERLEAVE_SEARCH
143 #define BTA_HOST_INTERLEAVE_SEARCH FALSE
146 #ifndef BT_USE_TRACES
147 #define BT_USE_TRACES TRUE
150 #ifndef BT_TRACE_VERBOSE
151 #define BT_TRACE_VERBOSE FALSE
154 #ifndef BTA_DM_SDP_DB_SIZE
155 #define BTA_DM_SDP_DB_SIZE 8000
159 #define HL_INCLUDED TRUE
162 #ifndef AG_VOICE_SETTINGS
163 #define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS
166 #ifndef BTIF_DM_OOB_TEST
167 #define BTIF_DM_OOB_TEST TRUE
170 // How long to wait before activating sniff mode after entering the
171 // idle state for FTS, OPS connections
172 #ifndef BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS
173 #define BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 7000
176 //------------------End added from bdroid_buildcfg.h---------------------
179 /******************************************************************************
183 ******************************************************************************/
185 #ifndef BT_DEFAULT_BUFFER_SIZE
186 #define BT_DEFAULT_BUFFER_SIZE (4096 + 16)
189 #ifndef BT_SMALL_BUFFER_SIZE
190 #define BT_SMALL_BUFFER_SIZE 660
193 /* Receives HCI events from the lower-layer. */
194 #ifndef HCI_CMD_BUF_SIZE
195 #define HCI_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
198 /* Sends SDP data packets. */
199 #ifndef SDP_DATA_BUF_SIZE
200 #define SDP_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
203 /* Sends RFCOMM command packets. */
204 #ifndef RFCOMM_CMD_BUF_SIZE
205 #define RFCOMM_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
208 /* Sends RFCOMM data packets. */
209 #ifndef RFCOMM_DATA_BUF_SIZE
210 #define RFCOMM_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
213 /* Sends L2CAP packets to the peer and HCI messages to the controller. */
214 #ifndef L2CAP_CMD_BUF_SIZE
215 #define L2CAP_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
218 #ifndef L2CAP_USER_TX_BUF_SIZE
219 #define L2CAP_USER_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
222 #ifndef L2CAP_USER_RX_BUF_SIZE
223 #define L2CAP_USER_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
226 /* Sends L2CAP segmented packets in ERTM mode */
227 #ifndef L2CAP_FCR_TX_BUF_SIZE
228 #define L2CAP_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
231 /* Receives L2CAP segmented packets in ERTM mode */
232 #ifndef L2CAP_FCR_RX_BUF_SIZE
233 #define L2CAP_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
236 #ifndef L2CAP_FCR_ERTM_BUF_SIZE
237 #define L2CAP_FCR_ERTM_BUF_SIZE (10240 + 24)
240 /* Number of ACL buffers to assign to LE */
242 * TODO: Do we need this?
243 * It was used when the HCI buffers were shared with BR/EDR.
245 #ifndef L2C_DEF_NUM_BLE_BUF_SHARED
246 #define L2C_DEF_NUM_BLE_BUF_SHARED 1
249 /* Used by BTM when it sends HCI commands to the controller. */
250 #ifndef BTM_CMD_BUF_SIZE
251 #define BTM_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
254 #ifndef OBX_LRG_DATA_BUF_SIZE
255 #define OBX_LRG_DATA_BUF_SIZE (8080 + 26)
258 /* Used to send data to L2CAP. */
259 #ifndef GAP_DATA_BUF_SIZE
260 #define GAP_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
264 #define SPP_DB_SIZE BT_DEFAULT_BUFFER_SIZE
267 /* BNEP data and protocol messages. */
268 #ifndef BNEP_BUF_SIZE
269 #define BNEP_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
272 /* AVDTP buffer size for protocol messages */
273 #ifndef AVDT_CMD_BUF_SIZE
274 #define AVDT_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
277 /* AVDTP buffer size for media packets in case of fragmentation */
278 #ifndef AVDT_DATA_BUF_SIZE
279 #define AVDT_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
283 #define PAN_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
286 /* Maximum number of buffers to allocate for PAN */
288 #define PAN_BUF_MAX 100
291 /* AVCTP buffer size for protocol messages */
292 #ifndef AVCT_CMD_BUF_SIZE
293 #define AVCT_CMD_BUF_SIZE 288
296 /* AVRCP buffer size for protocol messages */
297 #ifndef AVRC_CMD_BUF_SIZE
298 #define AVRC_CMD_BUF_SIZE 288
301 /* AVRCP Metadata buffer size for protocol messages */
302 #ifndef AVRC_META_CMD_BUF_SIZE
303 #define AVRC_META_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
306 /* AVRCP buffer size for browsing channel messages */
307 #ifndef AVRC_BROWSE_BUF_SIZE
308 #define AVRC_BROWSE_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
311 #ifndef BTA_HL_USER_TX_BUF_SIZE
312 #define BTA_HL_USER_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
315 #ifndef BTA_HL_LRG_DATA_BUF_SIZE
316 #define BTA_HL_LRG_DATA_BUF_SIZE (10240 + 24)
319 /* GATT Server Database buffer size */
320 #ifndef GATT_DB_BUF_SIZE
321 #define GATT_DB_BUF_SIZE 128
324 /* GATT Data sending buffer size */
325 #ifndef GATT_DATA_BUF_SIZE
326 #define GATT_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
329 /******************************************************************************
331 ** Lower Layer Interface
333 ******************************************************************************/
335 /* Macro for allocating buffer for HCI commands */
336 #ifndef HCI_GET_CMD_BUF
337 #if (!defined(HCI_USE_VARIABLE_SIZE_CMD_BUF) || (HCI_USE_VARIABLE_SIZE_CMD_BUF == FALSE))
338 /* Allocate fixed-size HCI_CMD buffer (default case) */
339 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)osi_malloc(HCI_CMD_BUF_SIZE))
341 /* Allocate smallest possible buffer (for platforms with limited RAM) */
342 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)osi_malloc(BT_HDR_SIZE + HCIC_PREAMBLE_SIZE + (paramlen)))
344 #endif /* HCI_GET_CMD_BUF */
346 /******************************************************************************
350 ******************************************************************************/
352 /* Cancel Inquiry on incoming SSP */
353 #ifndef BTM_NO_SSP_ON_INQUIRY
354 #define BTM_NO_SSP_ON_INQUIRY FALSE
357 /* Includes SCO if TRUE */
358 #ifndef BTM_SCO_INCLUDED
359 #define BTM_SCO_INCLUDED TRUE /* TRUE includes SCO code */
362 /* Includes SCO if TRUE */
363 #ifndef BTM_SCO_HCI_INCLUDED
364 #define BTM_SCO_HCI_INCLUDED FALSE /* TRUE includes SCO over HCI code */
367 /* Includes WBS if TRUE */
368 #ifndef BTM_WBS_INCLUDED
369 #define BTM_WBS_INCLUDED FALSE /* TRUE includes WBS code */
372 /* This is used to work around a controller bug that doesn't like Disconnect
373 ** issued while there is a role switch in progress
375 #ifndef BTM_DISC_DURING_RS
376 #define BTM_DISC_DURING_RS TRUE
379 /**************************
380 ** Initial SCO TX credit
381 *************************/
382 /* max TX SCO data packet size */
383 #ifndef BTM_SCO_DATA_SIZE_MAX
384 #define BTM_SCO_DATA_SIZE_MAX 240
387 /* The size in bytes of the BTM inquiry database. */
388 #ifndef BTM_INQ_DB_SIZE
389 #define BTM_INQ_DB_SIZE 40
392 /* The default scan mode */
393 #ifndef BTM_DEFAULT_SCAN_TYPE
394 #define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED
397 /* Should connections to unknown devices be allowed when not discoverable? */
398 #ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
399 #define BTM_ALLOW_CONN_IF_NONDISCOVER TRUE
402 /* Sets the Page_Scan_Window: the length of time that the device is performing a page scan. */
403 #ifndef BTM_DEFAULT_CONN_WINDOW
404 #define BTM_DEFAULT_CONN_WINDOW 0x0012
407 /* Sets the Page_Scan_Activity: the interval between the start of two consecutive page scans. */
408 #ifndef BTM_DEFAULT_CONN_INTERVAL
409 #define BTM_DEFAULT_CONN_INTERVAL 0x0800
412 /* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
413 #ifndef BTM_DEFAULT_DISC_WINDOW
414 #define BTM_DEFAULT_DISC_WINDOW 0x0012
417 /* When automatic inquiry scan is enabled, this sets the inquiry scan interval. */
418 #ifndef BTM_DEFAULT_DISC_INTERVAL
419 #define BTM_DEFAULT_DISC_INTERVAL 0x0800
422 /* Default class of device
423 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
425 * SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
426 * MAJOR_CLASS:0x02 - PHONE
427 * MINOR_CLASS:0x0C - SMART_PHONE
431 #define BTA_DM_COD {0x5A, 0x02, 0x0C}
434 /* The number of SCO links. */
435 #ifndef BTM_MAX_SCO_LINKS
436 #define BTM_MAX_SCO_LINKS 3
439 /* The preferred type of SCO links (2-eSCO, 0-SCO). */
440 #ifndef BTM_DEFAULT_SCO_MODE
441 #define BTM_DEFAULT_SCO_MODE 2
444 /* The number of security records for peer devices. */
445 #ifndef BTM_SEC_MAX_DEVICE_RECORDS
446 #define BTM_SEC_MAX_DEVICE_RECORDS 100
449 /* The number of security records for services. */
450 #ifndef BTM_SEC_MAX_SERVICE_RECORDS
451 #define BTM_SEC_MAX_SERVICE_RECORDS 32
454 /* If True, force a retrieval of remote device name for each bond in case it's changed */
455 #ifndef BTM_SEC_FORCE_RNR_FOR_DBOND
456 #define BTM_SEC_FORCE_RNR_FOR_DBOND FALSE
459 /* Maximum device name length used in btm database. */
460 #ifndef BTM_MAX_REM_BD_NAME_LEN
461 #define BTM_MAX_REM_BD_NAME_LEN 248
464 /* Maximum local device name length stored btm database.
465 '0' disables storage of the local name in BTM */
466 #ifndef BTM_MAX_LOC_BD_NAME_LEN
467 #define BTM_MAX_LOC_BD_NAME_LEN 248
470 /* Fixed Default String. When this is defined as null string, the device's
471 * product model name is used as the default local name.
473 #ifndef BTM_DEF_LOCAL_NAME
474 #define BTM_DEF_LOCAL_NAME ""
477 /* Maximum service name stored with security authorization (0 if not needed) */
478 #ifndef BTM_SEC_SERVICE_NAME_LEN
479 #define BTM_SEC_SERVICE_NAME_LEN BT_MAX_SERVICE_NAME_LEN
482 /* Maximum length of the service name. */
483 #ifndef BT_MAX_SERVICE_NAME_LEN
484 #define BT_MAX_SERVICE_NAME_LEN 21
487 /* ACL buffer size in HCI Host Buffer Size command. */
488 #ifndef BTM_ACL_BUF_SIZE
489 #define BTM_ACL_BUF_SIZE 0
492 /* The maximum number of clients that can register with the power manager. */
493 #ifndef BTM_MAX_PM_RECORDS
494 #define BTM_MAX_PM_RECORDS 2
497 /* This is set to show debug trace messages for the power manager. */
499 #define BTM_PM_DEBUG FALSE
502 /* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */
503 #ifndef BTM_SCO_WAKE_PARKED_LINK
504 #define BTM_SCO_WAKE_PARKED_LINK TRUE
507 /* If the user does not respond to security process requests within this many seconds,
508 * a negative response would be sent automatically.
509 * 30 is LMP response timeout value */
510 #ifndef BTM_SEC_TIMEOUT_VALUE
511 #define BTM_SEC_TIMEOUT_VALUE 35
514 /* Maximum number of callbacks that can be registered using BTM_RegisterForVSEvents */
515 #ifndef BTM_MAX_VSE_CALLBACKS
516 #define BTM_MAX_VSE_CALLBACKS 3
519 /******************************************
521 *******************************************/
522 /* This is set to TRUE if the FEC is required for EIR packet. */
523 #ifndef BTM_EIR_DEFAULT_FEC_REQUIRED
524 #define BTM_EIR_DEFAULT_FEC_REQUIRED TRUE
527 /* The IO capability of the local device (for Simple Pairing) */
528 #ifndef BTM_LOCAL_IO_CAPS
529 #define BTM_LOCAL_IO_CAPS BTM_IO_CAP_IO
532 #ifndef BTM_LOCAL_IO_CAPS_BLE
533 #define BTM_LOCAL_IO_CAPS_BLE BTM_IO_CAP_KBDISP
536 /* The default MITM Protection Requirement (for Simple Pairing)
537 * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
538 #ifndef BTM_DEFAULT_AUTH_REQ
539 #define BTM_DEFAULT_AUTH_REQ BTM_AUTH_SP_NO
542 /* The default MITM Protection Requirement for dedicated bonding using Simple Pairing
543 * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
544 #ifndef BTM_DEFAULT_DD_AUTH_REQ
545 #define BTM_DEFAULT_DD_AUTH_REQ BTM_AUTH_AP_YES
548 /* TRUE to include Sniff Subrating */
549 #ifndef BTM_SSR_INCLUDED
550 #define BTM_SSR_INCLUDED TRUE
553 /*************************
554 ** End of Lisbon Features
555 **************************/
557 /* 4.1/4.2 secure connections feature */
558 #ifndef SC_MODE_INCLUDED
559 #define SC_MODE_INCLUDED TRUE
562 /* Used for conformance testing ONLY */
563 #ifndef BTM_BLE_CONFORMANCE_TESTING
564 #define BTM_BLE_CONFORMANCE_TESTING FALSE
567 /******************************************************************************
571 ******************************************************************************/
573 /* The maximum number of simultaneous links that L2CAP can support. */
574 #ifndef MAX_ACL_CONNECTIONS
575 #define MAX_L2CAP_LINKS 7
577 #define MAX_L2CAP_LINKS MAX_ACL_CONNECTIONS
580 /* The maximum number of simultaneous channels that L2CAP can support. */
581 #ifndef MAX_L2CAP_CHANNELS
582 #define MAX_L2CAP_CHANNELS 16
585 /* The maximum number of simultaneous applications that can register with L2CAP. */
586 #ifndef MAX_L2CAP_CLIENTS
587 #define MAX_L2CAP_CLIENTS 15
590 /* The number of seconds of link inactivity before a link is disconnected. */
591 #ifndef L2CAP_LINK_INACTIVITY_TOUT
592 #define L2CAP_LINK_INACTIVITY_TOUT 4
595 /* The number of seconds of link inactivity after bonding before a link is disconnected. */
596 #ifndef L2CAP_BONDING_TIMEOUT
597 #define L2CAP_BONDING_TIMEOUT 3
600 /* The time from the HCI connection complete to disconnect if no channel is established. */
601 #ifndef L2CAP_LINK_STARTUP_TOUT
602 #define L2CAP_LINK_STARTUP_TOUT 60
605 /* The L2CAP MTU; must be in accord with the HCI ACL buffer size. */
606 #ifndef L2CAP_MTU_SIZE
607 #define L2CAP_MTU_SIZE 1691
611 * The L2CAP MPS over Bluetooth; must be in accord with the FCR tx buffer size
612 * and ACL down buffer size.
614 #ifndef L2CAP_MPS_OVER_BR_EDR
615 #define L2CAP_MPS_OVER_BR_EDR 1010
618 /* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */
619 #ifndef L2CAP_HOST_FC_ACL_BUFS
620 #define L2CAP_HOST_FC_ACL_BUFS 20
623 /* This is set to enable L2CAP to take the ACL link out of park mode when ACL data is to be sent. */
624 #ifndef L2CAP_WAKE_PARKED_LINK
625 #define L2CAP_WAKE_PARKED_LINK TRUE
628 /* Whether link wants to be the master or the slave. */
629 #ifndef L2CAP_DESIRED_LINK_ROLE
630 #define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_SLAVE
633 /* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
634 #ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
635 #define L2CAP_NON_FLUSHABLE_PB_INCLUDED TRUE
638 /* Minimum number of ACL credit for high priority link */
639 #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
640 #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5
643 /* used for monitoring HCI ACL credit management */
644 #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
645 #define L2CAP_HCI_FLOW_CONTROL_DEBUG TRUE
648 /* Unicast Connectionless Data */
649 #ifndef L2CAP_UCD_INCLUDED
650 #define L2CAP_UCD_INCLUDED FALSE
653 /* Unicast Connectionless Data MTU */
654 #ifndef L2CAP_UCD_MTU
655 #define L2CAP_UCD_MTU L2CAP_MTU_SIZE
658 /* Unicast Connectionless Data Idle Timeout */
659 #ifndef L2CAP_UCD_IDLE_TIMEOUT
660 #define L2CAP_UCD_IDLE_TIMEOUT 2
663 /* Unicast Connectionless Data Idle Timeout */
664 #ifndef L2CAP_UCD_CH_PRIORITY
665 #define L2CAP_UCD_CH_PRIORITY L2CAP_CHNL_PRIORITY_MEDIUM
668 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
669 /* Excluding L2CAP signaling channel and UCD */
670 #ifndef L2CAP_NUM_FIXED_CHNLS
671 #define L2CAP_NUM_FIXED_CHNLS 32
674 /* First fixed channel supported */
675 #ifndef L2CAP_FIRST_FIXED_CHNL
676 #define L2CAP_FIRST_FIXED_CHNL 4
679 #ifndef L2CAP_LAST_FIXED_CHNL
680 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
683 /* Round Robin service channels in link */
684 #ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
685 #define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE TRUE
688 /* used for monitoring eL2CAP data flow */
689 #ifndef L2CAP_ERTM_STATS
690 #define L2CAP_ERTM_STATS FALSE
693 /* Used for conformance testing ONLY: When TRUE lets scriptwrapper overwrite info response */
694 #ifndef L2CAP_CONFORMANCE_TESTING
695 #define L2CAP_CONFORMANCE_TESTING FALSE
699 * Max bytes per connection to buffer locally before dropping the
700 * connection if local client does not receive it - default is 1MB
702 #ifndef L2CAP_MAX_RX_BUFFER
703 #define L2CAP_MAX_RX_BUFFER 0x100000
707 /******************************************************************************
711 ******************************************************************************/
714 #define BLE_INCLUDED TRUE
717 #ifndef BLE_ANDROID_CONTROLLER_SCAN_FILTER
718 #define BLE_ANDROID_CONTROLLER_SCAN_FILTER TRUE
721 #ifndef LOCAL_BLE_CONTROLLER_ID
722 #define LOCAL_BLE_CONTROLLER_ID (1)
726 * Toggles support for general LE privacy features such as remote address
727 * resolution, local address rotation etc.
729 #ifndef BLE_PRIVACY_SPT
730 #define BLE_PRIVACY_SPT TRUE
734 * Enables or disables support for local privacy (ex. address rotation)
736 #ifndef BLE_LOCAL_PRIVACY_ENABLED
737 #define BLE_LOCAL_PRIVACY_ENABLED TRUE
741 * Toggles support for vendor specific extensions such as RPA offloading,
742 * feature discovery, multi-adv etc.
744 #ifndef BLE_VND_INCLUDED
745 #define BLE_VND_INCLUDED FALSE
748 #ifndef BTM_BLE_ADV_TX_POWER
749 #define BTM_BLE_ADV_TX_POWER {-21, -15, -7, 1, 9}
753 #ifndef BLE_BATCH_SCAN_INCLUDED
754 #define BLE_BATCH_SCAN_INCLUDED TRUE
757 /******************************************************************************
759 ** ATT/GATT Protocol/Profile Settings
761 ******************************************************************************/
762 #ifndef BTA_GATT_INCLUDED
763 #if BLE_INCLUDED == TRUE
764 #define BTA_GATT_INCLUDED TRUE
766 #define BTA_GATT_INCLUDED FALSE
770 #if BTA_GATT_INCLUDED == TRUE && BLE_INCLUDED == FALSE
771 #error "can't have GATT without BLE"
774 #ifndef BLE_LLT_INCLUDED
775 #define BLE_LLT_INCLUDED TRUE
779 #define ATT_INCLUDED TRUE
783 #define ATT_DEBUG TRUE
786 #ifndef BLE_PERIPHERAL_MODE_SUPPORT
787 #define BLE_PERIPHERAL_MODE_SUPPORT TRUE
790 #ifndef BLE_DELAY_REQUEST_ENC
791 /* This flag is to work around IPHONE problem, We need to wait for iPhone ready
792 before send encryption request to iPhone */
793 #define BLE_DELAY_REQUEST_ENC FALSE
796 #ifndef GAP_TRANSPORT_SUPPORTED
797 #define GAP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
800 #ifndef GATTP_TRANSPORT_SUPPORTED
801 #define GATTP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
804 #ifndef GATT_MAX_SR_PROFILES
805 #define GATT_MAX_SR_PROFILES 32 /* max is 32 */
808 #ifndef GATT_MAX_APPS
809 #define GATT_MAX_APPS 32 /* note: 2 apps used internally GATT and GAP */
812 #ifndef GATT_MAX_PHY_CHANNEL
813 #define GATT_MAX_PHY_CHANNEL 7
816 /* Used for conformance testing ONLY */
817 #ifndef GATT_CONFORMANCE_TESTING
818 #define GATT_CONFORMANCE_TESTING FALSE
821 /* number of background connection device allowence, ideally to be the same as WL size
823 #ifndef GATT_MAX_BG_CONN_DEV
824 #define GATT_MAX_BG_CONN_DEV 32
827 /******************************************************************************
831 ******************************************************************************/
833 #if BLE_INCLUDED == TRUE
834 #define SMP_INCLUDED TRUE
836 #define SMP_INCLUDED FALSE
840 #if SMP_INCLUDED == TRUE && BLE_INCLUDED == FALSE
841 #error "can't have SMP without BLE"
845 #define SMP_DEBUG FALSE
848 #ifndef SMP_DEFAULT_AUTH_REQ
849 #define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY
852 #ifndef SMP_MAX_ENC_KEY_SIZE
853 #define SMP_MAX_ENC_KEY_SIZE 16
856 #ifndef SMP_MIN_ENC_KEY_SIZE
857 #define SMP_MIN_ENC_KEY_SIZE 7
860 /* minimum link timeout after SMP pairing is done, leave room for key exchange
861 and racing condition for the following service connection.
862 Prefer greater than 0 second, and no less than default inactivity link idle
863 timer(L2CAP_LINK_INACTIVITY_TOUT) in l2cap) */
864 #ifndef SMP_LINK_TOUT_MIN
865 #if (L2CAP_LINK_INACTIVITY_TOUT > 0)
866 #define SMP_LINK_TOUT_MIN L2CAP_LINK_INACTIVITY_TOUT
868 #define SMP_LINK_TOUT_MIN 2
871 /******************************************************************************
875 ******************************************************************************/
877 /* This is set to enable SDP server functionality. */
878 #ifndef SDP_SERVER_ENABLED
879 #define SDP_SERVER_ENABLED TRUE
882 /* The maximum number of SDP records the server can support. */
883 #ifndef SDP_MAX_RECORDS
884 #define SDP_MAX_RECORDS 30
887 /* The maximum number of attributes in each record. */
888 #ifndef SDP_MAX_REC_ATTR
889 #define SDP_MAX_REC_ATTR 25
892 #ifndef SDP_MAX_PAD_LEN
893 #define SDP_MAX_PAD_LEN 600
896 /* The maximum length, in bytes, of an attribute. */
897 #ifndef SDP_MAX_ATTR_LEN
898 #define SDP_MAX_ATTR_LEN 400
901 /* The maximum number of attribute filters supported by SDP databases. */
902 #ifndef SDP_MAX_ATTR_FILTERS
903 #define SDP_MAX_ATTR_FILTERS 15
906 /* The maximum number of UUID filters supported by SDP databases. */
907 #ifndef SDP_MAX_UUID_FILTERS
908 #define SDP_MAX_UUID_FILTERS 3
911 /* This is set to enable SDP client functionality. */
912 #ifndef SDP_CLIENT_ENABLED
913 #define SDP_CLIENT_ENABLED TRUE
916 /* The maximum number of record handles retrieved in a search. */
917 #ifndef SDP_MAX_DISC_SERVER_RECS
918 #define SDP_MAX_DISC_SERVER_RECS 21
921 /* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */
922 #ifndef SDP_MAX_LIST_BYTE_COUNT
923 #define SDP_MAX_LIST_BYTE_COUNT 4096
926 /* The maximum number of parameters in an SDP protocol element. */
927 #ifndef SDP_MAX_PROTOCOL_PARAMS
928 #define SDP_MAX_PROTOCOL_PARAMS 2
931 /* The maximum number of simultaneous client and server connections. */
932 #ifndef SDP_MAX_CONNECTIONS
933 #define SDP_MAX_CONNECTIONS 4
936 /* The MTU size for the L2CAP configuration. */
938 #define SDP_MTU_SIZE 672
941 /* The flush timeout for the L2CAP configuration. */
943 #define SDP_FLUSH_TO 0xFFFF
946 /* The name for security authorization. */
947 #ifndef SDP_SERVICE_NAME
948 #define SDP_SERVICE_NAME "Service Discovery"
951 /* The security level for BTM. */
952 #ifndef SDP_SECURITY_LEVEL
953 #define SDP_SECURITY_LEVEL BTM_SEC_NONE
956 /******************************************************************************
960 ******************************************************************************/
962 /* The maximum number of ports supported. */
963 #ifndef MAX_RFC_PORTS
964 #define MAX_RFC_PORTS 30
967 /* The maximum simultaneous links to different devices. */
968 #ifndef MAX_ACL_CONNECTIONS
969 #define MAX_BD_CONNECTIONS 7
971 #define MAX_BD_CONNECTIONS MAX_ACL_CONNECTIONS
974 /* The port receive queue low watermark level, in bytes. */
975 #ifndef PORT_RX_LOW_WM
976 #define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
979 /* The port receive queue high watermark level, in bytes. */
980 #ifndef PORT_RX_HIGH_WM
981 #define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
984 /* The port receive queue critical watermark level, in bytes. */
985 #ifndef PORT_RX_CRITICAL_WM
986 #define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
989 /* The port receive queue low watermark level, in number of buffers. */
990 #ifndef PORT_RX_BUF_LOW_WM
991 #define PORT_RX_BUF_LOW_WM 4
994 /* The port receive queue high watermark level, in number of buffers. */
995 #ifndef PORT_RX_BUF_HIGH_WM
996 #define PORT_RX_BUF_HIGH_WM 10
999 /* The port receive queue critical watermark level, in number of buffers. */
1000 #ifndef PORT_RX_BUF_CRITICAL_WM
1001 #define PORT_RX_BUF_CRITICAL_WM 15
1004 /* The port transmit queue high watermark level, in bytes. */
1005 #ifndef PORT_TX_HIGH_WM
1006 #define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
1009 /* The port transmit queue critical watermark level, in bytes. */
1010 #ifndef PORT_TX_CRITICAL_WM
1011 #define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
1014 /* The port transmit queue high watermark level, in number of buffers. */
1015 #ifndef PORT_TX_BUF_HIGH_WM
1016 #define PORT_TX_BUF_HIGH_WM 10
1019 /* The port transmit queue high watermark level, in number of buffers. */
1020 #ifndef PORT_TX_BUF_CRITICAL_WM
1021 #define PORT_TX_BUF_CRITICAL_WM 15
1024 /* The RFCOMM multiplexer preferred flow control mechanism. */
1025 #ifndef PORT_FC_DEFAULT
1026 #define PORT_FC_DEFAULT PORT_FC_CREDIT
1029 /* The maximum number of credits receiver sends to peer when using credit-based flow control. */
1030 #ifndef PORT_CREDIT_RX_MAX
1031 #define PORT_CREDIT_RX_MAX 16
1034 /* The credit low watermark level. */
1035 #ifndef PORT_CREDIT_RX_LOW
1036 #define PORT_CREDIT_RX_LOW 8
1039 /******************************************************************************
1043 ******************************************************************************/
1045 /* The maximum number of registered servers. */
1046 #ifndef OBX_NUM_SERVERS
1047 #define OBX_NUM_SERVERS 12
1050 /* The maximum number of active clients. */
1051 #ifndef OBX_NUM_CLIENTS
1052 #define OBX_NUM_CLIENTS 8
1056 * Buffer size to reassemble the SDU.
1057 * It will allow buffers to be used that are larger than the L2CAP_MAX_MTU.
1059 #ifndef OBX_USER_RX_BUF_SIZE
1060 #define OBX_USER_RX_BUF_SIZE OBX_LRG_DATA_BUF_SIZE
1064 * Buffer size to hold the SDU.
1065 * It will allow buffers to be used that are larger than the L2CAP_MAX_MTU.
1067 #ifndef OBX_USER_TX_BUF_SIZE
1068 #define OBX_USER_TX_BUF_SIZE OBX_LRG_DATA_BUF_SIZE
1071 /* Buffer size used to hold MPS segments during SDU reassembly. */
1072 #ifndef OBX_FCR_RX_BUF_SIZE
1073 #define OBX_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1077 * Buffer size used to hold MPS segments used in (re)transmissions.
1078 * The size of each buffer must be able to hold the maximum MPS segment size
1079 * passed in L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) +
1080 * L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1082 #ifndef OBX_FCR_TX_BUF_SIZE
1083 #define OBX_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1087 * Size of the transmission window when using enhanced retransmission mode.
1088 * Not used in basic and streaming modes. Range: 1 - 63
1090 #ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR
1091 #define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 20
1095 * Number of transmission attempts for a single I-Frame before taking
1096 * Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1099 * 0 - infinite retransmissions
1100 * 1 - single transmission
1102 #ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT
1103 #define OBX_FCR_OPT_MAX_TX_B4_DISCNT 20
1107 * Retransmission Timeout
1108 * Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF.
1110 #ifndef OBX_FCR_OPT_RETX_TOUT
1111 #define OBX_FCR_OPT_RETX_TOUT 2000
1116 * Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
1118 #ifndef OBX_FCR_OPT_MONITOR_TOUT
1119 #define OBX_FCR_OPT_MONITOR_TOUT 12000
1123 * Maximum PDU payload size.
1124 * Suggestion: The maximum amount of data that will fit into a 3-DH5 packet.
1127 #ifndef OBX_FCR_OPT_MAX_PDU_SIZE
1128 #define OBX_FCR_OPT_MAX_PDU_SIZE L2CAP_MPS_OVER_BR_EDR
1132 /******************************************************************************
1136 ******************************************************************************/
1138 #ifndef BNEP_INCLUDED
1139 #define BNEP_INCLUDED TRUE
1142 /* BNEP status API call is used mainly to get the L2CAP handle */
1143 #ifndef BNEP_SUPPORTS_STATUS_API
1144 #define BNEP_SUPPORTS_STATUS_API TRUE
1148 ** When BNEP connection changes roles after the connection is established
1149 ** we will do an authentication check again on the new role
1151 #ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
1152 #define BNEP_DO_AUTH_FOR_ROLE_SWITCH TRUE
1156 /* Maximum number of protocol filters supported. */
1157 #ifndef BNEP_MAX_PROT_FILTERS
1158 #define BNEP_MAX_PROT_FILTERS 5
1161 /* Maximum number of multicast filters supported. */
1162 #ifndef BNEP_MAX_MULTI_FILTERS
1163 #define BNEP_MAX_MULTI_FILTERS 5
1166 /* Minimum MTU size. */
1167 #ifndef BNEP_MIN_MTU_SIZE
1168 #define BNEP_MIN_MTU_SIZE L2CAP_MTU_SIZE
1171 /* Preferred MTU size. */
1172 #ifndef BNEP_MTU_SIZE
1173 #define BNEP_MTU_SIZE BNEP_MIN_MTU_SIZE
1176 /* Maximum number of buffers allowed in transmit data queue. */
1177 #ifndef BNEP_MAX_XMITQ_DEPTH
1178 #define BNEP_MAX_XMITQ_DEPTH 20
1181 /* Maximum number BNEP of connections supported. */
1182 #ifndef BNEP_MAX_CONNECTIONS
1183 #define BNEP_MAX_CONNECTIONS 7
1187 /******************************************************************************
1191 ******************************************************************************/
1193 #ifndef AVDT_INCLUDED
1194 #define AVDT_INCLUDED TRUE
1197 /* Include reporting capability in AVDTP */
1198 #ifndef AVDT_REPORTING
1199 #define AVDT_REPORTING TRUE
1202 /* Include multiplexing capability in AVDTP */
1203 #ifndef AVDT_MULTIPLEXING
1204 #define AVDT_MULTIPLEXING TRUE
1207 /* Number of simultaneous links to different peer devices. */
1208 #ifndef AVDT_NUM_LINKS
1209 #define AVDT_NUM_LINKS 2
1212 /* Number of simultaneous stream endpoints. */
1213 #ifndef AVDT_NUM_SEPS
1214 #define AVDT_NUM_SEPS 3
1217 /* Number of transport channels setup per media stream(audio or video) */
1218 #ifndef AVDT_NUM_CHANNELS
1220 #if AVDT_REPORTING == TRUE
1221 /* signaling, media and reporting channels */
1222 #define AVDT_NUM_CHANNELS 3
1224 /* signaling and media channels */
1225 #define AVDT_NUM_CHANNELS 2
1226 #endif // AVDT_REPORTING
1228 #endif // AVDT_NUM_CHANNELS
1230 /* Number of transport channels setup by AVDT for all media streams
1231 * AVDT_NUM_CHANNELS * Number of simultaneous streams.
1233 #ifndef AVDT_NUM_TC_TBL
1234 #define AVDT_NUM_TC_TBL 6
1237 /* Maximum size in bytes of the codec capabilities information element. */
1238 #ifndef AVDT_CODEC_SIZE
1239 #define AVDT_CODEC_SIZE 10
1242 /* Maximum size in bytes of the content protection information element. */
1243 #ifndef AVDT_PROTECT_SIZE
1244 #define AVDT_PROTECT_SIZE 90
1247 /* Maximum number of buffers in the fragment queue (for video frames). */
1248 #ifndef AVDT_MAX_FRAG_COUNT
1249 #define AVDT_MAX_FRAG_COUNT 15
1252 /******************************************************************************
1256 ******************************************************************************/
1258 #ifndef PAN_INCLUDED
1259 #define PAN_INCLUDED TRUE
1262 /* This will enable the PANU role */
1263 #ifndef PAN_SUPPORTS_ROLE_PANU
1264 #define PAN_SUPPORTS_ROLE_PANU TRUE
1267 /* This will enable the GN role */
1268 #ifndef PAN_SUPPORTS_ROLE_GN
1269 #define PAN_SUPPORTS_ROLE_GN TRUE
1272 /* This will enable the NAP role */
1273 #ifndef PAN_SUPPORTS_ROLE_NAP
1274 #define PAN_SUPPORTS_ROLE_NAP TRUE
1277 /* This is just for debugging purposes */
1278 #ifndef PAN_SUPPORTS_DEBUG_DUMP
1279 #define PAN_SUPPORTS_DEBUG_DUMP TRUE
1282 /* Maximum number of PAN connections allowed */
1283 #ifndef MAX_PAN_CONNS
1284 #define MAX_PAN_CONNS 7
1287 /* Default service name for NAP role */
1288 #ifndef PAN_NAP_DEFAULT_SERVICE_NAME
1289 #define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service"
1292 /* Default service name for GN role */
1293 #ifndef PAN_GN_DEFAULT_SERVICE_NAME
1294 #define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service"
1297 /* Default service name for PANU role */
1298 #ifndef PAN_PANU_DEFAULT_SERVICE_NAME
1299 #define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service"
1302 /* Default description for NAP role service */
1303 #ifndef PAN_NAP_DEFAULT_DESCRIPTION
1304 #define PAN_NAP_DEFAULT_DESCRIPTION "NAP"
1307 /* Default description for GN role service */
1308 #ifndef PAN_GN_DEFAULT_DESCRIPTION
1309 #define PAN_GN_DEFAULT_DESCRIPTION "GN"
1312 /* Default description for PANU role service */
1313 #ifndef PAN_PANU_DEFAULT_DESCRIPTION
1314 #define PAN_PANU_DEFAULT_DESCRIPTION "PANU"
1317 /* Default Security level for PANU role. */
1318 #ifndef PAN_PANU_SECURITY_LEVEL
1319 #define PAN_PANU_SECURITY_LEVEL 0
1322 /* Default Security level for GN role. */
1323 #ifndef PAN_GN_SECURITY_LEVEL
1324 #define PAN_GN_SECURITY_LEVEL 0
1327 /* Default Security level for NAP role. */
1328 #ifndef PAN_NAP_SECURITY_LEVEL
1329 #define PAN_NAP_SECURITY_LEVEL 0
1332 /******************************************************************************
1336 ******************************************************************************/
1338 #ifndef GAP_INCLUDED
1339 #define GAP_INCLUDED TRUE
1342 /* This is set to enable use of GAP L2CAP connections. */
1343 #ifndef GAP_CONN_INCLUDED
1344 #define GAP_CONN_INCLUDED TRUE
1347 /* This is set to enable posting event for data write */
1348 #ifndef GAP_CONN_POST_EVT_INCLUDED
1349 #define GAP_CONN_POST_EVT_INCLUDED FALSE
1352 /* The maximum number of simultaneous GAP L2CAP connections. */
1353 #ifndef GAP_MAX_CONNECTIONS
1354 #define GAP_MAX_CONNECTIONS 30
1357 /* keep the raw data received from SDP server in database. */
1358 #ifndef SDP_RAW_DATA_INCLUDED
1359 #define SDP_RAW_DATA_INCLUDED TRUE
1362 /* Inquiry duration in 1.28 second units. */
1364 #define SDP_DEBUG TRUE
1367 /******************************************************************************
1371 ******************************************************************************/
1373 #ifndef HID_DEV_SUBCLASS
1374 #define HID_DEV_SUBCLASS COD_MINOR_POINTING
1377 #ifndef HID_CONTROL_BUF_SIZE
1378 #define HID_CONTROL_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1381 #ifndef HID_INTERRUPT_BUF_SIZE
1382 #define HID_INTERRUPT_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1385 /*************************************************************************
1386 ** Definitions for Both HID-Host & Device
1388 #ifndef HID_MAX_SVC_NAME_LEN
1389 #define HID_MAX_SVC_NAME_LEN 32
1392 #ifndef HID_MAX_SVC_DESCR_LEN
1393 #define HID_MAX_SVC_DESCR_LEN 32
1396 #ifndef HID_MAX_PROV_NAME_LEN
1397 #define HID_MAX_PROV_NAME_LEN 32
1400 /*************************************************************************
1401 ** Definitions for HID-Host
1403 #ifndef HID_HOST_INCLUDED
1404 #define HID_HOST_INCLUDED TRUE
1407 #ifndef HID_HOST_MAX_DEVICES
1408 #define HID_HOST_MAX_DEVICES 7
1411 #ifndef HID_HOST_MTU
1412 #define HID_HOST_MTU 640
1415 #ifndef HID_HOST_FLUSH_TO
1416 #define HID_HOST_FLUSH_TO 0xffff
1419 #ifndef HID_HOST_MAX_CONN_RETRY
1420 #define HID_HOST_MAX_CONN_RETRY (3)
1423 #ifndef HID_HOST_REPAGE_WIN
1424 #define HID_HOST_REPAGE_WIN (2)
1427 /*************************************************************************
1430 #ifndef A2D_INCLUDED
1431 #define A2D_INCLUDED TRUE
1434 /******************************************************************************
1438 ******************************************************************************/
1440 /* Number of simultaneous ACL links to different peer devices. */
1441 #ifndef AVCT_NUM_LINKS
1442 #define AVCT_NUM_LINKS 2
1445 /* Number of simultaneous AVCTP connections. */
1446 #ifndef AVCT_NUM_CONN
1447 #define AVCT_NUM_CONN 3
1450 /******************************************************************************
1454 ******************************************************************************/
1456 #ifndef AVRC_METADATA_INCLUDED
1457 #define AVRC_METADATA_INCLUDED TRUE
1460 #ifndef AVRC_ADV_CTRL_INCLUDED
1461 #define AVRC_ADV_CTRL_INCLUDED TRUE
1464 #ifndef AVRC_CTLR_INCLUDED
1465 #define AVRC_CTLR_INCLUDED TRUE
1468 /******************************************************************************
1472 ******************************************************************************/
1473 #ifndef MCA_INCLUDED
1474 #define MCA_INCLUDED FALSE
1477 /* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */
1478 #ifndef MCA_CTRL_MTU
1479 #define MCA_CTRL_MTU 60
1482 /* The maximum number of registered MCAP instances. */
1483 #ifndef MCA_NUM_REGS
1484 #define MCA_NUM_REGS 12
1487 /* The maximum number of control channels (to difference devices) per registered MCAP instances. */
1488 #ifndef MCA_NUM_LINKS
1489 #define MCA_NUM_LINKS 3
1492 /* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */
1493 #ifndef MCA_NUM_DEPS
1494 #define MCA_NUM_DEPS 13
1497 /* The maximum number of MDL link per control channel. */
1498 #ifndef MCA_NUM_MDLS
1499 #define MCA_NUM_MDLS 4
1502 /* Buffer size to reassemble the SDU. */
1503 #ifndef MCA_USER_RX_BUF_SIZE
1504 #define MCA_USER_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1507 /* Buffer size to hold the SDU. */
1508 #ifndef MCA_USER_TX_BUF_SIZE
1509 #define MCA_USER_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1513 * Buffer size used to hold MPS segments during SDU reassembly
1515 #ifndef MCA_FCR_RX_BUF_SIZE
1516 #define MCA_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1520 * Default buffer size used to hold MPS segments used in (re)transmissions.
1521 * The size of each buffer must be able to hold the maximum MPS segment size
1522 * passed in tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) +
1523 * L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1525 #ifndef MCA_FCR_TX_BUF_SIZE
1526 #define MCA_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1529 /* MCAP control channel FCR Option:
1530 Size of the transmission window when using enhanced retransmission mode.
1531 1 is defined by HDP specification for control channel.
1533 #ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
1534 #define MCA_FCR_OPT_TX_WINDOW_SIZE 1
1537 /* MCAP control channel FCR Option:
1538 Number of transmission attempts for a single I-Frame before taking
1539 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1542 0 - infinite retransmissions
1543 1 - single transmission
1545 #ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT
1546 #define MCA_FCR_OPT_MAX_TX_B4_DISCNT 20
1549 /* MCAP control channel FCR Option: Retransmission Timeout
1550 The AVRCP specification set a value in the range of 300 - 2000 ms
1551 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
1552 Range: Minimum 2000 (2 secs) when supporting PBF.
1554 #ifndef MCA_FCR_OPT_RETX_TOUT
1555 #define MCA_FCR_OPT_RETX_TOUT 2000
1558 /* MCAP control channel FCR Option: Monitor Timeout
1559 The AVRCP specification set a value in the range of 300 - 2000 ms
1560 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
1561 Range: Minimum 12000 (12 secs) when supporting PBF.
1563 #ifndef MCA_FCR_OPT_MONITOR_TOUT
1564 #define MCA_FCR_OPT_MONITOR_TOUT 12000
1567 /* MCAP control channel FCR Option: Maximum PDU payload size.
1568 The maximum number of payload octets that the local device can receive in a single PDU.
1570 #ifndef MCA_FCR_OPT_MPS_SIZE
1571 #define MCA_FCR_OPT_MPS_SIZE 1000
1574 /* Shared transport */
1575 #ifndef NFC_SHARED_TRANSPORT_ENABLED
1576 #define NFC_SHARED_TRANSPORT_ENABLED FALSE
1579 /******************************************************************************
1581 ** Sleep Mode (Low Power Mode)
1583 ******************************************************************************/
1585 #ifndef HCILP_INCLUDED
1586 #define HCILP_INCLUDED TRUE
1589 /******************************************************************************
1591 ** APPL - Application Task
1593 ******************************************************************************/
1595 #define L2CAP_FEATURE_REQ_ID 73
1596 #define L2CAP_FEATURE_RSP_ID 173
1598 /******************************************************************************
1602 ******************************************************************************/
1603 /* BTA EIR canned UUID list (default is dynamic) */
1604 #ifndef BTA_EIR_CANNED_UUID_LIST
1605 #define BTA_EIR_CANNED_UUID_LIST FALSE
1608 /* Number of supported customer UUID in EIR */
1609 #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
1610 #define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8
1614 #ifndef BTA_AG_CHLD_VAL_ECC
1615 #define BTA_AG_CHLD_VAL_ECC "(0,1,1x,2,2x,3)"
1618 #ifndef BTA_AG_CHLD_VAL
1619 #define BTA_AG_CHLD_VAL "(0,1,2,3)"
1622 /* Set the CIND to match HFP 1.5 */
1623 #ifndef BTA_AG_CIND_INFO
1624 #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))"
1627 #ifndef BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY
1628 #define BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY TRUE
1631 /******************************************************************************
1633 ** Tracing: Include trace header file here.
1635 ******************************************************************************/
1637 /* Enable/disable BTSnoop memory logging */
1639 #define BTSNOOP_MEM TRUE
1642 #include "bt_trace.h"
1644 #endif /* BT_TARGET_H */