1
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\
3
File: oct6100_channel_inst.h
5
Copyright (c) 2001-2006 Octasic Inc.
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.
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.
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
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.
28
$Octasic_Release: OCT612xAPI-01.00-PR43 $
30
$Octasic_Revision: 88 $
32
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
34
#ifndef __OCT6100_CHANNEL_INST_H__
35
#define __OCT6100_CHANNEL_INST_H__
37
/***************************** INCLUDE FILES *******************************/
39
/***************************** DEFINES *************************************/
41
/***************************** TYPES ***************************************/
43
typedef struct _OCT6100_API_CHANNEL_TDM_
60
UINT16 usRoutTimeslot;
64
UINT16 usSoutTimeslot;
67
/* ROUT broadcast info. */
68
UINT16 usRoutBrdcastTsstFirstEntry;
69
UINT16 usRoutBrdcastTsstNumEntry;
71
/* SOUT broadcast info. */
72
UINT16 usSoutBrdcastTsstFirstEntry;
73
UINT16 usSoutBrdcastTsstNumEntry;
80
} tOCT6100_API_CHANNEL_TDM, *tPOCT6100_API_CHANNEL_TDM;
82
typedef struct _OCT6100_API_CHANNEL_VQE_
85
UINT8 fEnableTailDisplacement;
86
UINT16 usTailDisplacement;
89
UINT8 fSinDcOffsetRemoval;
90
UINT8 fRinDcOffsetRemoval;
91
UINT8 fRinLevelControl;
92
UINT8 fSoutLevelControl;
94
UINT8 fRinAutomaticLevelControl;
95
UINT8 fSoutAutomaticLevelControl;
96
OCT_INT8 chRinAutomaticLevelControlTargetDb;
97
OCT_INT8 chSoutAutomaticLevelControlTargetDb;
99
UINT8 fRinHighLevelCompensation;
100
OCT_INT8 chRinHighLevelCompensationThresholdDb;
102
UINT8 bySoutAutomaticListenerEnhancementGainDb;
103
UINT8 fSoutNaturalListenerEnhancement;
105
UINT8 fSoutAdaptiveNoiseReduction;
106
UINT8 fDtmfToneRemoval;
108
UINT8 byComfortNoiseMode;
110
UINT8 byNonLinearityBehaviorA;
111
UINT8 byNonLinearityBehaviorB;
112
OCT_INT8 chRinLevelControlGainDb;
113
OCT_INT8 chSoutLevelControlGainDb;
115
OCT_INT8 chDefaultErlDb;
116
OCT_INT8 chAecDefaultErlDb;
118
UINT8 fRoutNoiseReduction;
119
OCT_INT8 chAnrSnrEnhancementDb;
121
UINT8 fEnableMusicProtection;
122
UINT8 fIdleCodeDetection;
124
UINT8 byAnrVoiceNoiseSegregation;
125
UINT8 bySoutNaturalListenerEnhancementGainDb;
127
UINT16 usToneDisablerVqeActivationDelay;
128
UINT16 usAecTailLength;
130
UINT8 byDoubleTalkBehavior;
131
UINT8 fSoutNoiseBleaching;
133
UINT8 fResetRinAlcOnTones;
134
UINT8 fResetSoutAlcOnTones;
136
UINT16 usAlcNoiseBleedOutTime;
140
UINT8 fSoutConferencingNoiseReduction;
144
} tOCT6100_API_CHANNEL_VQE, *tPOCT6100_API_CHANNEL_VQE;
146
typedef struct _OCT6100_API_CHANNEL_CODEC_
148
UINT8 byAdpcmNibblePosition;
149
UINT8 fEnableSilenceSuppression;
152
UINT8 byEncodingRate;
155
UINT8 byDecodingRate;
160
} tOCT6100_API_CHANNEL_CODEC, *tPOCT6100_API_CHANNEL_CODEC;
162
typedef struct _OCT6100_API_CHANNEL_
164
/*=======================================================================*/
165
/* Channel configuration. */
167
/* Flag specifying whether the entry is used or not. */
170
/* Count used to manage entry handles allocated to user. */
171
UINT8 byEntryOpenCnt;
173
/* Is this a bidirectionnal channel? */
176
/* Enable tone disabler? */
177
UINT8 fEnableToneDisabler;
179
/* TSI chariot memory entry for the Rin/Rout stream. */
180
UINT16 usRinRoutTsiMemIndex;
182
/* TSI chariot memory entry for the Sin/Sout stream. */
183
UINT16 usSinSoutTsiMemIndex;
185
/* Additional TSI entry used to temporarily store the SIN signal. */
186
UINT16 usExtraSinTsiMemIndex;
187
UINT16 usExtraSinTsiDependencyCnt;
189
/* Additional TSI entry used to temporarily store the RIN signal. */
190
UINT16 usExtraRinTsiMemIndex;
191
UINT16 usExtraRinTsiDependencyCnt;
193
/* Conversion chariot memory entry. */
194
UINT16 usRinRoutConversionMemIndex;
195
UINT16 usSinSoutConversionMemIndex;
197
/* TSST control memory entry. */
198
UINT16 usRinTsstIndex;
199
UINT16 usSinTsstIndex;
200
UINT16 usRoutTsstIndex;
201
UINT16 usSoutTsstIndex;
203
/* SSPX memory entry. */
204
UINT16 usEchoMemIndex;
206
/* Active mixer events count to test for last event. */
207
UINT16 usMixerEventCnt;
209
/* User channel ID, transparently passed to the user. */
213
UINT16 usSinCopyEventIndex;
214
UINT16 usSoutCopyEventIndex;
216
/* Silence events. */
217
UINT16 usRinSilenceEventIndex;
218
UINT16 usSinSilenceEventIndex;
220
/* TDM configuration. */
221
tOCT6100_API_CHANNEL_TDM TdmConfig;
223
/* VQE configuration. */
224
tOCT6100_API_CHANNEL_VQE VqeConfig;
226
/* Current echo operation mode. */
227
UINT8 byEchoOperationMode;
229
/* Currently muted ports. */
232
/*=======================================================================*/
235
/*=======================================================================*/
236
/* Statistics section. */
238
INT16 sComfortNoiseLevel;
240
UINT16 usCurrentEchoDelay;
241
UINT16 usMaxEchoDelay;
243
UINT16 usNumEchoPathChanges;
244
UINT16 usNumEchoPathChangesOfst;
255
INT16 sRinAppliedGain;
256
INT16 sSoutAppliedGain;
258
UINT8 byToneDisablerStatus;
260
/*=======================================================================*/
263
/*=======================================================================*/
264
/* Bridge information. */
266
UINT16 usBridgeIndex;
271
UINT8 fCopyEventCreated;
273
UINT16 usLoadEventIndex;
274
UINT16 usSubStoreEventIndex;
276
UINT16 usFlexConfParticipantIndex;
277
UINT16 usTapBridgeIndex;
278
UINT16 usTapChanIndex;
280
/*=======================================================================*/
283
/*=======================================================================*/
284
/* Buffer playout information. */
286
UINT32 ulRinBufWritePtr;
287
UINT32 ulRinBufSkipPtr;
289
UINT8 fSoutBufPlaying;
290
UINT8 fRinBufPlaying;
292
UINT8 fRinBufPlayoutNotifyOnStop;
293
UINT8 fRinBufPlayoutRepeatUsed;
295
UINT32 ulSoutBufWritePtr;
296
UINT32 ulSoutBufSkipPtr;
298
UINT8 fSoutBufPlayoutNotifyOnStop;
299
UINT8 fSoutBufPlayoutRepeatUsed;
304
UINT32 ulRinUserBufPlayoutEventId;
305
UINT32 ulSoutUserBufPlayoutEventId;
307
UINT8 byRinPlayoutStopEventType;
308
UINT8 bySoutPlayoutStopEventType;
313
UINT8 fBufPlayoutActive;
315
/*=======================================================================*/
318
/*=======================================================================*/
319
/* Copy events information. */
321
/* Number of copy events created. */
322
UINT16 usCopyEventCnt;
324
/*=======================================================================*/
327
/*=======================================================================*/
328
/* Extended tone detection info. */
330
/* Enable extended tone detection. */
331
UINT8 fEnableExtToneDetection;
333
UINT16 usExtToneChanIndex;
334
UINT16 usExtToneMixerIndex;
335
UINT16 usExtToneTsiIndex;
337
/* Mode of operation of the channel based on the extended tone detection configuration. */
338
UINT32 ulExtToneChanMode;
340
/*=======================================================================*/
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;
349
/*=======================================================================*/
352
/*=======================================================================*/
354
/* Index of the phasing TSST */
355
UINT16 usPhasingTsstIndex;
357
/* State of the codec structure associated to this channel. */
358
UINT8 fSinSoutCodecActive;
359
UINT8 fRinRoutCodecActive;
361
/* Codec configuration. */
362
tOCT6100_API_CHANNEL_CODEC CodecConfig;
364
/*=======================================================================*/
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 ];
376
} tOCT6100_API_CHANNEL, *tPOCT6100_API_CHANNEL;
378
typedef struct _OCT6100_API_BIDIR_CHANNEL_
380
UINT16 usFirstChanIndex;
381
UINT16 usSecondChanIndex;
383
/* Flag specifying whether the entry is used or not. */
386
/* Count used to manage entry handles allocated to user. */
387
UINT8 byEntryOpenCnt;
391
} tOCT6100_API_BIDIR_CHANNEL, *tPOCT6100_API_BIDIR_CHANNEL;
393
#endif /* __OCT6100_CHANNEL_INST_H__ */