comparison gsm-fw/L1/audio_include/l1audio_stereo.h @ 603:d638de8cc6b8

gsm-fw/L1/audio_*/*.h: replacing Leonardo headers with LoCosto versions
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Thu, 28 Aug 2014 18:40:12 +0000
parents
children
comparison
equal deleted inserted replaced
602:5f93a9a8f9a0 603:d638de8cc6b8
1 /************* Revision Controle System Header *************
2 * GSM Layer 1 software
3 * L1AUDIO_STEREO_H
4 *
5 * Filename l1audio_stereo.h
6 * Copyright 2003 (C) Texas Instruments
7 *
8 ************* Revision Controle System Header *************/
9
10
11 #if (L1_STEREOPATH == 1)
12
13
14
15
16 //////////////////////////////////////////////////////
17 // VARIABLES DEFINITIONS //
18 //////////////////////////////////////////////////////
19
20 #if (TESTMODE && (OP_L1_STANDALONE == 1))
21
22 #define C_STP_DRV_API_BASE_ADDRESS 0x1AD0
23 #define C_STP_DRV_BUF_API_BASE_ADDRESS 0x1AD8
24 #define STEREOPATH_MAX_NB_OF_FRAMES 1152
25 #define NB_MAX_STEREOPATH_CONFIG 4
26 #define C_BGD_STP_DRV 9
27
28 /***************************************************************************************/
29 /* AUDIO STEREOPATH MCU-DSP API */
30 /***************************************************************************************/
31 typedef struct
32 {
33 API d_cport_api_dma_install;
34 API d_cport_api_dma_channel;
35 API d_cport_api_dma_rootcause;
36 } T_STP_DRV_MCU_DSP;
37
38 #if (CODE_VERSION != SIMULATION)
39 #ifdef _L1AUDIO_STEREO_C_
40
41 /***************************************************************************
42 * AUDIO_SP_MIDI_CONF configuration
43 **************************************************************************/
44 const T_TMODE_AUDIO_STEREOPATH_START_REQ tmode_audio_sp_midi_conf =
45 {
46 AUDIO_SP_MIDI_CONF, // configuration
47 AUDIO_SP_FREQ_22, // sampling_frequency
48 AUDIO_SP_DMA_ALLOC_DSP, // DMA_allocation
49 2, // DMA_channel_number
50 AUDIO_SP_DATA_S16, // data_type
51 AUDIO_SP_SOURCE_API, // source_port
52 2, // element_number
53 864, // frame_number
54 AUDIO_SP_STEREO_OUTPUT, // mono_stereo
55 AUDIO_SP_SINUS2_PATTERN // pattern_identifier
56 };
57
58 /***************************************************************************
59 * AUDIO_SP_MP3_CONF configuration
60 **************************************************************************/
61 const T_TMODE_AUDIO_STEREOPATH_START_REQ tmode_audio_sp_mp3_conf =
62 {
63 AUDIO_SP_MP3_CONF, // configuration
64 AUDIO_SP_FREQ_48, // sampling_frequency
65 AUDIO_SP_DMA_ALLOC_DSP, // DMA_allocation
66 2, // DMA_channel_number
67 AUDIO_SP_DATA_S16, // data_type
68 AUDIO_SP_SOURCE_API, // source_port
69 2, // element_number
70 1152, // frame_number
71 AUDIO_SP_STEREO_OUTPUT, // mono_stereo
72 AUDIO_SP_SINUS1_PATTERN // pattern_identifier
73 };
74
75 /***************************************************************************
76 * AUDIO_SP_EXTAUDIO_CONF configuration
77 **************************************************************************/
78
79 const T_TMODE_AUDIO_STEREOPATH_START_REQ tmode_audio_sp_extaudio_conf =
80 {
81 AUDIO_SP_EXTAUDIO_CONF, // configuration
82 AUDIO_SP_FREQ_22, // sampling_frequency
83 AUDIO_SP_DMA_ALLOC_MCU, // DMA_allocation
84 2, // DMA_channel_number
85 AUDIO_SP_DATA_S16, // data_type
86 AUDIO_SP_SOURCE_IMIF, // source_port
87 2, // element_number
88 1100, // frame_number
89 AUDIO_SP_MONO_OUTPUT, // mono_stereo
90 AUDIO_SP_SINUS3_PATTERN // pattern_identifier
91 };
92
93
94 const T_TMODE_AUDIO_STEREOPATH_START_REQ * tmode_audio_sp_conf[NB_MAX_STEREOPATH_CONFIG] = {
95 &tmode_audio_sp_midi_conf,
96 &tmode_audio_sp_mp3_conf,
97 &tmode_audio_sp_extaudio_conf,
98 (T_TMODE_AUDIO_STEREOPATH_START_REQ *) NULL,
99 };
100
101 #else
102 extern const T_TMODE_AUDIO_STEREOPATH_START_REQ * tmode_audio_sp_conf[NB_MAX_STEREOPATH_CONFIG];
103 #endif // _L1AUDIO_STEREO_C_
104 #endif // CODE_VERSION
105 #endif // TESTMODE
106
107 //////////////////////////////////////////////////////
108 // CONSTANTS DEFINITIONS //
109 //////////////////////////////////////////////////////
110
111 #define L1S_STEREOPATH_DRV_WAIT_PLL_COUNTER 3
112
113 //////////////////////////////////////////////////////
114 // FUNCTIONS PROTOTYPES //
115 //////////////////////////////////////////////////////
116 #if (CODE_VERSION == NOT_SIMULATION)
117 extern void l1s_stereopath_drv_config_ABB(UWORD8 mono_stereo,UWORD8 sampling_frequency);
118 extern void l1s_stereopath_drv_start_ABB(void);
119 extern void l1s_stereopath_drv_stop_ABB(void);
120 #if ((CHIPSET == 12) || (CHIPSET == 15))
121 extern void l1s_stereopath_drv_start_DMA(T_DMA_TYPE_CHANNEL_PARAMETER d_dma_channel_parameter,UWORD8 DMA_allocation);
122 extern void l1s_stereopath_drv_reset_DMA(T_DMA_TYPE_CHANNEL_PARAMETER d_dma_channel_parameter);
123 #endif
124 extern void l1s_stereopath_drv_reset_CPORT(void);
125 extern void l1s_stereopath_drv_stop_CPORT(void);
126 extern void l1s_stereopath_drv_config_CPORT(void);
127 extern void l1s_stereopath_drv_start_CPORT(void);
128
129 enum L1S_STEREOPATH_CALLBACK_CONSTANT
130 {
131 L1S_TWL3029_STEROPATH_CONFIG =10,
132 L1S_TWL3029_STEROPATH_STOP,
133 L1S_TWL3029_STEROPATH_START,
134 L1S_TWL3029_STEROPATH_OUTEN_CONFIG
135 };
136
137 //Add the call back function of the stereo path.
138 void l1s_stereopath_callback(UWORD8 cbvalue);
139
140 #endif // CODE_VERSION == NOT_SIMULATION
141
142 #endif /* L1_STEREOPATH == 1 */