]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blob - pasdk/test_dsp/application/itopo/evmk2g/atboot.c
df9c64e325844c383a061ef80bb5e3caefbd11e5
[processor-sdk/performance-audio-sr.git] / pasdk / test_dsp / application / itopo / evmk2g / atboot.c
2 /*
3 Copyright (c) 2016, 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 //
38 // Initial version obtained from ver 1.10 of i12/evmda830/atboot.c
39 //
41 //#include <ti/procsdk_audio/procsdk_audio_typ.h>
42 #include <procsdk_audio_typ.h>
44 #include <acptype.h>
45 #include <pafaip_a.h>
47 #include <pa_i13_evmk2g_io_a.h> //<pa_i13_evmda830_io_a.h>
49 #ifndef SIMULATE_SIO
50 #define DDP
51 #ifdef TEST_MULTICHANNEL
52 #ifndef DDP
53 //THD
54 #define CUS_ATBOOT_S \
55     writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
56     writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
57     writeVOLControlMasterN(0), \
58     writeVOLOffsetMasterN(0x7fff), \
59     writeSYSRecreationModeDirect, \
60     writeSYSChannelConfigurationRequestSurround4_1, \
61     execPAIOutAnalog, \
62     execPAIInHDMI
63 #else
64 //DDP
65 #define CUS_ATBOOT_S \
66     writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
67     writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,6,7,-3,-3,-3,-3,-3,-3,-3,-3), \
68     writeVOLControlMasterN(0), \
69     writeVOLOffsetMasterN(0x7fff), \
70     writeSYSRecreationModeDirect, \
71     writeSYSChannelConfigurationRequestSurround2ATMOS_1(4), \
72     writeBMDAspeakerBackNone, \
73     writeBMDAspeakerTopmiddleLarge, \
74     execPAIOutAnalog, \
75     execPAIInHDMIStereo
76 #endif
77     //
78     //writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \     // Lrs/Rrs
79     //writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,6,7,-3,-3,-3,-3,-3,-3,-3,-3), \       // Ltm/Rtm
80     //writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,PAF_LSUR,PAF_RSUR,PAF_CNTR,PAF_SUBW,PAF_LBAK,PAF_RBAK,PAF_LTFT,PAF_RTFT,PAF_LTRR,PAF_RTRR,-3,-3,-3,-3), \      // Ltf/Rtf,Ltr/Rtr
81     //
82     //writeVOLControlMasterN(-80), \
83     //
84     //
85     //7.1
86     //writeSYSChannelConfigurationRequestSurround4_1, \
87     //
88     //5.1.2
89     //writeSYSChannelConfigurationRequestSurround2ATMOS_1(4), \                                 // L/R,C,LFE,Ls/Rs,Ltm/Rtm
90     //writeBMDAspeakerBackNone, \
91     //writeBMDAspeakerTopmiddleLarge, \
92     //
93     //writeDDPJOCDecodeModeDisable, \
94     //
95     //writeTHDDRCDisable, \
96     //writeTHDDRCCutN(0), \
97     //writeTHDDRCBoostN(0), \
98     //writeTHDLosslessDisable, \
99     //
100     //execPAIOutNone, \
101     //execPAIInNone
102     //execPAIOutAnalogSlave, \
103     //execPAIInAnalog
104     //execPAIOutAnalog, \
105     //execPAIInHDMI
106     //execPAIOutAnalog, \
107     //execPAIInDigital    
108     //
109 #else
111 #define CUS_ATBOOT_S \
112     writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3), \
113     writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3), \
114     writeVOLControlMasterN(0), \
115     writeVOLOffsetMasterN(0x7fff), \
116     writeSYSRecreationModeDirect, \
117     writeSYSChannelConfigurationRequestStereo, \
118     execPAIOutAnalog, \
119     execPAIInHDMIStereo
120 #endif
122 #else // SIMULATE_SIO
124 #define CUS_ATBOOT_S \
125     writeDECChannelMapTo16  (PAF_LEFT,PAF_RGHT,PAF_LSUR,PAF_RSUR,PAF_CNTR,PAF_SUBW,PAF_LBAK,PAF_RBAK,PAF_LWID,PAF_RWID,PAF_LHED,PAF_RHED,-3,-3,-3,-3), \
126     writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,PAF_LSUR,PAF_RSUR,PAF_CNTR,PAF_SUBW,PAF_LBAK,PAF_RBAK,PAF_LWID,PAF_RWID,PAF_LHED,PAF_RHED,-3,-3,-3,-3), \
127     writeVOLControlMasterN(0), \
128     writeVOLOffsetMasterN(0x7fff), \
129     writeSYSRecreationModeDirect, \
130     writeSYSChannelConfigurationRequestSurround4_1, \
131     execPAIOutAnalog, \
132     execPAIInAnalog
133     //execPAIOutNone, \
134     //execPAIInNone
136 #endif // SIMULATE_SIO
138 #pragma DATA_SECTION(cus_atboot_s0_patch, ".none")
139 const ACP_Unit cus_atboot_s0_patch[] = {
140     0xc900 + 0 - 1,
141     CUS_ATBOOT_S,
142 };
144 const ACP_Unit cus_atboot_s_patch[] = {
145     0xc900 + sizeof(cus_atboot_s0_patch)/2 - 1,
146     CUS_ATBOOT_S,
147 };
149 const ACP_Unit cus_atboot_s[] = {
150     0xc900 + sizeof(cus_atboot_s0_patch)/2 - 1,
151     CUS_ATBOOT_S,
152 };
154 const ACP_Unit cus_attime_s[] = {
155     0xc900,
156 };
157 // EOF