blob: 7f2f27673b058e536c2da25238e9222bc77d14ba [file] [log] [blame]
yu.dongc33b3072024-08-21 23:14:49 -07001/*****************************************************************************
2* Copyright Statement:
3* --------------------
4* This software is protected by Copyright and the information contained
5* herein is confidential. The software may not be copied and the information
6* contained herein may not be used or disclosed except with the written
7* permission of MediaTek Inc. (C) 2005
8*
9* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
10* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
11* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
12* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
13* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
14* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
15* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
16* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
17* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
18* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
19* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
20* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
21*
22* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
23* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
24* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
25* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
26* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
27*
28* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
29* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
30* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
31* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
32* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
33*
34*****************************************************************************/
35
36/*******************************************************************************
37 * Filename:
38 * ---------
39 * med_struct.h
40 *
41 * Project:
42 * --------
43 * Maui
44 *
45 * Description:
46 * ------------
47 * This file includes primary global variables of media task.
48 *
49 * Author:
50 * -------
51 * -------
52 *
53 *==============================================================================
54 * HISTORY
55 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
56 *------------------------------------------------------------------------------
57 * removed!
58 *
59 * removed!
60 * removed!
61 * removed!
62 *
63 * removed!
64 * removed!
65 * removed!
66 *
67 * removed!
68 * removed!
69 * removed!
70 * removed!
71 * removed!
72 * removed!
73 * removed!
74 *
75 * removed!
76 * removed!
77 * removed!
78 *
79 * removed!
80 * removed!
81 * removed!
82 *
83 * removed!
84 * removed!
85 * removed!
86 *
87 * removed!
88 * removed!
89 * removed!
90 *
91 * removed!
92 * removed!
93 * removed!
94 *
95 *
96 *
97 *------------------------------------------------------------------------------
98 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
99 *==============================================================================
100 *******************************************************************************/
101
102//kmoly
103#ifndef _MED_STRUCT_H
104#define _MED_STRUCT_H
105
106#include "kal_general_types.h"
107#include "kal_public_api.h"
108
109#define MAX_MEDIA_FILE_NAME 512
110
111#define WB_SPEECH_FIR_COEFF_NUM 90
112#define SPEECH_FIR_COEFF_NUM 45
113#define MELODY_FIR_COEFF_NUM 25
114#define AUDIO_COMP_COEFF_NUM 45
115
116#define EMSD_DATA_LEN 140
117
118
119/* start up */
120typedef struct
121{
122 LOCAL_PARA_HDR
123}
124med_startup_req_struct;
125
126typedef struct
127{
128 LOCAL_PARA_HDR
129 kal_uint8 result;
130}
131med_startup_cnf_struct;
132
133
134typedef void (*media_in_proc_call_type) (kal_uint32 arg1, void *arg2);
135
136typedef struct
137{
138 LOCAL_PARA_HDR
139 media_in_proc_call_type func;
140 kal_uint32 func_arg1;
141 void *func_arg2;
142}
143media_in_proc_call_req_struct;
144
145typedef struct
146{
147 LOCAL_PARA_HDR
148 kal_uint32 result;
149 void *result_p;
150}
151media_in_proc_call_cnf_struct;
152
153/* audio */
154
155typedef struct
156{
157 LOCAL_PARA_HDR
158 kal_uint8 src_id;
159 kal_uint8 mode;
160}
161media_aud_set_audio_mode_req_struct;
162
163typedef struct
164{
165 LOCAL_PARA_HDR
166 kal_uint8 src_id;
167 kal_bool result;
168 kal_uint16 cause;
169}
170media_aud_set_audio_mode_cnf_struct;
171
172typedef struct
173{
174 kal_uint8 mode;
175 kal_uint8 melody[7];
176 kal_uint8 sound[7];
177 kal_uint8 keytone[7];
178 kal_uint8 speech[7];
179 kal_uint8 mic[7];
180 kal_uint8 sidetone;
181 kal_uint8 max_melody_volume_gain;
182 kal_uint8 melody_volume_gain_step;
183 kal_uint8 tv_out_volume_gain[7];
184}
185audio_profile_struct;
186
187typedef struct
188{
189 LOCAL_PARA_HDR
190 kal_uint8 src_id;
191 kal_bool update_nvram;
192 audio_profile_struct audio_profile;
193}
194media_aud_set_audio_profile_req_struct;
195
196typedef struct
197{
198 LOCAL_PARA_HDR
199 kal_uint8 src_id;
200 kal_bool result;
201 kal_uint16 cause;
202}
203media_aud_set_audio_profile_cnf_struct;
204
205typedef struct
206{
207 LOCAL_PARA_HDR
208 kal_uint8 src_id;
209 kal_uint8 mode;
210}
211media_aud_get_audio_profile_req_struct;
212
213typedef struct
214{
215 LOCAL_PARA_HDR
216 kal_uint8 src_id;
217 kal_bool result;
218 audio_profile_struct audio_profile;
219}
220media_aud_get_audio_profile_cnf_struct;
221
222typedef struct
223{
224 kal_int16 coeff[6][WB_SPEECH_FIR_COEFF_NUM];
225}
226audio_wb_speech_fir_struct;
227
228typedef struct
229{
230 kal_int16 param[8][16];
231}
232audio_wb_speech_mode_struct;
233
234typedef struct
235{
236 kal_int16 speech_input_FIR_coeffs[6][SPEECH_FIR_COEFF_NUM];
237 kal_int16 speech_output_FIR_coeffs[6][SPEECH_FIR_COEFF_NUM];
238 kal_uint16 selected_FIR_output_index;
239 kal_uint16 speech_common_para[12];
240 kal_uint16 speech_mode_para[8][16];
241 kal_uint16 speech_volume_para[3][7][4];
242 kal_uint16 max_swing;
243 kal_int16 Melody_FIR_Coeff_Tbl[MELODY_FIR_COEFF_NUM];
244 kal_int16 audio_compensation_coeff[3][AUDIO_COMP_COEFF_NUM]; /* LOUDSPEAKER/EARPHONE/LOUDSPEAKER_RINGTONE */
245}
246audio_param_struct;
247
248
249typedef struct
250{
251 LOCAL_PARA_HDR
252 kal_uint8 src_id;
253 kal_bool update_nvram;
254 audio_param_struct audio_param;
255}
256media_aud_set_audio_param_req_struct;
257
258typedef struct
259{
260 LOCAL_PARA_HDR
261 kal_uint8 src_id;
262 kal_bool result;
263 kal_uint16 cause;
264}
265media_aud_set_audio_param_cnf_struct;
266
267typedef struct
268{
269 LOCAL_PARA_HDR
270 kal_uint8 src_id;
271}
272media_aud_get_audio_param_req_struct;
273
274typedef struct
275{
276 LOCAL_PARA_HDR
277 kal_uint8 src_id;
278 kal_bool result;
279 audio_param_struct audio_param;
280}
281media_aud_get_audio_param_cnf_struct;
282
283typedef struct
284{
285 LOCAL_PARA_HDR
286 kal_uint8 src_id;
287 kal_bool update_nvram;
288 audio_wb_speech_fir_struct fir_param;
289}
290media_aud_set_audio_wb_input_fir_param_req_struct;
291
292typedef struct
293{
294 LOCAL_PARA_HDR
295 kal_uint8 src_id;
296 kal_bool result;
297 kal_uint16 cause;
298}
299media_aud_set_audio_wb_input_fir_param_cnf_struct;
300
301typedef struct
302{
303 LOCAL_PARA_HDR
304 kal_uint8 src_id;
305 kal_bool update_nvram;
306 audio_wb_speech_fir_struct fir_param;
307}
308media_aud_set_audio_wb_output_fir_param_req_struct;
309
310typedef struct
311{
312 LOCAL_PARA_HDR
313 kal_uint8 src_id;
314 kal_bool result;
315 kal_uint16 cause;
316}
317media_aud_set_audio_wb_output_fir_param_cnf_struct;
318
319typedef struct
320{
321 LOCAL_PARA_HDR
322 kal_uint8 src_id;
323 kal_bool update_nvram;
324 audio_wb_speech_mode_struct mode;
325}
326media_aud_set_audio_wb_mode_param_req_struct;
327
328typedef struct
329{
330 LOCAL_PARA_HDR
331 kal_uint8 src_id;
332 kal_bool result;
333 kal_uint16 cause;
334}
335media_aud_set_audio_wb_mode_param_cnf_struct;
336
337typedef struct
338{
339 LOCAL_PARA_HDR
340 kal_uint8 src_id;
341}
342media_aud_get_audio_wb_input_fir_param_req_struct;
343
344typedef struct
345{
346 LOCAL_PARA_HDR
347 kal_uint8 src_id;
348 kal_bool result;
349 audio_wb_speech_fir_struct fir_param;
350}
351media_aud_get_audio_wb_input_fir_param_cnf_struct;
352
353typedef struct
354{
355 LOCAL_PARA_HDR
356 kal_uint8 src_id;
357}
358media_aud_get_audio_wb_output_fir_param_req_struct;
359
360typedef struct
361{
362 LOCAL_PARA_HDR
363 kal_uint8 src_id;
364 kal_bool result;
365 audio_wb_speech_fir_struct fir_param;
366}
367media_aud_get_audio_wb_output_fir_param_cnf_struct;
368
369typedef struct
370{
371 LOCAL_PARA_HDR
372 kal_uint8 src_id;
373}
374media_aud_get_audio_wb_mode_param_req_struct;
375
376typedef struct
377{
378 LOCAL_PARA_HDR
379 kal_uint8 src_id;
380 kal_bool result;
381 audio_wb_speech_mode_struct fir_param;
382}
383media_aud_get_audio_wb_mode_param_cnf_struct;
384
385typedef struct
386{
387 LOCAL_PARA_HDR
388 kal_uint8 src_id;
389 kal_uint8 volume_type;
390}
391media_aud_get_volume_req_struct;
392
393typedef struct
394{
395 LOCAL_PARA_HDR
396 kal_uint8 src_id;
397 kal_bool result;
398 kal_uint8 volume_type;
399 kal_uint8 volume;
400}
401media_aud_get_volume_cnf_struct;
402
403typedef struct
404{
405 LOCAL_PARA_HDR
406 kal_uint8 audio_type;
407 kal_uint8 device;
408}
409media_aud_set_device_req_struct;
410
411typedef struct
412{
413 LOCAL_PARA_HDR
414 kal_uint8 result;
415}
416media_aud_set_device_cnf_struct;
417
418typedef struct
419{
420 LOCAL_PARA_HDR
421 kal_uint64 volume; /* volume data */
422 kal_uint8 audio_type; /* volume type */
423 kal_uint8 aux_volume; /* no use */
424 kal_uint8 mode; /* no use */
425 kal_bool apply; /* use for media type only */
426 kal_bool blocking;
427}
428media_aud_set_volume_req_struct;
429
430typedef struct
431{
432 LOCAL_PARA_HDR
433 kal_uint8 result;
434}
435media_aud_set_volume_cnf_struct;
436
437typedef struct
438{
439 LOCAL_PARA_HDR
440 kal_uint8 src_id;
441 kal_bool monitor; /* KAL_TRUE: open monitor, KAL_FALSE: close monitor */
442}
443media_aud_emsd_monitor_req_struct;
444
445typedef struct
446{
447 LOCAL_PARA_HDR
448 kal_uint8 src_id;
449 kal_bool result;
450 kal_bool cause_present;
451 kal_uint8 cause;
452}
453media_aud_emsd_monitor_cnf_struct;
454
455typedef struct
456{
457 LOCAL_PARA_HDR
458 kal_uint8 src_id;
459 kal_uint8 data[EMSD_DATA_LEN];
460}
461media_aud_emsd_set_req_struct;
462
463typedef struct
464{
465 LOCAL_PARA_HDR
466 kal_uint8 src_id;
467 kal_bool result;
468 kal_bool cause_present;
469 kal_uint8 cause;
470}
471media_aud_emsd_set_cnf_struct;
472
473typedef struct
474{
475 LOCAL_PARA_HDR
476 kal_uint8 src_id;
477}
478media_aud_emsd_push_req_struct;
479
480typedef struct
481{
482 LOCAL_PARA_HDR
483 kal_uint8 src_id;
484 kal_bool result;
485 kal_bool cause_present;
486 kal_uint8 cause;
487}
488media_aud_emsd_push_cnf_struct;
489
490typedef struct
491{
492 LOCAL_PARA_HDR
493}
494media_aud_emsd_pull_ind_struct;
495
496typedef struct
497{
498 LOCAL_PARA_HDR
499 kal_bool result;
500 kal_bool cause_present;
501 kal_uint8 cause;
502}
503media_aud_emsd_hack_ind_struct;
504
505typedef struct
506{
507 LOCAL_PARA_HDR
508}
509media_aud_emsd_lack_ind_struct;
510
511typedef struct
512{
513 LOCAL_PARA_HDR
514}
515media_aud_emsd_sync_ind_struct;
516
517typedef struct
518{
519 LOCAL_PARA_HDR
520 kal_uint8 src_id;
521 kal_bool monitor; /* KAL_TRUE: open monitor, KAL_FALSE: close monitor */
522}
523media_aud_emsd_psap_monitor_req_struct;
524
525typedef struct
526{
527 LOCAL_PARA_HDR
528 kal_uint8 src_id;
529 kal_bool result;
530 kal_bool cause_present;
531 kal_uint8 cause;
532}
533media_aud_emsd_psap_monitor_cnf_struct;
534
535typedef struct
536{
537 LOCAL_PARA_HDR
538 kal_uint8 src_id;
539}
540media_aud_emsd_psap_pull_req_struct;
541
542typedef struct
543{
544 LOCAL_PARA_HDR
545 kal_uint8 src_id;
546 kal_bool result;
547 kal_bool cause_present;
548 kal_uint8 cause;
549}
550media_aud_emsd_psap_pull_cnf_struct;
551
552typedef struct
553{
554 LOCAL_PARA_HDR
555 kal_uint8 data[EMSD_DATA_LEN];
556}
557media_aud_emsd_psap_data_ind_struct;
558
559
560typedef struct
561{
562 LOCAL_PARA_HDR
563 kal_uint64 volume;
564 kal_uint16 identifier;
565 kal_uint8 audio_id;
566 kal_uint8 play_style;
567 kal_uint8 output_path;
568}
569media_aud_play_by_id_req_struct;
570
571typedef struct
572{
573 LOCAL_PARA_HDR
574 kal_uint8 result;
575}
576media_aud_play_by_id_cnf_struct;
577
578typedef struct
579{
580 LOCAL_PARA_HDR
581 kal_uint8 audio_id;
582}
583media_aud_stop_by_id_req_struct;
584
585typedef struct
586{
587 LOCAL_PARA_HDR
588 kal_uint8 result;
589}
590media_aud_stop_by_id_cnf_struct;
591
592typedef struct
593{
594 LOCAL_PARA_HDR
595 kal_uint64 volume;
596 /* set both start_offset and end_offset to 0 for backward compatible */
597 kal_uint32 start_offset; /* 0 : file begining */
598 kal_uint32 end_offset; /* 0 or file data len-1: file end */
599 void* cache_p; /* cache */
600 kal_wchar file_name[MAX_MEDIA_FILE_NAME];
601 kal_uint16 identifier;
602 kal_uint8 src_id;
603 kal_uint8 play_style;
604 kal_uint8 output_path;
605}
606media_aud_play_by_file_req_struct;
607
608typedef struct
609{
610 LOCAL_PARA_HDR
611 kal_uint8 src_id;
612 kal_uint8 result;
613}
614media_aud_play_by_file_cnf_struct;
615
616typedef struct
617{
618 LOCAL_PARA_HDR
619 kal_uint8 src_id;
620}
621media_aud_stop_req_struct;
622
623typedef struct
624{
625 LOCAL_PARA_HDR
626 kal_uint8 src_id;
627 kal_uint8 result;
628}
629media_aud_stop_cnf_struct;
630
631typedef struct
632{
633 LOCAL_PARA_HDR
634 kal_uint64 volume;
635 const kal_uint8 *melody;
636 kal_uint32 len;
637 kal_uint32 start_offset;
638 kal_uint32 end_offset;
639 kal_uint16 identifier;
640 kal_uint8 src_id;
641 kal_uint8 format;
642 kal_uint8 play_style;
643 kal_uint8 output_path;
644 kal_uint8 blocking;
645}
646media_aud_play_by_string_req_struct;
647
648typedef struct
649{
650 LOCAL_PARA_HDR
651 kal_uint8 src_id;
652 kal_uint8 result;
653}
654media_aud_play_by_string_cnf_struct;
655
656typedef struct
657{
658 LOCAL_PARA_HDR
659 kal_uint8 src_id;
660}
661media_aud_stop_by_string_req_struct;
662
663typedef struct
664{
665 LOCAL_PARA_HDR
666 kal_uint8 src_id;
667 kal_uint8 result;
668}
669media_aud_stop_by_string_cnf_struct;
670
671typedef struct
672{
673 LOCAL_PARA_HDR
674 kal_uint16 identifier;
675 kal_uint8 result;
676}
677media_aud_play_finish_ind_struct;
678
679typedef struct
680{
681 LOCAL_PARA_HDR
682 kal_uint8 device;
683 kal_bool mute;
684}
685media_aud_mute_req_struct;
686
687typedef struct
688{
689 LOCAL_PARA_HDR
690 kal_uint8 result;
691}
692media_aud_mute_cnf_struct;
693
694typedef struct
695{
696 LOCAL_PARA_HDR
697 kal_int16 input_idx;
698 kal_int16 output_idx;
699}
700media_aud_sp_set_fir_coeff_req_struct;
701
702typedef struct
703{
704 LOCAL_PARA_HDR
705 kal_uint8 mode;
706 kal_bool is_with_param;
707 kal_uint16 param[16];
708 kal_uint16 wb_param[16];
709}
710media_aud_sp_set_enhance_mode_req_struct;
711
712typedef struct
713{
714 LOCAL_PARA_HDR
715 kal_bool speech_on;
716 kal_uint8 rat_mode;
717}
718meida_aud_sp_set_mode_req_struct;
719
720typedef struct
721{
722 LOCAL_PARA_HDR
723 kal_uint8 result;
724}
725media_aud_sp_set_mode_cnf_struct;
726
727#ifndef L4_NOT_PRESENT
728
729#include "device.h"
730
731typedef struct
732{
733 kal_uint8 volume_gain[MAX_VOL_CATE][MAX_VOL_TYPE][MAX_VOL_LEVEL];
734 kal_uint8 volume[MAX_VOL_CATE][MAX_VOL_TYPE];
735 kal_uint8 max_melody_volume_gain[MAX_VOL_CATE + 1];
736 kal_uint8 melody_volume_gain_step[MAX_VOL_CATE + 1];
737 kal_uint8 tv_out_volume_gain[MAX_VOL_LEVEL];
738} custom_acoustic_struct;
739#endif
740
741#endif /* _MED_STRUCT_H */