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