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