Home | History | Annotate | Download | only in ag
      1 /******************************************************************************
      2  *
      3  *  Copyright (C) 2003-2012 Broadcom Corporation
      4  *
      5  *  Licensed under the Apache License, Version 2.0 (the "License");
      6  *  you may not use this file except in compliance with the License.
      7  *  You may obtain a copy of the License at:
      8  *
      9  *  http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  *  Unless required by applicable law or agreed to in writing, software
     12  *  distributed under the License is distributed on an "AS IS" BASIS,
     13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  *  See the License for the specific language governing permissions and
     15  *  limitations under the License.
     16  *
     17  ******************************************************************************/
     18 
     19 /******************************************************************************
     20  *
     21  *  This file contains compile-time configurable constants for the audio
     22  *  gateway.
     23  *
     24  ******************************************************************************/
     25 
     26 #include "bt_common.h"
     27 #include "bta_api.h"
     28 #include "bta_ag_api.h"
     29 
     30 #ifndef BTA_AG_CIND_INFO
     31 #define BTA_AG_CIND_INFO     "(\"call\",(0,1)),(\"callsetup\",(0-3)),(\"service\",(0-3)),(\"signal\",(0-6)),(\"roam\",(0,1)),(\"battchg\",(0-5)),(\"callheld\",(0-2)),(\"bearer\",(0-7))"
     32 #endif
     33 
     34 #ifndef BTA_AG_CHLD_VAL_ECC
     35 #define BTA_AG_CHLD_VAL_ECC  "(0,1,1x,2,2x,3,4)"
     36 #endif
     37 
     38 #ifndef BTA_AG_CHLD_VAL
     39 #define BTA_AG_CHLD_VAL  "(0,1,2,3,4)"
     40 #endif
     41 
     42 #ifndef BTA_AG_CONN_TIMEOUT
     43 #define BTA_AG_CONN_TIMEOUT     5000
     44 #endif
     45 
     46 #ifndef BTA_AG_SCO_PKT_TYPES
     47 /* S1 packet type setting from HFP 1.5 spec */
     48 #define BTA_AG_SCO_PKT_TYPES    /* BTM_SCO_LINK_ALL_PKT_MASK */ (BTM_SCO_LINK_ONLY_MASK          | \
     49                                                                  BTM_SCO_PKT_TYPES_MASK_EV3      | \
     50                                                                  BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 | \
     51                                                                  BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 | \
     52                                                                  BTM_SCO_PKT_TYPES_MASK_NO_3_EV5)
     53 #endif
     54 
     55 #ifndef BTA_AG_BIND_INFO
     56 #define BTA_AG_BIND_INFO "(1)"
     57 #endif
     58 
     59 const tBTA_AG_HF_IND bta_ag_local_hf_ind_cfg[] =
     60 {
     61     /* The first row contains the number of indicators. Need to be updated accordingly */
     62     {BTA_AG_NUM_LOCAL_HF_IND,   0,  0,  0,  0},
     63 
     64     {1,    1,   1,   0,    1},     /* Enhanced Driver Status, supported, enabled, range 0 ~ 1 */
     65     {2,    1,   1,   0,    100}    /* Battery Level Status, supported, enabled, range 0 ~ 100 */
     66 };
     67 
     68 const tBTA_AG_CFG bta_ag_cfg =
     69 {
     70     BTA_AG_CIND_INFO,
     71     BTA_AG_BIND_INFO,
     72     BTA_AG_NUM_LOCAL_HF_IND,
     73     BTA_AG_CONN_TIMEOUT,
     74     BTA_AG_SCO_PKT_TYPES,
     75     BTA_AG_CHLD_VAL_ECC,
     76     BTA_AG_CHLD_VAL
     77 };
     78 
     79 tBTA_AG_CFG *p_bta_ag_cfg = (tBTA_AG_CFG *) &bta_ag_cfg;
     80