Home | History | Annotate | Download | only in co
      1 /******************************************************************************
      2  *
      3  *  Copyright (C) 2009-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 #define LOG_TAG "bt_btif_bta_ag"
     20 
     21 #include "bta/include/bta_ag_co.h"
     22 #include "bta/ag/bta_ag_int.h"
     23 #include "bta/include/bta_ag_api.h"
     24 #include "bta/include/bta_ag_ci.h"
     25 #include "osi/include/osi.h"
     26 
     27 /*******************************************************************************
     28  *
     29  * Function         bta_ag_co_init
     30  *
     31  * Description      This callout function is executed by AG when it is
     32  *                  started by calling BTA_AgEnable().  This function can be
     33  *                  used by the phone to initialize audio paths or for other
     34  *                  initialization purposes.
     35  *
     36  *
     37  * Returns          Void.
     38  *
     39  ******************************************************************************/
     40 void bta_ag_co_init(void) { BTM_WriteVoiceSettings(AG_VOICE_SETTINGS); }
     41 
     42 /*******************************************************************************
     43  *
     44  * Function         bta_ag_co_data_open
     45  *
     46  * Description      This function is executed by AG when a service level
     47  *                  connection is opened.  The phone can use this function to
     48  *                  set up data paths or perform any required initialization or
     49  *                  set up particular to the connected service.
     50  *
     51  * Returns          void
     52  *
     53  ******************************************************************************/
     54 void bta_ag_co_data_open(uint16_t handle, tBTA_SERVICE_ID service) {
     55   BTIF_TRACE_DEBUG("bta_ag_co_data_open handle:%d service:%d", handle, service);
     56 }
     57 
     58 /*******************************************************************************
     59  *
     60  * Function         bta_ag_co_data_close
     61  *
     62  * Description      This function is called by AG when a service level
     63  *                  connection is closed
     64  *
     65  *
     66  * Returns          void
     67  *
     68  ******************************************************************************/
     69 void bta_ag_co_data_close(uint16_t handle) {
     70   BTIF_TRACE_DEBUG("bta_ag_co_data_close handle:%d", handle);
     71 }
     72 
     73 /*******************************************************************************
     74  **
     75  ** Function         bta_ag_co_tx_write
     76  **
     77  ** Description      This function is called by the AG to send data to the
     78  **                  phone when the AG is configured for AT command
     79  **                  pass-through. The implementation of this function must copy
     80  **                  the data to the phones memory.
     81  **
     82  ** Returns          void
     83  **
     84  ******************************************************************************/
     85 void bta_ag_co_tx_write(uint16_t handle, UNUSED_ATTR uint8_t* p_data,
     86                         uint16_t len) {
     87   BTIF_TRACE_DEBUG("bta_ag_co_tx_write: handle: %d, len: %d", handle, len);
     88 }
     89