blob: cef7e8835b0d2eff1c8e0a2bbe3c780b6c8a9acb [file] [log] [blame]
Umesh Vats2c2dcd32016-09-02 14:19:08 -07001 /******************************************************************************
Umesh Vatsc3e724b2016-06-21 14:07:49 -07002 * Copyright (c) 2016, The Linux Foundation. All rights reserved.
3 *
4 * Not a contribution.
5 ******************************************************************************/
6
7/******************************************************************************
The Android Open Source Project5738f832012-12-12 16:00:35 -08008 *
Hemant Gupta41d4a262013-08-19 18:33:01 +05309 * Copyright (c) 2014 The Android Open Source Project
The Android Open Source Project5738f832012-12-12 16:00:35 -080010 * Copyright (C) 1999-2012 Broadcom Corporation
11 *
12 * Licensed under the Apache License, Version 2.0 (the "License");
13 * you may not use this file except in compliance with the License.
14 * You may obtain a copy of the License at:
15 *
16 * http://www.apache.org/licenses/LICENSE-2.0
17 *
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
23 *
24 ******************************************************************************/
25
26#ifndef BT_TARGET_H
27#define BT_TARGET_H
28
29#ifndef BUILDCFG
30#define BUILDCFG
31#endif
The Android Open Source Project5738f832012-12-12 16:00:35 -080032
33#if !defined(HAS_BDROID_BUILDCFG) && !defined(HAS_NO_BDROID_BUILDCFG)
34#error "An Android.mk file did not include bdroid_CFLAGS and possibly not bdorid_C_INCLUDES"
35#endif
36
37#ifdef HAS_BDROID_BUILDCFG
38#include "bdroid_buildcfg.h"
39#endif
40
Sharvil Nanavati24ff5af2014-12-29 10:24:15 -080041#include "bt_types.h" /* This must be defined AFTER buildcfg.h */
The Android Open Source Project5738f832012-12-12 16:00:35 -080042
43/* Include common GKI definitions used by this platform */
The Android Open Source Project5738f832012-12-12 16:00:35 -080044#include "dyn_mem.h" /* defines static and/or dynamic memory for components */
45
Matthew Xie7f3e4292013-09-30 12:44:10 -070046//------------------Added from bdroid_buildcfg.h---------------------
Steve Kondik3fc79a12013-08-02 00:54:23 -070047#ifndef I2SPCM_SLAVE_BRCM
48#define I2SPCM_SLAVE_BRCM FALSE
49#endif
50
The Android Open Source Project5738f832012-12-12 16:00:35 -080051#ifndef L2CAP_EXTFEA_SUPPORTED_MASK
52#define L2CAP_EXTFEA_SUPPORTED_MASK (L2CAP_EXTFEA_ENH_RETRANS | L2CAP_EXTFEA_STREAM_MODE | L2CAP_EXTFEA_NO_CRC | L2CAP_EXTFEA_FIXED_CHNLS)
53#endif
54
Satish Kodishala7e0ee4c2015-07-22 15:57:31 +053055/* This feature is used to update any QCOM related changes in the stack*/
Satish Kodishala33673ea2015-08-18 19:27:39 +053056#ifndef BLUETOOTH_QTI_SW
Steve Kondik2f111722014-11-09 13:02:33 -080057#define BLUETOOTH_QTI_SW FALSE
Satish Kodishala7e0ee4c2015-07-22 15:57:31 +053058#endif
59
The Android Open Source Project5738f832012-12-12 16:00:35 -080060#ifndef BTUI_OPS_FORMATS
61#define BTUI_OPS_FORMATS (BTA_OP_VCARD21_MASK | BTA_OP_ANY_MASK)
62#endif
63
64#ifndef BTA_RFC_MTU_SIZE
65#define BTA_RFC_MTU_SIZE (L2CAP_MTU_SIZE-L2CAP_MIN_OFFSET-RFCOMM_DATA_OVERHEAD)
66#endif
67
The Android Open Source Project5738f832012-12-12 16:00:35 -080068#ifndef SBC_NO_PCM_CPY_OPTION
69#define SBC_NO_PCM_CPY_OPTION FALSE
70#endif
71
The Android Open Source Project5738f832012-12-12 16:00:35 -080072#ifndef BTA_INCLUDED
73#define BTA_INCLUDED TRUE
74#endif
75
The Android Open Source Project5738f832012-12-12 16:00:35 -080076#ifndef BTA_PAN_INCLUDED
77#define BTA_PAN_INCLUDED TRUE
78#endif
79
The Android Open Source Project5738f832012-12-12 16:00:35 -080080#ifndef BTA_HH_INCLUDED
81#define BTA_HH_INCLUDED TRUE
82#endif
83
84#ifndef BTA_HH_ROLE
85#define BTA_HH_ROLE BTA_MASTER_ROLE_PREF
86#endif
87
Andre Eisenbach2e7fa682013-08-08 15:42:48 -070088#ifndef BTA_HH_LE_INCLUDED
89#define BTA_HH_LE_INCLUDED TRUE
90#endif
91
The Android Open Source Project5738f832012-12-12 16:00:35 -080092#ifndef BTA_AR_INCLUDED
93#define BTA_AR_INCLUDED TRUE
94#endif
95
96#ifndef BTA_AV_INCLUDED
97#define BTA_AV_INCLUDED TRUE
98#endif
99
Ganesh Ganapathi Batta7fa4fba2014-04-16 16:50:09 -0700100#ifndef BTA_GATT_INCLUDED
101#define BTA_GATT_INCLUDED TRUE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800102#endif
103
lungtsai_lin6718c6d2014-07-02 20:39:02 +0800104#ifndef BTA_AV_SINK_INCLUDED
AnubhavGuptaf16fa262016-04-28 11:54:30 +0530105#define BTA_AV_SINK_INCLUDED TRUE
lungtsai_lin6718c6d2014-07-02 20:39:02 +0800106#endif
Hemant Guptaf7dd9f52013-10-24 15:37:17 +0530107
The Android Open Source Project5738f832012-12-12 16:00:35 -0800108#ifndef BTA_DISABLE_DELAY
109#define BTA_DISABLE_DELAY 200 /* in milliseconds */
110#endif
111
The Android Open Source Project5738f832012-12-12 16:00:35 -0800112#ifndef SBC_FOR_EMBEDDED_LINUX
113#define SBC_FOR_EMBEDDED_LINUX TRUE
114#endif
115
The Android Open Source Project5738f832012-12-12 16:00:35 -0800116#ifndef AVDT_VERSION
117#define AVDT_VERSION 0x0102
118#endif
119
120#ifndef BTA_AG_AT_MAX_LEN
121#define BTA_AG_AT_MAX_LEN 512
122#endif
123
124#ifndef BTA_AVRCP_FF_RW_SUPPORT
125#define BTA_AVRCP_FF_RW_SUPPORT TRUE
126#endif
127
128#ifndef BTA_AG_SCO_PKT_TYPES
129#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)
130#endif
131
The Android Open Source Project5738f832012-12-12 16:00:35 -0800132#ifndef BTA_AV_RET_TOUT
133#define BTA_AV_RET_TOUT 15
134#endif
135
The Android Open Source Project5738f832012-12-12 16:00:35 -0800136#ifndef BTA_AV_CO_CP_SCMS_T
137#define BTA_AV_CO_CP_SCMS_T FALSE
138#endif
139
Abhijit Adsule47b43102015-05-19 02:44:26 -0500140#ifndef BTIF_A2DP_SRC_SAMPLING_RATE
141#define BTIF_A2DP_SRC_SAMPLING_RATE 44100
142#endif
143
144#ifndef BTIF_A2DP_SRC_BIT_DEPTH
Umesh Vats2c2dcd32016-09-02 14:19:08 -0700145#define BTIF_A2DP_SRC_BIT_DEPTH 32
Abhijit Adsule47b43102015-05-19 02:44:26 -0500146#endif
147
148#ifndef BTIF_A2DP_SRC_NUM_CHANNELS
149#define BTIF_A2DP_SRC_NUM_CHANNELS 2
150#endif
151
Pavlin Radoslavov5712c442016-02-18 20:51:58 -0800152/* This feature is used to enable interleaved scan */
Matthew Xie7f3e4292013-09-30 12:44:10 -0700153#ifndef BTA_HOST_INTERLEAVE_SEARCH
154#define BTA_HOST_INTERLEAVE_SEARCH FALSE
155#endif
156
The Android Open Source Project5738f832012-12-12 16:00:35 -0800157#ifndef BT_USE_TRACES
158#define BT_USE_TRACES TRUE
159#endif
160
rakesh reddy9af34692014-08-14 11:58:45 +0530161#ifndef BT_TRACE_BTIF
162#define BT_TRACE_BTIF TRUE
163#endif
164
165
166#ifndef BT_TRACE_LATENCY_AUDIO
167#define BT_TRACE_LATENCY_AUDIO TRUE
168#endif
169
The Android Open Source Project5738f832012-12-12 16:00:35 -0800170#ifndef BT_TRACE_VERBOSE
171#define BT_TRACE_VERBOSE FALSE
172#endif
173
The Android Open Source Project5738f832012-12-12 16:00:35 -0800174#ifndef BTA_DM_SDP_DB_SIZE
175#define BTA_DM_SDP_DB_SIZE 8000
176#endif
177
The Android Open Source Project5738f832012-12-12 16:00:35 -0800178#ifndef HL_INCLUDED
179#define HL_INCLUDED TRUE
180#endif
181
Bhakthavatsala Raghavendra79f4e572016-07-29 19:11:28 -0700182#ifndef AAC_ENCODER_INCLUDED
183#define AAC_ENCODER_INCLUDED TRUE
184#endif
185
186
The Android Open Source Project5738f832012-12-12 16:00:35 -0800187#ifndef AG_VOICE_SETTINGS
188#define AG_VOICE_SETTINGS HCI_DEFAULT_VOICE_SETTINGS
189#endif
190
191#ifndef BTIF_DM_OOB_TEST
192#define BTIF_DM_OOB_TEST TRUE
193#endif
Matthew Xie7f3e4292013-09-30 12:44:10 -0700194
Fred Quintana0963a672014-09-03 16:23:14 -0700195// How long to wait before activating sniff mode after entering the
196// idle state for FTS, OPS connections
197#ifndef BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS
198#define BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS 7000
199#endif
200
Matthew Xie7f3e4292013-09-30 12:44:10 -0700201//------------------End added from bdroid_buildcfg.h---------------------
The Android Open Source Project5738f832012-12-12 16:00:35 -0800202
Matadeen Mishra72153522016-05-11 21:16:09 -0700203/******************************************************************************
204**
205** Test Application interface
206**
207******************************************************************************/
208
209#ifndef TEST_APP_INTERFACE
Steve Kondikd9626eb2014-12-18 23:34:55 -0800210#define TEST_APP_INTERFACE FALSE
Matadeen Mishra72153522016-05-11 21:16:09 -0700211#endif
The Android Open Source Project5738f832012-12-12 16:00:35 -0800212
The Android Open Source Project5738f832012-12-12 16:00:35 -0800213/******************************************************************************
214**
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700215** Buffer sizes
The Android Open Source Project5738f832012-12-12 16:00:35 -0800216**
217******************************************************************************/
218
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700219#ifndef BT_DEFAULT_BUFFER_SIZE
220#define BT_DEFAULT_BUFFER_SIZE (4096 + 16)
221#endif
222
223#ifndef BT_SMALL_BUFFER_SIZE
224#define BT_SMALL_BUFFER_SIZE 660
225#endif
226
The Android Open Source Project5738f832012-12-12 16:00:35 -0800227/* Receives HCI events from the lower-layer. */
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700228#ifndef HCI_CMD_BUF_SIZE
229#define HCI_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800230#endif
231
The Android Open Source Project5738f832012-12-12 16:00:35 -0800232/* Sends SDP data packets. */
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700233#ifndef SDP_DATA_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700234#define SDP_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800235#endif
236
237/* Sends RFCOMM command packets. */
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700238#ifndef RFCOMM_CMD_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700239#define RFCOMM_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800240#endif
241
The Android Open Source Project5738f832012-12-12 16:00:35 -0800242/* Sends RFCOMM data packets. */
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700243#ifndef RFCOMM_DATA_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700244#define RFCOMM_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800245#endif
246
247/* Sends L2CAP packets to the peer and HCI messages to the controller. */
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700248#ifndef L2CAP_CMD_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700249#define L2CAP_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800250#endif
251
Pavlin Radoslavov1d5b8592015-09-23 10:08:20 -0700252#ifndef L2CAP_USER_TX_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700253#define L2CAP_USER_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
Pavlin Radoslavov1d5b8592015-09-23 10:08:20 -0700254#endif
255
256#ifndef L2CAP_USER_RX_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700257#define L2CAP_USER_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
Pavlin Radoslavov1d5b8592015-09-23 10:08:20 -0700258#endif
259
The Android Open Source Project5738f832012-12-12 16:00:35 -0800260/* Sends L2CAP segmented packets in ERTM mode */
Pavlin Radoslavov1d5b8592015-09-23 10:08:20 -0700261#ifndef L2CAP_FCR_TX_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700262#define L2CAP_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
Pavlin Radoslavov1d5b8592015-09-23 10:08:20 -0700263#endif
264
The Android Open Source Project5738f832012-12-12 16:00:35 -0800265/* Receives L2CAP segmented packets in ERTM mode */
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700266#ifndef L2CAP_FCR_RX_BUF_SIZE
267#define L2CAP_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800268#endif
269
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700270#ifndef L2CAP_FCR_ERTM_BUF_SIZE
271#define L2CAP_FCR_ERTM_BUF_SIZE (10240 + 24)
272#endif
273
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700274/* Number of ACL buffers to assign to LE */
275/*
276 * TODO: Do we need this?
277 * It was used when the HCI buffers were shared with BR/EDR.
278 */
Andre Eisenbach12c3f492013-04-24 16:02:04 -0700279#ifndef L2C_DEF_NUM_BLE_BUF_SHARED
280#define L2C_DEF_NUM_BLE_BUF_SHARED 1
281#endif
282
The Android Open Source Project5738f832012-12-12 16:00:35 -0800283/* Used by BTM when it sends HCI commands to the controller. */
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700284#ifndef BTM_CMD_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700285#define BTM_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700286#endif
287
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700288#ifndef OBX_LRG_DATA_BUF_SIZE
289#define OBX_LRG_DATA_BUF_SIZE (8080 + 26)
Kim Schulz8372aa52015-03-25 10:39:40 +0100290#endif
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700291
The Android Open Source Project5738f832012-12-12 16:00:35 -0800292/* Used to send data to L2CAP. */
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700293#ifndef GAP_DATA_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700294#define GAP_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800295#endif
296
The Android Open Source Project5738f832012-12-12 16:00:35 -0800297/* BNEP data and protocol messages. */
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700298#ifndef BNEP_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700299#define BNEP_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800300#endif
301
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700302/* AVDTP buffer size for protocol messages */
303#ifndef AVDT_CMD_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700304#define AVDT_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700305#endif
306
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700307/* AVDTP buffer size for media packets in case of fragmentation */
308#ifndef AVDT_DATA_BUF_SIZE
309#define AVDT_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800310#endif
311
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700312#ifndef PAN_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700313#define PAN_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700314#endif
315
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700316/* Maximum number of buffers to allocate for PAN */
317#ifndef PAN_BUF_MAX
318#define PAN_BUF_MAX 100
The Android Open Source Project5738f832012-12-12 16:00:35 -0800319#endif
320
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700321/* AVCTP buffer size for protocol messages */
322#ifndef AVCT_CMD_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700323#define AVCT_CMD_BUF_SIZE 288
The Android Open Source Project5738f832012-12-12 16:00:35 -0800324#endif
325
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700326/* AVRCP buffer size for protocol messages */
327#ifndef AVRC_CMD_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700328#define AVRC_CMD_BUF_SIZE 288
The Android Open Source Project5738f832012-12-12 16:00:35 -0800329#endif
330
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700331/* AVRCP Metadata buffer size for protocol messages */
332#ifndef AVRC_META_CMD_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700333#define AVRC_META_CMD_BUF_SIZE BT_SMALL_BUFFER_SIZE
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700334#endif
335
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700336#ifndef BTA_HL_LRG_DATA_BUF_SIZE
Pavlin Radoslavov1d5b8592015-09-23 10:08:20 -0700337#define BTA_HL_LRG_DATA_BUF_SIZE (10240 + 24)
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700338#endif
339
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700340/* GATT Server Database buffer size */
341#ifndef GATT_DB_BUF_SIZE
342#define GATT_DB_BUF_SIZE 128
343#endif
344
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700345/* GATT Data sending buffer size */
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -0700346#ifndef GATT_DATA_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700347#define GATT_DATA_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
Andre Eisenbach17b04bd2014-03-28 14:54:22 -0700348#endif
349
The Android Open Source Project5738f832012-12-12 16:00:35 -0800350/******************************************************************************
351**
The Android Open Source Project5738f832012-12-12 16:00:35 -0800352** BTM
353**
354******************************************************************************/
The Android Open Source Project5738f832012-12-12 16:00:35 -0800355
356/* Cancel Inquiry on incoming SSP */
357#ifndef BTM_NO_SSP_ON_INQUIRY
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700358#define BTM_NO_SSP_ON_INQUIRY FALSE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800359#endif
360
The Android Open Source Project5738f832012-12-12 16:00:35 -0800361/* Includes SCO if TRUE */
362#ifndef BTM_SCO_INCLUDED
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700363#define BTM_SCO_INCLUDED TRUE /* TRUE includes SCO code */
The Android Open Source Project5738f832012-12-12 16:00:35 -0800364#endif
365
366/* Includes SCO if TRUE */
367#ifndef BTM_SCO_HCI_INCLUDED
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700368#define BTM_SCO_HCI_INCLUDED FALSE /* TRUE includes SCO over HCI code */
The Android Open Source Project5738f832012-12-12 16:00:35 -0800369#endif
370
Satish Kodishala33673ea2015-08-18 19:27:39 +0530371#if (BLUETOOTH_QTI_SW == TRUE) /* Enable WBS only under this flag.*/
Satish Kodishala7e0ee4c2015-07-22 15:57:31 +0530372#define BTM_WBS_INCLUDED TRUE
373#else
The Android Open Source Project5738f832012-12-12 16:00:35 -0800374/* Includes WBS if TRUE */
375#ifndef BTM_WBS_INCLUDED
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700376#define BTM_WBS_INCLUDED FALSE /* TRUE includes WBS code */
The Android Open Source Project5738f832012-12-12 16:00:35 -0800377#endif
Satish Kodishala7e0ee4c2015-07-22 15:57:31 +0530378#endif
379
The Android Open Source Project5738f832012-12-12 16:00:35 -0800380
The Android Open Source Project5738f832012-12-12 16:00:35 -0800381/* This is used to work around a controller bug that doesn't like Disconnect
382** issued while there is a role switch in progress
383*/
384#ifndef BTM_DISC_DURING_RS
385#define BTM_DISC_DURING_RS TRUE
386#endif
387
388/**************************
389** Initial SCO TX credit
390*************************/
391/* max TX SCO data packet size */
392#ifndef BTM_SCO_DATA_SIZE_MAX
393#define BTM_SCO_DATA_SIZE_MAX 240
394#endif
395
The Android Open Source Project5738f832012-12-12 16:00:35 -0800396/* The size in bytes of the BTM inquiry database. */
397#ifndef BTM_INQ_DB_SIZE
398#define BTM_INQ_DB_SIZE 40
399#endif
400
The Android Open Source Project5738f832012-12-12 16:00:35 -0800401/* The default scan mode */
402#ifndef BTM_DEFAULT_SCAN_TYPE
403#define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED
404#endif
405
406/* Should connections to unknown devices be allowed when not discoverable? */
407#ifndef BTM_ALLOW_CONN_IF_NONDISCOVER
408#define BTM_ALLOW_CONN_IF_NONDISCOVER TRUE
409#endif
410
The Android Open Source Project5738f832012-12-12 16:00:35 -0800411/* Sets the Page_Scan_Window: the length of time that the device is performing a page scan. */
412#ifndef BTM_DEFAULT_CONN_WINDOW
413#define BTM_DEFAULT_CONN_WINDOW 0x0012
414#endif
415
416/* Sets the Page_Scan_Activity: the interval between the start of two consecutive page scans. */
417#ifndef BTM_DEFAULT_CONN_INTERVAL
418#define BTM_DEFAULT_CONN_INTERVAL 0x0800
419#endif
420
The Android Open Source Project5738f832012-12-12 16:00:35 -0800421/* When automatic inquiry scan is enabled, this sets the inquiry scan window. */
422#ifndef BTM_DEFAULT_DISC_WINDOW
423#define BTM_DEFAULT_DISC_WINDOW 0x0012
424#endif
425
426/* When automatic inquiry scan is enabled, this sets the inquiry scan interval. */
427#ifndef BTM_DEFAULT_DISC_INTERVAL
428#define BTM_DEFAULT_DISC_INTERVAL 0x0800
429#endif
430
The Android Open Source Project5738f832012-12-12 16:00:35 -0800431/* Default class of device
432* {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
433*
434* SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
435* MAJOR_CLASS:0x02 - PHONE
436* MINOR_CLASS:0x0C - SMART_PHONE
437*
438*/
439#ifndef BTA_DM_COD
440#define BTA_DM_COD {0x5A, 0x02, 0x0C}
441#endif
442
443/* The number of SCO links. */
444#ifndef BTM_MAX_SCO_LINKS
Nitin Srivastava90a32532014-03-14 16:19:58 -0700445#define BTM_MAX_SCO_LINKS 3
The Android Open Source Project5738f832012-12-12 16:00:35 -0800446#endif
447
448/* The preferred type of SCO links (2-eSCO, 0-SCO). */
449#ifndef BTM_DEFAULT_SCO_MODE
450#define BTM_DEFAULT_SCO_MODE 2
451#endif
452
453/* The number of security records for peer devices. */
454#ifndef BTM_SEC_MAX_DEVICE_RECORDS
455#define BTM_SEC_MAX_DEVICE_RECORDS 100
456#endif
457
458/* The number of security records for services. */
459#ifndef BTM_SEC_MAX_SERVICE_RECORDS
460#define BTM_SEC_MAX_SERVICE_RECORDS 32
461#endif
462
463/* If True, force a retrieval of remote device name for each bond in case it's changed */
464#ifndef BTM_SEC_FORCE_RNR_FOR_DBOND
465#define BTM_SEC_FORCE_RNR_FOR_DBOND FALSE
466#endif
467
468/* Maximum device name length used in btm database. */
469#ifndef BTM_MAX_REM_BD_NAME_LEN
470#define BTM_MAX_REM_BD_NAME_LEN 248
471#endif
472
473/* Maximum local device name length stored btm database.
474 '0' disables storage of the local name in BTM */
475#ifndef BTM_MAX_LOC_BD_NAME_LEN
476#define BTM_MAX_LOC_BD_NAME_LEN 248
477#endif
478
Matthew Xie1e5109b2012-11-09 18:26:26 -0800479/* Fixed Default String. When this is defined as null string, the device's
480 * product model name is used as the default local name.
481 */
The Android Open Source Project5738f832012-12-12 16:00:35 -0800482#ifndef BTM_DEF_LOCAL_NAME
483#define BTM_DEF_LOCAL_NAME ""
484#endif
485
486/* Maximum service name stored with security authorization (0 if not needed) */
487#ifndef BTM_SEC_SERVICE_NAME_LEN
488#define BTM_SEC_SERVICE_NAME_LEN BT_MAX_SERVICE_NAME_LEN
489#endif
490
The Android Open Source Project5738f832012-12-12 16:00:35 -0800491/* Maximum length of the service name. */
492#ifndef BT_MAX_SERVICE_NAME_LEN
493#define BT_MAX_SERVICE_NAME_LEN 21
494#endif
495
The Android Open Source Project5738f832012-12-12 16:00:35 -0800496/* The maximum number of clients that can register with the power manager. */
497#ifndef BTM_MAX_PM_RECORDS
498#define BTM_MAX_PM_RECORDS 2
499#endif
500
501/* This is set to show debug trace messages for the power manager. */
502#ifndef BTM_PM_DEBUG
503#define BTM_PM_DEBUG FALSE
504#endif
505
506/* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */
507#ifndef BTM_SCO_WAKE_PARKED_LINK
508#define BTM_SCO_WAKE_PARKED_LINK TRUE
509#endif
510
The Android Open Source Project5738f832012-12-12 16:00:35 -0800511/* If the user does not respond to security process requests within this many seconds,
512 * a negative response would be sent automatically.
The Android Open Source Project5738f832012-12-12 16:00:35 -0800513 * 30 is LMP response timeout value */
514#ifndef BTM_SEC_TIMEOUT_VALUE
515#define BTM_SEC_TIMEOUT_VALUE 35
516#endif
517
518/* Maximum number of callbacks that can be registered using BTM_RegisterForVSEvents */
519#ifndef BTM_MAX_VSE_CALLBACKS
520#define BTM_MAX_VSE_CALLBACKS 3
521#endif
522
Srinu Jella5756c902015-10-08 17:14:16 +0530523/* Safe reattempt even after device is blacklisted for role switch */
524#ifndef BTM_SAFE_REATTEMPT_ROLE_SWITCH
525#define BTM_SAFE_REATTEMPT_ROLE_SWITCH TRUE
526#endif
527
The Android Open Source Project5738f832012-12-12 16:00:35 -0800528/******************************************
529** Lisbon Features
530*******************************************/
The Android Open Source Project5738f832012-12-12 16:00:35 -0800531/* This is set to TRUE if the FEC is required for EIR packet. */
532#ifndef BTM_EIR_DEFAULT_FEC_REQUIRED
533#define BTM_EIR_DEFAULT_FEC_REQUIRED TRUE
534#endif
535
The Android Open Source Project5738f832012-12-12 16:00:35 -0800536/* The IO capability of the local device (for Simple Pairing) */
537#ifndef BTM_LOCAL_IO_CAPS
538#define BTM_LOCAL_IO_CAPS BTM_IO_CAP_IO
539#endif
540
Andre Eisenbach26fa02b2014-11-18 09:39:00 -0800541#ifndef BTM_LOCAL_IO_CAPS_BLE
542#define BTM_LOCAL_IO_CAPS_BLE BTM_IO_CAP_KBDISP
543#endif
544
The Android Open Source Project5738f832012-12-12 16:00:35 -0800545/* The default MITM Protection Requirement (for Simple Pairing)
546 * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
547#ifndef BTM_DEFAULT_AUTH_REQ
548#define BTM_DEFAULT_AUTH_REQ BTM_AUTH_SP_NO
549#endif
550
551/* The default MITM Protection Requirement for dedicated bonding using Simple Pairing
552 * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
553#ifndef BTM_DEFAULT_DD_AUTH_REQ
554#define BTM_DEFAULT_DD_AUTH_REQ BTM_AUTH_AP_YES
555#endif
556
The Android Open Source Project5738f832012-12-12 16:00:35 -0800557/* TRUE to include Sniff Subrating */
558#ifndef BTM_SSR_INCLUDED
559#define BTM_SSR_INCLUDED TRUE
560#endif
561
562/*************************
563** End of Lisbon Features
564**************************/
565
Andre Eisenbachb5c8e292015-05-26 17:40:12 -0700566/* 4.1/4.2 secure connections feature */
567#ifndef SC_MODE_INCLUDED
568#define SC_MODE_INCLUDED TRUE
569#endif
570
The Android Open Source Project5738f832012-12-12 16:00:35 -0800571/* Used for conformance testing ONLY */
572#ifndef BTM_BLE_CONFORMANCE_TESTING
573#define BTM_BLE_CONFORMANCE_TESTING FALSE
574#endif
575
The Android Open Source Project5738f832012-12-12 16:00:35 -0800576/******************************************************************************
577**
578** L2CAP
579**
580******************************************************************************/
581
The Android Open Source Project5738f832012-12-12 16:00:35 -0800582/* The maximum number of simultaneous channels that L2CAP can support. */
583#ifndef MAX_L2CAP_CHANNELS
Pramod Sivaraman06c6a852017-01-23 17:39:14 +0530584#define MAX_L2CAP_CHANNELS 20
The Android Open Source Project5738f832012-12-12 16:00:35 -0800585#endif
586
Satish kumar sugasi70770da2015-08-31 19:10:46 -0700587/* The maximum number of simultaneous links that L2CAP can support. */
588#ifndef MAX_L2CAP_CHANNELS
589#define MAX_L2CAP_LINKS 7
590#else
591#define MAX_L2CAP_LINKS MAX_L2CAP_CHANNELS
592#endif
593
The Android Open Source Project5738f832012-12-12 16:00:35 -0800594/* The maximum number of simultaneous applications that can register with L2CAP. */
595#ifndef MAX_L2CAP_CLIENTS
Pramod Sivaraman06c6a852017-01-23 17:39:14 +0530596#define MAX_L2CAP_CLIENTS 19
The Android Open Source Project5738f832012-12-12 16:00:35 -0800597#endif
598
599/* The number of seconds of link inactivity before a link is disconnected. */
600#ifndef L2CAP_LINK_INACTIVITY_TOUT
601#define L2CAP_LINK_INACTIVITY_TOUT 4
602#endif
603
604/* The number of seconds of link inactivity after bonding before a link is disconnected. */
605#ifndef L2CAP_BONDING_TIMEOUT
606#define L2CAP_BONDING_TIMEOUT 3
607#endif
608
609/* The time from the HCI connection complete to disconnect if no channel is established. */
610#ifndef L2CAP_LINK_STARTUP_TOUT
611#define L2CAP_LINK_STARTUP_TOUT 60
612#endif
613
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700614/* The L2CAP MTU; must be in accord with the HCI ACL buffer size. */
The Android Open Source Project5738f832012-12-12 16:00:35 -0800615#ifndef L2CAP_MTU_SIZE
616#define L2CAP_MTU_SIZE 1691
617#endif
618
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -0700619/*
620 * The L2CAP MPS over Bluetooth; must be in accord with the FCR tx buffer size
621 * and ACL down buffer size.
622 */
The Android Open Source Project5738f832012-12-12 16:00:35 -0800623#ifndef L2CAP_MPS_OVER_BR_EDR
624#define L2CAP_MPS_OVER_BR_EDR 1010
625#endif
626
The Android Open Source Project5738f832012-12-12 16:00:35 -0800627/* If host flow control enabled, this is the number of buffers the controller can have unacknowledged. */
628#ifndef L2CAP_HOST_FC_ACL_BUFS
629#define L2CAP_HOST_FC_ACL_BUFS 20
630#endif
631
The Android Open Source Project5738f832012-12-12 16:00:35 -0800632/* This is set to enable L2CAP to take the ACL link out of park mode when ACL data is to be sent. */
633#ifndef L2CAP_WAKE_PARKED_LINK
634#define L2CAP_WAKE_PARKED_LINK TRUE
635#endif
636
637/* Whether link wants to be the master or the slave. */
638#ifndef L2CAP_DESIRED_LINK_ROLE
venkata Jagadeeshe1e52592014-06-26 11:55:41 +0530639#define L2CAP_DESIRED_LINK_ROLE HCI_ROLE_MASTER
The Android Open Source Project5738f832012-12-12 16:00:35 -0800640#endif
641
642/* Include Non-Flushable Packet Boundary Flag feature of Lisbon */
643#ifndef L2CAP_NON_FLUSHABLE_PB_INCLUDED
644#define L2CAP_NON_FLUSHABLE_PB_INCLUDED TRUE
645#endif
646
647/* Minimum number of ACL credit for high priority link */
648#ifndef L2CAP_HIGH_PRI_MIN_XMIT_QUOTA
The Android Open Source Project689d66b2012-12-12 17:18:15 -0800649#define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA 5
The Android Open Source Project5738f832012-12-12 16:00:35 -0800650#endif
651
652/* used for monitoring HCI ACL credit management */
653#ifndef L2CAP_HCI_FLOW_CONTROL_DEBUG
654#define L2CAP_HCI_FLOW_CONTROL_DEBUG TRUE
655#endif
656
The Android Open Source Project5738f832012-12-12 16:00:35 -0800657/* Unicast Connectionless Data */
658#ifndef L2CAP_UCD_INCLUDED
659#define L2CAP_UCD_INCLUDED FALSE
660#endif
661
662/* Unicast Connectionless Data MTU */
663#ifndef L2CAP_UCD_MTU
664#define L2CAP_UCD_MTU L2CAP_MTU_SIZE
665#endif
666
667/* Unicast Connectionless Data Idle Timeout */
668#ifndef L2CAP_UCD_IDLE_TIMEOUT
669#define L2CAP_UCD_IDLE_TIMEOUT 2
670#endif
671
672/* Unicast Connectionless Data Idle Timeout */
673#ifndef L2CAP_UCD_CH_PRIORITY
674#define L2CAP_UCD_CH_PRIORITY L2CAP_CHNL_PRIORITY_MEDIUM
675#endif
676
The Android Open Source Project5738f832012-12-12 16:00:35 -0800677/* Used for features using fixed channels; set to zero if no fixed channels supported (BLE, etc.) */
678/* Excluding L2CAP signaling channel and UCD */
679#ifndef L2CAP_NUM_FIXED_CHNLS
Kim Schulz8372aa52015-03-25 10:39:40 +0100680#define L2CAP_NUM_FIXED_CHNLS 32
The Android Open Source Project5738f832012-12-12 16:00:35 -0800681#endif
682
683/* First fixed channel supported */
684#ifndef L2CAP_FIRST_FIXED_CHNL
Satya Calloji444a8da2015-03-06 10:38:22 -0800685#define L2CAP_FIRST_FIXED_CHNL 4
The Android Open Source Project5738f832012-12-12 16:00:35 -0800686#endif
687
688#ifndef L2CAP_LAST_FIXED_CHNL
689#define L2CAP_LAST_FIXED_CHNL (L2CAP_FIRST_FIXED_CHNL + L2CAP_NUM_FIXED_CHNLS - 1)
690#endif
691
692/* Round Robin service channels in link */
693#ifndef L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
694#define L2CAP_ROUND_ROBIN_CHANNEL_SERVICE TRUE
695#endif
696
The Android Open Source Project5738f832012-12-12 16:00:35 -0800697/* used for monitoring eL2CAP data flow */
698#ifndef L2CAP_ERTM_STATS
699#define L2CAP_ERTM_STATS FALSE
700#endif
701
The Android Open Source Project5738f832012-12-12 16:00:35 -0800702/* Used for conformance testing ONLY: When TRUE lets scriptwrapper overwrite info response */
703#ifndef L2CAP_CONFORMANCE_TESTING
704#define L2CAP_CONFORMANCE_TESTING FALSE
705#endif
706
Kim Schulz8372aa52015-03-25 10:39:40 +0100707/*
708 * Max bytes per connection to buffer locally before dropping the
709 * connection if local client does not receive it - default is 1MB
710 */
711#ifndef L2CAP_MAX_RX_BUFFER
712#define L2CAP_MAX_RX_BUFFER 0x100000
713#endif
714
715
Srinu Jella895e8522013-12-06 15:25:26 +0530716
717#ifndef HCI_RAW_CMD_INCLUDED
718#define HCI_RAW_CMD_INCLUDED TRUE
719#endif
720
The Android Open Source Project5738f832012-12-12 16:00:35 -0800721/******************************************************************************
722**
723** BLE
724**
725******************************************************************************/
726
Ganesh Ganapathi Batta4af5f3e2013-04-08 08:32:01 -0700727#ifndef BLE_INCLUDED
Ganesh Ganapathi Battaead3cde2013-02-05 15:22:31 -0800728#define BLE_INCLUDED TRUE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800729#endif
730
Srinu Jella0d7fbab2014-12-24 16:02:52 +0530731/*LE_L2CAP_CODE*/
732/*LE Credit Based Flow Control Mode*/
733#if (defined(BLE_INCLUDED) && (BLE_INCLUDED == TRUE))
734#ifndef LE_L2CAP_CFC_INCLUDED
735#define LE_L2CAP_CFC_INCLUDED TRUE
736#endif /*LE_L2CAP_CFC_INCLUDED */
737#endif /* BLE_INCLUDED */
738
Andre Eisenbachb203d472013-11-20 17:23:06 -0800739#ifndef BLE_ANDROID_CONTROLLER_SCAN_FILTER
740#define BLE_ANDROID_CONTROLLER_SCAN_FILTER TRUE
741#endif
742
The Android Open Source Project5738f832012-12-12 16:00:35 -0800743#ifndef LOCAL_BLE_CONTROLLER_ID
744#define LOCAL_BLE_CONTROLLER_ID (1)
745#endif
746
Andre Eisenbach3e0dc732014-10-24 09:55:34 -0700747/*
748 * Toggles support for general LE privacy features such as remote address
749 * resolution, local address rotation etc.
750 */
Ganesh Ganapathi Batta7fa4fba2014-04-16 16:50:09 -0700751#ifndef BLE_PRIVACY_SPT
Chris Manton0aee3312014-06-12 12:52:33 -0700752#define BLE_PRIVACY_SPT TRUE
Zhihai Xu8b35b3f2014-03-11 15:01:45 -0700753#endif
754
Nitin Arorabd46d602016-02-24 18:15:44 -0800755#ifndef BLE_EXTENDED_ADV_SUPPORT
756#define BLE_EXTENDED_ADV_SUPPORT TRUE
757#endif
758
Andre Eisenbach3e0dc732014-10-24 09:55:34 -0700759/*
760 * Enables or disables support for local privacy (ex. address rotation)
761 */
762#ifndef BLE_LOCAL_PRIVACY_ENABLED
763#define BLE_LOCAL_PRIVACY_ENABLED TRUE
764#endif
765
766/*
767 * Toggles support for vendor specific extensions such as RPA offloading,
768 * feature discovery, multi-adv etc.
769 */
Wei Wanged534e32014-05-20 06:30:13 +0000770#ifndef BLE_VND_INCLUDED
Prerepa Viswanadham16fe0822014-08-07 11:38:06 -0700771#define BLE_VND_INCLUDED FALSE
Wei Wanged534e32014-05-20 06:30:13 +0000772#endif
git-zhenye.broadcom.comd77eec92014-08-07 12:50:16 -0700773
774#ifndef BTM_BLE_ADV_TX_POWER
775#define BTM_BLE_ADV_TX_POWER {-21, -15, -7, 1, 9}
776#endif
777
Navin Kocharab996382016-03-09 23:11:53 +0530778/* The maximum number of simultaneous applications that can register with LE L2CAP. */
779#ifndef BLE_MAX_L2CAP_CLIENTS
780#define BLE_MAX_L2CAP_CLIENTS 15
781#endif
git-zhenye.broadcom.comd77eec92014-08-07 12:50:16 -0700782
Satish kumar sugasi76a7b652016-07-28 15:07:33 -0700783#ifndef BLE_HH_QUALIFICATION_ENABLED
784#define BLE_HH_QUALIFICATION_ENABLED FALSE
785#endif
786
787
The Android Open Source Project5738f832012-12-12 16:00:35 -0800788/******************************************************************************
789**
790** ATT/GATT Protocol/Profile Settings
791**
792******************************************************************************/
Mike J. Chen597c5772014-02-11 16:23:31 -0800793#ifndef BTA_GATT_INCLUDED
794#if BLE_INCLUDED == TRUE
795#define BTA_GATT_INCLUDED TRUE
796#else
797#define BTA_GATT_INCLUDED FALSE
798#endif
799#endif
800
801#if BTA_GATT_INCLUDED == TRUE && BLE_INCLUDED == FALSE
802#error "can't have GATT without BLE"
803#endif
804
Ganesh Ganapathi Batta7fa4fba2014-04-16 16:50:09 -0700805#ifndef BLE_LLT_INCLUDED
806#define BLE_LLT_INCLUDED TRUE
807#endif
Chris Mantone97508e2014-09-24 10:27:52 -0700808
The Android Open Source Project5738f832012-12-12 16:00:35 -0800809#ifndef ATT_INCLUDED
Ganesh Ganapathi Battaead3cde2013-02-05 15:22:31 -0800810#define ATT_INCLUDED TRUE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800811#endif
812
813#ifndef ATT_DEBUG
Ganesh Ganapathi Battaead3cde2013-02-05 15:22:31 -0800814#define ATT_DEBUG TRUE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800815#endif
816
Zhihai Xu602162a2014-02-10 10:57:13 -0800817#ifndef BLE_PERIPHERAL_MODE_SUPPORT
Ganesh Ganapathi Batta7fa4fba2014-04-16 16:50:09 -0700818#define BLE_PERIPHERAL_MODE_SUPPORT TRUE
Zhihai Xu602162a2014-02-10 10:57:13 -0800819#endif
820
Zhihai Xu5702d5c2014-03-18 15:27:05 -0700821#ifndef BLE_DELAY_REQUEST_ENC
822/* This flag is to work around IPHONE problem, We need to wait for iPhone ready
823 before send encryption request to iPhone */
824#define BLE_DELAY_REQUEST_ENC FALSE
825#endif
826
Zhihai Xua0cf8d62014-04-05 00:25:20 -0700827#ifndef GAP_TRANSPORT_SUPPORTED
828#define GAP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
829#endif
830
831#ifndef GATTP_TRANSPORT_SUPPORTED
832#define GATTP_TRANSPORT_SUPPORTED GATT_TRANSPORT_LE_BR_EDR
833#endif
834
The Android Open Source Project5738f832012-12-12 16:00:35 -0800835#ifndef GATT_MAX_SR_PROFILES
836#define GATT_MAX_SR_PROFILES 32 /* max is 32 */
837#endif
838
839#ifndef GATT_MAX_APPS
Wei Wang845961f2014-08-06 21:27:16 -0700840#define GATT_MAX_APPS 32 /* note: 2 apps used internally GATT and GAP */
The Android Open Source Project5738f832012-12-12 16:00:35 -0800841#endif
842
The Android Open Source Project5738f832012-12-12 16:00:35 -0800843#ifndef GATT_MAX_PHY_CHANNEL
Satish kumar sugasi70770da2015-08-31 19:10:46 -0700844#ifndef MAX_L2CAP_CHANNELS
Andre Eisenbach8dc42c62013-11-01 14:47:52 -0700845#define GATT_MAX_PHY_CHANNEL 7
Satish kumar sugasi70770da2015-08-31 19:10:46 -0700846#else
847#define GATT_MAX_PHY_CHANNEL MAX_L2CAP_CHANNELS
848#endif
The Android Open Source Project5738f832012-12-12 16:00:35 -0800849#endif
850
851/* Used for conformance testing ONLY */
852#ifndef GATT_CONFORMANCE_TESTING
853#define GATT_CONFORMANCE_TESTING FALSE
854#endif
855
856/* number of background connection device allowence, ideally to be the same as WL size
857*/
858#ifndef GATT_MAX_BG_CONN_DEV
859#define GATT_MAX_BG_CONN_DEV 32
860#endif
861
862/******************************************************************************
863**
864** SMP
865**
866******************************************************************************/
867#ifndef SMP_INCLUDED
Mike J. Chena2c51a72014-02-11 13:50:32 -0800868#if BLE_INCLUDED == TRUE
Ganesh Ganapathi Battaead3cde2013-02-05 15:22:31 -0800869#define SMP_INCLUDED TRUE
Mike J. Chena2c51a72014-02-11 13:50:32 -0800870#else
871#define SMP_INCLUDED FALSE
872#endif
873#endif
874
875#if SMP_INCLUDED == TRUE && BLE_INCLUDED == FALSE
876#error "can't have SMP without BLE"
The Android Open Source Project5738f832012-12-12 16:00:35 -0800877#endif
878
879#ifndef SMP_DEBUG
Andre Eisenbacha7246ca2014-12-09 14:08:58 -0800880#define SMP_DEBUG FALSE
The Android Open Source Project5738f832012-12-12 16:00:35 -0800881#endif
882
883#ifndef SMP_DEFAULT_AUTH_REQ
884#define SMP_DEFAULT_AUTH_REQ SMP_AUTH_NB_ENC_ONLY
885#endif
886
887#ifndef SMP_MAX_ENC_KEY_SIZE
888#define SMP_MAX_ENC_KEY_SIZE 16
889#endif
890
Satya Calloji444a8da2015-03-06 10:38:22 -0800891/* minimum link timeout after SMP pairing is done, leave room for key exchange
892 and racing condition for the following service connection.
893 Prefer greater than 0 second, and no less than default inactivity link idle
894 timer(L2CAP_LINK_INACTIVITY_TOUT) in l2cap) */
895#ifndef SMP_LINK_TOUT_MIN
896#if (L2CAP_LINK_INACTIVITY_TOUT > 0)
897#define SMP_LINK_TOUT_MIN L2CAP_LINK_INACTIVITY_TOUT
898#else
899#define SMP_LINK_TOUT_MIN 2
The Android Open Source Project5738f832012-12-12 16:00:35 -0800900#endif
Satya Calloji444a8da2015-03-06 10:38:22 -0800901#endif
The Android Open Source Project5738f832012-12-12 16:00:35 -0800902/******************************************************************************
903**
904** SDP
905**
906******************************************************************************/
907
908/* This is set to enable SDP server functionality. */
909#ifndef SDP_SERVER_ENABLED
910#define SDP_SERVER_ENABLED TRUE
911#endif
912
913/* The maximum number of SDP records the server can support. */
914#ifndef SDP_MAX_RECORDS
Kim Schulz8372aa52015-03-25 10:39:40 +0100915#define SDP_MAX_RECORDS 30
The Android Open Source Project5738f832012-12-12 16:00:35 -0800916#endif
917
918/* The maximum number of attributes in each record. */
919#ifndef SDP_MAX_REC_ATTR
The Android Open Source Project5738f832012-12-12 16:00:35 -0800920#define SDP_MAX_REC_ATTR 25
The Android Open Source Project5738f832012-12-12 16:00:35 -0800921#endif
922
923#ifndef SDP_MAX_PAD_LEN
924#define SDP_MAX_PAD_LEN 600
925#endif
926
927/* The maximum length, in bytes, of an attribute. */
928#ifndef SDP_MAX_ATTR_LEN
The Android Open Source Project5738f832012-12-12 16:00:35 -0800929#define SDP_MAX_ATTR_LEN 400
930#endif
931
932/* The maximum number of attribute filters supported by SDP databases. */
933#ifndef SDP_MAX_ATTR_FILTERS
934#define SDP_MAX_ATTR_FILTERS 15
935#endif
936
937/* The maximum number of UUID filters supported by SDP databases. */
938#ifndef SDP_MAX_UUID_FILTERS
939#define SDP_MAX_UUID_FILTERS 3
940#endif
941
942/* This is set to enable SDP client functionality. */
943#ifndef SDP_CLIENT_ENABLED
944#define SDP_CLIENT_ENABLED TRUE
945#endif
946
947/* The maximum number of record handles retrieved in a search. */
948#ifndef SDP_MAX_DISC_SERVER_RECS
949#define SDP_MAX_DISC_SERVER_RECS 21
950#endif
951
952/* The size of a scratchpad buffer, in bytes, for storing the response to an attribute request. */
953#ifndef SDP_MAX_LIST_BYTE_COUNT
954#define SDP_MAX_LIST_BYTE_COUNT 4096
955#endif
956
957/* The maximum number of parameters in an SDP protocol element. */
958#ifndef SDP_MAX_PROTOCOL_PARAMS
959#define SDP_MAX_PROTOCOL_PARAMS 2
960#endif
961
962/* The maximum number of simultaneous client and server connections. */
963#ifndef SDP_MAX_CONNECTIONS
964#define SDP_MAX_CONNECTIONS 4
965#endif
966
967/* The MTU size for the L2CAP configuration. */
968#ifndef SDP_MTU_SIZE
Matthew Xief8d46a62014-01-15 21:49:32 -0800969#define SDP_MTU_SIZE 672
The Android Open Source Project5738f832012-12-12 16:00:35 -0800970#endif
971
972/* The flush timeout for the L2CAP configuration. */
973#ifndef SDP_FLUSH_TO
974#define SDP_FLUSH_TO 0xFFFF
975#endif
976
977/* The name for security authorization. */
978#ifndef SDP_SERVICE_NAME
979#define SDP_SERVICE_NAME "Service Discovery"
980#endif
981
982/* The security level for BTM. */
983#ifndef SDP_SECURITY_LEVEL
984#define SDP_SECURITY_LEVEL BTM_SEC_NONE
985#endif
986
The Android Open Source Project5738f832012-12-12 16:00:35 -0800987/******************************************************************************
988**
989** RFCOMM
990**
991******************************************************************************/
992
The Android Open Source Project5738f832012-12-12 16:00:35 -0800993/* The maximum number of ports supported. */
994#ifndef MAX_RFC_PORTS
995#define MAX_RFC_PORTS 30
996#endif
997
998/* The maximum simultaneous links to different devices. */
999#ifndef MAX_ACL_CONNECTIONS
1000#define MAX_BD_CONNECTIONS 7
1001#else
1002#define MAX_BD_CONNECTIONS MAX_ACL_CONNECTIONS
1003#endif
1004
1005/* The port receive queue low watermark level, in bytes. */
1006#ifndef PORT_RX_LOW_WM
1007#define PORT_RX_LOW_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_LOW_WM)
1008#endif
1009
1010/* The port receive queue high watermark level, in bytes. */
1011#ifndef PORT_RX_HIGH_WM
1012#define PORT_RX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_HIGH_WM)
1013#endif
1014
1015/* The port receive queue critical watermark level, in bytes. */
1016#ifndef PORT_RX_CRITICAL_WM
1017#define PORT_RX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_RX_BUF_CRITICAL_WM)
1018#endif
1019
1020/* The port receive queue low watermark level, in number of buffers. */
1021#ifndef PORT_RX_BUF_LOW_WM
1022#define PORT_RX_BUF_LOW_WM 4
1023#endif
1024
1025/* The port receive queue high watermark level, in number of buffers. */
1026#ifndef PORT_RX_BUF_HIGH_WM
1027#define PORT_RX_BUF_HIGH_WM 10
1028#endif
1029
1030/* The port receive queue critical watermark level, in number of buffers. */
1031#ifndef PORT_RX_BUF_CRITICAL_WM
1032#define PORT_RX_BUF_CRITICAL_WM 15
1033#endif
1034
1035/* The port transmit queue high watermark level, in bytes. */
1036#ifndef PORT_TX_HIGH_WM
1037#define PORT_TX_HIGH_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_HIGH_WM)
1038#endif
1039
1040/* The port transmit queue critical watermark level, in bytes. */
1041#ifndef PORT_TX_CRITICAL_WM
1042#define PORT_TX_CRITICAL_WM (BTA_RFC_MTU_SIZE * PORT_TX_BUF_CRITICAL_WM)
1043#endif
1044
1045/* The port transmit queue high watermark level, in number of buffers. */
1046#ifndef PORT_TX_BUF_HIGH_WM
1047#define PORT_TX_BUF_HIGH_WM 10
1048#endif
1049
1050/* The port transmit queue high watermark level, in number of buffers. */
1051#ifndef PORT_TX_BUF_CRITICAL_WM
1052#define PORT_TX_BUF_CRITICAL_WM 15
1053#endif
1054
1055/* The RFCOMM multiplexer preferred flow control mechanism. */
1056#ifndef PORT_FC_DEFAULT
1057#define PORT_FC_DEFAULT PORT_FC_CREDIT
1058#endif
1059
1060/* The maximum number of credits receiver sends to peer when using credit-based flow control. */
1061#ifndef PORT_CREDIT_RX_MAX
1062#define PORT_CREDIT_RX_MAX 16
1063#endif
1064
1065/* The credit low watermark level. */
1066#ifndef PORT_CREDIT_RX_LOW
1067#define PORT_CREDIT_RX_LOW 8
1068#endif
1069
The Android Open Source Project5738f832012-12-12 16:00:35 -08001070/******************************************************************************
1071**
Kim Schulz8372aa52015-03-25 10:39:40 +01001072** OBEX
1073**
1074******************************************************************************/
Casper Bonded2327212015-04-13 21:58:56 +02001075
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001076/*
1077 * Buffer size to reassemble the SDU.
1078 * It will allow buffers to be used that are larger than the L2CAP_MAX_MTU.
1079 */
1080#ifndef OBX_USER_RX_BUF_SIZE
1081#define OBX_USER_RX_BUF_SIZE OBX_LRG_DATA_BUF_SIZE
Kim Schulz8372aa52015-03-25 10:39:40 +01001082#endif
1083
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001084/*
1085 * Buffer size to hold the SDU.
1086 * It will allow buffers to be used that are larger than the L2CAP_MAX_MTU.
1087 */
1088#ifndef OBX_USER_TX_BUF_SIZE
1089#define OBX_USER_TX_BUF_SIZE OBX_LRG_DATA_BUF_SIZE
Kim Schulz8372aa52015-03-25 10:39:40 +01001090#endif
1091
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001092/* Buffer size used to hold MPS segments during SDU reassembly. */
1093#ifndef OBX_FCR_RX_BUF_SIZE
1094#define OBX_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
Kim Schulz8372aa52015-03-25 10:39:40 +01001095#endif
1096
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001097/*
1098 * Buffer size used to hold MPS segments used in (re)transmissions.
1099 * The size of each buffer must be able to hold the maximum MPS segment size
1100 * passed in L2CA_SetFCROptions plus BT_HDR (8) + HCI preamble (4) +
1101 * L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1102 */
1103#ifndef OBX_FCR_TX_BUF_SIZE
1104#define OBX_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
Kim Schulz8372aa52015-03-25 10:39:40 +01001105#endif
1106
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001107/*
1108 * Size of the transmission window when using enhanced retransmission mode.
1109 * Not used in basic and streaming modes. Range: 1 - 63
1110 */
Kim Schulz8372aa52015-03-25 10:39:40 +01001111#ifndef OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR
1112#define OBX_FCR_OPT_TX_WINDOW_SIZE_BR_EDR 20
1113#endif
1114
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001115/*
1116 * Number of transmission attempts for a single I-Frame before taking
1117 * Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1118 * Streaming modes.
1119 * Range: 0, 1-0xFF
1120 * 0 - infinite retransmissions
1121 * 1 - single transmission
1122 */
Kim Schulz8372aa52015-03-25 10:39:40 +01001123#ifndef OBX_FCR_OPT_MAX_TX_B4_DISCNT
1124#define OBX_FCR_OPT_MAX_TX_B4_DISCNT 20
1125#endif
1126
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001127/*
1128 * Retransmission Timeout
1129 * Range: Minimum 2000 (2 secs) on BR/EDR when supporting PBF.
Kim Schulz8372aa52015-03-25 10:39:40 +01001130 */
1131#ifndef OBX_FCR_OPT_RETX_TOUT
1132#define OBX_FCR_OPT_RETX_TOUT 2000
1133#endif
1134
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001135/*
1136 * Monitor Timeout
1137 * Range: Minimum 12000 (12 secs) on BR/EDR when supporting PBF.
1138 */
Kim Schulz8372aa52015-03-25 10:39:40 +01001139#ifndef OBX_FCR_OPT_MONITOR_TOUT
1140#define OBX_FCR_OPT_MONITOR_TOUT 12000
1141#endif
1142
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001143/*
1144 * Maximum PDU payload size.
1145 * Suggestion: The maximum amount of data that will fit into a 3-DH5 packet.
1146 * Range: 2 octets
1147 */
Kim Schulz8372aa52015-03-25 10:39:40 +01001148#ifndef OBX_FCR_OPT_MAX_PDU_SIZE
1149#define OBX_FCR_OPT_MAX_PDU_SIZE L2CAP_MPS_OVER_BR_EDR
1150#endif
1151
1152
1153/******************************************************************************
1154**
The Android Open Source Project5738f832012-12-12 16:00:35 -08001155** BNEP
1156**
1157******************************************************************************/
1158
1159#ifndef BNEP_INCLUDED
1160#define BNEP_INCLUDED TRUE
1161#endif
1162
The Android Open Source Project5738f832012-12-12 16:00:35 -08001163/* BNEP status API call is used mainly to get the L2CAP handle */
1164#ifndef BNEP_SUPPORTS_STATUS_API
1165#define BNEP_SUPPORTS_STATUS_API TRUE
1166#endif
1167
The Android Open Source Project5738f832012-12-12 16:00:35 -08001168/*
1169** When BNEP connection changes roles after the connection is established
1170** we will do an authentication check again on the new role
1171*/
1172#ifndef BNEP_DO_AUTH_FOR_ROLE_SWITCH
1173#define BNEP_DO_AUTH_FOR_ROLE_SWITCH TRUE
1174#endif
1175
1176
1177/* Maximum number of protocol filters supported. */
1178#ifndef BNEP_MAX_PROT_FILTERS
1179#define BNEP_MAX_PROT_FILTERS 5
1180#endif
1181
1182/* Maximum number of multicast filters supported. */
1183#ifndef BNEP_MAX_MULTI_FILTERS
1184#define BNEP_MAX_MULTI_FILTERS 5
1185#endif
1186
1187/* Minimum MTU size. */
1188#ifndef BNEP_MIN_MTU_SIZE
1189#define BNEP_MIN_MTU_SIZE L2CAP_MTU_SIZE
1190#endif
1191
1192/* Preferred MTU size. */
1193#ifndef BNEP_MTU_SIZE
1194#define BNEP_MTU_SIZE BNEP_MIN_MTU_SIZE
1195#endif
1196
The Android Open Source Project5738f832012-12-12 16:00:35 -08001197/* Maximum number of buffers allowed in transmit data queue. */
1198#ifndef BNEP_MAX_XMITQ_DEPTH
1199#define BNEP_MAX_XMITQ_DEPTH 20
1200#endif
1201
1202/* Maximum number BNEP of connections supported. */
1203#ifndef BNEP_MAX_CONNECTIONS
1204#define BNEP_MAX_CONNECTIONS 7
1205#endif
1206
1207
1208/******************************************************************************
1209**
1210** AVDTP
1211**
1212******************************************************************************/
1213
1214#ifndef AVDT_INCLUDED
1215#define AVDT_INCLUDED TRUE
1216#endif
1217
1218/* Include reporting capability in AVDTP */
1219#ifndef AVDT_REPORTING
1220#define AVDT_REPORTING TRUE
1221#endif
1222
1223/* Include multiplexing capability in AVDTP */
1224#ifndef AVDT_MULTIPLEXING
1225#define AVDT_MULTIPLEXING TRUE
1226#endif
1227
1228/* Number of simultaneous links to different peer devices. */
1229#ifndef AVDT_NUM_LINKS
1230#define AVDT_NUM_LINKS 2
1231#endif
1232
Ayan Ghosh723e89f2014-08-25 18:17:48 +05301233/* Number of simultaneous stream endpoints.
1234 * Audio*2 + Video*2 + 1 Additional
1235 */
The Android Open Source Project5738f832012-12-12 16:00:35 -08001236#ifndef AVDT_NUM_SEPS
Bhakthavatsala Raghavendra79f4e572016-07-29 19:11:28 -07001237#if defined(AAC_ENCODER_INCLUDED) && (AAC_ENCODER_INCLUDED == TRUE)
Umesh Vats2c2dcd32016-09-02 14:19:08 -07001238#define AVDT_NUM_SEPS 9
Bhakthavatsala Raghavendra79f4e572016-07-29 19:11:28 -07001239#else
Umesh Vats2c2dcd32016-09-02 14:19:08 -07001240#define AVDT_NUM_SEPS 7
The Android Open Source Project5738f832012-12-12 16:00:35 -08001241#endif
Bhakthavatsala Raghavendra79f4e572016-07-29 19:11:28 -07001242#endif
The Android Open Source Project5738f832012-12-12 16:00:35 -08001243
Pavlin Radoslavov5712c442016-02-18 20:51:58 -08001244/* Number of transport channels setup by AVDT for all media streams */
The Android Open Source Project5738f832012-12-12 16:00:35 -08001245#ifndef AVDT_NUM_TC_TBL
1246#define AVDT_NUM_TC_TBL 6
1247#endif
1248
The Android Open Source Project5738f832012-12-12 16:00:35 -08001249/* Maximum size in bytes of the codec capabilities information element. */
1250#ifndef AVDT_CODEC_SIZE
Umesh Vatsc3e724b2016-06-21 14:07:49 -07001251#define AVDT_CODEC_SIZE 20
The Android Open Source Project5738f832012-12-12 16:00:35 -08001252#endif
1253
1254/* Maximum size in bytes of the content protection information element. */
1255#ifndef AVDT_PROTECT_SIZE
1256#define AVDT_PROTECT_SIZE 90
1257#endif
1258
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001259/* Maximum number of buffers in the fragment queue (for video frames). */
The Android Open Source Project5738f832012-12-12 16:00:35 -08001260#ifndef AVDT_MAX_FRAG_COUNT
1261#define AVDT_MAX_FRAG_COUNT 15
1262#endif
1263
1264/******************************************************************************
1265**
1266** PAN
1267**
1268******************************************************************************/
1269
1270#ifndef PAN_INCLUDED
1271#define PAN_INCLUDED TRUE
1272#endif
1273
1274/* This will enable the PANU role */
1275#ifndef PAN_SUPPORTS_ROLE_PANU
1276#define PAN_SUPPORTS_ROLE_PANU TRUE
1277#endif
1278
1279/* This will enable the GN role */
1280#ifndef PAN_SUPPORTS_ROLE_GN
1281#define PAN_SUPPORTS_ROLE_GN TRUE
1282#endif
1283
1284/* This will enable the NAP role */
1285#ifndef PAN_SUPPORTS_ROLE_NAP
1286#define PAN_SUPPORTS_ROLE_NAP TRUE
1287#endif
1288
1289/* This is just for debugging purposes */
1290#ifndef PAN_SUPPORTS_DEBUG_DUMP
1291#define PAN_SUPPORTS_DEBUG_DUMP TRUE
1292#endif
1293
The Android Open Source Project5738f832012-12-12 16:00:35 -08001294/* Maximum number of PAN connections allowed */
1295#ifndef MAX_PAN_CONNS
1296#define MAX_PAN_CONNS 7
1297#endif
1298
1299/* Default service name for NAP role */
1300#ifndef PAN_NAP_DEFAULT_SERVICE_NAME
1301#define PAN_NAP_DEFAULT_SERVICE_NAME "Network Access Point Service"
1302#endif
1303
1304/* Default service name for GN role */
1305#ifndef PAN_GN_DEFAULT_SERVICE_NAME
1306#define PAN_GN_DEFAULT_SERVICE_NAME "Group Network Service"
1307#endif
1308
1309/* Default service name for PANU role */
1310#ifndef PAN_PANU_DEFAULT_SERVICE_NAME
1311#define PAN_PANU_DEFAULT_SERVICE_NAME "PAN User Service"
1312#endif
1313
1314/* Default description for NAP role service */
1315#ifndef PAN_NAP_DEFAULT_DESCRIPTION
1316#define PAN_NAP_DEFAULT_DESCRIPTION "NAP"
1317#endif
1318
1319/* Default description for GN role service */
1320#ifndef PAN_GN_DEFAULT_DESCRIPTION
1321#define PAN_GN_DEFAULT_DESCRIPTION "GN"
1322#endif
1323
1324/* Default description for PANU role service */
1325#ifndef PAN_PANU_DEFAULT_DESCRIPTION
1326#define PAN_PANU_DEFAULT_DESCRIPTION "PANU"
1327#endif
1328
1329/* Default Security level for PANU role. */
1330#ifndef PAN_PANU_SECURITY_LEVEL
1331#define PAN_PANU_SECURITY_LEVEL 0
1332#endif
1333
1334/* Default Security level for GN role. */
1335#ifndef PAN_GN_SECURITY_LEVEL
1336#define PAN_GN_SECURITY_LEVEL 0
1337#endif
1338
1339/* Default Security level for NAP role. */
1340#ifndef PAN_NAP_SECURITY_LEVEL
1341#define PAN_NAP_SECURITY_LEVEL 0
1342#endif
1343
The Android Open Source Project5738f832012-12-12 16:00:35 -08001344/******************************************************************************
1345**
1346** GAP
1347**
1348******************************************************************************/
1349
Kim Schulz8372aa52015-03-25 10:39:40 +01001350#ifndef GAP_INCLUDED
1351#define GAP_INCLUDED TRUE
1352#endif
1353
1354/* This is set to enable use of GAP L2CAP connections. */
1355#ifndef GAP_CONN_INCLUDED
1356#define GAP_CONN_INCLUDED TRUE
1357#endif
1358
1359/* This is set to enable posting event for data write */
1360#ifndef GAP_CONN_POST_EVT_INCLUDED
1361#define GAP_CONN_POST_EVT_INCLUDED FALSE
1362#endif
1363
1364/* The maximum number of simultaneous GAP L2CAP connections. */
1365#ifndef GAP_MAX_CONNECTIONS
1366#define GAP_MAX_CONNECTIONS 30
1367#endif
1368
The Android Open Source Project5738f832012-12-12 16:00:35 -08001369/* keep the raw data received from SDP server in database. */
1370#ifndef SDP_RAW_DATA_INCLUDED
1371#define SDP_RAW_DATA_INCLUDED TRUE
1372#endif
1373
The Android Open Source Project5738f832012-12-12 16:00:35 -08001374/* Inquiry duration in 1.28 second units. */
1375#ifndef SDP_DEBUG
1376#define SDP_DEBUG TRUE
1377#endif
1378
1379/******************************************************************************
1380**
The Android Open Source Project5738f832012-12-12 16:00:35 -08001381** HID
1382**
1383******************************************************************************/
1384
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -07001385#ifndef HID_CONTROL_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001386#define HID_CONTROL_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
The Android Open Source Project5738f832012-12-12 16:00:35 -08001387#endif
1388
Pavlin Radoslavov2e3d0062015-09-18 10:51:31 -07001389#ifndef HID_INTERRUPT_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001390#define HID_INTERRUPT_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
The Android Open Source Project5738f832012-12-12 16:00:35 -08001391#endif
1392
1393/*************************************************************************
1394** Definitions for Both HID-Host & Device
1395*/
1396#ifndef HID_MAX_SVC_NAME_LEN
1397#define HID_MAX_SVC_NAME_LEN 32
1398#endif
1399
1400#ifndef HID_MAX_SVC_DESCR_LEN
1401#define HID_MAX_SVC_DESCR_LEN 32
1402#endif
1403
1404#ifndef HID_MAX_PROV_NAME_LEN
1405#define HID_MAX_PROV_NAME_LEN 32
1406#endif
1407
1408/*************************************************************************
1409** Definitions for HID-Host
1410*/
1411#ifndef HID_HOST_INCLUDED
1412#define HID_HOST_INCLUDED TRUE
1413#endif
1414
1415#ifndef HID_HOST_MAX_DEVICES
Satish kumar sugasi70770da2015-08-31 19:10:46 -07001416#ifndef MAX_L2CAP_CHANNELS
The Android Open Source Project5738f832012-12-12 16:00:35 -08001417#define HID_HOST_MAX_DEVICES 7
Satish kumar sugasi70770da2015-08-31 19:10:46 -07001418#else
1419#define HID_HOST_MAX_DEVICES MAX_L2CAP_CHANNELS
1420#endif
The Android Open Source Project5738f832012-12-12 16:00:35 -08001421#endif
1422
1423#ifndef HID_HOST_MTU
1424#define HID_HOST_MTU 640
1425#endif
1426
1427#ifndef HID_HOST_FLUSH_TO
1428#define HID_HOST_FLUSH_TO 0xffff
1429#endif
1430
1431#ifndef HID_HOST_MAX_CONN_RETRY
Hemant Guptafb285162016-03-04 22:49:55 +05301432#define HID_HOST_MAX_CONN_RETRY (1)
The Android Open Source Project5738f832012-12-12 16:00:35 -08001433#endif
1434
1435#ifndef HID_HOST_REPAGE_WIN
1436#define HID_HOST_REPAGE_WIN (2)
1437#endif
1438
The Android Open Source Project5738f832012-12-12 16:00:35 -08001439/*************************************************************************
1440 * A2DP Definitions
1441 */
1442#ifndef A2D_INCLUDED
1443#define A2D_INCLUDED TRUE
1444#endif
1445
Bhakthavatsala Raghavendra79f4e572016-07-29 19:11:28 -07001446#ifndef A2D_M24_INCLUDED
1447#define A2D_M24_INCLUDED A2D_INCLUDED
1448#endif
1449
The Android Open Source Project5738f832012-12-12 16:00:35 -08001450/******************************************************************************
1451**
1452** AVCTP
1453**
1454******************************************************************************/
1455
The Android Open Source Project5738f832012-12-12 16:00:35 -08001456/* Number of simultaneous ACL links to different peer devices. */
1457#ifndef AVCT_NUM_LINKS
1458#define AVCT_NUM_LINKS 2
1459#endif
1460
Ayan Ghosh723e89f2014-08-25 18:17:48 +05301461/* Number of simultaneous AVCTP connections.
1462 * Audio*2 + Video*2 + 1 Additional */
The Android Open Source Project5738f832012-12-12 16:00:35 -08001463#ifndef AVCT_NUM_CONN
Ayan Ghosh723e89f2014-08-25 18:17:48 +05301464#define AVCT_NUM_CONN 5
1465#endif
1466
1467/* Buffer size to reassemble the SDU. */
1468#ifndef AVCT_BR_USER_RX_BUF_SIZE
1469#define AVCT_BR_USER_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1470#endif
1471
1472/* Buffer size to hold the SDU. */
1473#ifndef AVCT_BR_USER_TX_BUF_SIZE
1474#define AVCT_BR_USER_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1475#endif
1476
1477/*
1478 * Buffer size used to hold MPS segments during SDU reassembly
1479 */
1480#ifndef AVCT_BR_FCR_RX_BUF_SIZE
1481#define AVCT_BR_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
1482#endif
1483
1484/*
1485 * Default buffer size used to hold MPS segments used in (re)transmissions.
1486 * The size of each buffer must be able to hold the maximum MPS segment size
1487 * passed in tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) +
1488 * L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).+1452 */
1489#ifndef AVCT_BR_FCR_TX_BUF_SIZE
1490#define AVCT_BR_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
The Android Open Source Project5738f832012-12-12 16:00:35 -08001491#endif
1492
The Android Open Source Project5738f832012-12-12 16:00:35 -08001493/******************************************************************************
1494**
1495** AVRCP
1496**
1497******************************************************************************/
1498
Ravi Nagarajan9adddf42013-03-06 05:29:48 -08001499#ifndef AVRC_METADATA_INCLUDED
1500#define AVRC_METADATA_INCLUDED TRUE
1501#endif
1502
Satya Calloji247c68f2013-08-01 02:14:43 -07001503#ifndef AVRC_ADV_CTRL_INCLUDED
1504#define AVRC_ADV_CTRL_INCLUDED TRUE
1505#endif
1506
Mike Lockwood93912472014-06-26 11:08:24 -07001507#ifndef AVRC_CTLR_INCLUDED
1508#define AVRC_CTLR_INCLUDED TRUE
1509#endif
1510
Hemant Guptae05365a2015-08-24 16:51:38 +05301511#ifndef SDP_AVRCP_1_6
1512#define SDP_AVRCP_1_6 TRUE
1513#endif
Ayan Ghoshb4198f82014-07-25 17:51:32 +05301514
Hemant Guptae05365a2015-08-24 16:51:38 +05301515#ifndef SDP_AVRCP_1_5
1516#define SDP_AVRCP_1_5 FALSE
1517#endif
1518
1519#if (defined(SDP_AVRCP_1_6) && (SDP_AVRCP_1_6 == TRUE))
1520#ifndef AVCT_COVER_ART_INCLUDED
1521#define AVCT_COVER_ART_INCLUDED TRUE
1522#endif
1523#endif
1524
1525#if ((defined(SDP_AVRCP_1_6) && (SDP_AVRCP_1_6 == TRUE)) || \
1526 (defined(SDP_AVRCP_1_5) && (SDP_AVRCP_1_5 == TRUE)))
Ayan Ghoshb4198f82014-07-25 17:51:32 +05301527#ifndef AVCT_BROWSE_INCLUDED
1528#define AVCT_BROWSE_INCLUDED TRUE
1529#else
1530#ifndef AVCT_BROWSE_INCLUDED
1531#define AVCT_BROWSE_INCLUDED FALSE
1532#endif
1533#endif
1534#endif
The Android Open Source Project5738f832012-12-12 16:00:35 -08001535/******************************************************************************
1536**
1537** MCAP
1538**
1539******************************************************************************/
1540#ifndef MCA_INCLUDED
1541#define MCA_INCLUDED FALSE
1542#endif
1543
The Android Open Source Project5738f832012-12-12 16:00:35 -08001544/* The MTU size for the L2CAP configuration on control channel. 48 is the minimal */
1545#ifndef MCA_CTRL_MTU
1546#define MCA_CTRL_MTU 60
1547#endif
1548
Ayan Ghosh723e89f2014-08-25 18:17:48 +05301549
The Android Open Source Project5738f832012-12-12 16:00:35 -08001550/* The maximum number of registered MCAP instances. */
1551#ifndef MCA_NUM_REGS
Priti Agheraf8f30c22013-04-02 15:31:19 -07001552#define MCA_NUM_REGS 12
The Android Open Source Project5738f832012-12-12 16:00:35 -08001553#endif
1554
1555/* The maximum number of control channels (to difference devices) per registered MCAP instances. */
1556#ifndef MCA_NUM_LINKS
1557#define MCA_NUM_LINKS 3
1558#endif
1559
1560/* The maximum number of MDEP (including HDP echo) per registered MCAP instances. */
1561#ifndef MCA_NUM_DEPS
Priti Agheraf8f30c22013-04-02 15:31:19 -07001562#define MCA_NUM_DEPS 13
The Android Open Source Project5738f832012-12-12 16:00:35 -08001563#endif
1564
1565/* The maximum number of MDL link per control channel. */
1566#ifndef MCA_NUM_MDLS
1567#define MCA_NUM_MDLS 4
1568#endif
1569
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001570/* Buffer size to reassemble the SDU. */
Pavlin Radoslavov1d5b8592015-09-23 10:08:20 -07001571#ifndef MCA_USER_RX_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001572#define MCA_USER_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
Pavlin Radoslavov1d5b8592015-09-23 10:08:20 -07001573#endif
1574
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001575/* Buffer size to hold the SDU. */
Pavlin Radoslavov1d5b8592015-09-23 10:08:20 -07001576#ifndef MCA_USER_TX_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001577#define MCA_USER_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
Pavlin Radoslavov1d5b8592015-09-23 10:08:20 -07001578#endif
1579
The Android Open Source Project5738f832012-12-12 16:00:35 -08001580/*
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001581 * Buffer size used to hold MPS segments during SDU reassembly
1582 */
Pavlin Radoslavov1d5b8592015-09-23 10:08:20 -07001583#ifndef MCA_FCR_RX_BUF_SIZE
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001584#define MCA_FCR_RX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
Pavlin Radoslavov1d5b8592015-09-23 10:08:20 -07001585#endif
1586
The Android Open Source Project5738f832012-12-12 16:00:35 -08001587/*
Pavlin Radoslavov70ae7de2015-09-23 14:49:24 -07001588 * Default buffer size used to hold MPS segments used in (re)transmissions.
1589 * The size of each buffer must be able to hold the maximum MPS segment size
1590 * passed in tL2CAP_FCR_OPTIONS plus BT_HDR (8) + HCI preamble (4) +
1591 * L2CAP_MIN_OFFSET (11 - as of BT 2.1 + EDR Spec).
1592 */
1593#ifndef MCA_FCR_TX_BUF_SIZE
1594#define MCA_FCR_TX_BUF_SIZE BT_DEFAULT_BUFFER_SIZE
The Android Open Source Project5738f832012-12-12 16:00:35 -08001595#endif
1596
1597/* MCAP control channel FCR Option:
1598Size of the transmission window when using enhanced retransmission mode.
15991 is defined by HDP specification for control channel.
1600*/
1601#ifndef MCA_FCR_OPT_TX_WINDOW_SIZE
1602#define MCA_FCR_OPT_TX_WINDOW_SIZE 1
1603#endif
1604
1605/* MCAP control channel FCR Option:
1606Number of transmission attempts for a single I-Frame before taking
1607Down the connection. Used In ERTM mode only. Value is Ignored in basic and
1608Streaming modes.
1609Range: 0, 1-0xFF
16100 - infinite retransmissions
16111 - single transmission
1612*/
1613#ifndef MCA_FCR_OPT_MAX_TX_B4_DISCNT
1614#define MCA_FCR_OPT_MAX_TX_B4_DISCNT 20
1615#endif
1616
1617/* MCAP control channel FCR Option: Retransmission Timeout
1618The AVRCP specification set a value in the range of 300 - 2000 ms
1619Timeout (in msecs) to detect Lost I-Frames. Only used in Enhanced retransmission mode.
1620Range: Minimum 2000 (2 secs) when supporting PBF.
1621 */
1622#ifndef MCA_FCR_OPT_RETX_TOUT
1623#define MCA_FCR_OPT_RETX_TOUT 2000
1624#endif
1625
1626/* MCAP control channel FCR Option: Monitor Timeout
1627The AVRCP specification set a value in the range of 300 - 2000 ms
1628Timeout (in msecs) to detect Lost S-Frames. Only used in Enhanced retransmission mode.
1629Range: Minimum 12000 (12 secs) when supporting PBF.
1630*/
1631#ifndef MCA_FCR_OPT_MONITOR_TOUT
1632#define MCA_FCR_OPT_MONITOR_TOUT 12000
1633#endif
1634
1635/* MCAP control channel FCR Option: Maximum PDU payload size.
1636The maximum number of payload octets that the local device can receive in a single PDU.
1637*/
1638#ifndef MCA_FCR_OPT_MPS_SIZE
1639#define MCA_FCR_OPT_MPS_SIZE 1000
1640#endif
1641
Matadeen Mishra72153522016-05-11 21:16:09 -07001642/* Enable this flag if require ,default value is false */
1643#ifndef MCA_DELAY_DELETE_MDL_RSP
1644#define MCA_DELAY_DELETE_MDL_RSP FALSE
1645#endif
1646
The Android Open Source Project5738f832012-12-12 16:00:35 -08001647/******************************************************************************
1648**
The Android Open Source Project5738f832012-12-12 16:00:35 -08001649** Sleep Mode (Low Power Mode)
1650**
1651******************************************************************************/
1652
1653#ifndef HCILP_INCLUDED
1654#define HCILP_INCLUDED TRUE
1655#endif
1656
1657/******************************************************************************
1658**
The Android Open Source Project5738f832012-12-12 16:00:35 -08001659** BTA
1660**
1661******************************************************************************/
1662/* BTA EIR canned UUID list (default is dynamic) */
1663#ifndef BTA_EIR_CANNED_UUID_LIST
1664#define BTA_EIR_CANNED_UUID_LIST FALSE
1665#endif
1666
1667/* Number of supported customer UUID in EIR */
1668#ifndef BTA_EIR_SERVER_NUM_CUSTOM_UUID
1669#define BTA_EIR_SERVER_NUM_CUSTOM_UUID 8
1670#endif
1671
Andre Eisenbachb7a077b2015-10-29 11:18:20 -07001672/* CHLD override */
The Android Open Source Project5738f832012-12-12 16:00:35 -08001673#ifndef BTA_AG_CHLD_VAL_ECC
1674#define BTA_AG_CHLD_VAL_ECC "(0,1,1x,2,2x,3)"
1675#endif
1676
1677#ifndef BTA_AG_CHLD_VAL
1678#define BTA_AG_CHLD_VAL "(0,1,2,3)"
1679#endif
1680
1681/* Set the CIND to match HFP 1.5 */
1682#ifndef BTA_AG_CIND_INFO
1683#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))"
1684#endif
1685
Mattias Agren9647e912013-04-08 12:23:42 +02001686#ifndef BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY
1687#define BTA_DM_AVOID_A2DP_ROLESWITCH_ON_INQUIRY TRUE
1688#endif
The Android Open Source Project5738f832012-12-12 16:00:35 -08001689
1690/******************************************************************************
1691**
The Android Open Source Project5738f832012-12-12 16:00:35 -08001692** Tracing: Include trace header file here.
1693**
1694******************************************************************************/
1695
Andre Eisenbach1bd76052014-12-05 09:40:20 -08001696/* Enable/disable BTSnoop memory logging */
1697#ifndef BTSNOOP_MEM
1698#define BTSNOOP_MEM TRUE
1699#endif
1700
The Android Open Source Project5738f832012-12-12 16:00:35 -08001701#include "bt_trace.h"
1702
Jacky Cheung0cb0e932016-10-19 14:59:06 -07001703/******************************************************************************
1704**
1705** Wear
1706**
1707******************************************************************************/
1708
1709/* Enable/disable LE IO capability overriding to no-input-no-output on first bond */
1710#ifndef WEAR_LE_IO_CAP_OVERRIDE
1711#define WEAR_LE_IO_CAP_OVERRIDE FALSE
1712#endif
1713
The Android Open Source Project5738f832012-12-12 16:00:35 -08001714#endif /* BT_TARGET_H */