From 9e764fa01379cc515831e4353eade0b1cf53c8bf Mon Sep 17 00:00:00 2001 From: Octasic Inc Date: Fri, 16 Jul 2010 16:25:26 +0300 Subject: importing OCT612x-01.04.01 --- .../oct6100api/oct6100_api/oct6100_debug.c | 35 +++++++++++++++------- 1 file changed, 25 insertions(+), 10 deletions(-) (limited to 'software/octdeviceapi/oct6100api/oct6100_api/oct6100_debug.c') diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_debug.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_debug.c index 8857c8e..dc32a82 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_debug.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_debug.c @@ -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.03.05 $ +$Octasic_Release: OCT612xAPI-01.04.01 $ -$Octasic_Revision: 81 $ +$Octasic_Revision: 82 $ \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ @@ -243,8 +243,9 @@ UINT32 Oct6100DebugSelectChannelSer( BurstParams.pusWriteData = ausWriteData; /* First release the resources reserved for the channel that was previously debugged. */ - if ( pSharedInfo->DebugInfo.usCurrentDebugChanIndex != cOCT6100_INVALID_INDEX && - pSharedInfo->ChipConfig.fEnableChannelRecording == TRUE ) + if ( ( pSharedInfo->DebugInfo.usCurrentDebugChanIndex != cOCT6100_INVALID_INDEX ) + && ( ( pSharedInfo->ChipConfig.fEnableChannelRecording == TRUE ) + || ( pSharedInfo->ChipConfig.fAllowDynamicRecording == TRUE ) ) ) { /*=======================================================================*/ /* Get a pointer to the channel's list entry. */ @@ -313,7 +314,10 @@ UINT32 Oct6100DebugSelectChannelSer( if ( f_fCheckChannelRecording == TRUE ) { - if ( pSharedInfo->ChipConfig.fEnableChannelRecording == FALSE ) + if ( ( ( pSharedInfo->ChipConfig.fEnableChannelRecording == FALSE ) + && ( pSharedInfo->ChipConfig.fAllowDynamicRecording == FALSE ) ) + || ( ( pSharedInfo->ChipConfig.fAllowDynamicRecording == TRUE ) + && ( pSharedInfo->DebugInfo.fRecordChanUp == FALSE ) ) ) return cOCT6100_ERR_DEBUG_CHANNEL_RECORDING_DISABLED; } @@ -335,7 +339,8 @@ UINT32 Oct6100DebugSelectChannelSer( /* First program the mixer entry if the user wants to record. */ /* Check if the API needs to reserve an extra TSI memory to load the SIN signal. */ - if ( pSharedInfo->ChipConfig.fEnableChannelRecording == TRUE ) + if ( ( pSharedInfo->ChipConfig.fEnableChannelRecording == TRUE ) + || ( pSharedInfo->ChipConfig.fAllowDynamicRecording == TRUE ) ) { /* Reserve the extra Sin TSI memory if it was not already reserved. */ if ( pChanEntry->usExtraSinTsiMemIndex == cOCT6100_INVALID_INDEX ) @@ -397,7 +402,8 @@ UINT32 Oct6100DebugSelectChannelSer( } /* Set law of newly selected hot channel. */ - if ( ( pSharedInfo->ChipConfig.fEnableChannelRecording == TRUE ) + if ( ( ( pSharedInfo->ChipConfig.fEnableChannelRecording == TRUE ) + || ( pSharedInfo->ChipConfig.fAllowDynamicRecording == TRUE ) ) && ( f_pSelectDebugChan->ulChannelHndl != cOCT6100_INVALID_HANDLE ) && ( pChanEntry != NULL ) ) { @@ -430,7 +436,10 @@ UINT32 Oct6100DebugSelectChannelSer( return ulResult; } - ausWriteData[ 0 ] = 0x0; + if ( usChanIndex == cOCT6100_INVALID_INDEX ) + ausWriteData[ 0 ] = 0xFFFF; + else + ausWriteData[ 0 ] = 0x0; ausWriteData[ 1 ] = (UINT16)(( usChanIndex >> 0) & 0xFFFF); /* Write the channel number into the Matrix hot channel field.*/ @@ -452,7 +461,10 @@ UINT32 Oct6100DebugSelectChannelSer( if ( f_fCheckChannelRecording == FALSE ) { /* If the user has not activated recording, let the remote client know. */ - if ( pSharedInfo->ChipConfig.fEnableChannelRecording == FALSE ) + if ( ( ( pSharedInfo->ChipConfig.fEnableChannelRecording == FALSE ) + && ( pSharedInfo->ChipConfig.fAllowDynamicRecording == FALSE ) ) + || ( ( pSharedInfo->ChipConfig.fAllowDynamicRecording == TRUE ) + && ( pSharedInfo->DebugInfo.fRecordChanUp == FALSE ) ) ) return cOCT6100_ERR_DEBUG_RC_CHANNEL_RECORDING_DISABLED; } @@ -536,7 +548,10 @@ UINT32 Oct6100DebugGetDataSer( /* Check all user parameters. */ /* Check if channel recording is enabled. */ - if ( pSharedInfo->ChipConfig.fEnableChannelRecording == FALSE ) + if ( ( ( pSharedInfo->ChipConfig.fEnableChannelRecording == FALSE ) + && ( pSharedInfo->ChipConfig.fAllowDynamicRecording == FALSE ) ) + || ( ( pSharedInfo->ChipConfig.fAllowDynamicRecording == TRUE ) + && ( pSharedInfo->DebugInfo.fRecordChanUp == FALSE ) ) ) return cOCT6100_ERR_DEBUG_CHANNEL_RECORDING_DISABLED; /* Check if a current debugging channel has been selected. */ -- cgit v1.2.3