]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blob - pasrc/test_dsp/framework/itopo/system.c
Submodules clean up:
[processor-sdk/performance-audio-sr.git] / pasrc / test_dsp / framework / itopo / system.c
2 /*
3 Copyright (c) 2018, 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 //
37 // Contains definitions for System Stream parameters, status, and configuration.
38 //
40 #include <xdc/std.h>
42 #include <paftyp.h>
43 #include <pafsys_a.h> 
44 #include "noasp.h"
45 #include "systemStream.h"
47 #include "pfp/pfp.h"
48 #include "pfp_app.h"        /* contains all PFP ID's */
50 // System Stream parameters, primary functions
51 const struct {
52     PAF_SST_FxnsMain *main;
53     Int count;
54     struct {
55         PAF_SST_FxnsCompute  *compute;
56         PAF_SST_FxnsTransmit *transmit;
57     } sub[5];
58 } systemStreamPrimaryFxns =
59 {
60     &systemStreamMain,
61     5,
62     {
63         { &systemStream1Compute, &systemStream1Transmit, },
64 #ifndef NOBM
65         { &systemStream2Compute, &systemStream2Transmit, },
66 #else
67         { NULL, NULL, },
68 #endif        
69 #ifndef NODEM
70         { &systemStream3Compute, &systemStream3Transmit, },
71 #else
72         { NULL, NULL, },
73 #endif        
74 #ifdef THX
75         { &systemStream4Compute, &systemStream4Transmit, },
76 #else
77         { NULL, NULL, },
78 #endif
79         { &systemStream5Compute, &systemStream5Transmit, },
80     },
81 };
83 // System Stream paramters
84 const PAF_SST_Params systemStreamParams_PA[1] =
85 {
86     {
87         1, 0, 1, 1,                                     // streams, stream1, streamN, ss    
88         (const PAF_SST_Fxns *)&systemStreamPrimaryFxns, // fxns
89     },
90 };
92 // System Stream (SYS) status
93 PAF_SystemStatus systemStreamStatus[1] = {
94     {
95         sizeof (PAF_SystemStatus),
96         PAF_SYS_MODE_ALL,               // mode
97         0,                              // listeningMode
98         PAF_SYS_RECREATIONMODE_AUTO,    // recreationMode
99         2 + PAF_SYS_SPEAKERSIZE_SMALL,  // speakerMain
100         1 + PAF_SYS_SPEAKERSIZE_SMALL,  // speakerCntr
101         2 + PAF_SYS_SPEAKERSIZE_SMALL,  // speakerSurr
102         2 + PAF_SYS_SPEAKERSIZE_SMALL,  // speakerBack
103         1 + PAF_SYS_SPEAKERSIZE_BASS,   // speakerSubw
104         PAF_SYS_CCRTYPE_STANDARD,       // channelConfigurationRequestType
105         0, 0, 0,                        // switchImage, imageNum, imageNumMax
106         0,                              // Unused
107         0, 0,                           // cpuLoad, peakCpuLoad
108         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerWide
109         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerHead
110         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerTopfront
111         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerToprear
112         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerTopmiddle
113         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerFrontheight
114         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerRearheight
115         0,                              // unused2
116         PAF_CC_SAT_UNKNOWN, PAF_CC_SUB_ZERO, 0, 0, 0, 0, 0, 0,  // channelConfigurationRequest
117 #ifdef FULL_SPEAKER // paftyp.h
118         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerScreen
119         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerSurr1
120         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerSurr2
121         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerRearSurr1
122         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerRearSurr2
123         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerCntrSurr
124         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerLRCntr
125         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerLRCntrSurr
126 #else
127         0, 0, 0, 0, 0, 0, 0, 0          // unused3
128 #endif
129         0, 0,                           // asitLoad, peakAsitLoad
130         0, 0,                           // asotLoad, peakAsotLoad
131         0, 0,                           // aipLoad,  peakAipLoad
132         0, 0,                           // afpLoad,  peakAfpLoad
133         0, 0,                           // ssLoad,   peakSsLoad   
134         0, 0,                           // unused4
135         0,                              // pfpDisableMask
136         0,                              // pfpEnableMask
137         PFP_ENABLE_MASK,                // pfpEnabledBf
138         0,                              // pfpLatchStatsMask
139         0,                              // pfpResetStatsMask
140         0,                              // pfpAlphaUpdateMask
141         -1.0,                           // pfpAlphaUpdate
142     },
143 };
145 // System Stream configuration
146 PAF_SST_Config systemStreamConfig[1] =
148     {
149         0,                              // firstTimeInit
150         NULL,                           // acp
151         &systemStreamStatus[0],         // pStatus
152     },
153 };