]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blob - pasdk/common/aspOutInitSync_common.h
PASDK-218:Merge remote-tracking branch 'origin/dev_pasdk_govind_pasdk218' into dev_pa...
[processor-sdk/performance-audio-sr.git] / pasdk / common / aspOutInitSync_common.h
2 /*
3 Copyright (c) 2017, Texas Instruments Incorporated - http://www.ti.com/
4 All rights reserved.
6 * Redistribution and use in source and binary forms, with or without 
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the
16 * distribution.
17 *
18 * Neither the name of Texas Instruments Incorporated nor the names of
19 * its contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 *
34 */
36 #ifndef _ASP_OUT_INIT_SYNC_H_
37 #define _ASP_OUT_INIT_SYNC_H_
39 #include <xdc/std.h>
40 #include <ti/ipc/GateMP.h>
41 #include "paftyp.h"
43 // error return codes
44 #define ASP_OUTIS_SOK                       ( 0 )                               // ok
45 #define ASP_OUTIS_CTL_INIT_INV_GATE         ( ASP_OUTIS_SOK-1 )                 // error: invalid gate handle
46 #define ASP_OUTIS_ERR_START                 ( ASP_OUTIS_CTL_INIT_INV_GATE )     // start error return ID for master & slave error return definitions
48 // Output Init-Sync number of decoder stages
49 // 2 stages: Dec Reset, Dec Info
50 #define ASP_OUTIS_NUM_DEC_STAGES            ( 3 )
52 // Output Init-Sync decoder stages indices
53 #define ASP_OUTIS_DEC_STAGE_RESET_IDX       ( 0 )
54 #define ASP_OUTIS_DEC_STAGE_INFO1_IDX       ( ASP_OUTIS_DEC_STAGE_RESET_IDX+1 )
55 #define ASP_OUTIS_DEC_STAGE_DECODE1_IDX     ( ASP_OUTIS_DEC_STAGE_INFO1_IDX+1 )
57 #define ASP_OUTIS_GATE_NAME                 ( "AspOutISGate" )  // name of GateMP used OutIS info protection
58 #define ASP_OUTIS_GATE_REGION_ID            ( 0 )               // IPC shared region ID used for OutIS gate allocation   
60 // Decoder Stage Output Processing Init-Sync Information    
61 typedef struct PAF_AST_DecStageOutInitSyncInfo 
62 {
63     Int8 decFlag;           // decoder stage flag: 0:dec stage not executed; 1:dec stage executed
64     PAF_AudioFrame decAf;   // decoder output audio frame
65 } PAF_AST_DecStageOutInitSyncInfo;
67 // Output Processing Init-Sync Information
68 typedef struct PAF_AST_OutInitSyncInfo
69 {
70     PAF_AST_DecStageOutInitSyncInfo decStageOutInitSyncInfo[ASP_OUTIS_NUM_DEC_STAGES];
71 } PAF_AST_OutInitSyncInfo;
73 // Output Processing Init-Sync control
74 typedef struct PAF_AST_OutInitSyncCtl
75 {
76     GateMP_Handle gateHandle;                   // output init-sync gate handle
77     PAF_AST_OutInitSyncInfo **pXOutIsInfo;      // address of output init-sync info base pointer
78 } PAF_AST_OutInitSyncCtl;
80 // Initialize Output Processing Init-Sync control
81 Int outIsCtlInit(
82     PAF_AST_OutInitSyncCtl *pOutIsCtl,          // output init-sync control to initialize
83     PAF_AST_OutInitSyncInfo **pXOutIsInfo       // pointer to base address of output init-sync info array
84 );
86 // Copy audio frame
87 // Note similar functionality present in CB, check usage there.
88 Void outIsCpyAf(
89     PAF_AudioFrame *pSrcAf,
90     PAF_AudioFrame *pDstAf
91 );
93 #endif /* _ASP_OUT_INIT_SYNC_H_ */