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