95a6b6e94c468431227faaafd97af7403d7265c4
[processor-sdk/performance-audio-sr.git] / procsdk_audio_x_xx_xx_xx / test_dsp / application / itopo / evmk2g / atboot.c
2 /*
3 * Copyright (C) 2004-2014 Texas Instruments Incorporated - http://www.ti.com/
4 * All rights reserved.    
5 *
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
51 #ifdef TEST_MULTICHANNEL
52 #define CUS_ATBOOT_S \
53     writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
54     writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
55     writeVOLControlMasterN(0), \
56     writeVOLOffsetMasterN(0x7fff), \
57     writeSYSRecreationModeDirect, \
58     writeSYSChannelConfigurationRequestSurround4_1, \
59     writeDDPJOCDecodeModeDisable, \
60     execPAIOutAnalogSlave, \
61     execPAIInAnalog
62 #else
64 #define CUS_ATBOOT_S \
65     writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3), \
66     writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3), \
67     writeVOLControlMasterN(0), \
68     writeVOLOffsetMasterN(0x7fff), \
69     writeSYSRecreationModeDirect, \
70     writeSYSChannelConfigurationRequestStereo, \
71     execPAIOutAnalog, \
72     execPAIInHDMIStereo
73 #endif
75 #else // SIMULATE_SIO
77 #define CUS_ATBOOT_S \
78     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), \
79     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), \
80     writeVOLControlMasterN(0), \
81     writeVOLOffsetMasterN(0x7fff), \
82     writeSYSRecreationModeDirect, \
83     writeSYSChannelConfigurationRequestSurround4_1, \
84     execPAIOutAnalog, \
85     execPAIInAnalog
86     //execPAIOutNone, \
87     //execPAIInNone
89 #endif // SIMULATE_SIO
91 #pragma DATA_SECTION(cus_atboot_s0_patch, ".none")
92 const ACP_Unit cus_atboot_s0_patch[] = {
93     0xc900 + 0 - 1,
94     CUS_ATBOOT_S,
95 };
97 const ACP_Unit cus_atboot_s_patch[] = {
98     0xc900 + sizeof(cus_atboot_s0_patch)/2 - 1,
99     CUS_ATBOOT_S,
100 };
102 const ACP_Unit cus_atboot_s[] = {
103     0xc900 + sizeof(cus_atboot_s0_patch)/2 - 1,
104     CUS_ATBOOT_S,
105 };
107 const ACP_Unit cus_attime_s[] = {
108     0xc900,
109 };
110 // EOF