comparison src/cs/services/Audio/audio_messages_i.h @ 0:945cf7f506b2

src/cs: chipsetsw import from tcs211-fcmodem binary blobs and LCD demo files have been excluded, all line endings are LF only
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 25 Sep 2016 22:50:11 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:945cf7f506b2
1 /****************************************************************************/
2 /* */
3 /* File Name: audio_messages_i.h */
4 /* */
5 /* Purpose: Internal messages used by AUDIO instance */
6 /* */
7 /* */
8 /* Version 0.1 */
9 /* */
10 /* Date Modification */
11 /* ------------------------------------ */
12 /* 18/05/2001 Create */
13 /* */
14 /* Author Francois Mazard - Stephanie Gerthoux */
15 /* */
16 /* */
17 /* (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved*/
18 /****************************************************************************/
19
20 #include "rv/rv_defined_swe.h"
21 #ifdef RVM_AUDIO_MAIN_SWE
22 #ifndef __AUDIO_MESSAGES_I_H_
23 #define __AUDIO_MESSAGES_I_H_
24
25 #include "l1_confg.h"
26
27 #include "ffs/ffs_api.h"
28
29 #ifdef __cplusplus
30 extern "C"
31 {
32 #endif
33
34 /******************************* KEY BEEP *****************************************/
35 #if (KEYBEEP)
36 /* Entity->Audio event */
37 #define AUDIO_KEYBEEP_START_REQ (0x0001 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
38 typedef struct
39 {
40 T_RV_HDR os_hdr;
41 T_AUDIO_KEYBEEP_PARAMETER keybeep_parameter;
42 T_RV_RETURN return_path;
43 } T_AUDIO_KEYBEEP_START;
44
45 /* Entity->Audio event */
46 #define AUDIO_KEYBEEP_STOP_REQ (0x0002 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
47 typedef struct
48 {
49 T_RV_HDR os_hdr;
50 T_RV_RETURN return_path;
51 } T_AUDIO_KEYBEEP_STOP;
52 #endif /* #if (KEYBEEP) */
53
54 /******************************* TONES *****************************************/
55 #if (TONE)
56 /* Entity->Audio event */
57 #define AUDIO_TONES_START_REQ (0x0003 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
58 typedef struct
59 {
60 T_RV_HDR os_hdr;
61 T_AUDIO_TONES_PARAMETER tones_parameter;
62 T_RV_RETURN return_path;
63 } T_AUDIO_TONES_START;
64
65 /* Entity->Audio event */
66 #define AUDIO_TONES_STOP_REQ (0x0004 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
67 typedef struct
68 {
69 T_RV_HDR os_hdr;
70 T_RV_RETURN return_path;
71 } T_AUDIO_TONES_STOP;
72 #endif
73
74 /******************************* DRIVER ****************************************/
75 #define AUDIO_DRIVER_START_SESSION (0x0005 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
76 typedef struct
77 {
78 T_RV_HDR os_hdr;
79 UINT8 channel_id;
80 T_RV_RETURN return_path;
81 } T_AUDIO_DRIVER_HANDLE_SESSION;
82
83 #define AUDIO_DRIVER_STOP_SESSION (0x0006 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
84
85 #define AUDIO_DRIVER_FREE_SESSION (0x0007 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
86
87 /******************************* MELODY_E1 *****************************************/
88 #if (MELODY_E1)
89 /* Entity->Audio event */
90 #define AUDIO_MELODY_E1_START_REQ (0x0008 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
91 typedef struct
92 {
93 T_RV_HDR os_hdr;
94 T_AUDIO_MELODY_E1_PARAMETER melody_E1_parameter;
95 T_FFS_FD audio_ffs_fd;
96 T_RV_RETURN return_path;
97 } T_AUDIO_MELODY_E1_START;
98
99 /* Entity->Audio event */
100 #define AUDIO_MELODY_E1_STOP_REQ (0x0009 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
101 typedef struct
102 {
103 T_RV_HDR os_hdr;
104 char melody_name[AUDIO_PATH_NAME_MAX_SIZE]; /* File name of the melody */
105 T_RV_RETURN return_path;
106 } T_AUDIO_MELODY_E1_STOP;
107
108 #endif
109
110 /******************************* MELODY_E2 *****************************************/
111 #if (MELODY_E2)
112 /* Entity->Audio event */
113 #define AUDIO_MELODY_E2_START_REQ (0x000A | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
114 typedef struct
115 {
116 T_RV_HDR os_hdr;
117 T_AUDIO_MELODY_E2_PARAMETER melody_E2_parameter;
118 T_FFS_FD audio_E2_ffs_fd;
119 T_RV_RETURN return_path;
120 } T_AUDIO_MELODY_E2_START;
121
122 /* Entity->Audio event */
123 #define AUDIO_MELODY_E2_STOP_REQ (0x000B | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
124 typedef struct
125 {
126 T_RV_HDR os_hdr;
127 char melody_E2_name[AUDIO_PATH_NAME_MAX_SIZE];
128 /* File name of the melody */
129 T_RV_RETURN return_path;
130 } T_AUDIO_MELODY_E2_STOP;
131
132 #endif
133
134
135 /******************************* FFS interface ************************************/
136 #if (MELODY_E1) || (MELODY_E2) || (VOICE_MEMO)
137 /* FFS FLASH to RAM interface */
138 /* start message */
139 #define AUDIO_FFS_FLASH_2_RAM_START_REQ (0x000C | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
140 typedef struct
141 {
142 T_RV_HDR os_hdr;
143 BOOLEAN loop;
144 UINT16 initial_size;
145 UINT8 session_id;
146 T_FFS_FD audio_ffs_fd;
147 } T_AUDIO_FFS_FLASH_2_RAM_START;
148
149 /* start confirmation message */
150 #define AUDIO_FFS_INIT_DONE (0x000D | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
151
152 typedef struct
153 {
154 T_RV_HDR os_hdr;
155 UINT8 session_id;
156 UINT8 channel_id;
157 } T_AUDIO_FFS_INIT;
158
159 /* stop message */
160 #define AUDIO_FFS_STOP_REQ (0x000E | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
161 typedef struct
162 {
163 T_RV_HDR os_hdr;
164 UINT8 session_id;
165 } T_AUDIO_FFS_STOP_REQ;
166
167 /* stop confirmation message */
168 #define AUDIO_FFS_STOP_CON (0x000F | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
169 typedef struct
170 {
171 T_RV_HDR os_hdr;
172 UINT8 session_id;
173 } T_AUDIO_FFS_STOP_CON;
174
175 /* FFS RAM to FLASH interface */
176 /* start message */
177 #define AUDIO_FFS_RAM_2_FLASH_START_REQ (0x0010 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
178 typedef struct
179 {
180 T_RV_HDR os_hdr;
181 UINT16 initial_size;
182 UINT8 session_id;
183 T_FFS_FD audio_ffs_fd;
184 } T_AUDIO_FFS_RAM_2_FLASH_START;
185 #endif
186
187 /******************************* VOICE MEMO *****************************************/
188 #if (VOICE_MEMO)
189
190 /* ------------------------------- */
191 /* Voice Memo PLAY */
192 /* ------------------------------- */
193 /* Entity->Audio event */
194 #define AUDIO_VM_PLAY_START_REQ (0x0011 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
195 typedef struct
196 {
197 T_RV_HDR os_hdr;
198 T_FFS_FD audio_ffs_fd;
199 T_RV_RETURN return_path;
200 } T_AUDIO_VM_PLAY_START;
201
202 /* Entity->Audio event */
203 #define AUDIO_VM_PLAY_STOP_REQ (0x0012 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
204 typedef struct
205 {
206 T_RV_HDR os_hdr;
207 T_RV_RETURN return_path;
208 } T_AUDIO_VM_PLAY_STOP;
209
210 /* ------------------------------- */
211 /* Voice Memo RECORD */
212 /* ------------------------------- */
213 /* Entity->Audio event */
214 #define AUDIO_VM_RECORD_START_REQ (0x0013 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
215 typedef struct
216 {
217 T_RV_HDR os_hdr;
218 UINT32 memo_duration;
219 BOOL compression_mode;
220 UINT16 microphone_gain;
221 UINT16 network_gain;
222 T_FFS_FD audio_ffs_fd;
223 T_AUDIO_TONES_PARAMETER tones_parameter;
224 T_RV_RETURN return_path;
225 } T_AUDIO_VM_RECORD_START;
226
227 /* Entity->Audio event */
228 #define AUDIO_VM_RECORD_STOP_REQ (0x0014 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
229 typedef struct
230 {
231 T_RV_HDR os_hdr;
232 T_RV_RETURN return_path;
233 } T_AUDIO_VM_RECORD_STOP;
234 #endif
235
236 #if (L1_VOICE_MEMO_AMR)
237 #define AUDIO_DRIVER_INIT_VM_AMR_RECORD_SESSION (0x0015 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
238 typedef struct
239 {
240 T_RV_HDR os_hdr;
241 UINT32 memo_duration;
242 BOOL compression_mode;
243 UINT16 microphone_gain;
244 UINT8 amr_vocoder;
245 T_AUDIO_DRIVER_PARAMETER driver_parameter;
246 T_RV_RETURN return_path;
247 } T_AUDIO_DRIVER_INIT_VM_AMR_RECORD_SESSION;
248
249 #define AUDIO_DRIVER_INIT_VM_AMR_PLAY_SESSION (0x0016 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
250 typedef struct
251 {
252 T_RV_HDR os_hdr;
253 T_AUDIO_DRIVER_PARAMETER driver_parameter;
254 T_RV_RETURN return_path;
255 } T_AUDIO_DRIVER_INIT_VM_AMR_PLAY_SESSION;
256
257 #define AUDIO_VM_AMR_RECORD_TO_FFS_START_REQ (0x0017 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
258 typedef struct
259 {
260 T_RV_HDR os_hdr;
261 UINT32 memo_duration;
262 BOOL compression_mode;
263 UINT16 microphone_gain;
264 UINT8 amr_vocoder;
265 T_FFS_FD audio_ffs_fd;
266 T_RV_RETURN return_path;
267 } T_AUDIO_VM_AMR_RECORD_TO_FFS_START;
268
269 #define AUDIO_VM_AMR_RECORD_TO_RAM_START_REQ (0x0018 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
270 typedef struct
271 {
272 T_RV_HDR os_hdr;
273 UINT32 memo_duration;
274 BOOL compression_mode;
275 UINT16 microphone_gain;
276 UINT8 amr_vocoder;
277 UINT8* p_buffer;
278 T_RV_RETURN return_path;
279 } T_AUDIO_VM_AMR_RECORD_TO_RAM_START;
280
281 #define AUDIO_VM_AMR_PLAY_FROM_FFS_START_REQ (0x0019 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
282 typedef struct
283 {
284 T_RV_HDR os_hdr;
285 T_FFS_FD audio_ffs_fd;
286 T_RV_RETURN return_path;
287 } T_AUDIO_VM_AMR_PLAY_FROM_FFS_START;
288
289 #define AUDIO_VM_AMR_PLAY_FROM_RAM_START_REQ (0x001A | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
290 typedef struct
291 {
292 T_RV_HDR os_hdr;
293 UINT8 *p_buffer;
294 UINT16 buffer_size;
295 T_RV_RETURN return_path;
296 } T_AUDIO_VM_AMR_PLAY_FROM_RAM_START;
297
298 #define AUDIO_VM_AMR_RECORD_TO_FFS_STOP_REQ (0x001B | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
299 #define AUDIO_VM_AMR_RECORD_TO_RAM_STOP_REQ (0x001C | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
300 typedef struct
301 {
302 T_RV_HDR os_hdr;
303 } T_AUDIO_VM_AMR_RECORD_STOP;
304
305 #define AUDIO_VM_AMR_PLAY_FROM_FFS_STOP_REQ (0x001D | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
306 #define AUDIO_VM_AMR_PLAY_FROM_RAM_STOP_REQ (0x001E | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
307 typedef struct
308 {
309 T_RV_HDR os_hdr;
310 } T_AUDIO_VM_AMR_PLAY_STOP;
311
312
313 #define AUDIO_MEM_START_REQ (0x001F | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
314 typedef struct
315 {
316 T_RV_HDR os_hdr;
317 UINT8 channel_id;
318 UINT8 session_id;
319 #if (AUDIO_NEW_FFS_MANAGER)
320 T_FFS_FD audio_ffs_fd;
321 #endif
322 #if (AUDIO_RAM_MANAGER)
323 UINT8 *audio_ram_fd;
324 UINT16 audio_ram_size;
325 #endif
326 UINT16 size;
327 } T_AUDIO_MEM_START;
328
329 #define AUDIO_MEM_STOP_REQ (0x0020 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
330 typedef struct
331 {
332 T_RV_HDR os_hdr;
333 UINT8 channel_id;
334 T_RV_RETURN return_path;
335 } T_AUDIO_MEM_STOP;
336
337 #define AUDIO_MEM_STATUS_MSG (0x0021 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
338 typedef struct
339 {
340 T_RV_HDR os_hdr;
341 INT8 status;
342 UINT8 status_type;
343 UINT8 channel_id;
344 UINT32 recorded_size;
345 } T_AUDIO_MEM_STATUS;
346
347 #endif
348
349 /******************************* SPEECH RECO *****************************************/
350 #if (SPEECH_RECO)
351 /* ------------------------------- */
352 /* Speech Reco enrollment */
353 /* ------------------------------- */
354 /* Entity->Audio event */
355 #define AUDIO_SR_ENROLL_START_REQ (0x0022 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
356 typedef struct
357 {
358 T_RV_HDR os_hdr;
359 T_FFS_FD voice_ffs_fd;
360 T_FFS_FD sr_ffs_fd;
361 T_RV_RETURN return_path;
362 } T_AUDIO_SR_ENROLL_START;
363
364 /* Entity->Audio event */
365 #define AUDIO_SR_ENROLL_STOP_REQ (0x0023 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
366 typedef struct
367 {
368 T_RV_HDR os_hdr;
369 T_RV_RETURN return_path;
370 } T_AUDIO_SR_ENROLL_STOP;
371
372 /* ------------------------------- */
373 /* Speech Reco update */
374 /* ------------------------------- */
375 /* Entity->Audio event */
376 #define AUDIO_SR_UPDATE_START_REQ (0x0024 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
377 typedef struct
378 {
379 T_RV_HDR os_hdr;
380 UINT8 vocabulary_size;
381 UINT8 model_index;
382 void *p_database;
383 BOOL record_speech;
384 T_RV_RETURN return_path;
385 } T_AUDIO_SR_UPDATE_START;
386
387 /* Entity->Audio event */
388 #define AUDIO_SR_UPDATE_STOP_REQ (0x0025 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
389 typedef struct
390 {
391 T_RV_HDR os_hdr;
392 T_RV_RETURN return_path;
393 } T_AUDIO_SR_UPDATE_STOP;
394
395 /* ------------------------------- */
396 /* Speech Reco reco */
397 /* ------------------------------- */
398 /* Entity->Audio event */
399 #define AUDIO_SR_RECO_START_REQ (0x0026 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
400 typedef struct
401 {
402 T_RV_HDR os_hdr;
403 UINT8 vocabulary_size;
404 void *p_database;
405 T_RV_RETURN return_path;
406 } T_AUDIO_SR_RECO_START;
407
408 /* Entity->Audio event */
409 #define AUDIO_SR_RECO_STOP_REQ (0x0027 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
410 typedef struct
411 {
412 T_RV_HDR os_hdr;
413 T_RV_RETURN return_path;
414 } T_AUDIO_SR_RECO_STOP;
415 #endif /* SPEECH_RECO */
416
417 /******************************* AUDIO_MODE *****************************************/
418 /* ------------------------------- */
419 /* Full access write */
420 /* ------------------------------- */
421 /* Entity->Audio event */
422 #define AUDIO_MODE_WRITE_REQ (0x0028 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
423 typedef struct
424 {
425 T_RV_HDR os_hdr;
426 T_AUDIO_FULL_ACCESS_WRITE audio_parameter;
427 T_RV_RETURN return_path;
428 } T_AUDIO_MODE_FULL_ACCESS_WRITE_REQ;
429
430 /* ------------------------------- */
431 /* save audio mode */
432 /* ------------------------------- */
433 /* Entity->Audio event */
434 #define AUDIO_MODE_SAVE_REQ (0x0029 | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
435 typedef struct
436 {
437 T_RV_HDR os_hdr;
438 T_FFS_FD audio_ffs_fd;
439 T_FFS_FD audio_volume_ffs_fd;
440 T_RV_RETURN return_path;
441 } T_AUDIO_MODE_SAVE_REQ;
442
443 /* ------------------------------- */
444 /* load audio mode */
445 /* ------------------------------- */
446 /* Entity->Audio event */
447 #define AUDIO_MODE_LOAD_REQ (0x002A | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
448 typedef struct
449 {
450 T_RV_HDR os_hdr;
451 T_FFS_FD audio_ffs_fd;
452 T_FFS_FD audio_volume_ffs_fd;
453 char audio_volume_path_name[AUDIO_PATH_NAME_MAX_SIZE];
454 T_RV_RETURN return_path;
455 } T_AUDIO_MODE_LOAD_REQ;
456
457 /* ------------------------------- */
458 /* audio speaker volume */
459 /* ------------------------------- */
460 /* Entity->Audio event */
461 #define AUDIO_SPEAKER_VOLUME_REQ (0x002B | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
462 typedef struct
463 {
464 T_RV_HDR os_hdr;
465 T_AUDIO_SPEAKER_VOLUME volume;
466 T_RV_RETURN return_path;
467 } T_AUDIO_SPEAKER_VOLUME_REQ;
468
469
470 /* -------------------------------------------------------- */
471 /* WARNING: TTY Messages ID are defined as Audio messages. */
472 /* To avoid any conflict have a look in tty_i.h & tty_api.h */
473 /* -------------------------------------------------------- */
474
475
476 /******************************* MIDI *****************************************/
477 /* ------------------- */
478 /* MIDI */
479 /* ------------------- */
480 /* Entity->Audio event */
481 #define AUDIO_DRIVER_INIT_MIDI_SESSION (0x002C | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
482 typedef struct
483 {
484 T_RV_HDR os_hdr;
485 T_AUDIO_DRIVER_PARAMETER driver_parameter;
486 T_RV_RETURN return_path;
487 } T_AUDIO_DRIVER_INIT_MIDI_SESSION;
488
489 #define AUDIO_MIDI_START_REQ (0x002D | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
490 typedef struct
491 {
492 T_RV_HDR os_hdr;
493 T_FFS_FD audio_ffs_fd;
494 T_RV_RETURN return_path;
495 } T_AUDIO_MIDI_START;
496
497 #define AUDIO_MIDI_STOP_REQ (0x002E | AUDIO_EVENT_INTERN | AUDIO_EVENTS_MASK)
498 typedef struct
499 {
500 T_RV_HDR os_hdr;
501 T_RV_RETURN return_path;
502 } T_AUDIO_MIDI_STOP;
503
504 #ifdef __cplusplus
505 }
506 #endif
507
508 #endif /* __AUDIO_MESSAGES_I_ */
509
510 #endif /* #ifdef RVM_AUDIO_MAIN_SWE */