1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __EXYNOS_AUDIOHAL_DEVICE_H__
18 #define __EXYNOS_AUDIOHAL_DEVICE_H__
19 
20 /**
21  ** Audio Input/Output Device based on Target Device
22  **/
23 typedef enum {
24     DEVICE_MIN                    = 0,
25 
26     // Playback Devices
27     DEVICE_EARPIECE               = 0,   // handset or receiver
28     DEVICE_SPEAKER,
29     DEVICE_HEADSET,                      // headphone + mic
30     DEVICE_HEADPHONE,                    // headphone or earphone
31     DEVICE_SPEAKER_AND_HEADSET,
32     DEVICE_SPEAKER_AND_HEADPHONE,
33     DEVICE_BT_HEADSET,
34     DEVICE_FM_EXTERNAL,
35     DEVICE_SPEAKER_AND_BT_HEADSET,
36     DEVICE_USB_HEADSET,
37     DEVICE_AUX_DIGITAL,
38 
39     // Special Playback Devices
40     DEVICE_CALL_FWD,
41 
42     // Capture Devices
43     DEVICE_MAIN_MIC,
44     DEVICE_HEADSET_MIC,
45     DEVICE_HEADSET_MAIN_MIC,
46     DEVICE_BT_HEADSET_MIC,
47     DEVICE_BT_NREC_HEADSET_MIC,
48     DEVICE_USB_HEADSET_MIC,
49 
50     DEVICE_HANDSET_MIC,
51     DEVICE_SPEAKER_MIC,
52     DEVICE_HEADPHONE_MIC,
53 
54     DEVICE_SUB_MIC,
55     DEVICE_FULL_MIC,
56     DEVICE_HCO_MIC,
57     DEVICE_VCO_MIC,
58 
59     DEVICE_FM_TUNER,
60 
61     DEVICE_NONE,
62     DEVICE_MAX,
63     DEVICE_CNT                   = DEVICE_MAX
64 } device_type;
65 
66 
67 /**
68  ** Audio Input/Output Sampling Rate Modifier
69  **/
70 typedef enum {
71     MODIFIER_MIN          = 0,
72 
73     /* RX modifier */
74     MODIFIER_BT_SCO_RX_NB = 0,
75     MODIFIER_BT_SCO_RX_WB,
76 
77     /* TX modifier */
78     MODIFIER_BT_SCO_TX_NB,
79     MODIFIER_BT_SCO_TX_WB,
80 
81     MODIFIER_NONE,
82     MODIFIER_MAX,
83     MODIFIER_CNT          = MODIFIER_MAX
84 } modifier_type;
85 
86 
87 #endif  // __EXYNOS_AUDIOHAL_DEVICE_H__
88