• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // This file is autogenerated by hidl-gen
2 // then manualy edited for retrocompatiblity
3 // Source: android.hardware.audio.common@5.0
4 // Root: android.hardware:hardware/interfaces
5 
6 #ifndef HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_COMMON_V4_0_EXPORTED_CONSTANTS_H_
7 #define HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_COMMON_V4_0_EXPORTED_CONSTANTS_H_
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 enum {
14     AUDIO_IO_HANDLE_NONE = 0,
15     AUDIO_MODULE_HANDLE_NONE = 0,
16     AUDIO_PORT_HANDLE_NONE = 0,
17     AUDIO_PATCH_HANDLE_NONE = 0,
18 };
19 
20 typedef enum {
21     AUDIO_STREAM_DEFAULT = -1, // (-1)
22     AUDIO_STREAM_MIN = 0,
23     AUDIO_STREAM_VOICE_CALL = 0,
24     AUDIO_STREAM_SYSTEM = 1,
25     AUDIO_STREAM_RING = 2,
26     AUDIO_STREAM_MUSIC = 3,
27     AUDIO_STREAM_ALARM = 4,
28     AUDIO_STREAM_NOTIFICATION = 5,
29     AUDIO_STREAM_BLUETOOTH_SCO = 6,
30     AUDIO_STREAM_ENFORCED_AUDIBLE = 7,
31     AUDIO_STREAM_DTMF = 8,
32     AUDIO_STREAM_TTS = 9,
33     AUDIO_STREAM_ACCESSIBILITY = 10,
34 #ifndef AUDIO_NO_SYSTEM_DECLARATIONS
35     /** For dynamic policy output mixes. Only used by the audio policy */
36     AUDIO_STREAM_REROUTING = 11,
37     /** For audio flinger tracks volume. Only used by the audioflinger */
38     AUDIO_STREAM_PATCH = 12,
39 #endif // AUDIO_NO_SYSTEM_DECLARATIONS
40 } audio_stream_type_t;
41 
42 typedef enum {
43     AUDIO_SOURCE_DEFAULT = 0,
44     AUDIO_SOURCE_MIC = 1,
45     AUDIO_SOURCE_VOICE_UPLINK = 2,
46     AUDIO_SOURCE_VOICE_DOWNLINK = 3,
47     AUDIO_SOURCE_VOICE_CALL = 4,
48     AUDIO_SOURCE_CAMCORDER = 5,
49     AUDIO_SOURCE_VOICE_RECOGNITION = 6,
50     AUDIO_SOURCE_VOICE_COMMUNICATION = 7,
51     AUDIO_SOURCE_REMOTE_SUBMIX = 8,
52     AUDIO_SOURCE_UNPROCESSED = 9,
53     AUDIO_SOURCE_VOICE_PERFORMANCE = 10,
54     AUDIO_SOURCE_ECHO_REFERENCE = 1997,
55     AUDIO_SOURCE_FM_TUNER = 1998,
56 #ifndef AUDIO_NO_SYSTEM_DECLARATIONS
57     /**
58      * A low-priority, preemptible audio source for for background software
59      * hotword detection. Same tuning as VOICE_RECOGNITION.
60      * Used only internally by the framework.
61      */
62     AUDIO_SOURCE_HOTWORD = 1999,
63 #endif // AUDIO_NO_SYSTEM_DECLARATIONS
64 } audio_source_t;
65 
66 typedef enum {
67     AUDIO_SESSION_OUTPUT_STAGE = -1, // (-1)
68     AUDIO_SESSION_OUTPUT_MIX = 0,
69     AUDIO_SESSION_ALLOCATE = 0,
70     AUDIO_SESSION_NONE = 0,
71 } audio_session_t;
72 
73 typedef enum {
74     AUDIO_FORMAT_INVALID             = 0xFFFFFFFFu,
75     AUDIO_FORMAT_DEFAULT             = 0,
76     AUDIO_FORMAT_PCM                 = 0x00000000u,
77     AUDIO_FORMAT_MP3                 = 0x01000000u,
78     AUDIO_FORMAT_AMR_NB              = 0x02000000u,
79     AUDIO_FORMAT_AMR_WB              = 0x03000000u,
80     AUDIO_FORMAT_AAC                 = 0x04000000u,
81     AUDIO_FORMAT_HE_AAC_V1           = 0x05000000u,
82     AUDIO_FORMAT_HE_AAC_V2           = 0x06000000u,
83     AUDIO_FORMAT_VORBIS              = 0x07000000u,
84     AUDIO_FORMAT_OPUS                = 0x08000000u,
85     AUDIO_FORMAT_AC3                 = 0x09000000u,
86     AUDIO_FORMAT_E_AC3               = 0x0A000000u,
87     AUDIO_FORMAT_DTS                 = 0x0B000000u,
88     AUDIO_FORMAT_DTS_HD              = 0x0C000000u,
89     AUDIO_FORMAT_IEC61937            = 0x0D000000u,
90     AUDIO_FORMAT_DOLBY_TRUEHD        = 0x0E000000u,
91     AUDIO_FORMAT_EVRC                = 0x10000000u,
92     AUDIO_FORMAT_EVRCB               = 0x11000000u,
93     AUDIO_FORMAT_EVRCWB              = 0x12000000u,
94     AUDIO_FORMAT_EVRCNW              = 0x13000000u,
95     AUDIO_FORMAT_AAC_ADIF            = 0x14000000u,
96     AUDIO_FORMAT_WMA                 = 0x15000000u,
97     AUDIO_FORMAT_WMA_PRO             = 0x16000000u,
98     AUDIO_FORMAT_AMR_WB_PLUS         = 0x17000000u,
99     AUDIO_FORMAT_MP2                 = 0x18000000u,
100     AUDIO_FORMAT_QCELP               = 0x19000000u,
101     AUDIO_FORMAT_DSD                 = 0x1A000000u,
102     AUDIO_FORMAT_FLAC                = 0x1B000000u,
103     AUDIO_FORMAT_ALAC                = 0x1C000000u,
104     AUDIO_FORMAT_APE                 = 0x1D000000u,
105     AUDIO_FORMAT_AAC_ADTS            = 0x1E000000u,
106     AUDIO_FORMAT_SBC                 = 0x1F000000u,
107     AUDIO_FORMAT_APTX                = 0x20000000u,
108     AUDIO_FORMAT_APTX_HD             = 0x21000000u,
109     AUDIO_FORMAT_AC4                 = 0x22000000u,
110     AUDIO_FORMAT_LDAC                = 0x23000000u,
111     AUDIO_FORMAT_MAT                 = 0x24000000u,
112     AUDIO_FORMAT_AAC_LATM            = 0x25000000u,
113     AUDIO_FORMAT_CELT                = 0x26000000u,
114     AUDIO_FORMAT_APTX_ADAPTIVE       = 0x27000000u,
115     AUDIO_FORMAT_LHDC                = 0x28000000u,
116     AUDIO_FORMAT_LHDC_LL             = 0x29000000u,
117     AUDIO_FORMAT_APTX_TWSP           = 0x2A000000u,
118     AUDIO_FORMAT_MAIN_MASK           = 0xFF000000u,
119     AUDIO_FORMAT_SUB_MASK            = 0x00FFFFFFu,
120 
121     /* Subformats */
122     AUDIO_FORMAT_PCM_SUB_16_BIT        = 0x1u,
123     AUDIO_FORMAT_PCM_SUB_8_BIT         = 0x2u,
124     AUDIO_FORMAT_PCM_SUB_32_BIT        = 0x3u,
125     AUDIO_FORMAT_PCM_SUB_8_24_BIT      = 0x4u,
126     AUDIO_FORMAT_PCM_SUB_FLOAT         = 0x5u,
127     AUDIO_FORMAT_PCM_SUB_24_BIT_PACKED = 0x6u,
128 
129     AUDIO_FORMAT_MP3_SUB_NONE          = 0x0u,
130 
131     AUDIO_FORMAT_AMR_SUB_NONE          = 0x0u,
132 
133     AUDIO_FORMAT_AAC_SUB_MAIN          = 0x1u,
134     AUDIO_FORMAT_AAC_SUB_LC            = 0x2u,
135     AUDIO_FORMAT_AAC_SUB_SSR           = 0x4u,
136     AUDIO_FORMAT_AAC_SUB_LTP           = 0x8u,
137     AUDIO_FORMAT_AAC_SUB_HE_V1         = 0x10u,
138     AUDIO_FORMAT_AAC_SUB_SCALABLE      = 0x20u,
139     AUDIO_FORMAT_AAC_SUB_ERLC          = 0x40u,
140     AUDIO_FORMAT_AAC_SUB_LD            = 0x80u,
141     AUDIO_FORMAT_AAC_SUB_HE_V2         = 0x100u,
142     AUDIO_FORMAT_AAC_SUB_ELD           = 0x200u,
143     AUDIO_FORMAT_AAC_SUB_XHE           = 0x300u,
144 
145     AUDIO_FORMAT_VORBIS_SUB_NONE       = 0x0u,
146 
147     AUDIO_FORMAT_E_AC3_SUB_JOC         = 0x1u,
148 
149     AUDIO_FORMAT_MAT_SUB_1_0           = 0x1u,
150     AUDIO_FORMAT_MAT_SUB_2_0           = 0x2u,
151     AUDIO_FORMAT_MAT_SUB_2_1           = 0x3u,
152 
153     /* Aliases */
154     AUDIO_FORMAT_PCM_16_BIT            = 0x1u,        // (PCM | PCM_SUB_16_BIT)
155     AUDIO_FORMAT_PCM_8_BIT             = 0x2u,        // (PCM | PCM_SUB_8_BIT)
156     AUDIO_FORMAT_PCM_32_BIT            = 0x3u,        // (PCM | PCM_SUB_32_BIT)
157     AUDIO_FORMAT_PCM_8_24_BIT          = 0x4u,        // (PCM | PCM_SUB_8_24_BIT)
158     AUDIO_FORMAT_PCM_FLOAT             = 0x5u,        // (PCM | PCM_SUB_FLOAT)
159     AUDIO_FORMAT_PCM_24_BIT_PACKED     = 0x6u,        // (PCM | PCM_SUB_24_BIT_PACKED)
160     AUDIO_FORMAT_AAC_MAIN              = 0x4000001u,  // (AAC | AAC_SUB_MAIN)
161     AUDIO_FORMAT_AAC_LC                = 0x4000002u,  // (AAC | AAC_SUB_LC)
162     AUDIO_FORMAT_AAC_SSR               = 0x4000004u,  // (AAC | AAC_SUB_SSR)
163     AUDIO_FORMAT_AAC_LTP               = 0x4000008u,  // (AAC | AAC_SUB_LTP)
164     AUDIO_FORMAT_AAC_HE_V1             = 0x4000010u,  // (AAC | AAC_SUB_HE_V1)
165     AUDIO_FORMAT_AAC_SCALABLE          = 0x4000020u,  // (AAC | AAC_SUB_SCALABLE)
166     AUDIO_FORMAT_AAC_ERLC              = 0x4000040u,  // (AAC | AAC_SUB_ERLC)
167     AUDIO_FORMAT_AAC_LD                = 0x4000080u,  // (AAC | AAC_SUB_LD)
168     AUDIO_FORMAT_AAC_HE_V2             = 0x4000100u,  // (AAC | AAC_SUB_HE_V2)
169     AUDIO_FORMAT_AAC_ELD               = 0x4000200u,  // (AAC | AAC_SUB_ELD)
170     AUDIO_FORMAT_AAC_XHE               = 0x4000300u,  // (AAC | AAC_SUB_XHE)
171     AUDIO_FORMAT_AAC_ADTS_MAIN         = 0x1e000001u, // (AAC_ADTS | AAC_SUB_MAIN)
172     AUDIO_FORMAT_AAC_ADTS_LC           = 0x1e000002u, // (AAC_ADTS | AAC_SUB_LC)
173     AUDIO_FORMAT_AAC_ADTS_SSR          = 0x1e000004u, // (AAC_ADTS | AAC_SUB_SSR)
174     AUDIO_FORMAT_AAC_ADTS_LTP          = 0x1e000008u, // (AAC_ADTS | AAC_SUB_LTP)
175     AUDIO_FORMAT_AAC_ADTS_HE_V1        = 0x1e000010u, // (AAC_ADTS | AAC_SUB_HE_V1)
176     AUDIO_FORMAT_AAC_ADTS_SCALABLE     = 0x1e000020u, // (AAC_ADTS | AAC_SUB_SCALABLE)
177     AUDIO_FORMAT_AAC_ADTS_ERLC         = 0x1e000040u, // (AAC_ADTS | AAC_SUB_ERLC)
178     AUDIO_FORMAT_AAC_ADTS_LD           = 0x1e000080u, // (AAC_ADTS | AAC_SUB_LD)
179     AUDIO_FORMAT_AAC_ADTS_HE_V2        = 0x1e000100u, // (AAC_ADTS | AAC_SUB_HE_V2)
180     AUDIO_FORMAT_AAC_ADTS_ELD          = 0x1e000200u, // (AAC_ADTS | AAC_SUB_ELD)
181     AUDIO_FORMAT_AAC_ADTS_XHE          = 0x1e000300u, // (AAC_ADTS | AAC_SUB_XHE)
182     AUDIO_FORMAT_AAC_LATM_LC           = 0x25000002u, // (AAC_LATM | AAC_SUB_LC)
183     AUDIO_FORMAT_AAC_LATM_HE_V1        = 0x25000010u, // (AAC_LATM | AAC_SUB_HE_V1)
184     AUDIO_FORMAT_AAC_LATM_HE_V2        = 0x25000100u, // (AAC_LATM | AAC_SUB_HE_V2)
185     AUDIO_FORMAT_E_AC3_JOC             = 0xA000001u,  // (E_AC3 | E_AC3_SUB_JOC)
186     AUDIO_FORMAT_MAT_1_0               = 0x24000001u, // (MAT | MAT_SUB_1_0)
187     AUDIO_FORMAT_MAT_2_0               = 0x24000002u, // (MAT | MAT_SUB_2_0)
188     AUDIO_FORMAT_MAT_2_1               = 0x24000003u, // (MAT | MAT_SUB_2_1)
189 } audio_format_t;
190 
191 enum {
192     FCC_2 = 2,
193     FCC_8 = 8,
194 };
195 
196 enum {
197     AUDIO_CHANNEL_REPRESENTATION_POSITION   = 0x0u,
198     AUDIO_CHANNEL_REPRESENTATION_INDEX      = 0x2u,
199     AUDIO_CHANNEL_NONE                      = 0x0u,
200     AUDIO_CHANNEL_INVALID                   = 0xC0000000u,
201 
202     AUDIO_CHANNEL_OUT_FRONT_LEFT            = 0x1u,
203     AUDIO_CHANNEL_OUT_FRONT_RIGHT           = 0x2u,
204     AUDIO_CHANNEL_OUT_FRONT_CENTER          = 0x4u,
205     AUDIO_CHANNEL_OUT_LOW_FREQUENCY         = 0x8u,
206     AUDIO_CHANNEL_OUT_BACK_LEFT             = 0x10u,
207     AUDIO_CHANNEL_OUT_BACK_RIGHT            = 0x20u,
208     AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER  = 0x40u,
209     AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER = 0x80u,
210     AUDIO_CHANNEL_OUT_BACK_CENTER           = 0x100u,
211     AUDIO_CHANNEL_OUT_SIDE_LEFT             = 0x200u,
212     AUDIO_CHANNEL_OUT_SIDE_RIGHT            = 0x400u,
213     AUDIO_CHANNEL_OUT_TOP_CENTER            = 0x800u,
214     AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT        = 0x1000u,
215     AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER      = 0x2000u,
216     AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT       = 0x4000u,
217     AUDIO_CHANNEL_OUT_TOP_BACK_LEFT         = 0x8000u,
218     AUDIO_CHANNEL_OUT_TOP_BACK_CENTER       = 0x10000u,
219     AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT        = 0x20000u,
220     AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT         = 0x40000u,
221     AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT        = 0x80000u,
222     AUDIO_CHANNEL_OUT_HAPTIC_A              = 0x20000000u,
223     AUDIO_CHANNEL_OUT_HAPTIC_B              = 0x10000000u,
224     AUDIO_CHANNEL_OUT_MONO                  = 0x1u,     // OUT_FRONT_LEFT
225     AUDIO_CHANNEL_OUT_STEREO                = 0x3u,     // OUT_FRONT_LEFT | OUT_FRONT_RIGHT
226     AUDIO_CHANNEL_OUT_2POINT1               = 0xBu,     // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_LOW_FREQUENCY
227     AUDIO_CHANNEL_OUT_2POINT0POINT2         = 0xC0003u, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT
228     AUDIO_CHANNEL_OUT_2POINT1POINT2         = 0xC000Bu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT | OUT_LOW_FREQUENCY
229     AUDIO_CHANNEL_OUT_3POINT0POINT2         = 0xC0007u, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT
230     AUDIO_CHANNEL_OUT_3POINT1POINT2         = 0xC000Fu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT | OUT_LOW_FREQUENCY
231     AUDIO_CHANNEL_OUT_QUAD                  = 0x33u,    // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_BACK_LEFT | OUT_BACK_RIGHT
232     AUDIO_CHANNEL_OUT_QUAD_BACK             = 0x33u,    // OUT_QUAD
233     AUDIO_CHANNEL_OUT_QUAD_SIDE             = 0x603u,   // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_SIDE_LEFT | OUT_SIDE_RIGHT
234     AUDIO_CHANNEL_OUT_SURROUND              = 0x107u,   // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_BACK_CENTER
235     AUDIO_CHANNEL_OUT_PENTA                 = 0x37u,    // OUT_QUAD | OUT_FRONT_CENTER
236     AUDIO_CHANNEL_OUT_5POINT1               = 0x3Fu,    // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT
237     AUDIO_CHANNEL_OUT_5POINT1_BACK          = 0x3Fu,    // OUT_5POINT1
238     AUDIO_CHANNEL_OUT_5POINT1_SIDE          = 0x60Fu,   // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_SIDE_LEFT | OUT_SIDE_RIGHT
239     AUDIO_CHANNEL_OUT_5POINT1POINT2         = 0xC003Fu, // OUT_5POINT1 | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT
240     AUDIO_CHANNEL_OUT_5POINT1POINT4         = 0x2D03Fu, // OUT_5POINT1 | OUT_TOP_FRONT_LEFT | OUT_TOP_FRONT_RIGHT | OUT_TOP_BACK_LEFT | OUT_TOP_BACK_RIGHT
241     AUDIO_CHANNEL_OUT_6POINT1               = 0x13Fu,   // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT | OUT_BACK_CENTER
242     AUDIO_CHANNEL_OUT_7POINT1               = 0x63Fu,   // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT | OUT_SIDE_LEFT | OUT_SIDE_RIGHT
243     AUDIO_CHANNEL_OUT_7POINT1POINT2         = 0xC063Fu, // OUT_7POINT1 | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT
244     AUDIO_CHANNEL_OUT_7POINT1POINT4         = 0x2D63Fu, // OUT_7POINT1 | OUT_TOP_FRONT_LEFT | OUT_TOP_FRONT_RIGHT | OUT_TOP_BACK_LEFT | OUT_TOP_BACK_RIGHT
245     AUDIO_CHANNEL_OUT_MONO_HAPTIC_A         = 0x20000001u,// OUT_FRONT_LEFT | OUT_HAPTIC_A
246     AUDIO_CHANNEL_OUT_STEREO_HAPTIC_A       = 0x20000003u,// OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_HAPTIC_A
247     AUDIO_CHANNEL_OUT_HAPTIC_AB             = 0x30000000u,// OUT_HAPTIC_A | OUT_HAPTIC_B
248     AUDIO_CHANNEL_OUT_MONO_HAPTIC_AB        = 0x30000001u,// OUT_FRONT_LEFT | OUT_HAPTIC_A | OUT_HAPTIC_B
249     AUDIO_CHANNEL_OUT_STEREO_HAPTIC_AB      = 0x30000003u,// OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_HAPTIC_A | OUT_HAPTIC_B
250 
251     AUDIO_CHANNEL_IN_LEFT                   = 0x4u,
252     AUDIO_CHANNEL_IN_RIGHT                  = 0x8u,
253     AUDIO_CHANNEL_IN_FRONT                  = 0x10u,
254     AUDIO_CHANNEL_IN_BACK                   = 0x20u,
255     AUDIO_CHANNEL_IN_LEFT_PROCESSED         = 0x40u,
256     AUDIO_CHANNEL_IN_RIGHT_PROCESSED        = 0x80u,
257     AUDIO_CHANNEL_IN_FRONT_PROCESSED        = 0x100u,
258     AUDIO_CHANNEL_IN_BACK_PROCESSED         = 0x200u,
259     AUDIO_CHANNEL_IN_PRESSURE               = 0x400u,
260     AUDIO_CHANNEL_IN_X_AXIS                 = 0x800u,
261     AUDIO_CHANNEL_IN_Y_AXIS                 = 0x1000u,
262     AUDIO_CHANNEL_IN_Z_AXIS                 = 0x2000u,
263     AUDIO_CHANNEL_IN_BACK_LEFT              = 0x10000u,
264     AUDIO_CHANNEL_IN_BACK_RIGHT             = 0x20000u,
265     AUDIO_CHANNEL_IN_CENTER                 = 0x40000u,
266     AUDIO_CHANNEL_IN_LOW_FREQUENCY          = 0x100000u,
267     AUDIO_CHANNEL_IN_TOP_LEFT               = 0x200000u,
268     AUDIO_CHANNEL_IN_TOP_RIGHT              = 0x400000u,
269     AUDIO_CHANNEL_IN_VOICE_UPLINK           = 0x4000u,
270     AUDIO_CHANNEL_IN_VOICE_DNLINK           = 0x8000u,
271     AUDIO_CHANNEL_IN_MONO                   = 0x10u,     // IN_FRONT
272     AUDIO_CHANNEL_IN_STEREO                 = 0xCu,      // IN_LEFT | IN_RIGHT
273     AUDIO_CHANNEL_IN_FRONT_BACK             = 0x30u,     // IN_FRONT | IN_BACK
274     AUDIO_CHANNEL_IN_6                      = 0xFCu,     // IN_LEFT | IN_RIGHT | IN_FRONT | IN_BACK | IN_LEFT_PROCESSED | IN_RIGHT_PROCESSED
275     AUDIO_CHANNEL_IN_2POINT0POINT2          = 0x60000Cu, // IN_LEFT | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT
276     AUDIO_CHANNEL_IN_2POINT1POINT2          = 0x70000Cu, // IN_LEFT | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT | IN_LOW_FREQUENCY
277     AUDIO_CHANNEL_IN_3POINT0POINT2          = 0x64000Cu, // IN_LEFT | IN_CENTER | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT
278     AUDIO_CHANNEL_IN_3POINT1POINT2          = 0x74000Cu, // IN_LEFT | IN_CENTER | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT | IN_LOW_FREQUENCY
279     AUDIO_CHANNEL_IN_5POINT1                = 0x17000Cu, // IN_LEFT | IN_CENTER | IN_RIGHT | IN_BACK_LEFT | IN_BACK_RIGHT | IN_LOW_FREQUENCY
280     AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO      = 0x4010u,   // IN_VOICE_UPLINK | IN_MONO
281     AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO      = 0x8010u,   // IN_VOICE_DNLINK | IN_MONO
282     AUDIO_CHANNEL_IN_VOICE_CALL_MONO        = 0xC010u,   // IN_VOICE_UPLINK_MONO | IN_VOICE_DNLINK_MONO
283 
284     AUDIO_CHANNEL_COUNT_MAX                 = 30u,
285     AUDIO_CHANNEL_INDEX_HDR                 = 0x80000000u, // REPRESENTATION_INDEX << COUNT_MAX
286     AUDIO_CHANNEL_INDEX_MASK_1              = 0x80000001u, // INDEX_HDR | (1 << 1) - 1
287     AUDIO_CHANNEL_INDEX_MASK_2              = 0x80000003u, // INDEX_HDR | (1 << 2) - 1
288     AUDIO_CHANNEL_INDEX_MASK_3              = 0x80000007u, // INDEX_HDR | (1 << 3) - 1
289     AUDIO_CHANNEL_INDEX_MASK_4              = 0x8000000Fu, // INDEX_HDR | (1 << 4) - 1
290     AUDIO_CHANNEL_INDEX_MASK_5              = 0x8000001Fu, // INDEX_HDR | (1 << 5) - 1
291     AUDIO_CHANNEL_INDEX_MASK_6              = 0x8000003Fu, // INDEX_HDR | (1 << 6) - 1
292     AUDIO_CHANNEL_INDEX_MASK_7              = 0x8000007Fu, // INDEX_HDR | (1 << 7) - 1
293     AUDIO_CHANNEL_INDEX_MASK_8              = 0x800000FFu, // INDEX_HDR | (1 << 8) - 1
294     AUDIO_CHANNEL_INDEX_MASK_9              = 0x800001FFu, // INDEX_HDR | (1 << 9) - 1
295     AUDIO_CHANNEL_INDEX_MASK_10             = 0x800003FFu, // INDEX_HDR | (1 << 10) - 1
296     AUDIO_CHANNEL_INDEX_MASK_11             = 0x800007FFu, // INDEX_HDR | (1 << 11) - 1
297     AUDIO_CHANNEL_INDEX_MASK_12             = 0x80000FFFu, // INDEX_HDR | (1 << 12) - 1
298     AUDIO_CHANNEL_INDEX_MASK_13             = 0x80001FFFu, // INDEX_HDR | (1 << 13) - 1
299     AUDIO_CHANNEL_INDEX_MASK_14             = 0x80003FFFu, // INDEX_HDR | (1 << 14) - 1
300     AUDIO_CHANNEL_INDEX_MASK_15             = 0x80007FFFu, // INDEX_HDR | (1 << 15) - 1
301     AUDIO_CHANNEL_INDEX_MASK_16             = 0x8000FFFFu, // INDEX_HDR | (1 << 16) - 1
302     AUDIO_CHANNEL_INDEX_MASK_17             = 0x8001FFFFu, // INDEX_HDR | (1 << 17) - 1
303     AUDIO_CHANNEL_INDEX_MASK_18             = 0x8003FFFFu, // INDEX_HDR | (1 << 18) - 1
304     AUDIO_CHANNEL_INDEX_MASK_19             = 0x8007FFFFu, // INDEX_HDR | (1 << 19) - 1
305     AUDIO_CHANNEL_INDEX_MASK_20             = 0x800FFFFFu, // INDEX_HDR | (1 << 20) - 1
306     AUDIO_CHANNEL_INDEX_MASK_21             = 0x801FFFFFu, // INDEX_HDR | (1 << 21) - 1
307     AUDIO_CHANNEL_INDEX_MASK_22             = 0x803FFFFFu, // INDEX_HDR | (1 << 22) - 1
308     AUDIO_CHANNEL_INDEX_MASK_23             = 0x807FFFFFu, // INDEX_HDR | (1 << 23) - 1
309     AUDIO_CHANNEL_INDEX_MASK_24             = 0x80FFFFFFu, // INDEX_HDR | (1 << 24) - 1
310 };
311 
312 typedef enum {
313 #ifndef AUDIO_NO_SYSTEM_DECLARATIONS
314     AUDIO_MODE_INVALID = -2, // (-2)
315     AUDIO_MODE_CURRENT = -1, // (-1)
316 #endif // AUDIO_NO_SYSTEM_DECLARATIONS
317     AUDIO_MODE_NORMAL = 0,
318     AUDIO_MODE_RINGTONE = 1,
319     AUDIO_MODE_IN_CALL = 2,
320     AUDIO_MODE_IN_COMMUNICATION = 3,
321 } audio_mode_t;
322 
323 enum {
324     AUDIO_DEVICE_NONE                          = 0x0u,
325     AUDIO_DEVICE_BIT_IN                        = 0x80000000u,
326     AUDIO_DEVICE_BIT_DEFAULT                   = 0x40000000u,
327 
328     AUDIO_DEVICE_OUT_EARPIECE                  = 0x1u,
329     AUDIO_DEVICE_OUT_SPEAKER                   = 0x2u,
330     AUDIO_DEVICE_OUT_WIRED_HEADSET             = 0x4u,
331     AUDIO_DEVICE_OUT_WIRED_HEADPHONE           = 0x8u,
332     AUDIO_DEVICE_OUT_BLUETOOTH_SCO             = 0x10u,
333     AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET     = 0x20u,
334     AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT      = 0x40u,
335     AUDIO_DEVICE_OUT_BLUETOOTH_A2DP            = 0x80u,
336     AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES = 0x100u,
337     AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER    = 0x200u,
338     AUDIO_DEVICE_OUT_AUX_DIGITAL               = 0x400u,
339     AUDIO_DEVICE_OUT_HDMI                      = 0x400u,      // OUT_AUX_DIGITAL
340     AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET         = 0x800u,
341     AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET         = 0x1000u,
342     AUDIO_DEVICE_OUT_USB_ACCESSORY             = 0x2000u,
343     AUDIO_DEVICE_OUT_USB_DEVICE                = 0x4000u,
344     AUDIO_DEVICE_OUT_REMOTE_SUBMIX             = 0x8000u,
345     AUDIO_DEVICE_OUT_TELEPHONY_TX              = 0x10000u,
346     AUDIO_DEVICE_OUT_LINE                      = 0x20000u,
347     AUDIO_DEVICE_OUT_HDMI_ARC                  = 0x40000u,
348     AUDIO_DEVICE_OUT_SPDIF                     = 0x80000u,
349     AUDIO_DEVICE_OUT_FM                        = 0x100000u,
350     AUDIO_DEVICE_OUT_AUX_LINE                  = 0x200000u,
351     AUDIO_DEVICE_OUT_SPEAKER_SAFE              = 0x400000u,
352     AUDIO_DEVICE_OUT_IP                        = 0x800000u,
353     AUDIO_DEVICE_OUT_BUS                       = 0x1000000u,
354     AUDIO_DEVICE_OUT_PROXY                     = 0x2000000u,
355     AUDIO_DEVICE_OUT_USB_HEADSET               = 0x4000000u,
356     AUDIO_DEVICE_OUT_HEARING_AID               = 0x8000000u,
357     AUDIO_DEVICE_OUT_ECHO_CANCELLER            = 0x10000000u,
358     AUDIO_DEVICE_OUT_DEFAULT                   = 0x40000000u, // BIT_DEFAULT
359 
360     AUDIO_DEVICE_IN_COMMUNICATION              = 0x80000001u, // BIT_IN | 0x1
361     AUDIO_DEVICE_IN_AMBIENT                    = 0x80000002u, // BIT_IN | 0x2
362     AUDIO_DEVICE_IN_BUILTIN_MIC                = 0x80000004u, // BIT_IN | 0x4
363     AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET      = 0x80000008u, // BIT_IN | 0x8
364     AUDIO_DEVICE_IN_WIRED_HEADSET              = 0x80000010u, // BIT_IN | 0x10
365     AUDIO_DEVICE_IN_AUX_DIGITAL                = 0x80000020u, // BIT_IN | 0x20
366     AUDIO_DEVICE_IN_HDMI                       = 0x80000020u, // IN_AUX_DIGITAL
367     AUDIO_DEVICE_IN_VOICE_CALL                 = 0x80000040u, // BIT_IN | 0x40
368     AUDIO_DEVICE_IN_TELEPHONY_RX               = 0x80000040u, // IN_VOICE_CALL
369     AUDIO_DEVICE_IN_BACK_MIC                   = 0x80000080u, // BIT_IN | 0x80
370     AUDIO_DEVICE_IN_REMOTE_SUBMIX              = 0x80000100u, // BIT_IN | 0x100
371     AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET          = 0x80000200u, // BIT_IN | 0x200
372     AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET          = 0x80000400u, // BIT_IN | 0x400
373     AUDIO_DEVICE_IN_USB_ACCESSORY              = 0x80000800u, // BIT_IN | 0x800
374     AUDIO_DEVICE_IN_USB_DEVICE                 = 0x80001000u, // BIT_IN | 0x1000
375     AUDIO_DEVICE_IN_FM_TUNER                   = 0x80002000u, // BIT_IN | 0x2000
376     AUDIO_DEVICE_IN_TV_TUNER                   = 0x80004000u, // BIT_IN | 0x4000
377     AUDIO_DEVICE_IN_LINE                       = 0x80008000u, // BIT_IN | 0x8000
378     AUDIO_DEVICE_IN_SPDIF                      = 0x80010000u, // BIT_IN | 0x10000
379     AUDIO_DEVICE_IN_BLUETOOTH_A2DP             = 0x80020000u, // BIT_IN | 0x20000
380     AUDIO_DEVICE_IN_LOOPBACK                   = 0x80040000u, // BIT_IN | 0x40000
381     AUDIO_DEVICE_IN_IP                         = 0x80080000u, // BIT_IN | 0x80000
382     AUDIO_DEVICE_IN_BUS                        = 0x80100000u, // BIT_IN | 0x100000
383     AUDIO_DEVICE_IN_PROXY                      = 0x81000000u, // BIT_IN | 0x1000000
384     AUDIO_DEVICE_IN_USB_HEADSET                = 0x82000000u, // BIT_IN | 0x2000000
385     AUDIO_DEVICE_IN_BLUETOOTH_BLE              = 0x84000000u, // BIT_IN | 0x4000000
386     AUDIO_DEVICE_IN_HDMI_ARC                   = 0x88000000u, // BIT_IN | 0x8000000
387     AUDIO_DEVICE_IN_ECHO_REFERENCE             = 0x90000000u, // BIT_IN | 0x10000000
388     AUDIO_DEVICE_IN_DEFAULT                    = 0xC0000000u, // BIT_IN | BIT_DEFAULT
389 };
390 
391 typedef enum {
392     AUDIO_OUTPUT_FLAG_NONE             = 0x0,
393     AUDIO_OUTPUT_FLAG_DIRECT           = 0x1,
394     AUDIO_OUTPUT_FLAG_PRIMARY          = 0x2,
395     AUDIO_OUTPUT_FLAG_FAST             = 0x4,
396     AUDIO_OUTPUT_FLAG_DEEP_BUFFER      = 0x8,
397     AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD = 0x10,
398     AUDIO_OUTPUT_FLAG_NON_BLOCKING     = 0x20,
399     AUDIO_OUTPUT_FLAG_HW_AV_SYNC       = 0x40,
400     AUDIO_OUTPUT_FLAG_TTS              = 0x80,
401     AUDIO_OUTPUT_FLAG_RAW              = 0x100,
402     AUDIO_OUTPUT_FLAG_SYNC             = 0x200,
403     AUDIO_OUTPUT_FLAG_IEC958_NONAUDIO  = 0x400,
404     AUDIO_OUTPUT_FLAG_DIRECT_PCM       = 0x2000,
405     AUDIO_OUTPUT_FLAG_MMAP_NOIRQ       = 0x4000,
406     AUDIO_OUTPUT_FLAG_VOIP_RX          = 0x8000,
407     AUDIO_OUTPUT_FLAG_INCALL_MUSIC     = 0x10000,
408 } audio_output_flags_t;
409 
410 typedef enum {
411     AUDIO_INPUT_FLAG_NONE       = 0x0,
412     AUDIO_INPUT_FLAG_FAST       = 0x1,
413     AUDIO_INPUT_FLAG_HW_HOTWORD = 0x2,
414     AUDIO_INPUT_FLAG_RAW        = 0x4,
415     AUDIO_INPUT_FLAG_SYNC       = 0x8,
416     AUDIO_INPUT_FLAG_MMAP_NOIRQ = 0x10,
417     AUDIO_INPUT_FLAG_VOIP_TX    = 0x20,
418     AUDIO_INPUT_FLAG_HW_AV_SYNC = 0x40,
419 #ifndef AUDIO_NO_SYSTEM_DECLARATIONS  // TODO: Expose at HAL interface, remove FRAMEWORK_FLAGS mask
420     AUDIO_INPUT_FLAG_DIRECT     = 0x80,
421     AUDIO_INPUT_FRAMEWORK_FLAGS = AUDIO_INPUT_FLAG_DIRECT,
422 #endif
423 } audio_input_flags_t;
424 
425 typedef enum {
426     AUDIO_USAGE_UNKNOWN = 0,
427     AUDIO_USAGE_MEDIA = 1,
428     AUDIO_USAGE_VOICE_COMMUNICATION = 2,
429     AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING = 3,
430     AUDIO_USAGE_ALARM = 4,
431     AUDIO_USAGE_NOTIFICATION = 5,
432     AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE = 6,
433 #ifndef AUDIO_NO_SYSTEM_DECLARATIONS
434     AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST = 7,
435     AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT = 8,
436     AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED = 9,
437     AUDIO_USAGE_NOTIFICATION_EVENT = 10,
438 #endif // AUDIO_NO_SYSTEM_DECLARATIONS
439     AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY = 11,
440     AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE = 12,
441     AUDIO_USAGE_ASSISTANCE_SONIFICATION = 13,
442     AUDIO_USAGE_GAME = 14,
443     AUDIO_USAGE_VIRTUAL_SOURCE = 15,
444     AUDIO_USAGE_ASSISTANT = 16,
445 } audio_usage_t;
446 
447 typedef enum {
448     AUDIO_CONTENT_TYPE_UNKNOWN = 0u,
449     AUDIO_CONTENT_TYPE_SPEECH = 1u,
450     AUDIO_CONTENT_TYPE_MUSIC = 2u,
451     AUDIO_CONTENT_TYPE_MOVIE = 3u,
452     AUDIO_CONTENT_TYPE_SONIFICATION = 4u,
453 } audio_content_type_t;
454 
455 enum {
456     AUDIO_GAIN_MODE_JOINT    = 0x1u,
457     AUDIO_GAIN_MODE_CHANNELS = 0x2u,
458     AUDIO_GAIN_MODE_RAMP     = 0x4u,
459 };
460 
461 typedef enum {
462     AUDIO_PORT_ROLE_NONE = 0,
463     AUDIO_PORT_ROLE_SOURCE = 1, // (::android::hardware::audio::common::V4_0::AudioPortRole.NONE implicitly + 1)
464     AUDIO_PORT_ROLE_SINK = 2, // (::android::hardware::audio::common::V4_0::AudioPortRole.SOURCE implicitly + 1)
465 } audio_port_role_t;
466 
467 typedef enum {
468     AUDIO_PORT_TYPE_NONE = 0,
469     AUDIO_PORT_TYPE_DEVICE = 1, // (::android::hardware::audio::common::V4_0::AudioPortType.NONE implicitly + 1)
470     AUDIO_PORT_TYPE_MIX = 2, // (::android::hardware::audio::common::V4_0::AudioPortType.DEVICE implicitly + 1)
471     AUDIO_PORT_TYPE_SESSION = 3, // (::android::hardware::audio::common::V4_0::AudioPortType.MIX implicitly + 1)
472 } audio_port_type_t;
473 
474 enum {
475     AUDIO_PORT_CONFIG_SAMPLE_RATE  = 0x1u,
476     AUDIO_PORT_CONFIG_CHANNEL_MASK = 0x2u,
477     AUDIO_PORT_CONFIG_FORMAT       = 0x4u,
478     AUDIO_PORT_CONFIG_GAIN         = 0x8u,
479 #ifndef AUDIO_NO_SYSTEM_DECLARATIONS
480     AUDIO_PORT_CONFIG_FLAGS        = 0x10u,  // Absent from AudioPortConfigMask, framework only.
481 #endif
482 };
483 
484 typedef enum {
485     AUDIO_LATENCY_LOW = 0,
486     AUDIO_LATENCY_NORMAL = 1, // (::android::hardware::audio::common::V4_0::AudioMixLatencyClass.LOW implicitly + 1)
487 } audio_mix_latency_class_t;
488 
489 typedef enum {
490     MIC_DIRECTION_UNSPECIFIED = 0,
491     MIC_DIRECTION_FRONT = 1,
492     MIC_DIRECTION_BACK = 2,
493     MIC_DIRECTION_EXTERNAL = 3,
494 } audio_microphone_direction_t;
495 #ifdef __cplusplus
496 }
497 #endif
498 
499 #endif  // HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_COMMON_V4_0_EXPORTED_CONSTANTS_H_
500