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 ******************************************************************************/
26 #include "data_types.h"
30 #if !defined(HAS_BDROID_BUILDCFG) && !defined(HAS_NO_BDROID_BUILDCFG)
31 #error "An Android.mk file did not include bdroid_CFLAGS and possibly not bdorid_C_INCLUDES"
34 #ifdef HAS_BDROID_BUILDCFG
35 #include "bdroid_buildcfg.h"
40 /* Include common GKI definitions used by this platform */
41 #include "gki_target.h"
43 #include "bt_types.h" /* This must be defined AFTER buildcfg.h */
44 #include "dyn_mem.h" /* defines static and/or dynamic memory for components */
46 //------------------Added from bdroid_buildcfg.h---------------------
47 #ifndef L2CAP_EXTFEA_SUPPORTED_MASK
48 #define L2CAP_EXTFEA_SUPPORTED_MASK (L2CAP_EXTFEA_ENH_RETRANS | L2CAP_EXTFEA_STREAM_MODE | L2CAP_EXTFEA_NO_CRC | L2CAP_EXTFEA_FIXED_CHNLS)
51 #ifndef BTUI_OPS_FORMATS
52 #define BTUI_OPS_FORMATS (BTA_OP_VCARD21_MASK | BTA_OP_ANY_MASK)
55 #ifndef BTA_RFC_MTU_SIZE
56 #define BTA_RFC_MTU_SIZE (L2CAP_MTU_SIZE-L2CAP_MIN_OFFSET-RFCOMM_DATA_OVERHEAD)
59 #ifndef SBC_NO_PCM_CPY_OPTION
60 #define SBC_NO_PCM_CPY_OPTION FALSE
64 #define BTA_INCLUDED TRUE
67 #ifndef BTA_AG_INCLUDED
68 #define BTA_AG_INCLUDED TRUE
71 #ifndef BTA_BI_INCLUDED
72 #define BTA_BI_INCLUDED FALSE
75 #ifndef BTA_SC_INCLUDED
76 #define BTA_SC_INCLUDED FALSE
79 #ifndef BTA_PAN_INCLUDED
80 #define BTA_PAN_INCLUDED TRUE
83 #ifndef BTA_HH_INCLUDED
84 #define BTA_HH_INCLUDED TRUE
88 #define BTA_HH_ROLE BTA_MASTER_ROLE_PREF
91 #ifndef BTA_HH_LE_INCLUDED
92 #define BTA_HH_LE_INCLUDED TRUE
95 #ifndef BTA_AR_INCLUDED
96 #define BTA_AR_INCLUDED TRUE
99 #ifndef BTA_AV_INCLUDED
100 #define BTA_AV_INCLUDED TRUE
103 #ifndef BTA_GATT_INCLUDED
104 #define BTA_GATT_INCLUDED TRUE
107 #ifndef BTA_AV_SINK_INCLUDED
108 #define BTA_AV_SINK_INCLUDED FALSE
111 #ifndef BTA_DISABLE_DELAY
112 #define BTA_DISABLE_DELAY 200 /* in milliseconds */
115 #ifndef ANDROID_APP_INCLUDED
116 #define ANDROID_APP_INCLUDED TRUE
119 #ifndef ANDROID_USE_LOGCAT
120 #define ANDROID_USE_LOGCAT TRUE
123 // If the next wakeup time is less than this threshold, we should acquire
124 // a wakelock instead of setting a wake alarm so we're not bouncing in
125 // and out of suspend frequently.
127 // TODO(zachoverflow): reinstate in alarm code
128 #ifndef GKI_TIMER_INTERVAL_FOR_WAKELOCK
129 #define GKI_TIMER_INTERVAL_FOR_WAKELOCK 3000
132 #ifndef BTA_SYS_TIMER_PERIOD
133 #define BTA_SYS_TIMER_PERIOD 100
136 #ifndef GKI_SHUTDOWN_EVT
137 #define GKI_SHUTDOWN_EVT APPL_EVT_7
140 #ifndef SBC_FOR_EMBEDDED_LINUX
141 #define SBC_FOR_EMBEDDED_LINUX TRUE
145 #define AVDT_VERSION 0x0102
148 #ifndef BTA_AG_AT_MAX_LEN
149 #define BTA_AG_AT_MAX_LEN 512
152 #ifndef BTA_AVRCP_FF_RW_SUPPORT
153 #define BTA_AVRCP_FF_RW_SUPPORT TRUE
156 #ifndef BTA_AG_SCO_PKT_TYPES
157 #define BTA_AG_SCO_PKT_TYPES (BTM_SCO_LINK_ONLY_MASK | BTM_SCO_PKT_TYPES_MASK_EV3 | BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 | BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 | BTM_SCO_PKT_TYPES_MASK_NO_3_EV5)
160 #ifndef BTA_AV_RET_TOUT
161 #define BTA_AV_RET_TOUT 15
164 #ifndef PORCHE_PAIRING_CONFLICT
165 #define PORCHE_PAIRING_CONFLICT TRUE
168 #ifndef BTA_AV_CO_CP_SCMS_T
169 #define BTA_AV_CO_CP_SCMS_T FALSE
172 /* This feature is used to eanble interleaved scan*/
173 #ifndef BTA_HOST_INTERLEAVE_SEARCH
174 #define BTA_HOST_INTERLEAVE_SEARCH FALSE
177 #ifndef BT_USE_TRACES
178 #define BT_USE_TRACES TRUE
181 #ifndef BT_TRACE_BTIF
182 #define BT_TRACE_BTIF TRUE
185 #ifndef BT_TRACE_VERBOSE
186 #define BT_TRACE_VERBOSE FALSE
189 #ifndef BTA_DM_SDP_DB_SIZE
190 #define BTA_DM_SDP_DB_SIZE 8000
194 #define HL_INCLUDED TRUE
197 #ifndef AG_VOICE_SETTINGS
198 #define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS
201 #ifndef BTIF_DM_OOB_TEST
202 #define BTIF_DM_OOB_TEST TRUE
205 // How long to wait before activating sniff mode after entering the
206 // idle state for FTS, OPS connections
207 #ifndef BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS
208 #define BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 7000
211 //------------------End added from bdroid_buildcfg.h---------------------
214 /******************************************************************************
218 ******************************************************************************/
220 /* Receives HCI events from the lower-layer. */
221 #ifndef HCI_CMD_POOL_ID
222 #define HCI_CMD_POOL_ID GKI_POOL_ID_2
225 #ifndef HCI_CMD_POOL_BUF_SIZE
226 #define HCI_CMD_POOL_BUF_SIZE GKI_BUF2_SIZE
229 /* Receives ACL data packets from thelower-layer. */
230 #ifndef HCI_ACL_POOL_ID
231 #define HCI_ACL_POOL_ID GKI_POOL_ID_3
234 /* Maximum number of buffers available for ACL receive data. */
235 #ifndef HCI_ACL_BUF_MAX
236 #define HCI_ACL_BUF_MAX GKI_BUF3_MAX
239 /* Receives SCO data packets from the lower-layer. */
240 #ifndef HCI_SCO_POOL_ID
241 #define HCI_SCO_POOL_ID GKI_POOL_ID_6
244 /* Sends SDP data packets. */
246 #define SDP_POOL_ID 3
249 /* Sends RFCOMM command packets. */
250 #ifndef RFCOMM_CMD_POOL_ID
251 #define RFCOMM_CMD_POOL_ID GKI_POOL_ID_2
254 /* Sends RFCOMM data packets. */
255 #ifndef RFCOMM_DATA_POOL_ID
256 #define RFCOMM_DATA_POOL_ID GKI_POOL_ID_3
259 #ifndef RFCOMM_DATA_POOL_BUF_SIZE
260 #define RFCOMM_DATA_POOL_BUF_SIZE GKI_BUF3_SIZE
263 /* Sends L2CAP packets to the peer and HCI messages to the controller. */
264 #ifndef L2CAP_CMD_POOL_ID
265 #define L2CAP_CMD_POOL_ID GKI_POOL_ID_2
268 /* Sends L2CAP segmented packets in ERTM mode */
269 #ifndef L2CAP_FCR_TX_POOL_ID
270 #define L2CAP_FCR_TX_POOL_ID HCI_ACL_POOL_ID
273 /* Receives L2CAP segmented packets in ERTM mode */
274 #ifndef L2CAP_FCR_RX_POOL_ID
275 #define L2CAP_FCR_RX_POOL_ID HCI_ACL_POOL_ID
278 /* Number of ACL buffers to assign to LE
279 if the HCI buffer pool is shared with BR/EDR */
280 #ifndef L2C_DEF_NUM_BLE_BUF_SHARED
281 #define L2C_DEF_NUM_BLE_BUF_SHARED 1
284 /* Used by BTM when it sends HCI commands to the controller. */
285 #ifndef BTM_CMD_POOL_ID
286 #define BTM_CMD_POOL_ID GKI_POOL_ID_2
289 #ifndef OBX_LRG_DATA_POOL_SIZE
290 #define OBX_LRG_DATA_POOL_SIZE GKI_BUF4_SIZE
293 #ifndef OBX_LRG_DATA_POOL_ID
294 #define OBX_LRG_DATA_POOL_ID GKI_POOL_ID_4
297 /* Used to send data to L2CAP. */
298 #ifndef GAP_DATA_POOL_ID
299 #define GAP_DATA_POOL_ID GKI_POOL_ID_3
303 #define SPP_DB_SIZE GKI_BUF3_SIZE
306 /* BNEP data and protocol messages. */
308 #define BNEP_POOL_ID GKI_POOL_ID_3
311 /* RPC pool for temporary trace message buffers. */
312 #ifndef RPC_SCRATCH_POOL_ID
313 #define RPC_SCRATCH_POOL_ID GKI_POOL_ID_2
316 /* AVDTP pool for protocol messages */
317 #ifndef AVDT_CMD_POOL_ID
318 #define AVDT_CMD_POOL_ID GKI_POOL_ID_2
321 /* AVDTP pool size for media packets in case of fragmentation */
322 #ifndef AVDT_DATA_POOL_SIZE
323 #define AVDT_DATA_POOL_SIZE GKI_BUF3_SIZE
327 #define PAN_POOL_ID GKI_POOL_ID_3
328 /* Maximum amount of the shared buffer to allocate for PAN */
329 #define PAN_POOL_MAX (GKI_BUF3_MAX / 4)
332 /* AVCTP pool for protocol messages */
333 #ifndef AVCT_CMD_POOL_ID
334 #define AVCT_CMD_POOL_ID GKI_POOL_ID_1
337 /* AVRCP pool for protocol messages */
338 #ifndef AVRC_CMD_POOL_ID
339 #define AVRC_CMD_POOL_ID GKI_POOL_ID_1
342 /* AVRCP pool size for protocol messages */
343 #ifndef AVRC_CMD_POOL_SIZE
344 #define AVRC_CMD_POOL_SIZE GKI_BUF1_SIZE
347 /* AVRCP Metadata pool for protocol messages */
348 #ifndef AVRC_META_CMD_POOL_ID
349 #define AVRC_META_CMD_POOL_ID GKI_POOL_ID_2
352 /* AVRCP Metadata pool size for protocol messages */
353 #ifndef AVRC_META_CMD_POOL_SIZE
354 #define AVRC_META_CMD_POOL_SIZE GKI_BUF2_SIZE
358 /* AVRCP buffer size for browsing channel messages */
359 #ifndef AVRC_BROWSE_POOL_SIZE
360 #define AVRC_BROWSE_POOL_SIZE GKI_MAX_BUF_SIZE
363 #ifndef BTA_HL_LRG_DATA_POOL_ID
364 #define BTA_HL_LRG_DATA_POOL_ID GKI_POOL_ID_7
367 /* GATT Server Database pool ID */
368 #ifndef GATT_DB_POOL_ID
369 #define GATT_DB_POOL_ID GKI_POOL_ID_8
372 /* GATT Data sending buffer pool ID, use default ACL pool for fix channel data */
373 #ifndef GATT_BUF_POOL_ID
374 #define GATT_BUF_POOL_ID HCI_ACL_POOL_ID
377 /******************************************************************************
379 ** Lower Layer Interface
381 ******************************************************************************/
383 /* Macro for allocating buffer for HCI commands */
384 #ifndef HCI_GET_CMD_BUF
385 #if (!defined(HCI_USE_VARIABLE_SIZE_CMD_BUF) || (HCI_USE_VARIABLE_SIZE_CMD_BUF == FALSE))
386 /* Allocate fixed-size buffer from HCI_CMD_POOL (default case) */
387 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getpoolbuf (HCI_CMD_POOL_ID))
389 /* Allocate smallest possible buffer (for platforms with limited RAM) */
390 #define HCI_GET_CMD_BUF(paramlen) ((BT_HDR *)GKI_getbuf ((UINT16)(BT_HDR_SIZE + HCIC_PREAMBLE_SIZE + (paramlen))))
392 #endif /* HCI_GET_CMD_BUF */
394 /******************************************************************************
398 ******************************************************************************/
407 /* Use 2 second for low-resolution systems, override to 1 for high-resolution systems */
408 #ifndef BT_1SEC_TIMEOUT
409 #define BT_1SEC_TIMEOUT (2)
413 /* if L2CAP_FCR_INCLUDED is TRUE then it should have 100 millisecond resolution */
414 /* if none of them is included then QUICK_TIMER_TICKS_PER_SEC is set to 0 to exclude quick timer */
415 #ifndef QUICK_TIMER_TICKS_PER_SEC
416 #define QUICK_TIMER_TICKS_PER_SEC 10 /* 100ms timer */
419 /******************************************************************************
423 ******************************************************************************/
424 /* Include inquiry code. */
425 #ifndef BTM_INQUIRY_INCLUDED
426 #define BTM_INQUIRY_INCLUDED TRUE
429 /* Cancel Inquiry on incoming SSP */
430 #ifndef BTM_NO_SSP_ON_INQUIRY
431 #define BTM_NO_SSP_ON_INQUIRY FALSE
434 /* Includes SCO if TRUE */
435 #ifndef BTM_SCO_INCLUDED
436 #define BTM_SCO_INCLUDED TRUE /* TRUE includes SCO code */
439 /* Includes SCO if TRUE */
440 #ifndef BTM_SCO_HCI_INCLUDED
441 #define BTM_SCO_HCI_INCLUDED FALSE /* TRUE includes SCO over HCI code */
444 /* Includes WBS if TRUE */
445 #ifndef BTM_WBS_INCLUDED
446 #define BTM_WBS_INCLUDED FALSE /* TRUE includes WBS code */
449 /* Includes PCM2 support if TRUE */
450 #ifndef BTM_PCM2_INCLUDED
451 #define BTM_PCM2_INCLUDED FALSE
454 /* This is used to work around a controller bug that doesn't like Disconnect
455 ** issued while there is a role switch in progress
457 #ifndef BTM_DISC_DURING_RS
458 #define BTM_DISC_DURING_RS TRUE
461 /**************************
462 ** Initial SCO TX credit
463 *************************/
464 /* max TX SCO data packet size */
465 #ifndef BTM_SCO_DATA_SIZE_MAX
466 #define BTM_SCO_DATA_SIZE_MAX 240
469 /* The size in bytes of the BTM inquiry database. */
470 #ifndef BTM_INQ_DB_SIZE
471 #define BTM_INQ_DB_SIZE 40
474 /* TRUE if controller does not support inquiry event filtering. */
475 #ifndef BTM_BYPASS_EVENT_FILTERING
476 #define BTM_BYPASS_EVENT_FILTERING FALSE
479 /* TRUE if inquiry filtering is desired from BTM. */
480 #ifndef BTM_USE_INQ_RESULTS_FILTER
481 #define BTM_USE_INQ_RESULTS_FILTER TRUE
484 /* The default scan mode */
485 #ifndef BTM_DEFAULT_SCAN_TYPE
486 #define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED
489 /* Should connections to unknown devices be allowed when not discoverable? */
490 #ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
491 #define BTM_ALLOW_CONN_IF_NONDISCOVER TRUE
494 /* Sets the Page_Scan_Window: the length of time that the device is performing a page scan. */
495 #ifndef BTM_DEFAULT_CONN_WINDOW
496 #define BTM_DEFAULT_CONN_WINDOW 0x0012
499 /* Sets the Page_Scan_Activity: the interval between the start of two consecutive page scans. */
500 #ifndef BTM_DEFAULT_CONN_INTERVAL
501 #define BTM_DEFAULT_CONN_INTERVAL 0x0800
504 /* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
505 #ifndef BTM_DEFAULT_DISC_WINDOW
506 #define BTM_DEFAULT_DISC_WINDOW 0x0012
509 /* When automatic inquiry scan is enabled, this sets the inquiry scan interval. */
510 #ifndef BTM_DEFAULT_DISC_INTERVAL
511 #define BTM_DEFAULT_DISC_INTERVAL 0x0800
514 /* Default class of device
515 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
517 * SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
518 * MAJOR_CLASS:0x02 - PHONE
519 * MINOR_CLASS:0x0C - SMART_PHONE
523 #define BTA_DM_COD {0x5A, 0x02, 0x0C}
526 /* The number of SCO links. */
527 #ifndef BTM_MAX_SCO_LINKS
528 #define BTM_MAX_SCO_LINKS 3
531 /* The preferred type of SCO links (2-eSCO, 0-SCO). */
532 #ifndef BTM_DEFAULT_SCO_MODE
533 #define BTM_DEFAULT_SCO_MODE 2
536 /* The number of security records for peer devices. */
537 #ifndef BTM_SEC_MAX_DEVICE_RECORDS
538 #define BTM_SEC_MAX_DEVICE_RECORDS 100
541 /* The number of security records for services. */
542 #ifndef BTM_SEC_MAX_SERVICE_RECORDS
543 #define BTM_SEC_MAX_SERVICE_RECORDS 32
546 /* If True, force a retrieval of remote device name for each bond in case it's changed */
547 #ifndef BTM_SEC_FORCE_RNR_FOR_DBOND
548 #define BTM_SEC_FORCE_RNR_FOR_DBOND FALSE
551 /* Maximum device name length used in btm database. */
552 #ifndef BTM_MAX_REM_BD_NAME_LEN
553 #define BTM_MAX_REM_BD_NAME_LEN 248
556 /* Maximum local device name length stored btm database.
557 '0' disables storage of the local name in BTM */
558 #ifndef BTM_MAX_LOC_BD_NAME_LEN
559 #define BTM_MAX_LOC_BD_NAME_LEN 248
562 /* Fixed Default String. When this is defined as null string, the device's
563 * product model name is used as the default local name.
565 #ifndef BTM_DEF_LOCAL_NAME
566 #define BTM_DEF_LOCAL_NAME ""
569 /* Maximum service name stored with security authorization (0 if not needed) */
570 #ifndef BTM_SEC_SERVICE_NAME_LEN
571 #define BTM_SEC_SERVICE_NAME_LEN BT_MAX_SERVICE_NAME_LEN
574 /* Maximum length of the service name. */
575 #ifndef BT_MAX_SERVICE_NAME_LEN
576 #define BT_MAX_SERVICE_NAME_LEN 21
579 /* ACL buffer size in HCI Host Buffer Size command. */
580 #ifndef BTM_ACL_BUF_SIZE
581 #define BTM_ACL_BUF_SIZE 0
584 /* This is set to use the BTM power manager. */
585 #ifndef BTM_PWR_MGR_INCLUDED
586 #define BTM_PWR_MGR_INCLUDED TRUE
589 /* The maximum number of clients that can register with the power manager. */
590 #ifndef BTM_MAX_PM_RECORDS
591 #define BTM_MAX_PM_RECORDS 2
594 /* This is set to show debug trace messages for the power manager. */
596 #define BTM_PM_DEBUG FALSE
599 /* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */
600 #ifndef BTM_SCO_WAKE_PARKED_LINK
601 #define BTM_SCO_WAKE_PARKED_LINK TRUE
604 /* This is set to TRUE if the busy level change event is desired. (replace ACL change event) */
605 #ifndef BTM_BUSY_LEVEL_CHANGE_INCLUDED
606 #define BTM_BUSY_LEVEL_CHANGE_INCLUDED TRUE
609 /* If the user does not respond to security process requests within this many seconds,
610 * a negative response would be sent automatically.
611 * It's recommended to use a value between 30 and OBX_TIMEOUT_VALUE
612 * 30 is LMP response timeout value */
613 #ifndef BTM_SEC_TIMEOUT_VALUE
614 #define BTM_SEC_TIMEOUT_VALUE 35
617 /* Maximum number of callbacks that can be registered using BTM_RegisterForVSEvents */
618 #ifndef BTM_MAX_VSE_CALLBACKS
619 #define BTM_MAX_VSE_CALLBACKS 3
622 /******************************************
624 *******************************************/
625 /* This is set to TRUE if the server Extended Inquiry Response feature is desired. */
626 /* server sends EIR to client */
627 #ifndef BTM_EIR_SERVER_INCLUDED
628 #define BTM_EIR_SERVER_INCLUDED TRUE
631 /* This is set to TRUE if the client Extended Inquiry Response feature is desired. */
632 /* client inquiry to server */
633 #ifndef BTM_EIR_CLIENT_INCLUDED
634 #define BTM_EIR_CLIENT_INCLUDED TRUE
637 /* This is set to TRUE if the FEC is required for EIR packet. */
638 #ifndef BTM_EIR_DEFAULT_FEC_REQUIRED
639 #define BTM_EIR_DEFAULT_FEC_REQUIRED TRUE
642 /* User defined UUID look up table */
643 #ifndef BTM_EIR_UUID_LKUP_TBL
646 /* The IO capability of the local device (for Simple Pairing) */
647 #ifndef BTM_LOCAL_IO_CAPS
648 #define BTM_LOCAL_IO_CAPS BTM_IO_CAP_IO
651 #ifndef BTM_LOCAL_IO_CAPS_BLE
652 #define BTM_LOCAL_IO_CAPS_BLE BTM_IO_CAP_KBDISP
655 /* The default MITM Protection Requirement (for Simple Pairing)
656 * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
657 #ifndef BTM_DEFAULT_AUTH_REQ
658 #define BTM_DEFAULT_AUTH_REQ BTM_AUTH_SP_NO
661 /* The default MITM Protection Requirement for dedicated bonding using Simple Pairing
662 * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
663 #ifndef BTM_DEFAULT_DD_AUTH_REQ
664 #define BTM_DEFAULT_DD_AUTH_REQ BTM_AUTH_AP_YES
667 /* Include Out-of-Band implementation for Simple Pairing */
668 #ifndef BTM_OOB_INCLUDED
669 #define BTM_OOB_INCLUDED TRUE
672 /* TRUE to include Sniff Subrating */
673 #ifndef BTM_SSR_INCLUDED
674 #define BTM_SSR_INCLUDED TRUE
677 /*************************
678 ** End of Lisbon Features
679 **************************/
681 /* Used for conformance testing ONLY */
682 #ifndef BTM_BLE_CONFORMANCE_TESTING
683 #define BTM_BLE_CONFORMANCE_TESTING FALSE
686 /******************************************************************************
690 ******************************************************************************/
692 /* Flow control and retransmission mode */
694 #ifndef L2CAP_FCR_INCLUDED
695 #define L2CAP_FCR_INCLUDED TRUE
698 /* The maximum number of simultaneous links that L2CAP can support. */
699 #ifndef MAX_ACL_CONNECTIONS
700 #define MAX_L2CAP_LINKS 7
702 #define MAX_L2CAP_LINKS MAX_ACL_CONNECTIONS
705 /* The maximum number of simultaneous channels that L2CAP can support. */
706 #ifndef MAX_L2CAP_CHANNELS
707 #define MAX_L2CAP_CHANNELS 16
710 /* The maximum number of simultaneous applications that can register with L2CAP. */
711 #ifndef MAX_L2CAP_CLIENTS
712 #define MAX_L2CAP_CLIENTS 15
715 /* The number of seconds of link inactivity before a link is disconnected. */
716 #ifndef L2CAP_LINK_INACTIVITY_TOUT
717 #define L2CAP_LINK_INACTIVITY_TOUT 4
720 /* The number of seconds of link inactivity after bonding before a link is disconnected. */
721 #ifndef L2CAP_BONDING_TIMEOUT
722 #define L2CAP_BONDING_TIMEOUT 3
725 /* The time from the HCI connection complete to disconnect if no channel is established. */
726 #ifndef L2CAP_LINK_STARTUP_TOUT
727 #define L2CAP_LINK_STARTUP_TOUT 60
730 /* The L2CAP MTU; must be in accord with the HCI ACL pool size. */
731 #ifndef L2CAP_MTU_SIZE
732 #define L2CAP_MTU_SIZE 1691
735 /* The L2CAP MPS over Bluetooth; must be in accord with the FCR tx pool size and ACL down buffer size. */
736 #ifndef L2CAP_MPS_OVER_BR_EDR
737 #define L2CAP_MPS_OVER_BR_EDR 1010
740 /* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */
741 #ifndef L2CAP_HOST_FC_ACL_BUFS
742 #define L2CAP_HOST_FC_ACL_BUFS 20
745 /* This is set to enable L2CAP to take the ACL link out of park mode when ACL data is to be sent. */
746 #ifndef L2CAP_WAKE_PARKED_LINK
747 #define L2CAP_WAKE_PARKED_LINK TRUE
750 /* Whether link wants to be the master or the slave. */
751 #ifndef L2CAP_DESIRED_LINK_ROLE
752 #define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_SLAVE
755 /* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
756 #ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
757 #define L2CAP_NON_FLUSHABLE_PB_INCLUDED TRUE
760 /* Minimum number of ACL credit for high priority link */
761 #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
762 #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5
765 /* used for monitoring HCI ACL credit management */
766 #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
767 #define L2CAP_HCI_FLOW_CONTROL_DEBUG TRUE
770 /* Used for calculating transmit buffers off of */
771 #ifndef L2CAP_NUM_XMIT_BUFFS
772 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
775 /* Unicast Connectionless Data */
776 #ifndef L2CAP_UCD_INCLUDED
777 #define L2CAP_UCD_INCLUDED FALSE
780 /* Unicast Connectionless Data MTU */
781 #ifndef L2CAP_UCD_MTU
782 #define L2CAP_UCD_MTU L2CAP_MTU_SIZE
785 /* Unicast Connectionless Data Idle Timeout */
786 #ifndef L2CAP_UCD_IDLE_TIMEOUT
787 #define L2CAP_UCD_IDLE_TIMEOUT 2
790 /* Unicast Connectionless Data Idle Timeout */
791 #ifndef L2CAP_UCD_CH_PRIORITY
792 #define L2CAP_UCD_CH_PRIORITY L2CAP_CHNL_PRIORITY_MEDIUM
795 /* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
796 /* Excluding L2CAP signaling channel and UCD */
797 #ifndef L2CAP_NUM_FIXED_CHNLS
798 #define L2CAP_NUM_FIXED_CHNLS 4
801 /* First fixed channel supported */
802 #ifndef L2CAP_FIRST_FIXED_CHNL
803 #define L2CAP_FIRST_FIXED_CHNL 3
806 #ifndef L2CAP_LAST_FIXED_CHNL
807 #define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
810 /* Round Robin service channels in link */
811 #ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
812 #define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE TRUE
815 /* Used for calculating transmit buffers off of */
816 #ifndef L2CAP_NUM_XMIT_BUFFS
817 #define L2CAP_NUM_XMIT_BUFFS HCI_ACL_BUF_MAX
820 /* used for monitoring eL2CAP data flow */
821 #ifndef L2CAP_ERTM_STATS
822 #define L2CAP_ERTM_STATS FALSE
825 /* Used for conformance testing ONLY: When TRUE lets scriptwrapper overwrite info response */
826 #ifndef L2CAP_CONFORMANCE_TESTING
827 #define L2CAP_CONFORMANCE_TESTING FALSE
830 #ifndef TIMER_PARAM_TYPE
831 #define TIMER_PARAM_TYPE UINT32
834 /******************************************************************************
838 ******************************************************************************/
841 #define BLE_INCLUDED TRUE
844 #ifndef BLE_ANDROID_CONTROLLER_SCAN_FILTER
845 #define BLE_ANDROID_CONTROLLER_SCAN_FILTER TRUE
848 #ifndef LOCAL_BLE_CONTROLLER_ID
849 #define LOCAL_BLE_CONTROLLER_ID (1)
853 * Toggles support for general LE privacy features such as remote address
854 * resolution, local address rotation etc.
856 #ifndef BLE_PRIVACY_SPT
857 #define BLE_PRIVACY_SPT TRUE
861 * Enables or disables support for local privacy (ex. address rotation)
863 #ifndef BLE_LOCAL_PRIVACY_ENABLED
864 #define BLE_LOCAL_PRIVACY_ENABLED TRUE
868 * Toggles support for vendor specific extensions such as RPA offloading,
869 * feature discovery, multi-adv etc.
871 #ifndef BLE_VND_INCLUDED
872 #define BLE_VND_INCLUDED FALSE
875 #ifndef BTM_BLE_ADV_TX_POWER
876 #define BTM_BLE_ADV_TX_POWER {-21, -15, -7, 1, 9}
880 #ifndef BLE_BATCH_SCAN_INCLUDED
881 #define BLE_BATCH_SCAN_INCLUDED TRUE
884 /******************************************************************************
886 ** ATT/GATT Protocol/Profile Settings
888 ******************************************************************************/
889 #ifndef BTA_GATT_INCLUDED
890 #if BLE_INCLUDED == TRUE
891 #define BTA_GATT_INCLUDED TRUE
893 #define BTA_GATT_INCLUDED FALSE
897 #if BTA_GATT_INCLUDED == TRUE && BLE_INCLUDED == FALSE
898 #error "can't have GATT without BLE"
901 #ifndef BLE_LLT_INCLUDED
902 #define BLE_LLT_INCLUDED TRUE
906 #define ATT_INCLUDED TRUE
910 #define ATT_DEBUG TRUE
913 #ifndef BLE_PERIPHERAL_MODE_SUPPORT
914 #define BLE_PERIPHERAL_MODE_SUPPORT TRUE
917 #ifndef BLE_PERIPHERAL_ADV_NAME
918 #define BLE_PERIPHERAL_ADV_NAME FALSE
921 #ifndef BLE_DELAY_REQUEST_ENC
922 /* This flag is to work around IPHONE problem, We need to wait for iPhone ready
923 before send encryption request to iPhone */
924 #define BLE_DELAY_REQUEST_ENC FALSE
927 #ifndef GAP_TRANSPORT_SUPPORTED
928 #define GAP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
931 #ifndef GATTP_TRANSPORT_SUPPORTED
932 #define GATTP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
935 #ifndef GATT_MAX_SR_PROFILES
936 #define GATT_MAX_SR_PROFILES 32 /* max is 32 */
939 #ifndef GATT_MAX_APPS
940 #define GATT_MAX_APPS 32 /* note: 2 apps used internally GATT and GAP */
943 #ifndef GATT_MAX_PHY_CHANNEL
944 #define GATT_MAX_PHY_CHANNEL 7
947 /* Used for conformance testing ONLY */
948 #ifndef GATT_CONFORMANCE_TESTING
949 #define GATT_CONFORMANCE_TESTING FALSE
952 /* number of background connection device allowence, ideally to be the same as WL size
954 #ifndef GATT_MAX_BG_CONN_DEV
955 #define GATT_MAX_BG_CONN_DEV 32
958 /******************************************************************************
962 ******************************************************************************/
964 #if BLE_INCLUDED == TRUE
965 #define SMP_INCLUDED TRUE
967 #define SMP_INCLUDED FALSE
971 #if SMP_INCLUDED == TRUE && BLE_INCLUDED == FALSE
972 #error "can't have SMP without BLE"
976 #define SMP_DEBUG FALSE
979 #ifndef SMP_DEFAULT_AUTH_REQ
980 #define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY
983 #ifndef SMP_MAX_ENC_KEY_SIZE
984 #define SMP_MAX_ENC_KEY_SIZE 16
987 #ifndef SMP_MIN_ENC_KEY_SIZE
988 #define SMP_MIN_ENC_KEY_SIZE 7
991 /* Used for conformance testing ONLY */
992 #ifndef SMP_CONFORMANCE_TESTING
993 #define SMP_CONFORMANCE_TESTING FALSE
996 /******************************************************************************
1000 ******************************************************************************/
1002 /* This is set to enable SDP server functionality. */
1003 #ifndef SDP_SERVER_ENABLED
1004 #define SDP_SERVER_ENABLED TRUE
1007 /* The maximum number of SDP records the server can support. */
1008 #ifndef SDP_MAX_RECORDS
1009 #define SDP_MAX_RECORDS 20
1012 /* The maximum number of attributes in each record. */
1013 #ifndef SDP_MAX_REC_ATTR
1014 #define SDP_MAX_REC_ATTR 25
1017 #ifndef SDP_MAX_PAD_LEN
1018 #define SDP_MAX_PAD_LEN 600
1021 /* The maximum length, in bytes, of an attribute. */
1022 #ifndef SDP_MAX_ATTR_LEN
1023 #define SDP_MAX_ATTR_LEN 400
1026 /* The maximum number of attribute filters supported by SDP databases. */
1027 #ifndef SDP_MAX_ATTR_FILTERS
1028 #define SDP_MAX_ATTR_FILTERS 15
1031 /* The maximum number of UUID filters supported by SDP databases. */
1032 #ifndef SDP_MAX_UUID_FILTERS
1033 #define SDP_MAX_UUID_FILTERS 3
1036 /* This is set to enable SDP client functionality. */
1037 #ifndef SDP_CLIENT_ENABLED
1038 #define SDP_CLIENT_ENABLED TRUE
1041 /* The maximum number of record handles retrieved in a search. */
1042 #ifndef SDP_MAX_DISC_SERVER_RECS
1043 #define SDP_MAX_DISC_SERVER_RECS 21
1046 /* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */
1047 #ifndef SDP_MAX_LIST_BYTE_COUNT
1048 #define SDP_MAX_LIST_BYTE_COUNT 4096
1051 /* The maximum number of parameters in an SDP protocol element. */
1052 #ifndef SDP_MAX_PROTOCOL_PARAMS
1053 #define SDP_MAX_PROTOCOL_PARAMS 2
1056 /* The maximum number of simultaneous client and server connections. */
1057 #ifndef SDP_MAX_CONNECTIONS
1058 #define SDP_MAX_CONNECTIONS 4
1061 /* The MTU size for the L2CAP configuration. */
1062 #ifndef SDP_MTU_SIZE
1063 #define SDP_MTU_SIZE 672
1066 /* The flush timeout for the L2CAP configuration. */
1067 #ifndef SDP_FLUSH_TO
1068 #define SDP_FLUSH_TO 0xFFFF
1071 /* The name for security authorization. */
1072 #ifndef SDP_SERVICE_NAME
1073 #define SDP_SERVICE_NAME "Service Discovery"
1076 /* The security level for BTM. */
1077 #ifndef SDP_SECURITY_LEVEL
1078 #define SDP_SECURITY_LEVEL BTM_SEC_NONE
1081 /******************************************************************************
1085 ******************************************************************************/
1087 #ifndef RFCOMM_INCLUDED
1088 #define RFCOMM_INCLUDED TRUE
1091 /* The maximum number of ports supported. */
1092 #ifndef MAX_RFC_PORTS
1093 #define MAX_RFC_PORTS 30
1096 /* The maximum simultaneous links to different devices. */
1097 #ifndef MAX_ACL_CONNECTIONS
1098 #define MAX_BD_CONNECTIONS 7
1100 #define MAX_BD_CONNECTIONS MAX_ACL_CONNECTIONS
1103 /* The port receive queue low watermark level, in bytes. */
1104 #ifndef PORT_RX_LOW_WM
1105 #define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
1108 /* The port receive queue high watermark level, in bytes. */
1109 #ifndef PORT_RX_HIGH_WM
1110 #define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
1113 /* The port receive queue critical watermark level, in bytes. */
1114 #ifndef PORT_RX_CRITICAL_WM
1115 #define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
1118 /* The port receive queue low watermark level, in number of buffers. */
1119 #ifndef PORT_RX_BUF_LOW_WM
1120 #define PORT_RX_BUF_LOW_WM 4
1123 /* The port receive queue high watermark level, in number of buffers. */
1124 #ifndef PORT_RX_BUF_HIGH_WM
1125 #define PORT_RX_BUF_HIGH_WM 10
1128 /* The port receive queue critical watermark level, in number of buffers. */
1129 #ifndef PORT_RX_BUF_CRITICAL_WM
1130 #define PORT_RX_BUF_CRITICAL_WM 15
1133 /* The port transmit queue high watermark level, in bytes. */
1134 #ifndef PORT_TX_HIGH_WM
1135 #define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
1138 /* The port transmit queue critical watermark level, in bytes. */
1139 #ifndef PORT_TX_CRITICAL_WM
1140 #define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
1143 /* The port transmit queue high watermark level, in number of buffers. */
1144 #ifndef PORT_TX_BUF_HIGH_WM
1145 #define PORT_TX_BUF_HIGH_WM 10
1148 /* The port transmit queue high watermark level, in number of buffers. */
1149 #ifndef PORT_TX_BUF_CRITICAL_WM
1150 #define PORT_TX_BUF_CRITICAL_WM 15
1153 /* The RFCOMM multiplexer preferred flow control mechanism. */
1154 #ifndef PORT_FC_DEFAULT
1155 #define PORT_FC_DEFAULT PORT_FC_CREDIT
1158 /* The maximum number of credits receiver sends to peer when using credit-based flow control. */
1159 #ifndef PORT_CREDIT_RX_MAX
1160 #define PORT_CREDIT_RX_MAX 16
1163 /* The credit low watermark level. */
1164 #ifndef PORT_CREDIT_RX_LOW
1165 #define PORT_CREDIT_RX_LOW 8
1168 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1169 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_lock() or GKI_disable() */
1170 #ifndef PORT_SCHEDULE_LOCK
1171 #define PORT_SCHEDULE_LOCK GKI_disable()
1174 /* if application like BTA, Java or script test engine is running on other than BTU thread, */
1175 /* PORT_SCHEDULE_LOCK shall be defined as GKI_sched_unlock() or GKI_enable() */
1176 #ifndef PORT_SCHEDULE_UNLOCK
1177 #define PORT_SCHEDULE_UNLOCK GKI_enable()
1180 /******************************************************************************
1184 ******************************************************************************/
1186 #ifndef TCS_INCLUDED
1187 #define TCS_INCLUDED FALSE
1190 /* To include/exclude point-to-multipoint broadcast SETUP configuration. */
1191 #ifndef TCS_BCST_SETUP_INCLUDED
1192 #define TCS_BCST_SETUP_INCLUDED TRUE
1195 /* To include/exclude WUG member role. */
1196 #ifndef TCS_WUG_MEMBER_INCLUDED
1197 #define TCS_WUG_MEMBER_INCLUDED TRUE
1200 /******************************************************************************
1204 ******************************************************************************/
1205 #ifndef OBX_INCLUDED
1206 #define OBX_INCLUDED FALSE
1209 #ifndef OBX_CLIENT_INCLUDED
1210 #define OBX_CLIENT_INCLUDED TRUE
1213 #ifndef OBX_SERVER_INCLUDED
1214 #define OBX_SERVER_INCLUDED TRUE
1217 /* TRUE to include OBEX authentication/MD5 code */
1218 #ifndef OBX_MD5_INCLUDED
1219 #define OBX_MD5_INCLUDED TRUE
1222 /* TRUE to include OBEX 1.4 enhancement (including Obex Over L2CAP) */
1223 #ifndef OBX_14_INCLUDED
1224 #define OBX_14_INCLUDED FALSE
1226 /* MD5 code is required to use OBEX 1.4 features (Reliable session) */
1227 #if (OBX_MD5_INCLUDED == FALSE)
1228 #undef OBX_14_INCLUDED
1229 #define OBX_14_INCLUDED FALSE
1232 /* L2CAP FCR/eRTM mode is required to use OBEX Over L2CAP */
1233 #if (L2CAP_FCR_INCLUDED == FALSE)
1234 #undef OBX_14_INCLUDED
1235 #define OBX_14_INCLUDED FALSE
1238 /* The idle timeout value. 0 for no timeout event. */
1239 #ifndef OBX_TIMEOUT_VALUE
1240 #define OBX_TIMEOUT_VALUE 60
1243 /* The maximum number of registered servers. */
1244 #ifndef OBX_NUM_SERVERS
1245 #define OBX_NUM_SERVERS 12
1248 /* The maximum number of sessions per registered server. */
1249 #ifndef OBX_MAX_SR_SESSION
1250 #define OBX_MAX_SR_SESSION 4
1253 /* The maximum number of sessions per registered server.
1254 * must be less than MAX_BD_CONNECTIONS */
1255 #ifndef OBX_MAX_SR_SESSION
1256 #define OBX_MAX_SR_SESSION 4
1259 /* The maximum number of suspended sessions per registered servers. */
1260 #ifndef OBX_MAX_SUSPEND_SESSIONS
1261 #define OBX_MAX_SUSPEND_SESSIONS 4
1264 /* The maximum number of active clients. */
1265 #ifndef OBX_NUM_CLIENTS
1266 #define OBX_NUM_CLIENTS 8
1269 /* The maximum length of OBEX target header.*/
1270 #ifndef OBX_MAX_TARGET_LEN
1271 #define OBX_MAX_TARGET_LEN 16
1274 /* This option is application when OBX_14_INCLUDED=TRUE
1275 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
1277 #ifndef OBX_FCR_RX_POOL_ID
1278 #define OBX_FCR_RX_POOL_ID HCI_ACL_POOL_ID
1281 /* This option is application when OBX_14_INCLUDED=TRUE
1282 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
1283 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
1284 Note: This pool needs to have enough buffers to hold two times the window size negotiated
1285 in the L2CA_SetFCROptions (2 * tx_win_size) to allow for retransmissions.
1286 The size of each buffer must be able to hold the maximum MPS segment size passed in
1287 L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1289 #ifndef OBX_FCR_TX_POOL_ID
1290 #define OBX_FCR_TX_POOL_ID HCI_ACL_POOL_ID
1293 /******************************************************************************
1297 ******************************************************************************/
1299 #ifndef BNEP_INCLUDED
1300 #define BNEP_INCLUDED TRUE
1303 /* Protocol filtering is an optional feature. Bydefault it will be turned on */
1304 #ifndef BNEP_SUPPORTS_PROT_FILTERS
1305 #define BNEP_SUPPORTS_PROT_FILTERS TRUE
1308 /* Multicast filtering is an optional feature. Bydefault it will be turned on */
1309 #ifndef BNEP_SUPPORTS_MULTI_FILTERS
1310 #define BNEP_SUPPORTS_MULTI_FILTERS TRUE
1313 /* BNEP status API call is used mainly to get the L2CAP handle */
1314 #ifndef BNEP_SUPPORTS_STATUS_API
1315 #define BNEP_SUPPORTS_STATUS_API TRUE
1318 /* This is just a debug function */
1319 #ifndef BNEP_SUPPORTS_DEBUG_DUMP
1320 #define BNEP_SUPPORTS_DEBUG_DUMP TRUE
1323 #ifndef BNEP_SUPPORTS_ALL_UUID_LENGTHS
1324 #define BNEP_SUPPORTS_ALL_UUID_LENGTHS TRUE /* Otherwise it will support only 16bit UUIDs */
1328 ** When BNEP connection changes roles after the connection is established
1329 ** we will do an authentication check again on the new role
1331 #ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
1332 #define BNEP_DO_AUTH_FOR_ROLE_SWITCH TRUE
1336 /* Maximum number of protocol filters supported. */
1337 #ifndef BNEP_MAX_PROT_FILTERS
1338 #define BNEP_MAX_PROT_FILTERS 5
1341 /* Maximum number of multicast filters supported. */
1342 #ifndef BNEP_MAX_MULTI_FILTERS
1343 #define BNEP_MAX_MULTI_FILTERS 5
1346 /* Minimum MTU size. */
1347 #ifndef BNEP_MIN_MTU_SIZE
1348 #define BNEP_MIN_MTU_SIZE L2CAP_MTU_SIZE
1351 /* Preferred MTU size. */
1352 #ifndef BNEP_MTU_SIZE
1353 #define BNEP_MTU_SIZE BNEP_MIN_MTU_SIZE
1356 /* Maximum number of buffers allowed in transmit data queue. */
1357 #ifndef BNEP_MAX_XMITQ_DEPTH
1358 #define BNEP_MAX_XMITQ_DEPTH 20
1361 /* Maximum number BNEP of connections supported. */
1362 #ifndef BNEP_MAX_CONNECTIONS
1363 #define BNEP_MAX_CONNECTIONS 7
1367 /******************************************************************************
1371 ******************************************************************************/
1373 #ifndef AVDT_INCLUDED
1374 #define AVDT_INCLUDED TRUE
1377 /* Include reporting capability in AVDTP */
1378 #ifndef AVDT_REPORTING
1379 #define AVDT_REPORTING TRUE
1382 /* Include multiplexing capability in AVDTP */
1383 #ifndef AVDT_MULTIPLEXING
1384 #define AVDT_MULTIPLEXING TRUE
1387 /* Number of simultaneous links to different peer devices. */
1388 #ifndef AVDT_NUM_LINKS
1389 #define AVDT_NUM_LINKS 2
1392 /* Number of simultaneous stream endpoints. */
1393 #ifndef AVDT_NUM_SEPS
1394 #define AVDT_NUM_SEPS 3
1397 /* Number of transport channels setup per media stream(audio or video) */
1398 #ifndef AVDT_NUM_CHANNELS
1400 #if AVDT_REPORTING == TRUE
1401 /* signaling, media and reporting channels */
1402 #define AVDT_NUM_CHANNELS 3
1404 /* signaling and media channels */
1405 #define AVDT_NUM_CHANNELS 2
1406 #endif // AVDT_REPORTING
1408 #endif // AVDT_NUM_CHANNELS
1410 /* Number of transport channels setup by AVDT for all media streams
1411 * AVDT_NUM_CHANNELS * Number of simultaneous streams.
1413 #ifndef AVDT_NUM_TC_TBL
1414 #define AVDT_NUM_TC_TBL 6
1417 /* Maximum size in bytes of the codec capabilities information element. */
1418 #ifndef AVDT_CODEC_SIZE
1419 #define AVDT_CODEC_SIZE 10
1422 /* Maximum size in bytes of the content protection information element. */
1423 #ifndef AVDT_PROTECT_SIZE
1424 #define AVDT_PROTECT_SIZE 90
1427 /* Maximum number of GKI buffers in the fragment queue (for video frames).
1428 * Must be less than the number of buffers in the buffer pool of size AVDT_DATA_POOL_SIZE */
1429 #ifndef AVDT_MAX_FRAG_COUNT
1430 #define AVDT_MAX_FRAG_COUNT 15
1433 /******************************************************************************
1437 ******************************************************************************/
1439 #ifndef PAN_INCLUDED
1440 #define PAN_INCLUDED TRUE
1443 /* This will enable the PANU role */
1444 #ifndef PAN_SUPPORTS_ROLE_PANU
1445 #define PAN_SUPPORTS_ROLE_PANU TRUE
1448 /* This will enable the GN role */
1449 #ifndef PAN_SUPPORTS_ROLE_GN
1450 #define PAN_SUPPORTS_ROLE_GN TRUE
1453 /* This will enable the NAP role */
1454 #ifndef PAN_SUPPORTS_ROLE_NAP
1455 #define PAN_SUPPORTS_ROLE_NAP TRUE
1458 /* This is just for debugging purposes */
1459 #ifndef PAN_SUPPORTS_DEBUG_DUMP
1460 #define PAN_SUPPORTS_DEBUG_DUMP TRUE
1463 /* Maximum number of PAN connections allowed */
1464 #ifndef MAX_PAN_CONNS
1465 #define MAX_PAN_CONNS 7
1468 /* Default service name for NAP role */
1469 #ifndef PAN_NAP_DEFAULT_SERVICE_NAME
1470 #define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service"
1473 /* Default service name for GN role */
1474 #ifndef PAN_GN_DEFAULT_SERVICE_NAME
1475 #define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service"
1478 /* Default service name for PANU role */
1479 #ifndef PAN_PANU_DEFAULT_SERVICE_NAME
1480 #define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service"
1483 /* Default description for NAP role service */
1484 #ifndef PAN_NAP_DEFAULT_DESCRIPTION
1485 #define PAN_NAP_DEFAULT_DESCRIPTION "NAP"
1488 /* Default description for GN role service */
1489 #ifndef PAN_GN_DEFAULT_DESCRIPTION
1490 #define PAN_GN_DEFAULT_DESCRIPTION "GN"
1493 /* Default description for PANU role service */
1494 #ifndef PAN_PANU_DEFAULT_DESCRIPTION
1495 #define PAN_PANU_DEFAULT_DESCRIPTION "PANU"
1498 /* Default Security level for PANU role. */
1499 #ifndef PAN_PANU_SECURITY_LEVEL
1500 #define PAN_PANU_SECURITY_LEVEL 0
1503 /* Default Security level for GN role. */
1504 #ifndef PAN_GN_SECURITY_LEVEL
1505 #define PAN_GN_SECURITY_LEVEL 0
1508 /* Default Security level for NAP role. */
1509 #ifndef PAN_NAP_SECURITY_LEVEL
1510 #define PAN_NAP_SECURITY_LEVEL 0
1513 /******************************************************************************
1517 ******************************************************************************/
1519 #ifndef GAP_INCLUDED
1520 #define GAP_INCLUDED TRUE
1523 /* This is set to enable use of GAP L2CAP connections. */
1524 #ifndef GAP_CONN_INCLUDED
1525 #define GAP_CONN_INCLUDED TRUE
1528 /* This is set to enable posting event for data write */
1529 #ifndef GAP_CONN_POST_EVT_INCLUDED
1530 #define GAP_CONN_POST_EVT_INCLUDED FALSE
1533 /* The maximum number of simultaneous GAP L2CAP connections. */
1534 #ifndef GAP_MAX_CONNECTIONS
1535 #define GAP_MAX_CONNECTIONS 8
1538 /******************************************************************************
1542 ******************************************************************************/
1544 #ifndef CTP_INCLUDED
1545 #define CTP_INCLUDED FALSE
1548 /* The CTP discovery record size. */
1549 #ifndef CTP_DISC_REC_SIZE
1550 #define CTP_DISC_REC_SIZE 60
1553 /******************************************************************************
1557 ******************************************************************************/
1559 #ifndef ICP_INCLUDED
1560 #define ICP_INCLUDED FALSE
1563 /******************************************************************************
1567 ******************************************************************************/
1569 #ifndef SPP_INCLUDED
1570 #define SPP_INCLUDED FALSE
1573 /* The SPP discovery record size. */
1574 #ifndef SPP_DISC_REC_SIZE
1575 #define SPP_DISC_REC_SIZE 60
1578 /* keep the raw data received from SDP server in database. */
1579 #ifndef SDP_RAW_DATA_INCLUDED
1580 #define SDP_RAW_DATA_INCLUDED TRUE
1583 /* Inquiry duration in 1.28 second units. */
1585 #define SDP_DEBUG TRUE
1588 /******************************************************************************
1592 ******************************************************************************/
1594 #ifndef HSP2_INCLUDED
1595 #define HSP2_INCLUDED FALSE
1598 /* The time in seconds to wait for completion of a partial AT command or response from the peer. */
1599 #ifndef HSP2_AT_TO_INTERVAL
1600 #define HSP2_AT_TO_INTERVAL 30
1603 #ifndef HSP2_MAX_AT_VAL_LENGTH
1604 #if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
1605 #define HSP2_MAX_AT_VAL_LENGTH 310
1607 #define HSP2_MAX_AT_VAL_LENGTH 5
1611 /******************************************************************************
1615 ******************************************************************************/
1617 #ifndef HFP_INCLUDED
1618 #define HFP_INCLUDED FALSE
1621 /******************************************************************************
1625 ******************************************************************************/
1627 /* HID Device Role Included */
1628 #ifndef HID_DEV_INCLUDED
1629 #define HID_DEV_INCLUDED FALSE
1632 #ifndef HID_DEV_PM_INCLUDED
1633 #define HID_DEV_PM_INCLUDED TRUE
1636 #ifndef HID_DEV_SUBCLASS
1637 #define HID_DEV_SUBCLASS COD_MINOR_POINTING
1640 #ifndef HID_CONTROL_POOL_ID
1641 #define HID_CONTROL_POOL_ID 2
1644 #ifndef HID_INTERRUPT_POOL_ID
1645 #define HID_INTERRUPT_POOL_ID 2
1648 /*************************************************************************
1649 ** Definitions for Both HID-Host & Device
1651 #ifndef HID_MAX_SVC_NAME_LEN
1652 #define HID_MAX_SVC_NAME_LEN 32
1655 #ifndef HID_MAX_SVC_DESCR_LEN
1656 #define HID_MAX_SVC_DESCR_LEN 32
1659 #ifndef HID_MAX_PROV_NAME_LEN
1660 #define HID_MAX_PROV_NAME_LEN 32
1663 /*************************************************************************
1664 ** Definitions for HID-Host
1666 #ifndef HID_HOST_INCLUDED
1667 #define HID_HOST_INCLUDED TRUE
1670 #ifndef HID_HOST_MAX_DEVICES
1671 #define HID_HOST_MAX_DEVICES 7
1674 #ifndef HID_HOST_MTU
1675 #define HID_HOST_MTU 640
1678 #ifndef HID_HOST_FLUSH_TO
1679 #define HID_HOST_FLUSH_TO 0xffff
1682 #ifndef HID_HOST_MAX_CONN_RETRY
1683 #define HID_HOST_MAX_CONN_RETRY (3)
1686 #ifndef HID_HOST_REPAGE_WIN
1687 #define HID_HOST_REPAGE_WIN (2)
1690 /******************************************************************************
1694 ******************************************************************************/
1696 #ifndef DUN_INCLUDED
1697 #define DUN_INCLUDED FALSE
1700 /******************************************************************************
1704 ******************************************************************************/
1706 #ifndef GOEP_INCLUDED
1707 #define GOEP_INCLUDED FALSE
1710 /******************************************************************************
1714 ******************************************************************************/
1716 #ifndef OPP_INCLUDED
1717 #define OPP_INCLUDED FALSE
1720 /******************************************************************************
1724 ******************************************************************************/
1725 #ifndef BPP_INCLUDED
1726 #define BPP_INCLUDED FALSE
1729 #ifndef BPP_SND_INCLUDED
1730 #define BPP_SND_INCLUDED FALSE
1733 /******************************************************************************
1737 ******************************************************************************/
1738 #ifndef BIP_INCLUDED
1739 #define BIP_INCLUDED FALSE
1742 /******************************************************************************
1746 ******************************************************************************/
1748 #ifndef HCRP_INCLUDED
1749 #define HCRP_INCLUDED FALSE
1752 /* This is set to enable server. */
1753 #ifndef HCRP_SERVER_INCLUDED
1754 #define HCRP_SERVER_INCLUDED FALSE
1757 /* This is set to enable client. */
1758 #ifndef HCRP_CLIENT_INCLUDED
1759 #define HCRP_CLIENT_INCLUDED FALSE
1762 /******************************************************************************
1766 ******************************************************************************/
1768 #ifndef PAN_INCLUDED
1769 #define PAN_INCLUDED FALSE
1772 /******************************************************************************
1776 ******************************************************************************/
1778 #ifndef SAP_SERVER_INCLUDED
1779 #define SAP_SERVER_INCLUDED FALSE
1782 /*************************************************************************
1785 #ifndef A2D_INCLUDED
1786 #define A2D_INCLUDED TRUE
1789 /* TRUE to include SBC utility functions */
1790 #ifndef A2D_SBC_INCLUDED
1791 #define A2D_SBC_INCLUDED A2D_INCLUDED
1794 /******************************************************************************
1798 ******************************************************************************/
1800 #ifndef AVCT_INCLUDED
1801 #define AVCT_INCLUDED TRUE
1804 /* Number of simultaneous ACL links to different peer devices. */
1805 #ifndef AVCT_NUM_LINKS
1806 #define AVCT_NUM_LINKS 2
1809 /* Number of simultaneous AVCTP connections. */
1810 #ifndef AVCT_NUM_CONN
1811 #define AVCT_NUM_CONN 3
1814 /******************************************************************************
1818 ******************************************************************************/
1820 #ifndef AVRC_INCLUDED
1821 #define AVRC_INCLUDED TRUE
1824 #ifndef AVRC_METADATA_INCLUDED
1825 #define AVRC_METADATA_INCLUDED TRUE
1828 #ifndef AVRC_ADV_CTRL_INCLUDED
1829 #define AVRC_ADV_CTRL_INCLUDED TRUE
1832 #ifndef AVRC_CTLR_INCLUDED
1833 #define AVRC_CTLR_INCLUDED TRUE
1836 /******************************************************************************
1840 ******************************************************************************/
1841 #ifndef MCA_INCLUDED
1842 #define MCA_INCLUDED FALSE
1845 /* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */
1846 #ifndef MCA_CTRL_MTU
1847 #define MCA_CTRL_MTU 60
1850 /* The maximum number of registered MCAP instances. */
1851 #ifndef MCA_NUM_REGS
1852 #define MCA_NUM_REGS 12
1855 /* The maximum number of control channels (to difference devices) per registered MCAP instances. */
1856 #ifndef MCA_NUM_LINKS
1857 #define MCA_NUM_LINKS 3
1860 /* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */
1861 #ifndef MCA_NUM_DEPS
1862 #define MCA_NUM_DEPS 13
1865 /* The maximum number of MDL link per control channel. */
1866 #ifndef MCA_NUM_MDLS
1867 #define MCA_NUM_MDLS 4
1870 /* Pool ID where to reassemble the SDU. */
1871 #ifndef MCA_USER_RX_POOL_ID
1872 #define MCA_USER_RX_POOL_ID HCI_ACL_POOL_ID
1875 /* Pool ID where to hold the SDU. */
1876 #ifndef MCA_USER_TX_POOL_ID
1877 #define MCA_USER_TX_POOL_ID HCI_ACL_POOL_ID
1881 GKI Buffer Pool ID used to hold MPS segments during SDU reassembly
1883 #ifndef MCA_FCR_RX_POOL_ID
1884 #define MCA_FCR_RX_POOL_ID HCI_ACL_POOL_ID
1888 GKI Buffer Pool ID used to hold MPS segments used in (re)transmissions.
1889 L2CAP_DEFAULT_ERM_POOL_ID is specified to use the HCI ACL data pool.
1890 Note: This pool needs to have enough buffers to hold two times the window size negotiated
1891 in the tL2CAP_FCR_OPTIONS (2 * tx_win_size) to allow for retransmissions.
1892 The size of each buffer must be able to hold the maximum MPS segment size passed in
1893 tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1895 #ifndef MCA_FCR_TX_POOL_ID
1896 #define MCA_FCR_TX_POOL_ID HCI_ACL_POOL_ID
1899 /* MCAP control channel FCR Option:
1900 Size of the transmission window when using enhanced retransmission mode.
1901 1 is defined by HDP specification for control channel.
1903 #ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
1904 #define MCA_FCR_OPT_TX_WINDOW_SIZE 1
1907 /* MCAP control channel FCR Option:
1908 Number of transmission attempts for a single I-Frame before taking
1909 Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1912 0 - infinite retransmissions
1913 1 - single transmission
1915 #ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT
1916 #define MCA_FCR_OPT_MAX_TX_B4_DISCNT 20
1919 /* MCAP control channel FCR Option: Retransmission Timeout
1920 The AVRCP specification set a value in the range of 300 - 2000 ms
1921 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
1922 Range: Minimum 2000 (2 secs) when supporting PBF.
1924 #ifndef MCA_FCR_OPT_RETX_TOUT
1925 #define MCA_FCR_OPT_RETX_TOUT 2000
1928 /* MCAP control channel FCR Option: Monitor Timeout
1929 The AVRCP specification set a value in the range of 300 - 2000 ms
1930 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
1931 Range: Minimum 12000 (12 secs) when supporting PBF.
1933 #ifndef MCA_FCR_OPT_MONITOR_TOUT
1934 #define MCA_FCR_OPT_MONITOR_TOUT 12000
1937 /* MCAP control channel FCR Option: Maximum PDU payload size.
1938 The maximum number of payload octets that the local device can receive in a single PDU.
1940 #ifndef MCA_FCR_OPT_MPS_SIZE
1941 #define MCA_FCR_OPT_MPS_SIZE 1000
1944 /* Shared transport */
1945 #ifndef NFC_SHARED_TRANSPORT_ENABLED
1946 #define NFC_SHARED_TRANSPORT_ENABLED FALSE
1949 /******************************************************************************
1953 ******************************************************************************/
1955 #ifndef SER_INCLUDED
1956 #define SER_INCLUDED FALSE
1959 /* Mailbox used by serial application. */
1961 #define SER_MBOX TASK_MBOX_1
1964 /******************************************************************************
1966 ** Sleep Mode (Low Power Mode)
1968 ******************************************************************************/
1970 #ifndef HCILP_INCLUDED
1971 #define HCILP_INCLUDED TRUE
1974 /******************************************************************************
1976 ** SAP - Sample applications
1978 ******************************************************************************/
1980 #ifndef MMI_INCLUDED
1981 #define MMI_INCLUDED FALSE
1984 /******************************************************************************
1986 ** APPL - Application Task
1988 ******************************************************************************/
1989 /* When TRUE indicates that an application task is to be run */
1990 #ifndef APPL_INCLUDED
1991 #define APPL_INCLUDED TRUE
1994 #define L2CAP_FEATURE_REQ_ID 73
1995 #define L2CAP_FEATURE_RSP_ID 173
1997 /******************************************************************************
2001 ******************************************************************************/
2002 /* BTA EIR canned UUID list (default is dynamic) */
2003 #ifndef BTA_EIR_CANNED_UUID_LIST
2004 #define BTA_EIR_CANNED_UUID_LIST FALSE
2007 /* Number of supported customer UUID in EIR */
2008 #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
2009 #define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8
2012 /* CHLD override for bluedroid */
2013 #ifndef BTA_AG_CHLD_VAL_ECC
2014 #define BTA_AG_CHLD_VAL_ECC "(0,1,1x,2,2x,3)"
2017 #ifndef BTA_AG_CHLD_VAL
2018 #define BTA_AG_CHLD_VAL "(0,1,2,3)"
2021 /* Set the CIND to match HFP 1.5 */
2022 #ifndef BTA_AG_CIND_INFO
2023 #define BTA_AG_CIND_INFO "(\"call\",(0,1)),(\"callsetup\",(0-3)),(\"service\",(0-1)),(\"signal\",(0-5)),(\"roam\",(0,1)),(\"battchg\",(0-5)),(\"callheld\",(0-2))"
2026 #ifndef BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY
2027 #define BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY TRUE
2030 /******************************************************************************
2032 ** Tracing: Include trace header file here.
2034 ******************************************************************************/
2036 #include "bt_trace.h"
2038 #endif /* BT_TARGET_H */