PASDK-218:Update locations of functions on ARM for Out Init-Sync
authorFrank Livingston <frank-livingston@ti.com>
Fri, 30 Jun 2017 22:59:21 +0000 (17:59 -0500)
committerFrank Livingston <frank-livingston@ti.com>
Fri, 30 Jun 2017 22:59:21 +0000 (17:59 -0500)
pasdk/test_arm/framework/audioStreamDecodeProc.c

index b2bb68430321e5d19f643ab2c471baa729da8702..54ef3c31e390896c51a4ea26ad8c897aa5b62199 100644 (file)
@@ -547,6 +547,17 @@ Void taskAsdpFxn(
                     if (dec->fxns->reset)
                     {
                         errno = dec->fxns->reset(dec, NULL, &pAstCfg->xDec[z].decodeControl, &pAstCfg->xDec[z].decodeStatus);
+
+                        // Perform Dec Reset Init-Sync
+                        //  - Write Dec Reset output audio frame
+                        //  - Set Dec Reset decoder stage flag
+                        pOutIsAfWrt = pAstCfg->xDec[z].decodeControl.pAudioFrame; // get pointer to audio frame to write
+                        outIsErrno = outIsWriteDecStageFlagAndAf(pOutIsCtl, z, 
+                            ASP_OUTIS_DEC_STAGE_RESET_IDX, 1, pOutIsAfWrt);
+                        if (outIsErrno < 0)
+                        {
+                            SW_BREAKPOINT; // debug
+                        }
                     }
 
                     // write back Dec configuration
@@ -563,17 +574,6 @@ Void taskAsdpFxn(
                     Cache_wbInv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
                     Cache_wait();*/
 
-                    // Perform Dec Reset Init-Sync
-                    //  - Write Dec Reset output audio frame
-                    //  - Set Dec Reset decoder stage flag
-                    pOutIsAfWrt = pAstCfg->xDec[z].decodeControl.pAudioFrame; // get pointer to audio frame to write
-                    outIsErrno = outIsWriteDecStageFlagAndAf(pOutIsCtl, z, 
-                        ASP_OUTIS_DEC_STAGE_RESET_IDX, 1, pOutIsAfWrt);
-                    if (outIsErrno < 0)
-                    {
-                        SW_BREAKPOINT; // debug
-                    }
-                    
                     // send dec reset complete message to master
                     queId = MessageQ_getReplyQueue(pAspMsg);
                     pAspMsg->procId = hAspMsgSlave->slaveProcId;
@@ -649,6 +649,21 @@ Void taskAsdpFxn(
                         pfpBegin(PFP_ID_ASDT_1, pAsdtCfg->taskHandle);
                         errno = dec->fxns->info(dec, NULL, &pAstCfg->xDec[z].decodeControl, &pAstCfg->xDec[z].decodeStatus);
                         pfpEnd(PFP_ID_ASDT_1, PFP_FINISH_MEAS);
+
+                        if (outIsDecInfo1Flag == 0)
+                        {
+                            // Perform Dec Info Init-Sync
+                            //  - Write Dec Info1 output audio frame
+                            //  - Set Dec Info1 decoder stage flag
+                            pOutIsAfWrt = pAstCfg->xDec[z].decodeControl.pAudioFrame; // get pointer to audio frame to write
+                            outIsErrno = outIsWriteDecStageFlagAndAf(pOutIsCtl, z, 
+                                ASP_OUTIS_DEC_STAGE_INFO1_IDX, 1, pOutIsAfWrt);
+                            if (outIsErrno < 0)
+                            {
+                                SW_BREAKPOINT; // debug
+                            }
+                            outIsDecInfo1Flag = 1; // set flag to indicate OutIS Dec Info has executed
+                        }
                     }
                     
                     // write back Dec configuration
@@ -675,21 +690,6 @@ Void taskAsdpFxn(
                     }
 #endif
 
-                    if (outIsDecInfo1Flag == 0)
-                    {
-                        // Perform Dec Info Init-Sync
-                        //  - Write Dec Info1 output audio frame
-                        //  - Set Dec Info1 decoder stage flag
-                        pOutIsAfWrt = pAstCfg->xDec[z].decodeControl.pAudioFrame; // get pointer to audio frame to write
-                        outIsErrno = outIsWriteDecStageFlagAndAf(pOutIsCtl, z, 
-                            ASP_OUTIS_DEC_STAGE_INFO1_IDX, 1, pOutIsAfWrt);
-                        if (outIsErrno < 0)
-                        {
-                            SW_BREAKPOINT; // debug
-                        }
-                        outIsDecInfo1Flag = 1; // set flag to indicate OutIS Dec Info has executed
-                    }
-
                     // send dec info complete message to master
                     queId = MessageQ_getReplyQueue(pAspMsg);
                     pAspMsg->procId = hAspMsgSlave->slaveProcId;