comparison gsm-fw/include/condat/audio.h @ 662:a712c95b60c1

gsm-fw/include/condat: import of TI's g23m/condat/com/include custom.h, pwr.h and rtc.h taken from TCS211 version, the others are the versions from LoCosto
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 28 Sep 2014 01:14:48 +0000
parents
children 6c5d3fecbc67
comparison
equal deleted inserted replaced
661:c36fe9d1da7e 662:a712c95b60c1
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM (6301)
4 | Modul :
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose : Types definitions for the audio driver
18 | .
19 +-----------------------------------------------------------------------------
20
21 ********************************************************************************
22 $History: audio.h
23
24 xpradipg - LOCOST-SPR-33914: 25 Aug 2005
25 Description: MO to the Agilent resets the target
26 Solution: The enum value was assigned in one of the array which was not
27 propogated to another, due to buzzer removal there was a mismatch
28 the enum value assignment is guarded by a compiler flag
29
30 xpradipg - GSM-ENH-32494 : 23 June 2005
31 Description: Support for various audio profiles
32 Solution: The support for audio device's carkit/headset/loudspeaker/handheld.
33 The audio device is enabled as per the user actions.
34
35 ********************************************************************************
36
37
38 | Apr 04, 2005 REF: ENH 30063 xdeepadh
39 | Description: Buzzer removal activity for Locosto MMI
40 | Fix:All the Buzzer related calls are under the compilation flag FF_BUZZER.
41 | The GSM tones which were playing in the buzzer are now routed to the speaker(Audio).
42 +-----------------------------------------------------------------------------
43 */
44 #ifdef FF_MMI_AUDIO_PROFILE
45 #include "rv/rv_general.h"
46 #include "audio/audio_api.h"
47 #endif
48 #ifndef AUDIO_H
49 #define AUDIO_H
50
51 /*
52 * Signal Types
53 */
54 #define AUDIO_SIGTYPE_SOUNDDEND 0
55
56 /*
57 * Return Values
58 */
59 #define AUDIO_FCT_NOTSUPPORTED 20
60
61 /*
62 * Audio Devices
63 */
64 #define AUDIO_SPEAKER 1
65 #define AUDIO_MICROPHONE 2
66 #define AUDIO_BUZZER 3
67
68 /*
69 * Audio Status
70 */
71 /*#define NO_TONE 0 already defined in audio.h in L1 */
72 #define BUZZER_ON 1
73 #define BUZZER_SILENT 2
74 #define TONE_ON 3
75 #define TONE_SILENT 4
76
77 /*
78 * Mute Status
79 */
80 #define AUDIO_MUTING_ON 0
81 #define AUDIO_MUTING_OFF 1
82
83 /*
84 * Minimum and Maximum Volumes
85 */
86 #define AUDIO_MIN_VOLUME 0
87 #define AUDIO_MAX_VOLUME 255
88 #define AUDIO_MIN_BUZ_VOLUME 0
89 #define AUDIO_MAX_BUZ_VOLUME 255
90 #define AUDIO_MIN_MIC_VOLUME 75
91 #define AUDIO_MAX_MIC_VOLUME 75
92
93 //xpradipg - 32494
94 #ifdef FF_MMI_AUDIO_PROFILE
95 #define CALLBACK_HEADSET 0
96 #define CALLBACK_CARKIT 1
97 #define MAX_EXT_AUD_DEVICE 2
98 #endif
99
100 enum AUDIO_SOUND_IDS
101 {
102 AUDIO_MEL_LOW_BAT,
103 AUDIO_MEL_SMS_ALRT,
104 AUDIO_MEL_SWITCH_OFF,
105 AUDIO_MEL_AUTO_REDIAL,
106 AUDIO_MEL_KEY_BEEP,
107 AUDIO_MEL_ERROR_TONE,
108 AUDIO_MEL_USSD_TONE,
109 AUDIO_MEL_DIARY_TONE,
110 AUDIO_MEL_CB_TONE,
111 AUDIO_MEL_SVC_TONE,
112 AUDIO_MEL_MAN_PLMN_TONE,
113 AUDIO_MEL_CONNECT_CHARGER,
114 AUDIO_MEL_LOW_CREDIT,
115 AUDIO_MEL_ALARM_TONE,
116
117 AUDIO_MEL_TUNES,
118 AUDIO_PLAY_SINGLE_NOTE = 0xFF
119 };
120
121 //Apr 04, 2005 REF: ENH 30063 xdeepadh
122 //Tone ids for Buzzer
123 //When the buzzer is not available, the ringing tones will be played with midiringer.
124 enum AUDIO_TONES_IDS
125 {
126 #ifndef FF_MMI_NO_BUZZER
127 TONES_RING_0,
128 TONES_RING_1,
129 TONES_RING_2,
130 TONES_RING_3,
131 TONES_RING_4,
132 TONES_RING_5,
133 TONES_RING_6,
134 TONES_RING_7,
135 TONES_RING_8,
136 TONES_RING_9,
137 TONES_RING_10,
138 TONES_RING_11,
139 TONES_RING_12,
140 TONES_RING_13,
141 TONES_RING_14,
142 TONES_RING_15,
143 #endif
144 TONES_ERROR,
145 TONES_BUSY,
146 TONES_CONGEST,
147 TONES_DROPPED,
148 TONES_ACK,
149 TONES_CW,
150 TONES_DTMF_0,
151 TONES_DTMF_1,
152 TONES_DTMF_2,
153 TONES_DTMF_3,
154 TONES_DTMF_4,
155 TONES_DTMF_5,
156 TONES_DTMF_6,
157 TONES_DTMF_7,
158 TONES_DTMF_8,
159 TONES_DTMF_9,
160 TONES_DTMF_A,
161 TONES_DTMF_B,
162 TONES_DTMF_C,
163 TONES_DTMF_D,
164 TONES_DTMF_STAR,
165 TONES_DTMF_HASH,
166 //xpradipg - LOCOST-SPR-33914: 25 Aug 2005
167 #ifndef FF_MMI_NO_BUZZER
168 TONES_KEYBEEP = 0x26,
169 #else
170 TONES_KEYBEEP,
171 #endif
172 TONES_RINGING_TONE, /* SPR#2340 - DS - Added */
173 TONES_LAST_TONE_ID
174 };
175
176 /*
177 * internal data structures
178 */
179 typedef struct
180 {
181 USHORT command_1;
182 USHORT command_2;
183 USHORT length;
184 } T_DESCR;
185
186 typedef struct
187 {
188 UBYTE status;
189 UBYTE call_tone;
190 UBYTE type;
191 T_DESCR * descr;
192 UBYTE volume;
193 UBYTE style;
194 USHORT descr_index;
195 } T_ACT_TONE;
196
197 /*
198 * Status Type
199 */
200 typedef struct audio_Status_Type
201 {
202 UBYTE min_volume;
203 UBYTE max_volume;
204 } audio_Status_Type;
205
206 enum AUDIO_PLAY_STYLES
207 {
208 AUDIO_PLAY_CRESCENDO = 0xff,
209 AUDIO_PLAY_INFINITE = 0,
210 AUDIO_PLAY_ONCE = 1
211 };
212
213 /*
214 * TTY definitions
215 */
216 typedef enum
217 {
218 TTY_OFF = 0,
219 TTY_VCO,
220 TTY_HCO,
221 TTY_ALL
222 } T_TTY_CMD;
223
224 #if defined (NEW_FRAME)
225 /*
226 * to achieve backward compatibility with older definitions
227 */
228 #define drv_SignalCB_Type T_DRV_CB_FUNC
229 #define drv_SignalID_Type T_DRV_SIGNAL
230 #define T_VSI_THANDLE USHORT
231 #endif
232 /*
233 * Prototypes
234 */
235
236 // xpradipg - GSM-ENH-32494 : 23 June 2005
237 #ifdef FF_MMI_AUDIO_PROFILE
238 EXTERN UBYTE audio_Init(T_ACCESSORY_CALLBACK *audioConfig);
239 EXTERN void audio_set_path(int audioDevice,int stereo);
240 #else
241 EXTERN UBYTE audio_Init (drv_SignalCB_Type in_SignalCBPtr);
242 #endif
243 EXTERN void audio_Exit (void);
244 EXTERN UBYTE audio_SetMute (UBYTE in_DeviceID,
245 UBYTE in_Mode);
246 EXTERN UBYTE audio_GetMute (UBYTE in_DeviceID,
247 UBYTE * out_Mode);
248 EXTERN UBYTE audio_GetSoundImage (UBYTE in_SoundID,
249 void * out_SoundImagePtr);
250 EXTERN UBYTE audio_SetAmplf (UBYTE in_DeviceID,
251 UBYTE in_Amplf);
252 EXTERN UBYTE audio_GetAmplf (UBYTE in_DeviceID,
253 UBYTE * out_Amplf);
254 EXTERN UBYTE audio_GetStatus (UBYTE in_DeviceID,
255 audio_Status_Type * out_StatusPtr);
256 EXTERN UBYTE audio_PlaySoundID (UBYTE in_DeviceID,
257 UBYTE in_SoundID,
258 BYTE in_RelVolume,
259 UBYTE in_Repeats);
260 EXTERN UBYTE audio_PlaySoundbyImage (UBYTE in_DeviceID,
261 void * in_SoundImagePtr,
262 BYTE in_RelVolume,
263 UBYTE in_Repeats);
264 EXTERN UBYTE audio_StopSoundbyID (UBYTE in_DeviceID,
265 UBYTE in_SoundID);
266 EXTERN UBYTE audio_StopSoundbyImage (UBYTE in_DeviceID,
267 void * in_SoundImagePtr);
268 EXTERN UBYTE audio_SetSignal (drv_SignalID_Type * in_SignalIDPtr);
269 EXTERN UBYTE audio_ResetSignal (drv_SignalID_Type * in_SignalIDPtr);
270 GLOBAL void audio_timeout (T_VSI_THANDLE handle);
271 EXTERN void audio_set_tty (T_TTY_CMD tty);
272 EXTERN void audio_dyn_set_tty (T_TTY_CMD tty);
273 #endif