1 /****************************************************************************** 2 * 3 * Copyright (C) 2014 The Android Open Source Project 4 * Copyright (C) 2004-2012 Broadcom Corporation 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at: 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 * 18 ******************************************************************************/ 19 20 /****************************************************************************** 21 * 22 * This file contains compile-time configurable constants for advanced 23 * audio 24 * 25 ******************************************************************************/ 26 27 #include "osi/allocator.h" 28 #include "bta/bta_api.h" 29 #include "bta/bta_jv_api.h" 30 #include "common/bt_target.h" 31 32 #if (defined BTA_JV_INCLUDED && BTA_JV_INCLUDED == TRUE) 33 #ifndef BTA_JV_SDP_DB_SIZE 34 #define BTA_JV_SDP_DB_SIZE 4500 35 #endif 36 37 #ifndef BTA_JV_SDP_RAW_DATA_SIZE 38 #define BTA_JV_SDP_RAW_DATA_SIZE 1800 39 #endif 40 41 /* The platform may choose to use dynamic memory for these data buffers. 42 * p_bta_jv_cfg->p_sdp_db must be allocated/stay allocated 43 * between BTA_JvEnable and BTA_JvDisable 44 * p_bta_jv_cfg->p_sdp_raw_data can be allocated before calling BTA_JvStartDiscovery 45 * it can be de-allocated after the last call to access the database */ 46 #if BTA_DYNAMIC_MEMORY == FALSE 47 static UINT8 bta_jv_sdp_raw_data[BTA_JV_SDP_RAW_DATA_SIZE]; 48 static UINT8 __attribute__ ((aligned(4))) bta_jv_sdp_db_data[BTA_JV_SDP_DB_SIZE]; 49 #endif 50 51 /* JV configuration structure */ 52 /*const */tBTA_JV_CFG bta_jv_cfg = { 53 BTA_JV_SDP_RAW_DATA_SIZE, /* The size of p_sdp_raw_data */ 54 BTA_JV_SDP_DB_SIZE, /* The size of p_sdp_db_data */ 55 #if BTA_DYNAMIC_MEMORY == FALSE 56 bta_jv_sdp_raw_data, /* The data buffer to keep raw data */ 57 (tSDP_DISCOVERY_DB *)bta_jv_sdp_db_data /* The data buffer to keep SDP database */ 58 #else 59 NULL, 60 NULL 61 #endif 62 }; 63 64 tBTA_JV_CFG *p_bta_jv_cfg = (tBTA_JV_CFG *) &bta_jv_cfg; 65 66 67 #endif ///defined BTA_JV_INCLUDED && BTA_JV_INCLUDED == TRUE 68