]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/staging/dream/include/mach/qdsp5/qdsp5audpreproccmdi.h
Ensure FMODE_NONOTIFY is not set by userspace
[karo-tx-linux.git] / drivers / staging / dream / include / mach / qdsp5 / qdsp5audpreproccmdi.h
1 #ifndef QDSP5AUDPREPROCCMDI_H
2 #define QDSP5AUDPREPROCCMDI_H
3
4 /*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*
5
6     A U D I O   P R E   P R O C E S S I N G  I N T E R N A L  C O M M A N D S
7
8 GENERAL DESCRIPTION
9   This file contains defintions of format blocks of commands
10   that are accepted by AUDPREPROC Task
11
12 REFERENCES
13   None
14
15 EXTERNALIZED FUNCTIONS
16   None
17
18 Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated.
19
20 This software is licensed under the terms of the GNU General Public
21 License version 2, as published by the Free Software Foundation, and
22 may be copied, distributed, and modified under those terms.
23
24 This program is distributed in the hope that it will be useful,
25 but WITHOUT ANY WARRANTY; without even the implied warranty of
26 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27 GNU General Public License for more details.
28
29 *====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/
30 /*===========================================================================
31
32                       EDIT HISTORY FOR FILE
33
34 This section contains comments describing changes made to this file.
35 Notice that changes are listed in reverse chronological order.
36
37 $Header: //source/qcom/qct/multimedia2/Audio/drivers/QDSP5Driver/QDSP5Interface/main/latest/qdsp5audpreproccmdi.h#2 $
38
39 ===========================================================================*/
40
41 /*
42  * AUDIOPREPROC COMMANDS:
43  * ARM uses uPAudPreProcCmdQueue to communicate with AUDPREPROCTASK
44  * Location : MEMB
45  * Buffer size : 51
46  * Number of buffers in a queue : 3
47  */
48
49 /*
50  * Command to configure the parameters of AGC
51  */
52
53 #define AUDPREPROC_CMD_CFG_AGC_PARAMS   0x0000
54 #define AUDPREPROC_CMD_CFG_AGC_PARAMS_LEN       \
55         sizeof(audpreproc_cmd_cfg_agc_params)
56
57 #define AUDPREPROC_CMD_TX_AGC_PARAM_MASK_COMP_SLOPE     0x0009
58 #define AUDPREPROC_CMD_TX_AGC_PARAM_MASK_COMP_TH        0x000A
59 #define AUDPREPROC_CMD_TX_AGC_PARAM_MASK_EXP_SLOPE      0x000B
60 #define AUDPREPROC_CMD_TX_AGC_PARAM_MASK_EXP_TH         0x000C
61 #define AUDPREPROC_CMD_TX_AGC_PARAM_MASK_COMP_AIG_FLAG          0x000D
62 #define AUDPREPROC_CMD_TX_AGC_PARAM_MASK_COMP_STATIC_GAIN       0x000E
63 #define AUDPREPROC_CMD_TX_AGC_PARAM_MASK_TX_AGC_ENA_FLAG        0x000F
64
65 #define AUDPREPROC_CMD_TX_AGC_ENA_FLAG_ENA      -1
66 #define AUDPREPROC_CMD_TX_AGC_ENA_FLAG_DIS      0x0000
67
68 #define AUDPREPROC_CMD_ADP_GAIN_FLAG_ENA_ADP_GAIN       -1
69 #define AUDPREPROC_CMD_ADP_GAIN_FLAG_ENA_STATIC_GAIN    0x0000
70
71 #define AUDPREPROC_CMD_PARAM_MASK_RMS_TAY       0x0004
72 #define AUDPREPROC_CMD_PARAM_MASK_RELEASEK      0x0005
73 #define AUDPREPROC_CMD_PARAM_MASK_DELAY         0x0006
74 #define AUDPREPROC_CMD_PARAM_MASK_ATTACKK       0x0007
75 #define AUDPREPROC_CMD_PARAM_MASK_LEAKRATE_SLOW 0x0008
76 #define AUDPREPROC_CMD_PARAM_MASK_LEAKRATE_FAST 0x0009
77 #define AUDPREPROC_CMD_PARAM_MASK_AIG_RELEASEK  0x000A
78 #define AUDPREPROC_CMD_PARAM_MASK_AIG_MIN       0x000B
79 #define AUDPREPROC_CMD_PARAM_MASK_AIG_MAX       0x000C
80 #define AUDPREPROC_CMD_PARAM_MASK_LEAK_UP       0x000D
81 #define AUDPREPROC_CMD_PARAM_MASK_LEAK_DOWN     0x000E
82 #define AUDPREPROC_CMD_PARAM_MASK_AIG_ATTACKK   0x000F
83
84 typedef struct {
85         unsigned short  cmd_id;
86         unsigned short  tx_agc_param_mask;
87         unsigned short  tx_agc_enable_flag;
88         unsigned short  static_gain;
89         signed short    adaptive_gain_flag;
90         unsigned short  expander_th;
91         unsigned short  expander_slope;
92         unsigned short  compressor_th;
93         unsigned short  compressor_slope;
94         unsigned short  param_mask;
95         unsigned short  aig_attackk;
96         unsigned short  aig_leak_down;
97         unsigned short  aig_leak_up;
98         unsigned short  aig_max;
99         unsigned short  aig_min;
100         unsigned short  aig_releasek;
101         unsigned short  aig_leakrate_fast;
102         unsigned short  aig_leakrate_slow;
103         unsigned short  attackk_msw;
104         unsigned short  attackk_lsw;
105         unsigned short  delay;
106         unsigned short  releasek_msw;
107         unsigned short  releasek_lsw;
108         unsigned short  rms_tav;
109 } __attribute__((packed)) audpreproc_cmd_cfg_agc_params;
110
111
112 /*
113  * Command to configure the params of Advanved AGC
114  */
115
116 #define AUDPREPROC_CMD_CFG_AGC_PARAMS_2         0x0001
117 #define AUDPREPROC_CMD_CFG_AGC_PARAMS_2_LEN             \
118         sizeof(audpreproc_cmd_cfg_agc_params_2)
119
120 #define AUDPREPROC_CMD_2_TX_AGC_ENA_FLAG_ENA    -1;
121 #define AUDPREPROC_CMD_2_TX_AGC_ENA_FLAG_DIS    0x0000;
122
123 typedef struct {
124         unsigned short  cmd_id;
125         unsigned short  agc_param_mask;
126         signed short    tx_agc_enable_flag;
127         unsigned short  comp_static_gain;
128         unsigned short  exp_th;
129         unsigned short  exp_slope;
130         unsigned short  comp_th;
131         unsigned short  comp_slope;
132         unsigned short  comp_rms_tav;
133         unsigned short  comp_samp_mask;
134         unsigned short  comp_attackk_msw;
135         unsigned short  comp_attackk_lsw;
136         unsigned short  comp_releasek_msw;
137         unsigned short  comp_releasek_lsw;
138         unsigned short  comp_delay;
139         unsigned short  comp_makeup_gain;
140 } __attribute__((packed)) audpreproc_cmd_cfg_agc_params_2;
141
142 /*
143  * Command to configure params for ns
144  */
145
146 #define AUDPREPROC_CMD_CFG_NS_PARAMS            0x0002
147 #define AUDPREPROC_CMD_CFG_NS_PARAMS_LEN        \
148         sizeof(audpreproc_cmd_cfg_ns_params)
149
150 #define AUDPREPROC_CMD_EC_MODE_NEW_NLMS_ENA     0x0001
151 #define AUDPREPROC_CMD_EC_MODE_NEW_NLMS_DIS     0x0000
152 #define AUDPREPROC_CMD_EC_MODE_NEW_DES_ENA      0x0002
153 #define AUDPREPROC_CMD_EC_MODE_NEW_DES_DIS      0x0000
154 #define AUDPREPROC_CMD_EC_MODE_NEW_NS_ENA       0x0004
155 #define AUDPREPROC_CMD_EC_MODE_NEW_NS_DIS       0x0000
156 #define AUDPREPROC_CMD_EC_MODE_NEW_CNI_ENA      0x0008
157 #define AUDPREPROC_CMD_EC_MODE_NEW_CNI_DIS      0x0000
158
159 #define AUDPREPROC_CMD_EC_MODE_NEW_NLES_ENA     0x0010
160 #define AUDPREPROC_CMD_EC_MODE_NEW_NLES_DIS     0x0000
161 #define AUDPREPROC_CMD_EC_MODE_NEW_HB_ENA       0x0020
162 #define AUDPREPROC_CMD_EC_MODE_NEW_HB_DIS       0x0000
163 #define AUDPREPROC_CMD_EC_MODE_NEW_VA_ENA       0x0040
164 #define AUDPREPROC_CMD_EC_MODE_NEW_VA_DIS       0x0000
165 #define AUDPREPROC_CMD_EC_MODE_NEW_PCD_ENA      0x0080
166 #define AUDPREPROC_CMD_EC_MODE_NEW_PCD_DIS      0x0000
167 #define AUDPREPROC_CMD_EC_MODE_NEW_FEHI_ENA     0x0100
168 #define AUDPREPROC_CMD_EC_MODE_NEW_FEHI_DIS     0x0000
169 #define AUDPREPROC_CMD_EC_MODE_NEW_NEHI_ENA     0x0200
170 #define AUDPREPROC_CMD_EC_MODE_NEW_NEHI_DIS     0x0000
171 #define AUDPREPROC_CMD_EC_MODE_NEW_NLPP_ENA     0x0400
172 #define AUDPREPROC_CMD_EC_MODE_NEW_NLPP_DIS     0x0000
173 #define AUDPREPROC_CMD_EC_MODE_NEW_FNE_ENA      0x0800
174 #define AUDPREPROC_CMD_EC_MODE_NEW_FNE_DIS      0x0000
175 #define AUDPREPROC_CMD_EC_MODE_NEW_PRENLMS_ENA  0x1000
176 #define AUDPREPROC_CMD_EC_MODE_NEW_PRENLMS_DIS  0x0000
177
178 typedef struct {
179         unsigned short  cmd_id;
180         unsigned short  ec_mode_new;
181         unsigned short  dens_gamma_n;
182         unsigned short  dens_nfe_block_size;
183         unsigned short  dens_limit_ns;
184         unsigned short  dens_limit_ns_d;
185         unsigned short  wb_gamma_e;
186         unsigned short  wb_gamma_n;
187 } __attribute__((packed)) audpreproc_cmd_cfg_ns_params;
188
189 /*
190  * Command to configure parameters for IIR tuning filter
191  */
192
193 #define AUDPREPROC_CMD_CFG_IIR_TUNING_FILTER_PARAMS             0x0003
194 #define AUDPREPROC_CMD_CFG_IIR_TUNING_FILTER_PARAMS_LEN \
195         sizeof(audpreproc_cmd_cfg_iir_tuning_filter_params)
196
197 #define AUDPREPROC_CMD_IIR_ACTIVE_FLAG_DIS      0x0000
198 #define AUDPREPROC_CMD_IIR_ACTIVE_FLAG_ENA      0x0001
199
200 typedef struct {
201         unsigned short  cmd_id;
202         unsigned short  active_flag;
203         unsigned short  num_bands;
204         unsigned short  numerator_coeff_b0_filter0_lsw;
205         unsigned short  numerator_coeff_b0_filter0_msw;
206         unsigned short  numerator_coeff_b1_filter0_lsw;
207         unsigned short  numerator_coeff_b1_filter0_msw;
208         unsigned short  numerator_coeff_b2_filter0_lsw;
209         unsigned short  numerator_coeff_b2_filter0_msw;
210         unsigned short  numerator_coeff_b0_filter1_lsw;
211         unsigned short  numerator_coeff_b0_filter1_msw;
212         unsigned short  numerator_coeff_b1_filter1_lsw;
213         unsigned short  numerator_coeff_b1_filter1_msw;
214         unsigned short  numerator_coeff_b2_filter1_lsw;
215         unsigned short  numerator_coeff_b2_filter1_msw;
216         unsigned short  numerator_coeff_b0_filter2_lsw;
217         unsigned short  numerator_coeff_b0_filter2_msw;
218         unsigned short  numerator_coeff_b1_filter2_lsw;
219         unsigned short  numerator_coeff_b1_filter2_msw;
220         unsigned short  numerator_coeff_b2_filter2_lsw;
221         unsigned short  numerator_coeff_b2_filter2_msw;
222         unsigned short  numerator_coeff_b0_filter3_lsw;
223         unsigned short  numerator_coeff_b0_filter3_msw;
224         unsigned short  numerator_coeff_b1_filter3_lsw;
225         unsigned short  numerator_coeff_b1_filter3_msw;
226         unsigned short  numerator_coeff_b2_filter3_lsw;
227         unsigned short  numerator_coeff_b2_filter3_msw;
228         unsigned short  denominator_coeff_a0_filter0_lsw;
229         unsigned short  denominator_coeff_a0_filter0_msw;
230         unsigned short  denominator_coeff_a1_filter0_lsw;
231         unsigned short  denominator_coeff_a1_filter0_msw;
232         unsigned short  denominator_coeff_a0_filter1_lsw;
233         unsigned short  denominator_coeff_a0_filter1_msw;
234         unsigned short  denominator_coeff_a1_filter1_lsw;
235         unsigned short  denominator_coeff_a1_filter1_msw;
236   unsigned short        denominator_coeff_a0_filter2_lsw;
237         unsigned short  denominator_coeff_a0_filter2_msw;
238         unsigned short  denominator_coeff_a1_filter2_lsw;
239         unsigned short  denominator_coeff_a1_filter2_msw;
240   unsigned short        denominator_coeff_a0_filter3_lsw;
241         unsigned short  denominator_coeff_a0_filter3_msw;
242         unsigned short  denominator_coeff_a1_filter3_lsw;
243         unsigned short  denominator_coeff_a1_filter3_msw;
244
245         unsigned short  shift_factor_filter0;
246         unsigned short  shift_factor_filter1;
247         unsigned short  shift_factor_filter2;
248         unsigned short  shift_factor_filter3;
249
250         unsigned short  channel_selected0;
251         unsigned short  channel_selected1;
252         unsigned short  channel_selected2;
253         unsigned short  channel_selected3;
254 } __attribute__((packed))audpreproc_cmd_cfg_iir_tuning_filter_params;
255
256 #endif