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_USAGE_H__
18 #define __EXYNOS_AUDIOHAL_USAGE_H__
19 
20 /**
21  ** Audio Usages Definition
22  **/
23 typedef enum {
24     AUSAGE_PLAYBACK,
25     AUSAGE_CAPTURE,
26 } audio_usage_type;
27 
28 typedef enum {
29     AUSAGE_MIN                 = 0,
30 
31     // Media Playback/Recording Usages
32     // These audio usages are defined from stream own usage
33     AUSAGE_MEDIA               = 0,
34     AUSAGE_RECORDING,
35     AUSAGE_CAMCORDER,
36 
37     // Call Usages
38     // These audio usages are defined from Audio Mode and Voice Status
39     AUSAGE_CPCALL_MIN,
40     AUSAGE_VOICE_CALL_NB = AUSAGE_CPCALL_MIN,
41     AUSAGE_VOICE_CALL_WB,
42     AUSAGE_VOLTE_CALL_NB,
43     AUSAGE_VOLTE_CALL_WB,
44     AUSAGE_VOLTE_CALL_SWB,
45     AUSAGE_VOLTE_VT_CALL_NB,
46     AUSAGE_VOLTE_VT_CALL_WB,
47     AUSAGE_VOLTE_VT_CALL_SWB,
48     AUSAGE_TTY,
49     AUSAGE_CPCALL_MAX = AUSAGE_TTY,
50 
51     AUSAGE_APCALL_MIN,
52     AUSAGE_WIFI_CALL_NB = AUSAGE_APCALL_MIN,
53     AUSAGE_WIFI_CALL_WB,
54     AUSAGE_WIFI_CALL_SWB,
55     AUSAGE_VIDEO_CALL,
56     AUSAGE_VOIP_CALL,
57     AUSAGE_COMMUNICATION,
58     AUSAGE_AP_TTY,
59     AUSAGE_APCALL_MAX = AUSAGE_AP_TTY,
60 
61     // Call Recording Usages
62     AUSAGE_INCALL_UPLINK,
63     AUSAGE_INCALL_DOWNLINK,
64     AUSAGE_INCALL_UPLINK_DOWNLINK,
65 
66     // Voice Recognition Usages
67     AUSAGE_RECOGNITION,
68 
69     // Other Audio Usages
70     AUSAGE_FM_RADIO,
71 
72     // Voice WakeUp Usages
73 #ifdef SUPPORT_STHAL_INTERFACE
74     AUSAGE_HOTWORD_SEAMLESS,
75     AUSAGE_HOTWORD_RECORD,
76 #endif
77 
78     // Factory Mode Test Usages
79     AUSAGE_LOOPBACK_MIN,
80     AUSAGE_LOOPBACK = AUSAGE_LOOPBACK_MIN, //packet
81     AUSAGE_LOOPBACK_NODELAY,               //packet_nodelay
82     AUSAGE_LOOPBACK_REALTIME,
83     AUSAGE_LOOPBACK_CODEC,
84     AUSAGE_LOOPBACK_MAX = AUSAGE_LOOPBACK_CODEC,
85 
86     AUSAGE_RMS,                            //RMS Test
87 
88     AUSAGE_NONE,
89     AUSAGE_MAX,
90     AUSAGE_CNT            = AUSAGE_MAX
91 } audio_usage;
92 
93 #endif  // __EXYNOS_AUDIOHAL_USAGE_H__
94