From 2ad2e41097cbbc5b1db988be50ac9a1eb0fdd6a4 Mon Sep 17 00:00:00 2001 From: Frank Livingston Date: Thu, 8 Sep 2016 16:10:34 -0500 Subject: [PATCH] Fix various bugs: GateMP API usage Circular buffer cache problems ASIT/ASOT/ASDT custom parameters --- .../pasdk/common/aspDecOpCircBuf_common.c | 2 +- .../pasdk/common/aspDecOpCircBuf_common.h | 9 +- .../pasdk/test_arm/application/app.cfg | 9 +- .../framework/aspDecOpCircBuf_slave.c | 26 ++-- .../framework/audioStreamDecodeProc.c | 8 +- .../pasdk/test_arm/framework/systemInit.c | 5 +- .../pasdk/test_dsp/application/app.cfg | 9 +- .../framework/aspDecOpCircBuf_master.c | 138 +++++++++++++++++- .../framework/aspDecOpCircBuf_master.h | 5 + .../test_dsp/framework/audioStreamInpProc.c | 10 +- .../framework/audioStreamOutProc_paramsFxns.c | 1 - .../pasdk/test_dsp/framework/systemInit.c | 9 +- 12 files changed, 186 insertions(+), 45 deletions(-) diff --git a/processor_audio_sdk_1_00_00_00/pasdk/common/aspDecOpCircBuf_common.c b/processor_audio_sdk_1_00_00_00/pasdk/common/aspDecOpCircBuf_common.c index edf3b7c1..aab3e8cf 100644 --- a/processor_audio_sdk_1_00_00_00/pasdk/common/aspDecOpCircBuf_common.c +++ b/processor_audio_sdk_1_00_00_00/pasdk/common/aspDecOpCircBuf_common.c @@ -58,7 +58,7 @@ Int cbLog( key = GateMP_enter(gateHandle); // Get circular buffer base pointer - pCb = &pCbCtl->xDecOpCb[cbIdx]; + pCb = &(*pCbCtl->pXDecOpCb)[cbIdx]; // Invalidate circular buffer configuration. Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0); diff --git a/processor_audio_sdk_1_00_00_00/pasdk/common/aspDecOpCircBuf_common.h b/processor_audio_sdk_1_00_00_00/pasdk/common/aspDecOpCircBuf_common.h index 46d91f17..8b9994de 100644 --- a/processor_audio_sdk_1_00_00_00/pasdk/common/aspDecOpCircBuf_common.h +++ b/processor_audio_sdk_1_00_00_00/pasdk/common/aspDecOpCircBuf_common.h @@ -59,7 +59,8 @@ typedef struct PAF_AST_DecOpCircBuf { PAF_AudioFrame *afCb; // audio frame CB PAF_AudioData *pcmBuf; // PCM buffer, contains PCM data associated with audio frames - UInt8 *metaBuf; // metadata buffer, contains metadata associated with audio frames //QIN + UInt8 *metaBuf; // metadata buffer, contains metadata associated with audio frames + Int8 sourceSel; // selected source Int8 afRdIdx; // audio frame CB read index Int8 afWrtIdx; // audio frame CB write index Int16 pcmRdIdx; // pcm buffer read index @@ -77,14 +78,14 @@ typedef struct PAF_AST_DecOpCircBuf // Decoder output circular buffer control typedef struct PAF_AST_DecOpCircBufCtl { - GateMP_Handle gateHandle; // circular buffer gate handle - PAF_AST_DecOpCircBuf *xDecOpCb; // circular buffer base pointer + GateMP_Handle gateHandle; // circular buffer gate handle + PAF_AST_DecOpCircBuf **pXDecOpCb; // address of decoder output circular buffer base pointer } PAF_AST_DecOpCircBufCtl; // Initialize circular buffer control Int cbCtlInit( PAF_AST_DecOpCircBufCtl *pCbCtl, // decoder output circular buffer control - PAF_AST_DecOpCircBuf *xDecOpCb // decoder output circular buffer base pointer + PAF_AST_DecOpCircBuf **pXDecOpCb // address of decoder output circular buffer base pointer ); // Output log of circular buffer control variables (debug) diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_arm/application/app.cfg b/processor_audio_sdk_1_00_00_00/pasdk/test_arm/application/app.cfg index 517d3f97..9ac15959 100644 --- a/processor_audio_sdk_1_00_00_00/pasdk/test_arm/application/app.cfg +++ b/processor_audio_sdk_1_00_00_00/pasdk/test_arm/application/app.cfg @@ -65,6 +65,7 @@ var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem'); var Load = xdc.useModule('ti.sysbios.utils.Load'); var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup'); +var UIAEvt = xdc.useModule('ti.uia.events.UIAEvt'); xdc.useModule('ti.sdo.utils.MultiProc'); @@ -169,15 +170,15 @@ Clock.tickPeriod = 1000; // FL: measured period ~852 usec.?? /* Configure Logging */ LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE; -LoggingSetup.sysbiosTaskLogging = true; //true; +LoggingSetup.sysbiosTaskLogging = false; //true; LoggingSetup.sysbiosSwiLogging = false; // no Swi's in system -LoggingSetup.sysbiosHwiLogging = true; //true; -LoggingSetup.sysbiosLoggerSize = 16384; +LoggingSetup.sysbiosHwiLogging = false; //true; +//LoggingSetup.sysbiosLoggerSize = 16384; LoggingSetup.loadLogging = false; //true; LoggingSetup.mainLogging = true; // false; LoggingSetup.mainLoggingRuntimeControl = false; LoggingSetup.mainLoggerSize = 81960; -LoggingSetup.memorySectionName = "HOST_DDR3"; //"HOST_MSMC"; +//LoggingSetup.memorySectionName = "HOST_DDR3"; //"HOST_MSMC"; /* Configure Load Logging */ // FL: doesn't work diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/aspDecOpCircBuf_slave.c b/processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/aspDecOpCircBuf_slave.c index 16010b8e..750fe4df 100644 --- a/processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/aspDecOpCircBuf_slave.c +++ b/processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/aspDecOpCircBuf_slave.c @@ -35,8 +35,9 @@ All rights reserved. #include // for memset #include -#include #include +#include +#include #include "common.h" #include "paftyp.h" @@ -47,19 +48,26 @@ All rights reserved. // Initialize circular buffer control Int cbCtlInit( PAF_AST_DecOpCircBufCtl *pCbCtl, // decoder output circular buffer control - PAF_AST_DecOpCircBuf *xDecOpCb // decoder output circular buffer base pointer + PAF_AST_DecOpCircBuf **pXDecOpCb // address of decoder output circular buffer base pointer ) { GateMP_Handle gateHandle; Int status; - status = GateMP_open(ASP_DECODE_CB_GATE_NAME, &gateHandle); - if (status < 0) + do { + status = GateMP_open(ASP_DECODE_CB_GATE_NAME, &gateHandle); + } while (status == GateMP_E_NOTFOUND); + if (status == GateMP_S_SUCCESS) + { + pCbCtl->gateHandle = gateHandle; + } + else { + pCbCtl->gateHandle = NULL; return ASP_DECOP_CB_CTL_INIT_INV_GATE; } - pCbCtl->xDecOpCb = xDecOpCb; + pCbCtl->pXDecOpCb = pXDecOpCb; return ASP_DECOP_CB_SOK; @@ -84,7 +92,7 @@ Int cbWriteStart( key = GateMP_enter(gateHandle); // Get circular buffer base pointer - pCb = &pCbCtl->xDecOpCb[cbIdx]; + pCb = &((*pCbCtl->pXDecOpCb)[cbIdx]); // (***) FL: revisit // Invalidate circular buffer configuration. @@ -137,7 +145,7 @@ Int cbWriteStop( key = GateMP_enter(gateHandle); // Get circular buffer base pointer - pCb = &pCbCtl->xDecOpCb[cbIdx]; + pCb = &((*pCbCtl->pXDecOpCb)[cbIdx]); // Invalidate circular buffer configuration Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0); @@ -179,7 +187,7 @@ Int cbWriteAf( key = GateMP_enter(gateHandle); // Get circular buffer base pointer - pCb = &pCbCtl->xDecOpCb[cbIdx]; + pCb = &((*pCbCtl->pXDecOpCb)[cbIdx]); // (***) FL: revisit // Invalidate circular buffer configuration. @@ -318,7 +326,7 @@ Int cbGetNextWriteAf( key = GateMP_enter(gateHandle); // Get circular buffer base pointer - pCb = &pCbCtl->xDecOpCb[cbIdx]; + pCb = &((*pCbCtl->pXDecOpCb)[cbIdx]); // get pointer to current audio frame in circular buffer *ppAfWrt = &pCb->afCb[pCb->afWrtIdx]; diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/audioStreamDecodeProc.c b/processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/audioStreamDecodeProc.c index e7ab2ca2..71e24939 100644 --- a/processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/audioStreamDecodeProc.c +++ b/processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/audioStreamDecodeProc.c @@ -194,17 +194,19 @@ Void taskAsdpFxn( gSlaveStartCnt++; TRACE_MSG3("Rx ASP message, procId=%d, cmd=%d, messageId=0x%04x", pAspMsg->procId, pAspMsg->cmd, pAspMsg->messageId); + // invalidate AST shared configuration Cache_inv(pAstCfg, sizeof(PAF_AST_Config), Cache_Type_ALLD, 0); // FL: no need to share this pointer, can be local //Cache_inv(&pC, sizeof(PAF_AST_Config *), Cache_Type_ALLD, 0); Cache_wait(); // (***) FL: revisit - // invalidate Dec configuration + // invalidate Dec configuration for all Decoder zones Cache_inv(&pAstCfg->xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0); Cache_wait(); // (***) FL: revisit + // invalidate Beta Table status pointers Cache_inv((Ptr)(&IACP_STD_BETA_TABLE.pStatus[0]), 512*sizeof(IALG_Status *), Cache_Type_ALLD, 0); // invalidate entire beta table Cache_wait(); @@ -227,14 +229,14 @@ Void taskAsdpFxn( // // Initialize per parameterized phases. + // - Malloc: Memory Allocation + // - Config: Configuration Initialization // - AcpAlg: ACP Algorithm Initialization and Local Attachment // - Common: Common Algorithm Initialization // - AlgKey: Dec/Enc chain to Array Initialization // - Unused: (available) // - Unused: (available) // - Unused: (available) - // - Unused: (available) - // - Unused: (available) // LINNO_RPRT(TaskAsdp, -2); for (i=0; i < lengthof(pP->fxns->initPhase); i++) diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/systemInit.c b/processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/systemInit.c index dd6b2a10..c71d9fca 100644 --- a/processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/systemInit.c +++ b/processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/systemInit.c @@ -56,7 +56,7 @@ const PAFHJT_t *pafhjt; #ifdef RAM_REPORT #include #include -extern PAF_AST_Fxns PAF_ASDT_params_fxns; +extern PAF_ASDT_Fxns PAF_ASDT_params_fxns; #endif #include "aspMsg_common.h" @@ -101,7 +101,8 @@ Void taskSysInitFxn(Void) } /* Initialize decoder output circular buffer control */ - status = cbCtlInit(&gPAF_ASDT_config.decOpCircBufCtl, gPAF_AST_config.xDecOpCb); + Log_info0("taskSysInitFxn:cbCtlInit()"); + status = cbCtlInit(&gPAF_ASDT_config.decOpCircBufCtl, &gPAF_AST_config.xDecOpCb); if (status < 0) { Log_info1("%s: unable to initialize Decoder Output Circular Buffer Control. Exiting.", (IArg)__TASK_NAME__); diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/application/app.cfg b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/application/app.cfg index 1a065e56..4bbeb6b5 100644 --- a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/application/app.cfg +++ b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/application/app.cfg @@ -69,6 +69,7 @@ var Task = xdc.useModule('ti.sysbios.knl.Task'); var Load = xdc.useModule('ti.sysbios.utils.Load'); var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup'); +var UIAEvt = xdc.useModule('ti.uia.events.UIAEvt'); var ECM = xdc.useModule('ti.sysbios.family.c64p.EventCombiner'); @@ -174,15 +175,15 @@ Clock.tickPeriod = 1000; /* Configure Logging */ LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE; // LoggerType_JTAGRUNMODE -LoggingSetup.sysbiosTaskLogging = true; // true; +LoggingSetup.sysbiosTaskLogging = false; // true; LoggingSetup.sysbiosSwiLogging = false; -LoggingSetup.sysbiosHwiLogging = true; // true -LoggingSetup.sysbiosLoggerSize = 16384; +LoggingSetup.sysbiosHwiLogging = false; // true +//LoggingSetup.sysbiosLoggerSize = 16384; LoggingSetup.loadLogging = false; //true; LoggingSetup.mainLogging = true; LoggingSetup.mainLoggingRuntimeControl = false; LoggingSetup.mainLoggerSize = 81960; -LoggingSetup.memorySectionName = "CORE0_DDR3"; //"CORE0_MSMC"; +//LoggingSetup.memorySectionName = "CORE0_DDR3"; //"CORE0_MSMC"; /* Configure Load Logging */ // FL: doesn't work //Load.taskEnabled = true; diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c index e8c86a38..f970ec56 100644 --- a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c +++ b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c @@ -35,8 +35,9 @@ All rights reserved. #include // for memset() #include -#include #include +#include +#include #include #include "common.h" @@ -44,6 +45,10 @@ All rights reserved. #include "pafdec.h" #include "aspDecOpCircBuf_master.h" +#define DEF_SOURCE_SEL ( PAF_SOURCE_PCM ) // default source select +#define DEF_DEC_OP_FRAME_LEN ( 256 ) // default decoder output frame length +#define DEF_STR_FRAME_LEN ( 256 ) // default stream frame length + #define MAX_NUM_AF_PCM ( 4 ) #define CB_INIT_RD_LAG_PCM ( 2 ) // 0...3 @@ -60,7 +65,7 @@ static Void cbReadAfMute( // Initialize circular buffer control Int cbCtlInit( PAF_AST_DecOpCircBufCtl *pCbCtl, // decoder output circular buffer control - PAF_AST_DecOpCircBuf *xDecOpCb // decoder output circular buffer base pointer + PAF_AST_DecOpCircBuf **pXDecOpCb // address of decoder output circular buffer base pointer ) { GateMP_Params gateParams; @@ -82,7 +87,7 @@ Int cbCtlInit( return ASP_DECOP_CB_CTL_INIT_INV_GATE; } - pCbCtl->xDecOpCb = xDecOpCb; + pCbCtl->pXDecOpCb = pXDecOpCb; return ASP_DECOP_CB_SOK; @@ -90,6 +95,113 @@ Int cbCtlInit( // Initialize circular buffer Int cbInit( + PAF_AST_DecOpCircBuf *pCb +) +{ + PAF_AudioFrame *pAfCb; + PAF_AudioData *pPcmBuf; + UInt8 *pMetaBuf; + Int8 n; + Int8 i; + + // set source select + pCb->sourceSel = DEF_SOURCE_SEL; + + // set input frame length + pCb->decOpFrameLen = DEF_DEC_OP_FRAME_LEN; + + // set output frame length + pCb->strFrameLen = DEF_STR_FRAME_LEN; + + // initialize circular buffer maximum number of audio frames + pCb->maxNumAfCb = MAX_NUM_AF_PCM; + pCb->afWrtIdx = CB_INIT_RD_LAG_PCM; + pCb->afRdIdx = 0; + pCb->pcmRdIdx = 0; // 2*256 in behind + + // initialize audio frames + for (n=0; nmaxNumAfCb; n++) + { + pAfCb = &pCb->afCb[n]; + pAfCb->sampleDecode = PAF_SOURCE_PCM; + PAF_PROCESS_ZERO(pAfCb->sampleProcess); + pAfCb->sampleRate = PAF_SAMPLERATE_48000HZ; + pAfCb->sampleCount = DEF_DEC_OP_FRAME_LEN; + pAfCb->channelConfigurationRequest.full = 0; + pAfCb->channelConfigurationRequest.part.sat = PAF_CC_SAT_SURROUND4; + pAfCb->channelConfigurationRequest.part.sub = PAF_CC_SUB_ONE; + pAfCb->channelConfigurationStream.full = 0; + pAfCb->channelConfigurationStream.part.sat = PAF_CC_SAT_SURROUND4; + pAfCb->channelConfigurationStream.part.sub = PAF_CC_SUB_ONE; + } + + // initialize circular buffer current number of frames + pCb->numAfCb = pCb->afWrtIdx - pCb->afRdIdx; + + // initialize audio frame PCM buffers + pPcmBuf = pCb->pcmBuf; + pMetaBuf = pCb->metaBuf; //QIN + for (n=0; nmaxNumAfCb; n++) + { + pAfCb = &pCb->afCb[n]; + pAfCb->data.nChannels = ASP_DECOP_CB_MAX_NUM_PCM_CH; + pAfCb->data.nSamples = DEF_DEC_OP_FRAME_LEN; + for (i=0; idata.sample[i] = pPcmBuf; + memset(pAfCb->data.sample[i], DEF_DEC_OP_FRAME_LEN, 0); + pPcmBuf += DEF_DEC_OP_FRAME_LEN; + + pAfCb->data.samsiz[i] = 0; + } + + // Initialize metadata buffers //QIN + for (i=0; ipafPrivateMetadata[i].offset = 0; + pAfCb->pafPrivateMetadata[i].size = 0; + pAfCb->pafPrivateMetadata[i].pMdBuf = pMetaBuf; + pMetaBuf += PAF_MAX_PRIVATE_MD_SZ; + } + } + + // reset read/write flags + pCb->writerActiveFlag = 0; + pCb->readerActiveFlag = 0; + pCb->emptyFlag = 0; + + // reset error counts + pCb->errUndCnt = 0; + pCb->errOvrCnt = 0; + + // (***) FL: revisit + // Write back circular buffer configuration + Cache_wb(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0); + // Write back AF circular buffer + Cache_wb(pCb->afCb, pCb->maxNumAfCb*sizeof(PAF_AudioFrame), Cache_Type_ALLD, 0); + // Write back PCM data + for (n=0; nmaxNumAfCb; n++) + { + pAfCb = &pCb->afCb[n]; + Cache_wb(pAfCb->data.samsiz, ASP_DECOP_CB_MAX_NUM_PCM_CH*sizeof(PAF_AudioSize), Cache_Type_ALLD, 0); + Cache_wb(pAfCb->data.sample, ASP_DECOP_CB_MAX_NUM_PCM_CH*sizeof(PAF_AudioData *), Cache_Type_ALLD, 0); + for (i=0; idata.sample[i], DEF_DEC_OP_FRAME_LEN*sizeof(PAF_AudioData), Cache_Type_ALLD, 0); + } + // FL: unnecessary since part of AF + //for (i=0; ipafPrivateMetadata[i], sizeof(PAF_PrivateMetadata), Cache_Type_ALLD, 0); + //} + } + Cache_wait(); + + return ASP_DECOP_CB_SOK; +} + +// Initialize circular buffer based on selected source +Int cbInitSourceSel( PAF_AST_DecOpCircBufCtl *pCbCtl, // decoder output circular buffer control Int8 cbIdx, // decoder output circular buffer index Int8 sourceSelect, // source select (PCM, DDP, etc.) @@ -113,8 +225,15 @@ Int cbInit( key = GateMP_enter(gateHandle); // Get circular buffer base pointer - pCb = &pCbCtl->xDecOpCb[cbIdx]; + pCb = &((*pCbCtl->pXDecOpCb)[cbIdx]); + // Invalidate circular buffer configuration + Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0); + Cache_wait(); + + // set source select + pCb->sourceSel = sourceSelect; + // set input frame length pCb->decOpFrameLen = decOpFrameLen; @@ -213,6 +332,7 @@ Int cbInit( pCb->readerActiveFlag = 0; pCb->emptyFlag = 0; } + // reset error counts pCb->errUndCnt = 0; pCb->errOvrCnt = 0; @@ -262,7 +382,7 @@ Int cbReadStart( key = GateMP_enter(gateHandle); // Get circular buffer base pointer - pCb = &pCbCtl->xDecOpCb[cbIdx]; + pCb = &((*pCbCtl->pXDecOpCb)[cbIdx]); // Invalidate circular buffer configuration Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0); @@ -298,7 +418,7 @@ Int cbReadStop( key = GateMP_enter(gateHandle); // Get circular buffer base pointer - pCb = &pCbCtl->xDecOpCb[cbIdx]; + pCb = &((*pCbCtl->pXDecOpCb)[cbIdx]); // Invalidate circular buffer configuration Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0); @@ -339,7 +459,7 @@ Int cbReadAf( key = GateMP_enter(gateHandle); // Get circular buffer base pointer - pCb = &pCbCtl->xDecOpCb[cbIdx]; + pCb = &((*pCbCtl->pXDecOpCb)[cbIdx]); // (***) FL: revisit // Invalidate circular buffer configuration. @@ -372,7 +492,9 @@ Int cbReadAf( return ASP_DECOP_CB_SOK; } - + + // (writerActiveFlag,emptyFlag)=(1,0) and (0,1) are left + // Here we are checking (1,0) state here if ((pCb->writerActiveFlag == 1)) { // check underflow diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/aspDecOpCircBuf_master.h b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/aspDecOpCircBuf_master.h index eb4e89b8..0fcd36e7 100644 --- a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/aspDecOpCircBuf_master.h +++ b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/aspDecOpCircBuf_master.h @@ -47,6 +47,11 @@ All rights reserved. // Initialize circular buffer Int cbInit( + PAF_AST_DecOpCircBuf *pCb +); + +// Initialize circular buffer for selected source +Int cbInitSoureSel( PAF_AST_DecOpCircBufCtl *pCbCtl, // decoder output circular buffer control Int8 cbIdx, // decoder output circular buffer index Int8 sourceSelect, // source select (PCM, DDP, etc.) diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamInpProc.c b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamInpProc.c index 5209f704..98355970 100644 --- a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamInpProc.c +++ b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamInpProc.c @@ -438,14 +438,14 @@ Void taskAsipFxn( } // (***) FL: revisit - // write back configuration + // write back AST shared configuration Cache_wb(pAstCfg, sizeof(PAF_AST_Config), Cache_Type_ALLD, 0); // FL: no need to share this pointer, can be local //Cache_wb(&pC, sizeof(PAF_AST_Config *), Cache_Type_ALLD, 0); Cache_wait(); // (***) FL: revisit - // write Dec configuration + // write back Dec configuration Cache_wb(&pAstCfg->xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0); Cache_wait(); @@ -1400,14 +1400,12 @@ PAF_ASIT_initPhaseDecOpCircBuf( // (***) FL: revisit, here PCM is hard-coded for 256 sample dec op frame length // Initialize decoder output circular buffer for PCM - errno = cbInit(pCbCtl, z, PAF_SOURCE_PCM, 256, FRAMELENGTH, 1); + errno = cbInit(pCb); if (errno) { SW_BREAKPOINT; // FL: debug return errno; } - // FL: debug - cbLog(pCbCtl, z, 1, "PAF_ASIT_initPhaseDecOpCircBuf:cbInit"); } return 0; @@ -2443,7 +2441,7 @@ PAF_ASIT_decodeInit( //pC->xDec[z].decodeControl.rdSampleCount = 0; // Initialize decoder output circular buffer for selected source - errno = cbInit(pCbCtl, z, sourceSelect, frameLength, FRAMELENGTH, 0); + errno = cbInitSourceSel(pCbCtl, z, sourceSelect, frameLength, FRAMELENGTH); if (errno) { SW_BREAKPOINT; // FL: debug diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamOutProc_paramsFxns.c b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamOutProc_paramsFxns.c index 20dfaf36..0fdb01cd 100644 --- a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamOutProc_paramsFxns.c +++ b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamOutProc_paramsFxns.c @@ -40,7 +40,6 @@ All rights reserved. #include #include "as0.h" -#include "audioStreamInpProc.h" #include "audioStreamOutProc.h" // ............................................................................. diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/systemInit.c b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/systemInit.c index f5e1a744..4653122d 100644 --- a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/systemInit.c +++ b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/systemInit.c @@ -52,6 +52,8 @@ All rights reserved. #include "aspDecOpCircBuf_master.h" #include "audioStreamProc_master.h" // ASIT/ASOT config #include "audioStreamProc_common.h" // ASIT/ASOT/ASDT config +#include "audioStreamInpProc.h" +#include "audioStreamOutProc.h" #include "fwkSim.h" extern Void ACP_main_cus(Void); // (*** ?) FL: revisit -- check method of patching alpha codes @@ -63,8 +65,8 @@ const PAFHJT_t *pafhjt; #ifdef RAM_REPORT #include #include -extern PAF_AST_Fxns PAF_ASIT_params_fxns; -extern PAF_AST_Fxns PAF_ASOT_params_fxns; +extern PAF_ASIT_Fxns PAF_ASIT_params_fxns; +extern PAF_ASOT_Fxns PAF_ASOT_params_fxns; #endif Int gSysInit=0; @@ -120,7 +122,8 @@ Void taskSysInitFxn(Void) } /* Initialize decoder output circular buffer control */ - status = cbCtlInit(&gPAF_ASPM_config.decOpCircBufCtl, gPAF_AST_config.xDecOpCb); + Log_info0("taskSysInitFxn:cbCtlInit()"); + status = cbCtlInit(&gPAF_ASPM_config.decOpCircBufCtl, &gPAF_AST_config.xDecOpCb); if (status < 0) { Log_info0("TaskSysInit: unable to initialize Decoder Output Circular Buffer Control. Exiting."); -- 2.26.2