1 /****************************************************************************** 2 * 3 * Copyright (c) 2014 The Android Open Source Project 4 * Copyright (C) 1999-2016 Broadcom Corporation 5 * 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: 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 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. 17 * 18 ******************************************************************************/ 19 20 #ifndef BT_TARGET_H 21 #define BT_TARGET_H 22 23 #ifndef BUILDCFG 24 #define BUILDCFG 25 #endif 26 27 #if !defined(HAS_BDROID_BUILDCFG) && !defined(HAS_NO_BDROID_BUILDCFG) 28 #error \ 29 "An Android.mk file did not include bdroid_CFLAGS and possibly not bdroid_C_INCLUDES" 30 #endif 31 32 #ifdef HAS_BDROID_BUILDCFG 33 #include "bdroid_buildcfg.h" 34 #endif 35 36 #include "bt_types.h" /* This must be defined AFTER buildcfg.h */ 37 38 //------------------Added from bdroid_buildcfg.h--------------------- 39 #ifndef L2CAP_EXTFEA_SUPPORTED_MASK 40 #define L2CAP_EXTFEA_SUPPORTED_MASK \ 41 (L2CAP_EXTFEA_ENH_RETRANS | L2CAP_EXTFEA_STREAM_MODE | L2CAP_EXTFEA_NO_CRC | \ 42 L2CAP_EXTFEA_FIXED_CHNLS) 43 #endif 44 45 #ifndef BTUI_OPS_FORMATS 46 #define BTUI_OPS_FORMATS (BTA_OP_VCARD21_MASK | BTA_OP_ANY_MASK) 47 #endif 48 49 #ifndef BTA_RFC_MTU_SIZE 50 #define BTA_RFC_MTU_SIZE \ 51 (L2CAP_MTU_SIZE - L2CAP_MIN_OFFSET - RFCOMM_DATA_OVERHEAD) 52 #endif 53 54 #ifndef BTA_INCLUDED 55 #define BTA_INCLUDED TRUE 56 #endif 57 58 #ifndef BTA_PAN_INCLUDED 59 #define BTA_PAN_INCLUDED TRUE 60 #endif 61 62 #ifndef BTA_HD_INCLUDED 63 #define BTA_HD_INCLUDED TRUE 64 #endif 65 66 #ifndef BTA_HH_INCLUDED 67 #define BTA_HH_INCLUDED TRUE 68 #endif 69 70 #ifndef BTA_HH_ROLE 71 #define BTA_HH_ROLE BTA_MASTER_ROLE_PREF 72 #endif 73 74 #ifndef BTA_HH_LE_INCLUDED 75 #define BTA_HH_LE_INCLUDED TRUE 76 #endif 77 78 #ifndef BTA_AR_INCLUDED 79 #define BTA_AR_INCLUDED TRUE 80 #endif 81 82 #ifndef BTA_AV_SINK_INCLUDED 83 #define BTA_AV_SINK_INCLUDED FALSE 84 #endif 85 86 #ifndef BTA_DISABLE_DELAY 87 #define BTA_DISABLE_DELAY 200 /* in milliseconds */ 88 #endif 89 90 #ifndef SBC_FOR_EMBEDDED_LINUX 91 #define SBC_FOR_EMBEDDED_LINUX TRUE 92 #endif 93 94 #ifndef AVDT_VERSION 95 #define AVDT_VERSION 0x0102 96 #endif 97 98 #ifndef BTA_AG_AT_MAX_LEN 99 #define BTA_AG_AT_MAX_LEN 512 100 #endif 101 102 #ifndef BTA_AVRCP_FF_RW_SUPPORT 103 #define BTA_AVRCP_FF_RW_SUPPORT TRUE 104 #endif 105 106 #ifndef BTA_AG_SCO_PKT_TYPES 107 #define BTA_AG_SCO_PKT_TYPES \ 108 (BTM_SCO_LINK_ONLY_MASK | ESCO_PKT_TYPES_MASK_EV3 | \ 109 ESCO_PKT_TYPES_MASK_NO_3_EV3 | ESCO_PKT_TYPES_MASK_NO_2_EV5 | \ 110 ESCO_PKT_TYPES_MASK_NO_3_EV5) 111 #endif 112 113 #ifndef BTA_AV_RET_TOUT 114 #define BTA_AV_RET_TOUT 15 115 #endif 116 117 /* TRUE to use SCMS-T content protection */ 118 #ifndef BTA_AV_CO_CP_SCMS_T 119 #define BTA_AV_CO_CP_SCMS_T FALSE 120 #endif 121 122 /* This feature is used to enable interleaved scan */ 123 #ifndef BTA_HOST_INTERLEAVE_SEARCH 124 #define BTA_HOST_INTERLEAVE_SEARCH FALSE 125 #endif 126 127 #ifndef BTA_DM_SDP_DB_SIZE 128 #define BTA_DM_SDP_DB_SIZE 8000 129 #endif 130 131 #ifndef HL_INCLUDED 132 #define HL_INCLUDED TRUE 133 #endif 134 135 #ifndef AG_VOICE_SETTINGS 136 #define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS 137 #endif 138 139 #ifndef BTIF_DM_OOB_TEST 140 #define BTIF_DM_OOB_TEST TRUE 141 #endif 142 143 // How long to wait before activating sniff mode after entering the 144 // idle state for FTS, OPS connections 145 #ifndef BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 146 #define BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 7000 147 #endif 148 149 //------------------End added from bdroid_buildcfg.h--------------------- 150 151 /****************************************************************************** 152 * 153 * Buffer sizes 154 * 155 *****************************************************************************/ 156 157 #ifndef BT_DEFAULT_BUFFER_SIZE 158 #define BT_DEFAULT_BUFFER_SIZE (4096 + 16) 159 #endif 160 161 #ifndef BT_SMALL_BUFFER_SIZE 162 #define BT_SMALL_BUFFER_SIZE 660 163 #endif 164 165 /* Receives HCI events from the lower-layer. */ 166 #ifndef HCI_CMD_BUF_SIZE 167 #define HCI_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE 168 #endif 169 170 /* Sends SDP data packets. */ 171 #ifndef SDP_DATA_BUF_SIZE 172 #define SDP_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 173 #endif 174 175 /* Sends RFCOMM command packets. */ 176 #ifndef RFCOMM_CMD_BUF_SIZE 177 #define RFCOMM_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE 178 #endif 179 180 /* Sends RFCOMM data packets. */ 181 #ifndef RFCOMM_DATA_BUF_SIZE 182 #define RFCOMM_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 183 #endif 184 185 /* Sends L2CAP packets to the peer and HCI messages to the controller. */ 186 #ifndef L2CAP_CMD_BUF_SIZE 187 #define L2CAP_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE 188 #endif 189 190 #ifndef L2CAP_USER_TX_BUF_SIZE 191 #define L2CAP_USER_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 192 #endif 193 194 #ifndef L2CAP_USER_RX_BUF_SIZE 195 #define L2CAP_USER_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 196 #endif 197 198 /* Sends L2CAP segmented packets in ERTM mode */ 199 #ifndef L2CAP_FCR_TX_BUF_SIZE 200 #define L2CAP_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 201 #endif 202 203 /* Receives L2CAP segmented packets in ERTM mode */ 204 #ifndef L2CAP_FCR_RX_BUF_SIZE 205 #define L2CAP_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 206 #endif 207 208 #ifndef L2CAP_FCR_ERTM_BUF_SIZE 209 #define L2CAP_FCR_ERTM_BUF_SIZE (10240 + 24) 210 #endif 211 212 /* Number of ACL buffers to assign to LE */ 213 /* 214 * TODO: Do we need this? 215 * It was used when the HCI buffers were shared with BR/EDR. 216 */ 217 #ifndef L2C_DEF_NUM_BLE_BUF_SHARED 218 #define L2C_DEF_NUM_BLE_BUF_SHARED 1 219 #endif 220 221 /* Used by BTM when it sends HCI commands to the controller. */ 222 #ifndef BTM_CMD_BUF_SIZE 223 #define BTM_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE 224 #endif 225 226 #ifndef OBX_LRG_DATA_BUF_SIZE 227 #define OBX_LRG_DATA_BUF_SIZE (8080 + 26) 228 #endif 229 230 /* Used to send data to L2CAP. */ 231 #ifndef GAP_DATA_BUF_SIZE 232 #define GAP_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 233 #endif 234 235 /* BNEP data and protocol messages. */ 236 #ifndef BNEP_BUF_SIZE 237 #define BNEP_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 238 #endif 239 240 /* AVDTP buffer size for protocol messages */ 241 #ifndef AVDT_CMD_BUF_SIZE 242 #define AVDT_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE 243 #endif 244 245 #ifndef PAN_BUF_SIZE 246 #define PAN_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 247 #endif 248 249 /* Maximum number of buffers to allocate for PAN */ 250 #ifndef PAN_BUF_MAX 251 #define PAN_BUF_MAX 100 252 #endif 253 254 /* AVCTP buffer size for protocol messages */ 255 #ifndef AVCT_CMD_BUF_SIZE 256 #define AVCT_CMD_BUF_SIZE 288 257 #endif 258 259 /* AVRCP buffer size for protocol messages */ 260 #ifndef AVRC_CMD_BUF_SIZE 261 #define AVRC_CMD_BUF_SIZE 288 262 #endif 263 264 /* AVRCP Metadata buffer size for protocol messages */ 265 #ifndef AVRC_META_CMD_BUF_SIZE 266 #define AVRC_META_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE 267 #endif 268 269 #ifndef BTA_HL_LRG_DATA_BUF_SIZE 270 #define BTA_HL_LRG_DATA_BUF_SIZE (10240 + 24) 271 #endif 272 273 /* GATT Server Database buffer size */ 274 #ifndef GATT_DB_BUF_SIZE 275 #define GATT_DB_BUF_SIZE 128 276 #endif 277 278 /* GATT Data sending buffer size */ 279 #ifndef GATT_DATA_BUF_SIZE 280 #define GATT_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 281 #endif 282 283 /****************************************************************************** 284 * 285 * BTM 286 * 287 *****************************************************************************/ 288 289 /* Cancel Inquiry on incoming SSP */ 290 #ifndef BTM_NO_SSP_ON_INQUIRY 291 #define BTM_NO_SSP_ON_INQUIRY FALSE 292 #endif 293 294 /* Includes SCO if TRUE */ 295 #ifndef BTM_SCO_INCLUDED 296 #define BTM_SCO_INCLUDED TRUE /* TRUE includes SCO code */ 297 #endif 298 299 /* Includes SCO if TRUE */ 300 #ifndef BTM_SCO_HCI_INCLUDED 301 #define BTM_SCO_HCI_INCLUDED FALSE /* TRUE includes SCO over HCI code */ 302 #endif 303 304 /* This is used to work around a controller bug that doesn't like Disconnect 305 * issued while there is a role switch in progress 306 */ 307 #ifndef BTM_DISC_DURING_RS 308 #define BTM_DISC_DURING_RS TRUE 309 #endif 310 311 /************************** 312 * Initial SCO TX credit 313 ************************/ 314 /* max TX SCO data packet size */ 315 #ifndef BTM_SCO_DATA_SIZE_MAX 316 #define BTM_SCO_DATA_SIZE_MAX 240 317 #endif 318 319 /* The size in bytes of the BTM inquiry database. */ 320 #ifndef BTM_INQ_DB_SIZE 321 #define BTM_INQ_DB_SIZE 40 322 #endif 323 324 /* The default scan mode */ 325 #ifndef BTM_DEFAULT_SCAN_TYPE 326 #define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED 327 #endif 328 329 /* Should connections to unknown devices be allowed when not discoverable? */ 330 #ifndef BTM_ALLOW_CONN_IF_NONDISCOVER 331 #define BTM_ALLOW_CONN_IF_NONDISCOVER TRUE 332 #endif 333 334 /* Sets the Page_Scan_Window: the length of time that the device is performing 335 * a page scan. */ 336 #ifndef BTM_DEFAULT_CONN_WINDOW 337 #define BTM_DEFAULT_CONN_WINDOW 0x0012 338 #endif 339 340 /* Sets the Page_Scan_Activity: the interval between the start of two 341 * consecutive page scans. */ 342 #ifndef BTM_DEFAULT_CONN_INTERVAL 343 #define BTM_DEFAULT_CONN_INTERVAL 0x0800 344 #endif 345 346 /* When automatic inquiry scan is enabled, this sets the inquiry scan window. */ 347 #ifndef BTM_DEFAULT_DISC_WINDOW 348 #define BTM_DEFAULT_DISC_WINDOW 0x0012 349 #endif 350 351 /* When automatic inquiry scan is enabled, this sets the inquiry scan interval. 352 */ 353 #ifndef BTM_DEFAULT_DISC_INTERVAL 354 #define BTM_DEFAULT_DISC_INTERVAL 0x0800 355 #endif 356 357 /* Default class of device 358 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS} 359 * 360 * SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object 361 * Transfer,Bit22 -Telephony) 362 * MAJOR_CLASS:0x02 - PHONE 363 * MINOR_CLASS:0x0C - SMART_PHONE 364 * 365 */ 366 #ifndef BTA_DM_COD 367 #define BTA_DM_COD \ 368 { 0x5A, 0x02, 0x0C } 369 #endif 370 371 /* The number of SCO links. */ 372 #ifndef BTM_MAX_SCO_LINKS 373 #define BTM_MAX_SCO_LINKS 3 374 #endif 375 376 /* The preferred type of SCO links (2-eSCO, 0-SCO). */ 377 #ifndef BTM_DEFAULT_SCO_MODE 378 #define BTM_DEFAULT_SCO_MODE 2 379 #endif 380 381 /* The number of security records for peer devices. */ 382 #ifndef BTM_SEC_MAX_DEVICE_RECORDS 383 #define BTM_SEC_MAX_DEVICE_RECORDS 100 384 #endif 385 386 /* The number of security records for services. */ 387 #ifndef BTM_SEC_MAX_SERVICE_RECORDS 388 #define BTM_SEC_MAX_SERVICE_RECORDS 32 389 #endif 390 391 /* If True, force a retrieval of remote device name for each bond in case it's 392 * changed */ 393 #ifndef BTM_SEC_FORCE_RNR_FOR_DBOND 394 #define BTM_SEC_FORCE_RNR_FOR_DBOND FALSE 395 #endif 396 397 /* Maximum device name length used in btm database. */ 398 #ifndef BTM_MAX_REM_BD_NAME_LEN 399 #define BTM_MAX_REM_BD_NAME_LEN 248 400 #endif 401 402 /* Maximum local device name length stored btm database */ 403 #ifndef BTM_MAX_LOC_BD_NAME_LEN 404 #define BTM_MAX_LOC_BD_NAME_LEN 248 405 #endif 406 407 /* Fixed Default String. When this is defined as null string, the device's 408 * product model name is used as the default local name. 409 */ 410 #ifndef BTM_DEF_LOCAL_NAME 411 #define BTM_DEF_LOCAL_NAME "" 412 #endif 413 414 /* Maximum service name stored with security authorization (0 if not needed) */ 415 #ifndef BTM_SEC_SERVICE_NAME_LEN 416 #define BTM_SEC_SERVICE_NAME_LEN BT_MAX_SERVICE_NAME_LEN 417 #endif 418 419 /* Maximum length of the service name. */ 420 #ifndef BT_MAX_SERVICE_NAME_LEN 421 #define BT_MAX_SERVICE_NAME_LEN 21 422 #endif 423 424 /* The maximum number of clients that can register with the power manager. */ 425 #ifndef BTM_MAX_PM_RECORDS 426 #define BTM_MAX_PM_RECORDS 2 427 #endif 428 429 /* This is set to show debug trace messages for the power manager. */ 430 #ifndef BTM_PM_DEBUG 431 #define BTM_PM_DEBUG FALSE 432 #endif 433 434 /* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */ 435 #ifndef BTM_SCO_WAKE_PARKED_LINK 436 #define BTM_SCO_WAKE_PARKED_LINK TRUE 437 #endif 438 439 /* If the user does not respond to security process requests within this many 440 * seconds, 441 * a negative response would be sent automatically. 442 * 30 is LMP response timeout value */ 443 #ifndef BTM_SEC_TIMEOUT_VALUE 444 #define BTM_SEC_TIMEOUT_VALUE 35 445 #endif 446 447 /* Maximum number of callbacks that can be registered using 448 * BTM_RegisterForVSEvents */ 449 #ifndef BTM_MAX_VSE_CALLBACKS 450 #define BTM_MAX_VSE_CALLBACKS 3 451 #endif 452 453 /****************************************** 454 * Lisbon Features 455 ******************************************/ 456 /* This is set to TRUE if the FEC is required for EIR packet. */ 457 #ifndef BTM_EIR_DEFAULT_FEC_REQUIRED 458 #define BTM_EIR_DEFAULT_FEC_REQUIRED TRUE 459 #endif 460 461 /* The IO capability of the local device (for Simple Pairing) */ 462 #ifndef BTM_LOCAL_IO_CAPS 463 #define BTM_LOCAL_IO_CAPS BTM_IO_CAP_IO 464 #endif 465 466 #ifndef BTM_LOCAL_IO_CAPS_BLE 467 #define BTM_LOCAL_IO_CAPS_BLE BTM_IO_CAP_KBDISP 468 #endif 469 470 /* The default MITM Protection Requirement (for Simple Pairing) 471 * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */ 472 #ifndef BTM_DEFAULT_AUTH_REQ 473 #define BTM_DEFAULT_AUTH_REQ BTM_AUTH_SP_NO 474 #endif 475 476 /* The default MITM Protection Requirement for dedicated bonding using Simple 477 * Pairing 478 * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */ 479 #ifndef BTM_DEFAULT_DD_AUTH_REQ 480 #define BTM_DEFAULT_DD_AUTH_REQ BTM_AUTH_AP_YES 481 #endif 482 483 /* TRUE to include Sniff Subrating */ 484 #ifndef BTM_SSR_INCLUDED 485 #define BTM_SSR_INCLUDED TRUE 486 #endif 487 488 /************************* 489 * End of Lisbon Features 490 *************************/ 491 492 /* 4.1/4.2 secure connections feature */ 493 #ifndef SC_MODE_INCLUDED 494 #define SC_MODE_INCLUDED TRUE 495 #endif 496 497 /* Used for conformance testing ONLY */ 498 #ifndef BTM_BLE_CONFORMANCE_TESTING 499 #define BTM_BLE_CONFORMANCE_TESTING FALSE 500 #endif 501 502 /****************************************************************************** 503 * 504 * L2CAP 505 * 506 *****************************************************************************/ 507 508 /* The maximum number of simultaneous links that L2CAP can support. */ 509 #ifndef MAX_ACL_CONNECTIONS 510 #define MAX_L2CAP_LINKS 7 511 #else 512 #define MAX_L2CAP_LINKS MAX_ACL_CONNECTIONS 513 #endif 514 515 /* The maximum number of simultaneous channels that L2CAP can support. */ 516 #ifndef MAX_L2CAP_CHANNELS 517 #define MAX_L2CAP_CHANNELS 16 518 #endif 519 520 /* The maximum number of simultaneous applications that can register with L2CAP. 521 */ 522 #ifndef MAX_L2CAP_CLIENTS 523 #define MAX_L2CAP_CLIENTS 15 524 #endif 525 526 /* The number of seconds of link inactivity before a link is disconnected. */ 527 #ifndef L2CAP_LINK_INACTIVITY_TOUT 528 #define L2CAP_LINK_INACTIVITY_TOUT 4 529 #endif 530 531 /* The number of seconds of link inactivity after bonding before a link is 532 * disconnected. */ 533 #ifndef L2CAP_BONDING_TIMEOUT 534 #define L2CAP_BONDING_TIMEOUT 3 535 #endif 536 537 /* The time from the HCI connection complete to disconnect if no channel is 538 * established. */ 539 #ifndef L2CAP_LINK_STARTUP_TOUT 540 #define L2CAP_LINK_STARTUP_TOUT 60 541 #endif 542 543 /* The L2CAP MTU; must be in accord with the HCI ACL buffer size. */ 544 #ifndef L2CAP_MTU_SIZE 545 #define L2CAP_MTU_SIZE 1691 546 #endif 547 548 /* 549 * The L2CAP MPS over Bluetooth; must be in accord with the FCR tx buffer size 550 * and ACL down buffer size. 551 */ 552 #ifndef L2CAP_MPS_OVER_BR_EDR 553 #define L2CAP_MPS_OVER_BR_EDR 1010 554 #endif 555 556 /* If host flow control enabled, this is the number of buffers the controller 557 * can have unacknowledged. */ 558 #ifndef L2CAP_HOST_FC_ACL_BUFS 559 #define L2CAP_HOST_FC_ACL_BUFS 20 560 #endif 561 562 /* This is set to enable L2CAP to take the ACL link out of park mode when ACL 563 * data is to be sent. */ 564 #ifndef L2CAP_WAKE_PARKED_LINK 565 #define L2CAP_WAKE_PARKED_LINK TRUE 566 #endif 567 568 /* Whether link wants to be the master or the slave. */ 569 #ifndef L2CAP_DESIRED_LINK_ROLE 570 #define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_SLAVE 571 #endif 572 573 /* Include Non-Flushable Packet Boundary Flag feature of Lisbon */ 574 #ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED 575 #define L2CAP_NON_FLUSHABLE_PB_INCLUDED TRUE 576 #endif 577 578 /* Minimum number of ACL credit for high priority link */ 579 #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 580 #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5 581 #endif 582 583 /* used for monitoring HCI ACL credit management */ 584 #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG 585 #define L2CAP_HCI_FLOW_CONTROL_DEBUG TRUE 586 #endif 587 588 /* Unicast Connectionless Data */ 589 #ifndef L2CAP_UCD_INCLUDED 590 #define L2CAP_UCD_INCLUDED FALSE 591 #endif 592 593 /* Unicast Connectionless Data MTU */ 594 #ifndef L2CAP_UCD_MTU 595 #define L2CAP_UCD_MTU L2CAP_MTU_SIZE 596 #endif 597 598 /* Unicast Connectionless Data Idle Timeout */ 599 #ifndef L2CAP_UCD_IDLE_TIMEOUT 600 #define L2CAP_UCD_IDLE_TIMEOUT 2 601 #endif 602 603 /* Unicast Connectionless Data Idle Timeout */ 604 #ifndef L2CAP_UCD_CH_PRIORITY 605 #define L2CAP_UCD_CH_PRIORITY L2CAP_CHNL_PRIORITY_MEDIUM 606 #endif 607 608 /* Used for features using fixed channels; set to zero if no fixed channels 609 * supported (BLE, etc.) */ 610 /* Excluding L2CAP signaling channel and UCD */ 611 #ifndef L2CAP_NUM_FIXED_CHNLS 612 #define L2CAP_NUM_FIXED_CHNLS 32 613 #endif 614 615 /* First fixed channel supported */ 616 #ifndef L2CAP_FIRST_FIXED_CHNL 617 #define L2CAP_FIRST_FIXED_CHNL 4 618 #endif 619 620 #ifndef L2CAP_LAST_FIXED_CHNL 621 #define L2CAP_LAST_FIXED_CHNL \ 622 (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1) 623 #endif 624 625 /* Round Robin service channels in link */ 626 #ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE 627 #define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE TRUE 628 #endif 629 630 /* used for monitoring eL2CAP data flow */ 631 #ifndef L2CAP_ERTM_STATS 632 #define L2CAP_ERTM_STATS FALSE 633 #endif 634 635 /* Used for conformance testing ONLY: When TRUE lets scriptwrapper overwrite 636 * info response */ 637 #ifndef L2CAP_CONFORMANCE_TESTING 638 #define L2CAP_CONFORMANCE_TESTING FALSE 639 #endif 640 641 /* 642 * Max bytes per connection to buffer locally before dropping the 643 * connection if local client does not receive it - default is 1MB 644 */ 645 #ifndef L2CAP_MAX_RX_BUFFER 646 #define L2CAP_MAX_RX_BUFFER 0x100000 647 #endif 648 649 /****************************************************************************** 650 * 651 * BLE 652 * 653 *****************************************************************************/ 654 655 #ifndef LOCAL_BLE_CONTROLLER_ID 656 #define LOCAL_BLE_CONTROLLER_ID (1) 657 #endif 658 659 /* 660 * Toggles support for general LE privacy features such as remote address 661 * resolution, local address rotation etc. 662 */ 663 #ifndef BLE_PRIVACY_SPT 664 #define BLE_PRIVACY_SPT TRUE 665 #endif 666 667 /* 668 * Enables or disables support for local privacy (ex. address rotation) 669 */ 670 #ifndef BLE_LOCAL_PRIVACY_ENABLED 671 #define BLE_LOCAL_PRIVACY_ENABLED TRUE 672 #endif 673 674 /* 675 * Toggles support for vendor specific extensions such as RPA offloading, 676 * feature discovery, multi-adv etc. 677 */ 678 #ifndef BLE_VND_INCLUDED 679 #define BLE_VND_INCLUDED FALSE 680 #endif 681 682 #ifndef BTM_BLE_ADV_TX_POWER 683 #define BTM_BLE_ADV_TX_POWER \ 684 { -21, -15, -7, 1, 9 } 685 #endif 686 687 /* The maximum number of simultaneous applications that can register with LE 688 * L2CAP. */ 689 #ifndef BLE_MAX_L2CAP_CLIENTS 690 #define BLE_MAX_L2CAP_CLIENTS 15 691 #endif 692 693 /****************************************************************************** 694 * 695 * ATT/GATT Protocol/Profile Settings 696 * 697 *****************************************************************************/ 698 #ifndef BLE_LLT_INCLUDED 699 #define BLE_LLT_INCLUDED TRUE 700 #endif 701 702 #ifndef ATT_INCLUDED 703 #define ATT_INCLUDED TRUE 704 #endif 705 706 #ifndef ATT_DEBUG 707 #define ATT_DEBUG TRUE 708 #endif 709 710 #ifndef BLE_DELAY_REQUEST_ENC 711 /* This flag is to work around IPHONE problem, We need to wait for iPhone ready 712 before send encryption request to iPhone */ 713 #define BLE_DELAY_REQUEST_ENC FALSE 714 #endif 715 716 #ifndef GAP_TRANSPORT_SUPPORTED 717 #define GAP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR 718 #endif 719 720 #ifndef GATTP_TRANSPORT_SUPPORTED 721 #define GATTP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR 722 #endif 723 724 #ifndef GATT_MAX_SR_PROFILES 725 #define GATT_MAX_SR_PROFILES 32 /* max is 32 */ 726 #endif 727 728 #ifndef GATT_MAX_APPS 729 #define GATT_MAX_APPS 32 /* note: 2 apps used internally GATT and GAP */ 730 #endif 731 732 #ifndef GATT_MAX_PHY_CHANNEL 733 #define GATT_MAX_PHY_CHANNEL 7 734 #endif 735 736 /* Used for conformance testing ONLY */ 737 #ifndef GATT_CONFORMANCE_TESTING 738 #define GATT_CONFORMANCE_TESTING FALSE 739 #endif 740 741 /****************************************************************************** 742 * 743 * SMP 744 * 745 *****************************************************************************/ 746 #ifndef SMP_DEBUG 747 #define SMP_DEBUG FALSE 748 #endif 749 750 #ifndef SMP_DEFAULT_AUTH_REQ 751 #define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY 752 #endif 753 754 #ifndef SMP_MAX_ENC_KEY_SIZE 755 #define SMP_MAX_ENC_KEY_SIZE 16 756 #endif 757 758 /* minimum link timeout after SMP pairing is done, leave room for key exchange 759 and racing condition for the following service connection. 760 Prefer greater than 0 second, and no less than default inactivity link idle 761 timer(L2CAP_LINK_INACTIVITY_TOUT) in l2cap) */ 762 #ifndef SMP_LINK_TOUT_MIN 763 #if (L2CAP_LINK_INACTIVITY_TOUT > 0) 764 #define SMP_LINK_TOUT_MIN L2CAP_LINK_INACTIVITY_TOUT 765 #else 766 #define SMP_LINK_TOUT_MIN 2 767 #endif 768 #endif 769 /****************************************************************************** 770 * 771 * SDP 772 * 773 *****************************************************************************/ 774 775 /* This is set to enable SDP server functionality. */ 776 #ifndef SDP_SERVER_ENABLED 777 #define SDP_SERVER_ENABLED TRUE 778 #endif 779 780 /* The maximum number of SDP records the server can support. */ 781 #ifndef SDP_MAX_RECORDS 782 #define SDP_MAX_RECORDS 30 783 #endif 784 785 /* The maximum number of attributes in each record. */ 786 #ifndef SDP_MAX_REC_ATTR 787 #define SDP_MAX_REC_ATTR 25 788 #endif 789 790 #ifndef SDP_MAX_PAD_LEN 791 #define SDP_MAX_PAD_LEN 600 792 #endif 793 794 /* The maximum length, in bytes, of an attribute. */ 795 #ifndef SDP_MAX_ATTR_LEN 796 #define SDP_MAX_ATTR_LEN 400 797 #endif 798 799 /* The maximum number of attribute filters supported by SDP databases. */ 800 #ifndef SDP_MAX_ATTR_FILTERS 801 #define SDP_MAX_ATTR_FILTERS 15 802 #endif 803 804 /* The maximum number of UUID filters supported by SDP databases. */ 805 #ifndef SDP_MAX_UUID_FILTERS 806 #define SDP_MAX_UUID_FILTERS 3 807 #endif 808 809 /* The maximum number of record handles retrieved in a search. */ 810 #ifndef SDP_MAX_DISC_SERVER_RECS 811 #define SDP_MAX_DISC_SERVER_RECS 21 812 #endif 813 814 /* The size of a scratchpad buffer, in bytes, for storing the response to an 815 * attribute request. */ 816 #ifndef SDP_MAX_LIST_BYTE_COUNT 817 #define SDP_MAX_LIST_BYTE_COUNT 4096 818 #endif 819 820 /* The maximum number of parameters in an SDP protocol element. */ 821 #ifndef SDP_MAX_PROTOCOL_PARAMS 822 #define SDP_MAX_PROTOCOL_PARAMS 2 823 #endif 824 825 /* The maximum number of simultaneous client and server connections. */ 826 #ifndef SDP_MAX_CONNECTIONS 827 #define SDP_MAX_CONNECTIONS 4 828 #endif 829 830 /* The MTU size for the L2CAP configuration. */ 831 #ifndef SDP_MTU_SIZE 832 #define SDP_MTU_SIZE 672 833 #endif 834 835 /* The flush timeout for the L2CAP configuration. */ 836 #ifndef SDP_FLUSH_TO 837 #define SDP_FLUSH_TO 0xFFFF 838 #endif 839 840 /* The name for security authorization. */ 841 #ifndef SDP_SERVICE_NAME 842 #define SDP_SERVICE_NAME "Service Discovery" 843 #endif 844 845 /* The security level for BTM. */ 846 #ifndef SDP_SECURITY_LEVEL 847 #define SDP_SECURITY_LEVEL BTM_SEC_NONE 848 #endif 849 850 /****************************************************************************** 851 * 852 * RFCOMM 853 * 854 *****************************************************************************/ 855 856 /* The maximum number of ports supported. */ 857 #ifndef MAX_RFC_PORTS 858 #define MAX_RFC_PORTS 30 859 #endif 860 861 /* The maximum simultaneous links to different devices. */ 862 #ifndef MAX_ACL_CONNECTIONS 863 #define MAX_BD_CONNECTIONS 7 864 #else 865 #define MAX_BD_CONNECTIONS MAX_ACL_CONNECTIONS 866 #endif 867 868 /* The port receive queue low watermark level, in bytes. */ 869 #ifndef PORT_RX_LOW_WM 870 #define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM) 871 #endif 872 873 /* The port receive queue high watermark level, in bytes. */ 874 #ifndef PORT_RX_HIGH_WM 875 #define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM) 876 #endif 877 878 /* The port receive queue critical watermark level, in bytes. */ 879 #ifndef PORT_RX_CRITICAL_WM 880 #define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM) 881 #endif 882 883 /* The port receive queue low watermark level, in number of buffers. */ 884 #ifndef PORT_RX_BUF_LOW_WM 885 #define PORT_RX_BUF_LOW_WM 4 886 #endif 887 888 /* The port receive queue high watermark level, in number of buffers. */ 889 #ifndef PORT_RX_BUF_HIGH_WM 890 #define PORT_RX_BUF_HIGH_WM 10 891 #endif 892 893 /* The port receive queue critical watermark level, in number of buffers. */ 894 #ifndef PORT_RX_BUF_CRITICAL_WM 895 #define PORT_RX_BUF_CRITICAL_WM 15 896 #endif 897 898 /* The port transmit queue high watermark level, in bytes. */ 899 #ifndef PORT_TX_HIGH_WM 900 #define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM) 901 #endif 902 903 /* The port transmit queue critical watermark level, in bytes. */ 904 #ifndef PORT_TX_CRITICAL_WM 905 #define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM) 906 #endif 907 908 /* The port transmit queue high watermark level, in number of buffers. */ 909 #ifndef PORT_TX_BUF_HIGH_WM 910 #define PORT_TX_BUF_HIGH_WM 10 911 #endif 912 913 /* The port transmit queue high watermark level, in number of buffers. */ 914 #ifndef PORT_TX_BUF_CRITICAL_WM 915 #define PORT_TX_BUF_CRITICAL_WM 15 916 #endif 917 918 /* The RFCOMM multiplexer preferred flow control mechanism. */ 919 #ifndef PORT_FC_DEFAULT 920 #define PORT_FC_DEFAULT PORT_FC_CREDIT 921 #endif 922 923 /* The maximum number of credits receiver sends to peer when using credit-based 924 * flow control. */ 925 #ifndef PORT_CREDIT_RX_MAX 926 #define PORT_CREDIT_RX_MAX 16 927 #endif 928 929 /* The credit low watermark level. */ 930 #ifndef PORT_CREDIT_RX_LOW 931 #define PORT_CREDIT_RX_LOW 8 932 #endif 933 934 /****************************************************************************** 935 * 936 * OBEX 937 * 938 *****************************************************************************/ 939 940 /* 941 * Buffer size to reassemble the SDU. 942 * It will allow buffers to be used that are larger than the L2CAP_MAX_MTU. 943 */ 944 #ifndef OBX_USER_RX_BUF_SIZE 945 #define OBX_USER_RX_BUF_SIZE OBX_LRG_DATA_BUF_SIZE 946 #endif 947 948 /* 949 * Buffer size to hold the SDU. 950 * It will allow buffers to be used that are larger than the L2CAP_MAX_MTU. 951 */ 952 #ifndef OBX_USER_TX_BUF_SIZE 953 #define OBX_USER_TX_BUF_SIZE OBX_LRG_DATA_BUF_SIZE 954 #endif 955 956 /* Buffer size used to hold MPS segments during SDU reassembly. */ 957 #ifndef OBX_FCR_RX_BUF_SIZE 958 #define OBX_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 959 #endif 960 961 /* 962 * Buffer size used to hold MPS segments used in (re)transmissions. 963 * The size of each buffer must be able to hold the maximum MPS segment size 964 * passed in L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) + 965 * L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec). 966 */ 967 #ifndef OBX_FCR_TX_BUF_SIZE 968 #define OBX_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 969 #endif 970 971 /* 972 * Size of the transmission window when using enhanced retransmission mode. 973 * Not used in basic and streaming modes. Range: 1 - 63 974 */ 975 #ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 976 #define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 20 977 #endif 978 979 /* 980 * Number of transmission attempts for a single I-Frame before taking 981 * Down the connection. Used In ERTM mode only. Value is Ignored in basic and 982 * Streaming modes. 983 * Range: 0, 1-0xFF 984 * 0 - infinite retransmissions 985 * 1 - single transmission 986 */ 987 #ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT 988 #define OBX_FCR_OPT_MAX_TX_B4_DISCNT 20 989 #endif 990 991 /* 992 * Retransmission Timeout 993 * Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF. 994 */ 995 #ifndef OBX_FCR_OPT_RETX_TOUT 996 #define OBX_FCR_OPT_RETX_TOUT 2000 997 #endif 998 999 /* 1000 * Monitor Timeout 1001 * Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF. 1002 */ 1003 #ifndef OBX_FCR_OPT_MONITOR_TOUT 1004 #define OBX_FCR_OPT_MONITOR_TOUT 12000 1005 #endif 1006 1007 /* 1008 * Maximum PDU payload size. 1009 * Suggestion: The maximum amount of data that will fit into a 3-DH5 packet. 1010 * Range: 2 octets 1011 */ 1012 #ifndef OBX_FCR_OPT_MAX_PDU_SIZE 1013 #define OBX_FCR_OPT_MAX_PDU_SIZE L2CAP_MPS_OVER_BR_EDR 1014 #endif 1015 1016 /****************************************************************************** 1017 * 1018 * BNEP 1019 * 1020 *****************************************************************************/ 1021 1022 #ifndef BNEP_INCLUDED 1023 #define BNEP_INCLUDED TRUE 1024 #endif 1025 1026 /* BNEP status API call is used mainly to get the L2CAP handle */ 1027 #ifndef BNEP_SUPPORTS_STATUS_API 1028 #define BNEP_SUPPORTS_STATUS_API TRUE 1029 #endif 1030 1031 /* 1032 * When BNEP connection changes roles after the connection is established 1033 * we will do an authentication check again on the new role 1034 */ 1035 #ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH 1036 #define BNEP_DO_AUTH_FOR_ROLE_SWITCH TRUE 1037 #endif 1038 1039 /* Maximum number of protocol filters supported. */ 1040 #ifndef BNEP_MAX_PROT_FILTERS 1041 #define BNEP_MAX_PROT_FILTERS 5 1042 #endif 1043 1044 /* Maximum number of multicast filters supported. */ 1045 #ifndef BNEP_MAX_MULTI_FILTERS 1046 #define BNEP_MAX_MULTI_FILTERS 5 1047 #endif 1048 1049 /* Minimum MTU size. */ 1050 #ifndef BNEP_MIN_MTU_SIZE 1051 #define BNEP_MIN_MTU_SIZE L2CAP_MTU_SIZE 1052 #endif 1053 1054 /* Preferred MTU size. */ 1055 #ifndef BNEP_MTU_SIZE 1056 #define BNEP_MTU_SIZE BNEP_MIN_MTU_SIZE 1057 #endif 1058 1059 /* Maximum number of buffers allowed in transmit data queue. */ 1060 #ifndef BNEP_MAX_XMITQ_DEPTH 1061 #define BNEP_MAX_XMITQ_DEPTH 20 1062 #endif 1063 1064 /* Maximum number BNEP of connections supported. */ 1065 #ifndef BNEP_MAX_CONNECTIONS 1066 #define BNEP_MAX_CONNECTIONS 7 1067 #endif 1068 1069 /****************************************************************************** 1070 * 1071 * AVDTP 1072 * 1073 *****************************************************************************/ 1074 1075 #ifndef AVDT_INCLUDED 1076 #define AVDT_INCLUDED TRUE 1077 #endif 1078 1079 /* Include reporting capability in AVDTP */ 1080 #ifndef AVDT_REPORTING 1081 #define AVDT_REPORTING TRUE 1082 #endif 1083 1084 /* Number of simultaneous links to different peer devices. */ 1085 #ifndef AVDT_NUM_LINKS 1086 #define AVDT_NUM_LINKS 2 1087 #endif 1088 1089 /* Number of simultaneous stream endpoints. */ 1090 #ifndef AVDT_NUM_SEPS 1091 #define AVDT_NUM_SEPS 6 1092 #endif 1093 1094 /* Number of transport channels setup by AVDT for all media streams */ 1095 #ifndef AVDT_NUM_TC_TBL 1096 #define AVDT_NUM_TC_TBL 6 1097 #endif 1098 1099 /* Maximum size in bytes of the content protection information element. */ 1100 #ifndef AVDT_PROTECT_SIZE 1101 #define AVDT_PROTECT_SIZE 90 1102 #endif 1103 1104 /****************************************************************************** 1105 * 1106 * PAN 1107 * 1108 *****************************************************************************/ 1109 1110 #ifndef PAN_INCLUDED 1111 #define PAN_INCLUDED TRUE 1112 #endif 1113 1114 #ifndef PAN_NAP_DISABLED 1115 #define PAN_NAP_DISABLED FALSE 1116 #endif 1117 1118 #ifndef PANU_DISABLED 1119 #define PANU_DISABLED FALSE 1120 #endif 1121 1122 /* This will enable the PANU role */ 1123 #ifndef PAN_SUPPORTS_ROLE_PANU 1124 #define PAN_SUPPORTS_ROLE_PANU TRUE 1125 #endif 1126 1127 /* This will enable the GN role */ 1128 #ifndef PAN_SUPPORTS_ROLE_GN 1129 #define PAN_SUPPORTS_ROLE_GN TRUE 1130 #endif 1131 1132 /* This will enable the NAP role */ 1133 #ifndef PAN_SUPPORTS_ROLE_NAP 1134 #define PAN_SUPPORTS_ROLE_NAP TRUE 1135 #endif 1136 1137 /* This is just for debugging purposes */ 1138 #ifndef PAN_SUPPORTS_DEBUG_DUMP 1139 #define PAN_SUPPORTS_DEBUG_DUMP TRUE 1140 #endif 1141 1142 /* Maximum number of PAN connections allowed */ 1143 #ifndef MAX_PAN_CONNS 1144 #define MAX_PAN_CONNS 7 1145 #endif 1146 1147 /* Default service name for NAP role */ 1148 #ifndef PAN_NAP_DEFAULT_SERVICE_NAME 1149 #define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service" 1150 #endif 1151 1152 /* Default service name for GN role */ 1153 #ifndef PAN_GN_DEFAULT_SERVICE_NAME 1154 #define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service" 1155 #endif 1156 1157 /* Default service name for PANU role */ 1158 #ifndef PAN_PANU_DEFAULT_SERVICE_NAME 1159 #define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service" 1160 #endif 1161 1162 /* Default description for NAP role service */ 1163 #ifndef PAN_NAP_DEFAULT_DESCRIPTION 1164 #define PAN_NAP_DEFAULT_DESCRIPTION "NAP" 1165 #endif 1166 1167 /* Default description for GN role service */ 1168 #ifndef PAN_GN_DEFAULT_DESCRIPTION 1169 #define PAN_GN_DEFAULT_DESCRIPTION "GN" 1170 #endif 1171 1172 /* Default description for PANU role service */ 1173 #ifndef PAN_PANU_DEFAULT_DESCRIPTION 1174 #define PAN_PANU_DEFAULT_DESCRIPTION "PANU" 1175 #endif 1176 1177 /* Default Security level for PANU role. */ 1178 #ifndef PAN_PANU_SECURITY_LEVEL 1179 #define PAN_PANU_SECURITY_LEVEL 0 1180 #endif 1181 1182 /* Default Security level for GN role. */ 1183 #ifndef PAN_GN_SECURITY_LEVEL 1184 #define PAN_GN_SECURITY_LEVEL 0 1185 #endif 1186 1187 /* Default Security level for NAP role. */ 1188 #ifndef PAN_NAP_SECURITY_LEVEL 1189 #define PAN_NAP_SECURITY_LEVEL 0 1190 #endif 1191 1192 /****************************************************************************** 1193 * 1194 * GAP 1195 * 1196 *****************************************************************************/ 1197 1198 #ifndef GAP_INCLUDED 1199 #define GAP_INCLUDED TRUE 1200 #endif 1201 1202 /* The maximum number of simultaneous GAP L2CAP connections. */ 1203 #ifndef GAP_MAX_CONNECTIONS 1204 #define GAP_MAX_CONNECTIONS 30 1205 #endif 1206 1207 /* keep the raw data received from SDP server in database. */ 1208 #ifndef SDP_RAW_DATA_INCLUDED 1209 #define SDP_RAW_DATA_INCLUDED TRUE 1210 #endif 1211 1212 /* Inquiry duration in 1.28 second units. */ 1213 #ifndef SDP_DEBUG 1214 #define SDP_DEBUG TRUE 1215 #endif 1216 1217 /****************************************************************************** 1218 * 1219 * HID 1220 * 1221 *****************************************************************************/ 1222 1223 /* HID Device Role Included */ 1224 #ifndef HID_DEV_INCLUDED 1225 #define HID_DEV_INCLUDED TRUE 1226 #endif 1227 1228 #ifndef HID_DEV_SUBCLASS 1229 #define HID_DEV_SUBCLASS COD_MINOR_POINTING 1230 #endif 1231 1232 #ifndef HID_CONTROL_BUF_SIZE 1233 #define HID_CONTROL_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 1234 #endif 1235 1236 #ifndef HID_INTERRUPT_BUF_SIZE 1237 #define HID_INTERRUPT_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 1238 #endif 1239 1240 #ifndef HID_DEV_MTU_SIZE 1241 #define HID_DEV_MTU_SIZE 64 1242 #endif 1243 1244 #ifndef HID_DEV_FLUSH_TO 1245 #define HID_DEV_FLUSH_TO 0xffff 1246 #endif 1247 1248 /************************************************************************* 1249 * Definitions for Both HID-Host & Device 1250 */ 1251 #ifndef HID_MAX_SVC_NAME_LEN 1252 #define HID_MAX_SVC_NAME_LEN 32 1253 #endif 1254 1255 #ifndef HID_MAX_SVC_DESCR_LEN 1256 #define HID_MAX_SVC_DESCR_LEN 32 1257 #endif 1258 1259 #ifndef HID_MAX_PROV_NAME_LEN 1260 #define HID_MAX_PROV_NAME_LEN 32 1261 #endif 1262 1263 /************************************************************************* 1264 * Definitions for HID-Host 1265 */ 1266 #ifndef HID_HOST_INCLUDED 1267 #define HID_HOST_INCLUDED TRUE 1268 #endif 1269 1270 #ifndef HID_HOST_MAX_DEVICES 1271 #define HID_HOST_MAX_DEVICES 7 1272 #endif 1273 1274 #ifndef HID_HOST_MTU 1275 #define HID_HOST_MTU 640 1276 #endif 1277 1278 #ifndef HID_HOST_FLUSH_TO 1279 #define HID_HOST_FLUSH_TO 0xffff 1280 #endif 1281 1282 #ifndef HID_HOST_MAX_CONN_RETRY 1283 #define HID_HOST_MAX_CONN_RETRY (1) 1284 #endif 1285 1286 #ifndef HID_HOST_REPAGE_WIN 1287 #define HID_HOST_REPAGE_WIN (2) 1288 #endif 1289 1290 /************************************************************************* 1291 * A2DP Definitions 1292 */ 1293 #ifndef A2D_INCLUDED 1294 #define A2D_INCLUDED TRUE 1295 #endif 1296 1297 /****************************************************************************** 1298 * 1299 * AVCTP 1300 * 1301 *****************************************************************************/ 1302 1303 /* Number of simultaneous ACL links to different peer devices. */ 1304 #ifndef AVCT_NUM_LINKS 1305 #define AVCT_NUM_LINKS 2 1306 #endif 1307 1308 /* Number of simultaneous AVCTP connections. */ 1309 #ifndef AVCT_NUM_CONN 1310 #define AVCT_NUM_CONN 3 1311 #endif 1312 1313 /****************************************************************************** 1314 * 1315 * AVRCP 1316 * 1317 *****************************************************************************/ 1318 1319 #ifndef AVRC_METADATA_INCLUDED 1320 #define AVRC_METADATA_INCLUDED TRUE 1321 #endif 1322 1323 #ifndef AVRC_ADV_CTRL_INCLUDED 1324 #define AVRC_ADV_CTRL_INCLUDED TRUE 1325 #endif 1326 1327 #ifndef DUMP_PCM_DATA 1328 #define DUMP_PCM_DATA FALSE 1329 #endif 1330 1331 /****************************************************************************** 1332 * 1333 * MCAP 1334 * 1335 *****************************************************************************/ 1336 #ifndef MCA_INCLUDED 1337 #define MCA_INCLUDED FALSE 1338 #endif 1339 1340 /* The MTU size for the L2CAP configuration on control channel. 48 is the 1341 * minimal */ 1342 #ifndef MCA_CTRL_MTU 1343 #define MCA_CTRL_MTU 60 1344 #endif 1345 1346 /* The maximum number of registered MCAP instances. */ 1347 #ifndef MCA_NUM_REGS 1348 #define MCA_NUM_REGS 12 1349 #endif 1350 1351 /* The maximum number of control channels (to difference devices) per registered 1352 * MCAP instances. */ 1353 #ifndef MCA_NUM_LINKS 1354 #define MCA_NUM_LINKS 3 1355 #endif 1356 1357 /* The maximum number of MDEP (including HDP echo) per registered MCAP 1358 * instances. */ 1359 #ifndef MCA_NUM_DEPS 1360 #define MCA_NUM_DEPS 13 1361 #endif 1362 1363 /* The maximum number of MDL link per control channel. */ 1364 #ifndef MCA_NUM_MDLS 1365 #define MCA_NUM_MDLS 4 1366 #endif 1367 1368 /* Buffer size to reassemble the SDU. */ 1369 #ifndef MCA_USER_RX_BUF_SIZE 1370 #define MCA_USER_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 1371 #endif 1372 1373 /* Buffer size to hold the SDU. */ 1374 #ifndef MCA_USER_TX_BUF_SIZE 1375 #define MCA_USER_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 1376 #endif 1377 1378 /* 1379 * Buffer size used to hold MPS segments during SDU reassembly 1380 */ 1381 #ifndef MCA_FCR_RX_BUF_SIZE 1382 #define MCA_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 1383 #endif 1384 1385 /* 1386 * Default buffer size used to hold MPS segments used in (re)transmissions. 1387 * The size of each buffer must be able to hold the maximum MPS segment size 1388 * passed in tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) + 1389 * L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec). 1390 */ 1391 #ifndef MCA_FCR_TX_BUF_SIZE 1392 #define MCA_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE 1393 #endif 1394 1395 /* MCAP control channel FCR Option: 1396 Size of the transmission window when using enhanced retransmission mode. 1397 1 is defined by HDP specification for control channel. 1398 */ 1399 #ifndef MCA_FCR_OPT_TX_WINDOW_SIZE 1400 #define MCA_FCR_OPT_TX_WINDOW_SIZE 1 1401 #endif 1402 1403 /* MCAP control channel FCR Option: 1404 Number of transmission attempts for a single I-Frame before taking 1405 Down the connection. Used In ERTM mode only. Value is Ignored in basic and 1406 Streaming modes. 1407 Range: 0, 1-0xFF 1408 0 - infinite retransmissions 1409 1 - single transmission 1410 */ 1411 #ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT 1412 #define MCA_FCR_OPT_MAX_TX_B4_DISCNT 20 1413 #endif 1414 1415 /* MCAP control channel FCR Option: Retransmission Timeout 1416 The AVRCP specification set a value in the range of 300 - 2000 ms 1417 Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission 1418 mode. 1419 Range: Minimum 2000 (2 secs) when supporting PBF. 1420 */ 1421 #ifndef MCA_FCR_OPT_RETX_TOUT 1422 #define MCA_FCR_OPT_RETX_TOUT 2000 1423 #endif 1424 1425 /* MCAP control channel FCR Option: Monitor Timeout 1426 The AVRCP specification set a value in the range of 300 - 2000 ms 1427 Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission 1428 mode. 1429 Range: Minimum 12000 (12 secs) when supporting PBF. 1430 */ 1431 #ifndef MCA_FCR_OPT_MONITOR_TOUT 1432 #define MCA_FCR_OPT_MONITOR_TOUT 12000 1433 #endif 1434 1435 /* MCAP control channel FCR Option: Maximum PDU payload size. 1436 The maximum number of payload octets that the local device can receive in a 1437 single PDU. 1438 */ 1439 #ifndef MCA_FCR_OPT_MPS_SIZE 1440 #define MCA_FCR_OPT_MPS_SIZE 1000 1441 #endif 1442 1443 /****************************************************************************** 1444 * 1445 * BTA 1446 * 1447 *****************************************************************************/ 1448 /* BTA EIR canned UUID list (default is dynamic) */ 1449 #ifndef BTA_EIR_CANNED_UUID_LIST 1450 #define BTA_EIR_CANNED_UUID_LIST FALSE 1451 #endif 1452 1453 /* Number of supported customer UUID in EIR */ 1454 #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID 1455 #define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8 1456 #endif 1457 1458 /* CHLD override */ 1459 #ifndef BTA_AG_CHLD_VAL_ECC 1460 #define BTA_AG_CHLD_VAL_ECC "(0,1,1x,2,2x,3)" 1461 #endif 1462 1463 #ifndef BTA_AG_CHLD_VAL 1464 #define BTA_AG_CHLD_VAL "(0,1,2,3)" 1465 #endif 1466 1467 /* Set the CIND to match HFP 1.5 */ 1468 #ifndef BTA_AG_CIND_INFO 1469 #define BTA_AG_CIND_INFO \ 1470 "(\"call\",(0,1)),(\"callsetup\",(0-3)),(\"service\",(0-1)),(\"signal\",(0-" \ 1471 "5)),(\"roam\",(0,1)),(\"battchg\",(0-5)),(\"callheld\",(0-2))" 1472 #endif 1473 1474 #ifndef BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY 1475 #define BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY TRUE 1476 #endif 1477 1478 /****************************************************************************** 1479 * 1480 * Tracing: Include trace header file here. 1481 * 1482 *****************************************************************************/ 1483 1484 /* Enable/disable BTSnoop memory logging */ 1485 #ifndef BTSNOOP_MEM 1486 #define BTSNOOP_MEM TRUE 1487 #endif 1488 1489 #include "bt_trace.h" 1490 1491 #endif /* BT_TARGET_H */ 1492