blob: 300232df53297968bb16408fcc4419af6cad3105 [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001#ifndef QDSP5AUDPPMSG_H
2#define QDSP5AUDPPMSG_H
3
4/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*
5
6 Q D S P 5 A U D I O P O S T P R O C E S S I N G M S G
7
8GENERAL DESCRIPTION
9 Messages sent by AUDPPTASK to ARM
10
11REFERENCES
12 None
13
14EXTERNALIZED FUNCTIONS
15 None
16
Duy Truong790f06d2013-02-13 16:38:12 -080017Copyright (c) 1992-2009, The Linux Foundation. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070018
19This software is licensed under the terms of the GNU General Public
20License version 2, as published by the Free Software Foundation, and
21may be copied, distributed, and modified under those terms.
22
23This program is distributed in the hope that it will be useful,
24but WITHOUT ANY WARRANTY; without even the implied warranty of
25MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26GNU General Public License for more details.
27
28*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/
29
30/*
31 * AUDPPTASK uses audPPuPRlist to send messages to the ARM
32 * Location : MEMA
33 * Buffer Size : 45
34 * No of Buffers in a queue : 5 for gaming audio and 1 for other images
35 */
36
37/*
38 * MSG to Informs the ARM os Success/Failure of bringing up the decoder
39 */
40
41#define AUDPP_MSG_FEAT_QUERY_DM_DONE 0x000b
42
43#define AUDPP_MSG_STATUS_MSG 0x0001
44#define AUDPP_MSG_STATUS_MSG_LEN \
45 sizeof(struct audpp_msg_status_msg)
46
47#define AUDPP_MSG_STATUS_SLEEP 0x0000
48#define AUDPP_MSG_STATUS_INIT 0x0001
49#define AUDPP_MSG_STATUS_CFG 0x0002
50#define AUDPP_MSG_STATUS_PLAY 0x0003
51
52#define AUDPP_MSG_REASON_NONE 0x0000
53#define AUDPP_MSG_REASON_MEM 0x0001
54#define AUDPP_MSG_REASON_NODECODER 0x0002
55
56struct audpp_msg_status_msg {
57 unsigned short dec_id;
58 unsigned short status;
59 unsigned short reason;
60} __attribute__((packed));
61
62/*
63 * MSG to communicate the spectrum analyzer output bands to the ARM
64 */
65#define AUDPP_MSG_SPA_BANDS 0x0002
66#define AUDPP_MSG_SPA_BANDS_LEN \
67 sizeof(struct audpp_msg_spa_bands)
68
69struct audpp_msg_spa_bands {
70 unsigned short current_object;
71 unsigned short spa_band_1;
72 unsigned short spa_band_2;
73 unsigned short spa_band_3;
74 unsigned short spa_band_4;
75 unsigned short spa_band_5;
76 unsigned short spa_band_6;
77 unsigned short spa_band_7;
78 unsigned short spa_band_8;
79 unsigned short spa_band_9;
80 unsigned short spa_band_10;
81 unsigned short spa_band_11;
82 unsigned short spa_band_12;
83 unsigned short spa_band_13;
84 unsigned short spa_band_14;
85 unsigned short spa_band_15;
86 unsigned short spa_band_16;
87 unsigned short spa_band_17;
88 unsigned short spa_band_18;
89 unsigned short spa_band_19;
90 unsigned short spa_band_20;
91 unsigned short spa_band_21;
92 unsigned short spa_band_22;
93 unsigned short spa_band_23;
94 unsigned short spa_band_24;
95 unsigned short spa_band_25;
96 unsigned short spa_band_26;
97 unsigned short spa_band_27;
98 unsigned short spa_band_28;
99 unsigned short spa_band_29;
100 unsigned short spa_band_30;
101 unsigned short spa_band_31;
102 unsigned short spa_band_32;
103} __attribute__((packed));
104
105/*
106 * MSG to communicate the PCM I/O buffer status to ARM
107 */
108#define AUDPP_MSG_HOST_PCM_INTF_MSG 0x0003
109#define AUDPP_MSG_HOST_PCM_INTF_MSG_LEN \
110 sizeof(struct audpp_msg_host_pcm_intf_msg)
111
112#define AUDPP_MSG_HOSTPCM_ID_TX_ARM 0x0000
113#define AUDPP_MSG_HOSTPCM_ID_ARM_TX 0x0001
114#define AUDPP_MSG_HOSTPCM_ID_RX_ARM 0x0002
115#define AUDPP_MSG_HOSTPCM_ID_ARM_RX 0x0003
116
117#define AUDPP_MSG_SAMP_FREQ_INDX_96000 0x0000
118#define AUDPP_MSG_SAMP_FREQ_INDX_88200 0x0001
119#define AUDPP_MSG_SAMP_FREQ_INDX_64000 0x0002
120#define AUDPP_MSG_SAMP_FREQ_INDX_48000 0x0003
121#define AUDPP_MSG_SAMP_FREQ_INDX_44100 0x0004
122#define AUDPP_MSG_SAMP_FREQ_INDX_32000 0x0005
123#define AUDPP_MSG_SAMP_FREQ_INDX_24000 0x0006
124#define AUDPP_MSG_SAMP_FREQ_INDX_22050 0x0007
125#define AUDPP_MSG_SAMP_FREQ_INDX_16000 0x0008
126#define AUDPP_MSG_SAMP_FREQ_INDX_12000 0x0009
127#define AUDPP_MSG_SAMP_FREQ_INDX_11025 0x000A
128#define AUDPP_MSG_SAMP_FREQ_INDX_8000 0x000B
129
130#define AUDPP_MSG_CHANNEL_MODE_MONO 0x0001
131#define AUDPP_MSG_CHANNEL_MODE_STEREO 0x0002
132
133struct audpp_msg_host_pcm_intf_msg {
134 unsigned short obj_num;
135 unsigned short numbers_of_samples;
136 unsigned short host_pcm_id;
137 unsigned short buf_indx;
138 unsigned short samp_freq_indx;
139 unsigned short channel_mode;
140} __attribute__((packed));
141
142
143/*
144 * MSG to communicate 3D position of the source and listener , source volume
145 * source rolloff, source orientation
146 */
147
148#define AUDPP_MSG_QAFX_POS 0x0004
149#define AUDPP_MSG_QAFX_POS_LEN \
150 sizeof(struct audpp_msg_qafx_pos)
151
152struct audpp_msg_qafx_pos {
153 unsigned short current_object;
154 unsigned short x_pos_lis_msw;
155 unsigned short x_pos_lis_lsw;
156 unsigned short y_pos_lis_msw;
157 unsigned short y_pos_lis_lsw;
158 unsigned short z_pos_lis_msw;
159 unsigned short z_pos_lis_lsw;
160 unsigned short x_fwd_msw;
161 unsigned short x_fwd_lsw;
162 unsigned short y_fwd_msw;
163 unsigned short y_fwd_lsw;
164 unsigned short z_fwd_msw;
165 unsigned short z_fwd_lsw;
166 unsigned short x_up_msw;
167 unsigned short x_up_lsw;
168 unsigned short y_up_msw;
169 unsigned short y_up_lsw;
170 unsigned short z_up_msw;
171 unsigned short z_up_lsw;
172 unsigned short x_vel_lis_msw;
173 unsigned short x_vel_lis_lsw;
174 unsigned short y_vel_lis_msw;
175 unsigned short y_vel_lis_lsw;
176 unsigned short z_vel_lis_msw;
177 unsigned short z_vel_lis_lsw;
178 unsigned short threed_enable_flag;
179 unsigned short volume;
180 unsigned short x_pos_source_msw;
181 unsigned short x_pos_source_lsw;
182 unsigned short y_pos_source_msw;
183 unsigned short y_pos_source_lsw;
184 unsigned short z_pos_source_msw;
185 unsigned short z_pos_source_lsw;
186 unsigned short max_dist_0_msw;
187 unsigned short max_dist_0_lsw;
188 unsigned short min_dist_0_msw;
189 unsigned short min_dist_0_lsw;
190 unsigned short roll_off_factor;
191 unsigned short mute_after_max_flag;
192 unsigned short x_vel_source_msw;
193 unsigned short x_vel_source_lsw;
194 unsigned short y_vel_source_msw;
195 unsigned short y_vel_source_lsw;
196 unsigned short z_vel_source_msw;
197 unsigned short z_vel_source_lsw;
198} __attribute__((packed));
199
200/*
201 * MSG to provide AVSYNC feedback from DSP to ARM
202 */
203
204#define AUDPP_MSG_AVSYNC_MSG 0x0005
205#define AUDPP_MSG_AVSYNC_MSG_LEN \
206 sizeof(struct audpp_msg_avsync_msg)
207
208struct audpp_msg_avsync_msg {
209 unsigned short active_flag;
210 unsigned short num_samples_counter0_HSW;
211 unsigned short num_samples_counter0_MSW;
212 unsigned short num_samples_counter0_LSW;
213 unsigned short num_bytes_counter0_HSW;
214 unsigned short num_bytes_counter0_MSW;
215 unsigned short num_bytes_counter0_LSW;
216 unsigned short samp_freq_obj_0;
217 unsigned short samp_freq_obj_1;
218 unsigned short samp_freq_obj_2;
219 unsigned short samp_freq_obj_3;
220 unsigned short samp_freq_obj_4;
221 unsigned short samp_freq_obj_5;
222 unsigned short samp_freq_obj_6;
223 unsigned short samp_freq_obj_7;
224 unsigned short samp_freq_obj_8;
225 unsigned short samp_freq_obj_9;
226 unsigned short samp_freq_obj_10;
227 unsigned short samp_freq_obj_11;
228 unsigned short samp_freq_obj_12;
229 unsigned short samp_freq_obj_13;
230 unsigned short samp_freq_obj_14;
231 unsigned short samp_freq_obj_15;
232 unsigned short num_samples_counter4_HSW;
233 unsigned short num_samples_counter4_MSW;
234 unsigned short num_samples_counter4_LSW;
235 unsigned short num_bytes_counter4_HSW;
236 unsigned short num_bytes_counter4_MSW;
237 unsigned short num_bytes_counter4_LSW;
238} __attribute__((packed));
239
240/*
241 * MSG to provide PCM DMA Missed feedback from the DSP to ARM
242 */
243
244#define AUDPP_MSG_PCMDMAMISSED 0x0006
245#define AUDPP_MSG_PCMDMAMISSED_LEN \
246 sizeof(struct audpp_msg_pcmdmamissed);
247
248struct audpp_msg_pcmdmamissed {
249 /*
250 ** Bit 0 0 = PCM DMA not missed for object 0
251 ** 1 = PCM DMA missed for object0
252 ** Bit 1 0 = PCM DMA not missed for object 1
253 ** 1 = PCM DMA missed for object1
254 ** Bit 2 0 = PCM DMA not missed for object 2
255 ** 1 = PCM DMA missed for object2
256 ** Bit 3 0 = PCM DMA not missed for object 3
257 ** 1 = PCM DMA missed for object3
258 ** Bit 4 0 = PCM DMA not missed for object 4
259 ** 1 = PCM DMA missed for object4
260 */
261 unsigned short pcmdmamissed;
262} __attribute__((packed));
263
264/*
265 * MSG to AUDPP enable or disable feedback form DSP to ARM
266 */
267
268#define AUDPP_MSG_CFG_MSG 0x0007
269#define AUDPP_MSG_CFG_MSG_LEN \
270 sizeof(struct audpp_msg_cfg_msg)
271
272#define AUDPP_MSG_ENA_ENA 0xFFFF
273#define AUDPP_MSG_ENA_DIS 0x0000
274
275struct audpp_msg_cfg_msg {
276 /* Enabled - 0xffff
277 ** Disabled - 0
278 */
279 unsigned short enabled;
280} __attribute__((packed));
281
282/*
283 * MSG to communicate the reverb per object volume
284 */
285
286#define AUDPP_MSG_QREVERB_VOLUME 0x0008
287#define AUDPP_MSG_QREVERB_VOLUME_LEN \
288 sizeof(struct audpp_msg_qreverb_volume)
289
290
291struct audpp_msg_qreverb_volume {
292 unsigned short obj_0_gain;
293 unsigned short obj_1_gain;
294 unsigned short obj_2_gain;
295 unsigned short obj_3_gain;
296 unsigned short obj_4_gain;
297 unsigned short hpcm_obj_volume;
298} __attribute__((packed));
299
300#define AUDPP_MSG_ROUTING_ACK 0x0009
301#define AUDPP_MSG_ROUTING_ACK_LEN \
302 sizeof(struct audpp_msg_routing_ack)
303
304struct audpp_msg_routing_ack {
305 unsigned short dec_id;
306 unsigned short routing_mode;
307} __attribute__((packed));
308
309#define AUDPP_MSG_FLUSH_ACK 0x000A
310
311#endif /* QDSP5AUDPPMSG_H */