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="QUIN_TDM_RX_0 Audio Mixer MultiMedia1" value="0" /> 36 37 <!-- Preparation Stage --> 38 <path name="crus-switch-fw-prepare"> 39 <ctl name="DRE DRE Switch" value="1" /> 40 <ctl name="VBSTMON Output Switch" value="1" /> 41 <ctl name="DSP Booted" value="0" /> 42 <ctl name="R DRE DRE Switch" value="1" /> 43 <ctl name="R VBSTMON Output Switch" value="1" /> 44 <ctl name="R DSP Booted" value="0" /> 45 46 <path name="~crus-fw-preload" /> 47 </path> 48 49 <!-- Preload Stage --> 50 <path name="crus-fw-preload"> 51 <ctl name="DSP1 Preload Switch" value="1" /> 52 <ctl name="R DSP1 Preload Switch" value="1" /> 53 <ctl name="Main AMP Enable Switch" value="0" /> 54 <ctl name="R Main AMP Enable Switch" value="0" /> 55 </path> 56 57 <!-- Firmware-switching Stage --> 58 <path name="crus-switch-fw-Calibration"> 59 <ctl name="PCM Source" value="DSP" /> 60 <ctl name="DSP1 Firmware" value="Calibration" /> 61 <ctl name="R PCM Source" value="DSP" /> 62 <ctl name="R DSP1 Firmware" value="Calibration" /> 63 </path> 64 65 <path name="crus-switch-fw-Diagnostic"> 66 <ctl name="PCM Source" value="DSP" /> 67 <ctl name="DSP1 Firmware" value="Diagnostic" /> 68 <ctl name="R PCM Source" value="DSP" /> 69 <ctl name="R DSP1 Firmware" value="Diagnostic" /> 70 </path> 71 72 <path name="crus-switch-fw-Protection"> 73 <ctl name="PCM Source" value="DSP" /> 74 <ctl name="DSP1 Firmware" value="Protection" /> 75 <ctl name="R PCM Source" value="DSP" /> 76 <ctl name="R DSP1 Firmware" value="Protection" /> 77 </path> 78 79 <!-- DSP-initialization Stage --> 80 <path name="crus-dsp-pre-calibration-amp1"> 81 <ctl name="DSP1 Calibration cd CAL_AMBIENT" value="25" endian="be" /> 82 <ctl name="Main AMP Enable Switch" value="1" /> 83 </path> 84 85 <path name="crus-dsp-pre-calibration-amp2"> 86 <ctl name="R DSP1 Calibration cd CAL_AMBIENT" value="25" endian="be" /> 87 <ctl name="R Main AMP Enable Switch" value="1" /> 88 </path> 89 90 <path name="crus-dsp-pre-calibration"> 91 <path name="crus-dsp-pre-calibration-amp1" /> 92 <path name="crus-dsp-pre-calibration-amp2" /> 93 </path> 94 95 <path name="crus-dsp-pre-diagnostic-amp1"> 96 <ctl name="DSP1 Diagnostic cd CAL_AMBIENT" value="25" endian="be" /> 97 <ctl name="Main AMP Enable Switch" value="1" /> 98 </path> 99 100 <path name="crus-dsp-pre-diagnostic-amp2"> 101 <ctl name="R DSP1 Diagnostic cd CAL_AMBIENT" value="25" endian="be" /> 102 <ctl name="R Main AMP Enable Switch" value="1" /> 103 </path> 104 105 <path name="crus-dsp-pre-diagnostic"> 106 <path name="crus-dsp-pre-diagnostic-amp1" /> 107 <path name="crus-dsp-pre-diagnostic-amp2" /> 108 </path> 109 110 <path name="crus-dsp-pre-protection"> 111 <ctl name="Main AMP Enable Switch" value="1" /> 112 <ctl name="R Main AMP Enable Switch" value="1" /> 113 </path> 114 115 <!-- Clock-trigger Stage --> 116 <path name="platform-controls"> 117 <ctl name="QUIN_TDM_RX_0 Audio Mixer MultiMedia1" value="1" /> 118 </path> 119 120 <!-- Post loaded firmware --> 121 <path name="crus-dsp-post-loading-fw"> 122 <ctl name="Main AMP Enable Switch" value="0" /> 123 <ctl name="R Main AMP Enable Switch" value="0" /> 124 </path> 125 126 <!-- Value & Information Fetch Stage --> 127 <path name="platform-values"> 128 <ctl name="QUIN_TDM_RX_0 Format" /> 129 <ctl name="QUIN_TDM_TX_0 Format" /> 130 <ctl name="QUIN_TDM_RX_0 Channels" /> 131 <ctl name="QUIN_TDM_TX_0 Channels" /> 132 <ctl name="QUIN_TDM_RX_0 SampleRate" /> 133 <ctl name="QUIN_TDM_TX_0 SampleRate" /> 134 <ctl name="QUIN_TDM_RX_0 Audio Mixer MultiMedia1" /> 135 </path> 136 137 <path name="cs35l41-values"> 138 <ctl name="DRE DRE Switch" /> 139 <ctl name="R DRE DRE Switch" /> 140 <ctl name="VBSTMON Output Switch" /> 141 <ctl name="R VBSTMON Output Switch" /> 142 <ctl name="AMP PCM Gain" /> 143 <ctl name="R AMP PCM Gain" /> 144 <ctl name="Digital PCM Volume" /> 145 <ctl name="R Digital PCM Volume" /> 146 <ctl name="PCM Source" /> 147 <ctl name="R PCM Source" /> 148 <ctl name="DSP Booted" /> 149 <ctl name="R DSP Booted" /> 150 <ctl name="Main AMP Enable Switch" /> 151 <ctl name="R Main AMP Enable Switch" /> 152 <ctl name="DSP1 Preload Switch" /> 153 <ctl name="R DSP1 Preload Switch" /> 154 <ctl name="DSP1 Firmware" /> 155 <ctl name="R DSP1 Firmware" /> 156 </path> 157 158 159 <!-- Note that the order of controls does matter because 160 it should be matched to the structure defined in 161 sp_cal_common.h --> 162 <!-- 163 struct calibration_data { 164 unsigned int cal_r; 165 unsigned int cal_status; 166 unsigned int cal_checksum; 167 unsigned int cal_ambient; 168 unsigned int amp_pcm_gain; 169 unsigned int digital_pcm_gain; 170 }; 171 --> 172 <path name="cs35l41-dsp-amp1-calibration-values"> 173 <ctl name="DSP1 Calibration cd CAL_R" /> 174 <ctl name="DSP1 Calibration cd CAL_STATUS" /> 175 <ctl name="DSP1 Calibration cd CAL_CHECKSUM" /> 176 <ctl name="DSP1 Calibration cd CAL_AMBIENT" /> 177 <ctl name="AMP PCM Gain" /> 178 <ctl name="Digital PCM Volume" /> 179 180 <!-- Only for debug print --> 181 <ctl name="DSP1 Calibration cd CAL_SET_STATUS" /> 182 </path> 183 184 <path name="cs35l41-dsp-amp2-calibration-values"> 185 <ctl name="R DSP1 Calibration cd CAL_R" /> 186 <ctl name="R DSP1 Calibration cd CAL_STATUS" /> 187 <ctl name="R DSP1 Calibration cd CAL_CHECKSUM" /> 188 <ctl name="R DSP1 Calibration cd CAL_AMBIENT" /> 189 <ctl name="R AMP PCM Gain" /> 190 <ctl name="R Digital PCM Volume" /> 191 192 <!-- Only for debug print --> 193 <ctl name="R DSP1 Calibration cd CAL_SET_STATUS" /> 194 </path> 195 196 <!-- 197 struct diagnostic_data { 198 struct calibration_data calibration_data; 199 unsigned int z_low_diff; 200 unsigned int diag_f0; 201 unsigned int diag_f0_status; 202 }; 203 --> 204 <path name="cs35l41-dsp-amp1-diagnostic-values"> 205 <!-- struct calibration_data START --> 206 <ctl name="DSP1 Diagnostic cd CAL_R" /> 207 <ctl name="DSP1 Diagnostic cd CAL_STATUS" /> 208 <ctl name="DSP1 Diagnostic cd CAL_CHECKSUM" /> 209 <ctl name="DSP1 Diagnostic cd CAL_AMBIENT" /> 210 <ctl name="AMP PCM Gain" /> 211 <ctl name="Digital PCM Volume" /> 212 <!-- struct calibration_data END --> 213 <ctl name="DSP1 Diagnostic cd DIAG_Z_LOW_DIFF" /> 214 <ctl name="DSP1 Diagnostic cd DIAG_F0" /> 215 <ctl name="DSP1 Diagnostic cd DIAG_F0_STATUS" /> 216 217 <!-- Only for debug print --> 218 <ctl name="DSP1 Diagnostic cd CAL_SET_STATUS" /> 219 </path> 220 221 <path name="cs35l41-dsp-amp2-diagnostic-values"> 222 <!-- struct calibration_data START --> 223 <ctl name="R DSP1 Diagnostic cd CAL_R" /> 224 <ctl name="R DSP1 Diagnostic cd CAL_STATUS" /> 225 <ctl name="R DSP1 Diagnostic cd CAL_CHECKSUM" /> 226 <ctl name="R DSP1 Diagnostic cd CAL_AMBIENT" /> 227 <ctl name="R AMP PCM Gain" /> 228 <ctl name="R Digital PCM Volume" /> 229 <!-- struct calibration_data END --> 230 <ctl name="R DSP1 Diagnostic cd DIAG_Z_LOW_DIFF" /> 231 <ctl name="R DSP1 Diagnostic cd DIAG_F0" /> 232 <ctl name="R DSP1 Diagnostic cd DIAG_F0_STATUS" /> 233 234 <!-- Only for debug print --> 235 <ctl name="R DSP1 Diagnostic cd CAL_SET_STATUS" /> 236 </path> 237 238 <path name="cs35l41-dsp-amp1-protection-values"> 239 <!-- struct calibration_data START --> 240 <ctl name="DSP1 Protection cd CAL_R" /> 241 <ctl name="DSP1 Protection cd CAL_STATUS" /> 242 <ctl name="DSP1 Protection cd CAL_CHECKSUM" /> 243 <ctl name="DSP1 Protection cd CAL_AMBIENT" /> 244 245 <!-- These controls are unrelated so we can simply 246 skip them 247 <ctl name="AMP PCM Gain" /> 248 <ctl name="Digital PCM Volume" /> 249 --> 250 <!-- struct calibration_data END --> 251 </path> 252 253 <path name="cs35l41-dsp-amp2-protection-values"> 254 <!-- struct calibration_data START --> 255 <ctl name="R DSP1 Protection cd CAL_R" /> 256 <ctl name="R DSP1 Protection cd CAL_STATUS" /> 257 <ctl name="R DSP1 Protection cd CAL_CHECKSUM" /> 258 <ctl name="R DSP1 Protection cd CAL_AMBIENT" /> 259 260 <!-- These controls are unrelated so we can simply 261 skip them 262 <ctl name="R AMP PCM Gain" /> 263 <ctl name="R Digital PCM Volume" /> 264 --> 265 <!-- struct calibration_data END --> 266 </path> 267 268 <path name="cs35l41-dsp-amp1-calibration-completion"> 269 <ctl name="DSP1 Calibration cd CAL_STATUS" /> 270 </path> 271 272 <path name="cs35l41-dsp-amp2-calibration-completion"> 273 <ctl name="R DSP1 Calibration cd CAL_STATUS" /> 274 </path> 275 276 <path name="cs35l41-dsp-amp1-apply-calibration-completion"> 277 <ctl name="DSP1 Protection cd CAL_SET_STATUS" /> 278 </path> 279 280 <path name="cs35l41-dsp-amp2-apply-calibration-completion"> 281 <ctl name="R DSP1 Protection cd CAL_SET_STATUS" /> 282 </path> 283 284 <path name="cs35l41-dsp-amp1-diagnostic-completion"> 285 <ctl name="DSP1 Diagnostic cd CAL_STATUS" /> 286 <ctl name="DSP1 Diagnostic cd DIAG_F0_STATUS" /> 287 </path> 288 289 <path name="cs35l41-dsp-amp2-diagnostic-completion"> 290 <ctl name="R DSP1 Diagnostic cd CAL_STATUS" /> 291 <ctl name="R DSP1 Diagnostic cd DIAG_F0_STATUS" /> 292 </path> 293</mixer> 294