1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _AUDIO_EFFECTS_H 20 #define _AUDIO_EFFECTS_H 21 #define CONFIG_CACHE 0 22 #define CONFIG_SET 1 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 #define CONFIG_GET 2 25 #define VIRTUALIZER_MODULE 0x00001000 26 #define VIRTUALIZER_ENABLE 0x00001001 27 #define VIRTUALIZER_STRENGTH 0x00001002 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 #define VIRTUALIZER_OUT_TYPE 0x00001003 30 #define VIRTUALIZER_GAIN_ADJUST 0x00001004 31 #define VIRTUALIZER_ENABLE_PARAM_LEN 1 32 #define VIRTUALIZER_STRENGTH_PARAM_LEN 1 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 #define VIRTUALIZER_OUT_TYPE_PARAM_LEN 1 35 #define VIRTUALIZER_GAIN_ADJUST_PARAM_LEN 1 36 #define REVERB_MODULE 0x00002000 37 #define REVERB_ENABLE 0x00002001 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 #define REVERB_MODE 0x00002002 40 #define REVERB_PRESET 0x00002003 41 #define REVERB_WET_MIX 0x00002004 42 #define REVERB_GAIN_ADJUST 0x00002005 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 #define REVERB_ROOM_LEVEL 0x00002006 45 #define REVERB_ROOM_HF_LEVEL 0x00002007 46 #define REVERB_DECAY_TIME 0x00002008 47 #define REVERB_DECAY_HF_RATIO 0x00002009 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 #define REVERB_REFLECTIONS_LEVEL 0x0000200a 50 #define REVERB_REFLECTIONS_DELAY 0x0000200b 51 #define REVERB_LEVEL 0x0000200c 52 #define REVERB_DELAY 0x0000200d 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 #define REVERB_DIFFUSION 0x0000200e 55 #define REVERB_DENSITY 0x0000200f 56 #define REVERB_ENABLE_PARAM_LEN 1 57 #define REVERB_MODE_PARAM_LEN 1 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 #define REVERB_PRESET_PARAM_LEN 1 60 #define REVERB_WET_MIX_PARAM_LEN 1 61 #define REVERB_GAIN_ADJUST_PARAM_LEN 1 62 #define REVERB_ROOM_LEVEL_PARAM_LEN 1 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 #define REVERB_ROOM_HF_LEVEL_PARAM_LEN 1 65 #define REVERB_DECAY_TIME_PARAM_LEN 1 66 #define REVERB_DECAY_HF_RATIO_PARAM_LEN 1 67 #define REVERB_REFLECTIONS_LEVEL_PARAM_LEN 1 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 #define REVERB_REFLECTIONS_DELAY_PARAM_LEN 1 70 #define REVERB_LEVEL_PARAM_LEN 1 71 #define REVERB_DELAY_PARAM_LEN 1 72 #define REVERB_DIFFUSION_PARAM_LEN 1 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 #define REVERB_DENSITY_PARAM_LEN 1 75 #define BASS_BOOST_MODULE 0x00003000 76 #define BASS_BOOST_ENABLE 0x00003001 77 #define BASS_BOOST_MODE 0x00003002 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 #define BASS_BOOST_STRENGTH 0x00003003 80 #define BASS_BOOST_ENABLE_PARAM_LEN 1 81 #define BASS_BOOST_MODE_PARAM_LEN 1 82 #define BASS_BOOST_STRENGTH_PARAM_LEN 1 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 #define EQ_MODULE 0x00004000 85 #define EQ_ENABLE 0x00004001 86 #define EQ_CONFIG 0x00004002 87 #define EQ_NUM_BANDS 0x00004003 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 #define EQ_BAND_LEVELS 0x00004004 90 #define EQ_BAND_LEVEL_RANGE 0x00004005 91 #define EQ_BAND_FREQS 0x00004006 92 #define EQ_SINGLE_BAND_FREQ_RANGE 0x00004007 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 #define EQ_SINGLE_BAND_FREQ 0x00004008 95 #define EQ_BAND_INDEX 0x00004009 96 #define EQ_PRESET_ID 0x0000400a 97 #define EQ_NUM_PRESETS 0x0000400b 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 #define EQ_PRESET_NAME 0x0000400c 100 #define EQ_ENABLE_PARAM_LEN 1 101 #define EQ_CONFIG_PARAM_LEN 3 102 #define EQ_CONFIG_PER_BAND_PARAM_LEN 5 103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 #define EQ_NUM_BANDS_PARAM_LEN 1 105 #define EQ_BAND_LEVELS_PARAM_LEN 13 106 #define EQ_BAND_LEVEL_RANGE_PARAM_LEN 2 107 #define EQ_BAND_FREQS_PARAM_LEN 13 108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 #define EQ_SINGLE_BAND_FREQ_RANGE_PARAM_LEN 2 110 #define EQ_SINGLE_BAND_FREQ_PARAM_LEN 1 111 #define EQ_BAND_INDEX_PARAM_LEN 1 112 #define EQ_PRESET_ID_PARAM_LEN 1 113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 #define EQ_NUM_PRESETS_PARAM_LEN 1 115 #define EQ_PRESET_NAME_PARAM_LEN 32 116 #define EQ_TYPE_NONE 0 117 #define EQ_BASS_BOOST 1 118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 #define EQ_BASS_CUT 2 120 #define EQ_TREBLE_BOOST 3 121 #define EQ_TREBLE_CUT 4 122 #define EQ_BAND_BOOST 5 123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 #define EQ_BAND_CUT 6 125 #define SOFT_VOLUME_MODULE 0x00006000 126 #define SOFT_VOLUME_ENABLE 0x00006001 127 #define SOFT_VOLUME_GAIN_2CH 0x00006002 128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 #define SOFT_VOLUME_GAIN_MASTER 0x00006003 130 #define SOFT_VOLUME_ENABLE_PARAM_LEN 1 131 #define SOFT_VOLUME_GAIN_2CH_PARAM_LEN 2 132 #define SOFT_VOLUME_GAIN_MASTER_PARAM_LEN 1 133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 #define SOFT_VOLUME2_MODULE 0x00007000 135 #define SOFT_VOLUME2_ENABLE 0x00007001 136 #define SOFT_VOLUME2_GAIN_2CH 0x00007002 137 #define SOFT_VOLUME2_GAIN_MASTER 0x00007003 138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 #define SOFT_VOLUME2_ENABLE_PARAM_LEN SOFT_VOLUME_ENABLE_PARAM_LEN 140 #define SOFT_VOLUME2_GAIN_2CH_PARAM_LEN SOFT_VOLUME_GAIN_2CH_PARAM_LEN 141 #define SOFT_VOLUME2_GAIN_MASTER_PARAM_LEN SOFT_VOLUME_GAIN_MASTER_PARAM_LEN 142 #define COMMAND_PAYLOAD_LEN 3 143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144 #define COMMAND_PAYLOAD_SZ (COMMAND_PAYLOAD_LEN * sizeof(uint32_t)) 145 #define MAX_INBAND_PARAM_SZ 4096 146 #define Q27_UNITY (1 << 27) 147 #define Q8_UNITY (1 << 8) 148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149 #define CUSTOM_OPENSL_PRESET 18 150 #define VIRTUALIZER_ENABLE_PARAM_SZ (VIRTUALIZER_ENABLE_PARAM_LEN*sizeof(uint32_t)) 151 #define VIRTUALIZER_STRENGTH_PARAM_SZ (VIRTUALIZER_STRENGTH_PARAM_LEN*sizeof(uint32_t)) 152 #define VIRTUALIZER_OUT_TYPE_PARAM_SZ (VIRTUALIZER_OUT_TYPE_PARAM_LEN*sizeof(uint32_t)) 153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154 #define VIRTUALIZER_GAIN_ADJUST_PARAM_SZ (VIRTUALIZER_GAIN_ADJUST_PARAM_LEN*sizeof(uint32_t)) 155 struct virtualizer_params { 156 uint32_t device; 157 uint32_t enable_flag; 158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159 uint32_t strength; 160 uint32_t out_type; 161 int32_t gain_adjust; 162 }; 163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 #define NUM_OSL_REVERB_PRESETS_SUPPORTED 6 165 #define REVERB_ENABLE_PARAM_SZ (REVERB_ENABLE_PARAM_LEN*sizeof(uint32_t)) 166 #define REVERB_MODE_PARAM_SZ (REVERB_MODE_PARAM_LEN*sizeof(uint32_t)) 167 #define REVERB_PRESET_PARAM_SZ (REVERB_PRESET_PARAM_LEN*sizeof(uint32_t)) 168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169 #define REVERB_WET_MIX_PARAM_SZ (REVERB_WET_MIX_PARAM_LEN*sizeof(uint32_t)) 170 #define REVERB_GAIN_ADJUST_PARAM_SZ (REVERB_GAIN_ADJUST_PARAM_LEN*sizeof(uint32_t)) 171 #define REVERB_ROOM_LEVEL_PARAM_SZ (REVERB_ROOM_LEVEL_PARAM_LEN*sizeof(uint32_t)) 172 #define REVERB_ROOM_HF_LEVEL_PARAM_SZ (REVERB_ROOM_HF_LEVEL_PARAM_LEN*sizeof(uint32_t)) 173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174 #define REVERB_DECAY_TIME_PARAM_SZ (REVERB_DECAY_TIME_PARAM_LEN*sizeof(uint32_t)) 175 #define REVERB_DECAY_HF_RATIO_PARAM_SZ (REVERB_DECAY_HF_RATIO_PARAM_LEN*sizeof(uint32_t)) 176 #define REVERB_REFLECTIONS_LEVEL_PARAM_SZ (REVERB_REFLECTIONS_LEVEL_PARAM_LEN*sizeof(uint32_t)) 177 #define REVERB_REFLECTIONS_DELAY_PARAM_SZ (REVERB_REFLECTIONS_DELAY_PARAM_LEN*sizeof(uint32_t)) 178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179 #define REVERB_LEVEL_PARAM_SZ (REVERB_LEVEL_PARAM_LEN*sizeof(uint32_t)) 180 #define REVERB_DELAY_PARAM_SZ (REVERB_DELAY_PARAM_LEN*sizeof(uint32_t)) 181 #define REVERB_DIFFUSION_PARAM_SZ (REVERB_DIFFUSION_PARAM_LEN*sizeof(uint32_t)) 182 #define REVERB_DENSITY_PARAM_SZ (REVERB_DENSITY_PARAM_LEN*sizeof(uint32_t)) 183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184 struct reverb_params { 185 uint32_t device; 186 uint32_t enable_flag; 187 uint32_t mode; 188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 189 uint32_t preset; 190 uint32_t wet_mix; 191 int32_t gain_adjust; 192 int32_t room_level; 193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 194 int32_t room_hf_level; 195 uint32_t decay_time; 196 uint32_t decay_hf_ratio; 197 int32_t reflections_level; 198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 199 uint32_t reflections_delay; 200 int32_t level; 201 uint32_t delay; 202 uint32_t diffusion; 203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 204 uint32_t density; 205 }; 206 #define BASS_BOOST_ENABLE_PARAM_SZ (BASS_BOOST_ENABLE_PARAM_LEN*sizeof(uint32_t)) 207 #define BASS_BOOST_MODE_PARAM_SZ (BASS_BOOST_MODE_PARAM_LEN*sizeof(uint32_t)) 208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 209 #define BASS_BOOST_STRENGTH_PARAM_SZ (BASS_BOOST_STRENGTH_PARAM_LEN*sizeof(uint32_t)) 210 struct bass_boost_params { 211 uint32_t device; 212 uint32_t enable_flag; 213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 214 uint32_t mode; 215 uint32_t strength; 216 }; 217 #define MAX_EQ_BANDS 12 218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 219 #define MAX_OSL_EQ_BANDS 5 220 #define EQ_ENABLE_PARAM_SZ (EQ_ENABLE_PARAM_LEN*sizeof(uint32_t)) 221 #define EQ_CONFIG_PARAM_SZ (EQ_CONFIG_PARAM_LEN*sizeof(uint32_t)) 222 #define EQ_CONFIG_PER_BAND_PARAM_SZ (EQ_CONFIG_PER_BAND_PARAM_LEN*sizeof(uint32_t)) 223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 224 #define EQ_CONFIG_PARAM_MAX_LEN (EQ_CONFIG_PARAM_LEN+ MAX_EQ_BANDS*EQ_CONFIG_PER_BAND_PARAM_LEN) 225 #define EQ_CONFIG_PARAM_MAX_SZ (EQ_CONFIG_PARAM_MAX_LEN*sizeof(uint32_t)) 226 #define EQ_NUM_BANDS_PARAM_SZ (EQ_NUM_BANDS_PARAM_LEN*sizeof(uint32_t)) 227 #define EQ_BAND_LEVELS_PARAM_SZ (EQ_BAND_LEVELS_PARAM_LEN*sizeof(uint32_t)) 228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 229 #define EQ_BAND_LEVEL_RANGE_PARAM_SZ (EQ_BAND_LEVEL_RANGE_PARAM_LEN*sizeof(uint32_t)) 230 #define EQ_BAND_FREQS_PARAM_SZ (EQ_BAND_FREQS_PARAM_LEN*sizeof(uint32_t)) 231 #define EQ_SINGLE_BAND_FREQ_RANGE_PARAM_SZ (EQ_SINGLE_BAND_FREQ_RANGE_PARAM_LEN*sizeof(uint32_t)) 232 #define EQ_SINGLE_BAND_FREQ_PARAM_SZ (EQ_SINGLE_BAND_FREQ_PARAM_LEN*sizeof(uint32_t)) 233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 234 #define EQ_BAND_INDEX_PARAM_SZ (EQ_BAND_INDEX_PARAM_LEN*sizeof(uint32_t)) 235 #define EQ_PRESET_ID_PARAM_SZ (EQ_PRESET_ID_PARAM_LEN*sizeof(uint32_t)) 236 #define EQ_NUM_PRESETS_PARAM_SZ (EQ_NUM_PRESETS_PARAM_LEN*sizeof(uint8_t)) 237 struct eq_config_t { 238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 239 int32_t eq_pregain; 240 int32_t preset_id; 241 uint32_t num_bands; 242 }; 243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 244 struct eq_per_band_config_t { 245 int32_t band_idx; 246 uint32_t filter_type; 247 uint32_t freq_millihertz; 248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 249 int32_t gain_millibels; 250 uint32_t quality_factor; 251 }; 252 struct eq_per_band_freq_range_t { 253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 254 uint32_t band_index; 255 uint32_t min_freq_millihertz; 256 uint32_t max_freq_millihertz; 257 }; 258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 259 struct eq_params { 260 uint32_t device; 261 uint32_t enable_flag; 262 struct eq_config_t config; 263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 264 struct eq_per_band_config_t per_band_cfg[MAX_EQ_BANDS]; 265 struct eq_per_band_freq_range_t per_band_freq_range[MAX_EQ_BANDS]; 266 uint32_t band_index; 267 uint32_t freq_millihertz; 268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 269 }; 270 #define SOFT_VOLUME_ENABLE_PARAM_SZ (SOFT_VOLUME_ENABLE_PARAM_LEN*sizeof(uint32_t)) 271 #define SOFT_VOLUME_GAIN_MASTER_PARAM_SZ (SOFT_VOLUME_GAIN_MASTER_PARAM_LEN*sizeof(uint32_t)) 272 #define SOFT_VOLUME_GAIN_2CH_PARAM_SZ (SOFT_VOLUME_GAIN_2CH_PARAM_LEN*sizeof(uint16_t)) 273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 274 struct soft_volume_params { 275 uint32_t device; 276 uint32_t enable_flag; 277 uint32_t master_gain; 278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 279 uint32_t left_gain; 280 uint32_t right_gain; 281 }; 282 struct msm_nt_eff_all_config { 283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 284 struct bass_boost_params bass_boost; 285 struct virtualizer_params virtualizer; 286 struct reverb_params reverb; 287 struct eq_params equalizer; 288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 289 struct soft_volume_params saplus_vol; 290 struct soft_volume_params topo_switch_vol; 291 }; 292 #endif 293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 294 295