PASDK-53: This commit for cleaner input handling, also brings decoders back into...
authorGovind Jeyaram <govind.j@ti.com>
Thu, 16 Feb 2017 22:16:23 +0000 (14:16 -0800)
committerGovind Jeyaram <govind.j@ti.com>
Thu, 16 Feb 2017 22:16:23 +0000 (14:16 -0800)
BugFix in PAF_ASIT_decodeProcessing owing to the newer "statusOp_read"

pasdk/test_dsp/framework/audioStreamInpProc.c

index 000c4b10616b41a8f0e254199517a82bf0703431..a6ef9976e34faa2499c5937931801e9946d2186d 100644 (file)
@@ -2054,7 +2054,13 @@ PAF_ASIT_decodeProcessing(
 
     for (;;) 
     {
-        if (tempVar8 == PAF_SOURCE_NONE)
+         statusOp_read(&tempVar8,
+                         &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+                         sizeof(tempVar8),
+                         GATEMP_INDEX_DEC);
+           // TRACE_TERSE1("PAF_ASIT_decodeProcessing: sourceSelect is %d", tempVar8);
+
+       if (tempVar8 == PAF_SOURCE_NONE)
         {
 #else
     TRACE_TERSE1("PAF_ASIT_decodeProcessing: sourceSelect is %d", pAstCfg->xDec[zMD].decodeStatus.sourceSelect);
@@ -2106,11 +2112,13 @@ PAF_ASIT_decodeProcessing(
                 // write back Status structures for shared Beta Units
                 //size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]->size;
                 //Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]), size, Cache_Type_ALLD, 0);
-                /*size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]->size;
+                size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]->size;
                 Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]), size, Cache_Type_ALLD, 0);
                 size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]->size;
                 Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
-                Cache_wait();*/
+                size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]->size;
+                Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]), size, Cache_Type_ALLD, 0);
+                Cache_wait();
 #endif
 #if 0
                 ////size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]->size;
@@ -2133,11 +2141,13 @@ PAF_ASIT_decodeProcessing(
                 // invalidate Status structures for shared Beta Units
                 //size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]->size;
                 //Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]), size, Cache_Type_ALLD, 0);
-               /* size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]->size;
+                size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]->size;
                 Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]), size, Cache_Type_ALLD, 0);
                 size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]->size;
                 Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
-                Cache_wait();*/
+                size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]->size;
+                Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]), size, Cache_Type_ALLD, 0);
+                Cache_wait();
 #endif
                 
                 frame = 0;
@@ -2180,7 +2190,6 @@ PAF_ASIT_decodeProcessing(
 #endif                
 
 
-#if 0 // (***) FL: debug
 #ifdef NON_CACHE_STATUS
                 statusOp_read(&tempVar8,
                               &(pAstCfg->xDec[zMD].decodeStatus.sourceDecode),
@@ -2234,7 +2243,6 @@ PAF_ASIT_decodeProcessing(
                     state = INFO1;
                     continue;
                 }
-#endif // (***) FL: debug         
                 TRACE_VERBOSE1("PAF_ASIT_decodeProcessing: INFO1: frame %d, major access unit found", frame);
 
                 // Establish secondary timing
@@ -2562,7 +2570,6 @@ PAF_ASIT_decodeInit(
             Int frameLength;
             TRACE_VERBOSE1("AS%d: PAF_ASIT_decodeInit: initializing decode", as+zS);
 
-#if 0 // (***) FL: debug
             // write back Dec configuration
             Cache_wb(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
@@ -2681,7 +2688,6 @@ PAF_ASIT_decodeInit(
             // invalidate Dec configuration
             Cache_inv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
-#endif // (***) FL: debug
             
 #if 0 // FL: decoder reset call, slave
             if (dec->fxns->reset
@@ -2925,7 +2931,7 @@ PAF_ASIT_decodeInfo(
         // FL: debug, capture input buffer
         capIb(pAstCfg->xInp[zMI].pInpBuf);
         gcapIb_cnt++;
-        
+#if 0
         {
             static Uint8 toggleState = 0;
             if (toggleState == 0)
@@ -2934,7 +2940,7 @@ PAF_ASIT_decodeInfo(
                 GPIOClearOutput(GPIO_PORT_0, GPIO_PIN_99);
             toggleState = ~(toggleState);
         }
-        
+#endif
         //
         // Simulate Rx SIO_reclaim() pend
         //
@@ -2972,7 +2978,6 @@ PAF_ASIT_decodeInfo(
                 return errno;
             }
 
-#if 0 // (***) FL: debug
 #if 1
             // (***) FL: revisit
             // write back Inp configuration
@@ -3038,7 +3043,6 @@ PAF_ASIT_decodeInfo(
             Cache_inv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();                            
 #endif            
-#endif // (***) FL: debug
             
 #if 0 // FL: decoder info call, slave
             if (dec->fxns->info
@@ -3368,7 +3372,6 @@ PAF_ASIT_decodeDecode(
             // FL: debug, capture input buffer
             //capIbPcm(pAstCfg->xInp[z].pInpBuf);
             
-#if 0 // (***) FL: debug
             // (***) FL: revisit
             // write back Dec configuration
             Cache_wb(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
@@ -3437,8 +3440,7 @@ PAF_ASIT_decodeDecode(
             // invalidate Dec configuration
             Cache_inv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
-#endif // (***) FL: debug
-           errno = 0;
+
 #if 0 // FL: decoder decode call, slave
             if (dec->fxns->decode
                 && (errno = dec->fxns->decode (dec, NULL,