diff options
author | Octasic Inc <support@octasic.com> | 2008-02-14 17:47:08 +0200 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-02-27 21:11:15 +0200 |
commit | 4ebbd1d797c05f3cbadd94fcd834bc5957b49e5a (patch) | |
tree | c060c5c8c2919e11ec520e43a2671da881b064dd /software/octdeviceapi/oct6100api/oct6100_api | |
parent | ac89cd86e5cd7d7eb95c832abefe5e6299fd0061 (diff) |
importing OCT612x-01.01.01
Diffstat (limited to 'software/octdeviceapi/oct6100api/oct6100_api')
19 files changed, 280 insertions, 110 deletions
diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_adpcm_chan.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_adpcm_chan.c index ec51f33..132c6e0 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_adpcm_chan.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_adpcm_chan.c @@ -2,7 +2,7 @@ File: oct6100_adpcm_chan.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -22,7 +22,7 @@ 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_Release: OCT612xAPI-01.01.01 $ $Octasic_Revision: 16 $ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.c index 162dfa6..463f077 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.c @@ -2,7 +2,7 @@ File: oct6100_channel.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -23,9 +23,9 @@ 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_Release: OCT612xAPI-01.01.01 $ -$Octasic_Revision: 492 $ +$Octasic_Revision: 494 $ \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ @@ -4931,35 +4931,130 @@ UINT32 Oct6100ApiModifyChannelStructs( { UINT32 ulCompType = 0; UINT16 usTempTsiMemIndex; - UINT16 usDecoderMemIndex; - UINT16 usEncoderMemIndex; + UINT16 usDecoderMemIndex = cOCT6100_INVALID_INDEX; + UINT16 usEncoderMemIndex = cOCT6100_INVALID_INDEX; + UINT16 usConversionMemIndex; UINT32 ulPcmLaw; UINT16 usPhasingIndex; BOOL fModifyAdpcmMem = TRUE; /*==============================================================================*/ - /* Reprogram the Decoder memory.*/ + /* Clear off the decoder and encoder memory if the direction changes, */ + /* or if the port is disabled (basically, as required). */ - if ( pChanEntry->CodecConfig.byDecoderPort == cOCT6100_CHANNEL_PORT_RIN ) + /* Only clear the conversion memory if the decoder or encoder port has changed. */ + if ( ( pChanEntry->CodecConfig.byDecoderPort != cOCT6100_NO_DECODING ) + && ( pChanEntry->CodecConfig.byDecoderPort != (UINT8)( f_pChannelOpen->CodecConfig.ulDecoderPort & 0xFF ) ) ) + { + /* Default is there is no conversion index. */ + usConversionMemIndex = cOCT6100_INVALID_INDEX; + + /* Find the old decoder port, to clear it. */ + if ( pChanEntry->CodecConfig.byDecoderPort == cOCT6100_CHANNEL_PORT_RIN ) + usConversionMemIndex = pChanEntry->usRinRoutConversionMemIndex; + else if ( pChanEntry->CodecConfig.byDecoderPort == cOCT6100_CHANNEL_PORT_SIN ) + usConversionMemIndex = pChanEntry->usSinSoutConversionMemIndex; + + /* If the conversion memory index is valid. */ + if ( usConversionMemIndex != cOCT6100_INVALID_INDEX ) + { + ulResult = Oct6100ApiClearConversionMemory( f_pApiInstance, + usConversionMemIndex ); + if ( ulResult != cOCT6100_ERR_OK ) + return ulResult; + + /* Flag the entry as deactivated.*/ + if ( pChanEntry->CodecConfig.byDecoderPort == cOCT6100_CHANNEL_PORT_RIN ) + { + *f_pfRinRoutCodecActive = FALSE; + } + else + { + *f_pfSinSoutCodecActive = FALSE; + } + } + } + + /* Now with the encoder.. */ + if ( ( pChanEntry->CodecConfig.byEncoderPort != cOCT6100_NO_ENCODING ) + && ( pChanEntry->CodecConfig.byEncoderPort != (UINT8)( f_pChannelOpen->CodecConfig.ulEncoderPort & 0xFF ) ) ) + { + /* Default is there is no conversion index. */ + usConversionMemIndex = cOCT6100_INVALID_INDEX; + + /* Find the old encoder port, to clear it. */ + if ( pChanEntry->CodecConfig.byEncoderPort == cOCT6100_CHANNEL_PORT_ROUT ) + usConversionMemIndex = pChanEntry->usRinRoutConversionMemIndex; + else if ( pChanEntry->CodecConfig.byEncoderPort == cOCT6100_CHANNEL_PORT_SOUT ) + usConversionMemIndex = pChanEntry->usSinSoutConversionMemIndex; + + /* If the conversion memory index is valid. */ + if ( usConversionMemIndex != cOCT6100_INVALID_INDEX ) + { + ulResult = Oct6100ApiClearConversionMemory( f_pApiInstance, + usConversionMemIndex ); + if ( ulResult != cOCT6100_ERR_OK ) + return ulResult; + + /* Flag the entry as deactivated.*/ + if ( pChanEntry->CodecConfig.byEncoderPort == cOCT6100_CHANNEL_PORT_ROUT ) + { + *f_pfRinRoutCodecActive = FALSE; + } + else + { + *f_pfSinSoutCodecActive = FALSE; + } + } + } + + /*==============================================================================*/ + + + + /*==============================================================================*/ + /* Reprogram the Decoder memory with the new requested configuration. */ + + /* Select the conversion index according to the port to be used for decoding. */ + /* NOTE: At this point, the configuration can request the decoder to be disabled, thus this */ + /* case must be handled correctly. */ + if ( f_pChannelOpen->CodecConfig.ulDecoderPort == cOCT6100_CHANNEL_PORT_RIN ) { usDecoderMemIndex = pChanEntry->usRinRoutConversionMemIndex; } - else + else if ( f_pChannelOpen->CodecConfig.ulDecoderPort == cOCT6100_CHANNEL_PORT_SIN ) { usDecoderMemIndex = pChanEntry->usSinSoutConversionMemIndex; } + else /* if ( f_pChannelOpen->CodecConfig.ulDecoderPort == cOCT6100_NO_DECODING ) */ + { + /* No decoding requested. The conversion memory does not */ + /* have to be modified, it was cleared above. */ + usDecoderMemIndex = cOCT6100_INVALID_INDEX; + } - if ( pChanEntry->CodecConfig.byEncoderPort == cOCT6100_CHANNEL_PORT_ROUT ) + /* Select the conversion index according to the port to be used for encoding. */ + /* NOTE: At this point, the configuration can request the encoder to be disabled, thus this */ + /* case must be handled correctly. */ + if ( f_pChannelOpen->CodecConfig.ulEncoderPort == cOCT6100_CHANNEL_PORT_ROUT ) { usEncoderMemIndex = pChanEntry->usRinRoutConversionMemIndex; } - else + else if ( f_pChannelOpen->CodecConfig.ulEncoderPort == cOCT6100_CHANNEL_PORT_SOUT ) { usEncoderMemIndex = pChanEntry->usSinSoutConversionMemIndex; } + else /* if ( f_pChannelOpen->CodecConfig.ulEncoderPort == cOCT6100_NO_DECODING ) */ + { + /* No encoding requested. The conversion memory does not */ + /* have to be modified, it was cleared above. */ + usEncoderMemIndex = cOCT6100_INVALID_INDEX; + } + /* If the decoder must be programmed. */ if ( usDecoderMemIndex != cOCT6100_INVALID_INDEX ) { + /* Program conversion memory according to decoding rate selected by user. */ switch( f_pChannelOpen->CodecConfig.ulDecodingRate ) { case cOCT6100_G711_64KBPS: @@ -5099,6 +5194,9 @@ UINT32 Oct6100ApiModifyChannelStructs( } } + /* Save the new decoder port for future references. */ + pChanEntry->CodecConfig.byDecoderPort = (UINT8)( f_pChannelOpen->CodecConfig.ulDecoderPort & 0xFF ); + /*==============================================================================*/ @@ -5109,7 +5207,6 @@ UINT32 Oct6100ApiModifyChannelStructs( if ( usEncoderMemIndex != cOCT6100_INVALID_INDEX ) { - fModifyAdpcmMem = TRUE; /* Set the chariot memory based on the selected port.*/ @@ -5270,6 +5367,9 @@ UINT32 Oct6100ApiModifyChannelStructs( } } + /* Save the new encoder port for future references. */ + pChanEntry->CodecConfig.byEncoderPort = (UINT8)( f_pChannelOpen->CodecConfig.ulEncoderPort & 0xFF ); + /*==============================================================================*/ } @@ -10933,6 +11033,9 @@ UINT32 Oct6100ApiCheckChannelCreateBiDirParams( /* Check the specific state of the channel.*/ if ( pFirstChanEntry->fRinRoutCodecActive == TRUE && pFirstChanEntry->CodecConfig.byEncoderPort != cOCT6100_CHANNEL_PORT_ROUT) return cOCT6100_ERR_CHANNEL_CODEC_ACTIVATED; + /* Law conversion is not permitted on the Rin-Rout path. */ + if ( pFirstChanEntry->TdmConfig.byRinPcmLaw != pFirstChanEntry->TdmConfig.byRoutPcmLaw ) + return cOCT6100_ERR_CHANNEL_CODEC_ACTIVATED; if ( pFirstChanEntry->fSinSoutCodecActive == TRUE && pFirstChanEntry->CodecConfig.byEncoderPort != cOCT6100_CHANNEL_PORT_SOUT) return cOCT6100_ERR_CHANNEL_CODEC_ACTIVATED; if ( pFirstChanEntry->fBiDirChannel == TRUE ) @@ -10979,6 +11082,10 @@ UINT32 Oct6100ApiCheckChannelCreateBiDirParams( /* Check the specific state of the channel.*/ if ( pSecondChanEntry->fRinRoutCodecActive == TRUE && pSecondChanEntry->CodecConfig.byEncoderPort != cOCT6100_CHANNEL_PORT_ROUT) return cOCT6100_ERR_CHANNEL_CODEC_ACTIVATED; + /* Law conversion is not permitted on the Rin-Rout path. */ + if ( pSecondChanEntry->TdmConfig.byRinPcmLaw != pSecondChanEntry->TdmConfig.byRoutPcmLaw ) + return cOCT6100_ERR_CHANNEL_CODEC_ACTIVATED; + if ( pSecondChanEntry->fSinSoutCodecActive == TRUE && pSecondChanEntry->CodecConfig.byEncoderPort != cOCT6100_CHANNEL_PORT_SOUT) { diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c index 603ddaa..373edc4 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c @@ -2,7 +2,7 @@ File: oct6100_chip_open.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -24,9 +24,9 @@ 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_Release: OCT612xAPI-01.01.01 $ -$Octasic_Revision: 347 $ +$Octasic_Revision: 353 $ \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ @@ -271,6 +271,8 @@ UINT32 Oct6100ChipOpen( UINT32 ulResult; UINT32 ulTempVar; + + /* Check user chip configuration parameters for errors. */ ulResult = Oct6100ApiCheckChipConfiguration( f_pChipOpen ); if ( ulResult != cOCT6100_ERR_OK ) @@ -329,6 +331,8 @@ UINT32 Oct6100ChipOpen( if ( ulResult != cOCT6100_ERR_OK ) return ulResult; + + /* Boot the FC2 PLL. */ ulResult = Oct6100ApiBootFc2Pll( f_pApiInstance ); if ( ulResult != cOCT6100_ERR_OK ) @@ -1191,6 +1195,7 @@ UINT32 Oct6100ApiCheckChipConfiguration( switch ( f_pChipOpen->ulMemClkFreq ) { + case 133000000: ulTempVar = 672; break; @@ -2014,7 +2019,7 @@ UINT32 Oct6100ApiCheckImageFileHeader( pszImageInfoStart = Oct6100ApiStrStr(f_pChipOpen->pbyImageFile,(PUINT8)cOCT6100_IMAGE_START_STRING, f_pChipOpen->pbyImageFile + ulStrLen); if (pszImageInfoStart == NULL) - return cOCT6100_ERR_OPEN_IMAGE_FILE; + return cOCT6100_ERR_OPEN_INVALID_IMAGE_FILE; return cOCT6100_ERR_OK; } @@ -2150,8 +2155,7 @@ UINT32 Oct6100ApiDecodeKeyAndBist( if ( ulResult != cOCT6100_ERR_OK ) return ulResult; - /* Either the firmware image was not loaded correctly (from pointer given by user) */ - /* or the channel capacity pins of the chip do not match what the firmware is expecting. */ + /* The channel capacity pins of the chip do not match what the firmware is expecting. */ if ( ( usReadData & 0x4 ) == 0 ) return cOCT6100_ERR_OPEN_INVALID_FIRMWARE_OR_CAPACITY_PINS; @@ -2474,6 +2478,7 @@ UINT32 Oct6100ApiBootFc2Pll( /* Select register configuration based on the memory frequency. */ switch ( f_pApiInstance->pSharedInfo->ChipConfig.ulMemClkFreq ) { + case 133000000: ulFc2PllDivisor = 0x1050; ulMtDivisor = 0x4300; @@ -4464,7 +4469,14 @@ UINT32 Oct6100ApiProgramNLP( ulLoopCounter++; if ( ulLoopCounter == cOCT6100_MAX_LOOP_CPU_TIMEOUT ) - return cOCT6100_ERR_OPEN_AF_CPU_TIMEOUT; + { + /* Check if we are trying a short BIST, older images do not support this */ + if ( (pSharedInfo->ChipConfig.fEnableProductionBist == TRUE) && + (pSharedInfo->ChipConfig.ulProductionBistMode == cOCT6100_PRODUCTION_BIST_SHORT) ) + return cOCT6100_ERR_NOT_SUPPORTED_PRODUCTION_BIST_SHORT; + else + return cOCT6100_ERR_OPEN_AF_CPU_TIMEOUT; + } } /* Return NLP in operationnal mode. */ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_stats.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_stats.c index fb2df1f..796abc6 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_stats.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_stats.c @@ -2,7 +2,7 @@ File: oct6100_chip_stats.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -22,7 +22,7 @@ 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_Release: OCT612xAPI-01.01.01 $ $Octasic_Revision: 89 $ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_conf_bridge.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_conf_bridge.c index d082889..a3300bb 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_conf_bridge.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_conf_bridge.c @@ -2,7 +2,7 @@ File: oct6100_conf_bridge.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -25,7 +25,7 @@ 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_Release: OCT612xAPI-01.01.01 $ $Octasic_Revision: 146 $ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_debug.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_debug.c index 5fc5e3d..f9cb3ed 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_debug.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_debug.c @@ -2,7 +2,7 @@ File: oct6100_debug.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -22,9 +22,9 @@ 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_Release: OCT612xAPI-01.01.01 $ -$Octasic_Revision: 65 $ +$Octasic_Revision: 66 $ \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ @@ -511,6 +511,8 @@ UINT32 Oct6100DebugGetDataSer( UINT32 ulStreamIndexMax; UINT32 ulTempData; UINT32 ulMask; + UINT32 ulDiff; + UINT32 ulLastTimestamp = 0; BOOL fResetRemainingDataFlag = FALSE; /* Get local pointer(s). */ @@ -712,6 +714,42 @@ UINT32 Oct6100DebugGetDataSer( else pSharedInfo->DebugInfo.usNumEvents++; + /* If this event was valid.. */ + if ( pSharedInfo->DebugInfo.usNumEvents != 0 ) + { + /* The HOT channel timestamp for the event is stored at offset 0x0 (word offset) */ + ReadBurstParams.ulReadAddress = pSharedInfo->DebugInfo.ulMatrixBaseAddress + ulReadPointer; + ReadBurstParams.ulReadLength = 2; + ReadBurstParams.pusReadData = ausWriteData; + + mOCT6100_DRIVER_READ_BURST_API( ReadBurstParams, ulResult ); + if ( ulResult != cOCT6100_ERR_OK ) + return ulResult; + + /* Recreate timestamp at the time of the event. */ + ulTimestamp = ( ausWriteData[ 0 ] << 16 ); + ulTimestamp |= ausWriteData[ 1 ]; + + /* TDM time for 1 event (512 ms) */ + ulTimestamp = ( ulTimestamp >> 12 ); + ulDiff = ulTimestamp - ulLastTimestamp; + + /* Check if difference makes some sense. */ + if ( pSharedInfo->DebugInfo.usNumEvents > 1 ) + { + /* Check if the current timestamp is one less then the previous one. */ + if ( ulDiff != 1 ) + { + pSharedInfo->DebugInfo.usNumEvents = 0; /* If it is not a difference of 1, throw this event. */ + } + ulLastTimestamp = ulTimestamp; + } + else + { + ulLastTimestamp = ulTimestamp; + } + } + /* Increment read pointer to get next event. */ ulReadPointer = ( ulReadPointer + pSharedInfo->DebugInfo.ulDebugChanStatsByteSize ) % ( ( pSharedInfo->DebugInfo.usMatrixCBMask + 1 ) * pSharedInfo->DebugInfo.ulDebugChanStatsByteSize ); } diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_events.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_events.c index 7d52366..a319e66 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_events.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_events.c @@ -2,7 +2,7 @@ File: oct6100_events.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -22,9 +22,9 @@ 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_Release: OCT612xAPI-01.01.01 $ -$Octasic_Revision: 81 $ +$Octasic_Revision: 83 $ \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ @@ -618,34 +618,40 @@ UINT32 Oct6100ApiTransferToneEvents( /* generate the "PRESENT" event and then generate the "STOP" event. */ pSoftEvent->ulEventType = cOCT6100_TONE_PRESENT; - pSoftEvent->ulChannelHandle = cOCT6100_HNDL_TAG_CHANNEL | (pEchoChannel->byEntryOpenCnt << cOCT6100_ENTRY_OPEN_CNT_SHIFT) | usChannelIndex; - pSoftEvent->ulUserChanId = pEchoChannel->ulUserChanId; - pSoftEvent->ulToneDetected = pSharedInfo->ImageInfo.aToneInfo[ ulToneCnt ].ulToneID; - /* We want the timestamp not to be equal to the "STOP" event, so we subtract one to the detector's value. */ - pSoftEvent->ulTimestamp = ( ulBaseTimestamp + ((( ausReadData[ j ] >> 13 ) & 0x7) * cOCT6100_LOCAL_TIMESTAMP_INCREMENT ) ) - 1; - pSoftEvent->ulExtToneDetectionPort = ulExtToneDetectionPort; - - /* Update the control variables of the buffer. */ - pSharedInfo->SoftBufs.ulToneEventBufferWritePtr++; - if ( pSharedInfo->SoftBufs.ulToneEventBufferWritePtr == pSharedInfo->SoftBufs.ulToneEventBufferSize ) - pSharedInfo->SoftBufs.ulToneEventBufferWritePtr = 0; - - /* If enough space for the "STOP" event. */ - if ( ((pSharedInfo->SoftBufs.ulToneEventBufferWritePtr + 1) != pSharedInfo->SoftBufs.ulToneEventBufferReadPtr) && - ((pSharedInfo->SoftBufs.ulToneEventBufferWritePtr + 1) != pSharedInfo->SoftBufs.ulToneEventBufferSize || pSharedInfo->SoftBufs.ulToneEventBufferReadPtr != 0) ) - { - mOCT6100_GET_TONE_EVENT_BUF_PNT( pSharedInfo, pSoftEvent ) - pSoftEvent += pSharedInfo->SoftBufs.ulToneEventBufferWritePtr; - - pSoftEvent->ulEventType = cOCT6100_TONE_STOP; - } - else + + /* Also generate STOP event if this is not a 2100 Hz tone or if the user requested STOP events on 2100 Hz tones */ + if ( ( f2100Tone == FALSE ) || + ( ( f2100Tone == TRUE ) && ( pSharedInfo->ChipConfig.fEnable2100StopEvent == TRUE ) ) ) { - /* Set the overflow flag of the buffer. */ - pSharedInfo->SoftBufs.ulToneEventBufferOverflowCnt++; - - /* We continue in the loop in order to empty the hardware buffer. */ - continue; + pSoftEvent->ulChannelHandle = cOCT6100_HNDL_TAG_CHANNEL | (pEchoChannel->byEntryOpenCnt << cOCT6100_ENTRY_OPEN_CNT_SHIFT) | usChannelIndex; + pSoftEvent->ulUserChanId = pEchoChannel->ulUserChanId; + pSoftEvent->ulToneDetected = pSharedInfo->ImageInfo.aToneInfo[ ulToneCnt ].ulToneID; + /* We want the timestamp not to be equal to the "STOP" event, so we subtract one to the detector's value. */ + pSoftEvent->ulTimestamp = ( ulBaseTimestamp + ((( ausReadData[ j ] >> 13 ) & 0x7) * cOCT6100_LOCAL_TIMESTAMP_INCREMENT ) ) - 1; + pSoftEvent->ulExtToneDetectionPort = ulExtToneDetectionPort; + + /* Update the control variables of the buffer. */ + pSharedInfo->SoftBufs.ulToneEventBufferWritePtr++; + if ( pSharedInfo->SoftBufs.ulToneEventBufferWritePtr == pSharedInfo->SoftBufs.ulToneEventBufferSize ) + pSharedInfo->SoftBufs.ulToneEventBufferWritePtr = 0; + + /* If enough space for the "STOP" event. */ + if ( ((pSharedInfo->SoftBufs.ulToneEventBufferWritePtr + 1) != pSharedInfo->SoftBufs.ulToneEventBufferReadPtr) && + ((pSharedInfo->SoftBufs.ulToneEventBufferWritePtr + 1) != pSharedInfo->SoftBufs.ulToneEventBufferSize || pSharedInfo->SoftBufs.ulToneEventBufferReadPtr != 0) ) + { + mOCT6100_GET_TONE_EVENT_BUF_PNT( pSharedInfo, pSoftEvent ) + pSoftEvent += pSharedInfo->SoftBufs.ulToneEventBufferWritePtr; + + pSoftEvent->ulEventType = cOCT6100_TONE_STOP; + } + else + { + /* Set the overflow flag of the buffer. */ + pSharedInfo->SoftBufs.ulToneEventBufferOverflowCnt++; + + /* We continue in the loop in order to empty the hardware buffer. */ + continue; + } } break; @@ -759,35 +765,42 @@ UINT32 Oct6100ApiTransferToneEvents( /* generate the "PRESENT" event and then generate the "STOP" event. */ pSoftEvent->ulEventType = cOCT6100_TONE_PRESENT; - pSoftEvent->ulChannelHandle = cOCT6100_HNDL_TAG_CHANNEL | (pEchoChannel->byEntryOpenCnt << cOCT6100_ENTRY_OPEN_CNT_SHIFT) | usChannelIndex; - pSoftEvent->ulUserChanId = pEchoChannel->ulUserChanId; - pSoftEvent->ulToneDetected = pSharedInfo->ImageInfo.aToneInfo[ ulToneCnt ].ulToneID; - /* We want the timestamp not to be equal to the "STOP" event, so we subtract one to the detector's value. */ - pSoftEvent->ulTimestamp = ( ulBaseTimestamp + ((( ausReadData[ j ] >> 5 ) & 0x7) * cOCT6100_LOCAL_TIMESTAMP_INCREMENT ) ) - 1; - pSoftEvent->ulExtToneDetectionPort = ulExtToneDetectionPort; - - /* Update the control variables of the buffer. */ - pSharedInfo->SoftBufs.ulToneEventBufferWritePtr++; - if ( pSharedInfo->SoftBufs.ulToneEventBufferWritePtr == pSharedInfo->SoftBufs.ulToneEventBufferSize ) - pSharedInfo->SoftBufs.ulToneEventBufferWritePtr = 0; - - /* If enough space for the "STOP" event. */ - if ( ((pSharedInfo->SoftBufs.ulToneEventBufferWritePtr + 1) != pSharedInfo->SoftBufs.ulToneEventBufferReadPtr) && - ((pSharedInfo->SoftBufs.ulToneEventBufferWritePtr + 1) != pSharedInfo->SoftBufs.ulToneEventBufferSize || pSharedInfo->SoftBufs.ulToneEventBufferReadPtr != 0) ) - { - mOCT6100_GET_TONE_EVENT_BUF_PNT( pSharedInfo, pSoftEvent ) - pSoftEvent += pSharedInfo->SoftBufs.ulToneEventBufferWritePtr; - - pSoftEvent->ulEventType = cOCT6100_TONE_STOP; - } - else + + /* Also generate STOP event if this is not a 2100 Hz tone or if the user requested STOP events on 2100 Hz tones */ + if ( ( f2100Tone == FALSE ) || + ( ( f2100Tone == TRUE ) && ( pSharedInfo->ChipConfig.fEnable2100StopEvent == TRUE ) ) ) { - /* Set the overflow flag of the buffer. */ - pSharedInfo->SoftBufs.ulToneEventBufferOverflowCnt++; - - /* We continue in the loop in order to empty the hardware buffer. */ - continue; - } + pSoftEvent->ulChannelHandle = cOCT6100_HNDL_TAG_CHANNEL | (pEchoChannel->byEntryOpenCnt << cOCT6100_ENTRY_OPEN_CNT_SHIFT) | usChannelIndex; + pSoftEvent->ulUserChanId = pEchoChannel->ulUserChanId; + pSoftEvent->ulToneDetected = pSharedInfo->ImageInfo.aToneInfo[ ulToneCnt ].ulToneID; + /* We want the timestamp not to be equal to the "STOP" event, so we subtract one to the detector's value. */ + pSoftEvent->ulTimestamp = ( ulBaseTimestamp + ((( ausReadData[ j ] >> 5 ) & 0x7) * cOCT6100_LOCAL_TIMESTAMP_INCREMENT ) ) - 1; + pSoftEvent->ulExtToneDetectionPort = ulExtToneDetectionPort; + + /* Update the control variables of the buffer. */ + pSharedInfo->SoftBufs.ulToneEventBufferWritePtr++; + if ( pSharedInfo->SoftBufs.ulToneEventBufferWritePtr == pSharedInfo->SoftBufs.ulToneEventBufferSize ) + pSharedInfo->SoftBufs.ulToneEventBufferWritePtr = 0; + + /* If enough space for the "STOP" event. */ + if ( ((pSharedInfo->SoftBufs.ulToneEventBufferWritePtr + 1) != pSharedInfo->SoftBufs.ulToneEventBufferReadPtr) && + ((pSharedInfo->SoftBufs.ulToneEventBufferWritePtr + 1) != pSharedInfo->SoftBufs.ulToneEventBufferSize || pSharedInfo->SoftBufs.ulToneEventBufferReadPtr != 0) ) + { + mOCT6100_GET_TONE_EVENT_BUF_PNT( pSharedInfo, pSoftEvent ) + pSoftEvent += pSharedInfo->SoftBufs.ulToneEventBufferWritePtr; + + pSoftEvent->ulEventType = cOCT6100_TONE_STOP; + } + else + { + /* Set the overflow flag of the buffer. */ + pSharedInfo->SoftBufs.ulToneEventBufferOverflowCnt++; + + /* We continue in the loop in order to empty the hardware buffer. */ + continue; + } + + } break; case 4: diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_interrupts.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_interrupts.c index 60d7616..3f45fda 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_interrupts.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_interrupts.c @@ -2,7 +2,7 @@ File: oct6100_interrupts.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -23,7 +23,7 @@ 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_Release: OCT612xAPI-01.01.01 $ $Octasic_Revision: 81 $ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_memory.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_memory.c index ccf1612..dbfd0c5 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_memory.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_memory.c @@ -2,7 +2,7 @@ File: oct6100_memory.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -23,7 +23,7 @@ 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_Release: OCT612xAPI-01.01.01 $ $Octasic_Revision: 42 $ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_miscellaneous.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_miscellaneous.c index f082410..a06d638 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_miscellaneous.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_miscellaneous.c @@ -2,7 +2,7 @@ File: oct6100_miscellaneous.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -22,7 +22,7 @@ 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_Release: OCT612xAPI-01.01.01 $ $Octasic_Revision: 35 $ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_mixer.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_mixer.c index 1121b98..e89efd1 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_mixer.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_mixer.c @@ -2,7 +2,7 @@ File: oct6100_mixer.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -23,7 +23,7 @@ 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_Release: OCT612xAPI-01.01.01 $ $Octasic_Revision: 42 $ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_phasing_tsst.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_phasing_tsst.c index 39d94b1..5402d18 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_phasing_tsst.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_phasing_tsst.c @@ -2,7 +2,7 @@ File: oct6100_phasing_tsst.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -22,7 +22,7 @@ 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_Release: OCT612xAPI-01.01.01 $ $Octasic_Revision: 46 $ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_playout_buf.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_playout_buf.c index 01d5ee7..fecf78f 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_playout_buf.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_playout_buf.c @@ -2,7 +2,7 @@ File: oct6100_playout_buf.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -22,7 +22,7 @@ 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_Release: OCT612xAPI-01.01.01 $ $Octasic_Revision: 109 $ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_remote_debug.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_remote_debug.c index 63e1242..dfeed31 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_remote_debug.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_remote_debug.c @@ -2,7 +2,7 @@ File: oct6100_remote_debug.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -22,7 +22,7 @@ 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_Release: OCT612xAPI-01.01.01 $ $Octasic_Revision: 35 $ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tlv.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tlv.c index 6cee0e6..f83d509 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tlv.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tlv.c @@ -2,7 +2,7 @@ File: oct6100_tlv.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -24,7 +24,7 @@ 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_Release: OCT612xAPI-01.01.01 $ $Octasic_Revision: 113 $ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tone_detection.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tone_detection.c index 052e439..649881c 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tone_detection.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tone_detection.c @@ -2,7 +2,7 @@ File: oct6100_tone_detection.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -23,7 +23,7 @@ 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_Release: OCT612xAPI-01.01.01 $ $Octasic_Revision: 51 $ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tsi_cnct.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tsi_cnct.c index 6784282..29272d7 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tsi_cnct.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tsi_cnct.c @@ -2,7 +2,7 @@ File: oct6100_tsi_cnct.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -22,7 +22,7 @@ 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_Release: OCT612xAPI-01.01.01 $ $Octasic_Revision: 38 $ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tsst.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tsst.c index 917af02..8dfd25f 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tsst.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_tsst.c @@ -2,7 +2,7 @@ File: oct6100_tsst.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -23,7 +23,7 @@ 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_Release: OCT612xAPI-01.01.01 $ $Octasic_Revision: 39 $ diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_user.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_user.c index 165cdb9..5435ad4 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_user.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_user.c @@ -2,7 +2,7 @@ File: oct6100_user.c - Copyright (c) 2001-2007 Octasic Inc. + Copyright (c) 2001-2008 Octasic Inc. Description: @@ -22,9 +22,9 @@ 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_Release: OCT612xAPI-01.01.01 $ -$Octasic_Revision: 28 $ +$Octasic_Revision: 29 $ \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ |