diff --git a/pasdk/test_dsp/framework/audioStreamInpProc.h b/pasdk/test_dsp/framework/audioStreamInpProc.h
index d80ab4588c109ad7d977798df4b4694585b56f9e..a34bf55f526005a294639828ae08c102a27ce428 100644 (file)
/*
-Copyright (c) 2016, Texas Instruments Incorporated - http://www.ti.com/
+Copyright (c) 2017, Texas Instruments Incorporated - http://www.ti.com/
All rights reserved.
* Redistribution and use in source and binary forms, with or without
#include "audioStreamProc_patchs.h"
#include "audioStreamProc_config.h"
#include "audioStreamProc_master.h"
+#include "statusOp_common.h"
// Global debug counter */
extern Uint32 gTaskAsipCnt; // debug counter for ASP task
const SmInt *inputsFromDecodes;
const SmInt *outputsFromEncodes;
struct {
- int *pHeapIdIntern;
- int *pHeapIdExtern;
- int *pHeapIdInpbuf;
- int *pHeapIdOutbuf;
- int *pHeapIdFrmbuf;
- int *pHeapIdIntern1;
- int *pHeapIdInt1Shm;
- int *pHeapIdExtShm;
- int *pHeapIdExtNonCachedShm;
+ int *pHeapIdIntern; // INT memory heap ID
+ int *pHeapIdExtern; // EXT memory heap ID
+ int *pHeapIdInpbuf; // IB buffer heap ID
+ int *pHeapIdOutbuf; // OB buffer heap ID
+ int *pHeapIdFrmbuf; // Frame buffer heap ID
+ int *pHeapIdIntern1; // INT1 memory heap ID
+ int *pHeapIdInt1Shm; // INT1 SHared Memory heap ID
+ int *pHeapIdExtShm; // EXT SHared Memory heap ID
+ int *pHeapIdExtNonCachedShm; // EXT Non-Cached SHared Memory heap ID
int clear;
} heap;
struct {
PAF_ASIT_initPhaseMalloc(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC
+ PAF_ASIT_Config *pAsitCfg
);
// Purpose: Audio Stream Input Task Function for initialization of data values
PAF_ASIT_initPhaseConfig(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC
+ PAF_ASIT_Config *pAsitCfg
);
// Purpose: Audio Stream Input Task Function for initialization of ACP by
PAF_ASIT_initPhaseAcpAlg(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC
+ PAF_ASIT_Config *pAsitCfg
);
// (***) FL: re-visit this, ASIT/ASOT currently consider common memory independently.
PAF_ASIT_initPhaseCommon(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC
+ PAF_ASIT_Config *pAsitCfg
);
// Purpose: Audio Stream Input Task Function for initialization of ASP algorithms.
PAF_ASIT_initPhaseAspAlg(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC
+ PAF_ASIT_Config *pAsitCfg
);
// Purpose: Audio Stream Input Task Function for initialization of data values
PAF_ASIT_initPhaseAlgKey(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC
+ PAF_ASIT_Config *pAsitCfg
);
// Purpose: Audio Stream Input Task Function for initialization of Decoder Output Circular Buffer.
PAF_ASIT_initPhaseDecOpCircBuf(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC
+ PAF_ASIT_Config *pAsitCfg
);
// Purpose: Audio Stream Input Task Function for initialization of Input Devices.
PAF_ASIT_initPhaseDevice(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC
+ PAF_ASIT_Config *pAsitCfg
);
#if 0
PAF_AST_initFrame1(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_AST_Config *pC,
+ PAF_AST_Config *pAsitCfg,
Int z,
Int apply
);
PAF_ASIT_autoProcessing(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC,
+ PAF_ASIT_Config *pAsitCfg,
Int inputTypeSelect,
ALG_Handle pcmAlgMaster);
PAF_ASIT_decodeProcessing(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC,
+ PAF_ASIT_Config *pAsitCfg,
Int sourceSelect
);
PAF_ASIT_decodeCommand(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC
+ PAF_ASIT_Config *pAsitCfg
);
// Purpose: Decoding Function for reinitializing the decoding process.
PAF_ASIT_decodeInit(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC,
+ PAF_ASIT_Config *pAsitCfg,
Int sourceSelect
);
PAF_ASIT_decodeInfo(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC,
+ PAF_ASIT_Config *pAsitCfg,
Int frame,
Int block
);
PAF_ASIT_decodeInfo1(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC,
+ PAF_ASIT_Config *pAsitCfg,
Int frame,
Int block
);
PAF_ASIT_decodeInfo2(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC,
+ PAF_ASIT_Config *pAsitCfg,
Int frame,
Int block
);
+#if 0
// Purpose: Decoding Function for processing that occurs subsequent to
// information processing but antecedent to timing processing
// for frames of input data other than the initial one.
PAF_AST_decodeCont(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC,
+ PAF_ASIT_Config *pAsitCfg,
ALG_Handle decAlg[],
Int frame,
Int block
);
+#endif
// Purpose: Decoding Function for processing of input data by the
// Decode Algorithm.
PAF_ASIT_decodeDecode(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC,
+ PAF_ASIT_Config *pAsitCfg,
Int sourceSelect,
Int frame,
Int block
PAF_ASIT_decodeFinalTest(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC,
+ PAF_ASIT_Config *pAsitCfg,
Int frame,
Int block
);
PAF_ASIT_decodeComplete(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC,
+ PAF_ASIT_Config *pAsitCfg,
ALG_Handle decAlg[],
Int frame,
Int block
PAF_ASIT_selectDevices(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC
+ PAF_ASIT_Config *pAsitCfg
);
// Purpose: Audio Stream Input Task Function for selecting the sources used
PAF_ASIT_sourceDecode(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC,
+ PAF_ASIT_Config *pAsitCfg,
Int x
);
PAF_AST_stopOutput(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC
+ PAF_ASIT_Config *pAsitCfg
);
// Purpose: Common Function for processing algorithm chains.
PAF_AST_streamChainFunction(
const PAF_ASIT_Params *pP,
const PAF_ASIT_Patchs *pQ,
- PAF_ASIT_Config *pC,
+ PAF_ASIT_Config *pAsitCfg,
Int iChainFrameFxns,
Int abortOnError,
Int logArg
);
+// Purpose: writing 8-bit integer to shared memeory
+static inline
+sharedMemWriteInt8(
+ volatile XDAS_Int8 *address, /* address to write to */
+ Int8 value, /* value to write to the adddress */
+ Int gateIdx) /* GateMP Index, defined in statusOp_common.h */
+{
+#ifdef NON_CACHE_STATUS
+ statusOp_write((void *)address, (void *)&value, sizeof(Int8), gateIdx);
+#else
+ *address = value;
+#endif
+}
+
+// Purpose: read 8-bit integer from shared memeory
+static inline Int8 /* return the value read in the shared memory */
+sharedMemReadInt8(
+ volatile XDAS_Int8 *address, /* address to read from */
+ Int gateIdx) /* GateMP Index, defined in statusOp_common.h */
+{
+#ifdef NON_CACHE_STATUS
+ Int8 tempVar;
+ statusOp_read((void *)&tempVar, (void *)address, sizeof(Int8), gateIdx);
+
+ return tempVar;
+#else
+ return(*address);
+#endif
+}
+
+// Purpose: writing 32-bit integer to shared memeory
+static inline sharedMemWriteInt(volatile XDAS_Int32 *address, Int value, Int gateIdx)
+{
+#ifdef NON_CACHE_STATUS
+ statusOp_write((void *)address, (void *)&value, sizeof(Int), gateIdx);
+#else
+ *address = value;
+#endif
+}
+
+// Purpose: read 32-bit integer from shared memeory
+static inline Int sharedMemReadInt(volatile XDAS_Int32 *address, Int gateIdx)
+{
+#ifdef NON_CACHE_STATUS
+ Int tempVar;
+ statusOp_read((void *)&tempVar, (void *)address, sizeof(Int), gateIdx);
+
+ return tempVar;
+#else
+ return(*address);
+#endif
+}
#endif /* _ASIP_H_ */