annotate gsm-fw/g23m-glue/gdi/audio.c @ 1034:405b5469abc4 default tip

top README: repository change notice
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 12 Jun 2016 19:06:34 +0000
parents 6c5d3fecbc67
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2 +-----------------------------------------------------------------------------
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
3 | Project : GSM-PS
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
4 | Modul : DRV_AUDIO
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
5 +-----------------------------------------------------------------------------
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
6 | Copyright 2002 Texas Instruments Berlin, AG
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
7 | All rights reserved.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
8 |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
9 | This file is confidential and a trade secret of Texas
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
10 | Instruments Berlin, AG
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
11 | The receipt of or possession of this file does not convey
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
12 | any rights to reproduce or disclose its contents or to
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
13 | manufacture, use, or sell anything it may describe, in
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
14 | whole, or in part, without the specific written consent of
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
15 | Texas Instruments Berlin, AG.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
16 +-----------------------------------------------------------------------------
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
17 | Purpose : This Module defines the audio driver interface.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
18 | for the G23 protocol stack.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
19 |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
20 | This driver is used to control all audio and audio-related
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
21 | devices of the mobile such as speaker, microphone, etc.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
22 | A device, e.g. a speaker, may have the capability to play
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
23 | sounds and/or melodies indirectly. This means a sound
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
24 | generator may be attached to a speaker or its amplifier.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
25 | The format of the sound/melody images is implementation
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
26 | dependent and therefore not in the scope of the generic
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
27 | driver interface. Therefore a application may play pre-
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
28 | defined, driver specific sounds identifying them via a
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
29 | sound ID. In addition the API of this driver has foreseen
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
30 | that an application may copy a sound image into its local
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
31 | buffer, modify it and let it play by the driver. In this
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
32 | case the application has to have the knowledge about the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
33 | sound image format.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
34 +-----------------------------------------------------------------------------
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
35 | History :
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
36 | Apr 04, 2005 REF: ENH 30063 xdeepadh
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
37 | Description: Buzzer removal activity for Locosto MMI
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
38 | Fix:All the Buzzer related calls are under the compilation flag FF_BUZZER.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
39 | The GSM tones which were playing in the buzzer are now routed to the speaker(Audio).
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
40 +-----------------------------------------------------------------------------
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
41 $History:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
42
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
43
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
44 xpradipg - GSM-ENH-32494 : 23 June 2005
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
45 Description: Support for various audio profiles
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
46 Solution: The support for audio device's carkit/headset/loudspeaker/handheld.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
47 The audio device is enabled as per the user actions.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
48
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
49 June 13, 2005 REF : GSM_ENH_32062 - xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
50 Description:The audio uplink not working in the connected call
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
51 Solution: The audio uplink was configured to mute state at initialization
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
52 The configuration is changed to be in unmute state
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
53
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
54 Apr 26, 2005 REF : CRR 30627 xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
55 Bug : Replace the ABB APIs with Audio Service APIs
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
56 Fix : The ABB APIs are used in muting/unmuting and setting the volume of
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
57 the speaker and microphone. These ABB APIs are replaced with the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
58 audio serivce APIs
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
59 ******************************************************************************/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
60
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
61 #ifndef DRV_AUDIO_C
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
62 #define DRV_AUDIO_C
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
63 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
64 #define ENTITY_CST
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
65
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
66 #include "config.h"
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
67 #include "fixedconf.h"
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
68 #include "condat-features.h"
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
69
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
70 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
71 in order to stay backwardcompatible this riv_audio define is entered as only
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
72 ti15++ version do have the riveria frame it needs to be disabled for the rest
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
73 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
74
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
75 #if 0 //defined (ALR)
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
76 #define RIV_AUDIO 1
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
77 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
78 #undef RIV_AUDIO
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
79 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
80
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
81 #if defined (_SIMULATION_)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
82 #define _TTY_SIMU
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
83 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
84
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
85 /*==== INCLUDES ===================================================*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
86
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
87 #include <string.h>
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
88 #include "typedefs.h"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
89 #include "vsi.h"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
90 #include "custom.h"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
91 #ifdef ALR
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
92 #include "p_mphc.h"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
93 #elif defined(FF_GTI)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
94 /* GTI*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
95 /* do nothing */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
96 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
97 #include "p_mph5.h"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
98 #endif /* ALR, FF_GTI */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
99 #include "prim.h"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
100 #include "gsm.h"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
101 #include "tok.h"
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
102 #include "../cst/cst.h"
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
103 #include "../cst/cus_cst.h"
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
104 #include "gdi.h"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
105 #include "audio.h"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
106
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
107 #if defined (RIV_AUDIO)
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
108
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
109 /* #include "bt_general.h" */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
110 #include "rv/rv_general.h"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
111 #if /*!defined (_TTY_SIMU) &&*/ defined (FF_TTY)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
112 #include "tty/tty_api.h"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
113 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
114 #include "audio/audio_api.h"
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
115
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
116 #elif AUDIO_TASK
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
117
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
118 #define BOOL_FLAG
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
119 #define CHAR_FLAG
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
120 #include "../../L1/include/l1_confg.h"
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
121 #include "../../L1/include/l1_types.h"
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
122 #include "../../L1/audio_cust0/l1audio_cust.h"
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
123 #include "../../L1/audio_include/l1audio_msgty.h"
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
124 #include "../../L1/audio_include/l1audio_signa.h"
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
125
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
126 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
127
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
128 /*==== DEFINE =====================================================*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
129
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
130 #define AUDIO_TRC_EVENT(_f_)\
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
131 vsi_o_ttrace(VSI_CALLER TC_EVENT, _f_)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
132 #define AUDIO_TRC_EVENT_P1(_f_, _p_)\
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
133 vsi_o_ttrace(VSI_CALLER TC_EVENT, _f_, _p_)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
134 #define AUDIO_TRC_EVENT_P2(_f_, _p1_, _p2_)\
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
135 vsi_o_ttrace(VSI_CALLER TC_EVENT, _f_, _p1_, _p2_)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
136 #define AUDIO_TRC_FUNC(_f_)\
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
137 vsi_o_ttrace(VSI_CALLER TC_FUNC, _f_)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
138 #define AUDIO_TRC_FUNC_P1(_f_, _p_)\
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
139 vsi_o_ttrace(VSI_CALLER TC_FUNC, _f_, _p_)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
140
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
141 /*==== EXPORT =====================================================*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
142
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
143 #if defined (NEW_FRAME)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
144 #define CST_AUDIOTIMER 2
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
145 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
146
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
147 /*==== VARIABLES ==================================================*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
148
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
149 #if defined (RIV_AUDIO)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
150 static T_AUDIO_KEYBEEP_PARAMETER beep;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
151 static T_AUDIO_TONES_PARAMETER t;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
152 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
153
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
154 drv_SignalCB_Type audio_signal_callback = NULL;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
155 #if !defined (NEW_FRAME)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
156 T_VSI_THANDLE audio_handle = VSI_ERROR;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
157 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
158 T_ACT_TONE act_tone;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
159 UBYTE act_speakerVolume;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
160 UBYTE act_micVolume;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
161 UBYTE act_buzVolume;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
162 UBYTE act_speakerMute;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
163 UBYTE act_micMute;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
164
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
165 #if defined (NEW_FRAME)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
166 EXTERN T_HANDLE hCommL1;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
167 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
168 EXTERN T_VSI_CHANDLE hCommL1;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
169 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
170
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
171 #if defined (RIV_AUDIO)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
172 void audio_riv_audio_cb (void*);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
173
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
174 static T_RV_RETURN_PATH const riv_audio_rp =
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
175 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
176 0, audio_riv_audio_cb
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
177 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
178
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
179 #ifdef FF_TTY
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
180 T_AUDIO_TTY_CONFIG_PARAMETER static tty_cfg;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
181 UBYTE static tty_state = FALSE;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
182 UBYTE static tty_cmd = (UBYTE)TTY_OFF;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
183
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
184
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
185 char const * const audio_mode_names_tty[] = {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
186 "default",
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
187 "tty_vco",
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
188 "tty_hco",
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
189 "tty_all"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
190 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
191 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
192 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
193
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
194 UBYTE audio_is_free = TRUE; /* variable for disable no muting */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
195
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
196 /*==== FUNCTIONS ==================================================*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
197
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
198 #if 1 //defined (_TMS470)
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
199
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
200 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
201 EXTERN void BZ_Init (void);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
202 EXTERN void BZ_Enable (void);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
203 EXTERN void BZ_Disable (void);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
204 EXTERN void BZ_Tone (int f);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
205 EXTERN void BZ_Volume (int v);
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
206 #endif
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
207
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
208 #ifdef ALR
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
209 EXTERN void ABB_DlVolume (UBYTE v);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
210 EXTERN void ABB_DlMute (UBYTE mute);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
211 EXTERN void ABB_UlMute (UBYTE value);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
212 EXTERN void ABB_SideTone (UBYTE v);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
213 /*#include "l1audio_abb.h" does not work: there's no definition of types UWORDx */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
214 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
215 EXTERN void VG_UlVolume (UBYTE v);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
216 EXTERN void VG_DlVolume (UBYTE v);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
217 EXTERN void VG_DlMute (UBYTE mute);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
218 EXTERN void VG_SideTone (UBYTE v);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
219 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
220
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
221 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
222
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
223 LOCAL void BZ_Init (void);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
224 LOCAL void BZ_Enable (void);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
225 LOCAL void BZ_Disable (void);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
226 LOCAL void BZ_Tone (int f);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
227 LOCAL void BZ_Volume (int v);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
228
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
229 #ifdef ALR
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
230 LOCAL void ABB_DlVolume (UBYTE v);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
231 LOCAL void ABB_DlMute (UBYTE mute);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
232 LOCAL void ABB_UlMute (UBYTE value);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
233 LOCAL void ABB_SideTone (UBYTE v);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
234 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
235 LOCAL void VG_UlVolume (UBYTE v);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
236 LOCAL void VG_DlVolume (UBYTE v);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
237 LOCAL void VG_DlMute (UBYTE mute);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
238 LOCAL void VG_SideTone (UBYTE v);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
239 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
240
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
241 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
242 LOCAL void audio_buzzer (void);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
243 LOCAL void audio_audio (void);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
244 LOCAL void audio_UlMute (UBYTE mute);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
245
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
246 #if defined (RIV_AUDIO) AND !defined (_TTY_SIMU) AND defined (FF_TTY)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
247 LOCAL void audio_tty_return (void *tty_result);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
248 LOCAL void audio_save_def_return (void *result);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
249 LOCAL void audio_load_return (void *result);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
250 LOCAL void audio_dyn_load_return (void *result);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
251 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
252
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
253 // xpradipg - GSM-ENH-32494 : 23 June 2005
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
254 #ifdef FF_MMI_AUDIO_PROFILE
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
255 typedef struct
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
256 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
257 int status;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
258 }T_AUDIO_MODE_LOAD_DONE;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
259 EXTERN T_AUDIO_RET audio_mode_load (T_AUDIO_MODE_LOAD *p_parameter, T_RV_RETURN_PATH return_path);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
260 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
261 /*==== CONSTANTS ==================================================*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
262
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
263 #define BUZZER 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
264 #define AUDIO 1
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
265 // Apr 26, 2005 REF : CRR 30627 xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
266 #ifdef FF_MMI_SERVICES_MIGRATION
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
267 #define AUDIO_SIDE_TONE 175
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
268 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
269
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
270 #if defined (RIV_AUDIO)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
271
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
272 #define TDMA_12 12
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
273 #define TDMA_23 23
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
274 #define TDMA_43 43
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
275 #define TDMA_71 71
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
276 #define TDMA_108 108
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
277 #define TDMA_130 130
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
278 #define TDMA_216 216
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
279 #define TDMA_650 650
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
280 #define TDMA_866 866
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
281
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
282 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
283 * with the original table spec (USHORT for Freq. and Ampl.),
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
284 * we can go down to -31 dB only. Obviously this is sufficient
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
285 * for all currently defined sounds.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
286 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
287 #define F_425 (( 425 << 5) + 7) /* (( 242 << 8 ) + 35) */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
288 #define F_697 (( 697 << 5) + 7) /* (( 219 << 8 ) + 56) */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
289 #define F_770 (( 770 << 5) + 7) /* (( 211 << 8 ) + 61) */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
290 #define F_852 (( 852 << 5) + 7) /* (( 201 << 8 ) + 67) */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
291 #define F_941 (( 941 << 5) + 7) /* (( 189 << 8 ) + 73) */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
292 #define F_1209 ((1209 << 5) + 5) /* (( 149 << 8 ) + 111) */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
293 #define F_1336 ((1336 << 5) + 5) /* (( 128 << 8 ) + 118) */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
294 #define F_1477 ((1477 << 5) + 5) /* (( 102 << 8 ) + 125) */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
295 #define F_1633 ((1633 << 5) + 5) /* (( 73 << 8 ) + 130) */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
296
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
297 #else /* (RIV_AUDIO) */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
298
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
299 #if 1 //defined (_TMS470)
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
300
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
301 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
302 * unit is TDMA frames
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
303 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
304 #define TDMA_12 12
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
305 #define TDMA_23 23
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
306 #define TDMA_43 43
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
307 #define TDMA_71 71
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
308 #define TDMA_108 108
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
309 #define TDMA_130 130
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
310 #define TDMA_216 216
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
311 #define TDMA_650 650
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
312 #define TDMA_866 866
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
313
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
314
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
315 #define F_425 (( 242 << 8) + 35)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
316 #define F_697 (( 219 << 8) + 56)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
317 #define F_770 (( 211 << 8) + 61)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
318 #define F_852 (( 201 << 8) + 67)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
319 #define F_941 (( 189 << 8) + 73)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
320 #define F_1209 (( 149 << 8) + 111)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
321 #define F_1336 (( 128 << 8) + 118)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
322 #define F_1477 (( 102 << 8) + 125)
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
323 #define F_1633 (( 73 << 8) + 130)
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
324
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
325 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
326
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
327 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
328 * unit is milliseconds
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
329 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
330 #define TDMA_12 55
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
331 #define TDMA_23 100
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
332 #define TDMA_43 200
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
333 #define TDMA_71 330
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
334 #define TDMA_108 500
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
335 #define TDMA_130 650
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
336 #define TDMA_216 1000
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
337 #define TDMA_650 3000
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
338 #define TDMA_866 4000
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
339
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
340 #define F_425 (( 35 << 8) + 242)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
341 #define F_697 (( 56 << 8) + 219)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
342 #define F_770 (( 61 << 8) + 211)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
343 #define F_852 (( 67 << 8) + 201)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
344 #define F_941 (( 73 << 8) + 189)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
345 #define F_1209 ((111 << 8) + 149)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
346 #define F_1336 ((118 << 8) + 128)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
347 #define F_1477 ((125 << 8) + 102)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
348 #define F_1633 ((130 << 8) + 73)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
349
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
350 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
351
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
352 #endif /* (RIV_AUDIO) */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
353
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
354 #if 0
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
355 extern const T_DESCR The_Ale_is_dear[111];
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
356 extern const T_DESCR Danza_de_Astureses[21];
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
357 extern const T_DESCR rising_chromatic[47];
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
358 extern const T_DESCR rising_cscale[27];
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
359 extern const T_DESCR MELODY_ONE[11];
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
360 extern const T_DESCR MELODY_HELLO[23];
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
361 extern const T_DESCR bugle[39];
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
362 #endif
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
363
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
364 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
365 * Tone generation tables
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
366 */
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
367 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
368 static const T_DESCR ct_ring [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
369 { 800, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
370 900, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
371 800, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
372 900, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
373 800, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
374 900, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
375 800, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
376 900, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
377 800, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
378 900, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
379 800, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
380 900, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
381 800, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
382 900, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
383 800, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
384 900, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
385 800, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
386 900, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
387 800, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
388 900, 0, TDMA_12,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
389 0, 0, TDMA_866,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
390 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
391 };
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
392 #else
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
393 static const T_DESCR ct_ring [] = /* command 1 command 2 length */
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
394 { F_770, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
395 F_941, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
396 F_770, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
397 F_941, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
398 F_770, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
399 F_941, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
400 F_770, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
401 F_941, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
402 F_770, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
403 F_941, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
404 F_770, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
405 F_941, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
406 F_770, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
407 F_941, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
408 F_770, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
409 F_941, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
410 F_770, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
411 F_941, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
412 F_770, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
413 F_941, 0, TDMA_12,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
414 0, 0, TDMA_866,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
415 0xFFFF, 0xFFFF, 0
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
416 };
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
417 #endif
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
418
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
419 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
420 static const T_DESCR ct_auth_num [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
421 { 950, 0, TDMA_71,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
422 1400, 0, TDMA_71,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
423 1800, 0, TDMA_71,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
424 0, 0, TDMA_216,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
425 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
426 };
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
427 #else
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
428 static const T_DESCR ct_auth_num [] = /* command 1 command 2 length */
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
429 { F_941, 0, TDMA_71,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
430 F_1477, 0, TDMA_71,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
431 F_1633, 0, TDMA_71,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
432 0, 0, TDMA_216,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
433 0xFFFF, 0xFFFF, 0
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
434 };
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
435 #endif
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
436
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
437 static const T_DESCR ct_busy [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
438 { F_425, 0, TDMA_108,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
439 0, 0, TDMA_108,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
440 F_425, 0, TDMA_108,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
441 0, 0, TDMA_108,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
442 F_425, 0, TDMA_108,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
443 0, 0, TDMA_108,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
444 F_425, 0, TDMA_108,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
445 0, 0, TDMA_108,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
446 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
447 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
448
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
449 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
450 static const T_DESCR ct_congest [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
451 { 425, 0, TDMA_43,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
452 0, 0, TDMA_43,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
453 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
454 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
455
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
456 static const T_DESCR ct_dropped [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
457 { 425, 0, TDMA_43,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
458 0, 0, TDMA_43,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
459 425, 0, TDMA_43,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
460 0, 0, TDMA_43,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
461 425, 0, TDMA_43,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
462 0, 0, TDMA_43,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
463 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
464 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
465
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
466 static const T_DESCR ct_ack [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
467 { 425, 0, TDMA_43,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
468 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
469 };
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
470 #else
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
471 static const T_DESCR ct_congest [] = /* command 1 command 2 length */
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
472 { F_425, 0, TDMA_43,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
473 0, 0, TDMA_43,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
474 0xFFFF, 0xFFFF, 0
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
475 };
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
476
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
477 static const T_DESCR ct_dropped [] = /* command 1 command 2 length */
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
478 { F_425, 0, TDMA_43,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
479 0, 0, TDMA_43,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
480 F_425, 0, TDMA_43,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
481 0, 0, TDMA_43,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
482 F_425, 0, TDMA_43,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
483 0, 0, TDMA_43,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
484 0xFFFF, 0xFFFF, 0
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
485 };
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
486
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
487 static const T_DESCR ct_ack [] = /* command 1 command 2 length */
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
488 { F_425, 0, TDMA_43,
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
489 0xFFFF, 0xFFFF, 0
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
490 };
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
491 #endif
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
492
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
493 static const T_DESCR ct_cw [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
494 { F_425, 0, TDMA_43,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
495 0, 0, TDMA_130,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
496 F_425, 0, TDMA_43,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
497 0, 0, TDMA_650,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
498 F_425, 0, TDMA_43,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
499 0, 0, TDMA_130,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
500 F_425, 0, TDMA_43,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
501 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
502 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
503
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
504 static const T_DESCR ct_dtmf_0 [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
505 { F_941, F_1336, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
506 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
507 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
508
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
509 static const T_DESCR ct_dtmf_1 [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
510 { F_697, F_1209, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
511 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
512 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
513
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
514 static const T_DESCR ct_dtmf_2 [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
515 { F_697, F_1336, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
516 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
517 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
518
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
519 static const T_DESCR ct_dtmf_3 [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
520 { F_697, F_1477, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
521 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
522 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
523
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
524 static const T_DESCR ct_dtmf_4 [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
525 { F_770, F_1209, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
526 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
527 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
528
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
529 static const T_DESCR ct_dtmf_5 [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
530 { F_770, F_1336, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
531 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
532 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
533
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
534 static const T_DESCR ct_dtmf_6 [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
535 { F_770, F_1477, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
536 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
537 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
538
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
539 static const T_DESCR ct_dtmf_7 [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
540 { F_852, F_1209, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
541 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
542 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
543
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
544 static const T_DESCR ct_dtmf_8 [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
545 { F_852, F_1336, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
546 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
547 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
548
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
549 static const T_DESCR ct_dtmf_9 [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
550 { F_852, F_1477, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
551 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
552 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
553
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
554 static const T_DESCR ct_dtmf_a [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
555 { F_697, F_1633, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
556 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
557 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
558
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
559 static const T_DESCR ct_dtmf_b [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
560 { F_770, F_1633, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
561 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
562 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
563 static const T_DESCR ct_dtmf_c [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
564 { F_852, F_1633, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
565 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
566 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
567
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
568 static const T_DESCR ct_dtmf_d [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
569 { F_941, F_1633, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
570 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
571 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
572
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
573 static const T_DESCR ct_dtmf_s [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
574 { F_941, F_1209, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
575 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
576 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
577
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
578 static const T_DESCR ct_dtmf_h [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
579 { F_941, F_1477, TDMA_23,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
580 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
581 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
582
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
583 /* keybeep not used at the moment */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
584 static const T_DESCR ct_keybeep [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
585 { F_697, F_697, TDMA_43,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
586 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
587 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
588
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
589 static const T_DESCR ct_ringing [] = /* command 1 command 2 length */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
590 { F_425, 0, TDMA_216,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
591 0, 0, TDMA_866,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
592 0xFFFF, 0xFFFF, 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
593 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
594
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
595 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
596 * Tone Type Table
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
597 */
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
598 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
599 static const UBYTE TONE_TYPE [] = { BUZZER, /* ringing tone 0 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
600 BUZZER, /* ringing tone 1 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
601 BUZZER, /* ringing tone 2 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
602 BUZZER, /* ringing tone 3 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
603 BUZZER, /* ringing tone 4 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
604 BUZZER, /* ringing tone 5 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
605 BUZZER, /* ringing tone 6 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
606 BUZZER, /* ringing tone 7 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
607 BUZZER, /* ringing tone 8 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
608 BUZZER, /* ringing tone 9 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
609 BUZZER, /* ringing tone 10 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
610 BUZZER, /* ringing tone 11 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
611 BUZZER, /* ringing tone 12 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
612 BUZZER, /* ringing tone 13 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
613 BUZZER, /* ringing tone 14 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
614 BUZZER, /* ringing tone 15 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
615 BUZZER, /* error/special information */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
616 AUDIO, /* subscriber busy */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
617 BUZZER, /* congestion */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
618 BUZZER, /* call dropped */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
619 BUZZER, /* radio acknowledge */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
620 AUDIO, /* call waiting */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
621 AUDIO, /* DTMF digit 0 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
622 AUDIO, /* DTMF digit 1 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
623 AUDIO, /* DTMF digit 2 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
624 AUDIO, /* DTMF digit 3 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
625 AUDIO, /* DTMF digit 4 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
626 AUDIO, /* DTMF digit 5 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
627 AUDIO, /* DTMF digit 6 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
628 AUDIO, /* DTMF digit 7 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
629 AUDIO, /* DTMF digit 8 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
630 AUDIO, /* DTMF digit 9 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
631 AUDIO, /* DTMF digit A */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
632 AUDIO, /* DTMF digit B */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
633 AUDIO, /* DTMF digit C */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
634 AUDIO, /* DTMF digit D */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
635 AUDIO, /* DTMF digit * */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
636 AUDIO, /* DTMF digit # */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
637 AUDIO, /* keybeep */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
638 AUDIO /* ringing tone if NOIBT */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
639 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
640 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
641
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
642 //Apr 04, 2005 REF: ENH 30063 xdeepadh
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
643 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
644 * Tone Description Table
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
645 This table will have the ringing tones and the gsm tones.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
646 When the buzzer is not available, the ringing tones will be played with midi ringer
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
647 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
648 static const T_DESCR * const TONE_DESCR [] =
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
649 {
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
650 ct_ring, /* ringing tone 0 */
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
651 ct_ring, /* ringing tone 1 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
652 ct_ring, /* ringing tone 2 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
653 ct_ring, /* ringing tone 3 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
654 ct_ring, /* ringing tone 4 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
655 ct_ring, /* ringing tone 5 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
656 ct_ring, /* ringing tone 6 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
657 ct_ring, /* ringing tone 7 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
658 ct_ring, /* ringing tone 8 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
659 ct_ring, /* ringing tone 9 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
660 ct_ring, /* ringing tone 10 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
661 ct_ring, /* ringing tone 11 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
662 ct_ring, /* ringing tone 12 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
663 ct_ring, /* ringing tone 13 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
664 ct_ring, /* ringing tone 14 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
665 ct_ring, /* ringing tone 15 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
666 ct_auth_num,/* error/special information */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
667 ct_busy, /* subscriber busy */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
668 ct_congest, /* congestion */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
669 ct_dropped, /* call dropped */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
670 ct_ack, /* radio acknowledge */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
671 ct_cw, /* call waiting */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
672 ct_dtmf_0, /* DTMF digit 0 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
673 ct_dtmf_1, /* DTMF digit 1 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
674 ct_dtmf_2, /* DTMF digit 2 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
675 ct_dtmf_3, /* DTMF digit 3 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
676 ct_dtmf_4, /* DTMF digit 4 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
677 ct_dtmf_5, /* DTMF digit 5 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
678 ct_dtmf_6, /* DTMF digit 6 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
679 ct_dtmf_7, /* DTMF digit 7 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
680 ct_dtmf_8, /* DTMF digit 8 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
681 ct_dtmf_9, /* DTMF digit 9 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
682 ct_dtmf_a, /* DTMF digit A */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
683 ct_dtmf_b, /* DTMF digit B */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
684 ct_dtmf_c, /* DTMF digit C */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
685 ct_dtmf_d, /* DTMF digit D */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
686 ct_dtmf_s, /* DTMF digit * */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
687 ct_dtmf_h, /* DTMF digit # */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
688 ct_keybeep, /* dummy for keybeep */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
689 ct_ringing /* ringing tone if NIBT */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
690 };
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
691
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
692
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
693 /*==== CONSTANTS ==================================================*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
694
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
695
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
696
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
697 // xpradipg - GSM-ENH-32494 : 23 June 2005
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
698 #ifdef FF_MMI_AUDIO_PROFILE
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
699 /*******************************************************************************
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
700 $Function: audio_mode_load_cb
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
701
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
702 $Description: callback function for the auido_mode_load()
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
703
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
704 $Returns: none
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
705
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
706 $Arguments: status of the load operation
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
707
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
708 *******************************************************************************/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
709 void audio_mode_load_cb(void *ret_param)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
710 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
711
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
712 //if((T_AUDIO_MODE_LOAD_DONE *)ret_param->status != AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
713 AUDIO_TRC_FUNC("ERROR Loading the audio profile");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
714 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
715
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
716 /*******************************************************************************
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
717 $Function: audio_full_access_write_cb()
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
718
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
719 $Description: callback function for the audio_full_access_write()
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
720
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
721 $Returns: none
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
722
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
723 $Arguments: status of the write operation
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
724
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
725 *******************************************************************************/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
726 void audio_full_access_write_cb(void *ret_param)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
727 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
728 // if( (T_AUDIO_FULL_ACCESS_WRITE_DONE *)ret_param->status != AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
729 AUDIO_TRC_FUNC ("ERROR setting the value");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
730 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
731 #if 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
732 /*******************************************************************************
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
733 $Function: audio_speaker_volume_cb()
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
734
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
735 $Description: callback function for the audio_speaker_volume()
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
736
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
737 $Returns: none
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
738
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
739 $Arguments: status of the speaker volume setting operation
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
740
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
741 *******************************************************************************/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
742 void audio_speaker_volume_cb(ret_param)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
743 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
744 if((T_AUDIO_SPEAKER_VOLUME_DONE)ret_param->status != AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
745 AUDIO_TRC_FUNC ("ERROR setting the volume");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
746 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
747 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
748 /*******************************************************************************
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
749 $Function: audio_set_device()
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
750
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
751 $Description: initiates the audio_mode_load() for various devices
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
752
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
753 $Returns: none
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
754
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
755 $Arguments: successfull execution of the audio_mode_load operation
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
756
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
757 *******************************************************************************/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
758 int audio_set_device(char* mode)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
759 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
760 T_RV_RETURN_PATH return_path = {0,audio_mode_load_cb};
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
761 T_AUDIO_RET status;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
762 T_AUDIO_MODE_LOAD p_parameter;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
763
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
764 strcpy((char*)p_parameter.audio_mode_filename,mode);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
765 status = audio_mode_load(& p_parameter,return_path);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
766 return status;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
767
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
768 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
769
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
770 /*******************************************************************************
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
771 $Function: audio_set_path()
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
772
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
773 $Description: sets the audio speaker path to the current audio device and also either to voice or
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
774 stereo
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
775
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
776 $Returns: none
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
777
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
778 $Arguments:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
779 audioDevice - Indicates the device to which the path has to be set
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
780 stereo - If false the path is for voice
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
781 If true the path is for stereo
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
782 *******************************************************************************/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
783
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
784 void audio_set_path(int audioDevice,int stereo)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
785 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
786 T_RV_RETURN_PATH return_path = {0,audio_full_access_write_cb};
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
787 T_AUDIO_FULL_ACCESS_WRITE p_parameter;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
788 int status;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
789 if( stereo)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
790 p_parameter.variable_indentifier = AUDIO_STEREO_SPEAKER_MODE;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
791 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
792 p_parameter.variable_indentifier = AUDIO_SPEAKER_MODE;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
793 p_parameter.data = (void*)&audioDevice;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
794 status = audio_full_access_write(&p_parameter,return_path);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
795
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
796 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
797 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
798
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
799 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
800 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
801 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
802 | STATE : code ROUTINE : audio_Init |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
803 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
804
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
805 PURPOSE : The function initializes the driver's internal data.
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
806 The function returns DRV_OK in case of a successful
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
807 completition. The function returns DRV_INITIALIZED if
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
808 the driver has already been initialized and is ready to
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
809 be used or is already in use. In case of an initialization
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
810 failure, which means the that the driver cannot be used,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
811 the function returns DRV_INITFAILURE.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
812
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
813 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
814 // xpradipg - GSM-ENH-32494 : 23 June 2005
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
815 // the interface for the audio profiles has changed, it accepts an array of
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
816 // type T_ACCESSORY_CALLBACK
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
817 #ifdef FF_MMI_AUDIO_PROFILE
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
818 GLOBAL UBYTE audio_Init(T_ACCESSORY_CALLBACK *audioConfig)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
819 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
820 GLOBAL UBYTE audio_Init (drv_SignalCB_Type in_SignalCBPtr)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
821 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
822 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
823 // Apr 26, 2005 REF : CRR 30627 xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
824 // local variable declarations
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
825 #ifdef FF_MMI_SERVICES_MIGRATION
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
826 T_AUDIO_FULL_ACCESS_WRITE side_tone_cfg;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
827 T_RV_RETURN_PATH return_path = {0, NULL};
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
828 T_AUDIO_RET result;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
829 INT8 side_tone = AUDIO_SIDE_TONE;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
830 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
831 // xpradipg - GSM-ENH-32494 : 23 June 2005
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
832 #ifdef FF_MMI_AUDIO_PROFILE
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
833 T_AUDIO_RET status;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
834 T_AUDIO_MODE_LOAD handheld= {"handheld"};
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
835 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
836
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
837 // xpradipg - GSM-ENH-32494 : 23 June 2005
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
838 // the callback functions for the headset and carkit indication are registered
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
839 // and the defualt mode handheld is loaded
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
840 #ifdef FF_MMI_AUDIO_PROFILE
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
841 #if 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
842 status = audio_accessory_register_notification(audioConfig[CALLBACK_HEADSET],AUDIO_ACCESSORY_HEADSET);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
843 if( status != AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
844 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
845 AUDIO_TRC_FUNC("Error - registering the callback for headset");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
846 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
847
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
848 status = audio_accessory_register_notification(audioConfig[CALLBACK_CARKIT],AUDIO_ACCESSORY_CARKIT);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
849 if(status != AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
850 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
851 AUDIO_TRC_FUNC("Error - registering the callback for carkit");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
852 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
853 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
854 return_path.callback_func = audio_mode_load_cb;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
855 status = audio_mode_load(&handheld, return_path);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
856 if (status != AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
857 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
858 AUDIO_TRC_FUNC("Error - loading the handheld profile");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
859 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
860 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
861 audio_signal_callback = in_SignalCBPtr; /* store call-back function */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
862 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
863
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
864 #if !defined (NEW_FRAME)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
865 audio_handle = vsi_t_open (VSI_CALLER "AUDIO");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
866
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
867 if (audio_handle < VSI_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
868 return DRV_INITFAILURE;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
869 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
870 //Apr 04, 2005 REF: ENH 30063 xdeepadh
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
871 //For Buzzer init
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
872 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
873 BZ_Init (); /* initialize buzzer */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
874 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
875 audio_SetMute ( AUDIO_SPEAKER, AUDIO_MUTING_OFF );
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
876 audio_SetMute ( AUDIO_MICROPHONE, AUDIO_MUTING_OFF );
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
877
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
878 audio_SetAmplf ( AUDIO_SPEAKER, 175 );
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
879 audio_SetAmplf ( AUDIO_MICROPHONE, 75 );
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
880 //Apr 04, 2005 REF: ENH 30063 xdeepadh
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
881 //Set volume for Buzzer
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
882 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
883 audio_SetAmplf ( AUDIO_BUZZER, 175 );
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
884 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
885
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
886 /* Setting the Side Tone has been moved from audio_SetAmplf CQ21055*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
887 #ifdef ALR
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
888 #ifdef FF_TTY
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
889 if (!tty_state)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
890 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
891 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
892 // Apr 26, 2005 REF : CRR 30627 xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
893 // set the sidetone value to 175 this is the optimum value
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
894 #ifdef FF_MMI_SERVICES_MIGRATION
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
895 side_tone_cfg.variable_indentifier = AUDIO_MICROPHONE_SPEAKER_LOOP_SIDETONE;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
896 side_tone_cfg.data = (void*)&side_tone;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
897 result = audio_full_access_write(&side_tone_cfg, return_path);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
898 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
899 ABB_SideTone (175);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
900 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
901 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
902 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
903 VG_SideTone (175);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
904 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
905
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
906
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
907 return DRV_OK;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
908 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
909
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
910 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
911 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
912 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
913 | STATE : code ROUTINE : audio_Exit |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
914 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
915
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
916 PURPOSE : The function is called when the driver functionality is
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
917 not longer required.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
918 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
919
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
920 GLOBAL void audio_Exit (void)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
921 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
922 audio_signal_callback = NULL;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
923 #if !defined (NEW_FRAME)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
924 vsi_t_close (VSI_CALLER audio_handle);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
925 audio_handle = VSI_ERROR;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
926 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
927 //Apr 04, 2005 REF: ENH 30063 xdeepadh
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
928 //Disable Buzzer
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
929 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
930 BZ_Disable ();
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
931 #endif
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
932 act_tone.status = NO_TONE_STATE;
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
933 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
934
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
935 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
936 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
937 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
938 | STATE : code ROUTINE : audio_SetMute |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
939 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
940
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
941 PURPOSE : This function is used to enable or disable muting for
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
942 the device identified by the parameter in_Device. If the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
943 mode for the specified device could be changed, the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
944 function returns DRV_OK. If the specified device is
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
945 unknown or the device does not support muting, the function
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
946 returns DRV_INVALID_PARAMS.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
947
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
948 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
949
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
950 GLOBAL UBYTE audio_SetMute (UBYTE in_DeviceID, UBYTE in_Mode)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
951 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
952 // Apr 26, 2005 REF : CRR 30627 xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
953 // local variable declarations
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
954 #ifdef FF_MMI_SERVICES_MIGRATION
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
955 T_AUDIO_FULL_ACCESS_WRITE p_parameter;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
956 T_AUDIO_FULL_ACCESS_READ p_parameter1;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
957 T_RV_RETURN_PATH return_path = {0, NULL};
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
958 T_AUDIO_RET result;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
959 static INT8 speaker_volume = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
960 INT8 setvolume = AUDIO_SPEAKER_VOLUME_MUTE;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
961 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
962
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
963 if (in_DeviceID EQ AUDIO_SPEAKER)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
964 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
965 if (in_Mode AND audio_is_free)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
966 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
967 TRACE_EVENT ("No speaker muting");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
968 #ifdef ALR
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
969 // Apr 26, 2005 REF : CRR 30627 xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
970 // the previous volume is restored when we comeout of mute state (unmuting)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
971 // At initialization we do not write the value since the new value is written
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
972 #ifdef FF_MMI_SERVICES_MIGRATION
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
973 p_parameter.variable_indentifier = AUDIO_SPEAKER_VOLUME_LEVEL;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
974 p_parameter.data = (void*)&speaker_volume;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
975 result = audio_full_access_write(&p_parameter,return_path);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
976 if(result != 0)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
977 TRACE_FUNCTION("error - setting speaker volume");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
978 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
979 ABB_DlMute (0);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
980 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
981 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
982 VG_DlMute (0);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
983 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
984 act_speakerMute = AUDIO_MUTING_OFF;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
985 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
986 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
987 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
988 TRACE_EVENT ("Speaker muting");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
989 #ifdef ALR
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
990 // Apr 26, 2005 REF : CRR 30627 xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
991 // read the current value and store it to before setting it to mute
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
992 #ifdef FF_MMI_SERVICES_MIGRATION
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
993 p_parameter1.variable_indentifier = AUDIO_SPEAKER_VOLUME_LEVEL;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
994 p_parameter1.data = (void*)&speaker_volume;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
995 result = audio_full_access_read(&p_parameter1);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
996 p_parameter.variable_indentifier = AUDIO_SPEAKER_VOLUME_MUTE;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
997 p_parameter.data = (void*)&setvolume;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
998 result = audio_full_access_write(&p_parameter,return_path);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
999 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1000 ABB_DlMute (1);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1001 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1002 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1003 VG_DlMute (1);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1004 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1005 act_speakerMute = AUDIO_MUTING_ON;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1006 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1007 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1008 else if (in_DeviceID EQ AUDIO_MICROPHONE)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1009 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1010 if (in_Mode AND audio_is_free)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1011 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1012 TRACE_EVENT ("No microphone muting");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1013 audio_UlMute (0);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1014 act_micMute = AUDIO_MUTING_OFF;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1015 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1016 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1017 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1018 TRACE_EVENT ("Microphone muting");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1019 audio_UlMute (1);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1020 act_micMute = AUDIO_MUTING_ON;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1021 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1022 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1023 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1024 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1025 return DRV_INVALID_PARAMS;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1026 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1027
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1028 return DRV_OK;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1029 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1030
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1031 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1032 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1033 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1034 | STATE : code ROUTINE : audio_GetMute |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1035 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1036
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1037 PURPOSE : This function is used to get the status whether muting
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1038 is enabled or disabled for the device identified by the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1039 parameter in_Device. If the specified device is unknown
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1040 or the device does not support muting, the function
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1041 returns DRV_INVALID_PARAMS.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1042
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1043 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1044
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1045 GLOBAL UBYTE audio_GetMute (UBYTE in_DeviceID, UBYTE* out_Mode)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1046 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1047 if (in_DeviceID EQ AUDIO_SPEAKER)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1048 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1049 *out_Mode = act_speakerMute;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1050 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1051 else if (in_DeviceID EQ AUDIO_MICROPHONE)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1052 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1053 *out_Mode = act_micMute;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1054 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1055 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1056 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1057 return DRV_INVALID_PARAMS;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1058 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1059
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1060 return DRV_OK;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1061 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1062
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1063 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1064 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1065 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1066 | STATE : code ROUTINE : audio_GetStatus |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1067 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1068
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1069 PURPOSE : This function is used to retrieve the status of the driver.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1070 In case of a successful completion the driver returns
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1071 DRV_OK and the current status of the driver in the buffer
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1072 out_StatusPtr points to.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1073 In case the driver is not configured yet, it returns
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1074 DRV_NOTCONFIGURED. In this case the contents of the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1075 buffer out_StatusPtr is invalid.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1076 In case out_StatusPtr equals NULL or device is unknown
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1077 the driver returns DRV_INVALID_PARAMS.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1078
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1079 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1080
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1081 GLOBAL UBYTE audio_GetStatus (UBYTE in_DeviceID,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1082 audio_Status_Type * out_StatusPtr)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1083 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1084 if ( out_StatusPtr EQ NULL )
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1085 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1086 return DRV_INVALID_PARAMS;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1087 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1088 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1089 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1090 if (in_DeviceID EQ AUDIO_SPEAKER)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1091 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1092 out_StatusPtr -> min_volume = AUDIO_MIN_VOLUME;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1093 out_StatusPtr -> max_volume = AUDIO_MAX_VOLUME;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1094 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1095 //Apr 04, 2005 REF: ENH 30063 xdeepadh
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1096 //If Buzzer is available, set the minimum and maximum volume
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1097 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1098 else if (in_DeviceID EQ AUDIO_BUZZER)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1099 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1100 out_StatusPtr -> min_volume = AUDIO_MIN_BUZ_VOLUME;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1101 out_StatusPtr -> max_volume = AUDIO_MAX_BUZ_VOLUME;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1102 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1103 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1104 else if (in_DeviceID EQ AUDIO_MICROPHONE)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1105 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1106 out_StatusPtr -> min_volume = AUDIO_MIN_MIC_VOLUME;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1107 out_StatusPtr -> max_volume = AUDIO_MAX_MIC_VOLUME;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1108 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1109 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1110 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1111 return DRV_INVALID_PARAMS;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1112 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1113 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1114
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1115 return DRV_OK;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1116 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1117
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1118 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1119 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1120 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1121 | STATE : code ROUTINE : audio_GetSoundImage |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1122 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1123
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1124 PURPOSE : This function is used to copy the image of a driver
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1125 internal sound image into an application specific sound
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1126 image buffer. The application may modify the sound.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1127 In case of a successful completion the function returns
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1128 DRV_OK. In case the size of the buffer where the sound image
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1129 shall be copied to is too small the driver returns
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1130 DRV_INVALID_PARAMS. In case a specific driver implementation
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1131 does not support this functionality the driver returns
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1132 DRV_FCT_NOTSUPPORTED.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1133
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1134 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1135
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1136 GLOBAL UBYTE audio_GetSoundImage (UBYTE in_SoundID,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1137 void * out_SoundImagePtr)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1138 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1139 return AUDIO_FCT_NOTSUPPORTED;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1140 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1141
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1142 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1143 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1144 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1145 | STATE : code ROUTINE : audio_SetAmplf |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1146 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1147
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1148 PURPOSE : This function is used to set the amplification for the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1149 device identified by the parameter in_DeviceID.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1150 In the case of a speaker this is the volume, for a
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1151 microphone - the pre-amplifier that regulates the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1152 sensitivity of the microphone. The valid range depends on
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1153 the hardware used. If the amplification could be changed
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1154 for the specified device, the function returns DRV_OK. If
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1155 the amplification value (in_Amplf) is out of range or the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1156 specified device is unknown or the specified device does
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1157 not support the amplification setting, the function
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1158 returns DRV_INVALID_PARAMS.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1159
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1160 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1161
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1162 GLOBAL UBYTE audio_SetAmplf (UBYTE in_DeviceID, UBYTE in_Amplf)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1163 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1164 // Apr 26, 2005 REF : CRR 30627 xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1165 // local variable
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1166 #ifdef FF_MMI_SERVICES_MIGRATION
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1167 T_AUDIO_FULL_ACCESS_WRITE p_parameter;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1168 T_RV_RETURN_PATH return_path = {0, NULL};
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1169 T_AUDIO_RET result;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1170 INT8 volume;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1171 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1172 if (in_DeviceID EQ AUDIO_MICROPHONE)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1173 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1174 act_micVolume = 75; /* voice quality is best at this microphone volume */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1175 #ifdef ALR
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1176 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1177 VG_UlVolume (act_micVolume);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1178 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1179 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1180 else if (in_DeviceID EQ AUDIO_SPEAKER)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1181 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1182 TRACE_EVENT_P1("VOLUME=%d", in_Amplf);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1183
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1184 #ifdef ALR
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1185 // Apr 26, 2005 REF : CRR 30627 xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1186 // The ABB values are converted to the corresponding audio service values
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1187 #ifdef FF_MMI_SERVICES_MIGRATION
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1188 switch (in_Amplf)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1189 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1190 case 255:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1191 volume = AUDIO_SPEAKER_VOLUME_0dB;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1192 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1193 case 190:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1194 volume = AUDIO_SPEAKER_VOLUME_6dB;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1195 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1196 case 125:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1197 volume = AUDIO_SPEAKER_VOLUME_12dB;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1198 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1199 case 60:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1200 volume = AUDIO_SPEAKER_VOLUME_18dB;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1201 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1202 case 1:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1203 volume = AUDIO_SPEAKER_VOLUME_24dB;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1204 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1205 default:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1206 volume = AUDIO_SPEAKER_VOLUME_12dB;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1207 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1208 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1209 p_parameter.variable_indentifier = AUDIO_SPEAKER_VOLUME_LEVEL;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1210 p_parameter.data = (void*)&volume;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1211 result = audio_full_access_write(&p_parameter, return_path);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1212 if( result != 0)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1213 TRACE_FUNCTION("set volume failed");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1214 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1215 ABB_DlVolume (in_Amplf); /* output volume */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1216 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1217 #ifdef FF_TTY
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1218 if (!tty_state)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1219 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1220 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1221 /* ABB_SideTone (175); */ /* To avoid the side tone reseting */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1222 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1223 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1224 VG_DlVolume (in_Amplf); /* output volume */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1225 /* VG_SideTone (175); */ /* To avoid the side tone reseting */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1226 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1227 act_speakerVolume = in_Amplf;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1228 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1229 //Apr 04, 2005 REF: ENH 30063 xdeepadh
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1230 //If Buzzer is available , set the volume
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1231 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1232 else if (in_DeviceID EQ AUDIO_BUZZER)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1233 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1234 act_buzVolume = in_Amplf;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1235 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1236 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1237 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1238 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1239 return DRV_INVALID_PARAMS;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1240 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1241
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1242 return DRV_OK;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1243 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1244
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1245 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1246 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1247 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1248 | STATE : code ROUTINE : audio_GetAmplf |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1249 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1250
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1251 PURPOSE : This function is used to get the amplification for the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1252 device identified by the parameter in_DeviceID.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1253 In the case of a speaker this is the volume, for a
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1254 microphone - the pre-amplifier that regulates the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1255 sensitivity of the microphone. The valid range depends on
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1256 the hardware used.If the specified device is unknown the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1257 function returns DRV_INVALID_PARAMS.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1258
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1259 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1260
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1261 GLOBAL UBYTE audio_GetAmplf (UBYTE in_DeviceID, UBYTE* out_Amplf)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1262 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1263 if (in_DeviceID EQ AUDIO_MICROPHONE)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1264 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1265 *out_Amplf = act_micVolume;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1266 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1267 else if (in_DeviceID EQ AUDIO_SPEAKER)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1268 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1269 *out_Amplf = act_speakerVolume;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1270 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1271 //Apr 04, 2005 REF: ENH 30063 xdeepadh
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1272 //If Buzzer is available, set the out volume
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1273 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1274 else if (in_DeviceID EQ AUDIO_BUZZER)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1275 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1276 *out_Amplf = act_buzVolume;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1277 }
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1278 #endif
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1279 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1280 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1281 return DRV_INVALID_PARAMS;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1282 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1283
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1284 return DRV_OK;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1285 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1286
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1287 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1288 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1289 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1290 | STATE : code ROUTINE : audio_PlaySoundID |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1291 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1292
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1293 PURPOSE : This function is used to play a sound or melody. The
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1294 function returns immediately after the "play process" has
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1295 been activated. It is implementation dependent if the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1296 device/driver supports playing multiple sounds simultan-
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1297 eously, i.e. accepting multiple calls of audio_PlaySoundID().
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1298 If the calling process should be notified when the sound has
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1299 stopped playing automatically, the signal AUDIO_SIGTYPE_
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1300 SOUNDEND must be set using the audio_SetSignal() function.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1301 If the special driver implementation or the device does
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1302 not support volume control, the driver ignores the value.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1303 If the sound can be played, the function returns DRV_OK.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1304 If the device is currently playing the sound identified by
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1305 the parameter in_SoundID, the function returns DRV_INPROCESS.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1306 If the device/driver is currently playing a sound, but does
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1307 not support playing multiple sounds simultaneously, the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1308 driver returns DRV_INPROCESS.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1309
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1310 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1311
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1312 GLOBAL UBYTE audio_PlaySoundID (UBYTE in_DeviceID,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1313 UBYTE in_SoundID,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1314 BYTE in_RelVolume,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1315 UBYTE in_Repeats)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1316 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1317
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1318 TRACE_EVENT_P1("audio_PlaySoundID in_SoundID is %d",in_SoundID);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1319 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1320 * switch off current tone
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1321 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1322 switch (act_tone.status)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1323 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1324
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1325 //Apr 04, 2005 REF: ENH 30063 xdeepadh
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1326 //If Buzzer is available, disable the buzzer
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1327 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1328 case BUZZER_ON:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1329 BZ_Disable ();
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1330 case BUZZER_SILENT:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1331 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1332 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1333 * No Break
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1334 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1335 case TONE_ON:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1336 case TONE_SILENT:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1337 #if defined (NEW_FRAME)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1338 vsi_t_stop (VSI_CALLER CST_AUDIOTIMER);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1339 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1340 vsi_t_stop (VSI_CALLER audio_handle);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1341 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1342 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1343 default:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1344 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1345 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1346
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1347 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1348 * configure new tone
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1349 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1350 if (in_SoundID EQ TONES_KEYBEEP) /* that is keybeep */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1351 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1352 #if defined (RIV_AUDIO)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1353 beep.frequency_beep[0] = ((F_697) >> 5) & 0x07ff;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1354 beep.amplitude_beep[0] = -((char) ((F_697) & 0x001f));
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1355 beep.frequency_beep[1] = ((F_697) >> 5) & 0x07ff;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1356 beep.amplitude_beep[1] = -((char) ((F_697) & 0x001f));
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1357 beep.duration = 120;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1358 #ifdef _TARGET_
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1359 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1360 * This function seems only to be available on target. (db / 2001-07-16)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1361 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1362 return audio_keybeep_start(beep,riv_audio_rp);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1363 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1364 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1365 /* MPHC is not present in GTI case */
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1366 #if !defined(FF_GTI) && AUDIO_TASK
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1367 PALLOC (keybeep, MMI_KEYBEEP_REQ);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1368
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1369 keybeep->d_k_x1_kt0 = F_697;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1370 keybeep->d_k_x1_kt1 = F_697;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1371 keybeep->d_dur_kb = 6; /* equal 120 ms */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1372 PSENDX (L1, keybeep);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1373 #endif /* FF_GTI */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1374 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1375 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1376 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1377 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1378 act_tone.call_tone = in_SoundID;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1379 //Apr 04, 2005 REF: ENH 30063 xdeepadh
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1380 //Before playing the tone, set the status and the tone type .
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1381 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1382 act_tone.status = BUZZER_SILENT;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1383 act_tone.type = (UBYTE)TONE_TYPE[in_SoundID];
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1384 #else //If Buzzer is not available
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1385 act_tone.status = TONE_SILENT;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1386 act_tone.type = (UBYTE)AUDIO;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1387 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1388 act_tone.descr = (T_DESCR *)TONE_DESCR[in_SoundID];
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1389 act_tone.style = in_Repeats;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1390 act_tone.descr_index = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1391 //Apr 04, 2005 REF: ENH 30063 xdeepadh
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1392 //If Buzzer is available, call the audio_buzzer
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1393 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1394 if (act_tone.type EQ BUZZER)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1395 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1396 act_tone.volume = act_buzVolume;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1397 audio_buzzer ();
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1398 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1399 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1400 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1401 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1402 act_tone.volume = act_speakerVolume;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1403 audio_audio ();
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1404 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1405 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1406
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1407 return DRV_OK;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1408 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1409
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1410 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1411 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1412 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1413 | STATE : code ROUTINE : audio_PlaySoundbyImage |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1414 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1415
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1416 PURPOSE : This function is used to play a sound or melody. The
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1417 image of the sound/melody is passed to the driver (the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1418 sound image format is implmementation dependent).
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1419
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1420 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1421
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1422 GLOBAL UBYTE audio_PlaySoundbyImage (UBYTE in_DeviceID,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1423 void * in_SoundImagePtr,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1424 BYTE in_RelVolume,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1425 UBYTE in_Repeats)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1426 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1427 return DRV_OK;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1428 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1429
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1430 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1431 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1432 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1433 | STATE : code ROUTINE : audio_StopSoundbyID |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1434 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1435
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1436 PURPOSE : This function is used to manually stop playing a sound
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1437 or melody. When a sound is stopped manually, no signal is
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1438 created as to whether or not the signal AUDIO_SIGTYP_SOUNDEND
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1439 has been defined. If the function could stop playing the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1440 specified sound, the function returns DRV_OK. If the device
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1441 is unknown or does not support this function or the specified
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1442 sound ID is invalid, the function returns DRV_INVALID_PARAMS.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1443
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1444 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1445
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1446 GLOBAL UBYTE audio_StopSoundbyID (UBYTE in_DeviceID,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1447 UBYTE in_SoundID)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1448 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1449
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1450 TRACE_EVENT_P1("audio_StopSoundbyID in_SoundID is %d",in_SoundID);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1451 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1452 * switch off current tone
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1453 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1454 switch (act_tone.status)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1455 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1456 //Apr 04, 2005 REF: ENH 30063 xdeepadh
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1457 //If Buzzer is available, disable it.
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1458 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1459 case BUZZER_ON:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1460 BZ_Disable ();
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1461 case BUZZER_SILENT:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1462 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1463 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1464 * No Break
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1465 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1466 case TONE_ON:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1467 case TONE_SILENT:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1468
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1469 /* Stop timer for reload */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1470
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1471 #if defined (NEW_FRAME)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1472 vsi_t_stop (VSI_CALLER CST_AUDIOTIMER);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1473 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1474 vsi_t_stop (VSI_CALLER audio_handle);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1475 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1476
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1477 if (act_tone.status EQ TONE_ON)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1478 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1479 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1480 * stop the current playing audio tone immediately
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1481 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1482 #if defined (RIV_AUDIO)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1483 #ifdef _TARGET_
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1484 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1485 * This function seems only to be available on target. (db / 2001-07-16)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1486 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1487 audio_tones_stop(riv_audio_rp);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1488 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1489 #else
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1490 #if !defined(FF_GTI) && AUDIO_TASK
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1491 PALLOC (audio, MMI_TONE_REQ);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1492
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1493 audio->d_k_x1_t0 = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1494 audio->d_k_x1_t1 = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1495 audio->d_k_x1_t2 = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1496 audio->d_pe_rep = 1;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1497 audio->d_pe_off = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1498 audio->d_se_off = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1499 audio->d_bu_off = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1500 audio->d_t0_on = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1501 audio->d_t0_off = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1502 audio->d_t1_on = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1503 audio->d_t1_off = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1504 audio->d_t2_on = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1505 audio->d_t2_off = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1506
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1507 PSENDX (L1, audio);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1508 #endif /* FF_GTI */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1509 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1510 }
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1511 act_tone.status = NO_TONE_STATE;
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1512
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1513 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1514 default:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1515 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1516 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1517
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1518 return DRV_OK;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1519 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1520
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1521
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1522 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1523 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1524 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1525 | STATE : code ROUTINE : audio_StopSoundbyImage |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1526 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1527
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1528 PURPOSE : This function is used to manually stop playing a sound
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1529 or melody. When a sound is stopped manually, no signal is
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1530 created as to whether or not the signal AUDIO_SIGTYP_SOUNDEND
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1531 has been defined. If the function could stop playing the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1532 specified sound image, the function returns DRV_OK.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1533 If the device is unknown or does not support this function
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1534 or the specified sound ID is invalid, the function
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1535 returns DRV_INVALID_PARAMS.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1536
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1537 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1538
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1539 GLOBAL UBYTE audio_StopSoundbyImage (UBYTE in_DeviceID,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1540 void * in_SoundImagePtr)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1541 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1542 return DRV_OK;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1543 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1544
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1545 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1546 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1547 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1548 | STATE : code ROUTINE : audio_SetSignal |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1549 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1550
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1551 PURPOSE : This function is used to defines a single signal or multiple
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1552 signals that is/are indicated to the process when the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1553 event identified in the signal information data type as
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1554 SignalType occurs. To remove a signal call the function
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1555 audio_ResetSignal(). If one of the parameters of the
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1556 signal information data is invalid, the function returns
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1557 DRV_INVALID_PARAMS. If no signal call-back function has
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1558 been defined at the time of initialization, the driver
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1559 returns DRV_SIGFCT_NOTAVAILABLE.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1560
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1561 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1562
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1563 GLOBAL UBYTE audio_SetSignal (drv_SignalID_Type * in_SignalIDPtr)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1564 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1565 return DRV_OK;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1566 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1567
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1568 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1569 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1570 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1571 | STATE : code ROUTINE : audio_ResetSignal |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1572 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1573
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1574 PURPOSE : This function is used to remove a previously set single
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1575 multiple signals. The signals that are removed are identified
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1576 by the Signal Information Data element Signal Type. All other
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1577 elements of the signal information data must be identical
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1578 to the signal(s) that is/are to be removed.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1579
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1580 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1581
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1582 GLOBAL UBYTE audio_ResetSignal (drv_SignalID_Type * in_SignalIDPtr)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1583 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1584 return DRV_OK;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1585 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1586
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1587 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1588 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1589 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1590 | STATE : code ROUTINE : audio_timeout |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1591 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1592
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1593 PURPOSE : This function is used after timeout of the audio timer.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1594
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1595 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1596
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1597 #if defined (NEW_FRAME)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1598 GLOBAL void audio_timeout (USHORT index)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1599 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1600 GLOBAL void audio_timeout (T_VSI_THANDLE handle)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1601 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1602 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1603 #if defined (NEW_FRAME)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1604 if (index EQ CST_AUDIOTIMER)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1605 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1606 if (handle EQ audio_handle)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1607 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1608 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1609 /*ccc
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1610 * only if it is the audio timer
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1611 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1612 //Apr 04, 2005 REF: ENH 30063 xdeepadh
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1613 //For Buzzer
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1614 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1615 if (act_tone.type EQ BUZZER)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1616 audio_buzzer ();
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1617 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1618 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1619 audio_audio ();
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1620 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1621 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1622
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1623
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1624 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1625 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1626 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1627 | STATE : code ROUTINE : audio_buzzer |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1628 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1629
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1630 PURPOSE : Process a buzzer tone.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1631
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1632 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1633 //Apr 04, 2005 REF: ENH 30063 xdeepadh
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1634 #if CONFIG_BUZZER
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1635 LOCAL void audio_buzzer (void)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1636 {
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1637 if (act_tone.status EQ NO_TONE_STATE)
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1638 return;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1639
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1640 switch (act_tone.descr
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1641 [act_tone.descr_index].command_1)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1642 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1643 case 0:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1644 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1645 * switch buzzer off
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1646 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1647 BZ_Disable ();
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1648 #if defined (NEW_FRAME)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1649 vsi_t_start (VSI_CALLER CST_AUDIOTIMER,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1650 act_tone.descr
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1651 [act_tone.descr_index++].length*60/13);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1652 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1653 vsi_t_start (VSI_CALLER audio_handle,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1654 act_tone.descr
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1655 [act_tone.descr_index++].length*60/13);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1656 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1657 act_tone.status = BUZZER_SILENT;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1658 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1659
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1660 case 0xFFFE:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1661 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1662 * switch buzzer on continously
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1663 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1664 BZ_Enable ();
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1665 BZ_Volume (act_buzVolume);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1666 BZ_Tone (act_tone.descr
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1667 [act_tone.descr_index].command_1);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1668 act_tone.status = BUZZER_ON;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1669 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1670
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1671 case 0xFFFF:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1672 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1673 * end of list
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1674 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1675 BZ_Disable ();
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1676 if (act_tone.style EQ AUDIO_PLAY_INFINITE)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1677 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1678 act_tone.descr_index = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1679 audio_buzzer ();
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1680 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1681 else
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1682 act_tone.status = NO_TONE_STATE;
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1683 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1684
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1685 default:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1686 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1687 * switch buzzer on
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1688 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1689 BZ_Enable ();
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1690 BZ_Volume (act_buzVolume);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1691 BZ_Tone (act_tone.descr
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1692 [act_tone.descr_index].command_1);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1693 #if defined (NEW_FRAME)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1694 vsi_t_start (VSI_CALLER
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1695 CST_AUDIOTIMER,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1696 act_tone.descr
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1697 [act_tone.descr_index++].length*60/13);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1698 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1699 vsi_t_start (VSI_CALLER
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1700 audio_handle,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1701 act_tone.descr
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1702 [act_tone.descr_index++].length*60/13);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1703 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1704 act_tone.status = BUZZER_ON;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1705 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1706 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1707 }
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1708 #endif
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1709
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1710 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1711 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1712 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1713 | STATE : code ROUTINE : audio_audio |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1714 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1715
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1716 PURPOSE : Process an audio tone.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1717
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1718 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1719
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1720 LOCAL void audio_audio (void)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1721 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1722
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1723 TRACE_EVENT("audio_audio");
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1724 if (act_tone.status EQ NO_TONE_STATE)
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1725 return;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1726
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1727 switch (act_tone.descr
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1728 [act_tone.descr_index].command_1)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1729 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1730 case 0:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1731 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1732 * switch audio off
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1733 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1734 #if defined (NEW_FRAME)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1735 vsi_t_start (VSI_CALLER CST_AUDIOTIMER,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1736 act_tone.descr
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1737 [act_tone.descr_index++].length*60/13);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1738 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1739 vsi_t_start (VSI_CALLER audio_handle,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1740 act_tone.descr
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1741 [act_tone.descr_index++].length*60/13);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1742 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1743 act_tone.status = TONE_SILENT;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1744 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1745
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1746 case 0xFFFF:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1747 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1748 * end of list
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1749 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1750 if (act_tone.style EQ AUDIO_PLAY_INFINITE)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1751 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1752 act_tone.descr_index = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1753 audio_audio ();
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1754 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1755 else
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1756 act_tone.status = NO_TONE_STATE;
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1757 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1758
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1759 default:
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1760 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1761 * switch audio tone on
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1762 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1763 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1764 #if defined (RIV_AUDIO)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1765 USHORT fa1 = act_tone.descr[act_tone.descr_index].command_1;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1766 USHORT fa2 = act_tone.descr[act_tone.descr_index].command_2;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1767 ULONG len = act_tone.descr[act_tone.descr_index].length;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1768 t.tones[0].start_tone = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1769 t.tones[0].stop_tone = (USHORT) ((60 * len) / 13);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1770 t.tones[0].frequency_tone = (fa1 >> 5) & 0x07ff;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1771 t.tones[0].amplitude_tone = -((char) (fa1 & 0x001f));
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1772 t.tones[1].start_tone = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1773 t.tones[1].stop_tone = (USHORT) ((60 * len) / 13);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1774 t.tones[1].frequency_tone = (fa2 >> 5) & 0x07ff;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1775 t.tones[1].amplitude_tone = -((char) (fa2 & 0x001f));
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1776 t.tones[2].start_tone = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1777 // t.tones[2].stop_tone = 1; - NDH : Removed as this does not comply with the i/f spec
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1778 t.tones[2].stop_tone = (USHORT) ((60 * len) / 13);
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1779 t.tones[2].frequency_tone = 0;
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1780 t.tones[2].amplitude_tone = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1781 t.frame_duration = (USHORT) ((60 * len) / 13);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1782 t.sequence_duration = (USHORT) ((60 * len) / 13); /* why 120 ??? -> changed to 60 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1783 t.period_duration = (USHORT) ((60 * len) / 13); /* -"- */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1784 t.repetition = 1;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1785 #ifdef _TARGET_
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1786 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1787 * This function seems only to be available on target. (db / 2001-07-16)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1788 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1789 audio_tones_start(&t,riv_audio_rp);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1790 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1791 #else
836
6c5d3fecbc67 gdi: audio.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
1792 #if !defined(FF_GTI) && AUDIO_TASK
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1793 PALLOC (audio, MMI_TONE_REQ);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1794 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1795 * Convert TDMA frames to 20 ms -> 3/13
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1796 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1797
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1798 audio->d_k_x1_t0 = act_tone.descr[act_tone.descr_index].command_1;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1799 audio->d_k_x1_t1 = act_tone.descr[act_tone.descr_index].command_2;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1800 audio->d_k_x1_t2 = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1801 audio->d_pe_rep = 1;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1802 audio->d_pe_off = (6*act_tone.descr[act_tone.descr_index].length) / 13;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1803 audio->d_se_off = (6*act_tone.descr[act_tone.descr_index].length) / 13;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1804 audio->d_bu_off = (3*act_tone.descr[act_tone.descr_index].length) / 13;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1805 audio->d_t0_on = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1806 audio->d_t0_off = (3*act_tone.descr[act_tone.descr_index].length) / 13;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1807 audio->d_t1_on = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1808 audio->d_t1_off = (3*act_tone.descr[act_tone.descr_index].length) / 13;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1809 audio->d_t2_on = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1810 audio->d_t2_off = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1811
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1812 PSENDX (L1, audio);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1813 #endif /* FF_GTI */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1814 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1815
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1816 #if defined (NEW_FRAME)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1817 vsi_t_start (VSI_CALLER CST_AUDIOTIMER,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1818 act_tone.descr
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1819 [act_tone.descr_index++].length*60/13);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1820 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1821 vsi_t_start (VSI_CALLER audio_handle,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1822 act_tone.descr
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1823 [act_tone.descr_index++].length*60/13);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1824 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1825 act_tone.status = TONE_ON;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1826 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1827 break;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1828 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1829 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1830
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1832 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1833 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1834 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1835 | STATE : code ROUTINE : audio_UlMute |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1836 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1837
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1838 PURPOSE : This function mutes the uplink path.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1839
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1840 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1841 LOCAL void audio_UlMute (UBYTE mute)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1842 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1843 // Apr 26, 2005 REF : CRR 30627 xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1844 // local variable definition
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1845 #ifdef FF_MMI_SERVICES_MIGRATION
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1846 T_AUDIO_FULL_ACCESS_WRITE p_parameter;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1847 T_AUDIO_FULL_ACCESS_READ p_parameter1;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1848 T_RV_RETURN_PATH return_path = {0, NULL};
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1849 T_AUDIO_RET result;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1850 // June 13, 2005 REF : GSM_ENH_32062 - xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1851 // the default value is assigned to AUDIO_MICROPHONE_OUTPUT_BIAS_2_0V
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1852 static INT8 microphone_gain = AUDIO_MICROPHONE_OUTPUT_BIAS_2_0V;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1853 INT8 setgain = AUDIO_MICROPHONE_MUTE;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1854 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1855 if (mute)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1856 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1857 #ifdef ALR
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1858 // June 13, 2005 REF : GSM_ENH_32062 - xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1859 // the audio is unmuted for the variable "mute" with value greater than "0"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1860 // Apr 26, 2005 REF : CRR 30627 xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1861 // read the microphone gain, store it and mute the microphone
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1862 #ifdef FF_MMI_SERVICES_MIGRATION
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1863 p_parameter1.variable_indentifier = AUDIO_MICROPHONE_GAIN;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1864 p_parameter1.data = (void*)&microphone_gain;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1865 result = audio_full_access_read(&p_parameter1);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1866 if(result != 0)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1867 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1868 TRACE_EVENT("error reading the handeld parameters");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1869 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1870 p_parameter.variable_indentifier = AUDIO_MICROPHONE_GAIN;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1871 setgain = AUDIO_MICROPHONE_MUTE;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1872 p_parameter.data = (void*)&setgain;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1873 result = audio_full_access_write(&p_parameter, return_path);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1874 if(result != 0)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1875 TRACE_EVENT("ERROR - not written1");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1876 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1877 ABB_UlMute (1);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1878 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1879 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1880 VG_UlVolume (0);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1881 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1882 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1883 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1884 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1885 #ifdef ALR
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1886 // June 13, 2005 REF : GSM_ENH_32062 - xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1887 // the audio is muted for the variable "mute" with value <= to "0"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1888 // Apr 26, 2005 REF : CRR 30627 xpradipg
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1889 // restore the volume back once the unmuting is done
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1890 #ifdef FF_MMI_SERVICES_MIGRATION
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1891 p_parameter.variable_indentifier = (UINT8)AUDIO_MICROPHONE_GAIN ;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1892 p_parameter.data = (void*)&microphone_gain;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1893 result = audio_full_access_write(&p_parameter, return_path);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1894 if(result != 0)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1895 TRACE_EVENT("ERROR - not written");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1896 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1897 ABB_UlMute (0);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1898 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1899 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1900 VG_UlVolume (act_micVolume);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1901 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1902 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1903 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1904
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1905 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1906 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1907 | PROJECT : GSM-PS (6103) MODULE : DRV_AUDIO |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1908 | STATE : code ROUTINE : audio_set_tty |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1909 +--------------------------------------------------------------------+
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1910
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1911 PURPOSE : This function (de)activates the TTY codec.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1912
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1913 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1914
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1915 #if defined (FF_TTY) || defined (_TTY_SIMU)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1916 GLOBAL void audio_set_tty (T_TTY_CMD tty)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1917 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1918 if (tty < TTY_OFF OR tty > TTY_ALL)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1919 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1920 TRACE_EVENT_P1 ("TTY invalid parameter: %d", tty);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1921 return;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1922 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1923 if (tty NEQ TTY_OFF)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1924 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1925 #if defined (RIV_AUDIO) && !defined (_TTY_SIMU)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1926 T_AUDIO_MODE_SAVE audio_mode;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1927 T_RV_RETURN_PATH ret = {NOT_PRESENT_8BIT, NULL};
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1928 T_AUDIO_RET audio_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1929
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1930 if (!tty_state)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1931 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1932 tty_cfg.Mode = TTY_EXT_START;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1933 tty_cfg.ThresholdRead = tty_cfg.ThreshHoldWrite = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1934
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1935 ret.callback_func = audio_save_def_return;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1936 strcpy (audio_mode.audio_mode_filename, audio_mode_names_tty[0]);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1937 audio_ret = audio_mode_save (&audio_mode, ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1938
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1939 if (audio_ret NEQ AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1940 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1941 AUDIO_TRC_EVENT_P1 ("Error AUDIO MODE SAVE def: %d", (int)audio_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1942 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1943 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1944 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1945 AUDIO_TRC_FUNC ("AUDIO MODE SAVE def");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1946 tty_cmd = (UBYTE)tty;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1947 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1948 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1949 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1950 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1951 AUDIO_TRC_EVENT ("TTY running");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1952 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1953 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1954 TRACE_EVENT_P1 ("TTY start: %d", tty);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1955 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1956 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1957 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1958 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1959 #if defined (RIV_AUDIO) && !defined (_TTY_SIMU)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1960 T_RV_RETURN_PATH ret = {NOT_PRESENT_8BIT, NULL};
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1961 T_AUDIO_RET audio_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1962
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1963 if (tty_state)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1964 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1965 ret.callback_func = audio_tty_return;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1966 tty_cfg.ThresholdRead = tty_cfg.ThreshHoldWrite = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1967 tty_cfg.Mode = TTY_STOP;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1968 audio_ret = audio_tty_set_config (&tty_cfg, &ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1969
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1970 if (audio_ret NEQ AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1971 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1972 tty_state = FALSE;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1973 AUDIO_TRC_EVENT_P1 ("Error TTY stop: %d", (int)audio_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1974 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1975 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1976 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1977 AUDIO_TRC_FUNC ("TTY to be stopped");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1978 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1979 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1980 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1981 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1982 AUDIO_TRC_FUNC ("TTY already ended");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1983 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1984 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1985 TRACE_EVENT ("TTY stop");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1986 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1987 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1988 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1989
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1990 /* This function changes the TTY mode during an active TTY call */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1991 GLOBAL void audio_dyn_set_tty (T_TTY_CMD tty)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1992 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1993 T_AUDIO_MODE_LOAD audio_mode;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1994 T_RV_RETURN_PATH load_ret = {NOT_PRESENT_8BIT, NULL};
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1995 T_AUDIO_RET audio_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1996 UBYTE cmd;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1997
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1998 if (tty < TTY_OFF OR tty > TTY_ALL)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1999 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2000 TRACE_EVENT_P1 ("TTY invalid parameter: %d", tty);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2001 return;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2002 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2003
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2004 #if defined (RIV_AUDIO) && !defined (_TTY_SIMU)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2005
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2006 cmd = (UBYTE)tty;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2007 if (tty_state)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2008 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2009 load_ret.callback_func = audio_dyn_load_return;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2010 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2011 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2012 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2013 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2014 * If the TTY mode was default before then need to start
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2015 * the TTY driver
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2016 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2017 tty_cfg.Mode = TTY_EXT_START;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2018 tty_cfg.ThresholdRead = tty_cfg.ThreshHoldWrite = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2019 load_ret.callback_func = audio_load_return;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2020 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2021
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2022 strcpy (audio_mode.audio_mode_filename, audio_mode_names_tty[(int)cmd]);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2023 audio_ret = audio_mode_load (&audio_mode, load_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2024
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2025 if (audio_ret NEQ AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2026 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2027 AUDIO_TRC_EVENT_P1 ("Error AUDIO MODE LOAD TTY: %d", (int)audio_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2028 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2029 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2030 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2031 AUDIO_TRC_FUNC ("AUDIO MODE LOAD def");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2032 tty_cmd = (UBYTE)tty;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2033 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2034 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2035 TRACE_EVENT_P1 ("TTY mode change: %d", tty);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2036 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2037
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2038 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2039
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2040 #if defined (RIV_AUDIO) AND !defined (_TTY_SIMU)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2041 LOCAL void audio_tty_return (void *tty_result)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2042 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2043 T_AUDIO_MODE_LOAD audio_mode;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2044 T_RV_RETURN_PATH ret = {NOT_PRESENT_8BIT, NULL};
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2045 T_AUDIO_RET audio_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2046
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2047 if (((T_AUDIO_TTY_STATUS *)tty_result)->status NEQ AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2048 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2049 AUDIO_TRC_EVENT_P1 ("Error TTY callback: %d",
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2050 (int)((T_AUDIO_TTY_STATUS *)tty_result)->status);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2051 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2052 tty_state = FALSE;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2053 tty_cfg.Mode = TTY_STOP;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2054 AUDIO_TRC_FUNC ("TTY end");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2055
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2056 ret.callback_func = audio_load_return;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2057 strcpy (audio_mode.audio_mode_filename, audio_mode_names_tty[0]);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2058 audio_ret = audio_mode_load (&audio_mode, ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2059
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2060 if (audio_ret NEQ AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2061 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2062 AUDIO_TRC_EVENT_P1 ("Error AUDIO MODE LOAD def: %d", (int)audio_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2063 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2064 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2065
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2066 LOCAL void audio_save_def_return (void *result)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2067 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2068 T_AUDIO_MODE_LOAD audio_mode;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2069 T_RV_RETURN_PATH load_ret = {NOT_PRESENT_8BIT, NULL};
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2070 T_AUDIO_RET audio_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2071
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2072 if (((T_AUDIO_SAVE_DONE *)result)->status NEQ AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2073 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2074 AUDIO_TRC_EVENT_P1 ("Error AUDIO MODE SAVE def callback: %d",
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2075 (int)((T_AUDIO_SAVE_DONE *)result)->status);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2076 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2077 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2078 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2079 AUDIO_TRC_FUNC ("AUDIO def saved");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2080
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2081 load_ret.callback_func = audio_load_return;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2082 strcpy (audio_mode.audio_mode_filename, audio_mode_names_tty[(int)tty_cmd]);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2083 audio_ret = audio_mode_load (&audio_mode, load_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2084
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2085 if (audio_ret NEQ AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2086 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2087 AUDIO_TRC_EVENT_P1 ("Error AUDIO MODE LOAD TTY: %d", (int)audio_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2088 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2089 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2090 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2091
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2092 LOCAL void audio_load_return (void *result)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2093 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2094 if (((T_AUDIO_LOAD_DONE *)result)->status NEQ AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2095 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2096 AUDIO_TRC_EVENT_P1 ("Error AUDIO MODE LOAD callback: %d",
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2097 (int)((T_AUDIO_LOAD_DONE *)result)->status);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2098 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2099 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2100 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2101 T_RV_RETURN_PATH ret = {NOT_PRESENT_8BIT, NULL};
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2102 T_AUDIO_RET audio_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2103
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2104 if (!tty_state AND tty_cfg.Mode EQ TTY_EXT_START)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2105 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2106 ret.callback_func = audio_tty_return;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2107 audio_ret = audio_tty_set_config (&tty_cfg, &ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2108
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2109 if (audio_ret NEQ AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2110 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2111 AUDIO_TRC_EVENT_P1 ("Error TTY set: %d", (int)audio_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2112 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2113 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2114 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2115 tty_state = TRUE;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2116 AUDIO_TRC_FUNC ("AUDIO TTY loaded & start");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2117 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2118 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2119 else if (!tty_state AND tty_cfg.Mode EQ TTY_STOP)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2120 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2121 tty_cmd = (UBYTE)TTY_OFF;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2122 AUDIO_TRC_FUNC ("AUDIO def loaded");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2123 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2124 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2125 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2126 AUDIO_TRC_EVENT_P2 ("TTY improper state: %d; mode: %d",
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2127 (int)tty_state, (int)tty_cfg.Mode);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2128 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2129 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2130 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2131
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2132 LOCAL void audio_dyn_load_return (void *result)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2133 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2134 if (((T_AUDIO_LOAD_DONE *)result)->status NEQ AUDIO_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2135 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2136 AUDIO_TRC_EVENT_P1 ("Error AUDIO MODE LOAD callback: %d",
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2137 (int)((T_AUDIO_LOAD_DONE *)result)->status);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2138 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2139 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2140 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2141 AUDIO_TRC_EVENT_P1 ("TTY mode changed: %d", (int)tty_cmd);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2142 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2143 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2144 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2145 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2146
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2147 /*******************************************************************
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2148 * *
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2149 * PART II: Simulation for Windows *
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2150 * *
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2151 *******************************************************************/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2152
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2153 #if defined (_SIMULATION_)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2154 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2155 * Dummies for driver calls
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2156 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2157
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2158 LOCAL void BZ_Init (void)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2159 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2160 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2161
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2162 LOCAL void BZ_Enable (void)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2163 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2164 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2165
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2166 LOCAL void BZ_Disable (void)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2167 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2168 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2169
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2170 LOCAL void BZ_Tone (int f)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2171 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2172 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2173
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2174 LOCAL void BZ_Volume (int v)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2175 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2176 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2177
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2178 #ifdef ALR
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2179 LOCAL void ABB_DlVolume (UBYTE v)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2180 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2181 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2182
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2183 LOCAL void ABB_DlMute (UBYTE mute)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2184 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2185 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2186
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2187 LOCAL void ABB_UlMute (UBYTE value)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2188 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2189 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2190
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2191 LOCAL void ABB_SideTone (UBYTE v)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2192 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2193 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2194 #else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2195 LOCAL void VG_UlVolume (UBYTE v)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2196 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2197 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2198
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2199 LOCAL void VG_DlVolume (UBYTE v)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2200 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2201 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2202
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2203 LOCAL void VG_DlMute (UBYTE mute)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2204 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2205 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2206
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2207 LOCAL void VG_SideTone (UBYTE v)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2208 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2209 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2210 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2211
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2212 #endif
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2213
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2214 #if defined (RIV_AUDIO)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2215 void audio_riv_audio_cb (void *buf)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2216 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2217 /* nothing to do for this time */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2218 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2219 #endif