• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  * Copyright (C) 2018 The Android Open Source Project
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *****************************************************************************
18  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19 */
20 #include <stdio.h>
21 #include <stdlib.h>
22 #include <string.h>
23 #include "impd_type_def.h"
24 #include "impd_drc_extr_delta_coded_info.h"
25 #include "impd_drc_common.h"
26 #include "impd_drc_struct.h"
27 #include "impd_drc_interface.h"
28 #include "impd_drc_selection_process.h"
29 
impd_drc_sel_proc_init_dflt(ia_drc_sel_pro_struct * pstr_drc_uni_sel_proc)30 WORD32 impd_drc_sel_proc_init_dflt(
31     ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc) {
32   if (pstr_drc_uni_sel_proc != NULL) {
33     pstr_drc_uni_sel_proc->first_frame = 0;
34 
35     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_channel_count = -1;
36     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_layout = -1;
37     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.target_config_request_type =
38         0;
39     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_downmix_id_requests = 0;
40 
41     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.album_mode = 0;
42 
43     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.peak_limiter = 0;
44 
45     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_normalization_on =
46         0;
47     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.target_loudness = -24.0f;
48 
49     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_deviation_max =
50         LOUDNESS_DEVIATION_MAX_DEFAULT;
51 
52     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_measurement_method =
53         USER_METHOD_DEFINITION_DEFAULT;
54     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_measurement_system =
55         USER_MEASUREMENT_SYSTEM_DEFAULT;
56     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
57         .loudness_measurement_pre_proc = USER_LOUDNESS_PREPROCESSING_DEFAULT;
58     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.device_cut_off_frequency =
59         500;
60     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_norm_gain_db_max =
61         LOUDNESS_NORMALIZATION_GAIN_MAX_DEFAULT;
62     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
63         .loudness_norm_gain_modification_db = 0.0f;
64     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.output_peak_level_max = 0.0f;
65     if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.peak_limiter == 1) {
66       pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.output_peak_level_max =
67           6.0f;
68     }
69 
70     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.dynamic_range_control_on = 1;
71     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_bands_supported = 4;
72     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_drc_feature_requests = 0;
73 
74     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.boost = 1.f;
75     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.compress = 1.f;
76     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.drc_characteristic_target =
77         0;
78 
79     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_eq_request =
80         LOUD_EQ_REQUEST_OFF;
81     pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.eq_set_purpose_request =
82         EQ_PURPOSE_EQ_OFF;
83     pstr_drc_uni_sel_proc->compl_level_supported_total =
84         COMPLEXITY_LEVEL_SUPPORTED_TOTAL;
85 
86     pstr_drc_uni_sel_proc->drc_inst_index_sel = -1;
87     pstr_drc_uni_sel_proc->drc_coef_index_sel = -1;
88     pstr_drc_uni_sel_proc->downmix_inst_index_sel = -1;
89     pstr_drc_uni_sel_proc->drc_instructions_index[0] = -1;
90     pstr_drc_uni_sel_proc->drc_instructions_index[1] = -1;
91     pstr_drc_uni_sel_proc->drc_instructions_index[2] = -1;
92     pstr_drc_uni_sel_proc->drc_instructions_index[3] = -1;
93     pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.output_peak_level_db = 0;
94     pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
95         .loudness_normalization_gain_db = 0;
96     pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.output_loudness =
97         UNDEFINED_LOUDNESS_VALUE;
98     pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.num_sel_drc_sets = 0;
99     pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.active_downmix_id = 0;
100     pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.base_channel_count = 0;
101     pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.target_channel_count = 0;
102     pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.downmix_matrix_present = 0;
103 
104     pstr_drc_uni_sel_proc->eq_inst_index[0] = -1;
105     pstr_drc_uni_sel_proc->eq_inst_index[1] = -1;
106     pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
107   } else {
108     return 1;
109   }
110 
111   return 0;
112 }
113 WORD32
impd_drc_sel_proc_init_sel_proc_params(ia_drc_sel_pro_struct * pstr_drc_uni_sel_proc,ia_drc_sel_proc_params_struct * pstr_drc_sel_proc_params_struct)114 impd_drc_sel_proc_init_sel_proc_params(
115     ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc,
116     ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct) {
117   if (pstr_drc_uni_sel_proc != NULL &&
118       pstr_drc_sel_proc_params_struct != NULL) {
119     if (memcmp(&pstr_drc_uni_sel_proc->uni_drc_sel_proc_params,
120                pstr_drc_sel_proc_params_struct,
121                sizeof(ia_drc_sel_proc_params_struct))) {
122       pstr_drc_uni_sel_proc->uni_drc_sel_proc_params =
123           *pstr_drc_sel_proc_params_struct;
124       pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
125     }
126   }
127 
128   return 0;
129 }
impd_drc_sel_proc_init_interface_params(ia_drc_sel_pro_struct * pstr_drc_uni_sel_proc,ia_drc_interface_struct * pstr_drc_interface)130 VOID impd_drc_sel_proc_init_interface_params(
131     ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc,
132     ia_drc_interface_struct* pstr_drc_interface) {
133   WORD32 i, j;
134 
135   if (pstr_drc_uni_sel_proc != NULL && pstr_drc_interface != NULL) {
136     if (pstr_drc_interface->system_interface_flag) {
137       if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
138               .target_config_request_type !=
139           pstr_drc_interface->system_interface.target_config_request_type) {
140         pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
141             .target_config_request_type =
142             pstr_drc_interface->system_interface.target_config_request_type;
143         pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
144       }
145       switch (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
146                   .target_config_request_type) {
147         case 0:
148           if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
149                   .num_downmix_id_requests !=
150               pstr_drc_interface->system_interface.num_downmix_id_requests) {
151             pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
152                 .num_downmix_id_requests =
153                 pstr_drc_interface->system_interface.num_downmix_id_requests;
154             pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
155           }
156           for (i = 0; i < pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
157                               .num_downmix_id_requests;
158                i++) {
159             if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
160                     .requested_dwnmix_id[i] !=
161                 pstr_drc_interface->system_interface.requested_dwnmix_id[i]) {
162               pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
163                   .requested_dwnmix_id[i] =
164                   pstr_drc_interface->system_interface.requested_dwnmix_id[i];
165               pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
166             }
167           }
168           break;
169         case 1:
170           if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
171                   .requested_target_layout !=
172               pstr_drc_interface->system_interface.requested_target_layout) {
173             pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
174                 .requested_target_layout =
175                 pstr_drc_interface->system_interface.requested_target_layout;
176             pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
177           }
178           break;
179         case 2:
180           if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
181                   .requested_target_ch_count !=
182               pstr_drc_interface->system_interface.requested_target_ch_count) {
183             pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
184                 .requested_target_ch_count =
185                 pstr_drc_interface->system_interface.requested_target_ch_count;
186             pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
187           }
188           break;
189       }
190     }
191     if (pstr_drc_interface->loudness_norm_ctrl_interface_flag) {
192       if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
193               .loudness_normalization_on !=
194           pstr_drc_interface->loudness_norm_ctrl_interface
195               .loudness_normalization_on) {
196         pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
197             .loudness_normalization_on =
198             pstr_drc_interface->loudness_norm_ctrl_interface
199                 .loudness_normalization_on;
200         pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
201       }
202       if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
203               .loudness_normalization_on) {
204         if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.target_loudness !=
205             pstr_drc_interface->loudness_norm_ctrl_interface.target_loudness) {
206           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.target_loudness =
207               pstr_drc_interface->loudness_norm_ctrl_interface.target_loudness;
208           pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
209         }
210       }
211     }
212     if (pstr_drc_interface->loudness_norm_parameter_interface_flag) {
213       if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.album_mode !=
214           pstr_drc_interface->loudness_norm_param_interface.album_mode) {
215         pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.album_mode =
216             pstr_drc_interface->loudness_norm_param_interface.album_mode;
217         pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
218       }
219       if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.peak_limiter !=
220           pstr_drc_interface->loudness_norm_param_interface.peak_limiter) {
221         pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.peak_limiter =
222             pstr_drc_interface->loudness_norm_param_interface.peak_limiter;
223         pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
224       }
225       if (pstr_drc_interface->loudness_norm_param_interface
226               .change_loudness_deviation_max) {
227         if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
228                 .loudness_deviation_max !=
229             pstr_drc_interface->loudness_norm_param_interface
230                 .loudness_deviation_max) {
231           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
232               .loudness_deviation_max =
233               pstr_drc_interface->loudness_norm_param_interface
234                   .loudness_deviation_max;
235           pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
236         }
237       }
238       if (pstr_drc_interface->loudness_norm_param_interface
239               .change_loudness_measur_method) {
240         if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
241                 .loudness_measurement_method !=
242             pstr_drc_interface->loudness_norm_param_interface
243                 .loudness_measurement_method) {
244           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
245               .loudness_measurement_method =
246               pstr_drc_interface->loudness_norm_param_interface
247                   .loudness_measurement_method;
248           pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
249         }
250       }
251       if (pstr_drc_interface->loudness_norm_param_interface
252               .change_loudness_measur_pre_proc) {
253         if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
254                 .loudness_measurement_pre_proc !=
255             pstr_drc_interface->loudness_norm_param_interface
256                 .loudness_measurement_pre_proc) {
257           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
258               .loudness_measurement_pre_proc =
259               pstr_drc_interface->loudness_norm_param_interface
260                   .loudness_measurement_pre_proc;
261           pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
262         }
263       }
264       if (pstr_drc_interface->loudness_norm_param_interface
265               .change_loudness_measur_system) {
266         if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
267                 .loudness_measurement_system !=
268             pstr_drc_interface->loudness_norm_param_interface
269                 .loudness_measurement_system) {
270           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
271               .loudness_measurement_system =
272               pstr_drc_interface->loudness_norm_param_interface
273                   .loudness_measurement_system;
274           pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
275         }
276       }
277       if (pstr_drc_interface->loudness_norm_param_interface
278               .change_device_cut_off_freq) {
279         if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
280                 .device_cut_off_frequency !=
281             pstr_drc_interface->loudness_norm_param_interface
282                 .device_cut_off_frequency) {
283           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
284               .device_cut_off_frequency =
285               pstr_drc_interface->loudness_norm_param_interface
286                   .device_cut_off_frequency;
287           pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
288         }
289       }
290       if (pstr_drc_interface->loudness_norm_param_interface
291               .change_loudness_norm_gain_db_max) {
292         if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
293                 .loudness_norm_gain_db_max !=
294             pstr_drc_interface->loudness_norm_param_interface
295                 .loudness_norm_gain_db_max) {
296           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
297               .loudness_norm_gain_db_max =
298               pstr_drc_interface->loudness_norm_param_interface
299                   .loudness_norm_gain_db_max;
300           pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
301         }
302       }
303       if (pstr_drc_interface->loudness_norm_param_interface
304               .change_loudness_norm_gain_modification_db) {
305         if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
306                 .loudness_norm_gain_modification_db !=
307             pstr_drc_interface->loudness_norm_param_interface
308                 .loudness_norm_gain_modification_db) {
309           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
310               .loudness_norm_gain_modification_db =
311               pstr_drc_interface->loudness_norm_param_interface
312                   .loudness_norm_gain_modification_db;
313           pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
314         }
315       }
316       if (pstr_drc_interface->loudness_norm_param_interface
317               .change_output_peak_level_max) {
318         if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
319                 .output_peak_level_max !=
320             pstr_drc_interface->loudness_norm_param_interface
321                 .output_peak_level_max) {
322           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.output_peak_level_max =
323               pstr_drc_interface->loudness_norm_param_interface
324                   .output_peak_level_max;
325           pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
326         }
327       }
328     }
329     if (pstr_drc_interface->drc_interface_flag) {
330       if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
331               .dynamic_range_control_on !=
332           pstr_drc_interface->drc_ctrl_interface.dynamic_range_control_on) {
333         pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
334             .dynamic_range_control_on =
335             pstr_drc_interface->drc_ctrl_interface.dynamic_range_control_on;
336         pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
337         if (!pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
338                  .dynamic_range_control_on) {
339           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
340               .num_drc_feature_requests = 0;
341         }
342       }
343       if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
344               .dynamic_range_control_on) {
345         if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
346                 .num_drc_feature_requests !=
347             pstr_drc_interface->drc_ctrl_interface.num_drc_feature_requests) {
348           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
349               .num_drc_feature_requests =
350               pstr_drc_interface->drc_ctrl_interface.num_drc_feature_requests;
351           pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
352         }
353         for (i = 0; i < pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
354                             .num_drc_feature_requests;
355              i++) {
356           if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
357                   .drc_feature_req_type[i] !=
358               pstr_drc_interface->drc_ctrl_interface.drc_feature_req_type[i]) {
359             pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
360                 .drc_feature_req_type[i] =
361                 pstr_drc_interface->drc_ctrl_interface.drc_feature_req_type[i];
362             pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
363           }
364           switch (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
365                       .drc_feature_req_type[i]) {
366             case 0:
367               if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
368                       .requested_num_drc_effects[i] !=
369                   pstr_drc_interface->drc_ctrl_interface
370                       .requested_num_drc_effects[i]) {
371                 pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
372                     .requested_num_drc_effects[i] =
373                     pstr_drc_interface->drc_ctrl_interface
374                         .requested_num_drc_effects[i];
375                 pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
376               }
377               if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
378                       .desired_num_drc_effects_of_requested[i] !=
379                   pstr_drc_interface->drc_ctrl_interface
380                       .desired_num_drc_effects_of_requested[i]) {
381                 pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
382                     .desired_num_drc_effects_of_requested[i] =
383                     pstr_drc_interface->drc_ctrl_interface
384                         .desired_num_drc_effects_of_requested[i];
385                 pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
386               }
387               for (j = 0; j < pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
388                                   .requested_num_drc_effects[i];
389                    j++) {
390                 if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
391                         .requested_drc_effect_type[i][j] !=
392                     pstr_drc_interface->drc_ctrl_interface
393                         .requested_drc_effect_type[i][j]) {
394                   pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
395                       .requested_drc_effect_type[i][j] =
396                       pstr_drc_interface->drc_ctrl_interface
397                           .requested_drc_effect_type[i][j];
398                   pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
399                 }
400               }
401               break;
402             case 1:
403               if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
404                       .requested_dyn_range_measur_type[i] !=
405                   pstr_drc_interface->drc_ctrl_interface
406                       .requested_dyn_rng_measurement_type[i]) {
407                 pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
408                     .requested_dyn_range_measur_type[i] =
409                     pstr_drc_interface->drc_ctrl_interface
410                         .requested_dyn_rng_measurement_type[i];
411                 pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
412               }
413               if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
414                       .requested_dyn_range_range_flag[i] !=
415                   pstr_drc_interface->drc_ctrl_interface
416                       .requested_dyn_range_is_single_val_flag[i]) {
417                 pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
418                     .requested_dyn_range_range_flag[i] =
419                     pstr_drc_interface->drc_ctrl_interface
420                         .requested_dyn_range_is_single_val_flag[i];
421                 pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
422               }
423               if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
424                       .requested_dyn_range_range_flag[i] == 0) {
425                 if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
426                         .requested_dyn_range_value[i] !=
427                     pstr_drc_interface->drc_ctrl_interface
428                         .requested_dyn_range_value[i]) {
429                   pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
430                       .requested_dyn_range_value[i] =
431                       pstr_drc_interface->drc_ctrl_interface
432                           .requested_dyn_range_value[i];
433                   pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
434                 }
435               } else {
436                 if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
437                         .requested_dyn_range_min_val[i] !=
438                     pstr_drc_interface->drc_ctrl_interface
439                         .requested_dyn_range_min_val[i]) {
440                   pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
441                       .requested_dyn_range_min_val[i] =
442                       pstr_drc_interface->drc_ctrl_interface
443                           .requested_dyn_range_min_val[i];
444                   pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
445                 }
446                 if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
447                         .requested_dyn_range_max_val[i] !=
448                     pstr_drc_interface->drc_ctrl_interface
449                         .requested_dyn_range_max_val[i]) {
450                   pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
451                       .requested_dyn_range_max_val[i] =
452                       pstr_drc_interface->drc_ctrl_interface
453                           .requested_dyn_range_max_val[i];
454                   pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
455                 }
456               }
457               break;
458             case 2:
459               if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
460                       .requested_drc_characteristic[i] !=
461                   pstr_drc_interface->drc_ctrl_interface
462                       .requested_drc_characteristic[i]) {
463                 pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
464                     .requested_drc_characteristic[i] =
465                     pstr_drc_interface->drc_ctrl_interface
466                         .requested_drc_characteristic[i];
467                 pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
468               }
469               break;
470           }
471         }
472       }
473     }
474     if (pstr_drc_interface->drc_parameter_interface_flag) {
475       if (pstr_drc_interface->drc_parameter_interface.change_compress) {
476         if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.compress !=
477             pstr_drc_interface->drc_parameter_interface.compress) {
478           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.compress =
479               pstr_drc_interface->drc_parameter_interface.compress;
480           pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
481         }
482       }
483       if (pstr_drc_interface->drc_parameter_interface.change_boost) {
484         if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.boost !=
485             pstr_drc_interface->drc_parameter_interface.boost) {
486           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.boost =
487               pstr_drc_interface->drc_parameter_interface.boost;
488           pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
489         }
490       }
491       if (pstr_drc_interface->drc_parameter_interface
492               .change_drc_characteristic_target) {
493         if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
494                 .drc_characteristic_target !=
495             pstr_drc_interface->drc_parameter_interface
496                 .drc_characteristic_target) {
497           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
498               .drc_characteristic_target =
499               pstr_drc_interface->drc_parameter_interface
500                   .drc_characteristic_target;
501           pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
502         }
503       }
504     }
505     if (pstr_drc_interface->drc_uni_interface_ext_flag) {
506       ia_drc_uni_interface_ext_struct* drc_uni_interface_ext =
507           &pstr_drc_interface->drc_uni_interface_ext;
508       if (drc_uni_interface_ext->loudness_eq_parameter_interface_flag) {
509         ia_loudness_eq_parameter_interface_struct*
510             loudness_eq_parameter_interface =
511                 &drc_uni_interface_ext->loudness_eq_parameter_interface;
512         if (loudness_eq_parameter_interface->loudness_eq_request_flag) {
513           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_eq_request =
514               loudness_eq_parameter_interface->loudness_eq_request;
515           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.sensitivity =
516               loudness_eq_parameter_interface->sensitivity;
517           pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.playback_gain =
518               loudness_eq_parameter_interface->playback_gain;
519         }
520       }
521       if (drc_uni_interface_ext->eq_ctrl_interface_flag) {
522         pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.eq_set_purpose_request =
523             drc_uni_interface_ext->eq_ctrl_interface.eq_set_purpose_request;
524       }
525     }
526   }
527 
528   return;
529 }
530