| 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 : 1; |
| 60 |
UINT8 bySinNumTssts : 1; |
| 61 |
UINT8 byRoutNumTssts : 1; |
| 62 |
UINT8 bySoutNumTssts : 1; |
| 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 : 1; |
| 105 |
UINT8 fSoutNaturalListenerEnhancement : 1; |
| 106 |
UINT8 fRoutNoiseReduction : 1; |
| 107 |
UINT8 fEnableMusicProtection : 1; |
| 108 |
UINT8 fIdleCodeDetection : 1; |
| 109 |
UINT8 byAnrVoiceNoiseSegregation : 1; |
| 110 |
UINT8 byDoubleTalkBehavior : 1; |
| 111 |
UINT8 fSoutNoiseBleaching : 1; |
| 112 |
UINT8 fSoutConferencingNoiseReduction : 1; |
| 113 |
UINT8 bySoutAutomaticListenerEnhancementGainDb : 1; |
| 114 |
UINT8 byNonLinearityBehaviorA : 1; |
| 115 |
UINT8 byNonLinearityBehaviorB : 1; |
| 116 |
UINT8 bySoutNaturalListenerEnhancementGainDb : 1; |
| 117 |
|
| 118 |
OCT_INT8 chRinAutomaticLevelControlTargetDb; |
| 119 |
OCT_INT8 chSoutAutomaticLevelControlTargetDb; |
| 120 |
|
| 121 |
OCT_INT8 chRinHighLevelCompensationThresholdDb; |
| 122 |
|
| 123 |
OCT_INT8 chRinLevelControlGainDb; |
| 124 |
OCT_INT8 chSoutLevelControlGainDb; |
| 125 |
|
| 126 |
OCT_INT8 chDefaultErlDb; |
| 127 |
OCT_INT8 chAecDefaultErlDb; |
| 128 |
|
| 129 |
OCT_INT8 chRoutNoiseReductionLevelGainDb; |
| 130 |
OCT_INT8 chAnrSnrEnhancementDb; |
| 131 |
|
| 132 |
UINT16 usToneDisablerVqeActivationDelay; |
| 133 |
UINT16 usAecTailLength; |
| 134 |
|
| 135 |
UINT16 usTailDisplacement; |
| 136 |
UINT16 usTailLength; |
| 137 |
|
| 138 |
} tOCT6100_API_CHANNEL_VQE, *tPOCT6100_API_CHANNEL_VQE; |
| 139 |
|
| 140 |
typedef struct _OCT6100_API_CHANNEL_CODEC_ |
| 141 |
{ |
| 142 |
UINT8 byAdpcmNibblePosition : 1; |
| 143 |
UINT8 fEnableSilenceSuppression : 1; |
| 144 |
|
| 145 |
UINT8 byEncoderPort : 1; |
| 146 |
UINT8 byEncodingRate : 1; |
| 147 |
|
| 148 |
UINT8 byDecoderPort : 1; |
| 149 |
UINT8 byDecodingRate : 1; |
| 150 |
|
| 151 |
UINT8 byPhase : 1; |
| 152 |
UINT8 byPhasingType : 1; |
| 153 |
|
| 154 |
} tOCT6100_API_CHANNEL_CODEC, *tPOCT6100_API_CHANNEL_CODEC; |
| 155 |
|
| 156 |
typedef struct _OCT6100_API_CHANNEL_ |
| 157 |
{ |
| 158 |
/*=======================================================================*/ |
| 159 |
/* Channel configuration. */ |
| 160 |
|
| 161 |
/* Flag specifying whether the entry is used or not. */ |
| 162 |
UINT8 fReserved : 1; |
| 163 |
|
| 164 |
/* Count used to manage entry handles allocated to user. */ |
| 165 |
UINT8 byEntryOpenCnt : 1; |
| 166 |
|
| 167 |
/* Is this a bidirectionnal channel? */ |
| 168 |
UINT8 fBiDirChannel : 1; |
| 169 |
|
| 170 |
/* Enable tone disabler? */ |
| 171 |
UINT8 fEnableToneDisabler : 1; |
| 172 |
|
| 173 |
/* Current echo operation mode. */ |
| 174 |
UINT8 byEchoOperationMode : 1; |
| 175 |
|
| 176 |
UINT8 byToneDisablerStatus : 1; |
| 177 |
|
| 178 |
UINT8 fMute : 1; |
| 179 |
UINT8 fTap : 1; |
| 180 |
UINT8 fBeingTapped : 1; |
| 181 |
UINT8 fCopyEventCreated : 1; |
| 182 |
|
| 183 |
UINT8 fSoutBufPlaying : 1; |
| 184 |
UINT8 fRinBufPlaying : 1; |
| 185 |
|
| 186 |
UINT8 fRinBufPlayoutNotifyOnStop : 1; |
| 187 |
UINT8 fRinBufPlayoutRepeatUsed : 1; |
| 188 |
|
| 189 |
|
| 190 |
UINT8 fSoutBufPlayoutNotifyOnStop : 1; |
| 191 |
UINT8 fSoutBufPlayoutRepeatUsed : 1; |
| 192 |
|
| 193 |
UINT8 fRinHardStop : 1; |
| 194 |
UINT8 fSoutHardStop : 1; |
| 195 |
|
| 196 |
UINT8 byRinPlayoutStopEventType : 1; |
| 197 |
UINT8 bySoutPlayoutStopEventType : 1; |
| 198 |
|
| 199 |
UINT8 fRinBufAdded : 1; |
| 200 |
UINT8 fSoutBufAdded : 1; |
| 201 |
|
| 202 |
UINT8 fBufPlayoutActive : 1; |
| 203 |
|
| 204 |
/* Enable extended tone detection. */ |
| 205 |
UINT8 fEnableExtToneDetection : 1; |
| 206 |
|
| 207 |
/* State of the codec structure associated to this channel. */ |
| 208 |
UINT8 fSinSoutCodecActive : 1; |
| 209 |
UINT8 fRinRoutCodecActive : 1; |
| 210 |
|
| 211 |
/* TSI chariot memory entry for the Rin/Rout stream. */ |
| 212 |
UINT16 usRinRoutTsiMemIndex; |
| 213 |
|
| 214 |
/* TSI chariot memory entry for the Sin/Sout stream. */ |
| 215 |
UINT16 usSinSoutTsiMemIndex; |
| 216 |
|
| 217 |
/* Additional TSI entry used to temporarily store the SIN signal. */ |
| 218 |
UINT16 usExtraSinTsiMemIndex; |
| 219 |
UINT16 usExtraSinTsiDependencyCnt; |
| 220 |
|
| 221 |
/* Additional TSI entry used to temporarily store the RIN signal. */ |
| 222 |
UINT16 usExtraRinTsiMemIndex; |
| 223 |
UINT16 usExtraRinTsiDependencyCnt; |
| 224 |
|
| 225 |
/* Conversion chariot memory entry. */ |
| 226 |
UINT16 usRinRoutConversionMemIndex; |
| 227 |
UINT16 usSinSoutConversionMemIndex; |
| 228 |
|
| 229 |
/* TSST control memory entry. */ |
| 230 |
UINT16 usRinTsstIndex; |
| 231 |
UINT16 usSinTsstIndex; |
| 232 |
UINT16 usRoutTsstIndex; |
| 233 |
UINT16 usSoutTsstIndex; |
| 234 |
|
| 235 |
/* SSPX memory entry. */ |
| 236 |
UINT16 usEchoMemIndex; |
| 237 |
|
| 238 |
/* Active mixer events count to test for last event. */ |
| 239 |
UINT16 usMixerEventCnt; |
| 240 |
|
| 241 |
/* Copy events. */ |
| 242 |
UINT16 usSinCopyEventIndex; |
| 243 |
UINT16 usSoutCopyEventIndex; |
| 244 |
|
| 245 |
/* Silence events. */ |
| 246 |
UINT16 usRinSilenceEventIndex; |
| 247 |
UINT16 usSinSilenceEventIndex; |
| 248 |
|
| 249 |
/* TDM configuration. */ |
| 250 |
tOCT6100_API_CHANNEL_TDM TdmConfig; |
| 251 |
|
| 252 |
/* VQE configuration. */ |
| 253 |
tOCT6100_API_CHANNEL_VQE VqeConfig; |
| 254 |
|
| 255 |
/* Currently muted ports. */ |
| 256 |
UINT16 usMutedPorts; |
| 257 |
|
| 258 |
/*=======================================================================*/ |
| 259 |
|
| 260 |
/*=======================================================================*/ |
| 261 |
/* Statistics section. */ |
| 262 |
|
| 263 |
INT16 sComfortNoiseLevel; |
| 264 |
|
| 265 |
UINT16 usCurrentEchoDelay; |
| 266 |
UINT16 usMaxEchoDelay; |
| 267 |
|
| 268 |
UINT16 usNumEchoPathChanges; |
| 269 |
UINT16 usNumEchoPathChangesOfst; |
| 270 |
|
| 271 |
INT16 sCurrentERL; |
| 272 |
INT16 sCurrentERLE; |
| 273 |
|
| 274 |
INT16 sMaxERL; |
| 275 |
INT16 sMaxERLE; |
| 276 |
|
| 277 |
INT16 sRinLevel; |
| 278 |
INT16 sSinLevel; |
| 279 |
|
| 280 |
INT16 sRinAppliedGain; |
| 281 |
INT16 sSoutAppliedGain; |
| 282 |
|
| 283 |
/*=======================================================================*/ |
| 284 |
|
| 285 |
|
| 286 |
/*=======================================================================*/ |
| 287 |
/* Bridge information. */ |
| 288 |
|
| 289 |
UINT16 usBridgeIndex; |
| 290 |
|
| 291 |
UINT16 usLoadEventIndex; |
| 292 |
UINT16 usSubStoreEventIndex; |
| 293 |
|
| 294 |
UINT16 usFlexConfParticipantIndex; |
| 295 |
UINT16 usTapBridgeIndex; |
| 296 |
UINT16 usTapChanIndex; |
| 297 |
|
| 298 |
/*=======================================================================*/ |
| 299 |
|
| 300 |
|
| 301 |
/*=======================================================================*/ |
| 302 |
/* Buffer playout information. */ |
| 303 |
|
| 304 |
PTR_TYPE ulRinBufWritePtr; |
| 305 |
PTR_TYPE ulRinBufSkipPtr; |
| 306 |
PTR_TYPE ulSoutBufWritePtr; |
| 307 |
PTR_TYPE ulSoutBufSkipPtr; |
| 308 |
|
| 309 |
/* User channel ID, transparently passed to the user. */ |
| 310 |
|
| 311 |
/*=======================================================================*/ |
| 312 |
|
| 313 |
|
| 314 |
/*=======================================================================*/ |
| 315 |
/* Copy events information. */ |
| 316 |
|
| 317 |
/* Number of copy events created. */ |
| 318 |
UINT16 usCopyEventCnt; |
| 319 |
|
| 320 |
/*=======================================================================*/ |
| 321 |
|
| 322 |
|
| 323 |
/*=======================================================================*/ |
| 324 |
/* Extended tone detection info. */ |
| 325 |
|
| 326 |
|
| 327 |
UINT16 usExtToneChanIndex; |
| 328 |
UINT16 usExtToneMixerIndex; |
| 329 |
UINT16 usExtToneTsiIndex; |
| 330 |
|
| 331 |
/* Index of the phasing TSST */ |
| 332 |
UINT16 usPhasingTsstIndex; |
| 333 |
|
| 334 |
/* Mode of operation of the channel based on the extended tone detection configuration. */ |
| 335 |
PTR_TYPE ulExtToneChanMode; |
| 336 |
|
| 337 |
/*=======================================================================*/ |
| 338 |
|
| 339 |
/* Tone detection state. */ |
| 340 |
/* This array is configured as follow. */ |
| 341 |
/* Index 0 contain event 0 to 31 and Index 1 contains event 32 - 55 */ |
| 342 |
PTR_TYPE ulLastSSToneDetected; |
| 343 |
PTR_TYPE ulLastSSToneTimestamp; |
| 344 |
|
| 345 |
|
| 346 |
PTR_TYPE ulRinUserBufPlayoutEventId; |
| 347 |
PTR_TYPE ulSoutUserBufPlayoutEventId; |
| 348 |
|
| 349 |
UINT32 aulToneConf[2]; |
| 350 |
UINT32 ulUserChanId; |
| 351 |
/*=======================================================================*/ |
| 352 |
|
| 353 |
|
| 354 |
/*=======================================================================*/ |
| 355 |
|
| 356 |
|
| 357 |
/* Codec configuration. */ |
| 358 |
tOCT6100_API_CHANNEL_CODEC CodecConfig; |
| 359 |
|
| 360 |
} tOCT6100_API_CHANNEL, *tPOCT6100_API_CHANNEL; |
| 361 |
|
| 362 |
typedef struct _OCT6100_API_BIDIR_CHANNEL_ |
| 363 |
{ |
| 364 |
UINT16 usFirstChanIndex; |
| 365 |
UINT16 usSecondChanIndex; |
| 366 |
|
| 367 |
/* Flag specifying whether the entry is used or not. */ |
| 368 |
UINT8 fReserved : 1; |
| 369 |
/* Count used to manage entry handles allocated to user. */ |
| 370 |
UINT8 byEntryOpenCnt : 1; |
| 371 |
|
| 372 |
} tOCT6100_API_BIDIR_CHANNEL, *tPOCT6100_API_BIDIR_CHANNEL; |
| 373 |
|
| 374 |
#endif /* __OCT6100_CHANNEL_INST_H__ */ |