~ubuntu-branches/ubuntu/quantal/zaptel/quantal

« back to all changes in this revision

Viewing changes to oct612x/include/oct6100api/oct6100_channel_inst.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2006-10-24 22:41:01 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20061024224101-464p4n2jk16n1jrh
Tags: 1:1.2.10.dfsg-2
* bristuff-0.3.0-PRE-1v
* Remove redundant GPL LICENCE text

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
 
2
 
 
3
File:  oct6100_channel_inst.h
 
4
 
 
5
    Copyright (c) 2001-2006 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-PR43 $
 
29
 
 
30
$Octasic_Revision: 88 $
 
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
typedef struct _OCT6100_API_CHANNEL_TDM_
 
44
{
 
45
        /* Laws. */
 
46
        UINT8   byRinPcmLaw;
 
47
        UINT8   bySinPcmLaw;
 
48
        UINT8   byRoutPcmLaw;
 
49
        UINT8   bySoutPcmLaw;
 
50
 
 
51
        /* RIN port. */
 
52
        UINT16  usRinTimeslot;
 
53
        UINT16  usRinStream;
 
54
 
 
55
        /* SIN port. */
 
56
        UINT16  usSinTimeslot;
 
57
        UINT16  usSinStream;
 
58
 
 
59
        /* ROUT port. */
 
60
        UINT16  usRoutTimeslot;
 
61
        UINT16  usRoutStream;
 
62
        
 
63
        /* SOUT port. */
 
64
        UINT16  usSoutTimeslot;
 
65
        UINT16  usSoutStream;
 
66
 
 
67
        /* ROUT broadcast info. */
 
68
        UINT16  usRoutBrdcastTsstFirstEntry;
 
69
        UINT16  usRoutBrdcastTsstNumEntry;
 
70
 
 
71
        /* SOUT broadcast info. */
 
72
        UINT16  usSoutBrdcastTsstFirstEntry;
 
73
        UINT16  usSoutBrdcastTsstNumEntry;
 
74
 
 
75
        UINT8   byRinNumTssts;
 
76
        UINT8   bySinNumTssts;
 
77
        UINT8   byRoutNumTssts;
 
78
        UINT8   bySoutNumTssts;
 
79
 
 
80
} tOCT6100_API_CHANNEL_TDM, *tPOCT6100_API_CHANNEL_TDM;
 
81
 
 
82
typedef struct _OCT6100_API_CHANNEL_VQE_
 
83
{
 
84
        UINT8   fEnableNlp;
 
85
        UINT8   fEnableTailDisplacement;
 
86
        UINT16  usTailDisplacement;
 
87
        UINT16  usTailLength;
 
88
 
 
89
        UINT8   fSinDcOffsetRemoval;
 
90
        UINT8   fRinDcOffsetRemoval;
 
91
        UINT8   fRinLevelControl;
 
92
        UINT8   fSoutLevelControl;
 
93
        
 
94
        UINT8   fRinAutomaticLevelControl;
 
95
        UINT8   fSoutAutomaticLevelControl;
 
96
        OCT_INT8        chRinAutomaticLevelControlTargetDb;
 
97
        OCT_INT8        chSoutAutomaticLevelControlTargetDb;
 
98
        
 
99
        UINT8   fRinHighLevelCompensation;
 
100
        OCT_INT8        chRinHighLevelCompensationThresholdDb;
 
101
        
 
102
        UINT8   bySoutAutomaticListenerEnhancementGainDb;
 
103
        UINT8   fSoutNaturalListenerEnhancement;
 
104
 
 
105
        UINT8   fSoutAdaptiveNoiseReduction;
 
106
        UINT8   fDtmfToneRemoval;
 
107
        UINT8   fAcousticEcho;
 
108
        UINT8   byComfortNoiseMode;
 
109
 
 
110
        UINT8   byNonLinearityBehaviorA;
 
111
        UINT8   byNonLinearityBehaviorB;
 
112
        OCT_INT8        chRinLevelControlGainDb;
 
113
        OCT_INT8        chSoutLevelControlGainDb;
 
114
 
 
115
        OCT_INT8        chDefaultErlDb;
 
116
        OCT_INT8        chAecDefaultErlDb;
 
117
 
 
118
        UINT8   fRoutNoiseReduction;
 
119
        OCT_INT8        chAnrSnrEnhancementDb;
 
120
 
 
121
        UINT8   fEnableMusicProtection;
 
122
        UINT8   fIdleCodeDetection;
 
123
 
 
124
        UINT8   byAnrVoiceNoiseSegregation;
 
125
        UINT8   bySoutNaturalListenerEnhancementGainDb;
 
126
        
 
127
        UINT16  usToneDisablerVqeActivationDelay;
 
128
        UINT16  usAecTailLength;
 
129
 
 
130
        UINT8   byDoubleTalkBehavior;
 
131
        UINT8   fSoutNoiseBleaching;
 
132
        
 
133
        UINT8   fResetRinAlcOnTones;
 
134
        UINT8   fResetSoutAlcOnTones;
 
135
 
 
136
        UINT16  usAlcNoiseBleedOutTime;
 
137
        
 
138
 
 
139
 
 
140
        UINT8   fSoutConferencingNoiseReduction;
 
141
 
 
142
 
 
143
 
 
144
} tOCT6100_API_CHANNEL_VQE, *tPOCT6100_API_CHANNEL_VQE;
 
145
 
 
146
typedef struct _OCT6100_API_CHANNEL_CODEC_
 
147
{
 
148
        UINT8   byAdpcmNibblePosition;
 
149
        UINT8   fEnableSilenceSuppression;
 
150
 
 
151
        UINT8   byEncoderPort;
 
152
        UINT8   byEncodingRate;
 
153
 
 
154
        UINT8   byDecoderPort;
 
155
        UINT8   byDecodingRate;
 
156
        
 
157
        UINT8   byPhase;
 
158
        UINT8   byPhasingType;
 
159
 
 
160
} tOCT6100_API_CHANNEL_CODEC, *tPOCT6100_API_CHANNEL_CODEC;
 
161
 
 
162
typedef struct _OCT6100_API_CHANNEL_
 
163
{
 
164
        /*=======================================================================*/
 
165
        /* Channel configuration. */
 
166
 
 
167
        /* Flag specifying whether the entry is used or not. */
 
168
        UINT8   fReserved;
 
169
 
 
170
        /* Count used to manage entry handles allocated to user. */
 
171
        UINT8   byEntryOpenCnt;
 
172
 
 
173
        /* Is this a bidirectionnal channel? */
 
174
        UINT8   fBiDirChannel;
 
175
 
 
176
        /* Enable tone disabler? */
 
177
        UINT8   fEnableToneDisabler;
 
178
 
 
179
        /* TSI chariot memory entry for the Rin/Rout stream. */
 
180
        UINT16  usRinRoutTsiMemIndex;
 
181
 
 
182
        /* TSI chariot memory entry for the Sin/Sout stream. */
 
183
        UINT16  usSinSoutTsiMemIndex;
 
184
 
 
185
        /* Additional TSI entry used to temporarily store the SIN signal. */
 
186
        UINT16  usExtraSinTsiMemIndex;
 
187
        UINT16  usExtraSinTsiDependencyCnt;
 
188
 
 
189
        /* Additional TSI entry used to temporarily store the RIN signal. */
 
190
        UINT16  usExtraRinTsiMemIndex;
 
191
        UINT16  usExtraRinTsiDependencyCnt;
 
192
        
 
193
        /* Conversion chariot memory entry. */
 
194
        UINT16  usRinRoutConversionMemIndex;
 
195
        UINT16  usSinSoutConversionMemIndex;
 
196
        
 
197
        /* TSST control memory entry. */
 
198
        UINT16  usRinTsstIndex;
 
199
        UINT16  usSinTsstIndex;
 
200
        UINT16  usRoutTsstIndex;
 
201
        UINT16  usSoutTsstIndex;
 
202
 
 
203
        /* SSPX memory entry. */
 
204
        UINT16  usEchoMemIndex;
 
205
 
 
206
        /* Active mixer events count to test for last event. */
 
207
        UINT16  usMixerEventCnt;
 
208
 
 
209
        /* User channel ID, transparently passed to the user. */
 
210
        UINT32  ulUserChanId;
 
211
 
 
212
        /* Copy events. */
 
213
        UINT16  usSinCopyEventIndex;
 
214
        UINT16  usSoutCopyEventIndex;
 
215
        
 
216
        /* Silence events. */
 
217
        UINT16  usRinSilenceEventIndex;
 
218
        UINT16  usSinSilenceEventIndex;
 
219
 
 
220
        /* TDM configuration. */
 
221
        tOCT6100_API_CHANNEL_TDM        TdmConfig;
 
222
 
 
223
        /* VQE configuration. */
 
224
        tOCT6100_API_CHANNEL_VQE        VqeConfig;
 
225
 
 
226
        /* Current echo operation mode. */
 
227
        UINT8   byEchoOperationMode;
 
228
 
 
229
        /* Currently muted ports. */
 
230
        UINT16  usMutedPorts;
 
231
 
 
232
        /*=======================================================================*/
 
233
 
 
234
        
 
235
        /*=======================================================================*/
 
236
        /* Statistics section. */
 
237
 
 
238
        INT16   sComfortNoiseLevel;
 
239
 
 
240
        UINT16  usCurrentEchoDelay;
 
241
        UINT16  usMaxEchoDelay;
 
242
 
 
243
        UINT16  usNumEchoPathChanges;
 
244
        UINT16  usNumEchoPathChangesOfst;
 
245
        
 
246
        INT16   sCurrentERL;
 
247
        INT16   sCurrentERLE;
 
248
        
 
249
        INT16   sMaxERL;
 
250
        INT16   sMaxERLE;
 
251
        
 
252
        INT16   sRinLevel;
 
253
        INT16   sSinLevel;
 
254
        
 
255
        INT16   sRinAppliedGain;
 
256
        INT16   sSoutAppliedGain;
 
257
 
 
258
        UINT8   byToneDisablerStatus;
 
259
 
 
260
        /*=======================================================================*/
 
261
 
 
262
 
 
263
        /*=======================================================================*/
 
264
        /* Bridge information. */
 
265
 
 
266
        UINT16  usBridgeIndex;
 
267
 
 
268
        UINT8   fMute;
 
269
        UINT8   fTap;
 
270
        UINT8   fBeingTapped;
 
271
        UINT8   fCopyEventCreated;
 
272
 
 
273
        UINT16  usLoadEventIndex;
 
274
        UINT16  usSubStoreEventIndex;
 
275
        
 
276
        UINT16  usFlexConfParticipantIndex;
 
277
        UINT16  usTapBridgeIndex;
 
278
        UINT16  usTapChanIndex;
 
279
        
 
280
        /*=======================================================================*/
 
281
 
 
282
 
 
283
        /*=======================================================================*/
 
284
        /* Buffer playout information. */
 
285
 
 
286
        UINT32  ulRinBufWritePtr;
 
287
        UINT32  ulRinBufSkipPtr;
 
288
        
 
289
        UINT8   fSoutBufPlaying;
 
290
        UINT8   fRinBufPlaying;
 
291
        
 
292
        UINT8   fRinBufPlayoutNotifyOnStop;
 
293
        UINT8   fRinBufPlayoutRepeatUsed;
 
294
 
 
295
        UINT32  ulSoutBufWritePtr;
 
296
        UINT32  ulSoutBufSkipPtr;
 
297
 
 
298
        UINT8   fSoutBufPlayoutNotifyOnStop;
 
299
        UINT8   fSoutBufPlayoutRepeatUsed;
 
300
 
 
301
        UINT8   fRinHardStop;
 
302
        UINT8   fSoutHardStop;
 
303
 
 
304
        UINT32  ulRinUserBufPlayoutEventId;
 
305
        UINT32  ulSoutUserBufPlayoutEventId;
 
306
        
 
307
        UINT8   byRinPlayoutStopEventType;
 
308
        UINT8   bySoutPlayoutStopEventType;
 
309
        
 
310
        UINT8   fRinBufAdded;
 
311
        UINT8   fSoutBufAdded;
 
312
        
 
313
        UINT8   fBufPlayoutActive;
 
314
        
 
315
        /*=======================================================================*/
 
316
 
 
317
 
 
318
        /*=======================================================================*/
 
319
        /* Copy events information. */
 
320
 
 
321
        /* Number of copy events created. */
 
322
        UINT16  usCopyEventCnt;
 
323
 
 
324
        /*=======================================================================*/
 
325
 
 
326
 
 
327
        /*=======================================================================*/
 
328
        /* Extended tone detection info. */
 
329
 
 
330
        /* Enable extended tone detection. */
 
331
        UINT8   fEnableExtToneDetection;
 
332
        
 
333
        UINT16  usExtToneChanIndex;
 
334
        UINT16  usExtToneMixerIndex;
 
335
        UINT16  usExtToneTsiIndex;
 
336
 
 
337
        /* Mode of operation of the channel based on the extended tone detection configuration. */
 
338
        UINT32  ulExtToneChanMode;
 
339
 
 
340
        /*=======================================================================*/
 
341
 
 
342
        /* Tone detection state. */
 
343
        /* This array is configured as follow. */
 
344
        /* Index 0 contain event 0 to 31 and Index 1 contains event 32 - 55 */
 
345
        UINT32  aulToneConf[ 2 ];
 
346
        UINT32  ulLastSSToneDetected;
 
347
        UINT32  ulLastSSToneTimestamp;
 
348
 
 
349
        /*=======================================================================*/
 
350
 
 
351
 
 
352
        /*=======================================================================*/
 
353
 
 
354
        /* Index of the phasing TSST */
 
355
        UINT16  usPhasingTsstIndex;
 
356
        
 
357
        /* State of the codec structure associated to this channel. */
 
358
        UINT8   fSinSoutCodecActive;
 
359
        UINT8   fRinRoutCodecActive;
 
360
 
 
361
        /* Codec configuration. */
 
362
        tOCT6100_API_CHANNEL_CODEC      CodecConfig;
 
363
 
 
364
        /*=======================================================================*/
 
365
        
 
366
 
 
367
 
 
368
 
 
369
 
 
370
 
 
371
 
 
372
        /* Nlp Conf Dword, index 0 contains the dword where the dword is located. and
 
373
           index 1 is the actual value of the dword.*/
 
374
        UINT32  aulNlpConfDword[ cOCT6100_MAX_NLP_CONF_DWORD ][ 2 ];
 
375
 
 
376
} tOCT6100_API_CHANNEL, *tPOCT6100_API_CHANNEL;
 
377
 
 
378
typedef struct _OCT6100_API_BIDIR_CHANNEL_
 
379
{
 
380
        UINT16  usFirstChanIndex;
 
381
        UINT16  usSecondChanIndex;
 
382
        
 
383
        /* Flag specifying whether the entry is used or not. */
 
384
        UINT8   fReserved;
 
385
 
 
386
        /* Count used to manage entry handles allocated to user. */
 
387
        UINT8   byEntryOpenCnt;
 
388
 
 
389
 
 
390
 
 
391
} tOCT6100_API_BIDIR_CHANNEL, *tPOCT6100_API_BIDIR_CHANNEL;
 
392
 
 
393
#endif /* __OCT6100_CHANNEL_INST_H__ */