1 /* Copyright 2018 The Chromium OS Authors. All rights reserved.
2  * Use of this source code is governed by a BSD-style license that can be
3  * found in the LICENSE file.
4  */
5 
6 #include <syslog.h>
7 
8 #include "aec_config.h"
9 #include "iniparser_wrapper.h"
10 
11 static const unsigned int MAX_INI_NAME_LEN = 63;
12 
13 #define AEC_CONFIG_NAME "aec.ini"
14 
15 #define AEC_GET_INT(ini, category, key)			\
16 	iniparser_getint(				\
17 		ini, AEC_ ## category ## _ ## key,	\
18 		AEC_ ## category ## _ ## key ## _VALUE)
19 
20 #define AEC_GET_FLOAT(ini, category, key)		\
21 	iniparser_getdouble(				\
22 		ini, AEC_ ## category ## _ ## key,	\
23 		AEC_ ## category ## _ ## key ## _VALUE)
24 
aec_config_get(const char * device_config_dir)25 struct aec_config *aec_config_get(const char *device_config_dir)
26 {
27 	struct aec_config *config;
28 	char ini_name[MAX_INI_NAME_LEN + 1];
29 	dictionary *ini;
30 
31 	snprintf(ini_name, MAX_INI_NAME_LEN, "%s/%s",
32 		 device_config_dir, AEC_CONFIG_NAME);
33 	ini_name[MAX_INI_NAME_LEN] = '\0';
34 
35 	ini = iniparser_load_wrapper(ini_name);
36 	if (ini == NULL) {
37 		syslog(LOG_DEBUG, "No ini file %s", ini_name);
38 		return NULL;
39 	}
40 
41 	config = (struct aec_config *)calloc(1, sizeof(*config));
42 
43 	config->delay.default_delay =
44 		AEC_GET_INT(ini, DELAY, DEFAULT_DELAY);
45 	config->delay.down_sampling_factor =
46 		AEC_GET_INT(ini, DELAY, DOWN_SAMPLING_FACTOR);
47 	config->delay.num_filters =
48 		AEC_GET_INT(ini, DELAY, NUM_FILTERS);
49 	config->delay.api_call_jitter_blocks =
50 		AEC_GET_INT(ini, DELAY, API_CALL_JITTER_BLOCKS);
51 	config->delay.min_echo_path_delay_blocks =
52 		AEC_GET_INT(ini, DELAY, MIN_ECHO_PATH_DELAY_BLOCKS);
53 	config->delay.delay_headroom_blocks =
54 		AEC_GET_INT(ini, DELAY, DELAY_HEADROOM_BLOCKS);
55 	config->delay.hysteresis_limit_1_blocks =
56 		AEC_GET_INT(ini, DELAY, HYSTERESIS_LIMIT_1_BLOCKS);
57 	config->delay.hysteresis_limit_2_blocks =
58 		AEC_GET_INT(ini, DELAY, HYSTERESIS_LIMIT_2_BLOCKS);
59 	config->delay.skew_hysteresis_blocks =
60 		AEC_GET_INT(ini, DELAY, SKEW_HYSTERESIS_BLOCKS);
61 	config->delay.fixed_capture_delay_samples =
62 		AEC_GET_INT(ini, DELAY, FIXED_CAPTURE_DELAY_SAMPLES);
63 
64 	config->filter.main.length_blocks =
65 		AEC_GET_INT(ini, FILTER_MAIN, LENGTH_BLOCKS);
66 	config->filter.main.leakage_converged =
67 		AEC_GET_FLOAT(ini, FILTER_MAIN, LEAKAGE_CONVERGED);
68 	config->filter.main.leakage_diverged =
69 		AEC_GET_FLOAT(ini, FILTER_MAIN, LEAKAGE_DIVERGED);
70 	config->filter.main.error_floor =
71 		AEC_GET_FLOAT(ini, FILTER_MAIN, ERROR_FLOOR);
72 	config->filter.main.noise_gate =
73 		AEC_GET_FLOAT(ini, FILTER_MAIN, NOISE_GATE);
74 
75 	config->filter.shadow.length_blocks =
76 		AEC_GET_INT(ini, FILTER_SHADOW, LENGTH_BLOCKS);
77 	config->filter.shadow.rate =
78 		AEC_GET_FLOAT(ini, FILTER_SHADOW, RATE);
79 	config->filter.shadow.noise_gate =
80 		AEC_GET_FLOAT(ini, FILTER_SHADOW, NOISE_GATE);
81 
82 	config->filter.main_initial.length_blocks =
83 		AEC_GET_INT(ini, FILTER_MAIN_INIT, LENGTH_BLOCKS);
84 	config->filter.main_initial.leakage_converged =
85 		AEC_GET_FLOAT(ini, FILTER_MAIN_INIT, LEAKAGE_CONVERGED);
86 	config->filter.main_initial.leakage_diverged =
87 		AEC_GET_FLOAT(ini, FILTER_MAIN_INIT, LEAKAGE_DIVERGED);
88 	config->filter.main_initial.error_floor =
89 		AEC_GET_FLOAT(ini, FILTER_MAIN_INIT, ERROR_FLOOR);
90 	config->filter.main_initial.noise_gate =
91 		AEC_GET_FLOAT(ini, FILTER_MAIN_INIT, NOISE_GATE);
92 
93 	config->filter.shadow_initial.length_blocks =
94 		AEC_GET_INT(ini, FILTER_SHADOW_INIT, LENGTH_BLOCKS);
95 	config->filter.shadow_initial.rate =
96 		AEC_GET_FLOAT(ini, FILTER_SHADOW_INIT, RATE);
97 	config->filter.shadow_initial.noise_gate =
98 		AEC_GET_FLOAT(ini, FILTER_SHADOW_INIT, NOISE_GATE);
99 
100 	config->filter.config_change_duration_blocks =
101 		AEC_GET_INT(ini, FILTER, CONFIG_CHANGE_DURATION_BLOCKS);
102 	config->filter.initial_state_seconds =
103 		AEC_GET_FLOAT(ini, FILTER, INITIAL_STATE_SECONDS);
104 	config->filter.conservative_initial_phase =
105 		AEC_GET_INT(ini, FILTER, CONSERVATIVE_INITIAL_PHASE);
106 	config->filter.enable_shadow_filter_output_usage =
107 		AEC_GET_INT(ini, FILTER, ENABLE_SHADOW_FILTER_OUTPUT_USAGE);
108 
109 	config->erle.min =
110 		AEC_GET_FLOAT(ini, ERLE, MIN);
111 	config->erle.max_l =
112 		AEC_GET_FLOAT(ini, ERLE, MAX_L);
113 	config->erle.max_h =
114 		AEC_GET_FLOAT(ini, ERLE, MAX_H);
115 	config->erle.onset_detection =
116 		AEC_GET_INT(ini, ERLE, ONSET_DETECTION);
117 
118 	config->ep_strength.lf =
119 		AEC_GET_FLOAT(ini, EP_STRENGTH, LF);
120 	config->ep_strength.mf =
121 		AEC_GET_FLOAT(ini, EP_STRENGTH, MF);
122 	config->ep_strength.hf =
123 		AEC_GET_FLOAT(ini, EP_STRENGTH, HF);
124 	config->ep_strength.default_len =
125 		AEC_GET_FLOAT(ini, EP_STRENGTH, DEFAULT_LEN);
126 	config->ep_strength.reverb_based_on_render =
127 		AEC_GET_INT(ini, EP_STRENGTH, REVERB_BASED_ON_RENDER);
128 	config->ep_strength.bounded_erl =
129 		AEC_GET_INT(ini, EP_STRENGTH, BOUNDED_ERL);
130 	config->ep_strength.echo_can_saturate =
131 		AEC_GET_INT(ini, EP_STRENGTH, ECHO_CAN_SATURATE);
132 
133 	config->gain_mask.m0 =
134 		AEC_GET_FLOAT(ini, GAIN_MASK, M0);
135 	config->gain_mask.m1 =
136 		AEC_GET_FLOAT(ini, GAIN_MASK, M1);
137 	config->gain_mask.m2 =
138 		AEC_GET_FLOAT(ini, GAIN_MASK, M2);
139 	config->gain_mask.m3 =
140 		AEC_GET_FLOAT(ini, GAIN_MASK, M3);
141 	config->gain_mask.m5 =
142 		AEC_GET_FLOAT(ini, GAIN_MASK, M5);
143 	config->gain_mask.m6 =
144 		AEC_GET_FLOAT(ini, GAIN_MASK, M6);
145 	config->gain_mask.m7 =
146 		AEC_GET_FLOAT(ini, GAIN_MASK, M7);
147 	config->gain_mask.m8 =
148 		AEC_GET_FLOAT(ini, GAIN_MASK, M8);
149 	config->gain_mask.m9 =
150 		AEC_GET_FLOAT(ini, GAIN_MASK, M9);
151 	config->gain_mask.gain_curve_offset =
152 		AEC_GET_FLOAT(ini, GAIN_MASK, GAIN_CURVE_OFFSET);
153 	config->gain_mask.gain_curve_slope =
154 		AEC_GET_FLOAT(ini, GAIN_MASK, GAIN_CURVE_SLOPE);
155 	config->gain_mask.temporal_masking_lf =
156 		AEC_GET_FLOAT(ini, GAIN_MASK, TEMPORAL_MASKING_LF);
157 	config->gain_mask.temporal_masking_hf =
158 		AEC_GET_FLOAT(ini, GAIN_MASK, TEMPORAL_MASKING_HF);
159 	config->gain_mask.temporal_masking_lf_bands =
160 		AEC_GET_INT(ini, GAIN_MASK, TEMPORAL_MASKING_LF_BANDS);
161 
162 	config->echo_audibility.low_render_limit =
163 		AEC_GET_FLOAT(ini, ECHO_AUDIBILITY, LOW_RENDER_LIMIT);
164 	config->echo_audibility.normal_render_limit =
165 		AEC_GET_FLOAT(ini, ECHO_AUDIBILITY, NORMAL_RENDER_LIMIT);
166 	config->echo_audibility.floor_power =
167 		AEC_GET_FLOAT(ini, ECHO_AUDIBILITY, FLOOR_POWER);
168 	config->echo_audibility.audibility_threshold_lf =
169 		AEC_GET_FLOAT(ini, ECHO_AUDIBILITY, AUDIBILITY_THRESHOLD_LF);
170 	config->echo_audibility.audibility_threshold_mf =
171 		AEC_GET_FLOAT(ini, ECHO_AUDIBILITY, AUDIBILITY_THRESHOLD_MF);
172 	config->echo_audibility.audibility_threshold_hf =
173 		AEC_GET_FLOAT(ini, ECHO_AUDIBILITY, AUDIBILITY_THRESHOLD_HF);
174 	config->echo_audibility.use_stationary_properties =
175 		AEC_GET_INT(ini, ECHO_AUDIBILITY, USE_STATIONARY_PROPERTIES);
176 
177 	config->render_levels.active_render_limit =
178 		AEC_GET_FLOAT(ini, RENDER_LEVELS, ACTIVE_RENDER_LIMIT);
179 	config->render_levels.poor_excitation_render_limit =
180 		AEC_GET_FLOAT(ini, RENDER_LEVELS, POOR_EXCITATION_RENDER_LIMIT);
181 	config->render_levels.poor_excitation_render_limit_ds8 =
182 		AEC_GET_FLOAT(ini, RENDER_LEVELS, POOR_EXCITATION_RENDER_LIMIT_DS8);
183 
184 	config->echo_removal_control.gain_rampup.initial_gain =
185 		AEC_GET_FLOAT(ini, ECHO_REMOVAL_CTL, INITIAL_GAIN);
186 	config->echo_removal_control.gain_rampup.first_non_zero_gain =
187 		AEC_GET_FLOAT(ini, ECHO_REMOVAL_CTL, FIRST_NON_ZERO_GAIN);
188 	config->echo_removal_control.gain_rampup.non_zero_gain_blocks =
189 		AEC_GET_INT(ini, ECHO_REMOVAL_CTL, NON_ZERO_GAIN_BLOCKS);
190 	config->echo_removal_control.gain_rampup.full_gain_blocks =
191 		AEC_GET_INT(ini, ECHO_REMOVAL_CTL, FULL_GAIN_BLOCKS);
192 	config->echo_removal_control.has_clock_drift =
193 		AEC_GET_INT(ini, ECHO_REMOVAL_CTL, HAS_CLOCK_DRIFT);
194 	config->echo_removal_control.linear_and_stable_echo_path =
195 		AEC_GET_INT(ini, ECHO_REMOVAL_CTL, LINEAR_AND_STABLE_ECHO_PATH);
196 
197 	config->echo_model.noise_floor_hold =
198 		AEC_GET_INT(ini, ECHO_MODEL, NOISE_FLOOR_HOLD);
199 	config->echo_model.min_noise_floor_power =
200 		AEC_GET_FLOAT(ini, ECHO_MODEL, MIN_NOISE_FLOOR_POWER);
201 	config->echo_model.stationary_gate_slope =
202 		AEC_GET_FLOAT(ini, ECHO_MODEL, STATIONARY_GATE_SLOPE);
203 	config->echo_model.noise_gate_power =
204 		AEC_GET_FLOAT(ini, ECHO_MODEL, NOISE_GATE_POWER);
205 	config->echo_model.noise_gate_slope =
206 		AEC_GET_FLOAT(ini, ECHO_MODEL, NOISE_GATE_SLOPE);
207 	config->echo_model.render_pre_window_size =
208 		AEC_GET_INT(ini, ECHO_MODEL, RENDER_PRE_WINDOW_SIZE);
209 	config->echo_model.render_post_window_size =
210 		AEC_GET_INT(ini, ECHO_MODEL, RENDER_POST_WINDOW_SIZE);
211 	config->echo_model.render_pre_window_size_init =
212 		AEC_GET_INT(ini, ECHO_MODEL, RENDER_PRE_WINDOW_SIZE_INIT);
213 	config->echo_model.render_post_window_size_init =
214 		AEC_GET_INT(ini, ECHO_MODEL, RENDER_POST_WINDOW_SIZE_INIT);
215 	config->echo_model.nonlinear_hold =
216 		AEC_GET_FLOAT(ini, ECHO_MODEL, NONLINEAR_HOLD);
217 	config->echo_model.nonlinear_release =
218 		AEC_GET_FLOAT(ini, ECHO_MODEL, NONLINEAR_RELEASE);
219 
220 	config->suppressor.nearend_average_blocks =
221 		AEC_GET_INT(ini, SUPPRESSOR, NEAREND_AVERAGE_BLOCKS);
222 
223 	config->suppressor.normal_tuning.mask_lf.enr_transparent =
224 		AEC_GET_FLOAT(ini, SUPPRESSOR_NORMAL_TUNING,
225 			      MASK_LF_ENR_TRANSPARENT);
226 	config->suppressor.normal_tuning.mask_lf.enr_suppress =
227 		AEC_GET_FLOAT(ini, SUPPRESSOR_NORMAL_TUNING,
228 			      MASK_LF_ENR_SUPPRESS);
229 	config->suppressor.normal_tuning.mask_lf.emr_transparent =
230 		AEC_GET_FLOAT(ini, SUPPRESSOR_NORMAL_TUNING,
231 			      MASK_LF_EMR_TRANSPARENT);
232 	config->suppressor.normal_tuning.mask_hf.enr_transparent =
233 		AEC_GET_FLOAT(ini, SUPPRESSOR_NORMAL_TUNING,
234 			      MASK_HF_ENR_TRANSPARENT);
235 	config->suppressor.normal_tuning.mask_hf.enr_suppress =
236 		AEC_GET_FLOAT(ini, SUPPRESSOR_NORMAL_TUNING,
237 			      MASK_HF_ENR_SUPPRESS);
238 	config->suppressor.normal_tuning.mask_hf.emr_transparent =
239 		AEC_GET_FLOAT(ini, SUPPRESSOR_NORMAL_TUNING,
240 			      MASK_HF_EMR_TRANSPARENT);
241 	config->suppressor.normal_tuning.max_inc_factor =
242 		AEC_GET_FLOAT(ini, SUPPRESSOR_NORMAL_TUNING, MAX_INC_FACTOR);
243 	config->suppressor.normal_tuning.max_dec_factor_lf =
244 		AEC_GET_FLOAT(ini, SUPPRESSOR_NORMAL_TUNING, MAX_DEC_FACTOR_LF);
245 
246 	config->suppressor.nearend_tuning.mask_lf.enr_transparent =
247 		AEC_GET_FLOAT(ini, SUPPRESSOR_NEAREND_TUNING,
248 			      MASK_LF_ENR_TRANSPARENT);
249 	config->suppressor.nearend_tuning.mask_lf.enr_suppress =
250 		AEC_GET_FLOAT(ini, SUPPRESSOR_NEAREND_TUNING,
251 			      MASK_LF_ENR_SUPPRESS);
252 	config->suppressor.nearend_tuning.mask_lf.emr_transparent =
253 		AEC_GET_FLOAT(ini, SUPPRESSOR_NEAREND_TUNING,
254 			      MASK_LF_EMR_TRANSPARENT);
255 	config->suppressor.nearend_tuning.mask_hf.enr_transparent =
256 		AEC_GET_FLOAT(ini, SUPPRESSOR_NEAREND_TUNING,
257 			      MASK_HF_ENR_TRANSPARENT);
258 	config->suppressor.nearend_tuning.mask_hf.enr_suppress =
259 		AEC_GET_FLOAT(ini, SUPPRESSOR_NEAREND_TUNING,
260 			      MASK_HF_ENR_SUPPRESS);
261 	config->suppressor.nearend_tuning.mask_hf.emr_transparent =
262 		AEC_GET_FLOAT(ini, SUPPRESSOR_NEAREND_TUNING,
263 			      MASK_HF_EMR_TRANSPARENT);
264 	config->suppressor.nearend_tuning.max_inc_factor =
265 		AEC_GET_FLOAT(ini, SUPPRESSOR_NEAREND_TUNING, MAX_INC_FACTOR);
266 	config->suppressor.nearend_tuning.max_dec_factor_lf =
267 		AEC_GET_FLOAT(ini, SUPPRESSOR_NEAREND_TUNING, MAX_DEC_FACTOR_LF);
268 
269 	config->suppressor.dominant_nearend_detection.enr_threshold =
270 		AEC_GET_FLOAT(ini, SUPPRESSOR_DOMINANT_NEAREND_DETECTION,
271 			ENR_THRESHOLD);
272 	config->suppressor.dominant_nearend_detection.snr_threshold =
273 		AEC_GET_FLOAT(ini, SUPPRESSOR_DOMINANT_NEAREND_DETECTION,
274 			SNR_THRESHOLD);
275 	config->suppressor.dominant_nearend_detection.hold_duration =
276 		AEC_GET_INT(ini, SUPPRESSOR_DOMINANT_NEAREND_DETECTION,
277 			HOLD_DURATION);
278 	config->suppressor.dominant_nearend_detection.trigger_threshold =
279 		AEC_GET_INT(ini, SUPPRESSOR_DOMINANT_NEAREND_DETECTION,
280 			TRIGGER_THRESHOLD);
281 
282 	config->suppressor.high_bands_suppression.enr_threshold =
283 		AEC_GET_FLOAT(ini, SUPPRESSOR_HIGH_BANDS_SUPPRESSION,
284 			ENR_THRESHOLD);
285 	config->suppressor.high_bands_suppression.max_gain_during_echo =
286 		AEC_GET_FLOAT(ini, SUPPRESSOR_HIGH_BANDS_SUPPRESSION,
287 			MAX_GAIN_DURING_ECHO);
288 
289 	config->suppressor.floor_first_increase =
290 		AEC_GET_FLOAT(ini, SUPPRESSOR, FLOOR_FIRST_INCREASE);
291 	config->suppressor.enforce_transparent =
292 		AEC_GET_INT(ini, SUPPRESSOR, ENFORCE_TRANSPARENT);
293 	config->suppressor.enforce_empty_higher_bands =
294 		AEC_GET_INT(ini, SUPPRESSOR, ENFORCE_EMPTY_HIGHER_BANDS);
295 
296 	return config;
297 }
298 
aec_config_dump(struct aec_config * config)299 void aec_config_dump(struct aec_config *config)
300 {
301 	syslog(LOG_ERR, "---- aec config dump ----");
302 	syslog(LOG_ERR, "Delay:");
303 	syslog(LOG_ERR, "    default_delay %zu sampling_factor %zu num_filters %zu",
304 			config->delay.default_delay,
305 			config->delay.down_sampling_factor,
306 			config->delay.num_filters);
307 	syslog(LOG_ERR, "    api_call_jitter_blocks %zu, min_echo_path_delay_blocks %zu",
308 			config->delay.api_call_jitter_blocks,
309 			config->delay.min_echo_path_delay_blocks);
310 	syslog(LOG_ERR, "    delay_headroom_blocks %zu, hysteresis_limit_1_blocks %zu",
311 			config->delay.delay_headroom_blocks,
312 			config->delay.hysteresis_limit_1_blocks);
313 	syslog(LOG_ERR, "    hysteresis_limit_2_blocks %zu, skew_hysteresis_blocks %zu",
314 			config->delay.hysteresis_limit_2_blocks,
315 			config->delay.skew_hysteresis_blocks);
316 	syslog(LOG_ERR, "    fixed_capture_delay_samples %zu",
317 			config->delay.fixed_capture_delay_samples);
318 
319 	syslog(LOG_ERR, "Filter main configuration:");
320 	syslog(LOG_ERR, "    length_blocks %zu, leakage_converged %f, leakage_diverged %f",
321 			config->filter.main.length_blocks,
322 			config->filter.main.leakage_converged,
323 			config->filter.main.leakage_diverged);
324 	syslog(LOG_ERR, "    error_floor %f, noise_gate %f",
325 			config->filter.main.error_floor,
326 			config->filter.main.noise_gate);
327 	syslog(LOG_ERR, "Filter shadow configuration:");
328 	syslog(LOG_ERR, "    length_blocks %zu, rate %f, noise_gate %f",
329 			config->filter.shadow.length_blocks,
330 			config->filter.shadow.rate,
331 			config->filter.shadow.noise_gate);
332 	syslog(LOG_ERR, "Filter main initial configuration:");
333 	syslog(LOG_ERR, "    length_blocks %zu, leakage_converged %f",
334 			config->filter.main_initial.length_blocks,
335 			config->filter.main_initial.leakage_converged);
336 	syslog(LOG_ERR, "    leakage_diverged %f, error_floor %f, noise_gate %f",
337 			config->filter.main_initial.leakage_diverged,
338 			config->filter.main_initial.error_floor,
339 			config->filter.main_initial.noise_gate);
340 	syslog(LOG_ERR, "Filter shadow initial configuration:");
341 	syslog(LOG_ERR, "    length_blocks %zu, rate %f, noise_gate %f",
342 			config->filter.shadow_initial.length_blocks,
343 			config->filter.shadow_initial.rate,
344 			config->filter.shadow_initial.noise_gate);
345 	syslog(LOG_ERR, "Filter:    config_change_duration_blocks %d",
346 			config->filter.config_change_duration_blocks);
347 	syslog(LOG_ERR, "    initial_state_seconds %f",
348 			config->filter.initial_state_seconds);
349 	syslog(LOG_ERR, "    conservative_initial_phase %d",
350 			config->filter.conservative_initial_phase);
351 	syslog(LOG_ERR, "    enable_shadow_filter_output_usage %d",
352 			config->filter.enable_shadow_filter_output_usage);
353 	syslog(LOG_ERR, "Erle: min %f max_l %f max_h %f onset_detection %d",
354 			config->erle.min, config->erle.max_l,
355 			config->erle.max_h, config->erle.onset_detection);
356 	syslog(LOG_ERR, "Ep strength: lf %f mf %f hf %f default_len %f",
357 			config->ep_strength.lf,
358 			config->ep_strength.mf,
359 			config->ep_strength.hf,
360 			config->ep_strength.default_len);
361 	syslog(LOG_ERR, "    echo_can_saturate %d, bounded_erl %d,"
362 			"    ep_strength.reverb_based_on_render %d",
363 			config->ep_strength.echo_can_saturate,
364 			config->ep_strength.bounded_erl,
365 			config->ep_strength.reverb_based_on_render);
366 	syslog(LOG_ERR, "Gain mask: m0 %f m1 %f m2 %f m3 %f m5 %f",
367 			config->gain_mask.m0,
368 			config->gain_mask.m1,
369 			config->gain_mask.m2,
370 			config->gain_mask.m3,
371 			config->gain_mask.m5);
372 	syslog(LOG_ERR, "    m6 %f m7 %f m8 %f m9 %f",
373 			config->gain_mask.m6,
374 			config->gain_mask.m7,
375 			config->gain_mask.m8,
376 			config->gain_mask.m9);
377 	syslog(LOG_ERR, "    gain_curve offset %f, gain_curve_slope %f",
378 			config->gain_mask.gain_curve_offset,
379 			config->gain_mask.gain_curve_slope);
380 	syslog(LOG_ERR, "    temporal_masking_lf %f, temporal_masking_hf %f",
381 			config->gain_mask.temporal_masking_lf,
382 			config->gain_mask.temporal_masking_hf);
383 	syslog(LOG_ERR, "    temporal_masking_lf_bands %zu",
384 			config->gain_mask.temporal_masking_lf_bands);
385 	syslog(LOG_ERR, "Echo audibility:");
386 	syslog(LOG_ERR, "    low_render_limit %f, normal_render_limit %f",
387 			config->echo_audibility.low_render_limit,
388 			config->echo_audibility.normal_render_limit);
389 	syslog(LOG_ERR, "    floor_power %f, audibility_threshold_lf %f",
390 			config->echo_audibility.floor_power,
391 			config->echo_audibility.audibility_threshold_lf);
392 	syslog(LOG_ERR, "    audibility_threshold_mf %f",
393 			config->echo_audibility.audibility_threshold_mf);
394 	syslog(LOG_ERR, "    audibility_threshold_hf %f",
395 			config->echo_audibility.audibility_threshold_hf);
396 	syslog(LOG_ERR, "    use_stationary_properties %d",
397 			config->echo_audibility.use_stationary_properties);
398 	syslog(LOG_ERR, "Render levels:");
399 	syslog(LOG_ERR, "    active_render_limit %f",
400 			config->render_levels.active_render_limit);
401 	syslog(LOG_ERR, "    poor_excitation_render_limit %f",
402 			config->render_levels.poor_excitation_render_limit);
403 	syslog(LOG_ERR, "    poor_excitation_render_limit_ds8 %f",
404 			config->render_levels.poor_excitation_render_limit_ds8);
405 	syslog(LOG_ERR, "Echo removal control:");
406 	syslog(LOG_ERR, "    gain rampup:");
407 	syslog(LOG_ERR, "        initial_gain %f, first_non_zero_gain %f",
408 			config->echo_removal_control.gain_rampup.initial_gain,
409 			config->echo_removal_control.gain_rampup.first_non_zero_gain);
410 	syslog(LOG_ERR, "        non_zero_gain_blocks %d, full_gain_blocks %d",
411 			config->echo_removal_control.gain_rampup.non_zero_gain_blocks,
412 			config->echo_removal_control.gain_rampup.full_gain_blocks);
413 	syslog(LOG_ERR, "    has_clock_drift %d",
414 			config->echo_removal_control.has_clock_drift);
415 	syslog(LOG_ERR, "    linear_and_stable_echo_path %d",
416 			config->echo_removal_control.linear_and_stable_echo_path);
417 	syslog(LOG_ERR, "Echo model:");
418 	syslog(LOG_ERR, "    noise_floor_hold %zu, min_noise_floor_power %f",
419 			config->echo_model.noise_floor_hold,
420 			config->echo_model.min_noise_floor_power);
421 	syslog(LOG_ERR, "    stationary_gate_slope %f, noise_gate_power %f",
422 			config->echo_model.stationary_gate_slope,
423 			config->echo_model.noise_gate_power);
424 	syslog(LOG_ERR, "    noise_gate_slope %f, render_pre_window_size %zu",
425 			config->echo_model.noise_gate_slope,
426 			config->echo_model.render_pre_window_size);
427 	syslog(LOG_ERR, "    render_post_window_size %zu nonlinear_hold %f",
428 			config->echo_model.render_post_window_size,
429 			config->echo_model.nonlinear_hold);
430 	syslog(LOG_ERR, "    render_pre_window_size_init %u, "
431 			"render_post_window_size_init %u",
432 			config->echo_model.render_pre_window_size_init,
433 			config->echo_model.render_post_window_size_init);
434 	syslog(LOG_ERR, "    nonlinear_release %f",
435 			config->echo_model.nonlinear_release);
436 	syslog(LOG_ERR, "Suppressor:");
437 	syslog(LOG_ERR, "    nearend_average_blocks %u",
438 			config->suppressor.nearend_average_blocks);
439 	syslog(LOG_ERR, "    Normal tuning, mask_lf %f %f %f",
440 			config->suppressor.normal_tuning.mask_lf.enr_transparent,
441 			config->suppressor.normal_tuning.mask_lf.enr_suppress,
442 			config->suppressor.normal_tuning.mask_lf.emr_transparent);
443 	syslog(LOG_ERR, "                   mask_hf %f %f %f",
444 			config->suppressor.normal_tuning.mask_hf.enr_transparent,
445 			config->suppressor.normal_tuning.mask_hf.enr_suppress,
446 			config->suppressor.normal_tuning.mask_hf.emr_transparent);
447 	syslog(LOG_ERR, "                   max_inc_factor %f max_dec_factor_lf %f",
448 			config->suppressor.normal_tuning.max_inc_factor,
449 			config->suppressor.normal_tuning.max_dec_factor_lf);
450 	syslog(LOG_ERR, "    Nearend tuning, mask_lf %f %f %f",
451 			config->suppressor.nearend_tuning.mask_lf.enr_transparent,
452 			config->suppressor.nearend_tuning.mask_lf.enr_suppress,
453 			config->suppressor.nearend_tuning.mask_lf.emr_transparent);
454 	syslog(LOG_ERR, "                   mask_hf %f %f %f",
455 			config->suppressor.nearend_tuning.mask_hf.enr_transparent,
456 			config->suppressor.nearend_tuning.mask_hf.enr_suppress,
457 			config->suppressor.nearend_tuning.mask_hf.emr_transparent);
458 	syslog(LOG_ERR, "                   max_inc_factor %f max_dec_factor_lf %f",
459 			config->suppressor.nearend_tuning.max_inc_factor,
460 			config->suppressor.nearend_tuning.max_dec_factor_lf);
461 	syslog(LOG_ERR, "    Dominant nearend detection:");
462 	syslog(LOG_ERR, "        enr_threshold %f",
463 			config->suppressor.dominant_nearend_detection.enr_threshold);
464 	syslog(LOG_ERR, "        snr_threshold %f",
465 			config->suppressor.dominant_nearend_detection.snr_threshold);
466 	syslog(LOG_ERR, "        hold_duration %d",
467 			config->suppressor.dominant_nearend_detection.hold_duration);
468 	syslog(LOG_ERR, "        trigger_threshold %d",
469 			config->suppressor.dominant_nearend_detection.trigger_threshold);
470 	syslog(LOG_ERR, "    High bands suppression:");
471 	syslog(LOG_ERR, "        enr_threshold %f max_gain_during_echo %f",
472 			config->suppressor.high_bands_suppression.enr_threshold,
473 			config->suppressor.high_bands_suppression.max_gain_during_echo);
474 	syslog(LOG_ERR, "    floor_first_increase %f, enforce_transparent %d",
475 			config->suppressor.floor_first_increase,
476 			config->suppressor.enforce_transparent);
477 	syslog(LOG_ERR, "    enforce_empty_higher_bands %f",
478 			config->suppressor.enforce_empty_higher_bands);
479 }
480