summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d463d45)
raw | patch | inline | side by side (parent: d463d45)
author | Frank Livingston <frank-livingston@ti.com> | |
Wed, 26 Jul 2017 03:40:03 +0000 (22:40 -0500) | ||
committer | Frank Livingston <frank-livingston@ti.com> | |
Wed, 26 Jul 2017 03:40:03 +0000 (22:40 -0500) |
12 files changed:
index f561b91be556af34a8d6b1b2d714843e32a7fcc1..9303631fcd1fbcf6c01856b2ae9bcf1c37a0349a 100644 (file)
//#define DEF_DEC_OP_FRAME_LEN ( PAF_SYS_FRAMELENGTH ) // default decoder output frame length
//#define DEF_STR_FRAME_LEN ( PAF_SYS_FRAMELENGTH ) // default stream frame length
+// Decoder output circular buffer status
+typedef struct PAF_AST_DecOpCircBufStatus
+{
+ Int size;
+ Int16 strFrameLen; // stream frame length (output transaction size)
+} PAF_AST_DecOpCircBufStatus;
// Decoder output circular buffer
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
- Int8 sourceSel; // selected source
- Int8 primedFlag; // flag indicated whether CB is primed: FALSE - CB not primed, TRUE - CB primed
- Int16 targetNDSamps; // target CB Nominal Delay number of samples
- Int16 deltaSamps; // number of 256 (N) sample output frames to block reader
- Int8 afRdIdx; // audio frame CB read index
- Int8 afWrtIdx; // audio frame CB write index
- //Int8 afLagIdx; // audio frame CB Lag idx,
- //Int8 afInitialLag; // Initial delay/lag between CB write and read
- Int16 pcmRdIdx; // pcm buffer read index
- Int8 prvMdRdIdx; // private metadata read index
- Int8 numAfCb; // current number frames in CB
- Int8 maxNumAfCb; // maximum number of audio frames in CB
- Int32 numPcmSampsPerCh; // current number of PCM samples per channel in CB
- Int32 maxNumPcmSampsPerCh; // max number of PCM samples per channel 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: FALSE - writer not active, TRUE - writer active
- Int8 readerActiveFlag; // flag indicates whether CB reader is active: FALSE - reader not active, TRUE - reader active
- Int8 drainFlag; // flag indicates whether reader should drain (empty) remaining frames in CB: FALSE - reader should not drain, TRUE - reader should drain
- Int32 readAfWriterInactiveCnt; // count of read audio frames with inactive writer & not draining
- Int32 readAfNdCnt; // count of read audio frames for nominal delay
- Int32 wrtAfReaderInactiveCnt; // count of write audio frames with inactive reader
- Int32 wrtAfZeroSampsCnt; // count of write audio frames with zero samples
- Int32 errAfUndCnt; // read error AF underflow count
- Int32 errAfOvrCnt; // write error AF overflow count
- Int32 errPcmUndCnt; // read error PCM underflow count
- Int32 errPcmOvrCnt; // write error PCM overflow count
- PAF_AudioData *pcmBufEnd; // PCM buffer, contains PCM data associated with audio frames end
- UInt8 *metaBufEnd; // metadata buffer, contains metadata associated with audio frames end
- Int8 maxAFChanNum; // maximum number of audio data channels in audio frame
- Int16 maxAFSampCount; // maximum number of sample counts in audio frame
- PAF_AudioFrame lastAf; // used to store the last valid read out audio frame info to generate mute frame
+ 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
+ Int8 sourceSel; // selected source
+ Int8 primedFlag; // flag indicated whether CB is primed: FALSE - CB not primed, TRUE - CB primed
+ Int16 targetNDSamps; // target CB Nominal Delay number of samples
+ Int16 deltaSamps; // number of 256 (N) sample output frames to block reader
+ Int8 afRdIdx; // audio frame CB read index
+ Int8 afWrtIdx; // audio frame CB write index
+ //Int8 afLagIdx; // audio frame CB Lag idx,
+ //Int8 afInitialLag; // Initial delay/lag between CB write and read
+ Int16 pcmRdIdx; // pcm buffer read index
+ Int8 prvMdRdIdx; // private metadata read index
+ Int8 numAfCb; // current number frames in CB
+ Int8 maxNumAfCb; // maximum number of audio frames in CB
+ Int32 numPcmSampsPerCh; // current number of PCM samples per channel in CB
+ Int32 maxNumPcmSampsPerCh; // max number of PCM samples per channel 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: FALSE - writer not active, TRUE - writer active
+ Int8 readerActiveFlag; // flag indicates whether CB reader is active: FALSE - reader not active, TRUE - reader active
+ Int8 drainFlag; // flag indicates whether reader should drain (empty) remaining frames in CB: FALSE - reader should not drain, TRUE - reader should drain
+ Int32 readAfWriterInactiveCnt; // count of read audio frames with inactive writer & not draining
+ Int32 readAfNdCnt; // count of read audio frames for nominal delay
+ Int32 wrtAfReaderInactiveCnt; // count of write audio frames with inactive reader
+ Int32 wrtAfZeroSampsCnt; // count of write audio frames with zero samples
+ Int32 errAfUndCnt; // read error AF underflow count
+ Int32 errAfOvrCnt; // write error AF overflow count
+ Int32 errPcmUndCnt; // read error PCM underflow count
+ Int32 errPcmOvrCnt; // write error PCM overflow count
+ PAF_AudioData *pcmBufEnd; // PCM buffer, contains PCM data associated with audio frames end
+ UInt8 *metaBufEnd; // metadata buffer, contains metadata associated with audio frames end
+ Int8 maxAFChanNum; // maximum number of audio data channels in audio frame
+ Int16 maxAFSampCount; // maximum number of sample counts in audio frame
+ PAF_AudioFrame lastAf; // used to store the last valid read out audio frame info to generate mute frame
+ PAF_AST_DecOpCircBufStatus cbStatus; // CB status
#ifdef CB_RW_OP_CAP_PP // debug
- UInt32 *cb_samples_op; // should be in shared memory, preferred NON cache
- UInt8 *cb_op_owner; // should be in shared memory, preferred NON cache
- UInt8 *cb_afRdIdx; // should be in shared memory, preferred NON cache
- UInt8 *cb_afWrtIdx; // should be in shared memory, preferred NON cache
- UInt8 *cb_numAfCb; // should be in shared memory, preferred NON cache
- UInt32 cb_opCnt; // range (0 - CB_OP_COUNT_MAX)
+ UInt32 *cb_samples_op; // should be in shared memory, preferred NON cache
+ UInt8 *cb_op_owner; // should be in shared memory, preferred NON cache
+ UInt8 *cb_afRdIdx; // should be in shared memory, preferred NON cache
+ UInt8 *cb_afWrtIdx; // should be in shared memory, preferred NON cache
+ UInt8 *cb_numAfCb; // should be in shared memory, preferred NON cache
+ UInt32 cb_opCnt; // range (0 - CB_OP_COUNT_MAX)
#endif
} PAF_AST_DecOpCircBuf;
diff --git a/pasdk/paf b/pasdk/paf
index 768e579920deca65633cfb0ab1434e49595c9664..dad50bdcd5b83aa799fcd1fda7fcf85fd33a3c8c 160000 (submodule)
--- a/pasdk/paf
+++ b/pasdk/paf
-Subproject commit 768e579920deca65633cfb0ab1434e49595c9664
+Subproject commit dad50bdcd5b83aa799fcd1fda7fcf85fd33a3c8c
index 29cebf1b76f0d74fa5567dd3a9b514ee45066189..4f691ecd946ee11f161db7a43bf1a0cdf14b43b7 100644 (file)
--- a/pasdk/test_dsp/.cproject
+++ b/pasdk/test_dsp/.cproject
<stringMacro name="AIF2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="CSL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="MMCSD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="ICSS_EMAC_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/processor_audio_sdk_1_00_00_03/psdk_cust/pdk_k2g_1_0_1_2_eng/packages"/>
+ <stringMacro name="ICSS_EMAC_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="USB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="I2C_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="CPPI_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="IQN_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="PKTLIB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="SRIO_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="DFE_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="FATFS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="DFE_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="NWAL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="FATFS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="NWAL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="SPI_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
</macros>
<externalSettings/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/test_dsp/sio""/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/test_dsp/framework""/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/test_dsp/framework/itopo""/>
+ <listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/test_dsp/framework/alpha""/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/test_dsp/application/itopo/evmk2g/alpha""/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/common""/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/shared""/>
<stringMacro name="AIF2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="CSL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="MMCSD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/processor_audio_sdk_1_00_00_03/psdk_cust/pdk_k2g_1_0_1_2_eng/packages"/>
<stringMacro name="ICSS_EMAC_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/processor_audio_sdk_1_00_00_03/psdk_cust/pdk_k2g_1_0_1_2_eng/packages"/>
<stringMacro name="USB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="I2C_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="IQN2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="IQN_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="PKTLIB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="SRIO_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="DFE_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="FATFS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="NWAL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="SPI_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
</macros>
<externalSettings/>
<stringMacro name="AIF2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="CSL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="MMCSD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/processor_audio_sdk_1_00_00_03/psdk_cust/pdk_k2g_1_0_1_2_eng/packages"/>
<stringMacro name="ICSS_EMAC_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/processor_audio_sdk_1_00_00_03/psdk_cust/pdk_k2g_1_0_1_2_eng/packages"/>
<stringMacro name="USB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="I2C_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="IQN2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="IQN_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="PKTLIB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="SRIO_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="DFE_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="FATFS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="NWAL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="SPI_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
</macros>
<externalSettings/>
<stringMacro name="AIF2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="CSL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="MMCSD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/processor_audio_sdk_1_00_00_03/psdk_cust/pdk_k2g_1_0_1_2_eng/packages"/>
<stringMacro name="ICSS_EMAC_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/processor_audio_sdk_1_00_00_03/psdk_cust/pdk_k2g_1_0_1_2_eng/packages"/>
<stringMacro name="USB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="I2C_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="IQN2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="IQN_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="PKTLIB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="SRIO_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="DFE_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="FATFS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
- <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="NWAL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+ <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
<stringMacro name="SPI_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
</macros>
<externalSettings/>
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS.1237856306" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS"/>
</tool>
</fileInfo>
- <fileInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.2083839127.249844620.543350190" name="mib.c" rcbsApplicability="disable" resourcePath="mib/mib.c" toolsToInvoke="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug.106674691.984972002">
- <tool id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug.106674691.984972002" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug.106674691">
- <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_LEVEL.53836185" name="Optimization level (--opt_level, -O)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_LEVEL.3" valueType="enumerated"/>
- <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__C_SRCS.622075618" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__C_SRCS"/>
- <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__CPP_SRCS.1922876896" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__CPP_SRCS"/>
- <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM_SRCS.376443321" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM_SRCS"/>
- <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS.1607701921" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS"/>
- </tool>
- </fileInfo>
<folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.2083839127.249844620.common" name="/" resourcePath="common">
<toolChain id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.DebugToolchain.2093052442" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.DebugToolchain" unusedChildren="">
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1997130179.38556327.52846953" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1997130179"/>
<inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS.1467997897" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS"/>
</tool>
</fileInfo>
+ <fileInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.2083839127.249844620.543350190" name="mib.c" rcbsApplicability="disable" resourcePath="mib/mib.c" toolsToInvoke="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug.106674691.984972002">
+ <tool id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug.106674691.984972002" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug.106674691">
+ <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_LEVEL.53836185" name="Optimization level (--opt_level, -O)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_LEVEL.3" valueType="enumerated"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__C_SRCS.622075618" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__CPP_SRCS.1922876896" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM_SRCS.376443321" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS.1607701921" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ </fileInfo>
<sourceEntries>
<entry excluding="common/components/clk.c|sio/dap|sio/dbgDob.c|framework/fwkSim.c|application/app_pkgs.cmd|boards|src|application/src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
index 9d23441d3fbf2851614f115877ce9ae8b341e41f..10ee8a95080d2ccee1297fb268412aecb8df86a8 100644 (file)
/* Add L2 SRAM heap */ // formerly IRAM
var heapMem0Params = new HeapMem.Params();
heapMem0Params.instance.name = "heapMemL2Sram";
-heapMem0Params.size = 512*1024; // 96000; // from pa.cfg
+heapMem0Params.size = 700*1024; //512*1024; // 700 kB temporary setting for OB in L2
heapMem0Params.sectionName = ".l2SramHeap";
Program.global.heapMemL2Sram = HeapMem.create(heapMem0Params);
Program.sectMap[".l2SramHeap"] = "L2SRAM";
diff --git a/pasdk/test_dsp/application/itopo/evmk2g/alpha/i13_a.h b/pasdk/test_dsp/application/itopo/evmk2g/alpha/i13_a.h
index e1fdda084f1874d675035b292f0695099264c5ed..55368b74c491397489c44fd0cbfd236680e7adea 100644 (file)
#include <oar_a.h>
#include <bmda_a.h>
//#include <dap_a.h>
+#include <pafdecopcb_a.h>
#endif /* _I13_A_H_ */
diff --git a/pasdk/test_dsp/framework/alpha/pafdecopcb_a.h b/pasdk/test_dsp/framework/alpha/pafdecopcb_a.h
--- /dev/null
@@ -0,0 +1,47 @@
+
+/*
+Copyright (c) 2017, Texas Instruments Incorporated - http://www.ti.com/
+All rights reserved.
+
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of Texas Instruments Incorporated nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+*/
+
+#ifndef _PAF_DECOPCB_A_H_
+#define _PAF_DECOPCB_A_H_
+
+#include <acpbeta.h>
+
+#define readDECOPCBStreamFrameLength 0xc300+STD_BETA_DECOPCB,0x0004
+#define writeDECOPCBStreamFrameLength256 0xcb00+STD_BETA_DECOPCB,0x0004,0x0100
+#define writeDECOPCBStreamFrameLength512 0xcb00+STD_BETA_DECOPCB,0x0004,0x0200
+#define writeDECOPCBStreamFrameLength1024 0xcb00+STD_BETA_DECOPCB,0x0004,0x0400
+#define writeDECOPCBStreamFrameLengthN(N) 0xcb00+STD_BETA_DECOPCB,0x0004,(N&0xFFFF)
+
+#endif // _PAF_DECOPCB_A_H_
diff --git a/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c b/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c
index 25224c1460cde14954633d307c9fb61ba9589335..f2331ae9240009e7683777ffe1bd3f93bfeeae0c 100644 (file)
// Initialize circular buffer for Stream reads
Int cbInitStreamRead(
PAF_AST_DecOpCircBufCtl *pCbCtl, // decoder output circular buffer control
- Int8 cbIdx, // decoder output circular buffer index
- Int16 strFrameLen // stream frame length (PCM samples)
+ Int8 cbIdx // decoder output circular buffer index
)
{
IArg key;
Cache_wait();
// Set output frame length
- pCb->strFrameLen = strFrameLen;
+ pCb->strFrameLen = pCb->cbStatus.strFrameLen;
// Write back circular buffer configuration
Cache_wb(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
diff --git a/pasdk/test_dsp/framework/aspDecOpCircBuf_master.h b/pasdk/test_dsp/framework/aspDecOpCircBuf_master.h
index b3c5e79f20daebb8ff541febd0bbfc1cc390c83c..24c33b1853d26aff9804308a8031018f5f59c909 100644 (file)
// Initialize circular buffer for Stream reads
Int cbInitStreamRead(
PAF_AST_DecOpCircBufCtl *pCbCtl, // decoder output circular buffer control
- Int8 cbIdx, // decoder output circular buffer index
- Int16 strFrameLen // stream frame length (PCM samples)
+ Int8 cbIdx // decoder output circular buffer index
);
// Start reads from circular buffer
diff --git a/pasdk/test_dsp/framework/audioStreamInpProc.c b/pasdk/test_dsp/framework/audioStreamInpProc.c
index 7a30dfed572bbe5a72e896735f0439c321438f11..7505838e959e75bbdd43f186fa1118b8c3b43451 100644 (file)
return 0;
} //PAF_ASIT_initPhaseDevice
+// (***) FL: move to ASOT
// -----------------------------------------------------------------------------
// ASIT Initialization Function - Decoder Output Circular Buffer
//
Int errno; /* error number */
Error_Block eb;
Int i;
+ ACP_Handle acp;
+ Int betaPrimeOffset;
+ Int zS;
// FL: (***)revisit
pAstCfg = pAsitCfg->pAstCfg; // get pointer to AST common (shared) configuration
as = pAstCfg->as;
zMS = pAstCfg->masterStr;
- /* Decode output circular buffer memory */
+ // Decode output circular buffer memory
if (!(pAstCfg->xDecOpCb = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM,
DECODEN * sizeof (*pAstCfg->xDecOpCb), 4, &eb)))
{
TRACE_TERSE3("PAF_ASIT_initPhaseDecOpCircBuf. (pAsitCfg->xDecOpCb) %d bytes from space %d at 0x%x.",
DECODEN * sizeof (*pAstCfg->xDecOpCb),
HEAP_ID_INTERNAL1_SHM, (IArg)pAstCfg->xDecOpCb);
-
+
for (z=DECODE1; z < DECODEN; z++)
{
pCb = &pAstCfg->xDecOpCb[z];
SW_BREAKPOINT;
}
#endif
+ }
- // (***) FL: revisit, here PCM is hard-coded for 256 sample dec op frame length
- // Initialize decoder output circular buffer for PCM
+ for (z = DECODE1; z < DECODEN; z++)
+ {
+ //
+ // Initialize decoder output circular
+ //
+
+ // Initialize status
+ pAstCfg->xDecOpCb[z].cbStatus = *pP->z_pDecOpCircBufStatus[z];
+
+ // Default initialization
errno = cbInit(pCb);
if (errno)
{
return errno;
}
}
-
+
+ // Get ASIT ACP handle
+ acp = pAsitCfg->acp;
+ if (!acp)
+ {
+ TRACE_TERSE1("PAF_ASIT_initPhaseDecOpCircBuf: AS%d: ACP algorithm instance creation failed", as+zMS);
+ return __LINE__;
+ }
+
+ // Get Beta Prime offset
+ ((ALG_Handle)acp)->fxns->algControl((ALG_Handle) acp,
+ ACP_GETBETAPRIMEOFFSET, (IALG_Status *)&betaPrimeOffset);
+
+ for (z = DECODE1; z < DECODEN; z++)
+ {
+ // ACP attach CB
+ zS = pP->streamsFromDecodes[z];
+ acp->fxns->attach(acp, ACP_SERIES_STD,
+ STD_BETA_DECOPCB + betaPrimeOffset * (as-1+zS),
+ (IALG_Status *)&pAstCfg->xDecOpCb[z].cbStatus);
+ }
+
return 0;
} //PAF_ASIT_initPhaseDecOpCircBuf
diff --git a/pasdk/test_dsp/framework/audioStreamInpProc.h b/pasdk/test_dsp/framework/audioStreamInpProc.h
index d8d5469d6de4da87d3b4b4489acbadc3e749c380..7738f224eb5adc7e0a54dc7d2a524b562e24a0ff 100644 (file)
const PAF_ASP_outNumBufMap * const (*poutNumBufMap);
const PAF_MetadataBufStatus *pMetadataBufStatus;
const PAF_AudioFrameBufStatus *pAudioFrameBufStatus;
+ const PAF_AST_DecOpCircBufStatus * const *z_pDecOpCircBufStatus;
} PAF_ASIT_Params;
// Audio Stream Input Task (ASIT) patchs
diff --git a/pasdk/test_dsp/framework/audioStreamOutProc.c b/pasdk/test_dsp/framework/audioStreamOutProc.c
index ce849f74e45a980ee93e3cd12a09836146575e97..310526facd17f0de65179b9fe8064c6ed4b44f59 100644 (file)
} //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);
index ec717e4ca2b8de0efb25922317b851e740113e9f..cc81ffcbd7a7ea928ea78a44a721679f13ed714d 100644 (file)
//IALG_EXTERNAL // 31
};
+const PAF_AST_DecOpCircBufStatus PAF_AST_params_decOpCircBufStatus_primary =
+{
+ sizeof(PAF_AST_DecOpCircBufStatus),
+ PAF_ASOT_FRAMELENGTH
+};
+
+const PAF_AST_DecOpCircBufStatus *const PAF_AST_params_decOpCircBufStatus[] =
+{
+ &PAF_AST_params_decOpCircBufStatus_primary,
+};
+
+
//(***) FL: re-visit, clean this up (remove unused members)
// .............................................................................
//
inpLinkInit, // i_inpLinkInit
outLinkInit, // i_outLinkInit
outNumBufMap, // outNumBufMap // FL: poutNumBufMap
- PAF_AST_params_MetadataBufStatus, //metadata buffer status
- PAF_AST_params_AudioFrameBufStatus //Audio frame buffer status
+ PAF_AST_params_MetadataBufStatus, // metadata buffer status
+ PAF_AST_params_AudioFrameBufStatus, // Audio frame buffer status
+ PAF_AST_params_decOpCircBufStatus // z_pDecOpCircBufStatus
};
extern const PAF_ASOT_Fxns PAF_ASOT_params_fxns;
inpLinkInit, // i_inpLinkInit
outLinkInit, // i_outLinkInit
outNumBufMap, // outNumBufMap // FL: poutNumBufMap
- PAF_AST_params_MetadataBufStatus, //metadata buffer status
- PAF_AST_params_AudioFrameBufStatus //Audio frame buffer status
+ PAF_AST_params_MetadataBufStatus, // metadata buffer status
+ PAF_AST_params_AudioFrameBufStatus // Audio frame buffer status
};