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 /***************************************************************************** 20 * 21 * Filename: audio_a2dp_hw.h 22 * 23 * Description: 24 * 25 *****************************************************************************/ 26 27 #ifndef AUDIO_A2DP_HW_H 28 #define AUDIO_A2DP_HW_H 29 30 /***************************************************************************** 31 ** Constants & Macros 32 ******************************************************************************/ 33 34 #define A2DP_AUDIO_HARDWARE_INTERFACE "audio.a2dp" 35 #define A2DP_CTRL_PATH "/data/misc/bluedroid/.a2dp_ctrl" 36 #define A2DP_DATA_PATH "/data/misc/bluedroid/.a2dp_data" 37 38 #define AUDIO_STREAM_DEFAULT_RATE 44100 39 #define AUDIO_STREAM_DEFAULT_FORMAT AUDIO_FORMAT_PCM_16_BIT 40 #define AUDIO_STREAM_DEFAULT_CHANNEL_FLAG AUDIO_CHANNEL_OUT_STEREO 41 #define AUDIO_STREAM_OUTPUT_BUFFER_SZ (20*512) 42 #define AUDIO_SKT_DISCONNECTED (-1) 43 44 typedef enum { 45 A2DP_CTRL_CMD_NONE, 46 A2DP_CTRL_CMD_CHECK_READY, 47 A2DP_CTRL_CMD_START, 48 A2DP_CTRL_CMD_STOP, 49 A2DP_CTRL_CMD_SUSPEND, 50 A2DP_CTRL_GET_AUDIO_CONFIG, 51 } tA2DP_CTRL_CMD; 52 53 typedef enum { 54 A2DP_CTRL_ACK_SUCCESS, 55 A2DP_CTRL_ACK_FAILURE, 56 A2DP_CTRL_ACK_INCALL_FAILURE /* Failure when in Call*/ 57 } tA2DP_CTRL_ACK; 58 59 60 /***************************************************************************** 61 ** Type definitions for callback functions 62 ******************************************************************************/ 63 64 /***************************************************************************** 65 ** Type definitions and return values 66 ******************************************************************************/ 67 68 /***************************************************************************** 69 ** Extern variables and functions 70 ******************************************************************************/ 71 72 /***************************************************************************** 73 ** Functions 74 ******************************************************************************/ 75 76 77 /***************************************************************************** 78 ** 79 ** Function 80 ** 81 ** Description 82 ** 83 ** Returns 84 ** 85 ******************************************************************************/ 86 87 #endif /* A2DP_AUDIO_HW_H */ 88 89