OSDN Git Service

Fix crashes with lots of discovered LE devices
[android-x86/system-bt.git] / audio_a2dp_hw / audio_a2dp_hw.h
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     A2DP_CTRL_CMD_OFFLOAD_START,
52 } tA2DP_CTRL_CMD;
53
54 typedef enum {
55     A2DP_CTRL_ACK_SUCCESS,
56     A2DP_CTRL_ACK_FAILURE,
57     A2DP_CTRL_ACK_INCALL_FAILURE, /* Failure when in Call*/
58     A2DP_CTRL_ACK_UNSUPPORTED
59 } tA2DP_CTRL_ACK;
60
61
62 /*****************************************************************************
63 **  Type definitions for callback functions
64 ******************************************************************************/
65
66 /*****************************************************************************
67 **  Type definitions and return values
68 ******************************************************************************/
69
70 /*****************************************************************************
71 **  Extern variables and functions
72 ******************************************************************************/
73
74 /*****************************************************************************
75 **  Functions
76 ******************************************************************************/
77
78
79 /*****************************************************************************
80 **
81 ** Function
82 **
83 ** Description
84 **
85 ** Returns
86 **
87 ******************************************************************************/
88
89 #endif /* A2DP_AUDIO_HW_H */
90