FreeCalypso > hg > tcs211-fcmodem
comparison chipsetsw/services/Audio/audio_vm.c @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /****************************************************************************/ | |
2 /* */ | |
3 /* File Name: audio_vm.c */ | |
4 /* */ | |
5 /* Purpose: This file contains all the functions used to manage the */ | |
6 /* Voice Memorization . */ | |
7 /* */ | |
8 /* Version 0.1 */ | |
9 /* */ | |
10 /* Date Modification */ | |
11 /* ------------------------------------ */ | |
12 /* 2 August 2001 Create */ | |
13 /* */ | |
14 /* Author */ | |
15 /* Stephanie Gerthoux */ | |
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 _WINDOWS | |
23 #include "config/swconfig.cfg" | |
24 #include "config/sys.cfg" | |
25 #include "config/chipset.cfg" | |
26 #endif | |
27 | |
28 /* include the usefull L1 header */ | |
29 #include "l1_confg.h" | |
30 | |
31 #if (VOICE_MEMO) | |
32 #include "rv/rv_general.h" | |
33 #include "rvm/rvm_gen.h" | |
34 #include "audio/audio_ffs_i.h" | |
35 #include "audio/audio_api.h" | |
36 #include "audio/audio_structs_i.h" | |
37 #include "audio/audio_var_i.h" | |
38 #include "audio/audio_messages_i.h" | |
39 #include "rvf/rvf_target.h" | |
40 #include "audio/audio_const_i.h" | |
41 #include "audio/audio_error_hdlr_i.h" | |
42 | |
43 /* include the usefull L1 header */ | |
44 #define BOOL_FLAG | |
45 #define CHAR_FLAG | |
46 #include "l1_types.h" | |
47 #include "l1audio_cust.h" | |
48 #include "l1audio_msgty.h" | |
49 #include "l1audio_signa.h" | |
50 | |
51 /********************************************************************************/ | |
52 /* */ | |
53 /* Function Name: audio_voice_memo_message_switch */ | |
54 /* */ | |
55 /* Purpose: Manage the message supply between the vice memo play and the */ | |
56 /* voice memo record */ | |
57 /* */ | |
58 /* Input Parameters: */ | |
59 /* start or stop message from the voice memo features */ | |
60 /* */ | |
61 /* Output Parameters: */ | |
62 /* index of the manager */ | |
63 /* */ | |
64 /* Note: */ | |
65 /* None. */ | |
66 /* */ | |
67 /* Revision History: */ | |
68 /* None. */ | |
69 /* */ | |
70 /********************************************************************************/ | |
71 UINT8 audio_voice_memo_message_switch (T_RV_HDR *p_message) | |
72 { | |
73 switch (p_message->msg_id) | |
74 { | |
75 case AUDIO_FFS_INIT_DONE: | |
76 { | |
77 /* The FFS message is from the voice memo play */ | |
78 if ( ((T_AUDIO_FFS_INIT *)p_message)->session_id == AUDIO_FFS_SESSION_VM_PLAY ) | |
79 { | |
80 return(AUDIO_VM_PLAY); | |
81 } | |
82 /* The FFS message is from the voice memo record */ | |
83 if ( ((T_AUDIO_FFS_INIT *)p_message)->session_id == AUDIO_FFS_SESSION_VM_RECORD ) | |
84 { | |
85 return(AUDIO_VM_RECORD); | |
86 } | |
87 return(AUDIO_VM_NONE); | |
88 } | |
89 case AUDIO_FFS_STOP_CON: | |
90 { | |
91 /* The FFS message is from the voice memo play*/ | |
92 if ( ((T_AUDIO_FFS_STOP_REQ *)p_message)->session_id == AUDIO_FFS_SESSION_VM_PLAY ) | |
93 { | |
94 return(AUDIO_VM_PLAY); | |
95 } | |
96 /* The FFS message is from the voice memo record */ | |
97 if ( ((T_AUDIO_FFS_STOP_REQ *)p_message)->session_id == AUDIO_FFS_SESSION_VM_RECORD ) | |
98 { | |
99 return(AUDIO_VM_RECORD); | |
100 } | |
101 return(AUDIO_VM_NONE); | |
102 } | |
103 case AUDIO_VM_PLAY_START_REQ: | |
104 case AUDIO_VM_PLAY_STOP_REQ: | |
105 case MMI_VM_PLAY_START_CON: | |
106 case MMI_VM_PLAY_STOP_CON: | |
107 { | |
108 return(AUDIO_VM_PLAY); | |
109 } | |
110 case AUDIO_VM_RECORD_START_REQ: | |
111 case AUDIO_VM_RECORD_STOP_REQ: | |
112 case MMI_VM_RECORD_START_CON: | |
113 case MMI_VM_RECORD_STOP_CON: | |
114 { | |
115 return(AUDIO_VM_RECORD); | |
116 } | |
117 default: | |
118 { | |
119 return(AUDIO_VM_NONE); | |
120 break; | |
121 } | |
122 | |
123 } /* switch */ | |
124 } | |
125 | |
126 #endif /* VOICE_MEMO */ | |
127 #endif /* RVM_AUDIO_MAIN_SWE */ |