Debian Codegraph @

drivers/dahdi/oct612x/include/oct6100api/oct6100_channel_inst.h

raw symbols SCIP
1 /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
2
3 File: oct6100_channel_inst.h
4
5 Copyright (c) 2001-2007 Octasic Inc.
6
7 Description:
8
9 File containing all defines, macros, and structures pertaining to the file
10 oct6100_channel.c. All elements defined in this file are for public
11 usage of the API. All private elements are defined in the
12 oct6100_channel_priv.h file.
13
14 This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is
15 free software; you can redistribute it and/or modify it under the terms of
16 the GNU General Public License as published by the Free Software Foundation;
17 either version 2 of the License, or (at your option) any later version.
18
19 The OCT6100 GPL API is distributed in the hope that it will be useful, but
20 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with the OCT6100 GPL API; if not, write to the Free Software
26 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
27
28 $Octasic_Release: OCT612xAPI-01.00-PR49 $
29
30 $Octasic_Revision: 90 $
31
32 \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
33
34 #ifndef __OCT6100_CHANNEL_INST_H__
35 #define __OCT6100_CHANNEL_INST_H__
36
37 /***************************** INCLUDE FILES *******************************/
38
39 /***************************** DEFINES *************************************/
40
41 /***************************** TYPES ***************************************/
42
43 #ifndef __KERNEL__
44 #include <stdint.h>
45 #endif
46
47 #ifndef PTR_TYPE
48 #define PTR_TYPE UINT16
49 #endif
50
51 typedef struct _OCT6100_API_CHANNEL_TDM_
52 {
53 /* Laws. */
54 UINT8 byRinPcmLaw : 1;
55 UINT8 bySinPcmLaw : 1;
56 UINT8 byRoutPcmLaw : 1;
57 UINT8 bySoutPcmLaw : 1;
58
59 UINT8 byRinNumTssts : 2;
60 UINT8 bySinNumTssts : 2;
61 UINT8 byRoutNumTssts : 2;
62 UINT8 bySoutNumTssts : 2;
63
64 /* RIN port. */
65 UINT16 usRinTimeslot;
66 UINT16 usRinStream;
67
68 /* SIN port. */
69 UINT16 usSinTimeslot;
70 UINT16 usSinStream;
71
72 /* ROUT port. */
73 UINT16 usRoutTimeslot;
74 UINT16 usRoutStream;
75
76 /* SOUT port. */
77 UINT16 usSoutTimeslot;
78 UINT16 usSoutStream;
79
80 /* ROUT broadcast info. */
81 UINT16 usRoutBrdcastTsstFirstEntry;
82 UINT16 usRoutBrdcastTsstNumEntry;
83
84 /* SOUT broadcast info. */
85 UINT16 usSoutBrdcastTsstFirstEntry;
86 UINT16 usSoutBrdcastTsstNumEntry;
87
88 } tOCT6100_API_CHANNEL_TDM, *tPOCT6100_API_CHANNEL_TDM;
89
90 typedef struct _OCT6100_API_CHANNEL_VQE_
91 {
92 UINT8 fEnableNlp : 1;
93 UINT8 fEnableTailDisplacement : 1;
94 UINT8 fSinDcOffsetRemoval : 1;
95 UINT8 fRinDcOffsetRemoval : 1;
96 UINT8 fRinLevelControl : 1;
97 UINT8 fSoutLevelControl : 1;
98 UINT8 fRinAutomaticLevelControl : 1;
99 UINT8 fSoutAutomaticLevelControl : 1;
100 UINT8 fRinHighLevelCompensation : 1;
101 UINT8 fSoutAdaptiveNoiseReduction : 1;
102 UINT8 fDtmfToneRemoval : 1;
103 UINT8 fAcousticEcho : 1;
104 UINT8 byComfortNoiseMode : 2;
105 UINT8 fSoutNaturalListenerEnhancement : 1;
106 UINT8 fRoutNoiseReduction : 1;
107 UINT8 fEnableMusicProtection : 1;
108 UINT8 fIdleCodeDetection : 1;
109 UINT8 byAnrVoiceNoiseSegregation : 4;
110 UINT8 byDoubleTalkBehavior : 1;
111 UINT8 fSoutNoiseBleaching : 1;
112 UINT8 fSoutConferencingNoiseReduction : 1;
113 UINT8 byNonLinearityBehaviorA : 4;
114 UINT8 byNonLinearityBehaviorB : 4;
115
116 UINT8 bySoutAutomaticListenerEnhancementGainDb;
117 UINT8 bySoutNaturalListenerEnhancementGainDb;
118
119 OCT_INT8 chRinAutomaticLevelControlTargetDb;
120 OCT_INT8 chSoutAutomaticLevelControlTargetDb;
121
122 OCT_INT8 chRinHighLevelCompensationThresholdDb;
123
124 OCT_INT8 chRinLevelControlGainDb;
125 OCT_INT8 chSoutLevelControlGainDb;
126
127 OCT_INT8 chDefaultErlDb;
128 OCT_INT8 chAecDefaultErlDb;
129
130 OCT_INT8 chRoutNoiseReductionLevelGainDb;
131 OCT_INT8 chAnrSnrEnhancementDb;
132
133 UINT16 usToneDisablerVqeActivationDelay;
134 UINT16 usAecTailLength;
135
136 UINT16 usTailDisplacement;
137 UINT16 usTailLength;
138
139 } tOCT6100_API_CHANNEL_VQE, *tPOCT6100_API_CHANNEL_VQE;
140
141 typedef struct _OCT6100_API_CHANNEL_CODEC_
142 {
143 UINT8 byAdpcmNibblePosition : 1;
144 UINT8 fEnableSilenceSuppression : 1;
145
146 UINT8 byEncoderPort : 4;
147 UINT8 byDecoderPort : 4;
148
149 UINT8 byPhasingType : 2;
150
151 UINT8 byEncodingRate;
152 UINT8 byDecodingRate;
153
154 UINT16 byPhase;
155 } tOCT6100_API_CHANNEL_CODEC, *tPOCT6100_API_CHANNEL_CODEC;
156
157 typedef struct _OCT6100_API_CHANNEL_
158 {
159 /*=======================================================================*/
160 /* Channel configuration. */
161
162 /* Flag specifying whether the entry is used or not. */
163 UINT8 fReserved : 1;
164
165 /* Count used to manage entry handles allocated to user. */
166 UINT8 byEntryOpenCnt : 1;
167
168 /* Is this a bidirectionnal channel? */
169 UINT8 fBiDirChannel : 1;
170
171 /* Enable tone disabler? */
172 UINT8 fEnableToneDisabler : 1;
173
174 /* Current echo operation mode. */
175 UINT8 byEchoOperationMode : 3;
176
177 UINT8 byToneDisablerStatus : 1;
178
179 UINT8 fMute : 1;
180 UINT8 fTap : 1;
181 UINT8 fBeingTapped : 1;
182 UINT8 fCopyEventCreated : 1;
183
184 UINT8 fSoutBufPlaying : 1;
185 UINT8 fRinBufPlaying : 1;
186
187 UINT8 fRinBufPlayoutNotifyOnStop : 1;
188 UINT8 fRinBufPlayoutRepeatUsed : 1;
189
190
191 UINT8 fSoutBufPlayoutNotifyOnStop : 1;
192 UINT8 fSoutBufPlayoutRepeatUsed : 1;
193
194 UINT8 fRinHardStop : 1;
195 UINT8 fSoutHardStop : 1;
196
197 UINT8 byRinPlayoutStopEventType : 1;
198 UINT8 bySoutPlayoutStopEventType : 1;
199
200 UINT8 fRinBufAdded : 1;
201 UINT8 fSoutBufAdded : 1;
202
203 UINT8 fBufPlayoutActive : 1;
204
205 /* Enable extended tone detection. */
206 UINT8 fEnableExtToneDetection : 1;
207
208 /* State of the codec structure associated to this channel. */
209 UINT8 fSinSoutCodecActive : 1;
210 UINT8 fRinRoutCodecActive : 1;
211
212 /* TSI chariot memory entry for the Rin/Rout stream. */
213 UINT16 usRinRoutTsiMemIndex;
214
215 /* TSI chariot memory entry for the Sin/Sout stream. */
216 UINT16 usSinSoutTsiMemIndex;
217
218 /* Additional TSI entry used to temporarily store the SIN signal. */
219 UINT16 usExtraSinTsiMemIndex;
220 UINT16 usExtraSinTsiDependencyCnt;
221
222 /* Additional TSI entry used to temporarily store the RIN signal. */
223 UINT16 usExtraRinTsiMemIndex;
224 UINT16 usExtraRinTsiDependencyCnt;
225
226 /* Conversion chariot memory entry. */
227 UINT16 usRinRoutConversionMemIndex;
228 UINT16 usSinSoutConversionMemIndex;
229
230 /* TSST control memory entry. */
231 UINT16 usRinTsstIndex;
232 UINT16 usSinTsstIndex;
233 UINT16 usRoutTsstIndex;
234 UINT16 usSoutTsstIndex;
235
236 /* SSPX memory entry. */
237 UINT16 usEchoMemIndex;
238
239 /* Active mixer events count to test for last event. */
240 UINT16 usMixerEventCnt;
241
242 /* Copy events. */
243 UINT16 usSinCopyEventIndex;
244 UINT16 usSoutCopyEventIndex;
245
246 /* Silence events. */
247 UINT16 usRinSilenceEventIndex;
248 UINT16 usSinSilenceEventIndex;
249
250 /* TDM configuration. */
251 tOCT6100_API_CHANNEL_TDM TdmConfig;
252
253 /* VQE configuration. */
254 tOCT6100_API_CHANNEL_VQE VqeConfig;
255
256 /* Currently muted ports. */
257 UINT16 usMutedPorts;
258
259 /*=======================================================================*/
260
261 /*=======================================================================*/
262 /* Statistics section. */
263
264 INT16 sComfortNoiseLevel;
265
266 UINT16 usCurrentEchoDelay;
267 UINT16 usMaxEchoDelay;
268
269 UINT16 usNumEchoPathChanges;
270 UINT16 usNumEchoPathChangesOfst;
271
272 INT16 sCurrentERL;
273 INT16 sCurrentERLE;
274
275 INT16 sMaxERL;
276 INT16 sMaxERLE;
277
278 INT16 sRinLevel;
279 INT16 sSinLevel;
280
281 INT16 sRinAppliedGain;
282 INT16 sSoutAppliedGain;
283
284 /*=======================================================================*/
285
286
287 /*=======================================================================*/
288 /* Bridge information. */
289
290 UINT16 usBridgeIndex;
291
292 UINT16 usLoadEventIndex;
293 UINT16 usSubStoreEventIndex;
294
295 UINT16 usFlexConfParticipantIndex;
296 UINT16 usTapBridgeIndex;
297 UINT16 usTapChanIndex;
298
299 /*=======================================================================*/
300
301
302 /*=======================================================================*/
303 /* Buffer playout information. */
304
305 PTR_TYPE ulRinBufWritePtr;
306 PTR_TYPE ulRinBufSkipPtr;
307 PTR_TYPE ulSoutBufWritePtr;
308 PTR_TYPE ulSoutBufSkipPtr;
309
310 /* User channel ID, transparently passed to the user. */
311
312 /*=======================================================================*/
313
314
315 /*=======================================================================*/
316 /* Copy events information. */
317
318 /* Number of copy events created. */
319 UINT16 usCopyEventCnt;
320
321 /*=======================================================================*/
322
323
324 /*=======================================================================*/
325 /* Extended tone detection info. */
326
327
328 UINT16 usExtToneChanIndex;
329 UINT16 usExtToneMixerIndex;
330 UINT16 usExtToneTsiIndex;
331
332 /* Index of the phasing TSST */
333 UINT16 usPhasingTsstIndex;
334
335 /* Mode of operation of the channel based on the extended tone detection configuration. */
336 PTR_TYPE ulExtToneChanMode;
337
338 /*=======================================================================*/
339
340 /* Tone detection state. */
341 /* This array is configured as follow. */
342 /* Index 0 contain event 0 to 31 and Index 1 contains event 32 - 55 */
343 PTR_TYPE ulLastSSToneDetected;
344 PTR_TYPE ulLastSSToneTimestamp;
345
346
347 PTR_TYPE ulRinUserBufPlayoutEventId;
348 PTR_TYPE ulSoutUserBufPlayoutEventId;
349
350 UINT32 aulToneConf[2];
351 UINT32 ulUserChanId;
352 /*=======================================================================*/
353
354
355 /*=======================================================================*/
356
357
358 /* Codec configuration. */
359 tOCT6100_API_CHANNEL_CODEC CodecConfig;
360
361 } tOCT6100_API_CHANNEL, *tPOCT6100_API_CHANNEL;
362
363 typedef struct _OCT6100_API_BIDIR_CHANNEL_
364 {
365 UINT16 usFirstChanIndex;
366 UINT16 usSecondChanIndex;
367
368 /* Flag specifying whether the entry is used or not. */
369 UINT8 fReserved : 1;
370 /* Count used to manage entry handles allocated to user. */
371 UINT8 byEntryOpenCnt;
372
373 } tOCT6100_API_BIDIR_CHANNEL, *tPOCT6100_API_BIDIR_CHANNEL;
374
375 #endif /* __OCT6100_CHANNEL_INST_H__ */