]> 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
PASDK 564: Removed one dependency of hard coded number from the input task initializa...
[processor-sdk/performance-audio-sr.git] / pasdk / test_dsp / application / itopo / evmk2g / atboot.c
2 /*
3 Copyright (c) 2017, 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 #include "dbgBenchmark.h" // PCM high-sampling rate + SRC + CAR benchmarking
51 #ifdef DTS_BUILD
52 #define DTS_ATBOOT_CFG 1
53 #endif
55 #ifdef DTS_ATBOOT_CFG    
56 //DTS_ATBOOT_CFG
57 #define CUS_ATBOOT_S \
58         writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
59         writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
60         writeVOLControlMasterN(0), \
61         writeVOLOffsetMasterN(0x7fff), \
62         writeSYSRecreationModeDirect, \
63         writeSYSChannelConfigurationRequestSurround4_1, \
64         execPAIOutAnalog, \
65         execPAIInHDMIStereo
66 #else 
67 //Not DTS_ATBOOT_CFG
69 #ifndef DDP_ATBOOT_CFG
70 //
71 // NOT DDP at-boot configuration
72 //
74 #ifndef _ENABLE_BENCHMARK_PCMHSR_SRC_CAR_
75 //
76 // THD at-boot configuration
77 //
79 // NOT Performing PCM high-sampling rate + SRC + CAR benchmarking
80 // 4XI2S HDMI input for multi-ch PCM
81 #define CUS_ATBOOT_S \
82     writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
83     writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
84     writeVOLControlMasterN(0), \
85     writeVOLOffsetMasterN(0x7fff), \
86     writeSYSRecreationModeDirect, \
87     writeSYSChannelConfigurationRequestSurround4_1, \
88     execPAIOutAnalog, \
89     execPAIInHDMI
90 #else
91 // Performing PCM high-sampling rate + SRC + CAR benchmarking
92 // 4XI2S HDMI input for multi-ch PCM
93 #define CUS_ATBOOT_S \
94     writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
95     writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
96     writeVOLControlMasterN(0), \
97     writeVOLOffsetMasterN(0x7fff), \
98     writeSYSRecreationModeDirect, \
99     writeSYSChannelConfigurationRequestSurround4_1, \
100     execPAIOutAnalog, \
101     execPAIInHDMI, \
102     writeSRCModeDisable, \
103     writeCARModeDisable
104 #endif    
105     
106 #else // DDP_ATBOOT_CFG
108 //
109 // DDP at-boot configuration
110 //
111 #define CUS_ATBOOT_S \
112     writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
113     writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
114     writeVOLControlMasterN(0), \
115     writeVOLOffsetMasterN(0x7fff), \
116     writeSYSRecreationModeDirect, \
117     writeSYSChannelConfigurationRequestSurround4_1, \
118     execPAIOutAnalog, \
119     execPAIInHDMIStereo
120     
121 #endif // DDP_ATBOOT_CFG
122 #endif // NOT DTS_ATBOOT_CFG
124 #pragma DATA_SECTION(cus_atboot_s0_patch, ".none")
125 const ACP_Unit cus_atboot_s0_patch[] = {
126     0xc900 + 0 - 1,
127     CUS_ATBOOT_S,
128 };
130 const ACP_Unit cus_atboot_s_patch[] = {
131     0xc900 + sizeof(cus_atboot_s0_patch)/2 - 1,
132     CUS_ATBOOT_S,
133 };
135 const ACP_Unit cus_atboot_s[] = {
136     0xc900 + sizeof(cus_atboot_s0_patch)/2 - 1,
137     CUS_ATBOOT_S,
138 };
140 const ACP_Unit cus_attime_s[] = {
141     0xc900,
142 };
143 // EOF