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