summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4d3eb44)
raw | patch | inline | side by side (parent: 4d3eb44)
author | Frank Livingston <frank-livingston@ti.com> | |
Sun, 4 Sep 2016 14:51:18 +0000 (09:51 -0500) | ||
committer | Frank Livingston <frank-livingston@ti.com> | |
Sun, 4 Sep 2016 14:51:18 +0000 (09:51 -0500) |
- Change pC (AST configuration pointer) to local pointer for each AS task
- Change location of Decoder Output Circular Buffer in AST configuration
- Add separate initPhase in ASIT for Decoder Output Circular Buffer
- Change location of Decoder Output Circular Buffer in AST configuration
- Add separate initPhase in ASIT for Decoder Output Circular Buffer
diff --git a/processor_audio_sdk_1_00_00_00/pasdk/common/audioStreamProc_common.c b/processor_audio_sdk_1_00_00_00/pasdk/common/audioStreamProc_common.c
index 85ac046cf7a404ba6304b4bb899ffe8bdb7a148a..738c5e36c9edf541d79c2bb2697c02c125fb87fa 100644 (file)
// Task data
#ifndef _TMS320C6X
PAF_AST_Config gPAF_AST_config __attribute__ ((section(".globalSectionPafAstConfig"))); /* Global configuration */
-PAF_AST_Config *pC __attribute__ ((section(".globalSectionPafAstConfig"))); /* Global configuration pointer */
+//PAF_AST_Config *pC __attribute__ ((section(".globalSectionPafAstConfig"))); /* Global configuration pointer */
#else
#pragma DATA_SECTION(gPAF_AST_config, ".globalSectionPafAstConfig")
#pragma DATA_SECTION(pC, ".globalSectionPafAstConfig")
PAF_AST_Config gPAF_AST_config; /* Global configuration */
-far PAF_AST_Config *pC; /* Global configuration pointer */
+//far PAF_AST_Config *pC; /* Global configuration pointer */
#endif
diff --git a/processor_audio_sdk_1_00_00_00/pasdk/common/audioStreamProc_config.h b/processor_audio_sdk_1_00_00_00/pasdk/common/audioStreamProc_config.h
index 53ed9b04e2b3d5fe42477f6a34f3728910fd0c38..0011b8134446d7b354fc11d5efee47879a51b325 100644 (file)
PAF_ASP_Chain decChainData;
ALG_Handle decAlg[PAF_SOURCE_N];
PAF_AudioFrame *pAudioFrame;
- PAF_DecodeOpCircBuf decOpCb;
} PAF_AST_Decode;
typedef struct PAF_AST_Stream {
#endif
typedef struct PAF_AST_Config {
- Int as;
- ACP_Handle acp;
- ACP_Handle acpSlave;
- PAF_AST_InpBuf *xInp; /* INPUT1 -INPUTN */
- PAF_AST_Decode *xDec; /* DECODE1-DECODEN */
- PAF_AST_Stream *xStr; /* STREAM1-STREAMN */
- PAF_AST_Encode *xEnc; /* ENCODE1-ENCODEN */
- PAF_AST_OutBuf *xOut; /* OUTPUT1-OUTPUTN */
- SmInt masterDec; // these two are computer based on MASTER input
- SmInt masterStr;
+ Int as;
+ ACP_Handle acp;
+ ACP_Handle acpSlave;
+ PAF_AST_InpBuf *xInp; /* INPUT1 -INPUTN */
+ PAF_AST_Decode *xDec; /* DECODE1-DECODEN */
+ PAF_AST_Stream *xStr; /* STREAM1-STREAMN */
+ PAF_AST_Encode *xEnc; /* ENCODE1-ENCODEN */
+ PAF_AST_OutBuf *xOut; /* OUTPUT1-OUTPUTN */
+ PAF_AST_DecOpCircBuf *xDecOpCb; /* DECODE1-DECODEN */
+ SmInt masterDec; // these two are computer based on MASTER input
+ SmInt masterStr;
#ifdef HSE_MSGQ
- PAF_AST_MQ mq;
+ PAF_AST_MQ mq;
#endif
} PAF_AST_Config;
diff --git a/processor_audio_sdk_1_00_00_00/pasdk/common/paf_decOpCircBuf.c b/processor_audio_sdk_1_00_00_00/pasdk/common/paf_decOpCircBuf.c
index 565bea45b973000df3fbc878dc2fe5e30b38ee35..edd1d35479a7d83988601dd29e0b786cd32754bc 100644 (file)
Int8 sourceSelect, // source select (PCM, DDP, etc.)
Int16 decOpFrameLen, // decoder output frame length (PCM samples)
Int16 strFrameLen, // stream frame length (PCM samples)
- PAF_DecodeOpCircBuf *pCb, // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb, // decoder output circular buffer
Int8 resetRwFlags // whether to reset reader, writer, and empty flags
)
{
// (***) FL: revisit
// Write back circular buffer configuration
- Cache_wb(pCb, sizeof(PAF_DecodeOpCircBuf), Cache_Type_ALLD, 0);
+ 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
// Start writes to circular buffer
Int cbWriteStart(
- PAF_DecodeOpCircBuf *pCb // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb // decoder output circular buffer
)
{
PAF_AudioFrame *pAfCb;
// (***) FL: revisit
// Invalidate circular buffer configuration.
// NOTE: Probably only a subset of this information needs to be updated.
- Cache_inv(pCb, sizeof(PAF_DecodeOpCircBuf), Cache_Type_ALLD, 0);
+ Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
Cache_wait();
// Invalidate AF circular buffer
// (***) FL: revisit
// Write back circular buffer configuration
- Cache_wb(pCb, sizeof(PAF_DecodeOpCircBuf), Cache_Type_ALLD, 0);
+ Cache_wb(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
Cache_wait();
return PAF_DECOP_CB_SOK;
// Stop writes to circular buffer
Int cbWriteStop(
- PAF_DecodeOpCircBuf *pCb // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb // decoder output circular buffer
)
{
// Invalidate circular buffer configuration
- Cache_inv(pCb, sizeof(PAF_DecodeOpCircBuf), Cache_Type_ALLD, 0);
+ Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
Cache_wait();
// update flags
// (***) FL: revisit
// Write back circular buffer configuration
- Cache_wb(pCb, sizeof(PAF_DecodeOpCircBuf), Cache_Type_ALLD, 0);
+ Cache_wb(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
Cache_wait();
return PAF_DECOP_CB_SOK;
// Start reads from circular buffer
Int cbReadStart(
- PAF_DecodeOpCircBuf *pCb // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb // decoder output circular buffer
)
{
// Invalidate circular buffer configuration
- Cache_inv(pCb, sizeof(PAF_DecodeOpCircBuf), Cache_Type_ALLD, 0);
+ Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
Cache_wait();
// update flags
// (***) FL: revisit
// Write back circular buffer configuration
- Cache_wb(pCb, sizeof(PAF_DecodeOpCircBuf), Cache_Type_ALLD, 0);
+ Cache_wb(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
Cache_wait();
return PAF_DECOP_CB_SOK;
// Stop reads from circular buffer
Int cbReadStop(
- PAF_DecodeOpCircBuf *pCb // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb // decoder output circular buffer
)
{
// Invalidate circular buffer configuration
- Cache_inv(pCb, sizeof(PAF_DecodeOpCircBuf), Cache_Type_ALLD, 0);
+ Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
Cache_wait();
// update flags
// (***) FL: revisit
// Write back circular buffer configuration
- Cache_wb(pCb, sizeof(PAF_DecodeOpCircBuf), Cache_Type_ALLD, 0);
+ Cache_wb(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
Cache_wait();
return PAF_DECOP_CB_SOK;
// Read audio frame from circular buffer
Int cbReadAf(
- PAF_DecodeOpCircBuf *pCb, // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb, // decoder output circular buffer
PAF_AudioFrame *pAfRd // audio frame into which to read
)
{
// (***) FL: revisit
// Invalidate circular buffer configuration.
- Cache_inv(pCb, sizeof(PAF_DecodeOpCircBuf), Cache_Type_ALLD, 0);
+ Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
Cache_wait();
if ((pCb->writerActiveFlag == 1) && (pCb->emptyFlag == 1))
//SW_BREAKPOINT; // FL: debug
// Write back circular buffer configuration.
- Cache_wb(pCb, sizeof(PAF_DecodeOpCircBuf), Cache_Type_ALLD, 0);
+ Cache_wb(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
Cache_wait();
return PAF_DECOP_CB_READ_UNDERFLOW;
// (***) FL: revisit
// Write back circular buffer configuration.
// NOTE: Probably only a subset of this information needs to be updated.
- Cache_wb(pCb, sizeof(PAF_DecodeOpCircBuf), Cache_Type_ALLD, 0);
+ Cache_wb(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
Cache_wait();
return PAF_DECOP_CB_SOK;
// Write audio frame to circular buffer
Int cbWriteAf(
- PAF_DecodeOpCircBuf *pCb, // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb, // decoder output circular buffer
PAF_AudioFrame *pAfWrt // audio frame from which to write
)
{
// (***) FL: revisit
// Invalidate circular buffer configuration.
// NOTE: Probably only a subset of this information nexeds to be updated.
- Cache_inv(pCb, sizeof(PAF_DecodeOpCircBuf), Cache_Type_ALLD, 0);
+ Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
Cache_wait();
if (pCb->readerActiveFlag == 1)
// (***) FL: revisit
// Write back circular buffer configuration
- Cache_wb(pCb, sizeof(PAF_DecodeOpCircBuf), Cache_Type_ALLD, 0);
+ Cache_wb(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
// write back audio frame
Cache_wb(pAfCb, sizeof(PAF_AudioFrame), Cache_Type_ALLD, 0);
Cache_wb(pAfCb->data.samsiz, PAF_DECOP_CB_MAX_NUM_PCM_CH*sizeof(PAF_AudioSize), Cache_Type_ALLD, 0);
// Get next audio frame to write in circular buffer
Int cbGetNextWriteAf(
- PAF_DecodeOpCircBuf *pCb, // decoder output circular buffer
- PAF_AudioFrame **ppAfWrt // audio frame next to be written
+ PAF_AST_DecOpCircBuf *pCb, // decoder output circular buffer
+ PAF_AudioFrame **ppAfWrt // audio frame next to be written
)
{
// get pointer to current audio frame in circular buffer
// Output log of circular buffer control variables (debug)
Int cbLog(
- PAF_DecodeOpCircBuf *pCb,
+ PAF_AST_DecOpCircBuf *pCb,
Int8 fullLog,
char *locInfo
)
}
pAfRd->data.samsiz[i] = 0;
}
-}
\ No newline at end of file
+}
diff --git a/processor_audio_sdk_1_00_00_00/pasdk/common/paf_decOpCircBuf.h b/processor_audio_sdk_1_00_00_00/pasdk/common/paf_decOpCircBuf.h
index b7bcf6c3e1cec9e80b83776fade6975337d804c5..d721228f8d31d979b1a248e1bc8363b147ea9e79 100644 (file)
#define PAF_DECOP_CB_PCM_BUF_SZ ( PAF_DECOP_CB_MAX_NUM_PCM_CH * PAF_DECOP_CB_MAX_NUM_PCM_FRAMES * PAF_DECOP_CB_MAX_PCM_FRAME_LEN )
// Decoder output circular buffer
-typedef struct PAF_DecodeOpCircBuf {
- PAF_AudioFrame *afCb; // audio frame CB
- PAF_AudioData *pcmBuf; // PCM buffer, contains PCM data associated with audio frames
- Int8 *metaBuf; // metafdata buffer, contains metadata associated with audio frames //QIN
- Int8 afRdIdx; // audio frame CB read index
- Int8 afWrtIdx; // audio frame CB write index
- Int16 pcmRdIdx; // pcm buffer read index
- Int8 numAfCb; // current number frames in CB
- Int8 maxNumAfCb; // maximum number of audio frames in CB
- Int16 decOpFrameLen; // selected decoder output frame length (input transaction size)
- Int16 strFrameLen; // stream frame length (output transaction size)
- Int8 writerActiveFlag; // flag indicates whether CB writer is active
- Int8 readerActiveFlag; // flag indicates whether CB reader is active
- Int8 emptyFlag; // flag indicates whether reader should empty (drain) remaining frames in CB
- Int8 errUndCnt; // underflow count
- Int8 errOvrCnt; // overflow count
-} PAF_DecodeOpCircBuf;
+typedef struct PAF_AST_DecOpCircBuf
+{
+ PAF_AudioFrame *afCb; // audio frame CB
+ PAF_AudioData *pcmBuf; // PCM buffer, contains PCM data associated with audio frames
+ Int8 *metaBuf; // metafdata buffer, contains metadata associated with audio frames //QIN
+ Int8 afRdIdx; // audio frame CB read index
+ Int8 afWrtIdx; // audio frame CB write index
+ Int16 pcmRdIdx; // pcm buffer read index
+ Int8 numAfCb; // current number frames in CB
+ Int8 maxNumAfCb; // maximum number of audio frames in CB
+ Int16 decOpFrameLen; // selected decoder output frame length (input transaction size)
+ Int16 strFrameLen; // stream frame length (output transaction size)
+ Int8 writerActiveFlag; // flag indicates whether CB writer is active
+ Int8 readerActiveFlag; // flag indicates whether CB reader is active
+ Int8 emptyFlag; // flag indicates whether reader should empty (drain) remaining frames in CB
+ Int8 errUndCnt; // underflow count
+ Int8 errOvrCnt; // overflow count
+} PAF_AST_DecOpCircBuf;
// Initialize circular buffer
Int cbInit(
Int8 sourceSelect, // source select (PCM, DDP, etc.)
Int16 decOpFrameLen, // decoder output frame length (PCM samples)
Int16 strFrameLen, // stream frame length (PCM samples)
- PAF_DecodeOpCircBuf *pCb, // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb, // decoder output circular buffer
Int8 resetRwFlags // whether to reset reader, writer, and empty flags
);
// Start writes to circular buffer
Int cbWriteStart(
- PAF_DecodeOpCircBuf *pCb // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb // decoder output circular buffer
);
// Stop writes to circular buffer
Int cbWriteStop(
- PAF_DecodeOpCircBuf *pCb // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb // decoder output circular buffer
);
// Start reads from circular buffer
Int cbReadStart(
- PAF_DecodeOpCircBuf *pCb // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb // decoder output circular buffer
);
// Stop reads from circular buffer
Int cbReadStop(
- PAF_DecodeOpCircBuf *pCb // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb // decoder output circular buffer
);
// Read audio frame from circular buffer
Int cbReadAf(
- PAF_DecodeOpCircBuf *pCb, // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb, // decoder output circular buffer
PAF_AudioFrame *pAfRd // audio frame into which to read
);
// Write audio frame to circular buffer
Int cbWriteAf(
- PAF_DecodeOpCircBuf *pCb, // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb, // decoder output circular buffer
PAF_AudioFrame *pAfWrt // audio frame from which to write
);
// Get next audio frame to write in circular buffer
Int cbGetNextWriteAf(
- PAF_DecodeOpCircBuf *pCb, // decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb, // decoder output circular buffer
PAF_AudioFrame **ppAfWrt // audio frame next to be written
);
// Output log of circular buffer control variables (debug)
Int cbLog(
- PAF_DecodeOpCircBuf *pCb,
+ PAF_AST_DecOpCircBuf *pCb,
Int8 fullLog,
char *locInfo
);
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 63ba333f68859ac9df2fd2349bfb37cc5d838c55..993a2a82157b2b1957236a7923443a78ec8ebc0b 100644 (file)
const PAF_AST_Patchs *pQ
)
{
+ PAF_AST_Config *pC; /* Local configuration pointer */
Int as; /* Audio Stream Number (1, 2, etc.) */
Int z; /* input/encode/stream/decode/output counter */
Int i; /* phase */
Int size;
Int argIdx;
// Decoder output circular buffer
- PAF_DecodeOpCircBuf *pCb;
+ PAF_AST_DecOpCircBuf *pCb;
PAF_AudioFrame *pAfWrt;
Int cbErrno;
// Messaging
TRACE_MSG3("Rx ASP message, procId=%d, cmd=%d, messageId=0x%04x", pAspMsg->procId, pAspMsg->cmd, pAspMsg->messageId);
Cache_inv(&gPAF_AST_config, sizeof(PAF_AST_Config), Cache_Type_ALLD, 0);
- Cache_inv(&pC, 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();
- if (!pC)
- {
- TRACE_TERSE0("TaskAsdp: No Configuration defined. Exiting.");
- LINNO_RPRT(TaskAsdp, -1);
- return;
- }
// (***) FL: revisit
// invalidate Dec configuration
// (***) FL: revisit
Cache_inv((Ptr)(&IACP_STD_BETA_TABLE.pStatus[0]), 512*sizeof(IALG_Status *), Cache_Type_ALLD, 0); // invalidate entire beta table
Cache_wait();
-
+
+ //
// Audio Framework Configuration (*pC):
+ //
+ pC = &gPAF_AST_config;
as = pC->as; // obtain audio stream number
+ TRACE_TERSE1("TaskAsdp: Started with AS%d.", as);
//
// Initialize message log trace and line number reporting
}
// Start writes to circular buffer
- pCb = &pC->xDec[z].decOpCb;
+ pCb = &pC->xDecOpCb[z];
cbErrno = cbWriteStart(pCb);
if (cbErrno < 0)
{
//TRACE_TERSE0("Dec:decode done");
// copy decoder output to decoder output circular buffers
- pCb = &pC->xDec[z].decOpCb;
+ pCb = &pC->xDecOpCb[z];
//TRACE_TERSE1("Dec:pCb=0x%04x", (IArg)pCb);
pAfWrt = pC->xDec[z].decodeOutStruct.pAudioFrame;
}
// Stop writes to circular buffer
- pCb = &pC->xDec[z].decOpCb;
+ pCb = &pC->xDecOpCb[z];
cbErrno = cbWriteStop(pCb);
if (cbErrno < 0)
{
diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/itopo/params.c b/processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/itopo/params.c
index ceb8118fbf7e8c03ff403da52c3d593bb576eeb3..2bbf88696f0a171a6ba0be54f470bc3677de5288 100644 (file)
// Audio Stream Processing Function Table Definition
//
-const PAF_AudioFunctions PAF_AST_params_audioFrameFunctions_Slave =
+const PAF_AudioFunctions PAF_ASDT_params_audioFrameFunctions =
{
&PAF_ASP_dB2ToLinear,
&PAF_ASP_channelMask,
4, // sourceKaraoke: both
0, // aspGearControl: unused
0, // aspGearStatus: unused
- 0, 0, 0, 0, // Unused
- 0, 0, 0, 0, // Unused
- 0, 0, 0, 0, // Unused
- 0, 0, 0, 0, // Unused
- 0, 0, 0, 0, // Unused
+ 0, 0, 0, 0, // Unused
+ 0, 0, 0, 0, // Unused
+ 0, 0, 0, 0, // Unused
+ 0, 0, 0, 0, // Unused
+ 0, 0, 0, 0, // Unused
0, // frameCount
0x40, // karaoka: Vocal 1 Level
0x40, // karaoka: Vocal 1 Pan
0x00, // karaoka: Melody Pan
0, // decBypass
0, // unused
- 0, // frameLength: reset later
- 1, // bufferRatio: unity
- PAF_IEC_PREEMPHASIS_UNKNOWN, // emphasis
- 0, // bufferDrift
- 0, 0,
- PAF_CC_SAT_SURROUND4, PAF_CC_SUB_ONE, PAF_CC_AUX_SURROUND4_UNKNOWN, 0, 0, 0, 0, 0,
+ 0, // frameLength: reset later
+ 1, // bufferRatio: unity
+ PAF_IEC_PREEMPHASIS_UNKNOWN, // emphasis
+ 0, // bufferDrift
+ 0, 0,
+ PAF_CC_SAT_SURROUND4, PAF_CC_SUB_ONE, PAF_CC_AUX_SURROUND4_UNKNOWN, 0, 0, 0, 0, 0,
// channelConfigurationRequest.full
- PAF_CC_SAT_UNKNOWN, PAF_CC_SUB_ZERO, 0, 0, 0, 0, 0, 0,
+ PAF_CC_SAT_UNKNOWN, PAF_CC_SUB_ZERO, 0, 0, 0, 0, 0, 0,
// channelConfigurationProgram.full
- PAF_CC_SAT_UNKNOWN, PAF_CC_SUB_ZERO, 0, 0, 0, 0, 0, 0,
+ PAF_CC_SAT_UNKNOWN, PAF_CC_SUB_ZERO, 0, 0, 0, 0, 0, 0,
// channelConfigurationDecode.full
- PAF_CC_SAT_UNKNOWN, PAF_CC_SUB_ZERO, 0, 0, 0, 0, 0, 0,
+ PAF_CC_SAT_UNKNOWN, PAF_CC_SUB_ZERO, 0, 0, 0, 0, 0, 0,
// channelConfigurationDownmix.full
- PAF_CC_SAT_UNKNOWN, PAF_CC_SUB_ZERO, 0, 0, 0, 0, 0, 0,
+ PAF_CC_SAT_UNKNOWN, PAF_CC_SUB_ZERO, 0, 0, 0, 0, 0, 0,
// channelConfigurationOverride.full
-3, // channelMap.from[0]
-3, // channelMap.from[1]
// FL: extern this, making it look like shared information between ARM/DSP.
// FL: Note could just define the same thing in separate file for ARM application (i.e. add "Slave" at end of identifier).
/* audio frame "width" in channels */
-const PAF_DecodeStatus *const PAF_AST_params_decodeStatus[] =
+const PAF_DecodeStatus *const PAF_ASDT_params_decodeStatus[] =
{
&PAF_AST_params_decodeStatus_primary,
};
0, // unused1
PAF_SAMPLERATE_UNKNOWN, // sampleRate
0, // channelCount
- 0, 0, 0, 0, //Unused
- 0, 0, 0, 0, //Unused
- 0, 0, 0, 0, //Unused
- 0, 0, 0, 0, //Unused
- 0, 0, 0, 0, //Unused
+ 0, 0, 0, 0, //Unused
+ 0, 0, 0, 0, //Unused
+ 0, 0, 0, 0, //Unused
+ 0, 0, 0, 0, //Unused
+ 0, 0, 0, 0, //Unused
0, // frameLength
0, // encBypass
PAF_SOURCE_PCM, // select
- PAF_CC_SAT_SURROUND4, PAF_CC_SUB_ONE, PAF_CC_AUX_SURROUND4_UNKNOWN, 0,0,0,0,0,
+ PAF_CC_SAT_SURROUND4, PAF_CC_SUB_ONE, PAF_CC_AUX_SURROUND4_UNKNOWN, 0,0,0,0,0,
// channelConfigurationRequest.full
PAF_CC_SAT_UNKNOWN, PAF_CC_SUB_ZERO, 0, 0,0,0,0,0,
// channelConfigurationStream.full
PAF_CC_SAT_UNKNOWN, PAF_CC_SUB_ZERO, 0, 0,0,0,0,0,
// channelConfigurationEncode.full
- 0, 0, 0, 0, 0, 0, 0, 0, //Unused
+ 0, 0, 0, 0, 0, 0, 0, 0, //Unused
-3, // channelMap.from[0]
-3, // channelMap.from[1]
-3, // channelMap.from[2]
-3, // channelMap.to[13]
-3, // channelMap.to[14]
-3, // channelMap.to[15]
- 0, // programFormat.mask
- 0, // programFormat.form
+ 0, // programFormat.mask
+ 0, // programFormat.form
0, // sampleProcess[0]
};
#endif // FL: #if 0
{
// SDRAM buffer
// 4 buffers * 256 samples * 32 ch * 4 bytes
- {
- 4 * 256 * 32 * 4, // size: note:
- //6 * 256 * 32 * 4, // size: note:
- //16 * 256 * 32 * 4, // size: note:
- 128, // alignment
- IALG_EXTERNAL, // space
- IALG_PERSIST, // attrs
- NULL, // base
- }
+ {
+ 4 * 256 * 32 * 4, // size: note:
+ //6 * 256 * 32 * 4, // size: note:
+ //16 * 256 * 32 * 4, // size: note:
+ 128, // alignment
+ IALG_EXTERNAL, // space
+ IALG_PERSIST, // attrs
+ NULL, // base
+ }
};
const PAF_ASP_outNumBufMap *const outNumBufMap[] =
{
- &outPrimaryNumBufMap,
+ &outPrimaryNumBufMap,
};
#endif // FL: #if 0
// .............................................................................
-const PAF_MetadataBufStatus PAF_AST_params_MetadataBufStatus_Slave[] =
+const PAF_MetadataBufStatus PAF_ASDT_params_MetadataBufStatus[] =
{
4 * 1024, // bufSize
PAF_MAX_NUM_PRIVATE_MD, // NumBuf
// number of channels only.
//
-const PAF_AudioFrameBufStatus PAF_AST_params_AudioFrameBufStatus[PAF_MAXNUMCHAN] =
+const PAF_AudioFrameBufStatus PAF_AST_params_AudioFrameBufStatus[PAF_MAXNUMCHAN] =
{
- IALG_SARAM, // 0
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM, // 16
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM,
- IALG_SARAM, // 31
- //IALG_EXTERNAL, // 16
- //IALG_EXTERNAL,
- //IALG_EXTERNAL,
- //IALG_EXTERNAL,
- //IALG_EXTERNAL,
- //IALG_EXTERNAL,
- //IALG_EXTERNAL,
- //IALG_EXTERNAL,
- //IALG_EXTERNAL,
- //IALG_EXTERNAL,
- //IALG_EXTERNAL,
- //IALG_EXTERNAL,
- //IALG_EXTERNAL,
- //IALG_EXTERNAL,
- //IALG_EXTERNAL,
- //IALG_EXTERNAL // 31
+ IALG_SARAM, // 0
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM, // 16
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM,
+ IALG_SARAM, // 31
+ //IALG_EXTERNAL, // 16
+ //IALG_EXTERNAL,
+ //IALG_EXTERNAL,
+ //IALG_EXTERNAL,
+ //IALG_EXTERNAL,
+ //IALG_EXTERNAL,
+ //IALG_EXTERNAL,
+ //IALG_EXTERNAL,
+ //IALG_EXTERNAL,
+ //IALG_EXTERNAL,
+ //IALG_EXTERNAL,
+ //IALG_EXTERNAL,
+ //IALG_EXTERNAL,
+ //IALG_EXTERNAL,
+ //IALG_EXTERNAL,
+ //IALG_EXTERNAL // 31
};
#endif // FL: #if 0
NULL, // z_tx_bufsiz
PAF_AST_params_numchan, // z_numchan
256, // framelength
- &PAF_AST_params_audioFrameFunctions_Slave, // pAudioFrameFunctions
+ &PAF_ASDT_params_audioFrameFunctions, // pAudioFrameFunctions
&PAF_ASP_chainFxns, // pChainFxns
NULL, //&PAF_AST_params_inpBufStatus, // pInpBufStatus
- PAF_AST_params_decodeStatus, // z_pDecodeStatus
+ PAF_ASDT_params_decodeStatus, // z_pDecodeStatus
NULL, //&PAF_AST_params_outBufStatus, // pOutBufStatus
NULL, //PAF_AST_params_encodeStatus, // z_pEncodeStatus
NULL, //&PAF_AST_params_volumeStatus, // pVolumeStatus
NULL, //inpLinkInit, // i_inpLinkInit
NULL, //outLinkInit, // i_outLinkInit
NULL, //outNumBufMap, // outNumBufMap // FL: poutNumBufMap
- PAF_AST_params_MetadataBufStatus_Slave, //metadata buffer status
+ PAF_ASDT_params_MetadataBufStatus, //metadata buffer status
NULL, //PAF_AST_params_AudioFrameBufStatus //Audio frame buffer status
};
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 e59942cf1909949c8943a324613b562b32040228..8bcf66445d86affa2397391df661422cfd8a5fc1 100644 (file)
{
// Task data
//PAF_AST_Config PAF_AST_config; /* Local configuration */
- //PAF_AST_Config *pC; /* Local configuration pointer */
+ PAF_AST_Config *pC; /* Local configuration pointer */
// Local data
Int as; /* Audio Stream Number (1, 2, etc.) */
Int z; /* input/encode/stream/decode/output counter */
simStart();
#endif // SIMULATE_SIO
- //
- // Audio Framework Configuration (*pC):
- //
- pC = &gPAF_AST_config;
-
- TRACE_TERSE1("TaskAsip: Started with betaPrimeValue=%d.", gBetaPrimeValue);
- as = gBetaPrimeValue + 1; /* Audio Stream Number (1, 2, etc.) */
- pC->as = as;
-
//
// Audio Framework Parameters & Patch (*pP, *pQ)
//
if (!pP)
{
- TRACE_TERSE1("TaskAsip: AS%d: No Parameters defined. Exiting.", as);
+ TRACE_TERSE0("TaskAsip: No Parameters defined. Exiting.");
LINNO_RPRT(TaskAsip, -1);
return;
}
if (!pQ)
{
- TRACE_TERSE1("TaskAsip: AS%d: No Patchs defined. Exiting.", as);
+ TRACE_TERSE0("TaskAsip: No Patchs defined. Exiting.");
LINNO_RPRT(TaskAsip, -1);
return;
}
+ //
+ // Audio Framework Configuration (*pC):
+ //
+ pC = &gPAF_AST_config;
+ as = gBetaPrimeValue + 1; /* Audio Stream Number (1, 2, etc.) */
+ pC->as = as;
+ TRACE_TERSE1("TaskAsip: Started with AS%d.", as);
+
//
// Initialize message log trace and line number reporting
//
// (***) FL: revisit
// write back configuration
Cache_wb(&gPAF_AST_config, sizeof(PAF_AST_Config), Cache_Type_ALLD, 0);
- Cache_wb(&pC, 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
Error_init(&eb);
/* Input memory */
- if (!(pC->xInp = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, INPUTN * sizeof (*pC->xInp), 4, &eb)))
+ if (!(pC->xInp = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM,
+ INPUTN * sizeof (*pC->xInp), 4, &eb)))
{
TRACE_TERSE1("PAF_ASIT_initPhaseMalloc: AS%d: Memory_calloc failed", as+zMS);
SW_BREAKPOINT;
return __LINE__;
}
TRACE_TERSE3("PAF_ASIT_initPhaseMalloc. (pC->xInp) %d bytes from space %d at 0x%x.",
- INPUTN * sizeof (*pC->xInp),
- HEAP_ID_INTERNAL1_SHM, (IArg)pC->xInp);
+ INPUTN * sizeof (*pC->xInp),
+ HEAP_ID_INTERNAL1_SHM, (IArg)pC->xInp);
/* Decode memory */
- if (!(pC->xDec = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, DECODEN * sizeof (*pC->xDec), 4, &eb)))
+ if (!(pC->xDec = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM,
+ DECODEN * sizeof (*pC->xDec), 4, &eb)))
{
TRACE_TERSE1("PAF_ASIT_initPhaseMalloc: AS%d: Memory_calloc failed", as+zMS);
SW_BREAKPOINT;
return __LINE__;
}
TRACE_TERSE3("PAF_ASIT_initPhaseMalloc. (pC->xDec) %d bytes from space %d at 0x%x.",
- DECODEN * sizeof (*pC->xDec),
- HEAP_ID_INTERNAL1_SHM, (IArg)pC->xDec);
-
- {
- // FL: added for decode output circular buffer
- // FL: (***)revisit
- Int z; /* decode counter */
-
- for (z=DECODE1; z < DECODEN; z++)
- {
- // allocate audio frame circular buffer
- if (!(pC->xDec[z].decOpCb.afCb = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, PAF_DECOP_CB_MAX_NUM_AF * sizeof(PAF_AudioFrame), 4, &eb)))
- {
- TRACE_TERSE1("PAF_ASIT_initPhaseMalloc: AS%d: Memory_calloc failed", as+zMS);
- SW_BREAKPOINT;
- }
- // allocate audio frame PCM sample pointer array
- for (i = 0; i<PAF_DECOP_CB_MAX_NUM_AF; i++)
- {
- if (!(pC->xDec[z].decOpCb.afCb[i].data.sample = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, PAF_DECOP_CB_MAX_NUM_PCM_CH * sizeof(PAF_AudioData *), 4, &eb)))
- {
- TRACE_TERSE1("PAF_ASIT_initPhaseMalloc: AS%d: Memory_calloc failed", as+zMS);
- SW_BREAKPOINT;
- }
- if (!(pC->xDec[z].decOpCb.afCb[i].data.samsiz = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, PAF_DECOP_CB_MAX_NUM_PCM_CH * sizeof(PAF_AudioSize), 4, &eb)))
- {
- TRACE_TERSE1("PAF_ASIT_initPhaseMalloc: AS%d: Memory_calloc failed", as+zMS);
- SW_BREAKPOINT;
- }
- }
- // allocate PCM sample buffer
- if (!(pC->xDec[z].decOpCb.pcmBuf = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, PAF_DECOP_CB_PCM_BUF_SZ * sizeof(PAF_AudioData), 4, &eb)))
- {
- TRACE_TERSE1("PAF_ASIT_initPhaseMalloc: AS%d: Memory_calloc failed", as+zMS);
- SW_BREAKPOINT;
- }
- // allocate Metadata buffers //QIN
- if (!(pC->xDec[z].decOpCb.metaBuf = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, PAF_DECOP_CB_MAX_NUM_AF * PAF_MAX_PRIVATE_MD_SZ * PAF_MAX_NUM_PRIVATE_MD * sizeof(Int8), 4, &eb)))
- {
- TRACE_TERSE1("PAF_ASIT_initPhaseMalloc: AS%d: Memory_calloc failed", as+zMS);
- SW_BREAKPOINT;
- }
- }
- }
-
+ DECODEN * sizeof (*pC->xDec),
+ HEAP_ID_INTERNAL1_SHM, (IArg)pC->xDec);
+
TRACE_TERSE1("PAF_ASIT_initPhaseMalloc: AS%d: initialization phase - memory allocation complete.", as+zMS);
return 0;
} //PAF_ASIT_initPhaseMalloc
Int z; /* input/encode/stream/decode/output counter */
Int zMS = pC->masterStr;
Int errno; /* error number */
- PAF_DecodeOpCircBuf *pCb; /* Decoder output circular buffer */
TRACE_TERSE1("PAF_ASIT_initPhaseConfig: AS%d: initialization phase - configuration", as+zMS);
pC->xDec[z].decodeControl.size = sizeof(pC->xDec[z].decodeControl);
pC->xDec[z].decodeControl.pInpBufConfig = (const PAF_InpBufConfig *)&pC->xInp[zI].inpBufConfig;
//pC->xDec[z].decodeStatus = *pP->z_pDecodeStatus[z]; // FL: slave
-
- // Initialize decoder output circular buffer for PCM
- // (***) FL: revisit, here PCM is hard-coded for 256 sample dec op frame length
- pCb = &pC->xDec[z].decOpCb;
- errno = cbInit(PAF_SOURCE_PCM, 256, FRAMELENGTH, pCb, 1);
- if (errno)
- {
- SW_BREAKPOINT; // FL: debug
- return errno;
- }
- // FL: debug
- cbLog(pCb, 1, "PAF_ASIT_initPhaseConfig:cbInit");
}
TRACE_TERSE1("PAF_ASIT_initPhaseConfig: AS%d: initialization phase - configuration complete.", as+zMS);
return 0;
} //PAF_ASIT_initPhaseDevice
+// -----------------------------------------------------------------------------
+// ASIT Initialization Function - Decoder Output Circular Buffer
+//
+// Name: PAF_ASIT_initPhaseDecOpCircBuf
+// Purpose: Audio Stream Input Task Function for initialization of Decoder Output Circular Buffer.
+// From: audioStream1Task or equivalent
+// Uses: See code.
+// States: x
+// Return: 0 on success.
+// Source code line number on device allocation failure.
+// Trace: Message Log "trace" in Debug Project Configuration reports:
+// * State information as per parent.
+// * Memory allocation errors.
+//
+Int
+PAF_ASIT_initPhaseDecOpCircBuf(
+ const PAF_AST_Params *pP,
+ const PAF_AST_Patchs *pQ,
+ PAF_AST_Config *pC
+)
+{
+ Int as = pC->as; /* Audio Stream Number (1, 2, etc.) */
+ Int zMS = pC->masterStr;
+ Int z; /* decode counter */
+ PAF_AST_DecOpCircBuf *pCb; /* Decoder output circular buffer */
+ Int errno; /* error number */
+ Error_Block eb;
+ Int i;
+
+ // FL: (***)revisit
+
+ /* Decode output circular buffer memory */
+ if (!(pC->xDecOpCb = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM,
+ DECODEN * sizeof (*pC->xDecOpCb), 4, &eb)))
+ {
+ TRACE_TERSE1("PAF_ASIT_initPhaseDecOpCircBuf: AS%d: Memory_calloc failed", as+zMS);
+ SW_BREAKPOINT;
+ return __LINE__;
+ }
+ TRACE_TERSE3("PAF_ASIT_initPhaseDecOpCircBuf. (pC->xDecOpCb) %d bytes from space %d at 0x%x.",
+ DECODEN * sizeof (*pC->xDecOpCb),
+ HEAP_ID_INTERNAL1_SHM, (IArg)pC->xDecOpCb);
+
+ for (z=DECODE1; z < DECODEN; z++)
+ {
+ pCb = &pC->xDecOpCb[z];
+
+ // allocate audio frame circular buffer
+ if (!(pCb->afCb = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, PAF_DECOP_CB_MAX_NUM_AF * sizeof(PAF_AudioFrame), 4, &eb)))
+ {
+ TRACE_TERSE1("PAF_ASIT_initPhaseDecOpCircBuf: AS%d: Memory_calloc failed", as+zMS);
+ SW_BREAKPOINT;
+ }
+ // allocate audio frame PCM sample pointer array
+ for (i = 0; i<PAF_DECOP_CB_MAX_NUM_AF; i++)
+ {
+ if (!(pCb->afCb[i].data.sample = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, PAF_DECOP_CB_MAX_NUM_PCM_CH * sizeof(PAF_AudioData *), 4, &eb)))
+ {
+ TRACE_TERSE1("PAF_ASIT_initPhaseDecOpCircBuf: AS%d: Memory_calloc failed", as+zMS);
+ SW_BREAKPOINT;
+ }
+ if (!(pCb->afCb[i].data.samsiz = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, PAF_DECOP_CB_MAX_NUM_PCM_CH * sizeof(PAF_AudioSize), 4, &eb)))
+ {
+ TRACE_TERSE1("PAF_ASIT_initPhaseDecOpCircBuf: AS%d: Memory_calloc failed", as+zMS);
+ SW_BREAKPOINT;
+ }
+ }
+ // allocate PCM sample buffer
+ if (!(pCb->pcmBuf = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, PAF_DECOP_CB_PCM_BUF_SZ * sizeof(PAF_AudioData), 4, &eb)))
+ {
+ TRACE_TERSE1("PAF_ASIT_initPhaseDecOpCircBuf: AS%d: Memory_calloc failed", as+zMS);
+ SW_BREAKPOINT;
+ }
+ // allocate Metadata buffers //QIN
+ if (!(pCb->metaBuf = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, PAF_DECOP_CB_MAX_NUM_AF * PAF_MAX_PRIVATE_MD_SZ * PAF_MAX_NUM_PRIVATE_MD * sizeof(Int8), 4, &eb)))
+ {
+ TRACE_TERSE1("PAF_ASIT_initPhaseDecOpCircBuf: AS%d: Memory_calloc failed", as+zMS);
+ SW_BREAKPOINT;
+ }
+
+ // (***) FL: revisit, here PCM is hard-coded for 256 sample dec op frame length
+ // Initialize decoder output circular buffer for PCM
+ errno = cbInit(PAF_SOURCE_PCM, 256, FRAMELENGTH, pCb, 1);
+ if (errno)
+ {
+ SW_BREAKPOINT; // FL: debug
+ return errno;
+ }
+ // FL: debug
+ cbLog(pCb, 1, "PAF_ASIT_initPhaseDecOpCircBuf:cbInit");
+ }
+
+ return 0;
+} //PAF_ASIT_initPhaseDecOpCircBuf
+
+
#if 0
// -----------------------------------------------------------------------------
// AST Processing Function - Pass-Through Processing
Int argIdx;
Int decErrno;
Int status;
- PAF_DecodeOpCircBuf *pCb; /* Decoder output circular buffer */
+ PAF_AST_DecOpCircBuf *pCb; /* Decoder output circular buffer */
(void)as; // clear compiler warning in case not used with tracing disabled
//pC->xDec[z].decodeControl.rdSampleCount = 0;
// Initialize decoder output circular buffer for selected source
- pCb = &pC->xDec[z].decOpCb;
+ pCb = &pC->xDecOpCb[z];
errno = cbInit(sourceSelect, frameLength, FRAMELENGTH, pCb, 0);
if (errno)
{
Int argIdx;
Int errno; /* error number */
Int status;
- PAF_DecodeOpCircBuf *pCb; // FL: decoder output circular buffer
+ PAF_AST_DecOpCircBuf *pCb; /* decoder output circular buffer */
(void)as; // clear compiler warning in case not used with tracing disabled
#if 0 // FL: decoder deactivate call, slave
if (decAlg[z]->fxns->algDeactivate)
decAlg[z]->fxns->algDeactivate (decAlg[z]);
-#endif
-
-#if 0
- // Stop decoder output circular buffer writes
- pCb = &pC->xDec[z].decOpCb;
- errno = cbWriteStop(pCb);
- if (errno)
- {
- return errno;
- }
-#endif
+#endif
}
else
{
diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamInpProc.h b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamInpProc.h
index 3f50e57a4da70cb1e9ddbab8a27516a2d5399e28..cf9bfa36ac363f92874d0d36e26c2e7709c0b5d4 100644 (file)
PAF_AST_Config *pC
);
+// Purpose: Audio Stream Input Task Function for initialization of Decoder Output Circular Buffer.
+Int
+PAF_ASIT_initPhaseDecOpCircBuf(
+ const PAF_AST_Params *pP,
+ const PAF_AST_Patchs *pQ,
+ PAF_AST_Config *pC
+);
+
// Purpose: Audio Stream Input Task Function for initialization of Input Devices.
Int
PAF_ASIT_initPhaseDevice(
diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamInpProc_paramsFxns.c b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamInpProc_paramsFxns.c
index 48035642b105644086372923d5e8b22a49e7bbf8..8e64b48e5ba4fbb83934dadfd058b136ab1b5e3f 100644 (file)
PAF_ASIT_initPhaseCommon,
PAF_ASIT_initPhaseAlgKey,
PAF_ASIT_initPhaseDevice,
- NULL,
+ PAF_ASIT_initPhaseDecOpCircBuf,
NULL
},
NULL, //PAF_AST_initFrame0, // initFrame0
diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamOutProc.c b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamOutProc.c
index 30228251423eb2865377898a9e3c25ec6c1c7322..c883b1caf663398d5bf6ab2d105919e68c2cd6d2 100644 (file)
const PAF_AST_Patchs *pQ
)
{
+ PAF_AST_Config *pC; /* Local configuration pointer */
Int as; /* Audio Stream Number (1, 2, etc.) */
Int z; /* input/encode/stream/decode/output counter */
Int i; /* phase */
Log_info0("Enter taskAsopFxn()");
- //
- // Audio Framework Configuration (*pC):
- //
- pC = &gPAF_AST_config;
-
- TRACE_TERSE1("TaskAsop: Started with betaPrimeValue=%d.", gBetaPrimeValue);
- as = pC->as; /* Audio Stream Number (1, 2, etc.) */
-
//
// Audio Framework Parameters & Patch (*pP, *pQ)
//
if (!pP)
{
- TRACE_TERSE1("TaskAsop: AS%d: No Parameters defined. Exiting.", as);
+ TRACE_TERSE0("TaskAsop: No Parameters defined. Exiting.");
LINNO_RPRT(TaskAsop, -1);
return;
}
if (!pQ)
{
- TRACE_TERSE1("TaskAsip: AS%d: No Patchs defined. Exiting.", as);
+ TRACE_TERSE0("TaskAsip: No Patchs defined. Exiting.");
LINNO_RPRT(TaskAsop, -1);
return;
}
+ //
+ // Audio Framework Configuration (*pC):
+ //
+ pC = &gPAF_AST_config;
+ as = pC->as; /* Audio Stream Number (1, 2, etc.) */
+ TRACE_TERSE1("TaskAsop: Started with AS%d.", as);
+
//
// Initialize message log trace and line number reporting
//
Int z; /* decode/encode counter */
Int errno; /* error number */
Int zO, zS;
- PAF_DecodeOpCircBuf *pCb; /* decoder output circular buffer */
+ PAF_AST_DecOpCircBuf *pCb; /* decoder output circular buffer */
for (z=DECODE1; z < DECODEN; z++)
{
// Start decoder output circular buffer reads
- pCb = &pC->xDec[z].decOpCb;
+ pCb = &pC->xDecOpCb[z];
errno = cbReadStart(pCb);
if (errno)
{
)
{
Int z; /* decode/stream counter */
- PAF_DecodeOpCircBuf *pCb;
+ PAF_AST_DecOpCircBuf *pCb; /* decoder output circular buffer */
PAF_AudioFrame *pAfRd;
Int cbErrno;
Int errno;
//
// (***) FL: read circular buffer
//
- pCb = &pC->xDec[z].decOpCb;
+ pCb = &pC->xDecOpCb[z];
pAfRd = pC->xStr[zS].pAudioFrame;
cbErrno = cbReadAf(pCb, pAfRd);
if (cbErrno != 0)
Int as = pC->as; /* Audio Stream Number (1, 2, etc.) */
Int z; /* decode/encode counter */
Int errno; /* error number */
- PAF_DecodeOpCircBuf *pCb; /* decoder output circular buffer */
+ PAF_AST_DecOpCircBuf *pCb; /* decoder output circular buffer */
(void)as; // clear compiler warning in case not used with tracing disabled
for (z=DECODE1; z < DECODEN; z++)
{
// Stop decoder output circular buffer reads
- pCb = &pC->xDec[z].decOpCb;
+ pCb = &pC->xDecOpCb[z];
errno = cbReadStop(pCb);
if (errno)
{