]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blobdiff - pasdk/test_dsp/framework/audioStreamInpProc.c
PASDK-514: Moved CB status to Non-cached memory.
[processor-sdk/performance-audio-sr.git] / pasdk / test_dsp / framework / audioStreamInpProc.c
index 19c7eba584272a9b79380322e911fb77ce85b8bb..f03d8907e13ccfbe0f79c216463bf97584c2f3d5 100644 (file)
@@ -56,6 +56,8 @@ All rights reserved.
 #include <sio.h>
 #include <pafsio_ialg.h>
 
+#include "ioConfig.h"
+
 #include "common.h"
 #include "paf_heapMgr.h"
 #include "aspMsg_common.h"
@@ -69,15 +71,11 @@ All rights reserved.
 
 #include "pfp/pfp.h"
 #include "pfp_app.h"        /* contains all PFP ID's */
-#include "ioConfig.h"
-
 Int32 gNumPfpAsit1=0; // debug
 Int32 gNumPfpAsit2=0;
 
-
-
-// FL: debug
-#include "dbgCapAf.h"
+// debug
+//#include "dbgCapAf.h"
 
 
 // -----------------------------------------------------------------------------
@@ -304,7 +302,6 @@ extern UInt32 gAspProfileEnable;
 //
 
 //#define DEC_Handle PCM_Handle /* works for all: SNG, PCM, AC3, DTS, AAC */
-//#define ENC_Handle PCE_Handle /* works for all: PCE */
 
 #define __TASK_NAME__  "TaskAsip"
 
@@ -314,17 +311,13 @@ extern UInt32 gAspProfileEnable;
 //
 
 #define ASIP_FRAMELEN_SS_DEFAULT    ( 256 )
-// FL: pP->frameLength
-//#define ASIP_FRAMELEN_SS_PCM        ( FRAMELENGTH )
-// FL: (***) hard-coded
-#define ASIP_FRAMELEN_SS_DDP_AC3    ( 1536 )
-// FL: (***) hard-coded
-#define ASIP_FRAMELEN_SS_THD        ( 1536 )        
-
+#define ASIP_FRAMELEN_SS_PCM        ( FRAMELENGTH ) // pP->frameLength
+#define ASIP_FRAMELEN_SS_DDP_AC3    ( 1536 )        // hard-coded
+#define ASIP_FRAMELEN_SS_THD        ( 1536 )        // hard-coded
 #define ASIP_FRAMELEN_SS_DTS        ( 512 )         
 
 // Compute decoder frame length based on selected source
-static Int getFrameLengthSourceSel(
+Int getFrameLengthSourceSel(
     const PAF_ASIT_Params *pP, 
     Int8 sourceSelect
 );
@@ -332,15 +325,25 @@ static Int getFrameLengthSourceSel(
 LINNO_DEFN(TaskAsip); /* Line number macros */
 ERRNO_DEFN(TaskAsip); /* Error number macros */
 
+// ASIT ASP messaging
+AspMsgMaster_Module gAsitAspMsgMaster;  // ASIT message master
+
 // ASIT configuration
 #pragma DATA_SECTION(gPAF_ASIT_config, ".globalSectionPafAsitConfig")
 PAF_ASIT_Config gPAF_ASIT_config = {
     NULL,               // taskHandle
     NULL,               // acp
+    &gAsitAspMsgMaster, // hAspMsgMaster
     &gPAF_ASPM_config,  // pAspmCfg, shared ASIT/ASOT configuration
-    &gPAF_AST_config    // pAstCfg, shared ASIT/ASOT/ASDT configuration
+    &gPAF_AST_config,   // pAstCfg, shared ASIT/ASOT/ASDT configuration
+    NULL,               // pIoInp, ASIT IO configuration
+    0                   // inpDec, ASIT state
 };
 
+// For writeDECCommandRestart
+volatile UInt32 gCommandOutputTask_SYNC   =0;
+volatile UInt32 gCommandOutputTask_ACK    =0;
+
 // Global debug counters */
 UInt32 gAsipRxSioReclaimCnt     =0;
 UInt32 gAsipInitCnt             =0;
@@ -359,10 +362,6 @@ UInt32 gCapIbReset_cnt          =0;
 UInt32 gCapIb_cnt               =0;
 UInt32 gCbWrtAfErrCnt           =0; // decoder output circular buffer write error count (returned from ARM to DSP)
                                    
-// For writeDECCommandRestart
-volatile UInt32 gCommandOutputTask_SYNC   =0;
-volatile UInt32 gCommandOutputTask_ACK    =0;
-
 #include "dbgDib.h" // debug
 
 extern struct {
@@ -370,8 +369,8 @@ extern struct {
     IALG_Status *pStatus[512];
 } IACP_STD_BETA_TABLE;
 
-// FL: debug
-#include "evmc66x_gpio_dbg.h"
+// debug
+//#include "evmc66x_gpio_dbg.h"
 
 /*
  *  ======== taskAsipFxnInit ========
@@ -382,15 +381,15 @@ Void taskAsipFxnInit(
     const PAF_ASIT_Patchs *pQ
 )
 {
-    PAF_ASIT_Config *pAsitCfg;      /* ASIT configuration pointer */
-    PAF_AST_Config *pAstCfg;        /* AST Common (shared) configuration pointer */
-    Int as;                         /* Audio Stream Number (1, 2, etc.) */
-    Int z;                          /* input/encode/stream/decode/output counter */
-    Int i;                          /* phase */
+    PAF_ASIT_Config *pAsitCfg;          // ASIT configuration pointer
+    PAF_AST_Config *pAstCfg;            // AST Common (shared) configuration pointer
+    PAF_AST_IoInp *pInp;            /* Input I/O components */
+    AspMsgMaster_Handle hAspMsgMaster;  // ASIT message master handle    
+    Int as;                             // Audio Stream Number (1, 2, etc.)
+    Int z;                              // input/encode/stream/decode/output counter
+    Int i;                              // phase
     Int zMI, zMS, zX;
     Int size;
-    // Messaging
-    ASP_Msg *pAspMsg;
     Int status;
 
     Log_info0("Enter taskAsipFxnInit()");
@@ -415,9 +414,10 @@ Void taskAsipFxnInit(
     //
     // Audio Stream Input Task Configuration (*pAsitCfg):
     //
-    pAsitCfg = &gPAF_ASIT_config;       // initialize pointer to task configuration
-    pAsitCfg->taskHandle = Task_self(); // set task handle
-    pAstCfg = pAsitCfg->pAstCfg;        // get pointer to AST common (shared) configuration
+    pAsitCfg = &gPAF_ASIT_config;               // initialize pointer to task configuration
+    pAsitCfg->taskHandle = Task_self();         // set task handle
+    pAstCfg = pAsitCfg->pAstCfg;                // get pointer to AST common (shared) configuration
+    hAspMsgMaster = pAsitCfg->hAspMsgMaster;    // get message master handle
 
     /* Set Audio Stream Number (1, 2, etc.) */
     as = gBetaPrimeValue + 1;
@@ -493,55 +493,35 @@ Void taskAsipFxnInit(
             HEAP_INTERNAL1_SHM, HEAP_EXTERNAL_SHM, HEAP_EXTERNAL_NONCACHED_SHM);
     }
 
-    // (***) FL: revisit
     // write back AST shared configuration
     Cache_wb(pAstCfg, sizeof(PAF_AST_Config), Cache_Type_ALLD, 0);
     Cache_wait();
 
-    // (***) FL: revisit
     // write back Dec configuration
     Cache_wb(&pAstCfg->xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
     Cache_wait();
 
-    // (***) FL: revisit
     // write back entire beta table
     Cache_wb((Ptr)(&IACP_STD_BETA_TABLE.pStatus[0]), 512*sizeof(IALG_Status *), Cache_Type_ALLD, 0);
     Cache_wait();
 
-    // FL: send start initialization message to slave
-    pAspMsg = (ASP_Msg *)MessageQ_alloc(hAspMsgMaster->heapId, hAspMsgMaster->msgSize); /* allocate message */
-    MessageQ_setReplyQueue(hAspMsgMaster->masterQue, (MessageQ_Msg)pAspMsg);            /* set the return address in the message header */
-    pAspMsg->cmd = ASP_SLAVE_START;                                                     /* fill in message payload */
-    pAspMsg->procId = hAspMsgMaster->masterProcId;
-    pAspMsg->messageId = hAspMsgMaster->messageId & ~(1<<31);
-    pAspMsg->expectResp = TRUE;
-    TRACE_MSG3("Tx ASP message: procId=%d, cmd=%d, messageId=0x%04x", pAspMsg->procId, pAspMsg->cmd, pAspMsg->messageId);
-    status = MessageQ_put(hAspMsgMaster->slaveQue, (MessageQ_Msg)pAspMsg);              /* send message */
-    if (status != MessageQ_S_SUCCESS)
+    // send start initialization message to slave
+    status = AspMsgSnd(hAspMsgMaster, ASP_SLAVE_START, NULL);
+    if (status != ASP_MSG_NO_ERR)
     {
         SW_BREAKPOINT;
     }
+    
     // wait for initialization complete message from slave
+    // no other thread is allowed to run until Slave finishes startup
     do {
-        //status = MessageQ_get(hAspMsgMaster->masterQue, (MessageQ_Msg *)&pAspMsg, MessageQ_FOREVER);
-        status = MessageQ_get(hAspMsgMaster->masterQue, (MessageQ_Msg *)&pAspMsg, 0); // FL: no other thread is allowed to run until Slave finished startup
-    } while ((status != MessageQ_S_SUCCESS) || (pAspMsg->cmd != ASP_MASTER_START_DONE));
-    if ((pAspMsg->procId != hAspMsgMaster->slaveProcId) ||
-        (pAspMsg->cmd != ASP_MASTER_START_DONE) ||
-        (pAspMsg->messageId != (hAspMsgMaster->messageId | ((UInt32)1<<31))))
-    {
-        TRACE_TERSE3("ERROR: Rx ASP message: procId=%d, cmd=%d, messageId=0x%04x", pAspMsg->procId, pAspMsg->cmd, pAspMsg->messageId);
-        SW_BREAKPOINT;
-    }
-    hAspMsgMaster->messageId = (hAspMsgMaster->messageId + 1) & ~(1<<31);
-    TRACE_MSG3("Rx ASP message: procId=%d, cmd=%d, messageId=0x%04x", pAspMsg->procId, pAspMsg->cmd, pAspMsg->messageId);
-    status = MessageQ_free((MessageQ_Msg)pAspMsg); /* free the message */
-    if (status != MessageQ_S_SUCCESS)
+        status = AspMsgRcvAck(hAspMsgMaster, ASP_MASTER_START_DONE, NULL, FALSE);
+    } while (status == ASP_MSG_ERR_QUEUE_TIMEOUT);
+    if (status != ASP_MSG_NO_ERR)
     {
         SW_BREAKPOINT;
     }
 
-    // (***) FL: revisit
     // invalidate Status structure addresses for Beta Units initialized on Slave
     Cache_inv((Ptr)(&IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]), sizeof(IALG_Status *), Cache_Type_ALLD, 0);
     Cache_inv((Ptr)(&IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]), sizeof(IALG_Status *), Cache_Type_ALLD, 0);
@@ -565,9 +545,7 @@ Void taskAsipFxnInit(
     if (!IACP_STD_BETA_TABLE.pStatus[STD_BETA_AAC]) Log_info0("WARNING: beta unit for Dec==NULL");
     if (!IACP_STD_BETA_TABLE.pStatus[STD_BETA_AAC2]) Log_info0("WARNING: beta unit for Dec==NULL");
 
-    // (***) FL: revisit
     // invalidate Status structures for Beta Units initialized on Slave
-    //
     if (IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE] != NULL)
     {
         Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]), sizeof(Int), Cache_Type_ALLD, 0);
@@ -662,11 +640,17 @@ Void taskAsipFxnInit(
         Log_info1("TaskAfp: Gate Index %d:Open status GateMP Fail.", GATEMP_INDEX_DTS);
     }
 #endif
-    // (***) FL: revisit
+
     // invalidate Dec configuration
     Cache_inv(&gPAF_AST_config.xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
     Cache_wait();
 
+    pInp = &pAsitCfg->pIoInp[zMI];        // pointer to input I/O components
+    pInp->asipState = ASIT_RESET;
+    pInp->firstTimeInit = TRUE;
+    pInp->numAsitRestart = 0;
+    pInp->hMcaspChan = NULL;
+
 } /* taskAsipFxnInit */
 
 /*
@@ -682,16 +666,18 @@ Void taskAsipFxn_Not_Used(
     const PAF_ASIT_Patchs *pQ
 )
 {
-    PAF_ASIT_Config *pAsitCfg;      /* ASIT configuration pointer */
-    PAF_AST_Config *pAstCfg;        /* AST Common (shared) configuration pointer */
-    Int as;                         /* Audio Stream Number (1, 2, etc.) */
-    Int z;                          /* input/encode/stream/decode/output counter */
-    Int errno;                      /* error number */
+    PAF_ASIT_Config *pAsitCfg;          // ASIT configuration pointer
+    PAF_AST_Config *pAstCfg;            // AST Common (shared) configuration pointer
+    AspMsgMaster_Handle hAspMsgMaster;  // ASIT message master handle
+    Int as;                             // Audio Stream Number (1, 2, etc.)
+    Int z;                              // input/encode/stream/decode/output counter
+    Int errno;                          // error number
     Int zMD, zMI, zMS;
     Int loopCount = 0;  // used to stop trace to see startup behavior.        
     // Messaging
     Int8 tempVar8;
     char asipMsgBuf[ASP_MSG_BUF_LEN];
+    Int status;
 
     Log_info0("Enter taskAsipFxn()");
 
@@ -702,6 +688,7 @@ Void taskAsipFxn_Not_Used(
     //
     pAsitCfg = &gPAF_ASIT_config;       // initialize pointer to task configuration
     pAstCfg = pAsitCfg->pAstCfg;        // get pointer to AST common (shared) configuration
+    hAspMsgMaster = pAsitCfg->hAspMsgMaster; // get message master handle
 
     /* Set Audio Stream Number (1, 2, etc.) */
     as = pAstCfg->as;
@@ -860,12 +847,10 @@ Void taskAsipFxn_Not_Used(
         // At this point we have an enabled input and want to decode something.
         // If no decoder selected then do nothing. Need to reset the sourceProgram, since
         // when no decoder is selected there are no calls to IB
-        //if (errno = pP->fxns->autoProcessing(pP, pQ, pC, pC->xDec[zMD].decodeStatus.sourceSelect, pC->xDec[zMD].decAlg[PAF_SOURCE_PCM]))
         tempVar8 = sharedMemReadInt8(&(pAstCfg->xDec[zMD].decodeStatus.sourceSelect), 
                                      GATEMP_INDEX_DEC);
         pfpBegin(PFP_ID_ASIT_1, pAsitCfg->taskHandle);  // PFP begin
         gNumPfpAsit1++;
-        // (***) FL: re-visit, hard-coded to use FRAMELENGTH (pP->frameLength) inside function
         errno = pP->fxns->autoProcessing(pP, pQ, pAsitCfg, tempVar8, NULL);
         pfpEnd(PFP_ID_ASIT_1, PFP_FINISH_MEAS);         // PFP end
         gNumPfpAsit1--;
@@ -966,7 +951,8 @@ Void taskAsipFxn_Not_Used(
             continue;
         }
 
-#if 0 // debug, reset IB capture buffer
+#if 0 // debug
+        // reset IB capture buffer
         capIbReset();
         gCapIbReset_cnt++;
         Log_info0("capIbReset()");
@@ -974,11 +960,18 @@ Void taskAsipFxn_Not_Used(
 
         // send source select message to slave
         *(Int32 *)&asipMsgBuf[0] = sourceSelect;
-        if(AspMsgSend(ASP_SLAVE_DEC_SOURCE_SELECT, ASP_MASTER_DEC_SOURCE_SELECT_DONE,
-                      asipMsgBuf, NULL) != ASP_MSG_NO_ERR)
+        status = AspMsgSnd(hAspMsgMaster, ASP_SLAVE_DEC_SOURCE_SELECT, asipMsgBuf);
+        if (status != ASP_MSG_NO_ERR)
         {
             TRACE_VERBOSE0("TaskAsip: error in sending SOURCE_SELECT message");
-            SW_BREAKPOINT;
+            SW_BREAKPOINT;            
+        }
+        // receive source select acknowledge message from slave
+        status = AspMsgRcvAck(hAspMsgMaster, ASP_MASTER_DEC_SOURCE_SELECT_DONE, NULL, TRUE);
+        if (status != ASP_MSG_NO_ERR)
+        {
+            TRACE_VERBOSE0("TaskAsip: error in receiving SOURCE_SELECT_DONE ack message");
+            SW_BREAKPOINT;            
         }
         
         // set to unknown so that we can ensure, for IOS purposes, that sourceDecode = NONE
@@ -1008,14 +1001,20 @@ Void taskAsipFxn_Not_Used(
         // Increase priority level since decoding complete
         Task_setPri(pAsitCfg->taskHandle, Task_getPri(pAsitCfg->taskHandle)+1);
 
-        // FL: send dec exit message to slave
-        if( AspMsgSend(ASP_SLAVE_DEC_EXIT, ASP_MASTER_DEC_EXIT_DONE, NULL, NULL)
-            != ASP_MSG_NO_ERR)
+        // send dec exit message to slave
+        status = AspMsgSnd(hAspMsgMaster, ASP_SLAVE_DEC_EXIT, NULL);
+        if (status != ASP_MSG_NO_ERR)
         {
             TRACE_VERBOSE0("TaskAsip: error in sending DEC_EXIT message");
             SW_BREAKPOINT;                
         }
-
+        // receive dec exit acknowledge message from slave
+        status = AspMsgRcvAck(hAspMsgMaster, ASP_MASTER_DEC_EXIT_DONE, NULL, TRUE);
+        if (status != ASP_MSG_NO_ERR)
+        {
+            TRACE_VERBOSE0("TaskAsip: error in receiving DEC_EXIT_DONE ack message");
+            SW_BREAKPOINT;                
+        }
     } // End of main processing loop for (;;)
     
     //Log_info0("Exit taskAsipFxn()");
@@ -1195,7 +1194,18 @@ PAF_ASIT_initPhaseMalloc(
     TRACE_TERSE3("PAF_ASIT_initPhaseMalloc. (pAstCfg->xDec) %d bytes from space %d at 0x%x.",
         DECODEN * sizeof (*pAstCfg->xDec),
         HEAP_ID_INTERNAL1_SHM, (IArg)pAstCfg->xDec);
-                
+#if 0
+    if (!(pAsitCfg->pInpDec = Memory_calloc(decHeapHandle,
+        DECODEN * sizeof (*pAsitCfg->pInpDec), 4, &eb)))
+    {
+        TRACE_TERSE1("PAF_ASIT_initPhaseMalloc: AS%d: Memory_calloc failed", as+zMS);
+        SW_BREAKPOINT;
+        return __LINE__;
+    }
+    TRACE_TERSE3("PAF_ASIT_initPhaseMalloc. (pAsitCfg->pInpDec) %d bytes from space %d at 0x%x.",
+                 DECODEN * sizeof (*pAsitCfg->pInpDec),
+                 HEAP_ID_INTERNAL1_SHM, (IArg)pAsitCfg->pInpDec);
+#endif
     TRACE_TERSE1("PAF_ASIT_initPhaseMalloc: AS%d: initialization phase - memory allocation complete.", as+zMS);
     return 0;
 } //PAF_ASIT_initPhaseMalloc
@@ -1247,7 +1257,6 @@ PAF_ASIT_initPhaseConfig(
         Int zI = pP->inputsFromDecodes[z];
         pAstCfg->xDec[z].decodeControl.size = sizeof(pAstCfg->xDec[z].decodeControl);
         pAstCfg->xDec[z].decodeControl.pInpBufConfig = (const PAF_InpBufConfig *)&pAstCfg->xInp[zI].inpBufConfig;
-        //pC->xDec[z].decodeStatus = *pP->z_pDecodeStatus[z]; // FL: slave
     }
 
     TRACE_TERSE1("PAF_ASIT_initPhaseConfig: AS%d: initialization phase - configuration complete.", as+zMS);
@@ -1479,7 +1488,6 @@ PAF_ASIT_initPhaseCommon(
     return 0;
 } //PAF_ASIT_initPhaseCommon
 
-// (***) FL: candidate for removal
 // -----------------------------------------------------------------------------
 // ASIT Initialization Function - Algorithm Keys
 //
@@ -1511,25 +1519,6 @@ PAF_ASIT_initPhaseAlgKey(
 
     TRACE_VERBOSE1("PAF_ASIT_initPhaseAlgKey: AS%d: initialization phase - Algorithm Keys", as);
 
-#if 0 // FL: slave    
-    for (z=DECODE1; z < DECODEN; z++) 
-    {
-        for (s=0; s < pP->pDecAlgKey->length; s++) 
-        {
-            if ((pP->pDecAlgKey->code[s].full != 0) &&
-                (that = PAF_ASP_chainFind (&pC->xDec[z].decChainData, pP->pDecAlgKey->code[s]))) 
-            {
-                pC->xDec[z].decAlg[s] = (ALG_Handle )that->alg;
-                /* Cast in interface, for now --Kurt */
-            }
-            else
-            {
-                pC->xDec[z].decAlg[s] = NULL;
-            }
-        }
-    }
-#endif
-
     return 0;
 } //PAF_ASIT_initPhaseAlgKey
 
@@ -1609,7 +1598,6 @@ PAF_ASIT_initPhaseDevice(
     return 0;
 } //PAF_ASIT_initPhaseDevice
 
-// (***) FL: move to ASOT
 // -----------------------------------------------------------------------------
 // ASIT Initialization Function - Decoder Output Circular Buffer
 //
@@ -1643,13 +1631,12 @@ PAF_ASIT_initPhaseDecOpCircBuf(
     Int betaPrimeOffset;
     Int zS;
 
-    // FL: (***)revisit
     pAstCfg = pAsitCfg->pAstCfg; // get pointer to AST common (shared) configuration
     as = pAstCfg->as;
     zMS = pAstCfg->masterStr;
 
     // Decode output circular buffer memory
-    if (!(pAstCfg->xDecOpCb = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, 
+    if (!(pAstCfg->xDecOpCb = Memory_calloc((IHeap_Handle)HEAP_EXTERNAL_NONCACHED_SHM,
         DECODEN * sizeof (*pAstCfg->xDecOpCb), 4, &eb)))
     {
         TRACE_TERSE1("PAF_ASIT_initPhaseDecOpCircBuf: AS%d: Memory_calloc failed", as+zMS);
@@ -1751,7 +1738,7 @@ PAF_ASIT_initPhaseDecOpCircBuf(
         errno = cbInit(pCb);
         if (errno)
         {
-            SW_BREAKPOINT; // FL: debug
+            //SW_BREAKPOINT; // debug
             return errno;
         }
     }
@@ -2147,10 +2134,8 @@ PAF_ASIT_autoProcessing(
         TRACE_VERBOSE2("PAF_ASIT_autoProcessing: AS%d: source select returns 0x%x", as+zMS, errno);
         return errno;
     }
-    //frameLength = pP->fxns->computeFrameLength (pcmAlgMaster, FRAMELENGTH,
-    //                                            pC->xDec[zMD].decodeStatus.bufferRatio);
-    frameLength = FRAMELENGTH; // (***) FL: fix PCM frameLength
     
+    frameLength = FRAMELENGTH; // fix PCM frameLength
     if (errno = SIO_ctrl(pAstCfg->xInp[zMI].hRxSio,
                          PAF_SIO_CONTROL_SET_PCMFRAMELENGTH, frameLength))
     {
@@ -2176,8 +2161,9 @@ PAF_ASIT_autoProcessing(
     nbytes = SIO_reclaim(pAstCfg->xInp[zMI].hRxSio, (Ptr)&pAstCfg->xInp[zMI].pInpBuf, NULL);
     if (nbytes == -DIBERR_SYNC)
     {
-#if 0 // (***) FL: shows timing of autosync restart
-        // (***) debug // B5
+#if 0 // debug
+        // Shows timing of autosync restart
+        // ADC B5
         {
             static Uint8 toggleState = 0;
             if (toggleState == 0)
@@ -2294,7 +2280,7 @@ PAF_ASIT_decodeProcessing(
     Int zMD;
     //Int zMS;
     Int frame; // decoder input frame count
-    Int block; // (***) FL: formerly  -- decoder output block count / input frame
+    Int block; // decoder output block count / input frame
     Int8 tempVar8, temp2Var8;
     
     pAstCfg = pAsitCfg->pAstCfg; // get pointer to AST common (shared) configuration
@@ -2305,7 +2291,7 @@ PAF_ASIT_decodeProcessing(
     {
         alg[z] = pAstCfg->xDec[z].decAlg[PAF_SOURCE_PCM];        
     }
-    alg[zMD] = NULL; // decAlgMaster; // FL: alg[] init is on slave
+    alg[zMD] = NULL; // decAlgMaster; // alg[] init is on slave
 
     //
     // Receive and process the data in single-frame buffers
@@ -2648,6 +2634,7 @@ PAF_ASIT_decodeInit(
 {
     PAF_AST_Config *pAstCfg;
     //PAF_AST_DecOpCircBufCtl *pCbCtl;    /* Decoder output circular buffer control */
+    AspMsgMaster_Handle hAspMsgMaster;
     Int as;                             /* Audio Stream Number (1, 2, etc.) */
     Int z;                              /* decode/encode counter */
     Int errno;                          /* error number */
@@ -2657,8 +2644,10 @@ PAF_ASIT_decodeInit(
     Int argIdx;
     Int8 tempVar8;
     char decMsgBuf[ASP_MSG_BUF_LEN];
+    Int status;
     
-    pAstCfg = pAsitCfg->pAstCfg; // get pointer to AST common (shared) configuration
+    pAstCfg = pAsitCfg->pAstCfg;                // get pointer to AST common (shared) configuration
+    hAspMsgMaster = pAsitCfg->hAspMsgMaster;    // get message master handle
     as = pAstCfg->as;
     zMD = pAstCfg->masterDec;
     zMI = pP->zone.master;
@@ -2696,48 +2685,51 @@ PAF_ASIT_decodeInit(
             Cache_wb(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
 
-            // FL: send dec activate message to slave
+            // send dec activate message to slave
             argIdx = 0; // set decIdx (zone index)
             *(Int32 *)&decMsgBuf[argIdx] = z;
-            if(AspMsgSend(ASP_SLAVE_DEC_ACTIVATE, ASP_MASTER_DEC_ACTIVATE_DONE, 
-                          decMsgBuf, NULL) != ASP_MSG_NO_ERR)
+            status = AspMsgSnd(hAspMsgMaster, ASP_SLAVE_DEC_ACTIVATE, decMsgBuf);
+            if (status != ASP_MSG_NO_ERR)
+            {
+                TRACE_TERSE0("decodeInit: error in sending DEC_ACTIVATE message");
+                SW_BREAKPOINT; // temporary
+                return -1; // temporary
+            }           
+            status = AspMsgRcvAck(hAspMsgMaster, ASP_MASTER_DEC_ACTIVATE_DONE, NULL, TRUE);
+            if (status != ASP_MSG_NO_ERR)
             {
-                TRACE_TERSE0("decodeInit: error in sending DEC_ACTIVATE message ");
+                TRACE_TERSE0("decodeInit: error in receiving DEC_ACTIVATE_DONE message");
                 SW_BREAKPOINT; // temporary
                 return -1; // temporary
             }           
 
-#if 0 // FL: decoder activate call, slave
-            if (decAlg[z]->fxns->algActivate)
-                decAlg[z]->fxns->algActivate (decAlg[z]);
-#endif
-            // FL: send dec reset message to slave
+            // send dec reset message to slave
             argIdx = 0; // set decIdx
             *(Int32 *)&decMsgBuf[argIdx] = z;
-            if(AspMsgSend(ASP_SLAVE_DEC_RESET, ASP_MASTER_DEC_RESET_DONE, 
-                          decMsgBuf, decMsgBuf) != ASP_MSG_NO_ERR)
+            status = AspMsgSnd(hAspMsgMaster, ASP_SLAVE_DEC_RESET, decMsgBuf);
+            if (status != ASP_MSG_NO_ERR)
             {
                 TRACE_TERSE0("decodeInit: error in sending DEC_RESET message ");
                 SW_BREAKPOINT; // temporary
                 return -1; // temporary
             }
+            status = AspMsgRcvAck(hAspMsgMaster, ASP_MASTER_DEC_RESET_DONE, decMsgBuf, TRUE);
+            if (status != ASP_MSG_NO_ERR)
+            {
+                TRACE_TERSE0("decodeInit: error in receiving DEC_RESET_DONE ack message ");
+                SW_BREAKPOINT; // temporary
+                return -1; // temporary
+            }
             else
             {
                 argIdx = 0; // get decErrno
                 errno = *(Int32 *)&decMsgBuf[argIdx];                
-            }   
+            }
 
-            // (***) FL: revisit
             // invalidate Dec configuration
             Cache_inv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
             
-#if 0 // FL: decoder reset call, slave
-            if (dec->fxns->reset
-                && (errno = dec->fxns->reset (dec, NULL,
-                                              &pC->xDec[z].decodeControl, &pC->xDec[z].decodeStatus)))
-                return errno;
-#endif
             if (errno != 0)
             {
                 return errno;
@@ -2749,36 +2741,13 @@ PAF_ASIT_decodeInit(
             sharedMemWriteInt8(&(pAstCfg->xDec[z].decodeStatus.aspGearStatus),
                                   tempVar8, GATEMP_INDEX_DEC);
             
-#if 0 // FL: change handle to decIdx (zone index)
-            frameLength = pP->fxns->computeFrameLength(decAlg[z], 
-                FRAMELENGTH,
-                pC->xDec[z].decodeStatus.bufferRatio);
-#endif
-#if 0 // (***) FL: revisit. Bypass decoder computeFrameLength() function.
-            frameLength = pP->fxns->computeFrameLength(z, 
-                FRAMELENGTH, 
-                pC->xDec[z].decodeStatus.bufferRatio);
-#else
             // Compute decoder frame length based on source selection
             frameLength = getFrameLengthSourceSel(pP, sourceSelect);
-#endif    
             
             pAstCfg->xDec[z].decodeControl.frameLength = frameLength;
             pAstCfg->xDec[z].decodeInStruct.sampleCount = frameLength;
             pAstCfg->xDec[z].decodeControl.sampleRate = PAF_SAMPLERATE_UNKNOWN;
           
-#if 0 // FL: Moved to ARM:ASDT:INFO
-            // Initialize decoder output circular buffer for selected source
-            errno = cbInitSourceSel(pCbCtl, z, sourceSelect, frameLength, FRAMELENGTH, 0);
-            if (errno)
-            {
-                SW_BREAKPOINT; // debug
-                return errno;
-            }
-            // debug
-            cbLog(pCbCtl, z, 1, "PAF_ASIT_decodeInit:cbInitSourceSel");
-#endif
-            
             if (z != zMD) 
             {
                 if (errno = SIO_idle(pAstCfg->xInp[zI].hRxSio))
@@ -2844,6 +2813,7 @@ PAF_ASIT_decodeInfo(
 )
 {
     PAF_AST_Config *pAstCfg;
+    AspMsgMaster_Handle hAspMsgMaster;
     Int as;                    /* Audio Stream Number (1, 2, etc.) */
     Int z;                     /* input/decode/stream counter */
     Int errno;                 /* error number */
@@ -2856,13 +2826,11 @@ PAF_ASIT_decodeInfo(
     Int8 tempVar8;
     Int tempVar;
     char decMsgBuf[ASP_MSG_BUF_LEN];
-    // FL: revisit
-    //Int size;
-    //PAF_InpBufConfig *pIpBufConfig;
-    // debug
-    //UInt32 curTime;
+    Int status;
 
-    pAstCfg = pAsitCfg->pAstCfg; // get pointer to AST common (shared) configuration
+    
+    pAstCfg = pAsitCfg->pAstCfg;                // get pointer to AST common (shared) configuration
+    hAspMsgMaster = pAsitCfg->hAspMsgMaster;    // get message master handle
     as = pAstCfg->as;
     zMD = pAstCfg->masterDec;
     zMS = pAstCfg->masterStr;
@@ -2905,7 +2873,7 @@ PAF_ASIT_decodeInfo(
                 }
                 else
                 {
-                    TRACE_TERSE1("AS%d: return error ASPERR_INFO_RATECHANGE", as+pAstCfg->masterStr);
+                    //TRACE_TERSE1("PAF_ASIT_decodeInfo: AS%d: return error ASPERR_INFO_RATECHANGE", as+pAstCfg->masterStr);
                     TRACE_TERSE2("inpBufStatus.sampleRateStatus: 0x%x, decodeControl.sampleRate: 0x%x",
                         pAstCfg->xInp[z].inpBufStatus.sampleRateStatus, 
                         pAstCfg->xDec[zD].decodeControl.sampleRate);
@@ -2939,13 +2907,15 @@ PAF_ASIT_decodeInfo(
             return ASPERR_RECLAIM;
         }
         
-#if 0 // debug, capture input buffer
+#if 0 // debug
+        // capture input buffer
         capIb(pAstCfg->xInp[zMI].pInpBuf);
         gCapIb_cnt++;
 #endif
         
-#if 0 // (***) FL: shows timing of Input Rx SIO reclaim after decoding has started (autodet complete)
-        // (***) debug // B5
+#if 0 // debug
+        // Shows timing of Input Rx SIO reclaim after decoding has started (autodet complete)
+        // ADC B5
         {
             static Uint8 toggleState = 0;
             if (toggleState == 0)
@@ -2956,15 +2926,6 @@ PAF_ASIT_decodeInfo(
         }
 #endif
 
-        //
-        // Simulate Rx SIO_reclaim() pend
-        //
-        //Semaphore_pend(semaphoreRxAudio, BIOS_WAIT_FOREVER); 
-        //curTime = Clock_getTicks();
-        //System_printf("System time in TaskAsipFxn Rx audio = %lu\n", (ULong)curTime);        
-        //Log_info1("System time in TaskAsipFxn Rx audio = %u", curTime);
-        //Log_info1("decodeInfo():Rx SIO reclaim(), system time = %u", curTime);
-        
         gAsipRxSioReclaimCnt++;
     } //pAstCfg->xInp[zMI].hRxSio
 
@@ -2988,43 +2949,39 @@ PAF_ASIT_decodeInfo(
                 return errno;
             }
 
-#if 1
-            // (***) FL: revisit
             // write back Inp configuration
             Cache_wb(&pAstCfg->xInp[zI], sizeof(PAF_AST_InpBuf), Cache_Type_ALLD, 0);
             // write back Dec configuration
             Cache_wb(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
-#endif
             
-            // FL: send info message to slave
+            // send info message to slave
             argIdx = 0; // set decIdx
             *(Int32 *)&decMsgBuf[argIdx] = z;
-            if(AspMsgSend(ASP_SLAVE_DEC_INFO, ASP_MASTER_DEC_INFO_DONE, 
-                          decMsgBuf, decMsgBuf) != ASP_MSG_NO_ERR)
+            status = AspMsgSnd(hAspMsgMaster, ASP_SLAVE_DEC_INFO, decMsgBuf);
+            if (status != ASP_MSG_NO_ERR)
             {
                 TRACE_TERSE0("decodeInfo: error in sending DEC_INFO message ");
                 SW_BREAKPOINT; // temporary
                 return -1;     // temporary
             }
+            status = AspMsgRcvAck(hAspMsgMaster, ASP_MASTER_DEC_INFO_DONE, decMsgBuf, TRUE);
+            if (status != ASP_MSG_NO_ERR)
+            {
+                TRACE_TERSE0("decodeInfo: error in receiving DEC_INFO_DONE ack message");
+                SW_BREAKPOINT; // temporary
+                return -1;     // temporary
+            }
             else
             {
                 argIdx = 0; // get decErrno
                 errno = *(Int32 *)&decMsgBuf[argIdx];                
-            }             
-
-#if 1
-            // (***) FL: revisit
+            }
+            
             // invalidate Dec configuration
             Cache_inv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();                            
-#endif            
             
-#if 0 // FL: decoder info call, slave
-            if (dec->fxns->info
-                && (errno = dec->fxns->info (dec, NULL,
-                                             &pC->xDec[z].decodeControl, &pC->xDec[z].decodeStatus))) 
-#endif
             if (errno)
             {
                 TRACE_TERSE1("return error errno 0x%x.", errno);
@@ -3080,37 +3037,6 @@ PAF_ASIT_decodeInfo(
         }
     }
 
-#if 0 // FL: ASDT (slave)
-    // TODO: move this to start of this function so that it doesn't affect IO timing
-    // Initialize audio frame(s)
-    //    Re-initialize audio frame if there is an associated decode and
-    //    that decode doesn't have a valid input or is turned off
-    for (z=STREAM1; z < STREAMN; z++) 
-    {
-        Int reset = 0;
-        for (zX = DECODE1; zX < DECODEN; zX++) 
-        {
-            if (pP->streamsFromDecodes[zX] == z) 
-            {
-                zI = pP->inputsFromDecodes[zX];
-                if (!pC->xDec[zX].decodeStatus.mode || !pC->xInp[zI].hRxSio)
-                {
-                    reset = 1;
-                }
-            }
-        }
-        if (reset) 
-        {
-            TRACE_VERBOSE2("PAF_ASIT_decodeInfo: AS%d: initializing block %d -- info", as+z, frame);
-            pP->fxns->initFrame1 (pP, pQ, pC, z, 0);
-        }
-        else
-        {
-            TRACE_VERBOSE2("PAF_ASIT_decodeInfo: AS%d: initializing block %d -- info <ignored>", as+z, frame);
-        }
-    }
-#endif    
-
     return 0;
 } //PAF_ASIT_decodeInfo
 
@@ -3248,6 +3174,7 @@ PAF_ASIT_decodeDecode(
 )
 {
     PAF_AST_Config *pAstCfg;
+    AspMsgMaster_Handle hAspMsgMaster;
     Int as;                     /* Audio Stream Number (1, 2, etc.) */
     Int z;                      /* decode/stream counter */
     Int errno;                  /* error number */
@@ -3256,22 +3183,13 @@ PAF_ASIT_decodeDecode(
     Int cbErrno;
     Int frameLength;    
     char decMsgBuf[ASP_MSG_BUF_LEN];
+    Int status;
 
-    pAstCfg = pAsitCfg->pAstCfg; // get pointer to AST common (shared) configuration
+    pAstCfg = pAsitCfg->pAstCfg;                // get pointer to AST common (shared) configuration
+    hAspMsgMaster = pAsitCfg->hAspMsgMaster;    // get message master handle
     as = pAstCfg->as;
     (void)as; // clear compiler warning in case not used with tracing disabled
 
-#if 0 // FL: slave
-    // Clear samsiz for all channels - MID 208.
-    for (z=STREAM1; z < STREAMN; z++) 
-    {
-        for (ch=0; ch < PAF_MAXNUMCHAN_AF; ch++) 
-        {
-            pC->xStr[z].pAudioFrame->data.samsiz[ch] = 0;
-        }
-    }
-#endif    
-
     // Decode data
     for (z=DECODE1; z < DECODEN; z++) 
     {
@@ -3287,26 +3205,33 @@ PAF_ASIT_decodeDecode(
                     (IArg)pAstCfg->xInp[z].pInpBuf->base.pVoid,
                     (IArg)pAstCfg->xInp[z].pInpBuf->head.pVoid);
 
-#if 0 // debug, capture input buffer
+#if 0 // debug
+            // capture input buffer
             capIbPcm(pAstCfg->xInp[z].pInpBuf);
 #endif
             
-            // (***) FL: revisit
             // write back Dec configuration
             Cache_wb(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();                        
 
-            // FL: send decode message to slave
+            // send decode message to slave
             argIdx = 0; // set decIdx
             *(Int32 *)&decMsgBuf[argIdx] = z;
-            if(AspMsgSend(ASP_SLAVE_DEC_DECODE, ASP_MASTER_DEC_DECODE_DONE, 
-                          decMsgBuf, decMsgBuf) != ASP_MSG_NO_ERR)
+            status = AspMsgSnd(hAspMsgMaster, ASP_SLAVE_DEC_DECODE, decMsgBuf);
+            if (status != ASP_MSG_NO_ERR)
             {
                 TRACE_TERSE0("decodeDecode: error in sending DEC_DECODE message ");
                 SW_BREAKPOINT; // temporary
                 return -1;     // temporary
             }
-            else 
+            status = AspMsgRcvAck(hAspMsgMaster, ASP_MASTER_DEC_DECODE_DONE, decMsgBuf, TRUE);
+            if (status != ASP_MSG_NO_ERR)
+            {
+                TRACE_TERSE0("decodeDecode: error in receiving DEC_DECODE_DONE ack message ");
+                SW_BREAKPOINT; // temporary
+                return -1;     // temporary
+            }
+            else
             {
                 argIdx = 0; // get decErrno
                 errno = *(Int32 *)&decMsgBuf[argIdx];
@@ -3317,15 +3242,14 @@ PAF_ASIT_decodeDecode(
                     gCbWrtAfErrCnt++;
                     TRACE_TERSE1("CB write error=%d", cbErrno);
                     //SW_BREAKPOINT; // temporary
-                }
-            }           
-
-            // (***) FL: revisit
+                }                
+            }
+            
             // invalidate Dec configuration
             Cache_inv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
 
-#if 0 // FL: decoder decode call, slave
+#if 0 // decoder decode call, slave
             if (dec->fxns->decode
                 && (errno = dec->fxns->decode (dec, NULL,
                                                &pC->xDec[z].decodeInStruct, &pC->xDec[z].decodeOutStruct))) 
@@ -3340,20 +3264,8 @@ PAF_ASIT_decodeDecode(
             as_traceChannels(pC, z);
 #endif
 
-#if 0 // FL: change handle to decIdx (zone index)  
-            frameLength = pP->fxns->computeFrameLength(decAlg[z],
-                FRAMELENGTH, 
-                pC->xDec[z].decodeStatus.bufferRatio);
-#endif
-#if 0 // (***) FL: revisit. Bypass decoder computeFrameLength() function.
-            frameLength = pP->fxns->computeFrameLength(z, 
-                FRAMELENGTH, 
-                pC->xDec[z].decodeStatus.bufferRatio);
-#else
             // Compute decoder frame length based on source selection
             frameLength = getFrameLengthSourceSel(pP, sourceSelect);
-#endif
-
 
 //#ifdef PROFILER
 //            // modify for different decoders
@@ -3394,33 +3306,6 @@ PAF_ASIT_decodeDecode(
         }
     } // z=DECODE1 to DECODEN
 
-#if 0 // FL: ASDT (slave)
-    // Set up audio frames not decoded into
-    //    Re-initialize audio frame if there is an assocatiated decode and
-    //    that decode doesn't have a valid input or is turned off
-    for (z=STREAM1; z < STREAMN; z++) 
-    {
-        Int zX;
-        Int reset = 0;
-        for (zX = DECODE1; zX < DECODEN; zX++) 
-        {
-            if (pP->streamsFromDecodes[zX] == z) 
-            {
-                Int zI = pP->inputsFromDecodes[zX];
-                if (!pC->xDec[zX].decodeStatus.mode || !pC->xInp[zI].hRxSio)
-                    reset = 1;
-            }
-        }
-        if (reset) 
-        {
-            TRACE_VERBOSE2("PAF_ASIT_decodeDecode: AS%d: initializing block %d -- decode", as+z, frame);
-            pP->fxns->initFrame1 (pP, pQ, pC, z, 0);
-        }
-        else
-            TRACE_VERBOSE2("PAF_ASIT_decodeDecode: AS%d: initializing block %d -- decode <ignored>", as+z, frame);
-    }
-#endif
-    
     return 0;
 } //PAF_ASIT_decodeDecode
 
@@ -3527,13 +3412,16 @@ PAF_ASIT_decodeComplete(
 )
 {
     PAF_AST_Config *pAstCfg;
+    AspMsgMaster_Handle hAspMsgMaster;
     Int as;                     /* Audio Stream Number (1, 2, etc.) */
     Int z;                      /* decode/encode counter */
     Int argIdx;
     Int8 tempVar8;
     char decMsgBuf[ASP_MSG_BUF_LEN];
+    Int status;
     
-    pAstCfg = pAsitCfg->pAstCfg; // get pointer to AST common (shared) configuration
+    pAstCfg = pAsitCfg->pAstCfg;                // get pointer to AST common (shared) configuration
+    hAspMsgMaster = pAsitCfg->hAspMsgMaster;    // get message master handle
     as = pAstCfg->as;
     (void)as;  // clear compiler warning in case not used with tracing disabled
 
@@ -3557,21 +3445,23 @@ PAF_ASIT_decodeComplete(
                                  &pAstCfg->xDec[z].decodeStatus);
 #endif /* PAF_ASP_FINAL */
 
-            // FL: send dec deactivate message to slave
+            // send dec deactivate message to slave
             argIdx = 0; // set decIdx
             *(Int32 *)&decMsgBuf[argIdx] = z;
-            if(AspMsgSend(ASP_SLAVE_DEC_DEACTIVATE, ASP_MASTER_DEC_DEACTIVATE_DONE,
-                          decMsgBuf, NULL) != ASP_MSG_NO_ERR)
+            status = AspMsgSnd(hAspMsgMaster, ASP_SLAVE_DEC_DEACTIVATE, decMsgBuf);
+            if (status != ASP_MSG_NO_ERR)
             {
                 TRACE_TERSE0("decodeComplete: error in sending DEC_DEACTIVATE message.");
                 SW_BREAKPOINT;
                 return -1;
             }
-
-#if 0 // FL: decoder deactivate call, slave
-            if (decAlg[z]->fxns->algDeactivate)
-                decAlg[z]->fxns->algDeactivate (decAlg[z]);
-#endif    
+            status = AspMsgRcvAck(hAspMsgMaster, ASP_MASTER_DEC_DEACTIVATE_DONE, NULL, TRUE);
+            if (status != ASP_MSG_NO_ERR)
+            {
+                TRACE_TERSE0("decodeComplete: error in receiving DEC_DEACTIVATE ack message.");
+                SW_BREAKPOINT;
+                return -1;
+            }
         }
         else 
         {
@@ -3703,58 +3593,6 @@ PAF_ASIT_sourceDecode(
 
 // -----------------------------------------------------------------------------
 
-#if 0 // (***) FL: no longer used w/ removal of CONTINUOUS mode
-Int
-PAF_AST_decodeHandleErrorInput (const PAF_AST_Params *pP, const PAF_AST_Patchs *pQ, PAF_AST_Config *pC, ALG_Handle decAlg[], Int z, Int error)
-{
-    Int errno = 0;
-    Int zMD = pC->masterDec;
-    Int zI = pP->inputsFromDecodes[z];
-
-    // only handle real errors, on primary input, for writeDECModeContinuous
-    if ( !( error &&
-            z == zMD ))
-        return error;
-
-    TRACE_TIME((&TIME_MOD, "AS%d: PAF_AST_decodeHandleErrorInput: (primary) input error caught = %d", pC->as+z, error));
-    TRACE_TIME((&TIME_MOD, "AS%d: PAF_AST_decodeHandleErrorInput: old sourceProgram = %d", pC->as+z, pC->xDec[z].decodeStatus.sourceProgram));
-
-    if (pC->xInp[zI].hRxSio) {
-        DEC_Handle dec;
-
-        if (errno = SIO_idle (pC->xInp[zI].hRxSio))
-            return errno;
-
-        // indicates (primary) input not running
-        pC->xDec[z].decodeStatus.sourceDecode = PAF_SOURCE_NONE;
-
-        pC->xInp[zI].inpBufConfig.deliverZeros = 1;
-
-        // will be changed after next reclaim, to PAF_SOURCE_UNKNOWN or other
-        pC->xDec[z].decodeStatus.sourceProgram = PAF_SOURCE_NONE;
-
-        if (decAlg[z]->fxns->algDeactivate)
-            decAlg[z]->fxns->algDeactivate (decAlg[z]);
-
-        decAlg[z] = pC->xDec[z].decAlg[PAF_SOURCE_PCM];
-        dec = (DEC_Handle )decAlg[z];
-
-        TRACE_TIME((&TIME_MOD, "AS%d: PAF_AST_decodeHandleErrorInput: resetting to PCM decoder",
-                    pC->as+z));
-
-        if (decAlg[z]->fxns->algActivate)
-            decAlg[z]->fxns->algActivate (decAlg[z]);
-
-        if (dec->fxns->reset
-            && (errno = dec->fxns->reset (dec, NULL,
-                                          &pC->xDec[z].decodeControl, &pC->xDec[z].decodeStatus)))
-            return errno;
-    }
-
-    return errno;
-} //PAF_AST_decodeHandleErrorInput
-#endif
-
 #if (CURRENT_TRACE_MASK & TRACE_MASK_DATA)
 
 //------------------------------------------------------------------------------
@@ -3792,7 +3630,7 @@ void as_traceChannels(PAF_AST_Config *pC, int z)
 #endif
 
 // Compute decoder frame length based on selected source
-static Int getFrameLengthSourceSel(
+Int getFrameLengthSourceSel(
     const PAF_ASIT_Params *pP, 
     Int8 sourceSelect
 )