1 /****************************************************************************** 2 * 3 * Copyright (C) 2015 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 #ifndef IMPD_DRC_UNI_INTERFACE_H 21 #define IMPD_DRC_UNI_INTERFACE_H 22 23 typedef struct { 24 WORD32 ext_size_bits; 25 WORD32 ext_bit_size; 26 WORD32 uni_drc_interface_ext_type; 27 } ia_specific_interface_extension_struct; 28 29 typedef struct { 30 WORD32 interface_ext_count; 31 ia_specific_interface_extension_struct specific_interface_ext[EXT_COUNT_MAX]; 32 } ia_drc_uni_interface_ext_struct; 33 34 typedef struct { 35 WORD32 change_compress; 36 WORD32 change_boost; 37 FLOAT32 compress; 38 FLOAT32 boost; 39 WORD32 change_drc_characteristic_target; 40 WORD32 drc_characteristic_target; 41 } ia_drc_parameter_interface_struct; 42 43 typedef struct { 44 WORD32 dynamic_range_control_on; 45 WORD32 num_drc_feature_requests; 46 WORD32 drc_feature_req_type[MAX_NUM_DRC_FEATURE_REQUESTS]; 47 WORD32 requested_num_drc_effects[MAX_NUM_DRC_FEATURE_REQUESTS]; 48 WORD32 desired_num_drc_effects_of_requested[MAX_NUM_DRC_FEATURE_REQUESTS]; 49 WORD32 requested_drc_effect_type[MAX_NUM_DRC_FEATURE_REQUESTS] 50 [MAX_NUM_DRC_EFFECT_TYPE_REQUESTS]; 51 WORD32 requested_dyn_rng_measurement_type[MAX_NUM_DRC_FEATURE_REQUESTS]; 52 WORD32 requested_dyn_range_is_single_val_flag[MAX_NUM_DRC_FEATURE_REQUESTS]; 53 FLOAT32 requested_dyn_range_value[MAX_NUM_DRC_FEATURE_REQUESTS]; 54 FLOAT32 requested_dyn_range_min_val[MAX_NUM_DRC_FEATURE_REQUESTS]; 55 FLOAT32 requested_dyn_range_max_val[MAX_NUM_DRC_FEATURE_REQUESTS]; 56 WORD32 requested_drc_characteristic[MAX_NUM_DRC_FEATURE_REQUESTS]; 57 } ia_dyn_rng_ctrl_interface_struct; 58 59 typedef struct { 60 WORD32 album_mode; 61 WORD32 peak_limiter; 62 WORD32 change_loudness_deviation_max; 63 WORD32 loudness_deviation_max; 64 WORD32 change_loudness_measur_method; 65 WORD32 loudness_measurement_method; 66 WORD32 change_loudness_measur_system; 67 WORD32 loudness_measurement_system; 68 WORD32 change_loudness_measur_pre_proc; 69 WORD32 loudness_measurement_pre_proc; 70 WORD32 change_device_cut_off_freq; 71 WORD32 device_cut_off_frequency; 72 WORD32 change_loudness_norm_gain_db_max; 73 FLOAT32 loudness_norm_gain_db_max; 74 WORD32 change_loudness_norm_gain_modification_db; 75 FLOAT32 loudness_norm_gain_modification_db; 76 WORD32 change_output_peak_level_max; 77 FLOAT32 output_peak_level_max; 78 } ia_loudness_norm_parameter_interface_struct; 79 80 typedef struct { 81 WORD32 loudness_normalization_on; 82 FLOAT32 target_loudness; 83 } ia_loudness_norm_ctrl_interface_struct; 84 85 typedef struct { 86 WORD32 target_config_request_type; 87 WORD32 num_downmix_id_requests; 88 WORD32 requested_dwnmix_id[MAX_NUM_DOWNMIX_ID_REQUESTS]; 89 WORD32 requested_target_layout; 90 WORD32 requested_target_ch_count; 91 } ia_system_interface_struct; 92 93 typedef struct { 94 WORD32 interface_signat_type; 95 WORD32 interface_signat_data_len; 96 UWORD32 interface_signat_data[MAX_SIGNATURE_DATA_LENGTH_PLUS_ONE * 8]; 97 } ia_drc_uni_interface_signat_struct; 98 99 typedef struct ia_drc_interface_struct { 100 WORD32 interface_signat_flag; 101 WORD32 system_interface_flag; 102 WORD32 loudness_norm_ctrl_interface_flag; 103 WORD32 loudness_norm_parameter_interface_flag; 104 WORD32 drc_interface_flag; 105 WORD32 drc_parameter_interface_flag; 106 WORD32 drc_uni_interface_ext_flag; 107 ia_drc_uni_interface_signat_struct drc_uni_interface_signature; 108 ia_system_interface_struct system_interface; 109 ia_loudness_norm_ctrl_interface_struct loudness_norm_ctrl_interface; 110 ia_loudness_norm_parameter_interface_struct loudness_norm_param_interface; 111 ia_dyn_rng_ctrl_interface_struct drc_ctrl_interface; 112 ia_drc_parameter_interface_struct drc_parameter_interface; 113 ia_drc_uni_interface_ext_struct drc_uni_interface_ext; 114 } ia_drc_interface_struct; 115 116 #endif 117