comparison g23m/condat/com/include/audio_obsolete.h @ 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 | 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 #ifndef AUDIO_H
23 #define AUDIO_H
24
25 /*
26 * Signal Types
27 */
28 #define AUDIO_SIGTYPE_SOUNDDEND 0
29
30 /*
31 * Return Values
32 */
33 #define AUDIO_FCT_NOTSUPPORTED 20
34
35 /*
36 * Audio Devices
37 */
38 #define AUDIO_SPEAKER 1
39 #define AUDIO_MICROPHONE 2
40 #define AUDIO_BUZZER 3
41
42 /*
43 * Audio Status
44 */
45 /*#define NO_TONE 0 already defined in audio.h in L1 */
46 #define BUZZER_ON 1
47 #define BUZZER_SILENT 2
48 #define TONE_ON 3
49 #define TONE_SILENT 4
50
51 /*
52 * Mute Status
53 */
54 #define AUDIO_MUTING_ON 0
55 #define AUDIO_MUTING_OFF 1
56
57 /*
58 * Minimum and Maximum Volumes
59 */
60 #define AUDIO_MIN_VOLUME 0
61 #define AUDIO_MAX_VOLUME 255
62 #define AUDIO_MIN_BUZ_VOLUME 0
63 #define AUDIO_MAX_BUZ_VOLUME 255
64 #define AUDIO_MIN_MIC_VOLUME 75
65 #define AUDIO_MAX_MIC_VOLUME 75
66
67 enum AUDIO_SOUND_IDS
68 {
69 AUDIO_MEL_LOW_BAT,
70 AUDIO_MEL_SMS_ALRT,
71 AUDIO_MEL_SWITCH_OFF,
72 AUDIO_MEL_AUTO_REDIAL,
73 AUDIO_MEL_KEY_BEEP,
74 AUDIO_MEL_ERROR_TONE,
75 AUDIO_MEL_USSD_TONE,
76 AUDIO_MEL_DIARY_TONE,
77 AUDIO_MEL_CB_TONE,
78 AUDIO_MEL_SVC_TONE,
79 AUDIO_MEL_MAN_PLMN_TONE,
80 AUDIO_MEL_CONNECT_CHARGER,
81 AUDIO_MEL_LOW_CREDIT,
82 AUDIO_MEL_ALARM_TONE,
83
84 AUDIO_MEL_TUNES,
85 AUDIO_PLAY_SINGLE_NOTE = 0xFF
86 };
87
88 enum AUDIO_TONES_IDS
89 {
90 TONES_RING_0,
91 TONES_RING_1,
92 TONES_RING_2,
93 TONES_RING_3,
94 TONES_RING_4,
95 TONES_RING_5,
96 TONES_RING_6,
97 TONES_RING_7,
98 TONES_RING_8,
99 TONES_RING_9,
100 TONES_RING_10,
101 TONES_RING_11,
102 TONES_RING_12,
103 TONES_RING_13,
104 TONES_RING_14,
105 TONES_RING_15,
106 TONES_ERROR,
107 TONES_BUSY,
108 TONES_CONGEST,
109 TONES_DROPPED,
110 TONES_ACK,
111 TONES_CW,
112 TONES_DTMF_0,
113 TONES_DTMF_1,
114 TONES_DTMF_2,
115 TONES_DTMF_3,
116 TONES_DTMF_4,
117 TONES_DTMF_5,
118 TONES_DTMF_6,
119 TONES_DTMF_7,
120 TONES_DTMF_8,
121 TONES_DTMF_9,
122 TONES_DTMF_A,
123 TONES_DTMF_B,
124 TONES_DTMF_C,
125 TONES_DTMF_D,
126 TONES_DTMF_STAR,
127 TONES_DTMF_HASH,
128 TONES_KEYBEEP = 0x26,
129 TONES_RINGING_TONE, /* SPR#2340 - DS - Added */
130 TONES_LAST_TONE_ID
131 };
132
133 /*
134 * internal data structures
135 */
136 typedef struct
137 {
138 USHORT command_1;
139 USHORT command_2;
140 USHORT length;
141 } T_DESCR;
142
143 typedef struct
144 {
145 UBYTE status;
146 UBYTE call_tone;
147 UBYTE type;
148 T_DESCR * descr;
149 UBYTE volume;
150 UBYTE style;
151 USHORT descr_index;
152 } T_ACT_TONE;
153
154 /*
155 * Status Type
156 */
157 typedef struct audio_Status_Type
158 {
159 UBYTE min_volume;
160 UBYTE max_volume;
161 } audio_Status_Type;
162
163 enum AUDIO_PLAY_STYLES
164 {
165 AUDIO_PLAY_CRESCENDO = 0xff,
166 AUDIO_PLAY_INFINITE = 0,
167 AUDIO_PLAY_ONCE = 1
168 };
169
170 /*
171 * TTY definitions
172 */
173 typedef enum
174 {
175 TTY_OFF = 0,
176 TTY_VCO,
177 TTY_HCO,
178 TTY_ALL
179 } T_TTY_CMD;
180
181 #if defined (NEW_FRAME)
182 /*
183 * to achieve backward compatibility with older definitions
184 */
185 #define drv_SignalCB_Type T_DRV_CB_FUNC
186 #define drv_SignalID_Type T_DRV_SIGNAL
187 #define T_VSI_THANDLE USHORT
188 #endif
189
190 /*
191 * Prototypes
192 */
193 EXTERN UBYTE audio_Init (drv_SignalCB_Type in_SignalCBPtr);
194 EXTERN void audio_Exit (void);
195 EXTERN UBYTE audio_SetMute (UBYTE in_DeviceID,
196 UBYTE in_Mode);
197 EXTERN UBYTE audio_GetMute (UBYTE in_DeviceID,
198 UBYTE * out_Mode);
199 EXTERN UBYTE audio_GetSoundImage (UBYTE in_SoundID,
200 void * out_SoundImagePtr);
201 EXTERN UBYTE audio_SetAmplf (UBYTE in_DeviceID,
202 UBYTE in_Amplf);
203 EXTERN UBYTE audio_GetAmplf (UBYTE in_DeviceID,
204 UBYTE * out_Amplf);
205 EXTERN UBYTE audio_GetStatus (UBYTE in_DeviceID,
206 audio_Status_Type * out_StatusPtr);
207 EXTERN UBYTE audio_PlaySoundID (UBYTE in_DeviceID,
208 UBYTE in_SoundID,
209 BYTE in_RelVolume,
210 UBYTE in_Repeats);
211 EXTERN UBYTE audio_PlaySoundbyImage (UBYTE in_DeviceID,
212 void * in_SoundImagePtr,
213 BYTE in_RelVolume,
214 UBYTE in_Repeats);
215 EXTERN UBYTE audio_StopSoundbyID (UBYTE in_DeviceID,
216 UBYTE in_SoundID);
217 EXTERN UBYTE audio_StopSoundbyImage (UBYTE in_DeviceID,
218 void * in_SoundImagePtr);
219 EXTERN UBYTE audio_SetSignal (drv_SignalID_Type * in_SignalIDPtr);
220 EXTERN UBYTE audio_ResetSignal (drv_SignalID_Type * in_SignalIDPtr);
221 GLOBAL void audio_timeout (T_VSI_THANDLE handle);
222 EXTERN void audio_set_tty (T_TTY_CMD tty);
223 EXTERN void audio_dyn_set_tty (T_TTY_CMD tty);
224 #endif