diff --git a/pasdk/test_dsp/framework/audioStreamOutProc.c b/pasdk/test_dsp/framework/audioStreamOutProc.c
index 0aa46a6fe91daf0d8826fb10486b3baf2008d51d..310526facd17f0de65179b9fe8064c6ed4b44f59 100644 (file)
}
}
+/* No need to start-clocks here, since only selecting the device. */
+#if 0
// if device selected and valid then enable stat tracking if
// required and start clocking
if ((pAstCfg->xOut[z].outBufStatus.sioSelect < 0) && (pAstCfg->xOut[z].hTxSio))
}
}
}
+#endif
}
return errno;
} //PAF_ASOT_encodeCommand
//debug -- allow dynamic config
-Int16 gStrFrameLen=DEF_STR_FRAME_LEN; // stream frame length (PCM samples)
+//Int16 gStrFrameLen=DEF_STR_FRAME_LEN; // stream frame length (PCM samples)
// Purpose: Decoding Function for reinitializing the decoding process.
Int
for (z=DECODE1; z < DECODEN; z++)
{
- // FRAMELENGTH: pP->frameLength.
- // Formerly ASIT, now ASOT but same value (PAF_SYS_FRAMELENGTH).
- //
-
// Initialize decoder output circular buffer for stream reads
- //errno = cbInitStreamRead(pCbCtl, z, FRAMELENGTH); // use pP->frameLength from ASOT params
- errno = cbInitStreamRead(pCbCtl, z, gStrFrameLen);
+ //errno = cbInitStreamRead(pCbCtl, z, gStrFrameLen);
+ errno = cbInitStreamRead(pCbCtl, z);
if (errno)
{
TRACE_TERSE1("PAF_ASOT_decodeInit:cbInitStreamRead() error=%d", errno);
// Read decoder output circular buffer
//
pAfRd = pAstCfg->xStr[zS].pAudioFrame;
- //GPIOSetOutput(GPIO_PORT_0, GPIO_PIN_106); // debug
+ GPIOSetOutput(GPIO_PORT_0, GPIO_PIN_106); // debug
cbErrno = cbReadAf(pCbCtl, z, pAfRd);
- //GPIOClearOutput(GPIO_PORT_0, GPIO_PIN_106);
+ GPIOClearOutput(GPIO_PORT_0, GPIO_PIN_106);
if ((cbErrno < 0) &&
(cbErrno != ASP_DECOP_CB_AF_READ_UNDERFLOW) &&
(cbErrno != ASP_DECOP_CB_PCM_READ_UNDERFLOW))
PAF_AST_Config *pAstCfg;
Int as; /* Audio Stream Number (1, 2, etc.) */
Int z; /* output counter */
- Int errno,nbufs; /* error number */
+ Int errno,nbufs, errme; /* error number */
Int zE, zS, zX;
Int zMD;
PAF_SIO_IALG_Obj *pObj;
}
}
+// Need to Revisit: Starting Clocks here seems logical & also manages the McASP without spurious underruns .
+
+#if 1
+ // if device selected and valid then enable stat tracking if
+ // required and start clocking
+ if ((pAstCfg->xOut[z].outBufStatus.sioSelect < 0) && (pAstCfg->xOut[z].hTxSio))
+ {
+ TRACE_VERBOSE0("PAF_ASOT_startOutput: start SIO clocks");
+ errme = SIO_ctrl(pAstCfg->xOut[z].hTxSio, PAF_SIO_CONTROL_OUTPUT_START_CLOCKS, 0);
+ if (errno)
+ {
+ TRACE_VERBOSE2("PAF_ASOT_startOutput: errme 0x%x, errno 0x%x", errme, errno);
+ SIO_idle(pAstCfg->xOut[z].hTxSio);
+ if (!errno)
+ {
+ errno = ASPERR_DEVOUT + errme;
+ }
+ }
+ }
+#endif
// Set sample count so that DOB knows how much data to send
pAstCfg->xOut[z].outBufConfig.lengthofFrame =
pAstCfg->xEnc[zE].encodeInStruct.pAudioFrame->sampleCount;
return errno;
} //PAF_ASOT_stopOutput
-UInt32 gNumRateXCalc1=0;
-UInt32 gNumRateXCalc2=0;
-UInt32 gNumDobErrRateChange=0;
-Int gCheck[100];
-float gRateI[100];
-float gRateO[100];
-float gRateX[100];
-
// -----------------------------------------------------------------------------
// ASOT Decoding Function Helper - SIO Driver Change