[processor-sdk/performance-audio-sr.git] / processor_audio_sdk_1_00_00_00 / pasdk / test_dsp / application / itopo / ipce_nodelay.c
1 //
2 // $Source: /cvsstl/ti/pa/cust/pioneer/c184/d1/d13/ipce_nodelay.c,v $
3 // $Revision: 1.1 $
4 //
5 // Common PCM Encoder algoritm interface implementation
6 //
7 // Copyright 2001-2003, Texas Instruments India. All rights reserved.
8 //
9 // $Log: ipce_nodelay.c,v $
10 // Revision 1.1 2013/08/08 03:45:11 yamaguchi
11 // MID4367: Initial Version
12 //
13 //
15 /*
16 * IPCE default instance creation parameters
17 */
18 #include <xdc/std.h> //<std.h>
19 #include <ipce.h>
21 /*
22 * ======== IPCE_PARAMS_NODELAY ========
23 * This static initialization defines the default parameters used to
24 * create instances of PCE objects.
25 */
27 #if IPCE_PHASES != 6
28 #error internal error
29 #endif
31 // Start of customizable code -------------------------------------------------
33 #define IPCE_OUTPUT_NUMCHAN 32 // Number of output channels
34 //#define IPCE_OUTPUT_ESIZE 3 // Element size for output: 24 or 32 bits
35 #define IPCE_OUTPUT_ESIZE 4 // Element size for output: 24 or 32 bits
37 #define IPCE_FSIZE 256 // Size of Audio Frame
39 #define IPCE_OUTPUT_NUMCHAN_SECONDARY 2 // Number of output channels in secondary
41 // End of customizable code ---------------------------------------------------
43 #define IPCE_DELAY_ESIZE 4 // Element size for delay: packed 24 bits
45 /*
46 * ======== IPCE_PARAMS_STATUS_DELAY_NODELAY ========
47 */
49 const IPCE_Status IPCE_PARAMS_STATUS_NODELAY = {
50 sizeof (IPCE_Status),
51 1, /* mode: enabled */
52 0, /* type: unused */
53 1, 0, /* phase 0 mode,type: enabled,unused */
54 0, 0, /* phase 1 mode,type: enabled,unused */
55 1, 0, /* phase 2 mode,type: enabled,unused */
56 1, 0, /* phase 3 mode,type: enabled,unused */
57 1, 0, /* phase 4 mode,type: enabled,unused */
58 1, 0, /* phase 5 mode,type: enabled,unused */
59 /* Delay Status */
60 0, /* unused */
61 1, /* unit */
62 PAF_MAXNUMCHAN, /* numc */
63 0, /* nums */
64 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // delay
65 0, // masterDelay
66 0, // pceExceptionDetect
67 0, // pceExceptionFlag
68 0, // pceExceptionMute
69 0, // pceClipDetect
70 0, // bsMetadata_type
71 0, // mdInsert
72 32 // maxNumChMd
73 };
75 /*
76 * ======== IPCE_PARAMS_CONFIG_DELAY_NODELAY ========
77 * This static initialization defines the parameters used to create
78 * instances of DEL objects
79 */
81 const IPCE_ConfigPhaseVolume IPCE_PARAMS_CONFIG_PHASE_VOLUME_NODELAY = {
82 sizeof (IPCE_ConfigPhaseVolume),
83 -2 * 40, /* volumeRamp */
84 };
86 const IPCE_ConfigPhaseDelay IPCE_PARAMS_CONFIG_PHASE_DELAY_NODELAY = {
87 sizeof (IPCE_ConfigPhaseDelay),
88 0,
89 IPCE_DELAY_ESIZE,
90 NULL,
91 };
93 const IPCE_Config IPCE_PARAMS_CONFIG_NODELAY = {
94 sizeof (IPCE_Config),
95 0, /* frameLength */
96 0, /* unused */
97 (IPCE_ConfigPhase *) & IPCE_PARAMS_CONFIG_PHASE_VOLUME_NODELAY, /* phase 0 config: volume */
98 (IPCE_ConfigPhase *) & IPCE_PARAMS_CONFIG_PHASE_DELAY_NODELAY, /* phase 1 config: delay */
99 0, /* phase 2 config: output */
100 0, /* phase 3 config: unused */
101 0, /* phase 4 config: unused */
102 0, /* phase 5 config: unused */
103 0, /* phase 0 common: volume */
104 0, /* phase 1 common: delay */
105 0, /* phase 2 common: output */
106 0, /* phase 3 common: unused */
107 0, /* phase 4 common: unused */
108 0, /* phase 5 common: unused */
109 /* scale -- uninitialized */
110 };
112 /*
113 * ======== IPCE_PARAMS_ACTIVE ========
114 */
116 const PAF_ActivePhaseVolume IPCE_PARAMS_ACTIVE_PHASE_VOLUME_NODELAY = {
117 sizeof (PAF_ActivePhaseVolume),
118 /* pVolumeStatus: uninitialized */
119 };
121 const PAF_ActivePhaseOutput IPCE_PARAMS_ACTIVE_PHASE_OUTPUT_NODELAY = {
122 sizeof (PAF_ActivePhaseOutput),
123 /* pEncodeStatus: uninitialized */
124 /* pOutBufConfig: uninitialized */
125 };
127 const IPCE_Active IPCE_PARAMS_ACTIVE_NODELAY = {
128 0,
129 0,
130 (PAF_ActivePhase *) & IPCE_PARAMS_ACTIVE_PHASE_VOLUME_NODELAY, /* phase 0 active: volume */
131 0, /* phase 1 active: delay */
132 (PAF_ActivePhase *) & IPCE_PARAMS_ACTIVE_PHASE_OUTPUT_NODELAY, /* phase 2 active: output */
133 0, /* phase 3 active: unused */
134 0, /* phase 4 active: unused */
135 0, /* phase 5 active: unused */
136 /* bitstreamMask uninitialized */
137 };
139 /*
140 * ======== IPCE_PARAMS_SCRACH ========
141 */
142 const PAF_ScrachPhaseOutput IPCE_PARAMS_SCRACH_PHASE_OUTPUT_NODELAY = {
143 sizeof (PAF_ScrachPhaseDelay) + IPCE_OUTPUT_NUMCHAN * IPCE_OUTPUT_ESIZE * IPCE_FSIZE,
144 };
146 const IPCE_Scrach IPCE_PARAMS_SCRACH_NODELAY = {
147 sizeof (IPCE_Scrach),
148 0, /* phase 0 scrach: volume */
149 0, /* phase 1 scrach: delay */
150 0, //(PAF_ScrachPhase *) & IPCE_PARAMS_SCRACH_PHASE_OUTPUT_NODELAY, /* phase 2 scrach: output */
151 0, /* phase 3 scrach: unused */
152 0, /* phase 4 scrach: unused */
153 0, /* phase 5 scrach: unused */
154 };
156 const IPCE_Params IPCE_PARAMS_NODELAY = {
157 sizeof (IPCE_Params),
158 &IPCE_PARAMS_STATUS_NODELAY,
159 &IPCE_PARAMS_CONFIG_NODELAY,
160 &IPCE_PARAMS_ACTIVE_NODELAY,
161 &IPCE_PARAMS_SCRACH_NODELAY,
162 };
164 const PAF_ScrachPhaseDelay IPCE_PARAMS_SCRACH_PHASE_OUTPUT_CUS_SEC = {
165 sizeof(PAF_ScrachPhaseDelay)+IPCE_OUTPUT_NUMCHAN_SECONDARY*IPCE_OUTPUT_ESIZE*IPCE_FSIZE, // 2*256*4 = no of output channels for rec out * block size * output sample size
166 };
168 const IPCE_Scrach IPCE_PARAMS_SCRACH_CUS_SEC = {
169 sizeof(IPCE_Scrach),
170 0, /* phase 0 scrach: volume */
171 0, /* phase 1 scrach: delay */
172 0, //(PAF_ScrachPhase *)&IPCE_PARAMS_SCRACH_PHASE_OUTPUT_CUS_SEC, /* phase 2 scrach: output */
173 0, /* phase 3 scrach: unused */
174 0, /* phase 4 scrach: unused */
175 0, /* phase 5 scrach: unused */
176 };
178 const IPCE_Params IPCE_PARAMS_CUS_SEC = {
179 sizeof(IPCE_Params),
180 &IPCE_PARAMS_STATUS_NODELAY,
181 &IPCE_PARAMS_CONFIG_NODELAY,
182 &IPCE_PARAMS_ACTIVE_NODELAY,
183 &IPCE_PARAMS_SCRACH_CUS_SEC,
184 };
186 #ifndef __TI_EABI__
187 asm (" .global _IPCE_PARAMS");
188 asm ("_IPCE_PARAMS .set _IPCE_PARAMS_NODELAY");
189 #else
190 asm (" .global IPCE_PARAMS");
191 asm ("IPCE_PARAMS .set IPCE_PARAMS_NODELAY");
192 #endif