1<?xml version="1.0" encoding="ISO-8859-1"?> 2<!-- Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. --> 3<!-- --> 4<!-- Redistribution and use in source and binary forms, with or without --> 5<!-- modification, are permitted provided that the following conditions are --> 6<!-- met: --> 7<!-- * Redistributions of source code must retain the above copyright --> 8<!-- notice, this list of conditions and the following disclaimer. --> 9<!-- * Redistributions in binary form must reproduce the above --> 10<!-- copyright notice, this list of conditions and the following --> 11<!-- disclaimer in the documentation and/or other materials provided --> 12<!-- with the distribution. --> 13<!-- * Neither the name of The Linux Foundation nor the names of its --> 14<!-- contributors may be used to endorse or promote products derived --> 15<!-- from this software without specific prior written permission. --> 16<!-- --> 17<!-- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED --> 18<!-- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF --> 19<!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT --> 20<!-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS --> 21<!-- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR --> 22<!-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF --> 23<!-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR --> 24<!-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, --> 25<!-- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN --> 26<!-- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> 27<mixer> 28 <!-- Initial Values --> 29 <!-- Preload Stage --> 30 <ctl name="Main AMP Enable Switch" value="0" /> 31 <ctl name="DSP1 Preload Switch" value="0" /> 32 <ctl name="R Main AMP Enable Switch" value="0" /> 33 <ctl name="R DSP1 Preload Switch" value="0" /> 34 <!-- Clock-trigger Stage --> 35 <ctl name="SINK_IDS" id="0" value="-1"/> 36 <ctl name="SINK_IDS" id="1" value="-1"/> 37 <ctl name="PCM Playback Volume" value="10"/> 38 <ctl name="TDM_0_RX Mixer EP6" value="0"/> 39 40 <!-- Preparation Stage --> 41 <path name="crus-switch-fw-prepare"> 42 <ctl name="DRE DRE Switch" value="1" /> 43 <ctl name="VBSTMON Output Switch" value="1" /> 44 <ctl name="DSP Booted" value="0" /> 45 <ctl name="DSP1 Preload Switch" value="0" /> 46 <ctl name="R DRE DRE Switch" value="1" /> 47 <ctl name="R VBSTMON Output Switch" value="1" /> 48 <ctl name="R DSP Booted" value="0" /> 49 <ctl name="R DSP1 Preload Switch" value="0" /> 50 </path> 51 52 <!-- Preload Stage --> 53 <path name="crus-fw-preload"> 54 <ctl name="DSP1 Preload Switch" value="1" /> 55 <ctl name="R DSP1 Preload Switch" value="1" /> 56 </path> 57 58 <!-- Firmware-switching Stage --> 59 <path name="crus-switch-fw-Calibration"> 60 <ctl name="AMP PCM Gain" value="17" /> 61 <ctl name="Digital PCM Volume" value="817" /> 62 <ctl name="PCM Source" value="DSP" /> 63 <ctl name="DSP1 Firmware" value="Calibration" /> 64 <ctl name="R AMP PCM Gain" value="17" /> 65 <ctl name="R Digital PCM Volume" value="817" /> 66 <ctl name="R PCM Source" value="DSP" /> 67 <ctl name="R DSP1 Firmware" value="Calibration" /> 68 </path> 69 70 <path name="crus-switch-fw-Diagnostic"> 71 <ctl name="AMP PCM Gain" value="17" /> 72 <ctl name="Digital PCM Volume" value="817" /> 73 <ctl name="PCM Source" value="DSP" /> 74 <ctl name="DSP1 Firmware" value="Diagnostic" /> 75 <ctl name="R AMP PCM Gain" value="17" /> 76 <ctl name="R Digital PCM Volume" value="817" /> 77 <ctl name="R PCM Source" value="DSP" /> 78 <ctl name="R DSP1 Firmware" value="Diagnostic" /> 79 </path> 80 81 <path name="crus-switch-fw-Protection"> 82 <ctl name="PCM Source" value="DSP" /> 83 <ctl name="DSP1 Firmware" value="Protection" /> 84 <ctl name="R PCM Source" value="DSP" /> 85 <ctl name="R DSP1 Firmware" value="Protection" /> 86 </path> 87 88 <!-- DSP-initialization Stage --> 89 <path name="crus-dsp-pre-calibration-amp1"> 90 <ctl name="Main AMP Enable Switch" value="1" /> 91 </path> 92 93 <path name="crus-dsp-pre-calibration-amp2"> 94 <ctl name="R Main AMP Enable Switch" value="1" /> 95 </path> 96 97 <path name="crus-dsp-pre-calibration"> 98 <path name="crus-dsp-pre-calibration-amp1" /> 99 <path name="crus-dsp-pre-calibration-amp2" /> 100 </path> 101 102 <path name="crus-dsp-pre-diagnostic-amp1"> 103 <ctl name="Main AMP Enable Switch" value="1" /> 104 </path> 105 106 <path name="crus-dsp-pre-diagnostic-amp2"> 107 <ctl name="R Main AMP Enable Switch" value="1" /> 108 </path> 109 110 <path name="crus-dsp-pre-diagnostic"> 111 <path name="crus-dsp-pre-diagnostic-amp1" /> 112 <path name="crus-dsp-pre-diagnostic-amp2" /> 113 </path> 114 115 <path name="crus-dsp-pre-protection"> 116 <ctl name="Main AMP Enable Switch" value="1" /> 117 <ctl name="R Main AMP Enable Switch" value="1" /> 118 </path> 119 120 <!-- Clock-trigger Stage --> 121 <path name="platform-controls"> 122 <ctl name="PCM Playback Volume" value="1000"/> 123 <ctl name="SINK_IDS" id="0" value="0"/> 124 <ctl name="SINK_IDS" id="1" value="-1"/> 125 <ctl name="TDM_0_RX Mixer EP6" value="1"/> 126 </path> 127 128 <!-- Post loaded firmware --> 129 <path name="crus-dsp-post-loading-fw"> 130 <ctl name="Main AMP Enable Switch" value="0" /> 131 <ctl name="R Main AMP Enable Switch" value="0" /> 132 </path> 133 134 <!-- Value & Information Fetch Stage --> 135 <path name="platform-values"> 136 <ctl name="TDM_0_RX Format" /> 137 <ctl name="TDM_0_RX Chan" /> 138 <ctl name="TDM_0_RX Sample Rate" /> 139 <ctl name="PCM Playback Volume" /> 140 <ctl name="TDM_0_RX Mixer EP6" /> 141 </path> 142 143 <path name="cs35l41-values"> 144 <ctl name="DRE DRE Switch" /> 145 <ctl name="R DRE DRE Switch" /> 146 <ctl name="VBSTMON Output Switch" /> 147 <ctl name="R VBSTMON Output Switch" /> 148 <ctl name="AMP PCM Gain" /> 149 <ctl name="R AMP PCM Gain" /> 150 <ctl name="Digital PCM Volume" /> 151 <ctl name="R Digital PCM Volume" /> 152 <ctl name="PCM Source" /> 153 <ctl name="R PCM Source" /> 154 <ctl name="DSP Booted" /> 155 <ctl name="R DSP Booted" /> 156 <ctl name="Main AMP Enable Switch" /> 157 <ctl name="R Main AMP Enable Switch" /> 158 <ctl name="DSP1 Preload Switch" /> 159 <ctl name="R DSP1 Preload Switch" /> 160 <ctl name="DSP1 Firmware" /> 161 <ctl name="R DSP1 Firmware" /> 162 </path> 163 164 165 <!-- Note that the order of controls does matter because 166 it should be matched to the structure defined in 167 sp_cal_common.h --> 168 <!-- 169 struct calibration_data { 170 unsigned int cal_r; 171 unsigned int cal_status; 172 unsigned int cal_checksum; 173 unsigned int cal_ambient; 174 unsigned int amp_pcm_gain; 175 unsigned int digital_pcm_gain; 176 }; 177 --> 178 <path name="cs35l41-dsp-amp1-calibration-values"> 179 <ctl name="DSP1 Calibration cd CAL_R" /> 180 <ctl name="DSP1 Calibration cd CAL_STATUS" /> 181 <ctl name="DSP1 Calibration cd CAL_CHECKSUM" /> 182 <ctl name="DSP1 Calibration cd CAL_AMBIENT" /> 183 <ctl name="AMP PCM Gain" /> 184 <ctl name="Digital PCM Volume" /> 185 186 <!-- Only for debug print --> 187 <ctl name="DSP1 Calibration cd CAL_SET_STATUS" /> 188 </path> 189 190 <path name="cs35l41-dsp-amp2-calibration-values"> 191 <ctl name="R DSP1 Calibration cd CAL_R" /> 192 <ctl name="R DSP1 Calibration cd CAL_STATUS" /> 193 <ctl name="R DSP1 Calibration cd CAL_CHECKSUM" /> 194 <ctl name="R DSP1 Calibration cd CAL_AMBIENT" /> 195 <ctl name="R AMP PCM Gain" /> 196 <ctl name="R Digital PCM Volume" /> 197 198 <!-- Only for debug print --> 199 <ctl name="R DSP1 Calibration cd CAL_SET_STATUS" /> 200 </path> 201 202 <!-- 203 struct diagnostic_data { 204 struct calibration_data calibration_data; 205 unsigned int z_low_diff; 206 unsigned int diag_f0; 207 unsigned int diag_f0_status; 208 }; 209 --> 210 <path name="cs35l41-dsp-amp1-diagnostic-values"> 211 <!-- struct calibration_data START --> 212 <ctl name="DSP1 Diagnostic cd CAL_R" /> 213 <ctl name="DSP1 Diagnostic cd CAL_STATUS" /> 214 <ctl name="DSP1 Diagnostic cd CAL_CHECKSUM" /> 215 <ctl name="DSP1 Diagnostic cd CAL_AMBIENT" /> 216 <ctl name="AMP PCM Gain" /> 217 <ctl name="Digital PCM Volume" /> 218 <!-- struct calibration_data END --> 219 <ctl name="DSP1 Diagnostic cd DIAG_Z_LOW_DIFF" /> 220 <ctl name="DSP1 Diagnostic cd DIAG_F0" /> 221 <ctl name="DSP1 Diagnostic cd DIAG_F0_STATUS" /> 222 223 <!-- Only for debug print --> 224 <ctl name="DSP1 Diagnostic cd CAL_SET_STATUS" /> 225 </path> 226 227 <path name="cs35l41-dsp-amp2-diagnostic-values"> 228 <!-- struct calibration_data START --> 229 <ctl name="R DSP1 Diagnostic cd CAL_R" /> 230 <ctl name="R DSP1 Diagnostic cd CAL_STATUS" /> 231 <ctl name="R DSP1 Diagnostic cd CAL_CHECKSUM" /> 232 <ctl name="R DSP1 Diagnostic cd CAL_AMBIENT" /> 233 <ctl name="R AMP PCM Gain" /> 234 <ctl name="R Digital PCM Volume" /> 235 <!-- struct calibration_data END --> 236 <ctl name="R DSP1 Diagnostic cd DIAG_Z_LOW_DIFF" /> 237 <ctl name="R DSP1 Diagnostic cd DIAG_F0" /> 238 <ctl name="R DSP1 Diagnostic cd DIAG_F0_STATUS" /> 239 240 <!-- Only for debug print --> 241 <ctl name="R DSP1 Diagnostic cd CAL_SET_STATUS" /> 242 </path> 243 244 <path name="cs35l41-dsp-amp1-protection-values"> 245 <!-- struct calibration_data START --> 246 <ctl name="DSP1 Protection cd CAL_R" /> 247 <ctl name="DSP1 Protection cd CAL_STATUS" /> 248 <ctl name="DSP1 Protection cd CAL_CHECKSUM" /> 249 <ctl name="DSP1 Protection cd CAL_AMBIENT" /> 250 251 <!-- These controls are unrelated so we can simply 252 skip them 253 <ctl name="AMP PCM Gain" /> 254 <ctl name="Digital PCM Volume" /> 255 --> 256 <!-- struct calibration_data END --> 257 </path> 258 259 <path name="cs35l41-dsp-amp2-protection-values"> 260 <!-- struct calibration_data START --> 261 <ctl name="R DSP1 Protection cd CAL_R" /> 262 <ctl name="R DSP1 Protection cd CAL_STATUS" /> 263 <ctl name="R DSP1 Protection cd CAL_CHECKSUM" /> 264 <ctl name="R DSP1 Protection cd CAL_AMBIENT" /> 265 266 <!-- These controls are unrelated so we can simply 267 skip them 268 <ctl name="R AMP PCM Gain" /> 269 <ctl name="R Digital PCM Volume" /> 270 --> 271 <!-- struct calibration_data END --> 272 </path> 273 274 <path name="cs35l41-dsp-amp1-calibration-completion"> 275 <ctl name="DSP1 Calibration cd CAL_STATUS" /> 276 </path> 277 278 <path name="cs35l41-dsp-amp2-calibration-completion"> 279 <ctl name="R DSP1 Calibration cd CAL_STATUS" /> 280 </path> 281 282 <path name="cs35l41-dsp-amp1-protection-completion"> 283 <ctl name="DSP1 Protection cd CAL_SET_STATUS" /> 284 </path> 285 286 <path name="cs35l41-dsp-amp2-protection-completion"> 287 <ctl name="R DSP1 Protection cd CAL_SET_STATUS" /> 288 </path> 289 290 <path name="cs35l41-dsp-amp1-diagnostic-completion"> 291 <ctl name="DSP1 Diagnostic cd CAL_STATUS" /> 292 <ctl name="DSP1 Diagnostic cd DIAG_F0_STATUS" /> 293 </path> 294 295 <path name="cs35l41-dsp-amp2-diagnostic-completion"> 296 <ctl name="R DSP1 Diagnostic cd CAL_STATUS" /> 297 <ctl name="R DSP1 Diagnostic cd DIAG_F0_STATUS" /> 298 </path> 299 300 <path name="cs35l41-dsp-amp1-enable-status"> 301 <ctl name="Main AMP Enable Switch" /> 302 </path> 303 304 <path name="cs35l41-dsp-amp2-enable-status"> 305 <ctl name="R Main AMP Enable Switch" /> 306 </path> 307</mixer> 308