1 /******************************************************************************
3 * Copyright (C) 2003-2012 Broadcom Corporation
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:
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 ******************************************************************************/
19 /******************************************************************************
21 * This is the interface file for audio gateway call-out functions.
23 ******************************************************************************/
27 #include "bta_ag_api.h"
28 #include "hci/include/hci_audio.h"
30 /*******************************************************************************
32 ** Function bta_ag_co_init
34 ** Description This callout function is executed by AG when it is
35 ** started by calling BTA_AgEnable(). This function can be
36 ** used by the phone to initialize audio paths or for other
37 ** initialization purposes.
42 *******************************************************************************/
43 extern void bta_ag_co_init(void);
45 /*******************************************************************************
47 ** Function bta_ag_co_audio_state
49 ** Description This function is called by the AG before the audio connection
50 ** is brought up, after it comes up, and after it goes down.
52 ** Parameters handle - handle of the AG instance
53 ** state - Audio state
54 ** codec - if WBS support is compiled in, codec to going to be used is provided
55 ** and when in SCO_STATE_SETUP, BTM_I2SPCMConfig() must be called with
56 ** the correct platform parameters.
57 ** in the other states codec type should not be ignored
61 *******************************************************************************/
62 #if (BTM_WBS_INCLUDED == TRUE )
63 extern void bta_ag_co_audio_state(UINT16 handle, UINT8 app_id, UINT8 state,
64 tBTA_AG_PEER_CODEC codec);
67 extern void bta_ag_co_audio_state(UINT16 handle, UINT8 app_id, UINT8 state);
70 /*******************************************************************************
72 ** Function bta_ag_co_data_open
74 ** Description This function is executed by AG when a service level connection
75 ** is opened. The phone can use this function to set
76 ** up data paths or perform any required initialization or
77 ** set up particular to the connected service.
82 *******************************************************************************/
83 extern void bta_ag_co_data_open(UINT16 handle, tBTA_SERVICE_ID service);
85 /*******************************************************************************
87 ** Function bta_ag_co_data_close
89 ** Description This function is called by AG when a service level
90 ** connection is closed
95 *******************************************************************************/
96 extern void bta_ag_co_data_close(UINT16 handle);
98 /*******************************************************************************
100 ** Function bta_ag_co_tx_write
102 ** Description This function is called by the AG to send data to the
103 ** phone when the AG is configured for AT command pass-through.
104 ** The implementation of this function must copy the data to
105 ** the phone
\92s memory.
109 *******************************************************************************/
110 extern void bta_ag_co_tx_write(UINT16 handle, UINT8 *p_data, UINT16 len);
112 #endif /* BTA_AG_CO_H */