summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a56c7de)
raw | patch | inline | side by side (parent: a56c7de)
author | Frank Livingston <frank-livingston@ti.com> | |
Fri, 30 Jun 2017 21:19:55 +0000 (16:19 -0500) | ||
committer | Frank Livingston <frank-livingston@ti.com> | |
Fri, 30 Jun 2017 21:19:55 +0000 (16:19 -0500) |
pasdk/common/aspOutInitSync_common.c | [new file with mode: 0644] | patch | blob |
pasdk/common/aspOutInitSync_common.h | [new file with mode: 0644] | patch | blob |
pasdk/test_arm/framework/aspOutInitSync_slave.c | [new file with mode: 0644] | patch | blob |
pasdk/test_arm/framework/aspOutInitSync_slave.h | [new file with mode: 0644] | patch | blob |
pasdk/test_dsp/framework/aspOutInitSync_master.c | [new file with mode: 0644] | patch | blob |
pasdk/test_dsp/framework/aspOutInitSync_master.h | [new file with mode: 0644] | patch | blob |
diff --git a/pasdk/common/aspOutInitSync_common.c b/pasdk/common/aspOutInitSync_common.c
--- /dev/null
@@ -0,0 +1,97 @@
+
+/*
+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.
+*
+*/
+
+#include <xdc/std.h>
+#include <ti/ipc/GateMP.h>
+
+#include "aspOutInitSync_common.h"
+
+// Initialize Output Processing Init-Sync control
+Int outIsCtlInit(
+ PAF_AST_OutInitSyncCtl *pOutIsCtl, // output init-sync control to initialize
+ PAF_AST_OutInitSyncInfo **pXOutIsInfo // pointer to base address of output init-sync info array
+)
+{
+#ifdef _TMS320C6X
+ GateMP_Params gateParams;
+ GateMP_Handle gateHandle;
+
+ GateMP_Params_init(&gateParams);
+ gateParams.localProtect = GateMP_LocalProtect_THREAD;
+ gateParams.remoteProtect = GateMP_RemoteProtect_SYSTEM;
+ gateParams.name = ASP_OUTIS_GATE_NAME;
+ gateParams.regionId = ASP_OUTIS_GATE_REGION_ID;
+ gateHandle = GateMP_create(&gateParams);
+ if (gateHandle != NULL)
+ {
+ pOutIsCtl->gateHandle = gateHandle;
+ }
+ else
+ {
+ pOutIsCtl->gateHandle = NULL;
+ return ASP_OUTIS_CTL_INIT_INV_GATE;
+ }
+
+ pOutIsCtl->pXOutIsInfo = pXOutIsInfo;
+
+ return ASP_OUTIS_SOK;
+
+#elif defined(ARMCOMPILE)
+ GateMP_Handle gateHandle;
+ Int status;
+
+ do {
+ status = GateMP_open(ASP_OUTIS_GATE_NAME, &gateHandle);
+ } while (status == GateMP_E_NOTFOUND);
+ if (status == GateMP_S_SUCCESS)
+ {
+ pOutIsCtl->gateHandle = gateHandle;
+ }
+ else
+ {
+ pOutIsCtl->gateHandle = NULL;
+ return ASP_OUTIS_CTL_INIT_INV_GATE;
+ }
+
+ pOutIsCtl->pXOutIsInfo = pXOutIsInfo;
+
+ return ASP_OUTIS_SOK;
+
+#else
+ #error "Unsupported platform"
+
+#endif
+}
+
diff --git a/pasdk/common/aspOutInitSync_common.h b/pasdk/common/aspOutInitSync_common.h
--- /dev/null
@@ -0,0 +1,85 @@
+
+/*
+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 _ASP_OUT_INIT_SYNC_H_
+#define _ASP_OUT_INIT_SYNC_H_
+
+#include <xdc/std.h>
+#include <ti/ipc/GateMP.h>
+#include "paftyp.h"
+
+// error return codes
+#define ASP_OUTIS_SOK ( 0 ) // ok
+#define ASP_OUTIS_CTL_INIT_INV_GATE ( ASP_OUTIS_SOK-1 ) // error: invalid gate handle
+#define ASP_OUTIS_ERR_START ( ASP_OUTIS_CTL_INIT_INV_GATE ) // start error return ID for master & slave error return definitions
+
+// Output Init-Sync number of decoder stages
+// 2 stages: Dec Reset, Dec Info
+#define ASP_OUTIS_NUM_DEC_STAGES ( 2 )
+
+// Output Init-Sync decoder stages indices
+#define ASP_OUTIS_DEC_STAGE_RESET_IDX ( 0 )
+#define ASP_OUTIS_DEC_STAGE_INFO1_IDX ( ASP_OUTIS_DEC_STAGE_RESET_IDX+1 )
+
+#define ASP_OUTIS_GATE_NAME ( "AspOutISGate" ) // name of GateMP used OutIS info protection
+#define ASP_OUTIS_GATE_REGION_ID ( 0 ) // IPC shared region ID used for OutIS gate allocation
+
+// Decoder Stage Output Processing Init-Sync Information
+typedef struct PAF_AST_DecStageOutInitSyncInfo
+{
+ Int8 decFlag; // decoder stage flag: 0:dec stage not executed; 1:dec stage executed
+ PAF_AudioFrame decAf; // decoder output audio frame
+} PAF_AST_DecStageOutInitSyncInfo;
+
+// Output Processing Init-Sync Information
+typedef struct PAF_AST_OutInitSyncInfo
+{
+ PAF_AST_DecStageOutInitSyncInfo decStageOutInitSyncInfo[ASP_OUTIS_NUM_DEC_STAGES];
+} PAF_AST_OutInitSyncInfo;
+
+// Output Processing Init-Sync control
+typedef struct PAF_AST_OutInitSyncCtl
+{
+ GateMP_Handle gateHandle; // output init-sync gate handle
+ PAF_AST_OutInitSyncInfo **pXOutIsInfo; // address of output init-sync info base pointer
+} PAF_AST_OutInitSyncCtl;
+
+// Initialize Output Processing Init-Sync control
+Int outIsCtlInit(
+ PAF_AST_OutInitSyncCtl *pOutIsCtl, // output init-sync control to initialize
+ PAF_AST_OutInitSyncInfo **pXOutIsInfo // pointer to base address of output init-sync info array
+);
+
+#endif /* _ASP_OUT_INIT_SYNC_H_ */
diff --git a/pasdk/test_arm/framework/aspOutInitSync_slave.c b/pasdk/test_arm/framework/aspOutInitSync_slave.c
--- /dev/null
@@ -0,0 +1,160 @@
+
+/*
+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.
+*
+*/
+
+/*
+ * ======== aspOutInitSync_slave.c ========
+ */
+
+
+#include <xdc/std.h>
+
+#include "aspOutInitSync_common.h"
+#include "aspOutInitSync_slave.h"
+
+// Reset dec stage flags
+Int outIsResetDecStageFlags(
+ PAF_AST_OutInitSyncCtl *pOutIsCtl, // Output Init-Sync Control
+ Int8 outIsiIdx // Output Init-Sync Info index
+)
+{
+ IArg key;
+ GateMP_Handle gateHandle;
+ PAF_AST_OutInitSyncInfo *pOutISI;
+ Int8 i;
+
+ // Get gate handle
+ gateHandle = pOutIsCtl->gateHandle;
+ // Enter gate
+ key = GateMP_enter(gateHandle);
+
+ //
+ // Reset decoder stage flags
+ //
+
+ // Get address of Output Init-Sync Info
+ pOutISI = &((*pOutIsCtl->pXOutIsInfo)[outIsiIdx]);
+
+ // Reset flags
+ for (i = 0; i < ASP_OUTIS_NUM_DEC_STAGES; i++)
+ {
+ pOutISI->decStageOutInitSyncInfo[i].decFlag = 0;
+ }
+
+ // Leave the gate
+ GateMP_leave(gateHandle, key);
+
+ return ASP_OUTIS_SOK;
+}
+
+// Write dec stage flag
+Int outIsWriteDecStageFlag(
+ PAF_AST_OutInitSyncCtl *pOutIsCtl, // Output Init-Sync Control
+ Int8 outIsiIdx, // Output Init-Sync Info index
+ Int8 decStageIdx, // dec stage index
+ Int8 decFlag // flag value to write (0/1)
+)
+{
+ IArg key;
+ GateMP_Handle gateHandle;
+ PAF_AST_OutInitSyncInfo *pOutISI;
+ PAF_AST_DecStageOutInitSyncInfo *pDecStageOutISI;
+
+ // Get gate handle
+ gateHandle = pOutIsCtl->gateHandle;
+ // Enter gate
+ key = GateMP_enter(gateHandle);
+
+ //
+ // Write decoder stage flag
+ //
+
+ // Get address of Output Init-Sync Info
+ pOutISI = &((*pOutIsCtl->pXOutIsInfo)[outIsiIdx]);
+ // Get address of Decoder Output Init-Sync Info
+ pDecStageOutISI = &pOutISI->decStageOutInitSyncInfo[decStageIdx];
+
+ // Write flag value
+ pDecStageOutISI->decFlag = decFlag;
+
+ // Leave the gate
+ GateMP_leave(gateHandle, key);
+
+ return ASP_OUTIS_SOK;
+}
+
+// Write dec stage flag and AF.
+// Flag must be non-zero for write of AF.
+Int outIsWriteDecStageFlagAndAf(
+ PAF_AST_OutInitSyncCtl *pOutIsCtl, // Output Init-Sync Control
+ Int8 outIsiIdx, // Output Init-Sync Info index
+ Int8 decStageIdx, // dec stage index
+ Int8 decFlag, // flag value to write (0/1)
+ PAF_AudioFrame *pDecAfWrt // audio frame to write
+)
+{
+ IArg key;
+ GateMP_Handle gateHandle;
+ PAF_AST_OutInitSyncInfo *pOutISI;
+ PAF_AST_DecStageOutInitSyncInfo *pDecStageOutISI;
+
+ // Get gate handle
+ gateHandle = pOutIsCtl->gateHandle;
+ // Enter gate
+ key = GateMP_enter(gateHandle);
+
+ //
+ // Write decoder stage audio frame
+ // Write decoder stage flag
+ //
+
+ // Get address of Output Init-Sync Info
+ pOutISI = &((*pOutIsCtl->pXOutIsInfo)[outIsiIdx]);
+ // Get address of Decoder Output Init-Sync Info
+ pDecStageOutISI = &pOutISI->decStageOutInitSyncInfo[decStageIdx];
+
+ // Write flag value
+ pDecStageOutISI->decFlag = decFlag;
+
+ // Write audio frame
+ if (decFlag != 0)
+ {
+ pDecStageOutISI->decAf = *pDecAfWrt;
+ }
+
+ // Leave the gate
+ GateMP_leave(gateHandle, key);
+
+ return ASP_OUTIS_SOK;
+}
diff --git a/pasdk/test_arm/framework/aspOutInitSync_slave.h b/pasdk/test_arm/framework/aspOutInitSync_slave.h
--- /dev/null
@@ -0,0 +1,72 @@
+
+/*
+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.
+*
+*/
+
+/*
+ * ======== aspOutInitSync_slave.h ========
+ */
+
+#ifndef _ASP_OUTIS_SLAVE_H_
+#define _ASP_OUTIS_SLAVE_H_
+
+#include <xdc/std.h>
+
+#include "aspOutInitSync_common.h"
+
+// Reset dec stage flags
+Int outIsResetDecStageFlags(
+ PAF_AST_OutInitSyncCtl *pOutIsCtl, // Output Init-Sync Control
+ Int8 outIsiIdx // Output Init-Sync Info index
+);
+
+// Write dec stage flag
+Int outIsWriteDecStageFlag(
+ PAF_AST_OutInitSyncCtl *pOutIsCtl, // Output Init-Sync Control
+ Int8 outIsiIdx, // Output Init-Sync Info index
+ Int8 decStageIdx, // dec stage index
+ Int8 decFlag // flag value to write (0/1)
+);
+
+// Write dec stage AF and flag
+// Flag must be non-zero for write of AF.
+Int outIsWriteDecStageFlagAndAf(
+ PAF_AST_OutInitSyncCtl *pOutIsCtl, // Output Init-Sync Control
+ Int8 outIsiIdx, // Output Init-Sync Info index
+ Int8 decStageIdx, // dec stage index
+ Int8 decFlag, // flag value to write (0/1)
+ PAF_AudioFrame *pDecAfWrt // audio frame to write
+);
+
+
+#endif /* ASP_OUTIS_SLAVE_H_ */
diff --git a/pasdk/test_dsp/framework/aspOutInitSync_master.c b/pasdk/test_dsp/framework/aspOutInitSync_master.c
--- /dev/null
@@ -0,0 +1,126 @@
+
+/*
+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.
+*
+*/
+
+/*
+ * ======== aspOutInitSync_slave.c ========
+ */
+
+
+#include <xdc/std.h>
+
+#include "aspOutInitSync_common.h"
+#include "aspOutInitSync_master.h"
+
+
+// Read dec stage flag
+Int outIsReadDecStageFlag(
+ PAF_AST_OutInitSyncCtl *pOutIsCtl, // Output Init-Sync Info Control
+ Int8 outIsiIdx, // Output Init-Sync Info index
+ Int8 decStageIdx, // dec stage index
+ Int8 *pFlagVal // flag value read
+)
+{
+ IArg key;
+ GateMP_Handle gateHandle;
+ PAF_AST_OutInitSyncInfo *pOutISI;
+ PAF_AST_DecStageOutInitSyncInfo *pDecStageOutISI;
+
+ // Get gate handle
+ gateHandle = pOutIsCtl->gateHandle;
+ // Enter gate
+ key = GateMP_enter(gateHandle);
+
+ //
+ // Read decoder stage flag
+ //
+
+ // Get address of Output Init-Sync Info
+ pOutISI = &((*pOutIsCtl->pXOutIsInfo)[outIsiIdx]);
+ // Get address of Decoder Output Init-Sync Info
+ pDecStageOutISI = &pOutISI->decStageOutInitSyncInfo[decStageIdx];
+ // Read flag value
+ *pFlagVal = pDecStageOutISI->decFlag;
+
+ // Leave the gate
+ GateMP_leave(gateHandle, key);
+
+ return ASP_OUTIS_SOK;
+}
+
+// Read dec stage flag and AF
+Int outIsReadDecStageFlagAndAf(
+ PAF_AST_OutInitSyncCtl *pOutIsCtl, // Output Init-Sync Info Control
+ Int8 outIsiIdx, // Output Init-Sync Info index
+ Int8 decStageIdx, // dec stage index
+ Int8 *pDecFlag, // audio frame valid flag
+ PAF_AudioFrame *pDecAfRd // audio frame read
+)
+{
+ IArg key;
+ GateMP_Handle gateHandle;
+ PAF_AST_OutInitSyncInfo *pOutISI;
+ PAF_AST_DecStageOutInitSyncInfo *pDecStageOutISI;
+
+
+ // Get gate handle
+ gateHandle = pOutIsCtl->gateHandle;
+ // Enter gate
+ key = GateMP_enter(gateHandle);
+
+ //
+ // Read decoder stage audio frame
+ // Read decoder stage flag
+ //
+
+ // Get address of Output Init-Sync Info
+ pOutISI = &((*pOutIsCtl->pXOutIsInfo)[outIsiIdx]);
+ // Get address of Decoder Output Init-Sync Info
+ pDecStageOutISI = &pOutISI->decStageOutInitSyncInfo[decStageIdx];
+
+ // Read flag value
+ *pDecFlag = pDecStageOutISI->decFlag;
+
+ // Read audio frame
+ if (pDecStageOutISI->decFlag != 0)
+ {
+ // audio frame valid
+ *pDecAfRd = pDecStageOutISI->decAf;
+ }
+
+ // Leave the gate
+ GateMP_leave(gateHandle, key);
+
+ return ASP_OUTIS_SOK;
+}
diff --git a/pasdk/test_dsp/framework/aspOutInitSync_master.h b/pasdk/test_dsp/framework/aspOutInitSync_master.h
--- /dev/null
@@ -0,0 +1,65 @@
+
+/*
+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.
+*
+*/
+
+/*
+ * ======== aspOutInitSync_master.h ========
+ */
+
+#ifndef _ASP_OUTIS_MASTER_H_
+#define _ASP_OUTIS_MASTER_H_
+
+#include <xdc/std.h>
+
+#include "aspOutInitSync_common.h"
+
+// Read dec stage flag
+Int outIsReadDecStageFlag(
+ PAF_AST_OutInitSyncCtl *pOutIsCtl, // Output Init-Sync Info Control
+ Int8 outIsiIdx, // Output Init-Sync Info index
+ Int8 decStageIdx, // dec stage index
+ Int8 *pFlagVal // flag value read
+);
+
+// Read dec stage flag and AF.
+// Flag must be non-zero for read of AF.
+Int outIsReadDecStageFlagAndAf(
+ PAF_AST_OutInitSyncCtl *pOutIsCtl, // Output Init-Sync Info Control
+ Int8 outIsiIdx, // Output Init-Sync Info index
+ Int8 decStageIdx, // dec stage index
+ Int8 *pDecFlag, // audio frame valid flag
+ PAF_AudioFrame *pDecAfRd // audio frame read
+);
+
+#endif /* ASP_OUTIS_MASTER_H_ */