]> 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
PASDK183: Initial DTS modifications in framework.
[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 DTS
51 //#define DDP
52 #ifdef TEST_MULTICHANNEL
54 #ifdef DTS
55     //DTS
56     #define CUS_ATBOOT_S \
57         writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
58         writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
59         writeVOLControlMasterN(0), \
60         writeVOLOffsetMasterN(0x7fff), \
61         writeSYSRecreationModeDirect, \
62         writeSYSChannelConfigurationRequestSurround4_1, \
63         execPAIOutAnalog, \
64         execPAIInHDMI
65 #else
66     #ifndef DDP
67     //THD
68     #define CUS_ATBOOT_S \
69         writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
70         writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
71         writeVOLControlMasterN(0), \
72         writeVOLOffsetMasterN(0x7fff), \
73         writeSYSRecreationModeDirect, \
74         writeSYSChannelConfigurationRequestSurround4_1, \
75         execPAIOutAnalog, \
76         execPAIInHDMI
77     #else
78     //DDP
79     #define CUS_ATBOOT_S \
80         writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
81         writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,6,7,-3,-3,-3,-3,-3,-3,-3,-3), \
82         writeVOLControlMasterN(0), \
83         writeVOLOffsetMasterN(0x7fff), \
84         writeSYSRecreationModeDirect, \
85         writeSYSChannelConfigurationRequestSurround2ATMOS_1(4), \
86         execPAIOutAnalog, \
87         execPAIInHDMIStereo
88     #endif
89 #endif
90     //
91     //writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \     // Lrs/Rrs
92     //writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,6,7,-3,-3,-3,-3,-3,-3,-3,-3), \       // Ltm/Rtm
93     //
94     //writeVOLControlMasterN(-80), \
95     //
96     //
97     //writeSYSChannelConfigurationRequestSurround4_1, \
98     //writeSYSChannelConfigurationRequestSurround2ATMOS_1(4), \                                 // L/R,C,LFE,Ls/Rs,Ltm/Rtm
99     //
100     //writeDDPJOCDecodeModeDisable, \
101     //
102     //
103     //execPAIOutAnalogSlave, \
104     //execPAIInAnalog
105     //execPAIOutAnalog, \
106     //execPAIInHDMI
107     //execPAIOutAnalog, \
108     //execPAIInDigital    
109     //
110 #else
112 #define CUS_ATBOOT_S \
113     writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3), \
114     writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3), \
115     writeVOLControlMasterN(0), \
116     writeVOLOffsetMasterN(0x7fff), \
117     writeSYSRecreationModeDirect, \
118     writeSYSChannelConfigurationRequestStereo, \
119     execPAIOutAnalog, \
120     execPAIInHDMIStereo
121 #endif
123 #else // SIMULATE_SIO
125 #define CUS_ATBOOT_S \
126     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), \
127     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), \
128     writeVOLControlMasterN(0), \
129     writeVOLOffsetMasterN(0x7fff), \
130     writeSYSRecreationModeDirect, \
131     writeSYSChannelConfigurationRequestSurround4_1, \
132     execPAIOutAnalog, \
133     execPAIInAnalog
134     //execPAIOutNone, \
135     //execPAIInNone
137 #endif // SIMULATE_SIO
139 #pragma DATA_SECTION(cus_atboot_s0_patch, ".none")
140 const ACP_Unit cus_atboot_s0_patch[] = {
141     0xc900 + 0 - 1,
142     CUS_ATBOOT_S,
143 };
145 const ACP_Unit cus_atboot_s_patch[] = {
146     0xc900 + sizeof(cus_atboot_s0_patch)/2 - 1,
147     CUS_ATBOOT_S,
148 };
150 const ACP_Unit cus_atboot_s[] = {
151     0xc900 + sizeof(cus_atboot_s0_patch)/2 - 1,
152     CUS_ATBOOT_S,
153 };
155 const ACP_Unit cus_attime_s[] = {
156     0xc900,
157 };
158 // EOF