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 COMMAND_PAYLOAD_LEN 3
126 #define COMMAND_PAYLOAD_SZ (COMMAND_PAYLOAD_LEN * sizeof(uint32_t))
127 #define MAX_INBAND_PARAM_SZ 4096
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 #define Q27_UNITY (1 << 27)
130 #define Q8_UNITY (1 << 8)
131 #define CUSTOM_OPENSL_PRESET 18
132 #define VIRTUALIZER_ENABLE_PARAM_SZ   (VIRTUALIZER_ENABLE_PARAM_LEN*sizeof(uint32_t))
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 #define VIRTUALIZER_STRENGTH_PARAM_SZ   (VIRTUALIZER_STRENGTH_PARAM_LEN*sizeof(uint32_t))
135 #define VIRTUALIZER_OUT_TYPE_PARAM_SZ   (VIRTUALIZER_OUT_TYPE_PARAM_LEN*sizeof(uint32_t))
136 #define VIRTUALIZER_GAIN_ADJUST_PARAM_SZ   (VIRTUALIZER_GAIN_ADJUST_PARAM_LEN*sizeof(uint32_t))
137 struct virtualizer_params {
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139  uint32_t device;
140  uint32_t enable_flag;
141  uint32_t strength;
142  uint32_t out_type;
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144  int32_t gain_adjust;
145 };
146 #define NUM_OSL_REVERB_PRESETS_SUPPORTED 6
147 #define REVERB_ENABLE_PARAM_SZ   (REVERB_ENABLE_PARAM_LEN*sizeof(uint32_t))
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 #define REVERB_MODE_PARAM_SZ   (REVERB_MODE_PARAM_LEN*sizeof(uint32_t))
150 #define REVERB_PRESET_PARAM_SZ   (REVERB_PRESET_PARAM_LEN*sizeof(uint32_t))
151 #define REVERB_WET_MIX_PARAM_SZ   (REVERB_WET_MIX_PARAM_LEN*sizeof(uint32_t))
152 #define REVERB_GAIN_ADJUST_PARAM_SZ   (REVERB_GAIN_ADJUST_PARAM_LEN*sizeof(uint32_t))
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 #define REVERB_ROOM_LEVEL_PARAM_SZ   (REVERB_ROOM_LEVEL_PARAM_LEN*sizeof(uint32_t))
155 #define REVERB_ROOM_HF_LEVEL_PARAM_SZ   (REVERB_ROOM_HF_LEVEL_PARAM_LEN*sizeof(uint32_t))
156 #define REVERB_DECAY_TIME_PARAM_SZ   (REVERB_DECAY_TIME_PARAM_LEN*sizeof(uint32_t))
157 #define REVERB_DECAY_HF_RATIO_PARAM_SZ   (REVERB_DECAY_HF_RATIO_PARAM_LEN*sizeof(uint32_t))
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 #define REVERB_REFLECTIONS_LEVEL_PARAM_SZ   (REVERB_REFLECTIONS_LEVEL_PARAM_LEN*sizeof(uint32_t))
160 #define REVERB_REFLECTIONS_DELAY_PARAM_SZ   (REVERB_REFLECTIONS_DELAY_PARAM_LEN*sizeof(uint32_t))
161 #define REVERB_LEVEL_PARAM_SZ   (REVERB_LEVEL_PARAM_LEN*sizeof(uint32_t))
162 #define REVERB_DELAY_PARAM_SZ   (REVERB_DELAY_PARAM_LEN*sizeof(uint32_t))
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 #define REVERB_DIFFUSION_PARAM_SZ   (REVERB_DIFFUSION_PARAM_LEN*sizeof(uint32_t))
165 #define REVERB_DENSITY_PARAM_SZ   (REVERB_DENSITY_PARAM_LEN*sizeof(uint32_t))
166 struct reverb_params {
167  uint32_t device;
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169  uint32_t enable_flag;
170  uint32_t mode;
171  uint32_t preset;
172  uint32_t wet_mix;
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174  int32_t gain_adjust;
175  int32_t room_level;
176  int32_t room_hf_level;
177  uint32_t decay_time;
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179  uint32_t decay_hf_ratio;
180  int32_t reflections_level;
181  uint32_t reflections_delay;
182  int32_t level;
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184  uint32_t delay;
185  uint32_t diffusion;
186  uint32_t density;
187 };
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189 #define BASS_BOOST_ENABLE_PARAM_SZ   (BASS_BOOST_ENABLE_PARAM_LEN*sizeof(uint32_t))
190 #define BASS_BOOST_MODE_PARAM_SZ   (BASS_BOOST_MODE_PARAM_LEN*sizeof(uint32_t))
191 #define BASS_BOOST_STRENGTH_PARAM_SZ   (BASS_BOOST_STRENGTH_PARAM_LEN*sizeof(uint32_t))
192 struct bass_boost_params {
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194  uint32_t device;
195  uint32_t enable_flag;
196  uint32_t mode;
197  uint32_t strength;
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199 };
200 #define MAX_EQ_BANDS 12
201 #define MAX_OSL_EQ_BANDS 5
202 #define EQ_ENABLE_PARAM_SZ   (EQ_ENABLE_PARAM_LEN*sizeof(uint32_t))
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204 #define EQ_CONFIG_PARAM_SZ   (EQ_CONFIG_PARAM_LEN*sizeof(uint32_t))
205 #define EQ_CONFIG_PER_BAND_PARAM_SZ   (EQ_CONFIG_PER_BAND_PARAM_LEN*sizeof(uint32_t))
206 #define EQ_CONFIG_PARAM_MAX_LEN (EQ_CONFIG_PARAM_LEN+  MAX_EQ_BANDS*EQ_CONFIG_PER_BAND_PARAM_LEN)
207 #define EQ_CONFIG_PARAM_MAX_SZ   (EQ_CONFIG_PARAM_MAX_LEN*sizeof(uint32_t))
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209 #define EQ_NUM_BANDS_PARAM_SZ   (EQ_NUM_BANDS_PARAM_LEN*sizeof(uint32_t))
210 #define EQ_BAND_LEVELS_PARAM_SZ   (EQ_BAND_LEVELS_PARAM_LEN*sizeof(uint32_t))
211 #define EQ_BAND_LEVEL_RANGE_PARAM_SZ   (EQ_BAND_LEVEL_RANGE_PARAM_LEN*sizeof(uint32_t))
212 #define EQ_BAND_FREQS_PARAM_SZ   (EQ_BAND_FREQS_PARAM_LEN*sizeof(uint32_t))
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 #define EQ_SINGLE_BAND_FREQ_RANGE_PARAM_SZ   (EQ_SINGLE_BAND_FREQ_RANGE_PARAM_LEN*sizeof(uint32_t))
215 #define EQ_SINGLE_BAND_FREQ_PARAM_SZ   (EQ_SINGLE_BAND_FREQ_PARAM_LEN*sizeof(uint32_t))
216 #define EQ_BAND_INDEX_PARAM_SZ   (EQ_BAND_INDEX_PARAM_LEN*sizeof(uint32_t))
217 #define EQ_PRESET_ID_PARAM_SZ   (EQ_PRESET_ID_PARAM_LEN*sizeof(uint32_t))
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219 #define EQ_NUM_PRESETS_PARAM_SZ   (EQ_NUM_PRESETS_PARAM_LEN*sizeof(uint8_t))
220 struct eq_config_t {
221  int32_t eq_pregain;
222  int32_t preset_id;
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224  uint32_t num_bands;
225 };
226 struct eq_per_band_config_t {
227  int32_t band_idx;
228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229  uint32_t filter_type;
230  uint32_t freq_millihertz;
231  int32_t gain_millibels;
232  uint32_t quality_factor;
233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234 };
235 struct eq_per_band_freq_range_t {
236  uint32_t band_index;
237  uint32_t min_freq_millihertz;
238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239  uint32_t max_freq_millihertz;
240 };
241 struct eq_params {
242  uint32_t device;
243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244  uint32_t enable_flag;
245  struct eq_config_t config;
246  struct eq_per_band_config_t per_band_cfg[MAX_EQ_BANDS];
247  struct eq_per_band_freq_range_t per_band_freq_range[MAX_EQ_BANDS];
248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249  uint32_t band_index;
250  uint32_t freq_millihertz;
251 };
252 #endif
253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254 
255