bt_target.h 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275
  1. /******************************************************************************
  2. *
  3. * Copyright (c) 2014 The Android Open Source Project
  4. * Copyright 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. #ifndef BT_TARGET_H
  20. #define BT_TARGET_H
  21. #ifndef BUILDCFG
  22. #define BUILDCFG
  23. #endif
  24. #if !defined(HAS_BDROID_BUILDCFG) && !defined(HAS_NO_BDROID_BUILDCFG)
  25. #error \
  26. "An Android.mk file did not include bdroid_CFLAGS and possibly not bdroid_C_INCLUDES"
  27. #endif
  28. #ifdef HAS_BDROID_BUILDCFG
  29. #include "bdroid_buildcfg.h"
  30. #endif
  31. #include "bt_types.h" /* This must be defined AFTER buildcfg.h */
  32. //------------------Added from bdroid_buildcfg.h---------------------
  33. #ifndef L2CAP_EXTFEA_SUPPORTED_MASK
  34. #define L2CAP_EXTFEA_SUPPORTED_MASK \
  35. (L2CAP_EXTFEA_ENH_RETRANS | L2CAP_EXTFEA_STREAM_MODE | L2CAP_EXTFEA_NO_CRC | \
  36. L2CAP_EXTFEA_FIXED_CHNLS)
  37. #endif
  38. #ifndef BTUI_OPS_FORMATS
  39. #define BTUI_OPS_FORMATS (BTA_OP_VCARD21_MASK | BTA_OP_ANY_MASK)
  40. #endif
  41. #ifndef BTA_RFC_MTU_SIZE
  42. #define BTA_RFC_MTU_SIZE \
  43. (L2CAP_MTU_SIZE - L2CAP_MIN_OFFSET - RFCOMM_DATA_OVERHEAD)
  44. #endif
  45. #ifndef BTA_PAN_INCLUDED
  46. #define BTA_PAN_INCLUDED TRUE
  47. #endif
  48. #ifndef BTA_HD_INCLUDED
  49. #define BTA_HD_INCLUDED TRUE
  50. #endif
  51. #ifndef BTA_HH_INCLUDED
  52. #define BTA_HH_INCLUDED TRUE
  53. #endif
  54. #ifndef BTA_HH_ROLE
  55. #define BTA_HH_ROLE BTA_MASTER_ROLE_PREF
  56. #endif
  57. #ifndef BTA_HH_LE_INCLUDED
  58. #define BTA_HH_LE_INCLUDED TRUE
  59. #endif
  60. #ifndef BTA_AR_INCLUDED
  61. #define BTA_AR_INCLUDED TRUE
  62. #endif
  63. #ifndef BTA_AV_SINK_INCLUDED
  64. #define BTA_AV_SINK_INCLUDED FALSE
  65. #endif
  66. #ifndef BTA_DISABLE_DELAY
  67. #define BTA_DISABLE_DELAY 200 /* in milliseconds */
  68. #endif
  69. #ifndef AVDT_VERSION
  70. #define AVDT_VERSION 0x0103
  71. #endif
  72. #ifndef BTA_AG_AT_MAX_LEN
  73. #define BTA_AG_AT_MAX_LEN 512
  74. #endif
  75. #ifndef BTA_AG_SCO_PKT_TYPES
  76. #define BTA_AG_SCO_PKT_TYPES \
  77. (BTM_SCO_LINK_ONLY_MASK | ESCO_PKT_TYPES_MASK_EV3 | \
  78. ESCO_PKT_TYPES_MASK_NO_3_EV3 | ESCO_PKT_TYPES_MASK_NO_2_EV5 | \
  79. ESCO_PKT_TYPES_MASK_NO_3_EV5)
  80. #endif
  81. #ifndef BTA_AV_RET_TOUT
  82. #define BTA_AV_RET_TOUT 15
  83. #endif
  84. /* TRUE to use SCMS-T content protection */
  85. #ifndef BTA_AV_CO_CP_SCMS_T
  86. #define BTA_AV_CO_CP_SCMS_T FALSE
  87. #endif
  88. #ifndef BTA_DM_SDP_DB_SIZE
  89. #define BTA_DM_SDP_DB_SIZE 8000
  90. #endif
  91. #ifndef HL_INCLUDED
  92. #define HL_INCLUDED TRUE
  93. #endif
  94. #ifndef AG_VOICE_SETTINGS
  95. #define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS
  96. #endif
  97. #ifndef BTIF_DM_OOB_TEST
  98. #define BTIF_DM_OOB_TEST TRUE
  99. #endif
  100. // How long to wait before activating sniff mode after entering the
  101. // idle state for server FT/RFCOMM, OPS connections
  102. #ifndef BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS
  103. #define BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 7000
  104. #endif
  105. // How long to wait before activating sniff mode after entering the
  106. // idle state for client FT/RFCOMM connections
  107. #ifndef BTA_FTC_IDLE_TO_SNIFF_DELAY_MS
  108. #define BTA_FTC_IDLE_TO_SNIFF_DELAY_MS 5000
  109. #endif
  110. //------------------End added from bdroid_buildcfg.h---------------------
  111. /******************************************************************************
  112. *
  113. * Buffer sizes
  114. *
  115. *****************************************************************************/
  116. #ifndef BT_DEFAULT_BUFFER_SIZE
  117. #define BT_DEFAULT_BUFFER_SIZE (4096 + 16)
  118. #endif
  119. #ifndef BT_SMALL_BUFFER_SIZE
  120. #define BT_SMALL_BUFFER_SIZE 660
  121. #endif
  122. /* Receives HCI events from the lower-layer. */
  123. #ifndef HCI_CMD_BUF_SIZE
  124. #define HCI_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
  125. #endif
  126. /* Sends SDP data packets. */
  127. #ifndef SDP_DATA_BUF_SIZE
  128. #define SDP_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
  129. #endif
  130. /* Sends RFCOMM command packets. */
  131. #ifndef RFCOMM_CMD_BUF_SIZE
  132. #define RFCOMM_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
  133. #endif
  134. /* Sends RFCOMM data packets. */
  135. #ifndef RFCOMM_DATA_BUF_SIZE
  136. #define RFCOMM_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
  137. #endif
  138. /* Sends L2CAP packets to the peer and HCI messages to the controller. */
  139. #ifndef L2CAP_CMD_BUF_SIZE
  140. #define L2CAP_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
  141. #endif
  142. #ifndef L2CAP_USER_TX_BUF_SIZE
  143. #define L2CAP_USER_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
  144. #endif
  145. #ifndef L2CAP_USER_RX_BUF_SIZE
  146. #define L2CAP_USER_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
  147. #endif
  148. /* Sends L2CAP segmented packets in ERTM mode */
  149. #ifndef L2CAP_FCR_TX_BUF_SIZE
  150. #define L2CAP_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
  151. #endif
  152. /* Receives L2CAP segmented packets in ERTM mode */
  153. #ifndef L2CAP_FCR_RX_BUF_SIZE
  154. #define L2CAP_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
  155. #endif
  156. #ifndef L2CAP_FCR_ERTM_BUF_SIZE
  157. #define L2CAP_FCR_ERTM_BUF_SIZE (10240 + 24)
  158. #endif
  159. /* Number of ACL buffers to assign to LE */
  160. /*
  161. * TODO: Do we need this?
  162. * It was used when the HCI buffers were shared with BR/EDR.
  163. */
  164. #ifndef L2C_DEF_NUM_BLE_BUF_SHARED
  165. #define L2C_DEF_NUM_BLE_BUF_SHARED 1
  166. #endif
  167. /* Used by BTM when it sends HCI commands to the controller. */
  168. #ifndef BTM_CMD_BUF_SIZE
  169. #define BTM_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
  170. #endif
  171. #ifndef OBX_LRG_DATA_BUF_SIZE
  172. #define OBX_LRG_DATA_BUF_SIZE (8080 + 26)
  173. #endif
  174. /* Used to send data to L2CAP. */
  175. #ifndef GAP_DATA_BUF_SIZE
  176. #define GAP_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
  177. #endif
  178. /* BNEP data and protocol messages. */
  179. #ifndef BNEP_BUF_SIZE
  180. #define BNEP_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
  181. #endif
  182. /* AVDTP buffer size for protocol messages */
  183. #ifndef AVDT_CMD_BUF_SIZE
  184. #define AVDT_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
  185. #endif
  186. #ifndef PAN_BUF_SIZE
  187. #define PAN_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
  188. #endif
  189. /* Maximum number of buffers to allocate for PAN */
  190. #ifndef PAN_BUF_MAX
  191. #define PAN_BUF_MAX 100
  192. #endif
  193. /* AVCTP buffer size for protocol messages */
  194. #ifndef AVCT_CMD_BUF_SIZE
  195. #define AVCT_CMD_BUF_SIZE 288
  196. #endif
  197. /* AVRCP buffer size for protocol messages */
  198. #ifndef AVRC_CMD_BUF_SIZE
  199. #define AVRC_CMD_BUF_SIZE 288
  200. #endif
  201. /* AVRCP Metadata buffer size for protocol messages */
  202. #ifndef AVRC_META_CMD_BUF_SIZE
  203. #define AVRC_META_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
  204. #endif
  205. #ifndef BTA_HL_LRG_DATA_BUF_SIZE
  206. #define BTA_HL_LRG_DATA_BUF_SIZE (10240 + 24)
  207. #endif
  208. /* GATT Data sending buffer size */
  209. #ifndef GATT_DATA_BUF_SIZE
  210. #define GATT_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
  211. #endif
  212. /******************************************************************************
  213. *
  214. * BTM
  215. *
  216. *****************************************************************************/
  217. /* Cancel Inquiry on incoming SSP */
  218. #ifndef BTM_NO_SSP_ON_INQUIRY
  219. #define BTM_NO_SSP_ON_INQUIRY FALSE
  220. #endif
  221. #ifndef DISABLE_WBS
  222. #define DISABLE_WBS FALSE
  223. #endif
  224. /* This is used to work around a controller bug that doesn't like Disconnect
  225. * issued while there is a role switch in progress
  226. */
  227. #ifndef BTM_DISC_DURING_RS
  228. #define BTM_DISC_DURING_RS TRUE
  229. #endif
  230. /**************************
  231. * Initial SCO TX credit
  232. ************************/
  233. /* max TX SCO data packet size */
  234. #ifndef BTM_SCO_DATA_SIZE_MAX
  235. #define BTM_SCO_DATA_SIZE_MAX 240
  236. #endif
  237. /* The size in bytes of the BTM inquiry database. */
  238. #ifndef BTM_INQ_DB_SIZE
  239. #define BTM_INQ_DB_SIZE 40
  240. #endif
  241. /* The default scan mode */
  242. #ifndef BTM_DEFAULT_SCAN_TYPE
  243. #define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED
  244. #endif
  245. /* Should connections to unknown devices be allowed when not discoverable? */
  246. #ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
  247. #define BTM_ALLOW_CONN_IF_NONDISCOVER TRUE
  248. #endif
  249. /* Sets the Page_Scan_Window: the length of time that the device is performing
  250. * a page scan. */
  251. #ifndef BTM_DEFAULT_CONN_WINDOW
  252. #define BTM_DEFAULT_CONN_WINDOW 0x0012
  253. #endif
  254. /* Sets the Page_Scan_Activity: the interval between the start of two
  255. * consecutive page scans. */
  256. #ifndef BTM_DEFAULT_CONN_INTERVAL
  257. #define BTM_DEFAULT_CONN_INTERVAL 0x0800
  258. #endif
  259. /* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
  260. #ifndef BTM_DEFAULT_DISC_WINDOW
  261. #define BTM_DEFAULT_DISC_WINDOW 0x0012
  262. #endif
  263. /* When automatic inquiry scan is enabled, this sets the inquiry scan interval.
  264. */
  265. #ifndef BTM_DEFAULT_DISC_INTERVAL
  266. #define BTM_DEFAULT_DISC_INTERVAL 0x0800
  267. #endif
  268. /* Default class of device
  269. * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
  270. *
  271. * SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object
  272. * Transfer,Bit22 -Telephony)
  273. * MAJOR_CLASS:0x02 - PHONE
  274. * MINOR_CLASS:0x0C - SMART_PHONE
  275. *
  276. */
  277. #ifndef BTA_DM_COD
  278. #define BTA_DM_COD \
  279. { 0x5A, 0x02, 0x0C }
  280. #endif
  281. /* The number of SCO links. */
  282. #ifndef BTM_MAX_SCO_LINKS
  283. #define BTM_MAX_SCO_LINKS 6
  284. #endif
  285. /* The number of security records for peer devices. */
  286. #ifndef BTM_SEC_MAX_DEVICE_RECORDS
  287. #define BTM_SEC_MAX_DEVICE_RECORDS 100
  288. #endif
  289. /* The number of security records for services. */
  290. #ifndef BTM_SEC_MAX_SERVICE_RECORDS
  291. #define BTM_SEC_MAX_SERVICE_RECORDS 32
  292. #endif
  293. /* If True, force a retrieval of remote device name for each bond in case it's
  294. * changed */
  295. #ifndef BTM_SEC_FORCE_RNR_FOR_DBOND
  296. #define BTM_SEC_FORCE_RNR_FOR_DBOND FALSE
  297. #endif
  298. /* Maximum device name length used in btm database. */
  299. #ifndef BTM_MAX_REM_BD_NAME_LEN
  300. #define BTM_MAX_REM_BD_NAME_LEN 248
  301. #endif
  302. /* Maximum local device name length stored btm database */
  303. #ifndef BTM_MAX_LOC_BD_NAME_LEN
  304. #define BTM_MAX_LOC_BD_NAME_LEN 248
  305. #endif
  306. /* Fixed Default String. When this is defined as null string, the device's
  307. * product model name is used as the default local name.
  308. */
  309. #ifndef BTM_DEF_LOCAL_NAME
  310. #define BTM_DEF_LOCAL_NAME ""
  311. #endif
  312. /* Maximum service name stored with security authorization (0 if not needed) */
  313. #ifndef BTM_SEC_SERVICE_NAME_LEN
  314. #define BTM_SEC_SERVICE_NAME_LEN BT_MAX_SERVICE_NAME_LEN
  315. #endif
  316. /* Maximum length of the service name. */
  317. #ifndef BT_MAX_SERVICE_NAME_LEN
  318. #define BT_MAX_SERVICE_NAME_LEN 21
  319. #endif
  320. /* The maximum number of clients that can register with the power manager. */
  321. #ifndef BTM_MAX_PM_RECORDS
  322. #define BTM_MAX_PM_RECORDS 2
  323. #endif
  324. /* This is set to show debug trace messages for the power manager. */
  325. #ifndef BTM_PM_DEBUG
  326. #define BTM_PM_DEBUG FALSE
  327. #endif
  328. /* If the user does not respond to security process requests within this many
  329. * seconds, a negative response would be sent automatically.
  330. * 30 is LMP response timeout value */
  331. #ifndef BTM_SEC_TIMEOUT_VALUE
  332. #define BTM_SEC_TIMEOUT_VALUE 35
  333. #endif
  334. /* Maximum number of callbacks that can be registered using
  335. * BTM_RegisterForVSEvents */
  336. #ifndef BTM_MAX_VSE_CALLBACKS
  337. #define BTM_MAX_VSE_CALLBACKS 3
  338. #endif
  339. /******************************************
  340. * Lisbon Features
  341. ******************************************/
  342. /* This is set to TRUE if the FEC is required for EIR packet. */
  343. #ifndef BTM_EIR_DEFAULT_FEC_REQUIRED
  344. #define BTM_EIR_DEFAULT_FEC_REQUIRED TRUE
  345. #endif
  346. /* The IO capability of the local device (for Simple Pairing) */
  347. #ifndef BTM_LOCAL_IO_CAPS
  348. #define BTM_LOCAL_IO_CAPS BTM_IO_CAP_IO
  349. #endif
  350. #ifndef BTM_LOCAL_IO_CAPS_BLE
  351. #define BTM_LOCAL_IO_CAPS_BLE BTM_IO_CAP_KBDISP
  352. #endif
  353. /* The default MITM Protection Requirement (for Simple Pairing)
  354. * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
  355. #ifndef BTM_DEFAULT_AUTH_REQ
  356. #define BTM_DEFAULT_AUTH_REQ BTM_AUTH_SP_NO
  357. #endif
  358. /* The default MITM Protection Requirement for dedicated bonding using Simple
  359. * Pairing
  360. * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
  361. #ifndef BTM_DEFAULT_DD_AUTH_REQ
  362. #define BTM_DEFAULT_DD_AUTH_REQ BTM_AUTH_AP_YES
  363. #endif
  364. /* TRUE to include Sniff Subrating */
  365. #ifndef BTM_SSR_INCLUDED
  366. #define BTM_SSR_INCLUDED TRUE
  367. #endif
  368. /*************************
  369. * End of Lisbon Features
  370. *************************/
  371. /* 4.1/4.2 secure connections feature */
  372. #ifndef SC_MODE_INCLUDED
  373. #define SC_MODE_INCLUDED TRUE
  374. #endif
  375. /* Used for conformance testing ONLY */
  376. #ifndef BTM_BLE_CONFORMANCE_TESTING
  377. #define BTM_BLE_CONFORMANCE_TESTING FALSE
  378. #endif
  379. /******************************************************************************
  380. *
  381. * L2CAP
  382. *
  383. *****************************************************************************/
  384. /* The maximum number of simultaneous links that L2CAP can support. */
  385. #ifndef MAX_ACL_CONNECTIONS
  386. #define MAX_L2CAP_LINKS 13
  387. #else
  388. #define MAX_L2CAP_LINKS MAX_ACL_CONNECTIONS
  389. #endif
  390. /* The maximum number of simultaneous channels that L2CAP can support. */
  391. #ifndef MAX_L2CAP_CHANNELS
  392. #define MAX_L2CAP_CHANNELS 32
  393. #endif
  394. /* The maximum number of simultaneous applications that can register with L2CAP.
  395. */
  396. #ifndef MAX_L2CAP_CLIENTS
  397. #define MAX_L2CAP_CLIENTS 15
  398. #endif
  399. /* The number of seconds of link inactivity before a link is disconnected. */
  400. #ifndef L2CAP_LINK_INACTIVITY_TOUT
  401. #define L2CAP_LINK_INACTIVITY_TOUT 4
  402. #endif
  403. /* The number of seconds of link inactivity after bonding before a link is
  404. * disconnected. */
  405. #ifndef L2CAP_BONDING_TIMEOUT
  406. #define L2CAP_BONDING_TIMEOUT 3
  407. #endif
  408. /* The time from the HCI connection complete to disconnect if no channel is
  409. * established. */
  410. #ifndef L2CAP_LINK_STARTUP_TOUT
  411. #define L2CAP_LINK_STARTUP_TOUT 60
  412. #endif
  413. /* The L2CAP MTU; must be in accord with the HCI ACL buffer size. */
  414. #ifndef L2CAP_MTU_SIZE
  415. #define L2CAP_MTU_SIZE 1691
  416. #endif
  417. /*
  418. * The L2CAP MPS over Bluetooth; must be in accord with the FCR tx buffer size
  419. * and ACL down buffer size.
  420. */
  421. #ifndef L2CAP_MPS_OVER_BR_EDR
  422. #define L2CAP_MPS_OVER_BR_EDR 1010
  423. #endif
  424. /* If host flow control enabled, this is the number of buffers the controller
  425. * can have unacknowledged. */
  426. #ifndef L2CAP_HOST_FC_ACL_BUFS
  427. #define L2CAP_HOST_FC_ACL_BUFS 20
  428. #endif
  429. /* This is set to enable L2CAP to take the ACL link out of park mode when ACL
  430. * data is to be sent. */
  431. #ifndef L2CAP_WAKE_PARKED_LINK
  432. #define L2CAP_WAKE_PARKED_LINK TRUE
  433. #endif
  434. /* Whether link wants to be the master or the slave. */
  435. #ifndef L2CAP_DESIRED_LINK_ROLE
  436. #define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_SLAVE
  437. #endif
  438. /* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
  439. #ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
  440. #define L2CAP_NON_FLUSHABLE_PB_INCLUDED TRUE
  441. #endif
  442. /* Minimum number of ACL credit for high priority link */
  443. #ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
  444. #define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5
  445. #endif
  446. /* used for monitoring HCI ACL credit management */
  447. #ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
  448. #define L2CAP_HCI_FLOW_CONTROL_DEBUG TRUE
  449. #endif
  450. /* Used for features using fixed channels; set to zero if no fixed channels
  451. * supported (BLE, etc.) */
  452. /* Excluding L2CAP signaling channel and UCD */
  453. #ifndef L2CAP_NUM_FIXED_CHNLS
  454. #define L2CAP_NUM_FIXED_CHNLS 32
  455. #endif
  456. /* First fixed channel supported */
  457. #ifndef L2CAP_FIRST_FIXED_CHNL
  458. #define L2CAP_FIRST_FIXED_CHNL 4
  459. #endif
  460. #ifndef L2CAP_LAST_FIXED_CHNL
  461. #define L2CAP_LAST_FIXED_CHNL \
  462. (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
  463. #endif
  464. /* Round Robin service channels in link */
  465. #ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
  466. #define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE TRUE
  467. #endif
  468. /* used for monitoring eL2CAP data flow */
  469. #ifndef L2CAP_ERTM_STATS
  470. #define L2CAP_ERTM_STATS FALSE
  471. #endif
  472. /* Used for conformance testing ONLY: When TRUE lets scriptwrapper overwrite
  473. * info response */
  474. #ifndef L2CAP_CONFORMANCE_TESTING
  475. #define L2CAP_CONFORMANCE_TESTING FALSE
  476. #endif
  477. /*
  478. * Max bytes per connection to buffer locally before dropping the
  479. * connection if local client does not receive it - default is 1MB
  480. */
  481. #ifndef L2CAP_MAX_RX_BUFFER
  482. #define L2CAP_MAX_RX_BUFFER 0x100000
  483. #endif
  484. /******************************************************************************
  485. *
  486. * BLE
  487. *
  488. *****************************************************************************/
  489. #ifndef LOCAL_BLE_CONTROLLER_ID
  490. #define LOCAL_BLE_CONTROLLER_ID 1
  491. #endif
  492. /*
  493. * Toggles support for general LE privacy features such as remote address
  494. * resolution, local address rotation etc.
  495. */
  496. #ifndef BLE_PRIVACY_SPT
  497. #define BLE_PRIVACY_SPT TRUE
  498. #endif
  499. /*
  500. * Enables or disables support for local privacy (ex. address rotation)
  501. */
  502. #ifndef BLE_LOCAL_PRIVACY_ENABLED
  503. #define BLE_LOCAL_PRIVACY_ENABLED TRUE
  504. #endif
  505. /*
  506. * Toggles support for vendor specific extensions such as RPA offloading,
  507. * feature discovery, multi-adv etc.
  508. */
  509. #ifndef BLE_VND_INCLUDED
  510. #define BLE_VND_INCLUDED FALSE
  511. #endif
  512. /* The maximum number of simultaneous applications that can register with LE
  513. * L2CAP. */
  514. #ifndef BLE_MAX_L2CAP_CLIENTS
  515. #define BLE_MAX_L2CAP_CLIENTS 15
  516. #endif
  517. /******************************************************************************
  518. *
  519. * ATT/GATT Protocol/Profile Settings
  520. *
  521. *****************************************************************************/
  522. #ifndef BLE_LLT_INCLUDED
  523. #define BLE_LLT_INCLUDED TRUE
  524. #endif
  525. #ifndef BLE_DELAY_REQUEST_ENC
  526. /* This flag is to work around IPHONE problem, We need to wait for iPhone ready
  527. before send encryption request to iPhone */
  528. #define BLE_DELAY_REQUEST_ENC FALSE
  529. #endif
  530. #ifndef GATT_MAX_SR_PROFILES
  531. #define GATT_MAX_SR_PROFILES 32 /* max is 32 */
  532. #endif
  533. #ifndef GATT_MAX_APPS
  534. #define GATT_MAX_APPS 32 /* note: 2 apps used internally GATT and GAP */
  535. #endif
  536. /* connection manager doesn't generate it's own IDs. Instead, all GATT clients
  537. * use their gatt_if to identify against conection manager. When stack tries to
  538. * create l2cap connection, it will use this fixed ID. */
  539. #define CONN_MGR_ID_L2CAP (GATT_MAX_APPS + 10)
  540. #ifndef GATT_MAX_PHY_CHANNEL
  541. #define GATT_MAX_PHY_CHANNEL 7
  542. #endif
  543. /* Used for conformance testing ONLY */
  544. #ifndef GATT_CONFORMANCE_TESTING
  545. #define GATT_CONFORMANCE_TESTING FALSE
  546. #endif
  547. /******************************************************************************
  548. *
  549. * SMP
  550. *
  551. *****************************************************************************/
  552. #ifndef SMP_DEBUG
  553. #define SMP_DEBUG FALSE
  554. #endif
  555. #ifndef SMP_DEFAULT_AUTH_REQ
  556. #define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY
  557. #endif
  558. #ifndef SMP_MAX_ENC_KEY_SIZE
  559. #define SMP_MAX_ENC_KEY_SIZE 16
  560. #endif
  561. /* minimum link timeout after SMP pairing is done, leave room for key exchange
  562. and racing condition for the following service connection.
  563. Prefer greater than 0 second, and no less than default inactivity link idle
  564. timer(L2CAP_LINK_INACTIVITY_TOUT) in l2cap) */
  565. #ifndef SMP_LINK_TOUT_MIN
  566. #if (L2CAP_LINK_INACTIVITY_TOUT > 0)
  567. #define SMP_LINK_TOUT_MIN L2CAP_LINK_INACTIVITY_TOUT
  568. #else
  569. #define SMP_LINK_TOUT_MIN 2
  570. #endif
  571. #endif
  572. /******************************************************************************
  573. *
  574. * SDP
  575. *
  576. *****************************************************************************/
  577. /* This is set to enable SDP server functionality. */
  578. #ifndef SDP_SERVER_ENABLED
  579. #define SDP_SERVER_ENABLED TRUE
  580. #endif
  581. /* The maximum number of SDP records the server can support. */
  582. #ifndef SDP_MAX_RECORDS
  583. #define SDP_MAX_RECORDS 30
  584. #endif
  585. /* The maximum number of attributes in each record. */
  586. #ifndef SDP_MAX_REC_ATTR
  587. #define SDP_MAX_REC_ATTR 25
  588. #endif
  589. #ifndef SDP_MAX_PAD_LEN
  590. #define SDP_MAX_PAD_LEN 600
  591. #endif
  592. /* The maximum length, in bytes, of an attribute. */
  593. #ifndef SDP_MAX_ATTR_LEN
  594. #define SDP_MAX_ATTR_LEN 400
  595. #endif
  596. /* The maximum number of attribute filters supported by SDP databases. */
  597. #ifndef SDP_MAX_ATTR_FILTERS
  598. #define SDP_MAX_ATTR_FILTERS 15
  599. #endif
  600. /* The maximum number of UUID filters supported by SDP databases. */
  601. #ifndef SDP_MAX_UUID_FILTERS
  602. #define SDP_MAX_UUID_FILTERS 3
  603. #endif
  604. /* The maximum number of record handles retrieved in a search. */
  605. #ifndef SDP_MAX_DISC_SERVER_RECS
  606. #define SDP_MAX_DISC_SERVER_RECS 21
  607. #endif
  608. /* The size of a scratchpad buffer, in bytes, for storing the response to an
  609. * attribute request. */
  610. #ifndef SDP_MAX_LIST_BYTE_COUNT
  611. #define SDP_MAX_LIST_BYTE_COUNT 4096
  612. #endif
  613. /* The maximum number of parameters in an SDP protocol element. */
  614. #ifndef SDP_MAX_PROTOCOL_PARAMS
  615. #define SDP_MAX_PROTOCOL_PARAMS 2
  616. #endif
  617. /* The maximum number of simultaneous client and server connections. */
  618. #ifndef SDP_MAX_CONNECTIONS
  619. #define SDP_MAX_CONNECTIONS 4
  620. #endif
  621. /* The MTU size for the L2CAP configuration. */
  622. #ifndef SDP_MTU_SIZE
  623. #define SDP_MTU_SIZE 1024
  624. #endif
  625. /* The flush timeout for the L2CAP configuration. */
  626. #ifndef SDP_FLUSH_TO
  627. #define SDP_FLUSH_TO 0xFFFF
  628. #endif
  629. /* The name for security authorization. */
  630. #ifndef SDP_SERVICE_NAME
  631. #define SDP_SERVICE_NAME "Service Discovery"
  632. #endif
  633. /* The security level for BTM. */
  634. #ifndef SDP_SECURITY_LEVEL
  635. #define SDP_SECURITY_LEVEL BTM_SEC_NONE
  636. #endif
  637. /******************************************************************************
  638. *
  639. * RFCOMM
  640. *
  641. *****************************************************************************/
  642. /* The maximum number of ports supported. */
  643. #ifndef MAX_RFC_PORTS
  644. #define MAX_RFC_PORTS 30
  645. #endif
  646. /* The maximum simultaneous links to different devices. */
  647. #ifndef MAX_ACL_CONNECTIONS
  648. #define MAX_BD_CONNECTIONS 7
  649. #else
  650. #define MAX_BD_CONNECTIONS MAX_ACL_CONNECTIONS
  651. #endif
  652. /* The port receive queue low watermark level, in bytes. */
  653. #ifndef PORT_RX_LOW_WM
  654. #define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
  655. #endif
  656. /* The port receive queue high watermark level, in bytes. */
  657. #ifndef PORT_RX_HIGH_WM
  658. #define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
  659. #endif
  660. /* The port receive queue critical watermark level, in bytes. */
  661. #ifndef PORT_RX_CRITICAL_WM
  662. #define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
  663. #endif
  664. /* The port receive queue low watermark level, in number of buffers. */
  665. #ifndef PORT_RX_BUF_LOW_WM
  666. #define PORT_RX_BUF_LOW_WM 4
  667. #endif
  668. /* The port receive queue high watermark level, in number of buffers. */
  669. #ifndef PORT_RX_BUF_HIGH_WM
  670. #define PORT_RX_BUF_HIGH_WM 10
  671. #endif
  672. /* The port receive queue critical watermark level, in number of buffers. */
  673. #ifndef PORT_RX_BUF_CRITICAL_WM
  674. #define PORT_RX_BUF_CRITICAL_WM 15
  675. #endif
  676. /* The port transmit queue high watermark level, in bytes. */
  677. #ifndef PORT_TX_HIGH_WM
  678. #define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
  679. #endif
  680. /* The port transmit queue critical watermark level, in bytes. */
  681. #ifndef PORT_TX_CRITICAL_WM
  682. #define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
  683. #endif
  684. /* The port transmit queue high watermark level, in number of buffers. */
  685. #ifndef PORT_TX_BUF_HIGH_WM
  686. #define PORT_TX_BUF_HIGH_WM 10
  687. #endif
  688. /* The port transmit queue high watermark level, in number of buffers. */
  689. #ifndef PORT_TX_BUF_CRITICAL_WM
  690. #define PORT_TX_BUF_CRITICAL_WM 15
  691. #endif
  692. /* The RFCOMM multiplexer preferred flow control mechanism. */
  693. #ifndef PORT_FC_DEFAULT
  694. #define PORT_FC_DEFAULT PORT_FC_CREDIT
  695. #endif
  696. /******************************************************************************
  697. *
  698. * OBEX
  699. *
  700. *****************************************************************************/
  701. /*
  702. * Buffer size to reassemble the SDU.
  703. * It will allow buffers to be used that are larger than the L2CAP_MAX_MTU.
  704. */
  705. #ifndef OBX_USER_RX_BUF_SIZE
  706. #define OBX_USER_RX_BUF_SIZE OBX_LRG_DATA_BUF_SIZE
  707. #endif
  708. /*
  709. * Buffer size to hold the SDU.
  710. * It will allow buffers to be used that are larger than the L2CAP_MAX_MTU.
  711. */
  712. #ifndef OBX_USER_TX_BUF_SIZE
  713. #define OBX_USER_TX_BUF_SIZE OBX_LRG_DATA_BUF_SIZE
  714. #endif
  715. /* Buffer size used to hold MPS segments during SDU reassembly. */
  716. #ifndef OBX_FCR_RX_BUF_SIZE
  717. #define OBX_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
  718. #endif
  719. /*
  720. * Buffer size used to hold MPS segments used in (re)transmissions.
  721. * The size of each buffer must be able to hold the maximum MPS segment size
  722. * passed in L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) +
  723. * L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
  724. */
  725. #ifndef OBX_FCR_TX_BUF_SIZE
  726. #define OBX_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
  727. #endif
  728. /*
  729. * Size of the transmission window when using enhanced retransmission mode.
  730. * Not used in basic and streaming modes. Range: 1 - 63
  731. */
  732. #ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR
  733. #define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 20
  734. #endif
  735. /*
  736. * Number of transmission attempts for a single I-Frame before taking
  737. * Down the connection. Used In ERTM mode only. Value is Ignored in basic and
  738. * Streaming modes.
  739. * Range: 0, 1-0xFF
  740. * 0 - infinite retransmissions
  741. * 1 - single transmission
  742. */
  743. #ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT
  744. #define OBX_FCR_OPT_MAX_TX_B4_DISCNT 20
  745. #endif
  746. /*
  747. * Retransmission Timeout
  748. * Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF.
  749. */
  750. #ifndef OBX_FCR_OPT_RETX_TOUT
  751. #define OBX_FCR_OPT_RETX_TOUT 2000
  752. #endif
  753. /*
  754. * Monitor Timeout
  755. * Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
  756. */
  757. #ifndef OBX_FCR_OPT_MONITOR_TOUT
  758. #define OBX_FCR_OPT_MONITOR_TOUT 12000
  759. #endif
  760. /*
  761. * Maximum PDU payload size.
  762. * Suggestion: The maximum amount of data that will fit into a 3-DH5 packet.
  763. * Range: 2 octets
  764. */
  765. #ifndef OBX_FCR_OPT_MAX_PDU_SIZE
  766. #define OBX_FCR_OPT_MAX_PDU_SIZE L2CAP_MPS_OVER_BR_EDR
  767. #endif
  768. /******************************************************************************
  769. *
  770. * BNEP
  771. *
  772. *****************************************************************************/
  773. #ifndef BNEP_INCLUDED
  774. #define BNEP_INCLUDED TRUE
  775. #endif
  776. /* BNEP status API call is used mainly to get the L2CAP handle */
  777. #ifndef BNEP_SUPPORTS_STATUS_API
  778. #define BNEP_SUPPORTS_STATUS_API TRUE
  779. #endif
  780. /*
  781. * When BNEP connection changes roles after the connection is established
  782. * we will do an authentication check again on the new role
  783. */
  784. #ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
  785. #define BNEP_DO_AUTH_FOR_ROLE_SWITCH TRUE
  786. #endif
  787. /* Maximum number of protocol filters supported. */
  788. #ifndef BNEP_MAX_PROT_FILTERS
  789. #define BNEP_MAX_PROT_FILTERS 5
  790. #endif
  791. /* Maximum number of multicast filters supported. */
  792. #ifndef BNEP_MAX_MULTI_FILTERS
  793. #define BNEP_MAX_MULTI_FILTERS 5
  794. #endif
  795. /* Minimum MTU size. */
  796. #ifndef BNEP_MIN_MTU_SIZE
  797. #define BNEP_MIN_MTU_SIZE L2CAP_MTU_SIZE
  798. #endif
  799. /* Preferred MTU size. */
  800. #ifndef BNEP_MTU_SIZE
  801. #define BNEP_MTU_SIZE BNEP_MIN_MTU_SIZE
  802. #endif
  803. /* Maximum number of buffers allowed in transmit data queue. */
  804. #ifndef BNEP_MAX_XMITQ_DEPTH
  805. #define BNEP_MAX_XMITQ_DEPTH 20
  806. #endif
  807. /* Maximum number BNEP of connections supported. */
  808. #ifndef BNEP_MAX_CONNECTIONS
  809. #define BNEP_MAX_CONNECTIONS 7
  810. #endif
  811. /******************************************************************************
  812. *
  813. * AVDTP
  814. *
  815. *****************************************************************************/
  816. /* Number of simultaneous links to different peer devices. */
  817. #ifndef AVDT_NUM_LINKS
  818. #define AVDT_NUM_LINKS 6
  819. #endif
  820. /* Number of simultaneous stream endpoints. */
  821. #ifndef AVDT_NUM_SEPS
  822. #define AVDT_NUM_SEPS 6
  823. #endif
  824. /* Number of transport channels setup by AVDT for all media streams */
  825. #ifndef AVDT_NUM_TC_TBL
  826. #define AVDT_NUM_TC_TBL (AVDT_NUM_SEPS + AVDT_NUM_LINKS)
  827. #endif
  828. /* Maximum size in bytes of the content protection information element. */
  829. #ifndef AVDT_PROTECT_SIZE
  830. #define AVDT_PROTECT_SIZE 90
  831. #endif
  832. /******************************************************************************
  833. *
  834. * PAN
  835. *
  836. *****************************************************************************/
  837. #ifndef PAN_INCLUDED
  838. #define PAN_INCLUDED TRUE
  839. #endif
  840. #ifndef PAN_NAP_DISABLED
  841. #define PAN_NAP_DISABLED FALSE
  842. #endif
  843. #ifndef PANU_DISABLED
  844. #define PANU_DISABLED FALSE
  845. #endif
  846. /* This will enable the PANU role */
  847. #ifndef PAN_SUPPORTS_ROLE_PANU
  848. #define PAN_SUPPORTS_ROLE_PANU TRUE
  849. #endif
  850. /* This will enable the GN role */
  851. #ifndef PAN_SUPPORTS_ROLE_GN
  852. #define PAN_SUPPORTS_ROLE_GN TRUE
  853. #endif
  854. /* This will enable the NAP role */
  855. #ifndef PAN_SUPPORTS_ROLE_NAP
  856. #define PAN_SUPPORTS_ROLE_NAP TRUE
  857. #endif
  858. /* This is just for debugging purposes */
  859. #ifndef PAN_SUPPORTS_DEBUG_DUMP
  860. #define PAN_SUPPORTS_DEBUG_DUMP TRUE
  861. #endif
  862. /* Maximum number of PAN connections allowed */
  863. #ifndef MAX_PAN_CONNS
  864. #define MAX_PAN_CONNS 7
  865. #endif
  866. /* Default service name for NAP role */
  867. #ifndef PAN_NAP_DEFAULT_SERVICE_NAME
  868. #define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service"
  869. #endif
  870. /* Default service name for GN role */
  871. #ifndef PAN_GN_DEFAULT_SERVICE_NAME
  872. #define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service"
  873. #endif
  874. /* Default service name for PANU role */
  875. #ifndef PAN_PANU_DEFAULT_SERVICE_NAME
  876. #define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service"
  877. #endif
  878. /* Default description for NAP role service */
  879. #ifndef PAN_NAP_DEFAULT_DESCRIPTION
  880. #define PAN_NAP_DEFAULT_DESCRIPTION "NAP"
  881. #endif
  882. /* Default description for GN role service */
  883. #ifndef PAN_GN_DEFAULT_DESCRIPTION
  884. #define PAN_GN_DEFAULT_DESCRIPTION "GN"
  885. #endif
  886. /* Default description for PANU role service */
  887. #ifndef PAN_PANU_DEFAULT_DESCRIPTION
  888. #define PAN_PANU_DEFAULT_DESCRIPTION "PANU"
  889. #endif
  890. /* Default Security level for PANU role. */
  891. #ifndef PAN_PANU_SECURITY_LEVEL
  892. #define PAN_PANU_SECURITY_LEVEL 0
  893. #endif
  894. /* Default Security level for GN role. */
  895. #ifndef PAN_GN_SECURITY_LEVEL
  896. #define PAN_GN_SECURITY_LEVEL 0
  897. #endif
  898. /* Default Security level for NAP role. */
  899. #ifndef PAN_NAP_SECURITY_LEVEL
  900. #define PAN_NAP_SECURITY_LEVEL 0
  901. #endif
  902. /******************************************************************************
  903. *
  904. * GAP
  905. *
  906. *****************************************************************************/
  907. #ifndef GAP_INCLUDED
  908. #define GAP_INCLUDED TRUE
  909. #endif
  910. /* The maximum number of simultaneous GAP L2CAP connections. */
  911. #ifndef GAP_MAX_CONNECTIONS
  912. #define GAP_MAX_CONNECTIONS 30
  913. #endif
  914. /* keep the raw data received from SDP server in database. */
  915. #ifndef SDP_RAW_DATA_INCLUDED
  916. #define SDP_RAW_DATA_INCLUDED TRUE
  917. #endif
  918. /* Inquiry duration in 1.28 second units. */
  919. #ifndef SDP_DEBUG
  920. #define SDP_DEBUG TRUE
  921. #endif
  922. /******************************************************************************
  923. *
  924. * HID
  925. *
  926. *****************************************************************************/
  927. /* HID Device Role Included */
  928. #ifndef HID_DEV_INCLUDED
  929. #define HID_DEV_INCLUDED TRUE
  930. #endif
  931. #ifndef HID_CONTROL_BUF_SIZE
  932. #define HID_CONTROL_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
  933. #endif
  934. #ifndef HID_INTERRUPT_BUF_SIZE
  935. #define HID_INTERRUPT_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
  936. #endif
  937. #ifndef HID_DEV_MTU_SIZE
  938. #define HID_DEV_MTU_SIZE 64
  939. #endif
  940. #ifndef HID_DEV_FLUSH_TO
  941. #define HID_DEV_FLUSH_TO 0xffff
  942. #endif
  943. /*************************************************************************
  944. * Definitions for Both HID-Host & Device
  945. */
  946. #ifndef HID_MAX_SVC_NAME_LEN
  947. #define HID_MAX_SVC_NAME_LEN 32
  948. #endif
  949. #ifndef HID_MAX_SVC_DESCR_LEN
  950. #define HID_MAX_SVC_DESCR_LEN 32
  951. #endif
  952. #ifndef HID_MAX_PROV_NAME_LEN
  953. #define HID_MAX_PROV_NAME_LEN 32
  954. #endif
  955. /*************************************************************************
  956. * Definitions for HID-Host
  957. */
  958. #ifndef HID_HOST_INCLUDED
  959. #define HID_HOST_INCLUDED TRUE
  960. #endif
  961. #ifndef HID_HOST_MAX_DEVICES
  962. #define HID_HOST_MAX_DEVICES 7
  963. #endif
  964. #ifndef HID_HOST_MTU
  965. #define HID_HOST_MTU 640
  966. #endif
  967. #ifndef HID_HOST_FLUSH_TO
  968. #define HID_HOST_FLUSH_TO 0xffff
  969. #endif
  970. #ifndef HID_HOST_MAX_CONN_RETRY
  971. #define HID_HOST_MAX_CONN_RETRY 1
  972. #endif
  973. #ifndef HID_HOST_REPAGE_WIN
  974. #define HID_HOST_REPAGE_WIN 2
  975. #endif
  976. /******************************************************************************
  977. *
  978. * AVCTP
  979. *
  980. *****************************************************************************/
  981. /* Number of simultaneous ACL links to different peer devices. */
  982. #ifndef AVCT_NUM_LINKS
  983. #define AVCT_NUM_LINKS 6
  984. #endif
  985. /* Number of simultaneous AVCTP connections. */
  986. #ifndef AVCT_NUM_CONN
  987. #define AVCT_NUM_CONN 14 // 2 * MaxDevices + 2
  988. #endif
  989. /******************************************************************************
  990. *
  991. * AVRCP
  992. *
  993. *****************************************************************************/
  994. #ifndef AVRC_ADV_CTRL_INCLUDED
  995. #define AVRC_ADV_CTRL_INCLUDED TRUE
  996. #endif
  997. #ifndef DUMP_PCM_DATA
  998. #define DUMP_PCM_DATA FALSE
  999. #endif
  1000. /******************************************************************************
  1001. *
  1002. * BTA
  1003. *
  1004. *****************************************************************************/
  1005. /* BTA EIR canned UUID list (default is dynamic) */
  1006. #ifndef BTA_EIR_CANNED_UUID_LIST
  1007. #define BTA_EIR_CANNED_UUID_LIST FALSE
  1008. #endif
  1009. /* Number of supported customer UUID in EIR */
  1010. #ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
  1011. #define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8
  1012. #endif
  1013. /* CHLD override */
  1014. #ifndef BTA_AG_CHLD_VAL_ECC
  1015. #define BTA_AG_CHLD_VAL_ECC "(0,1,1x,2,2x,3)"
  1016. #endif
  1017. #ifndef BTA_AG_CHLD_VAL
  1018. #define BTA_AG_CHLD_VAL "(0,1,2,3)"
  1019. #endif
  1020. /* Set the CIND to match HFP 1.5 */
  1021. #ifndef BTA_AG_CIND_INFO
  1022. #define BTA_AG_CIND_INFO \
  1023. "(\"call\",(0,1)),(\"callsetup\",(0-3)),(\"service\",(0-1)),(\"signal\",(0-" \
  1024. "5)),(\"roam\",(0,1)),(\"battchg\",(0-5)),(\"callheld\",(0-2))"
  1025. #endif
  1026. #ifndef BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY
  1027. #define BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY TRUE
  1028. #endif
  1029. /******************************************************************************
  1030. *
  1031. * Tracing: Include trace header file here.
  1032. *
  1033. *****************************************************************************/
  1034. /* Enable/disable BTSnoop memory logging */
  1035. #ifndef BTSNOOP_MEM
  1036. #define BTSNOOP_MEM TRUE
  1037. #endif
  1038. #include "bt_trace.h"
  1039. #endif /* BT_TARGET_H */