summaryrefslogtreecommitdiff
path: root/software/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'software/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.c')
-rw-r--r--software/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.c32
1 files changed, 29 insertions, 3 deletions
diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.c
index 53bbd67..959992a 100644
--- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.c
+++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.c
@@ -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-PR40 $
+$Octasic_Release: OCT612xAPI-01.00-PR41 $
-$Octasic_Revision: 464 $
+$Octasic_Revision: 466 $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
@@ -64,6 +64,7 @@ $Octasic_Revision: 464 $
#include "oct6100api/oct6100_conf_bridge_pub.h"
#include "oct6100api/oct6100_tone_detection_pub.h"
#include "oct6100api/oct6100_channel_pub.h"
+#include "oct6100api/oct6100_debug_pub.h"
#include "oct6100_chip_open_priv.h"
#include "oct6100_miscellaneous_priv.h"
@@ -76,6 +77,7 @@ $Octasic_Revision: 464 $
#include "oct6100_conf_bridge_priv.h"
#include "oct6100_tone_detection_priv.h"
#include "oct6100_channel_priv.h"
+#include "oct6100_debug_priv.h"
/**************************** PUBLIC FUNCTIONS ****************************/
@@ -2874,6 +2876,24 @@ UINT32 Oct6100ApiInvalidateChannelStructs(
SmearParams.pProcessContext = f_pApiInstance->pProcessContext;
SmearParams.ulUserChipId = pSharedInfo->ChipConfig.ulUserChipId;
+
+ /* If this channel is currently debugged, automatically close the debug channel. */
+ if ( ( pSharedInfo->ChipConfig.fEnableChannelRecording == TRUE )
+ && ( pSharedInfo->DebugInfo.usCurrentDebugChanIndex == f_usChanIndex ) )
+ {
+ tOCT6100_DEBUG_SELECT_CHANNEL SelectDebugChan;
+
+ /* Ensure forward compatibility. */
+ Oct6100DebugSelectChannelDef( &SelectDebugChan );
+
+ /* Set the hot channel to an invalid handle to disable recording. */
+ SelectDebugChan.ulChannelHndl = cOCT6100_INVALID_HANDLE;
+
+ /* Call the serialized fonction. */
+ ulResult = Oct6100DebugSelectChannelSer( f_pApiInstance, &SelectDebugChan, FALSE );
+ if ( ulResult != cOCT6100_ERR_OK )
+ return ulResult;
+ }
/* Deactivate the TSST control memory if used. */
@@ -10902,8 +10922,14 @@ UINT32 Oct6100ApiCheckChannelCreateBiDirParams(
return cOCT6100_ERR_CHANNEL_BIDIR_SECOND_CHANNEL_HANDLE;
/* Check the specific state of the channel.*/
- if ( pSecondChanEntry->fRinRoutCodecActive == TRUE || pSecondChanEntry->fSinSoutCodecActive == TRUE )
+ if ( pSecondChanEntry->fRinRoutCodecActive == TRUE )
return cOCT6100_ERR_CHANNEL_CODEC_ACTIVATED;
+ if ( pSecondChanEntry->fSinSoutCodecActive == TRUE )
+ {
+
+ return cOCT6100_ERR_CHANNEL_CODEC_ACTIVATED;
+ }
+
if ( pSecondChanEntry->fBiDirChannel == TRUE )
return cOCT6100_ERR_CHANNEL_ALREADY_BIDIR;