]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blobdiff - pasdk/test_dsp/framework/audioStreamInpProcNewIO.c
PASDK-577:Clear already posted Input events on Input re-select
[processor-sdk/performance-audio-sr.git] / pasdk / test_dsp / framework / audioStreamInpProcNewIO.c
index 5460aeefc307996d3dd4d82ae946d7624387b7d2..84d525c83631c5869794344ccac9edb3121db9df 100644 (file)
@@ -109,8 +109,8 @@ extern Void taskAsipFxnInit(const PAF_ASIT_Params *pP,const PAF_ASIT_Patchs *pQ)
 
 // avoid including sap_d10.h, which would cause symbol redefinition
 // warning (MCASP_PFUNC_XXX)
-extern XDAS_Int32 D10_init(void * pD10Params);
-
+//extern XDAS_Int32 D10_init(void * pD10Params);
+extern XDAS_Int32 D10_initClkMux(void *pD10Params);
 extern XDAS_Int32 D10_RxControl(const void *pD10RxParams,
                                 XDAS_Int32 code, XDAS_Int32 arg);
 
@@ -124,7 +124,14 @@ void asitIoPhyPrime(PAF_AST_IoInp *pInpIo);
 void asitPhyTransferComplete(PAF_AST_IoInp * pInpIo);
 void asitPhyTransferStart(PAF_AST_IoInp *pInpIo);
 Int asitRecfgPhyXfer(PAF_AST_IoInp *pInp, size_t xferSize);
-Int asitSelectDevices(const PAF_ASIT_Patchs *pQ, PAF_AST_Config *pAstCfg, PAF_AST_IoInp *pInp);
+
+// Select Input devices
+Int asitSelectDevices(
+    const PAF_ASIT_Patchs *pQ, 
+    PAF_AST_Config *pAstCfg, 
+    PAF_AST_IoInp *pInp
+);
+
 Int asitUpdateInputStatus(const void *pRxParams, PAF_InpBufStatus *pStatus,
                           PAF_InpBufConfig *pInpBuf);
 
@@ -298,6 +305,11 @@ Int inputReadyForProcessing;
                 // Input data is ready - perform source detection.
                 // New state will be decided inside the function
                 asitErr = asitSourceDetection(pP, pQ, pAsitCfg);
+
+                if(asitErr == ASIT_AUTODET_TIME_OUT) {
+                    // Should restart if new interface is selected.
+                    TRACE_VERBOSE0("TaskAsip: auto-detection time out.");
+                }
             }
             else {
                 //Error checking & debug
@@ -508,8 +520,11 @@ Int asitSourceDetection(const PAF_ASIT_Params *pP,
     // Mark input data read complete
     ioDataReadComplete(pInp->hIoData);
 
+    if(autoDetStatus.syncTimeOut) {
+        return ASIT_AUTODET_TIME_OUT;
+    }
     // Check if bitstream or PCM is detected
-    if(   autoDetStatus.syncState == IODATA_SYNC_BITSTREAM
+    else if(   autoDetStatus.syncState == IODATA_SYNC_BITSTREAM
        || autoDetStatus.syncState == IODATA_SYNC_PCM) {
         // Decide input source and inform decoder
         asitErr = asitDecideSource(pAstCfg, pInp, &autoDetStatus);
@@ -550,6 +565,9 @@ Int asitSourceDetection(const PAF_ASIT_Params *pP,
             }
         }
     }
+    else {
+        // SYNC search ongoing, no action is needed
+    }
 
     // Start next transfer
     asitPhyTransferStart(pInp);
@@ -726,8 +744,8 @@ Int asitDecodeProcessing(const PAF_ASIT_Params *pP,
                 pInp->numFrameReceived += 1;    // for debugging
 
                 // Communicate input stream information to decoder through input
-                // buffer configuration
-                asitUpdateInpBufConfig(pAsitCfg->pAstCfg, pInp);
+                // buffer configuration -- this was moved inside decDecodeFsm
+                //asitUpdateInpBufConfig(pAsitCfg->pAstCfg, pInp);
 
                 // Start next transfer
                 asitPhyTransferStart(pInp);
@@ -887,77 +905,80 @@ int asitIoCompsInit(PAF_AST_InpBuf * pInpBuf, PAF_AST_IoInp * pInpIo)
     ioDataParam_t  ioDataCfg;
     ioPhyCtl_t     ioPhyCtl;
 
-    //pInpIo->phyXferSize = INPUT_FRAME_SIZE_DEF;
-    pInpIo->phyXferSize = pInpIo->stride * NUM_CYCLE_PER_FRAME_DEF * WORD_SIZE_BITSTREAM;
-
-    if(pInpIo->firstTimeInit) {
-        TRACE_VERBOSE0("Initialize I/O BUFF and I/O PHY.");
-        ioBuffParams.base         = pInpBuf->inpBufConfig.base.pVoid;
-        ioBuffParams.size         = pInpBuf->inpBufConfig.allocation / STRIDE_WORST_CASE
-                                                                     * STRIDE_WORST_CASE;
-        ioBuffParams.sync         = IOBUFF_WRITE_SYNC;
-        ioBuffParams.nominalDelay = INPUT_FRAME_SIZE_DEF;
-        if(ioBuffInit(pInpIo->hIoBuff, &ioBuffParams) != IOBUFF_NOERR) {
-            return (ASIT_ERR_IOBUFF_INIT);   // to remove magic number
-        }
+    if (pInpIo->hMcaspChan != NULL)
+    {
+        //pInpIo->phyXferSize = INPUT_FRAME_SIZE_DEF;
+        pInpIo->phyXferSize = pInpIo->stride * NUM_CYCLE_PER_FRAME_DEF * WORD_SIZE_BITSTREAM;
+
+        if (pInpIo->firstTimeInit) {
+            TRACE_VERBOSE0("Initialize I/O BUFF and I/O PHY.");
+            ioBuffParams.base         = pInpBuf->inpBufConfig.base.pVoid;
+            ioBuffParams.size         = pInpBuf->inpBufConfig.allocation / STRIDE_WORST_CASE
+                                                                         * STRIDE_WORST_CASE;
+            ioBuffParams.sync         = IOBUFF_WRITE_SYNC;
+            ioBuffParams.nominalDelay = INPUT_FRAME_SIZE_DEF;
+            if (ioBuffInit(pInpIo->hIoBuff, &ioBuffParams) != IOBUFF_NOERR) {
+                return (ASIT_ERR_IOBUFF_INIT);   // to remove magic number
+            }
+
+            ioPhyParams.ioBuffHandle    = pInpIo->hIoBuff;
+            ioPhyParams.xferFrameSize   = pInpIo->phyXferSize;
+            ioPhyParams.mcaspChanHandle = pInpIo->hMcaspChan;
+            ioPhyParams.ioBuffOp        = IOPHY_IOBUFFOP_WRITE;
+            if (ioPhyInit(pInpIo->hIoPhy, &ioPhyParams) != IOPHY_NOERR) {
+                return (ASIT_ERR_IOPHY_INIT);   // to remove magic number
+            }
 
-        ioPhyParams.ioBuffHandle    = pInpIo->hIoBuff;
-        ioPhyParams.xferFrameSize   = pInpIo->phyXferSize;
-        ioPhyParams.mcaspChanHandle = pInpIo->hMcaspChan;
-        ioPhyParams.ioBuffOp        = IOPHY_IOBUFFOP_WRITE;
-        if(ioPhyInit(pInpIo->hIoPhy, &ioPhyParams) != IOPHY_NOERR) {
-            return (ASIT_ERR_IOPYH_INIT);   // to remove magic number
+            pInpIo->numPrimeXfers = NUM_PRIME_XFERS;
         }
 
-        pInpIo->numPrimeXfers = NUM_PRIME_XFERS;
-    }
+        /* Reinitialize I/O DATA every time when ASIT restarts */
+        TRACE_VERBOSE0("Initialize I/O DATA.");
+        ioDataCfg.ioBuffHandle         = pInpIo->hIoBuff;
+        ioDataCfg.unknownSourceTimeOut = pInpBuf->inpBufConfig.pBufStatus->unknownTimeout;
+        ioDataCfg.frameLengthsIEC      = (uint_least16_t *)&iecFrameLength[0];
+        ioDataCfg.frameLengthPCM       = pInpIo->stride * NUM_CYCLE_PER_FRAME_DEF;
+        ioDataCfg.frameLengthDef       = pInpIo->stride * NUM_CYCLE_PER_FRAME_DEF;
+        ioDataCfg.ibMode               = pInpBuf->inpBufConfig.pBufStatus->mode;
+        ioDataCfg.zeroRunRestart       = pInpBuf->inpBufConfig.pBufStatus->zeroRunRestart;
+        ioDataCfg.zeroRunTrigger       = pInpBuf->inpBufConfig.pBufStatus->zeroRunTrigger;
+
+        if (ioDataInit(pInpIo->hIoData, &ioDataCfg) != IODATA_NO_ERR) {
+            return (ASIT_ERR_IODATA_INIT);   // to remove magic number
+        }
 
-    /* Reinitialize I/O DATA every time when ASIT restarts */
-    TRACE_VERBOSE0("Initialize I/O DATA.");
-    ioDataCfg.ioBuffHandle         = pInpIo->hIoBuff;
-    ioDataCfg.unknownSourceTimeOut = pInpBuf->inpBufConfig.pBufStatus->unknownTimeout;
-    ioDataCfg.frameLengthsIEC      = (uint_least16_t *)&iecFrameLength[0];
-    ioDataCfg.frameLengthPCM       = INPUT_FRAME_SIZE_PCM / WORD_SIZE_PCM;
-    ioDataCfg.frameLengthDef       = INPUT_FRAME_SIZE_DEF / WORD_SIZE_BITSTREAM;
-    ioDataCfg.ibMode               = pInpBuf->inpBufConfig.pBufStatus->mode;
-    ioDataCfg.zeroRunRestart       = pInpBuf->inpBufConfig.pBufStatus->zeroRunRestart;
-    ioDataCfg.zeroRunTrigger       = pInpBuf->inpBufConfig.pBufStatus->zeroRunTrigger;
-
-    if(ioDataInit(pInpIo->hIoData, &ioDataCfg) != IODATA_NO_ERR) {
-        return (ASIT_ERR_IODATA_INIT);   // to remove magic number
-    }
+        if (pInpIo->firstTimeInit) {
+            /* Initialize I/O BUFF and I/O PHY only when input interface changes. */
+            TRACE_VERBOSE0("Prime I/O PHY.");
 
-    if(pInpIo->firstTimeInit) {
-        /* Initialize I/O BUFF and I/O PHY only when input interface changes. */
-        TRACE_VERBOSE0("Prime I/O PHY.");
+            // Start I/O physical layer by priming McASP LLD for input
+            asitIoPhyPrime(pInpIo);
 
-        // Start I/O physical layer by priming McASP LLD for input
-        asitIoPhyPrime(pInpIo);
+            pInpIo->firstTimeInit = FALSE;
+        }
+        else {
+            // Reconfigure I/O PHY transfer size
+            ioPhyCtl.code = IOPHY_CTL_FRAME_SIZE;
+            ioPhyCtl.params.xferFrameSize = pInpIo->phyXferSize;
+            ioPhyControl(pInpIo->hIoPhy, &ioPhyCtl);
+    #if 0
+            // If previous stream before reset was PCM, reconfigure McASP LLD to receive 16-bit packed bits
+            if (!pInpIo->swapData) {
+                Int mcaspErr;
+                mcaspErr = mcaspRecfgWordWidth(pInpIo->hMcaspChan, Mcasp_WordLength_16);
+                if(mcaspErr != Aud_EOK) {
+                    return ASIT_ERR_MCASP_CFG;
+                }
 
-        pInpIo->firstTimeInit = FALSE;
-    }
-    else {
-        // Reconfigure I/O PHY transfer size
-        ioPhyCtl.code = IOPHY_CTL_FRAME_SIZE;
-        ioPhyCtl.params.xferFrameSize = pInpIo->phyXferSize;
-        ioPhyControl(pInpIo->hIoPhy, &ioPhyCtl);
-#if 0
-        // If previous stream before reset was PCM, reconfigure McASP LLD to receive 16-bit packed bits
-        if(!pInpIo->swapData) {
-            Int mcaspErr;
-            mcaspErr = mcaspRecfgWordWidth(pInpIo->hMcaspChan, Mcasp_WordLength_16);
-            if(mcaspErr != Aud_EOK) {
-                return ASIT_ERR_MCASP_CFG;
+                // Start swapping data
+                pInpIo->swapData = TRUE;
+                TRACE_VERBOSE0("Reconfigure McASP word length and start swapping data.");
             }
-
-            // Start swapping data
-            pInpIo->swapData = TRUE;
-            TRACE_VERBOSE0("Reconfigure McASP word length and start swapping data.");
+    #endif
+            // Start PHY transfer
+            TRACE_VERBOSE0("Start I/O PHY transfer.");
+            asitPhyTransferStart(pInpIo);
         }
-#endif
-        // Start PHY transfer
-        TRACE_VERBOSE0("Start I/O PHY transfer.");
-        asitPhyTransferStart(pInpIo);
     }
 
     return 0;
@@ -1098,77 +1119,177 @@ void asitPhyTransferStart(PAF_AST_IoInp *pInpIo)
     }
 }
 
+// Indicates whether Input has been selected
 Int d10Initialized = 0;
+
 //extern Aud_STATUS mcaspAudioConfig(void);
-extern void McaspDevice_init(void);
+//extern void McaspDevice_init(void);
 
 /*======================================================================================
  *  This function initializes HW interface and selects the right device for input
  *====================================================================================*/
-Int asitSelectDevices(const PAF_ASIT_Patchs *pQ, PAF_AST_Config *pAstCfg, PAF_AST_IoInp *pInp)
+Int asitSelectDevices(
+    const PAF_ASIT_Patchs *pQ, 
+    PAF_AST_Config *pAstCfg, 
+    PAF_AST_IoInp *pInp
+)
 {
     Aud_STATUS status;
-    mcaspLLDconfig *lldCfg;
+    const PAF_SIO_Params *pInPrms;
+    mcaspLLDconfig *pLldCfg;
+    mcaspLLDconfig *pReqLldCfg;
     Ptr mcaspChanHandle;
-    Int zMD, interface;
+    Int zMD;
+    Int interface;
+    const PAF_SIO_Params *pD10Params;
+    UInt postedEvents;
 
     zMD = pAstCfg->masterDec;
-
+    
     interface = pAstCfg->xInp[zMD].inpBufStatus.sioSelect; // obtain SIO select for input
+    
+    if (interface >= 0)
+    {
+        // Positive value for interface: new Input SIO update request has been received via alpha command.
+        // Negative value for interface: no new Input SIO update request has been received,
+        //                               previous requests have been processed.
+        
+        // check for valid index into device array
+        if (interface >= pQ->devinp->n)    // DEVINP_N
+        {
+            interface = 0; // treat as device InNone
+        }
+        
+        //
+        // Deactivate currently active interface
+        //
+        if (pInp->hMcaspChan != NULL)   // non-NULL McASP LLD channel handle indicates there's an active interface
+        {
+            d10Initialized = 0; // indicate no Input selected
+            
+            // check McASP LLD control API
+            mcaspControlChan(pInp->hMcaspChan, MCASP_CHAN_RESET, NULL);   // Rx reset channel
+            //mcaspControlChan(pInp->hMcaspChan, MCASP_DEVICE_RESET, NULL); // Reset Tx/Rx channel
+            
+            // Delete McASP LLD channel
+            status = mcaspDeleteChan(pInp->hMcaspChan);
+            if (status != Aud_EOK)
+            {
+                Log_info0("asitSelectDevices(): McASP channel deletion failed!\n");
+                return ASIP_ERR_MCASP_CFG;
+            }
+            
+            // Clear (drop) already posted Input data events
+            postedEvents = Event_getPostedEvents(gAsitEvtHandle);
+            while ((postedEvents & ASIT_EVTMSK_INPDATA) != 0)
+            {
+                Event_pend(gAsitEvtHandle, ASIT_EVTMSK_NONE, ASIT_EVTMSK_INPDATA, 0);
+                postedEvents = Event_getPostedEvents(gAsitEvtHandle);
+            }
 
-    if (interface <= 0) {
-        pInp->pRxParams = NULL;
-
-        return ASIT_NO_ERR;
-    }
-
-    // Initialize D10
-    if(!d10Initialized) {
-        void * pD10Params = (void *)pQ->devinp->x[interface];
-
-        /* Initialize McASP HW details */
-        McaspDevice_init();
-
-        D10_init(pD10Params);
-
-        d10Initialized = 1;
-    }
-
-    /* Get the McASP LLD channel for this interface. Create one if not yet created. */
-    lldCfg = (mcaspLLDconfig *)pQ->devinp->x[interface]->sio.pConfig;
-    if(lldCfg->hMcaspChan == NULL) {
-        mcaspChanHandle = NULL;
-        status = mcasplldChanCreate(lldCfg, &mcaspChanHandle);
-        if(status != Aud_EOK) {
-            Log_info0("McASP channel creation failed!\n");
-            return ASIT_ERR_MCASP_CFG;
+            pInp->hMcaspChan = NULL;        // reset active McASP LLD handle
+            if (pInp->pRxParams != NULL)    // sanity check, pInp->pRxParams should be non NULL if pInp->hMcaspChan is non NULL
+            {
+                pInPrms = (const PAF_SIO_Params *)pInp->pRxParams;
+                pLldCfg = (mcaspLLDconfig *)pInPrms->sio.pConfig; // get pointer to active McASP LLD configuration
+                pLldCfg->hMcaspChan = NULL; // reset McASP LLD handle for active McASP LLD configuration
+                pInp->pRxParams = NULL;     // reset pointer to active D10 parameters
+            }
+            else 
+            {
+                // This is a programming error
+                SW_BREAKPOINT;  // debug
+            }
         }
 
-        lldCfg->hMcaspChan = mcaspChanHandle;
-    }
-    else {
-        /* Configure McASP to receive 16/32-bit data according to default configuration */
-        status = mcaspRecfgWordWidth(pInp->hMcaspChan, lldCfg->mcaspChanParams->wordWidth);
-        if(status != Audk2g_EOK) {
-            return ASIT_ERR_MCASP_CFG;
+        //
+        // Activate requested interface
+        //
+        pD10Params = (const PAF_SIO_Params *)pQ->devinp->x[interface];  // get D10 parameters for selected interface
+        if (pD10Params != NULL)
+        {
+            //
+            // Requested device is other than InNone
+            //
+            
+            // Initialize Tx clock mux
+            D10_initClkMux((void *)pD10Params);
+                
+            pReqLldCfg = (mcaspLLDconfig *)pD10Params->sio.pConfig;
+            if (pReqLldCfg->hMcaspChan == NULL)
+            {
+                // Create McASP LLD channel
+                mcaspChanHandle = NULL;
+                status = mcasplldChanCreate(pReqLldCfg, &mcaspChanHandle);
+                if (status != Aud_EOK) 
+                {
+                    Log_info0("asitSelectDevices(): McASP channel creation failed!\n");
+                    return ASIP_ERR_MCASP_CFG;
+                }
+                
+                pReqLldCfg->hMcaspChan = mcaspChanHandle;   // set McASP LLD handle for requested McASP LLD configuration
+                pInp->pRxParams = (const void *)pD10Params; // set pointer to active D10 parameters
+                pInp->hMcaspChan = pReqLldCfg->hMcaspChan;  // set active McASP LLD handle
+                
+                // configure stride according to selected McASP LLD configuration
+                pInp->stride = pReqLldCfg->mcaspChanParams->noOfSerRequested * 
+                    pReqLldCfg->mcaspChanParams->noOfChannels;
+                
+                pInp->firstTimeInit = TRUE; // set flag for IO Phy & Buff initialization
+                
+                d10Initialized = 1; // indicate Input selected
+            }
+        }
+        else
+        {
+            //
+            // Requested device is InNone
+            //
+            pInp->hMcaspChan = NULL;    // reset active McASP LLD handle
+            pInp->pRxParams = NULL;     // reset pointer to active D10 parameters
         }
+        
+        // indicate SIO update request processed
+        pAstCfg->xInp[zMD].inpBufStatus.sioSelect = interface | 0x80;
     }
 
-    pInp->pRxParams = pQ->devinp->x[interface];
-    pInp->hMcaspChan = lldCfg->hMcaspChan;
-    pInp->stride     = lldCfg->mcaspChanParams->noOfSerRequested * 2;  // 2 for stereo
+    if (pInp->hMcaspChan != NULL)       // non NULL indicates there's an active interface
+    {
+        if (pInp->pRxParams != NULL)    // sanity check, this should be non NULL if pInp->hMcaspChan is non NULL
+        {
+            pInPrms = (const PAF_SIO_Params *)pInp->pRxParams;
+            pLldCfg = (mcaspLLDconfig *)pInPrms->sio.pConfig;   // get currently active McASP LLD configuration
+            if (pLldCfg != NULL)        // sanity check, this should be non NULL if pInp->hMcaspChan is non NULL
+            {
+                // Configure McASP to receive 16/32-bit data according to default configuration
+                mcaspRecfgWordWidth(pInp->hMcaspChan, pLldCfg->mcaspChanParams->wordWidth);
+                
+                // Set flag to swap HDMI data if it is 4xI2S and word length is 16
+                if ((pLldCfg->mcaspChanParams->wordWidth == Mcasp_WordLength_16) &&
+                    (pLldCfg->mcaspChanParams->noOfSerRequested == 4)) 
+                {
+                    pInp->swapData = TRUE;
+                }
+                else 
+                {
+                    pInp->swapData = FALSE;
+                }
+            }
+            else
+            {
+                // This is a programming error
+                SW_BREAKPOINT;  // debug
+            }
 
-    /* Set flag to swap HDMI data if it is 4xI2S and word length is 16 */
-    if(   (lldCfg->mcaspChanParams->wordWidth == Mcasp_WordLength_16)
-        &&(lldCfg->mcaspChanParams->noOfSerRequested == 4)
-      ) {
-        pInp->swapData = TRUE;
-    }
-    else {
-        pInp->swapData = FALSE;
+        }
+        else
+        {
+            // This is a programming error
+            SW_BREAKPOINT;  // debug
+        }
     }
-
-    return ASIT_NO_ERR;
+    
+    return ASIP_NO_ERR;
 }  /* asitSelectDevices */
 
 /*======================================================================================
@@ -1523,7 +1644,7 @@ Int asitUpdateIoComps(const PAF_ASIT_Params *pP, PAF_AST_Config *pAstCfg,
     return ASIT_NO_ERR;
 } /* asitUpdateIoComps */
 
-
+#if 0
 #ifndef IO_LOOPBACK_TEST
 #if OUTPUT_FRAME_LENGTH == INPUT_FRAME_LENGTH
 U8 pcmbuf[OUTPUT_FRAME_SIZE];
@@ -1575,6 +1696,8 @@ Int rxDecodePlayZero(PAF_AST_IoInp  *pInp)
 }
 #endif
 
+#endif
+
 Int asitEvtErrCheck(UInt actualEvents, UInt expectedEvents)
 {
     TRACE_VERBOSE2("ASIT events error: actual events are: %d, expected events are: %d.",
@@ -1591,6 +1714,12 @@ void asitErrorHandling(PAF_ASIT_Config *pAsitCfg, Int asitErr)
         TRACE_VERBOSE0("ASIT error handling: input buffer underflows. No actions needed.");
     }
 
+    if(asitErr == ASIT_AUTODET_TIME_OUT) {
+        pAsitCfg->pIoInp[0].asipState = ASIT_RESET;
+        pAsitCfg->pIoInp[0].numAsitRestart++;
+        TRACE_VERBOSE1("ASIT error %d handling finished. Go to state ASIT_RESET.", asitErr);
+    }
+    
     if(asitErr == ASIT_ERR_DECODE_QUIT) {
         TRACE_VERBOSE0("ASIT error handling: DECODE_QUIT - clear INPDATA event.");
 #if 0
@@ -1606,13 +1735,13 @@ void asitErrorHandling(PAF_ASIT_Config *pAsitCfg, Int asitErr)
 #endif
         pAsitCfg->pIoInp[0].asipState = ASIT_RESET;
         pAsitCfg->pIoInp[0].numAsitRestart++;
-        TRACE_VERBOSE0("ASIT error handling finished. Go to state ASIT_RESET.");
+        TRACE_VERBOSE1("ASIT error %d handling finished. Go to state ASIT_RESET.", asitErr);
     }
 
     if(asitErr == ASIT_ERR_EVENTS) {
         pAsitCfg->pIoInp[0].asipState = ASIT_RESET;
         pAsitCfg->pIoInp[0].numAsitRestart++;
-        TRACE_VERBOSE0("ASIT error handling: events error. Go to state ASIT_RESET.");
+        TRACE_VERBOSE1("ASIT error %d handling: events error. Go to state ASIT_RESET.", asitErr);
     }
 
     return;