1 /* 2 * Copyright (C) 2011 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 ANDROID_HARDWARE_AUDIO_HAL_EXPORTED_CONSTANTS_H_ 18 #define ANDROID_HARDWARE_AUDIO_HAL_EXPORTED_CONSTANTS_H_ 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 typedef enum { 25 AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED = 0u, 26 AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT = 1u, 27 AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED = 2u, 28 } audio_microphone_channel_mapping_t; 29 30 typedef enum { 31 AUDIO_MICROPHONE_LOCATION_UNKNOWN = 0u, 32 AUDIO_MICROPHONE_LOCATION_MAINBODY = 1u, 33 AUDIO_MICROPHONE_LOCATION_MAINBODY_MOVABLE = 2u, 34 AUDIO_MICROPHONE_LOCATION_PERIPHERAL = 3u, 35 } audio_microphone_location_t; 36 37 typedef enum { 38 AUDIO_MICROPHONE_DIRECTIONALITY_UNKNOWN = 0u, 39 AUDIO_MICROPHONE_DIRECTIONALITY_OMNI = 1u, 40 AUDIO_MICROPHONE_DIRECTIONALITY_BI_DIRECTIONAL = 2u, 41 AUDIO_MICROPHONE_DIRECTIONALITY_CARDIOID = 3u, 42 AUDIO_MICROPHONE_DIRECTIONALITY_HYPER_CARDIOID = 4u, 43 AUDIO_MICROPHONE_DIRECTIONALITY_SUPER_CARDIOID = 5u, 44 } audio_microphone_directionality_t; 45 46 typedef enum { 47 MIC_DIRECTION_UNSPECIFIED = 0, 48 MIC_DIRECTION_FRONT = 1, 49 MIC_DIRECTION_BACK = 2, 50 MIC_DIRECTION_EXTERNAL = 3, 51 } audio_microphone_direction_t; 52 53 typedef enum { 54 AUDIO_DUAL_MONO_MODE_OFF = 0, 55 AUDIO_DUAL_MONO_MODE_LR = 1, 56 AUDIO_DUAL_MONO_MODE_LL = 2, 57 AUDIO_DUAL_MONO_MODE_RR = 3, 58 } audio_dual_mono_mode_t; 59 60 typedef enum { 61 AUDIO_TIMESTRETCH_STRETCH_DEFAULT = 0, 62 AUDIO_TIMESTRETCH_STRETCH_VOICE = 1, 63 } audio_timestretch_stretch_mode_t; 64 65 enum { 66 HAL_AUDIO_TIMESTRETCH_FALLBACK_MUTE = 1, 67 HAL_AUDIO_TIMESTRETCH_FALLBACK_FAIL = 2, 68 }; 69 70 typedef enum { 71 AUDIO_LATENCY_MODE_FREE = 0, 72 AUDIO_LATENCY_MODE_LOW = 1, 73 AUDIO_LATENCY_MODE_DYNAMIC_SPATIAL_AUDIO_SOFTWARE = 2, 74 AUDIO_LATENCY_MODE_DYNAMIC_SPATIAL_AUDIO_HARDWARE = 3, 75 } audio_latency_mode_t; 76 77 #ifdef __cplusplus 78 } 79 #endif 80 81 #endif // ANDROID_HARDWARE_AUDIO_HAL_EXPORTED_CONSTANTS_H_ 82