1*5c4a5fe1SAndy Fiddaman /*- 2*5c4a5fe1SAndy Fiddaman * SPDX-License-Identifier: BSD-2-Clause 3*5c4a5fe1SAndy Fiddaman * 4*5c4a5fe1SAndy Fiddaman * Copyright (c) 2006 Stephane E. Potvin <sepotvin@videotron.ca> 5*5c4a5fe1SAndy Fiddaman * All rights reserved. 6*5c4a5fe1SAndy Fiddaman * 7*5c4a5fe1SAndy Fiddaman * Redistribution and use in source and binary forms, with or without 8*5c4a5fe1SAndy Fiddaman * modification, are permitted provided that the following conditions 9*5c4a5fe1SAndy Fiddaman * are met: 10*5c4a5fe1SAndy Fiddaman * 1. Redistributions of source code must retain the above copyright 11*5c4a5fe1SAndy Fiddaman * notice, this list of conditions and the following disclaimer. 12*5c4a5fe1SAndy Fiddaman * 2. Redistributions in binary form must reproduce the above copyright 13*5c4a5fe1SAndy Fiddaman * notice, this list of conditions and the following disclaimer in the 14*5c4a5fe1SAndy Fiddaman * documentation and/or other materials provided with the distribution. 15*5c4a5fe1SAndy Fiddaman * 16*5c4a5fe1SAndy Fiddaman * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17*5c4a5fe1SAndy Fiddaman * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18*5c4a5fe1SAndy Fiddaman * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19*5c4a5fe1SAndy Fiddaman * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20*5c4a5fe1SAndy Fiddaman * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21*5c4a5fe1SAndy Fiddaman * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22*5c4a5fe1SAndy Fiddaman * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23*5c4a5fe1SAndy Fiddaman * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24*5c4a5fe1SAndy Fiddaman * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25*5c4a5fe1SAndy Fiddaman * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26*5c4a5fe1SAndy Fiddaman * SUCH DAMAGE. 27*5c4a5fe1SAndy Fiddaman */ 28*5c4a5fe1SAndy Fiddaman 29*5c4a5fe1SAndy Fiddaman #ifndef _HDA_REG_H_ 30*5c4a5fe1SAndy Fiddaman #define _HDA_REG_H_ 31*5c4a5fe1SAndy Fiddaman 32*5c4a5fe1SAndy Fiddaman /**************************************************************************** 33*5c4a5fe1SAndy Fiddaman * HDA Device Verbs 34*5c4a5fe1SAndy Fiddaman ****************************************************************************/ 35*5c4a5fe1SAndy Fiddaman 36*5c4a5fe1SAndy Fiddaman /* HDA Command */ 37*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_MASK 0x000fffff 38*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SHIFT 0 39*5c4a5fe1SAndy Fiddaman #define HDA_CMD_NID_MASK 0x0ff00000 40*5c4a5fe1SAndy Fiddaman #define HDA_CMD_NID_SHIFT 20 41*5c4a5fe1SAndy Fiddaman #define HDA_CMD_CAD_MASK 0xf0000000 42*5c4a5fe1SAndy Fiddaman #define HDA_CMD_CAD_SHIFT 28 43*5c4a5fe1SAndy Fiddaman 44*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_4BIT_SHIFT 16 45*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_12BIT_SHIFT 8 46*5c4a5fe1SAndy Fiddaman 47*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_4BIT(verb, payload) \ 48*5c4a5fe1SAndy Fiddaman (((verb) << HDA_CMD_VERB_4BIT_SHIFT) | (payload)) 49*5c4a5fe1SAndy Fiddaman #define HDA_CMD_4BIT(cad, nid, verb, payload) \ 50*5c4a5fe1SAndy Fiddaman (((cad) << HDA_CMD_CAD_SHIFT) | \ 51*5c4a5fe1SAndy Fiddaman ((nid) << HDA_CMD_NID_SHIFT) | \ 52*5c4a5fe1SAndy Fiddaman (HDA_CMD_VERB_4BIT((verb), (payload)))) 53*5c4a5fe1SAndy Fiddaman 54*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_12BIT(verb, payload) \ 55*5c4a5fe1SAndy Fiddaman (((verb) << HDA_CMD_VERB_12BIT_SHIFT) | (payload)) 56*5c4a5fe1SAndy Fiddaman #define HDA_CMD_12BIT(cad, nid, verb, payload) \ 57*5c4a5fe1SAndy Fiddaman (((cad) << HDA_CMD_CAD_SHIFT) | \ 58*5c4a5fe1SAndy Fiddaman ((nid) << HDA_CMD_NID_SHIFT) | \ 59*5c4a5fe1SAndy Fiddaman (HDA_CMD_VERB_12BIT((verb), (payload)))) 60*5c4a5fe1SAndy Fiddaman 61*5c4a5fe1SAndy Fiddaman /* Get Parameter */ 62*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_PARAMETER 0xf00 63*5c4a5fe1SAndy Fiddaman 64*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PARAMETER(cad, nid, payload) \ 65*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 66*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_PARAMETER, (payload))) 67*5c4a5fe1SAndy Fiddaman 68*5c4a5fe1SAndy Fiddaman /* Connection Select Control */ 69*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_CONN_SELECT_CONTROL 0xf01 70*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_CONN_SELECT_CONTROL 0x701 71*5c4a5fe1SAndy Fiddaman 72*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_CONN_SELECT_CONTROL(cad, nid) \ 73*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 74*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_CONN_SELECT_CONTROL, 0x0)) 75*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_CONNECTION_SELECT_CONTROL(cad, nid, payload) \ 76*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 77*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_CONN_SELECT_CONTROL, (payload))) 78*5c4a5fe1SAndy Fiddaman 79*5c4a5fe1SAndy Fiddaman /* Connection List Entry */ 80*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_CONN_LIST_ENTRY 0xf02 81*5c4a5fe1SAndy Fiddaman 82*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_CONN_LIST_ENTRY(cad, nid, payload) \ 83*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 84*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_CONN_LIST_ENTRY, (payload))) 85*5c4a5fe1SAndy Fiddaman 86*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_CONN_LIST_ENTRY_SIZE_SHORT 1 87*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_CONN_LIST_ENTRY_SIZE_LONG 2 88*5c4a5fe1SAndy Fiddaman 89*5c4a5fe1SAndy Fiddaman /* Processing State */ 90*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_PROCESSING_STATE 0xf03 91*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_PROCESSING_STATE 0x703 92*5c4a5fe1SAndy Fiddaman 93*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PROCESSING_STATE(cad, nid) \ 94*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 95*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_PROCESSING_STATE, 0x0)) 96*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_PROCESSING_STATE(cad, nid, payload) \ 97*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 98*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_PROCESSING_STATE, (payload))) 99*5c4a5fe1SAndy Fiddaman 100*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PROCESSING_STATE_STATE_OFF 0x00 101*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PROCESSING_STATE_STATE_ON 0x01 102*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PROCESSING_STATE_STATE_BENIGN 0x02 103*5c4a5fe1SAndy Fiddaman 104*5c4a5fe1SAndy Fiddaman /* Coefficient Index */ 105*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_COEFF_INDEX 0xd 106*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_COEFF_INDEX 0x5 107*5c4a5fe1SAndy Fiddaman 108*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_COEFF_INDEX(cad, nid) \ 109*5c4a5fe1SAndy Fiddaman (HDA_CMD_4BIT((cad), (nid), \ 110*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_COEFF_INDEX, 0x0)) 111*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_COEFF_INDEX(cad, nid, payload) \ 112*5c4a5fe1SAndy Fiddaman (HDA_CMD_4BIT((cad), (nid), \ 113*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_COEFF_INDEX, (payload))) 114*5c4a5fe1SAndy Fiddaman 115*5c4a5fe1SAndy Fiddaman /* Processing Coefficient */ 116*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_PROCESSING_COEFF 0xc 117*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_PROCESSING_COEFF 0x4 118*5c4a5fe1SAndy Fiddaman 119*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PROCESSING_COEFF(cad, nid) \ 120*5c4a5fe1SAndy Fiddaman (HDA_CMD_4BIT((cad), (nid), \ 121*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_PROCESSING_COEFF, 0x0)) 122*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_PROCESSING_COEFF(cad, nid, payload) \ 123*5c4a5fe1SAndy Fiddaman (HDA_CMD_4BIT((cad), (nid), \ 124*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_PROCESSING_COEFF, (payload))) 125*5c4a5fe1SAndy Fiddaman 126*5c4a5fe1SAndy Fiddaman /* Amplifier Gain/Mute */ 127*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_AMP_GAIN_MUTE 0xb 128*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_AMP_GAIN_MUTE 0x3 129*5c4a5fe1SAndy Fiddaman 130*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_AMP_GAIN_MUTE(cad, nid, payload) \ 131*5c4a5fe1SAndy Fiddaman (HDA_CMD_4BIT((cad), (nid), \ 132*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_AMP_GAIN_MUTE, (payload))) 133*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_AMP_GAIN_MUTE(cad, nid, payload) \ 134*5c4a5fe1SAndy Fiddaman (HDA_CMD_4BIT((cad), (nid), \ 135*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_AMP_GAIN_MUTE, (payload))) 136*5c4a5fe1SAndy Fiddaman 137*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_AMP_GAIN_MUTE_INPUT 0x0000 138*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_AMP_GAIN_MUTE_OUTPUT 0x8000 139*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_AMP_GAIN_MUTE_RIGHT 0x0000 140*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_AMP_GAIN_MUTE_LEFT 0x2000 141*5c4a5fe1SAndy Fiddaman 142*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_AMP_GAIN_MUTE_MUTE_MASK 0x00000008 143*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_AMP_GAIN_MUTE_MUTE_SHIFT 7 144*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_AMP_GAIN_MUTE_GAIN_MASK 0x00000007 145*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_AMP_GAIN_MUTE_GAIN_SHIFT 0 146*5c4a5fe1SAndy Fiddaman 147*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_AMP_GAIN_MUTE_MUTE(rsp) \ 148*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_AMP_GAIN_MUTE_MUTE_MASK) >> \ 149*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_AMP_GAIN_MUTE_MUTE_SHIFT) 150*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_AMP_GAIN_MUTE_GAIN(rsp) \ 151*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_AMP_GAIN_MUTE_GAIN_MASK) >> \ 152*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_AMP_GAIN_MUTE_GAIN_SHIFT) 153*5c4a5fe1SAndy Fiddaman 154*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_AMP_GAIN_MUTE_OUTPUT 0x8000 155*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_AMP_GAIN_MUTE_INPUT 0x4000 156*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_AMP_GAIN_MUTE_LEFT 0x2000 157*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_AMP_GAIN_MUTE_RIGHT 0x1000 158*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_AMP_GAIN_MUTE_INDEX_MASK 0x0f00 159*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_AMP_GAIN_MUTE_INDEX_SHIFT 8 160*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_AMP_GAIN_MUTE_MUTE 0x0080 161*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_AMP_GAIN_MUTE_GAIN_MASK 0x0007 162*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_AMP_GAIN_MUTE_GAIN_SHIFT 0 163*5c4a5fe1SAndy Fiddaman 164*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_AMP_GAIN_MUTE_INDEX(index) \ 165*5c4a5fe1SAndy Fiddaman (((index) << HDA_CMD_SET_AMP_GAIN_MUTE_INDEX_SHIFT) & \ 166*5c4a5fe1SAndy Fiddaman HDA_CMD_SET_AMP_GAIN_MUTE_INDEX_MASK) 167*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_AMP_GAIN_MUTE_GAIN(index) \ 168*5c4a5fe1SAndy Fiddaman (((index) << HDA_CMD_SET_AMP_GAIN_MUTE_GAIN_SHIFT) & \ 169*5c4a5fe1SAndy Fiddaman HDA_CMD_SET_AMP_GAIN_MUTE_GAIN_MASK) 170*5c4a5fe1SAndy Fiddaman 171*5c4a5fe1SAndy Fiddaman /* Converter format */ 172*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_CONV_FMT 0xa 173*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_CONV_FMT 0x2 174*5c4a5fe1SAndy Fiddaman 175*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_CONV_FMT(cad, nid) \ 176*5c4a5fe1SAndy Fiddaman (HDA_CMD_4BIT((cad), (nid), \ 177*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_CONV_FMT, 0x0)) 178*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_CONV_FMT(cad, nid, payload) \ 179*5c4a5fe1SAndy Fiddaman (HDA_CMD_4BIT((cad), (nid), \ 180*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_CONV_FMT, (payload))) 181*5c4a5fe1SAndy Fiddaman 182*5c4a5fe1SAndy Fiddaman /* Digital Converter Control */ 183*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_DIGITAL_CONV_FMT1 0xf0d 184*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_DIGITAL_CONV_FMT2 0xf0e 185*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_DIGITAL_CONV_FMT1 0x70d 186*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_DIGITAL_CONV_FMT2 0x70e 187*5c4a5fe1SAndy Fiddaman 188*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT(cad, nid) \ 189*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 190*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_DIGITAL_CONV_FMT1, 0x0)) 191*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_DIGITAL_CONV_FMT1(cad, nid, payload) \ 192*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 193*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_DIGITAL_CONV_FMT1, (payload))) 194*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_DIGITAL_CONV_FMT2(cad, nid, payload) \ 195*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 196*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_DIGITAL_CONV_FMT2, (payload))) 197*5c4a5fe1SAndy Fiddaman 198*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_CC_MASK 0x7f00 199*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_CC_SHIFT 8 200*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_L_MASK 0x0080 201*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_L_SHIFT 7 202*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_PRO_MASK 0x0040 203*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_PRO_SHIFT 6 204*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_NAUDIO_MASK 0x0020 205*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_NAUDIO_SHIFT 5 206*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_COPY_MASK 0x0010 207*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_COPY_SHIFT 4 208*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_PRE_MASK 0x0008 209*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_PRE_SHIFT 3 210*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_VCFG_MASK 0x0004 211*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_VCFG_SHIFT 2 212*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_V_MASK 0x0002 213*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_V_SHIFT 1 214*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_DIGEN_MASK 0x0001 215*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_DIGEN_SHIFT 0 216*5c4a5fe1SAndy Fiddaman 217*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_CC(rsp) \ 218*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_DIGITAL_CONV_FMT_CC_MASK) >> \ 219*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_DIGITAL_CONV_FMT_CC_SHIFT) 220*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_L(rsp) \ 221*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_DIGITAL_CONV_FMT_L_MASK) >> \ 222*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_DIGITAL_CONV_FMT_L_SHIFT) 223*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_PRO(rsp) \ 224*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_DIGITAL_CONV_FMT_PRO_MASK) >> \ 225*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_DIGITAL_CONV_FMT_PRO_SHIFT) 226*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_NAUDIO(rsp) \ 227*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_DIGITAL_CONV_FMT_NAUDIO_MASK) >> \ 228*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_DIGITAL_CONV_FMT_NAUDIO_SHIFT) 229*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_COPY(rsp) \ 230*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_DIGITAL_CONV_FMT_COPY_MASK) >> \ 231*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_DIGITAL_CONV_FMT_COPY_SHIFT) 232*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_PRE(rsp) \ 233*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_DIGITAL_CONV_FMT_PRE_MASK) >> \ 234*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_DIGITAL_CONV_FMT_PRE_SHIFT) 235*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_VCFG(rsp) \ 236*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_DIGITAL_CONV_FMT_VCFG_MASK) >> \ 237*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_DIGITAL_CONV_FMT_VCFG_SHIFT) 238*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_V(rsp) \ 239*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_DIGITAL_CONV_FMT_V_MASK) >> \ 240*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_DIGITAL_CONV_FMT_V_SHIFT) 241*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_DIGITAL_CONV_FMT_DIGEN(rsp) \ 242*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_DIGITAL_CONV_FMT_DIGEN_MASK) >> \ 243*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_DIGITAL_CONV_FMT_DIGEN_SHIFT) 244*5c4a5fe1SAndy Fiddaman 245*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_DIGITAL_CONV_FMT1_L 0x80 246*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_DIGITAL_CONV_FMT1_PRO 0x40 247*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_DIGITAL_CONV_FMT1_NAUDIO 0x20 248*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_DIGITAL_CONV_FMT1_COPY 0x10 249*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_DIGITAL_CONV_FMT1_PRE 0x08 250*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_DIGITAL_CONV_FMT1_VCFG 0x04 251*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_DIGITAL_CONV_FMT1_V 0x02 252*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_DIGITAL_CONV_FMT1_DIGEN 0x01 253*5c4a5fe1SAndy Fiddaman 254*5c4a5fe1SAndy Fiddaman /* Power State */ 255*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_POWER_STATE 0xf05 256*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_POWER_STATE 0x705 257*5c4a5fe1SAndy Fiddaman 258*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_POWER_STATE(cad, nid) \ 259*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 260*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_POWER_STATE, 0x0)) 261*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_POWER_STATE(cad, nid, payload) \ 262*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 263*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_POWER_STATE, (payload))) 264*5c4a5fe1SAndy Fiddaman 265*5c4a5fe1SAndy Fiddaman #define HDA_CMD_POWER_STATE_D0 0x00 266*5c4a5fe1SAndy Fiddaman #define HDA_CMD_POWER_STATE_D1 0x01 267*5c4a5fe1SAndy Fiddaman #define HDA_CMD_POWER_STATE_D2 0x02 268*5c4a5fe1SAndy Fiddaman #define HDA_CMD_POWER_STATE_D3 0x03 269*5c4a5fe1SAndy Fiddaman 270*5c4a5fe1SAndy Fiddaman #define HDA_CMD_POWER_STATE_ACT_MASK 0x000000f0 271*5c4a5fe1SAndy Fiddaman #define HDA_CMD_POWER_STATE_ACT_SHIFT 4 272*5c4a5fe1SAndy Fiddaman #define HDA_CMD_POWER_STATE_SET_MASK 0x0000000f 273*5c4a5fe1SAndy Fiddaman #define HDA_CMD_POWER_STATE_SET_SHIFT 0 274*5c4a5fe1SAndy Fiddaman 275*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_POWER_STATE_ACT(rsp) \ 276*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_POWER_STATE_ACT_MASK) >> \ 277*5c4a5fe1SAndy Fiddaman HDA_CMD_POWER_STATE_ACT_SHIFT) 278*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_POWER_STATE_SET(rsp) \ 279*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_POWER_STATE_SET_MASK) >> \ 280*5c4a5fe1SAndy Fiddaman HDA_CMD_POWER_STATE_SET_SHIFT) 281*5c4a5fe1SAndy Fiddaman 282*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_POWER_STATE_ACT(ps) \ 283*5c4a5fe1SAndy Fiddaman (((ps) << HDA_CMD_POWER_STATE_ACT_SHIFT) & \ 284*5c4a5fe1SAndy Fiddaman HDA_CMD_POWER_STATE_ACT_MASK) 285*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_POWER_STATE_SET(ps) \ 286*5c4a5fe1SAndy Fiddaman (((ps) << HDA_CMD_POWER_STATE_SET_SHIFT) & \ 287*5c4a5fe1SAndy Fiddaman HDA_CMD_POWER_STATE_ACT_MASK) 288*5c4a5fe1SAndy Fiddaman 289*5c4a5fe1SAndy Fiddaman /* Converter Stream, Channel */ 290*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_CONV_STREAM_CHAN 0xf06 291*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_CONV_STREAM_CHAN 0x706 292*5c4a5fe1SAndy Fiddaman 293*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_CONV_STREAM_CHAN(cad, nid) \ 294*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 295*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_CONV_STREAM_CHAN, 0x0)) 296*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_CONV_STREAM_CHAN(cad, nid, payload) \ 297*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 298*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_CONV_STREAM_CHAN, (payload))) 299*5c4a5fe1SAndy Fiddaman 300*5c4a5fe1SAndy Fiddaman #define HDA_CMD_CONV_STREAM_CHAN_STREAM_MASK 0x000000f0 301*5c4a5fe1SAndy Fiddaman #define HDA_CMD_CONV_STREAM_CHAN_STREAM_SHIFT 4 302*5c4a5fe1SAndy Fiddaman #define HDA_CMD_CONV_STREAM_CHAN_CHAN_MASK 0x0000000f 303*5c4a5fe1SAndy Fiddaman #define HDA_CMD_CONV_STREAM_CHAN_CHAN_SHIFT 0 304*5c4a5fe1SAndy Fiddaman 305*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_CONV_STREAM_CHAN_STREAM(rsp) \ 306*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_CONV_STREAM_CHAN_STREAM_MASK) >> \ 307*5c4a5fe1SAndy Fiddaman HDA_CMD_CONV_STREAM_CHAN_STREAM_SHIFT) 308*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_CONV_STREAM_CHAN_CHAN(rsp) \ 309*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_CONV_STREAM_CHAN_CHAN_MASK) >> \ 310*5c4a5fe1SAndy Fiddaman HDA_CMD_CONV_STREAM_CHAN_CHAN_SHIFT) 311*5c4a5fe1SAndy Fiddaman 312*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_CONV_STREAM_CHAN_STREAM(param) \ 313*5c4a5fe1SAndy Fiddaman (((param) << HDA_CMD_CONV_STREAM_CHAN_STREAM_SHIFT) & \ 314*5c4a5fe1SAndy Fiddaman HDA_CMD_CONV_STREAM_CHAN_STREAM_MASK) 315*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_CONV_STREAM_CHAN_CHAN(param) \ 316*5c4a5fe1SAndy Fiddaman (((param) << HDA_CMD_CONV_STREAM_CHAN_CHAN_SHIFT) & \ 317*5c4a5fe1SAndy Fiddaman HDA_CMD_CONV_STREAM_CHAN_CHAN_MASK) 318*5c4a5fe1SAndy Fiddaman 319*5c4a5fe1SAndy Fiddaman /* Input Converter SDI Select */ 320*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_INPUT_CONVERTER_SDI_SELECT 0xf04 321*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_INPUT_CONVERTER_SDI_SELECT 0x704 322*5c4a5fe1SAndy Fiddaman 323*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_INPUT_CONVERTER_SDI_SELECT(cad, nid) \ 324*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 325*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_INPUT_CONVERTER_SDI_SELECT, 0x0)) 326*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_INPUT_CONVERTER_SDI_SELECT(cad, nid, payload) \ 327*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 328*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_INPUT_CONVERTER_SDI_SELECT, (payload))) 329*5c4a5fe1SAndy Fiddaman 330*5c4a5fe1SAndy Fiddaman /* Pin Widget Control */ 331*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_PIN_WIDGET_CTRL 0xf07 332*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_PIN_WIDGET_CTRL 0x707 333*5c4a5fe1SAndy Fiddaman 334*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_WIDGET_CTRL(cad, nid) \ 335*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 336*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_PIN_WIDGET_CTRL, 0x0)) 337*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_PIN_WIDGET_CTRL(cad, nid, payload) \ 338*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 339*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_PIN_WIDGET_CTRL, (payload))) 340*5c4a5fe1SAndy Fiddaman 341*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_WIDGET_CTRL_HPHN_ENABLE_MASK 0x00000080 342*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_WIDGET_CTRL_HPHN_ENABLE_SHIFT 7 343*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_WIDGET_CTRL_OUT_ENABLE_MASK 0x00000040 344*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_WIDGET_CTRL_OUT_ENABLE_SHIFT 6 345*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_WIDGET_CTRL_IN_ENABLE_MASK 0x00000020 346*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_WIDGET_CTRL_IN_ENABLE_SHIFT 5 347*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK 0x00000007 348*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_WIDGET_CTRL_VREF_ENABLE_SHIFT 0 349*5c4a5fe1SAndy Fiddaman 350*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_WIDGET_CTRL_HPHN_ENABLE(rsp) \ 351*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_PIN_WIDGET_CTRL_HPHN_ENABLE_MASK) >> \ 352*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_PIN_WIDGET_CTRL_HPHN_ENABLE_SHIFT) 353*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_WIDGET_CTRL_OUT_ENABLE(rsp) \ 354*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_PIN_WIDGET_CTRL_OUT_ENABLE_MASK) >> \ 355*5c4a5fe1SAndy Fiddaman HDA_GET_CMD_PIN_WIDGET_CTRL_OUT_ENABLE_SHIFT) 356*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_WIDGET_CTRL_IN_ENABLE(rsp) \ 357*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_PIN_WIDGET_CTRL_IN_ENABLE_MASK) >> \ 358*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_PIN_WIDGET_CTRL_IN_ENABLE_SHIFT) 359*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_WIDGET_CTRL_VREF_ENABLE(rsp) \ 360*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK) >> \ 361*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_PIN_WIDGET_CTRL_VREF_ENABLE_SHIFT) 362*5c4a5fe1SAndy Fiddaman 363*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_PIN_WIDGET_CTRL_HPHN_ENABLE 0x80 364*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE 0x40 365*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE 0x20 366*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK 0x07 367*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_SHIFT 0 368*5c4a5fe1SAndy Fiddaman 369*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE(param) \ 370*5c4a5fe1SAndy Fiddaman (((param) << HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_SHIFT) & \ 371*5c4a5fe1SAndy Fiddaman HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK) 372*5c4a5fe1SAndy Fiddaman 373*5c4a5fe1SAndy Fiddaman #define HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_HIZ 0 374*5c4a5fe1SAndy Fiddaman #define HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_50 1 375*5c4a5fe1SAndy Fiddaman #define HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_GROUND 2 376*5c4a5fe1SAndy Fiddaman #define HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_80 4 377*5c4a5fe1SAndy Fiddaman #define HDA_CMD_PIN_WIDGET_CTRL_VREF_ENABLE_100 5 378*5c4a5fe1SAndy Fiddaman 379*5c4a5fe1SAndy Fiddaman /* Unsolicited Response */ 380*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_UNSOLICITED_RESPONSE 0xf08 381*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_UNSOLICITED_RESPONSE 0x708 382*5c4a5fe1SAndy Fiddaman 383*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_UNSOLICITED_RESPONSE(cad, nid) \ 384*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 385*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_UNSOLICITED_RESPONSE, 0x0)) 386*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_UNSOLICITED_RESPONSE(cad, nid, payload) \ 387*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 388*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_UNSOLICITED_RESPONSE, (payload))) 389*5c4a5fe1SAndy Fiddaman 390*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_UNSOLICITED_RESPONSE_ENABLE_MASK 0x00000080 391*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_UNSOLICITED_RESPONSE_ENABLE_SHIFT 7 392*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_UNSOLICITED_RESPONSE_TAG_MASK 0x0000001f 393*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_UNSOLICITED_RESPONSE_TAG_SHIFT 0 394*5c4a5fe1SAndy Fiddaman 395*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_UNSOLICITED_RESPONSE_ENABLE(rsp) \ 396*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_UNSOLICITED_RESPONSE_ENABLE_MASK) >> \ 397*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_UNSOLICITED_RESPONSE_ENABLE_SHIFT) 398*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_UNSOLICITED_RESPONSE_TAG(rsp) \ 399*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_UNSOLICITED_RESPONSE_TAG_MASK) >> \ 400*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_UNSOLICITED_RESPONSE_TAG_SHIFT) 401*5c4a5fe1SAndy Fiddaman 402*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_UNSOLICITED_RESPONSE_ENABLE 0x80 403*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG_MASK 0x3f 404*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG_SHIFT 0 405*5c4a5fe1SAndy Fiddaman 406*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG(param) \ 407*5c4a5fe1SAndy Fiddaman (((param) << HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG_SHIFT) & \ 408*5c4a5fe1SAndy Fiddaman HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG_MASK) 409*5c4a5fe1SAndy Fiddaman 410*5c4a5fe1SAndy Fiddaman /* Pin Sense */ 411*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_PIN_SENSE 0xf09 412*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_PIN_SENSE 0x709 413*5c4a5fe1SAndy Fiddaman 414*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_SENSE(cad, nid) \ 415*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 416*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_PIN_SENSE, 0x0)) 417*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_PIN_SENSE(cad, nid, payload) \ 418*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 419*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_PIN_SENSE, (payload))) 420*5c4a5fe1SAndy Fiddaman 421*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT 0x80000000 422*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_SENSE_ELD_VALID 0x40000000 423*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_SENSE_IMP_SENSE_MASK 0x7fffffff 424*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_SENSE_IMP_SENSE_SHIFT 0 425*5c4a5fe1SAndy Fiddaman 426*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_SENSE_IMP_SENSE(rsp) \ 427*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_PIN_SENSE_IMP_SENSE_MASK) >> \ 428*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_PIN_SENSE_IMP_SENSE_SHIFT) 429*5c4a5fe1SAndy Fiddaman 430*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_PIN_SENSE_IMP_SENSE_INVALID 0x7fffffff 431*5c4a5fe1SAndy Fiddaman 432*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_PIN_SENSE_LEFT_CHANNEL 0x00 433*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_PIN_SENSE_RIGHT_CHANNEL 0x01 434*5c4a5fe1SAndy Fiddaman 435*5c4a5fe1SAndy Fiddaman /* EAPD/BTL Enable */ 436*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_EAPD_BTL_ENABLE 0xf0c 437*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_EAPD_BTL_ENABLE 0x70c 438*5c4a5fe1SAndy Fiddaman 439*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_EAPD_BTL_ENABLE(cad, nid) \ 440*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 441*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_EAPD_BTL_ENABLE, 0x0)) 442*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_EAPD_BTL_ENABLE(cad, nid, payload) \ 443*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 444*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_EAPD_BTL_ENABLE, (payload))) 445*5c4a5fe1SAndy Fiddaman 446*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_EAPD_BTL_ENABLE_LR_SWAP_MASK 0x00000004 447*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_EAPD_BTL_ENABLE_LR_SWAP_SHIFT 2 448*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_EAPD_BTL_ENABLE_EAPD_MASK 0x00000002 449*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_EAPD_BTL_ENABLE_EAPD_SHIFT 1 450*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_EAPD_BTL_ENABLE_BTL_MASK 0x00000001 451*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_EAPD_BTL_ENABLE_BTL_SHIFT 0 452*5c4a5fe1SAndy Fiddaman 453*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_EAPD_BTL_ENABLE_LR_SWAP(rsp) \ 454*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_EAPD_BTL_ENABLE_LR_SWAP_MASK) >> \ 455*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_EAPD_BTL_ENABLE_LR_SWAP_SHIFT) 456*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_EAPD_BTL_ENABLE_EAPD(rsp) \ 457*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_EAPD_BTL_ENABLE_EAPD_MASK) >> \ 458*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_EAPD_BTL_ENABLE_EAPD_SHIFT) 459*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_EAPD_BTL_ENABLE_BTL(rsp) \ 460*5c4a5fe1SAndy Fiddaman (((rsp) & HDA_CMD_GET_EAPD_BTL_ENABLE_BTL_MASK) >> \ 461*5c4a5fe1SAndy Fiddaman HDA_CMD_GET_EAPD_BTL_ENABLE_BTL_SHIFT) 462*5c4a5fe1SAndy Fiddaman 463*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_EAPD_BTL_ENABLE_LR_SWAP 0x04 464*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD 0x02 465*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_EAPD_BTL_ENABLE_BTL 0x01 466*5c4a5fe1SAndy Fiddaman 467*5c4a5fe1SAndy Fiddaman /* GPI Data */ 468*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_GPI_DATA 0xf10 469*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_GPI_DATA 0x710 470*5c4a5fe1SAndy Fiddaman 471*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_GPI_DATA(cad, nid) \ 472*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 473*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_GPI_DATA, 0x0)) 474*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_GPI_DATA(cad, nid) \ 475*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 476*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_GPI_DATA, (payload))) 477*5c4a5fe1SAndy Fiddaman 478*5c4a5fe1SAndy Fiddaman /* GPI Wake Enable Mask */ 479*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_GPI_WAKE_ENABLE_MASK 0xf11 480*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_GPI_WAKE_ENABLE_MASK 0x711 481*5c4a5fe1SAndy Fiddaman 482*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_GPI_WAKE_ENABLE_MASK(cad, nid) \ 483*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 484*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_GPI_WAKE_ENABLE_MASK, 0x0)) 485*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_GPI_WAKE_ENABLE_MASK(cad, nid, payload) \ 486*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 487*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_GPI_WAKE_ENABLE_MASK, (payload))) 488*5c4a5fe1SAndy Fiddaman 489*5c4a5fe1SAndy Fiddaman /* GPI Unsolicited Enable Mask */ 490*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_GPI_UNSOLICITED_ENABLE_MASK 0xf12 491*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_GPI_UNSOLICITED_ENABLE_MASK 0x712 492*5c4a5fe1SAndy Fiddaman 493*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_GPI_UNSOLICITED_ENABLE_MASK(cad, nid) \ 494*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 495*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_GPI_UNSOLICITED_ENABLE_MASK, 0x0)) 496*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_GPI_UNSOLICITED_ENABLE_MASK(cad, nid, payload) \ 497*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 498*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_GPI_UNSOLICITED_ENABLE_MASK, (payload))) 499*5c4a5fe1SAndy Fiddaman 500*5c4a5fe1SAndy Fiddaman /* GPI Sticky Mask */ 501*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_GPI_STICKY_MASK 0xf13 502*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_GPI_STICKY_MASK 0x713 503*5c4a5fe1SAndy Fiddaman 504*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_GPI_STICKY_MASK(cad, nid) \ 505*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 506*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_GPI_STICKY_MASK, 0x0)) 507*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_GPI_STICKY_MASK(cad, nid, payload) \ 508*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 509*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_GPI_STICKY_MASK, (payload))) 510*5c4a5fe1SAndy Fiddaman 511*5c4a5fe1SAndy Fiddaman /* GPO Data */ 512*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_GPO_DATA 0xf14 513*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_GPO_DATA 0x714 514*5c4a5fe1SAndy Fiddaman 515*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_GPO_DATA(cad, nid) \ 516*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 517*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_GPO_DATA, 0x0)) 518*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_GPO_DATA(cad, nid, payload) \ 519*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 520*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_GPO_DATA, (payload))) 521*5c4a5fe1SAndy Fiddaman 522*5c4a5fe1SAndy Fiddaman /* GPIO Data */ 523*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_GPIO_DATA 0xf15 524*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_GPIO_DATA 0x715 525*5c4a5fe1SAndy Fiddaman 526*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_GPIO_DATA(cad, nid) \ 527*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 528*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_GPIO_DATA, 0x0)) 529*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_GPIO_DATA(cad, nid, payload) \ 530*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 531*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_GPIO_DATA, (payload))) 532*5c4a5fe1SAndy Fiddaman 533*5c4a5fe1SAndy Fiddaman /* GPIO Enable Mask */ 534*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_GPIO_ENABLE_MASK 0xf16 535*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_GPIO_ENABLE_MASK 0x716 536*5c4a5fe1SAndy Fiddaman 537*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_GPIO_ENABLE_MASK(cad, nid) \ 538*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 539*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_GPIO_ENABLE_MASK, 0x0)) 540*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_GPIO_ENABLE_MASK(cad, nid, payload) \ 541*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 542*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_GPIO_ENABLE_MASK, (payload))) 543*5c4a5fe1SAndy Fiddaman 544*5c4a5fe1SAndy Fiddaman /* GPIO Direction */ 545*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_GPIO_DIRECTION 0xf17 546*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_GPIO_DIRECTION 0x717 547*5c4a5fe1SAndy Fiddaman 548*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_GPIO_DIRECTION(cad, nid) \ 549*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 550*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_GPIO_DIRECTION, 0x0)) 551*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_GPIO_DIRECTION(cad, nid, payload) \ 552*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 553*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_GPIO_DIRECTION, (payload))) 554*5c4a5fe1SAndy Fiddaman 555*5c4a5fe1SAndy Fiddaman /* GPIO Wake Enable Mask */ 556*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_GPIO_WAKE_ENABLE_MASK 0xf18 557*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_GPIO_WAKE_ENABLE_MASK 0x718 558*5c4a5fe1SAndy Fiddaman 559*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_GPIO_WAKE_ENABLE_MASK(cad, nid) \ 560*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 561*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_GPIO_WAKE_ENABLE_MASK, 0x0)) 562*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_GPIO_WAKE_ENABLE_MASK(cad, nid, payload) \ 563*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 564*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_GPIO_WAKE_ENABLE_MASK, (payload))) 565*5c4a5fe1SAndy Fiddaman 566*5c4a5fe1SAndy Fiddaman /* GPIO Unsolicited Enable Mask */ 567*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_GPIO_UNSOLICITED_ENABLE_MASK 0xf19 568*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_GPIO_UNSOLICITED_ENABLE_MASK 0x719 569*5c4a5fe1SAndy Fiddaman 570*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_GPIO_UNSOLICITED_ENABLE_MASK(cad, nid) \ 571*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 572*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_GPIO_UNSOLICITED_ENABLE_MASK, 0x0)) 573*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_GPIO_UNSOLICITED_ENABLE_MASK(cad, nid, payload) \ 574*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 575*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_GPIO_UNSOLICITED_ENABLE_MASK, (payload))) 576*5c4a5fe1SAndy Fiddaman 577*5c4a5fe1SAndy Fiddaman /* GPIO_STICKY_MASK */ 578*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_GPIO_STICKY_MASK 0xf1a 579*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_GPIO_STICKY_MASK 0x71a 580*5c4a5fe1SAndy Fiddaman 581*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_GPIO_STICKY_MASK(cad, nid) \ 582*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 583*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_GPIO_STICKY_MASK, 0x0)) 584*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_GPIO_STICKY_MASK(cad, nid, payload) \ 585*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 586*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_GPIO_STICKY_MASK, (payload))) 587*5c4a5fe1SAndy Fiddaman 588*5c4a5fe1SAndy Fiddaman /* Beep Generation */ 589*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_BEEP_GENERATION 0xf0a 590*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_BEEP_GENERATION 0x70a 591*5c4a5fe1SAndy Fiddaman 592*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_BEEP_GENERATION(cad, nid) \ 593*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 594*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_BEEP_GENERATION, 0x0)) 595*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_BEEP_GENERATION(cad, nid, payload) \ 596*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 597*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_BEEP_GENERATION, (payload))) 598*5c4a5fe1SAndy Fiddaman 599*5c4a5fe1SAndy Fiddaman /* Volume Knob */ 600*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_VOLUME_KNOB 0xf0f 601*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_VOLUME_KNOB 0x70f 602*5c4a5fe1SAndy Fiddaman 603*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_VOLUME_KNOB(cad, nid) \ 604*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 605*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_VOLUME_KNOB, 0x0)) 606*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_VOLUME_KNOB(cad, nid, payload) \ 607*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 608*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_VOLUME_KNOB, (payload))) 609*5c4a5fe1SAndy Fiddaman 610*5c4a5fe1SAndy Fiddaman /* Subsystem ID */ 611*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_SUBSYSTEM_ID 0xf20 612*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_SUSBYSTEM_ID1 0x720 613*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_SUBSYSTEM_ID2 0x721 614*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_SUBSYSTEM_ID3 0x722 615*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_SUBSYSTEM_ID4 0x723 616*5c4a5fe1SAndy Fiddaman 617*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_SUBSYSTEM_ID(cad, nid) \ 618*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 619*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_SUBSYSTEM_ID, 0x0)) 620*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_SUBSYSTEM_ID1(cad, nid, payload) \ 621*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 622*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_SUSBYSTEM_ID1, (payload))) 623*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_SUBSYSTEM_ID2(cad, nid, payload) \ 624*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 625*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_SUSBYSTEM_ID2, (payload))) 626*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_SUBSYSTEM_ID3(cad, nid, payload) \ 627*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 628*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_SUSBYSTEM_ID3, (payload))) 629*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_SUBSYSTEM_ID4(cad, nid, payload) \ 630*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 631*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_SUSBYSTEM_ID4, (payload))) 632*5c4a5fe1SAndy Fiddaman 633*5c4a5fe1SAndy Fiddaman /* Configuration Default */ 634*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_CONFIGURATION_DEFAULT 0xf1c 635*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_CONFIGURATION_DEFAULT1 0x71c 636*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_CONFIGURATION_DEFAULT2 0x71d 637*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_CONFIGURATION_DEFAULT3 0x71e 638*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_CONFIGURATION_DEFAULT4 0x71f 639*5c4a5fe1SAndy Fiddaman 640*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_CONFIGURATION_DEFAULT(cad, nid) \ 641*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 642*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_CONFIGURATION_DEFAULT, 0x0)) 643*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_CONFIGURATION_DEFAULT1(cad, nid, payload) \ 644*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 645*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_CONFIGURATION_DEFAULT1, (payload))) 646*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_CONFIGURATION_DEFAULT2(cad, nid, payload) \ 647*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 648*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_CONFIGURATION_DEFAULT2, (payload))) 649*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_CONFIGURATION_DEFAULT3(cad, nid, payload) \ 650*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 651*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_CONFIGURATION_DEFAULT3, (payload))) 652*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_CONFIGURATION_DEFAULT4(cad, nid, payload) \ 653*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 654*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_CONFIGURATION_DEFAULT4, (payload))) 655*5c4a5fe1SAndy Fiddaman 656*5c4a5fe1SAndy Fiddaman /* Stripe Control */ 657*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_STRIPE_CONTROL 0xf24 658*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_STRIPE_CONTROL 0x724 659*5c4a5fe1SAndy Fiddaman 660*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_STRIPE_CONTROL(cad, nid) \ 661*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 662*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_STRIPE_CONTROL, 0x0)) 663*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_STRIPE_CONTROL(cad, nid, payload) \ 664*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 665*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_STRIPE_CONTROL, (payload))) 666*5c4a5fe1SAndy Fiddaman 667*5c4a5fe1SAndy Fiddaman /* Channel Count Control */ 668*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_CONV_CHAN_COUNT 0xf2d 669*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_CONV_CHAN_COUNT 0x72d 670*5c4a5fe1SAndy Fiddaman 671*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_CONV_CHAN_COUNT(cad, nid) \ 672*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 673*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_CONV_CHAN_COUNT, 0x0)) 674*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_CONV_CHAN_COUNT(cad, nid, payload) \ 675*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 676*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_CONV_CHAN_COUNT, (payload))) 677*5c4a5fe1SAndy Fiddaman 678*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_HDMI_DIP_SIZE 0xf2e 679*5c4a5fe1SAndy Fiddaman 680*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_HDMI_DIP_SIZE(cad, nid, arg) \ 681*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 682*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_HDMI_DIP_SIZE, (arg))) 683*5c4a5fe1SAndy Fiddaman 684*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_HDMI_ELDD 0xf2f 685*5c4a5fe1SAndy Fiddaman 686*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_HDMI_ELDD(cad, nid, off) \ 687*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 688*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_HDMI_ELDD, (off))) 689*5c4a5fe1SAndy Fiddaman 690*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_HDMI_DIP_INDEX 0xf30 691*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_HDMI_DIP_INDEX 0x730 692*5c4a5fe1SAndy Fiddaman 693*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_HDMI_DIP_INDEX(cad, nid) \ 694*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 695*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_HDMI_DIP_INDEX, 0x0)) 696*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_HDMI_DIP_INDEX(cad, nid, payload) \ 697*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 698*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_HDMI_DIP_INDEX, (payload))) 699*5c4a5fe1SAndy Fiddaman 700*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_HDMI_DIP_DATA 0xf31 701*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_HDMI_DIP_DATA 0x731 702*5c4a5fe1SAndy Fiddaman 703*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_HDMI_DIP_DATA(cad, nid) \ 704*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 705*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_HDMI_DIP_DATA, 0x0)) 706*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_HDMI_DIP_DATA(cad, nid, payload) \ 707*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 708*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_HDMI_DIP_DATA, (payload))) 709*5c4a5fe1SAndy Fiddaman 710*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_HDMI_DIP_XMIT 0xf32 711*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_HDMI_DIP_XMIT 0x732 712*5c4a5fe1SAndy Fiddaman 713*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_HDMI_DIP_XMIT(cad, nid) \ 714*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 715*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_HDMI_DIP_XMIT, 0x0)) 716*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_HDMI_DIP_XMIT(cad, nid, payload) \ 717*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 718*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_HDMI_DIP_XMIT, (payload))) 719*5c4a5fe1SAndy Fiddaman 720*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_HDMI_CP_CTRL 0xf33 721*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_HDMI_CP_CTRL 0x733 722*5c4a5fe1SAndy Fiddaman 723*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_GET_HDMI_CHAN_SLOT 0xf34 724*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_SET_HDMI_CHAN_SLOT 0x734 725*5c4a5fe1SAndy Fiddaman 726*5c4a5fe1SAndy Fiddaman #define HDA_CMD_GET_HDMI_CHAN_SLOT(cad, nid) \ 727*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 728*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_GET_HDMI_CHAN_SLOT, 0x0)) 729*5c4a5fe1SAndy Fiddaman #define HDA_CMD_SET_HDMI_CHAN_SLOT(cad, nid, payload) \ 730*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 731*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_SET_HDMI_CHAN_SLOT, (payload))) 732*5c4a5fe1SAndy Fiddaman 733*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_REF_STREAM_HEADER 0 734*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_LPCM 1 735*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_AC3 2 736*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_MPEG1 3 737*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_MP3 4 738*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_MPEG2 5 739*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_AACLC 6 740*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_DTS 7 741*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_ATRAC 8 742*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_SACD 9 743*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_EAC3 10 744*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_DTS_HD 11 745*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_MLP 12 746*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_DST 13 747*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_WMAPRO 14 748*5c4a5fe1SAndy Fiddaman #define HDA_HDMI_CODING_TYPE_REF_CTX 15 749*5c4a5fe1SAndy Fiddaman 750*5c4a5fe1SAndy Fiddaman /* Function Reset */ 751*5c4a5fe1SAndy Fiddaman #define HDA_CMD_VERB_FUNCTION_RESET 0x7ff 752*5c4a5fe1SAndy Fiddaman 753*5c4a5fe1SAndy Fiddaman #define HDA_CMD_FUNCTION_RESET(cad, nid) \ 754*5c4a5fe1SAndy Fiddaman (HDA_CMD_12BIT((cad), (nid), \ 755*5c4a5fe1SAndy Fiddaman HDA_CMD_VERB_FUNCTION_RESET, 0x0)) 756*5c4a5fe1SAndy Fiddaman 757*5c4a5fe1SAndy Fiddaman 758*5c4a5fe1SAndy Fiddaman /**************************************************************************** 759*5c4a5fe1SAndy Fiddaman * HDA Device Parameters 760*5c4a5fe1SAndy Fiddaman ****************************************************************************/ 761*5c4a5fe1SAndy Fiddaman 762*5c4a5fe1SAndy Fiddaman /* Vendor ID */ 763*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_VENDOR_ID 0x00 764*5c4a5fe1SAndy Fiddaman 765*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_VENDOR_ID_VENDOR_ID_MASK 0xffff0000 766*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_VENDOR_ID_VENDOR_ID_SHIFT 16 767*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_VENDOR_ID_DEVICE_ID_MASK 0x0000ffff 768*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_VENDOR_ID_DEVICE_ID_SHIFT 0 769*5c4a5fe1SAndy Fiddaman 770*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_VENDOR_ID_VENDOR_ID(param) \ 771*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_VENDOR_ID_VENDOR_ID_MASK) >> \ 772*5c4a5fe1SAndy Fiddaman HDA_PARAM_VENDOR_ID_VENDOR_ID_SHIFT) 773*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_VENDOR_ID_DEVICE_ID(param) \ 774*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_VENDOR_ID_DEVICE_ID_MASK) >> \ 775*5c4a5fe1SAndy Fiddaman HDA_PARAM_VENDOR_ID_DEVICE_ID_SHIFT) 776*5c4a5fe1SAndy Fiddaman 777*5c4a5fe1SAndy Fiddaman /* Revision ID */ 778*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_REVISION_ID 0x02 779*5c4a5fe1SAndy Fiddaman 780*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_REVISION_ID_MAJREV_MASK 0x00f00000 781*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_REVISION_ID_MAJREV_SHIFT 20 782*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_REVISION_ID_MINREV_MASK 0x000f0000 783*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_REVISION_ID_MINREV_SHIFT 16 784*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_REVISION_ID_REVISION_ID_MASK 0x0000ff00 785*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_REVISION_ID_REVISION_ID_SHIFT 8 786*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_REVISION_ID_STEPPING_ID_MASK 0x000000ff 787*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_REVISION_ID_STEPPING_ID_SHIFT 0 788*5c4a5fe1SAndy Fiddaman 789*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_REVISION_ID_MAJREV(param) \ 790*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_REVISION_ID_MAJREV_MASK) >> \ 791*5c4a5fe1SAndy Fiddaman HDA_PARAM_REVISION_ID_MAJREV_SHIFT) 792*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_REVISION_ID_MINREV(param) \ 793*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_REVISION_ID_MINREV_MASK) >> \ 794*5c4a5fe1SAndy Fiddaman HDA_PARAM_REVISION_ID_MINREV_SHIFT) 795*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_REVISION_ID_REVISION_ID(param) \ 796*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_REVISION_ID_REVISION_ID_MASK) >> \ 797*5c4a5fe1SAndy Fiddaman HDA_PARAM_REVISION_ID_REVISION_ID_SHIFT) 798*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_REVISION_ID_STEPPING_ID(param) \ 799*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_REVISION_ID_STEPPING_ID_MASK) >> \ 800*5c4a5fe1SAndy Fiddaman HDA_PARAM_REVISION_ID_STEPPING_ID_SHIFT) 801*5c4a5fe1SAndy Fiddaman 802*5c4a5fe1SAndy Fiddaman /* Subordinate Node Cound */ 803*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUB_NODE_COUNT 0x04 804*5c4a5fe1SAndy Fiddaman 805*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUB_NODE_COUNT_START_MASK 0x00ff0000 806*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUB_NODE_COUNT_START_SHIFT 16 807*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUB_NODE_COUNT_TOTAL_MASK 0x000000ff 808*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUB_NODE_COUNT_TOTAL_SHIFT 0 809*5c4a5fe1SAndy Fiddaman 810*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUB_NODE_COUNT_START(param) \ 811*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUB_NODE_COUNT_START_MASK) >> \ 812*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUB_NODE_COUNT_START_SHIFT) 813*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUB_NODE_COUNT_TOTAL(param) \ 814*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUB_NODE_COUNT_TOTAL_MASK) >> \ 815*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUB_NODE_COUNT_TOTAL_SHIFT) 816*5c4a5fe1SAndy Fiddaman 817*5c4a5fe1SAndy Fiddaman /* Function Group Type */ 818*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_FCT_GRP_TYPE 0x05 819*5c4a5fe1SAndy Fiddaman 820*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_FCT_GRP_TYPE_UNSOL_MASK 0x00000100 821*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_FCT_GRP_TYPE_UNSOL_SHIFT 8 822*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_MASK 0x000000ff 823*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_SHIFT 0 824*5c4a5fe1SAndy Fiddaman 825*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_FCT_GRP_TYPE_UNSOL(param) \ 826*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_FCT_GRP_TYPE_UNSOL_MASK) >> \ 827*5c4a5fe1SAndy Fiddaman HDA_PARAM_FCT_GROUP_TYPE_UNSOL_SHIFT) 828*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE(param) \ 829*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_MASK) >> \ 830*5c4a5fe1SAndy Fiddaman HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_SHIFT) 831*5c4a5fe1SAndy Fiddaman 832*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO 0x01 833*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_MODEM 0x02 834*5c4a5fe1SAndy Fiddaman 835*5c4a5fe1SAndy Fiddaman /* Audio Function Group Capabilities */ 836*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_FCT_GRP_CAP 0x08 837*5c4a5fe1SAndy Fiddaman 838*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_FCT_GRP_CAP_BEEP_GEN_MASK 0x00010000 839*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_FCT_GRP_CAP_BEEP_GEN_SHIFT 16 840*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_FCT_GRP_CAP_INPUT_DELAY_MASK 0x00000f00 841*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_FCT_GRP_CAP_INPUT_DELAY_SHIFT 8 842*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_FCT_GRP_CAP_OUTPUT_DELAY_MASK 0x0000000f 843*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_FCT_GRP_CAP_OUTPUT_DELAY_SHIFT 0 844*5c4a5fe1SAndy Fiddaman 845*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_FCT_GRP_CAP_BEEP_GEN(param) \ 846*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_FCT_GRP_CAP_BEEP_GEN_MASK) >> \ 847*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_FCT_GRP_CAP_BEEP_GEN_SHIFT) 848*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_FCT_GRP_CAP_INPUT_DELAY(param) \ 849*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_FCT_GRP_CAP_INPUT_DELAY_MASK) >> \ 850*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_FCT_GRP_CAP_INPUT_DELAY_SHIFT) 851*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_FCT_GRP_CAP_OUTPUT_DELAY(param) \ 852*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_FCT_GRP_CAP_OUTPUT_DELAY_MASK) >> \ 853*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_FCT_GRP_CAP_OUTPUT_DELAY_SHIFT) 854*5c4a5fe1SAndy Fiddaman 855*5c4a5fe1SAndy Fiddaman /* Audio Widget Capabilities */ 856*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP 0x09 857*5c4a5fe1SAndy Fiddaman 858*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_MASK 0x00f00000 859*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_SHIFT 20 860*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_MASK 0x000f0000 861*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_SHIFT 16 862*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_MASK 0x0000e000 863*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_SHIFT 13 864*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_CP_MASK 0x00001000 865*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_CP_SHIFT 12 866*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP_MASK 0x00000800 867*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP_SHIFT 11 868*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_POWER_CTRL_MASK 0x00000400 869*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_POWER_CTRL_SHIFT 10 870*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL_MASK 0x00000200 871*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL_SHIFT 9 872*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_CONN_LIST_MASK 0x00000100 873*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_CONN_LIST_SHIFT 8 874*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP_MASK 0x00000080 875*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP_SHIFT 7 876*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_PROC_WIDGET_MASK 0x00000040 877*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_PROC_WIDGET_SHIFT 6 878*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_STRIPE_MASK 0x00000020 879*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_STRIPE_SHIFT 5 880*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_FORMAT_OVR_MASK 0x00000010 881*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_FORMAT_OVR_SHIFT 4 882*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_AMP_OVR_MASK 0x00000008 883*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_AMP_OVR_SHIFT 3 884*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_OUT_AMP_MASK 0x00000004 885*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_OUT_AMP_SHIFT 2 886*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_IN_AMP_MASK 0x00000002 887*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_IN_AMP_SHIFT 1 888*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_STEREO_MASK 0x00000001 889*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_STEREO_SHIFT 0 890*5c4a5fe1SAndy Fiddaman 891*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_TYPE(param) \ 892*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_MASK) >> \ 893*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_SHIFT) 894*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_DELAY(param) \ 895*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_MASK) >> \ 896*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_SHIFT) 897*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_CC(param) \ 898*5c4a5fe1SAndy Fiddaman ((((param) & HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_MASK) >> \ 899*5c4a5fe1SAndy Fiddaman (HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_SHIFT - 1)) | \ 900*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_STEREO_MASK) >> \ 901*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_STEREO_SHIFT)) 902*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_CP(param) \ 903*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_CP_MASK) >> \ 904*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_CP_SHIFT) 905*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP(param) \ 906*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP_MASK) >> \ 907*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP_SHIFT) 908*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_POWER_CTRL(param) \ 909*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_POWER_CTRL_MASK) >> \ 910*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_POWER_CTRL_SHIFT) 911*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(param) \ 912*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL_MASK) >> \ 913*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL_SHIFT) 914*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_CONN_LIST(param) \ 915*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_CONN_LIST_MASK) >> \ 916*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_CONN_LIST_SHIFT) 917*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP(param) \ 918*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP_MASK) >> \ 919*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP_SHIFT) 920*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_PROC_WIDGET(param) \ 921*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_PROC_WIDGET_MASK) >> \ 922*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_PROC_WIDGET_SHIFT) 923*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_STRIPE(param) \ 924*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_STRIPE_MASK) >> \ 925*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_STRIPE_SHIFT) 926*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_FORMAT_OVR(param) \ 927*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_FORMAT_OVR_MASK) >> \ 928*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_FORMAT_OVR_SHIFT) 929*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_AMP_OVR(param) \ 930*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_AMP_OVR_MASK) >> \ 931*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_AMP_OVR_SHIFT) 932*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_OUT_AMP(param) \ 933*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_OUT_AMP_MASK) >> \ 934*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_OUT_AMP_SHIFT) 935*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_IN_AMP(param) \ 936*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_IN_AMP_MASK) >> \ 937*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_IN_AMP_SHIFT) 938*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_STEREO(param) \ 939*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_STEREO_MASK) >> \ 940*5c4a5fe1SAndy Fiddaman HDA_PARAM_AUDIO_WIDGET_CAP_STEREO_SHIFT) 941*5c4a5fe1SAndy Fiddaman 942*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_OUTPUT 0x0 943*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT 0x1 944*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_MIXER 0x2 945*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_SELECTOR 0x3 946*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX 0x4 947*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_POWER_WIDGET 0x5 948*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_VOLUME_WIDGET 0x6 949*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_BEEP_WIDGET 0x7 950*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_VENDOR_WIDGET 0xf 951*5c4a5fe1SAndy Fiddaman 952*5c4a5fe1SAndy Fiddaman /* Supported PCM Size, Rates */ 953*5c4a5fe1SAndy Fiddaman 954*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE 0x0a 955*5c4a5fe1SAndy Fiddaman 956*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_32BIT_MASK 0x00100000 957*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_32BIT_SHIFT 20 958*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_24BIT_MASK 0x00080000 959*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_24BIT_SHIFT 19 960*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_20BIT_MASK 0x00040000 961*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_20BIT_SHIFT 18 962*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_16BIT_MASK 0x00020000 963*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_16BIT_SHIFT 17 964*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_8BIT_MASK 0x00010000 965*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_8BIT_SHIFT 16 966*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_8KHZ_MASK 0x00000001 967*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_8KHZ_SHIFT 0 968*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_11KHZ_MASK 0x00000002 969*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_11KHZ_SHIFT 1 970*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_16KHZ_MASK 0x00000004 971*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_16KHZ_SHIFT 2 972*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_22KHZ_MASK 0x00000008 973*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_22KHZ_SHIFT 3 974*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_32KHZ_MASK 0x00000010 975*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_32KHZ_SHIFT 4 976*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_44KHZ_MASK 0x00000020 977*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_44KHZ_SHIFT 5 978*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_48KHZ_MASK 0x00000040 979*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_48KHZ_SHIFT 6 980*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_88KHZ_MASK 0x00000080 981*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_88KHZ_SHIFT 7 982*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_96KHZ_MASK 0x00000100 983*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_96KHZ_SHIFT 8 984*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_176KHZ_MASK 0x00000200 985*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_176KHZ_SHIFT 9 986*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_192KHZ_MASK 0x00000400 987*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_192KHZ_SHIFT 10 988*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_384KHZ_MASK 0x00000800 989*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_384KHZ_SHIFT 11 990*5c4a5fe1SAndy Fiddaman 991*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_32BIT(param) \ 992*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_32BIT_MASK) >> \ 993*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_32BIT_SHIFT) 994*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_24BIT(param) \ 995*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_24BIT_MASK) >> \ 996*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_24BIT_SHIFT) 997*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_20BIT(param) \ 998*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_20BIT_MASK) >> \ 999*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_20BIT_SHIFT) 1000*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_16BIT(param) \ 1001*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_16BIT_MASK) >> \ 1002*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_16BIT_SHIFT) 1003*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_8BIT(param) \ 1004*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_8BIT_MASK) >> \ 1005*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_8BIT_SHIFT) 1006*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_8KHZ(param) \ 1007*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_8KHZ_MASK) >> \ 1008*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_8KHZ_SHIFT) 1009*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_11KHZ(param) \ 1010*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_11KHZ_MASK) >> \ 1011*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_11KHZ_SHIFT) 1012*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_16KHZ(param) \ 1013*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_16KHZ_MASK) >> \ 1014*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_16KHZ_SHIFT) 1015*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_22KHZ(param) \ 1016*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_22KHZ_MASK) >> \ 1017*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_22KHZ_SHIFT) 1018*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_32KHZ(param) \ 1019*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_32KHZ_MASK) >> \ 1020*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_32KHZ_SHIFT) 1021*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_44KHZ(param) \ 1022*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_44KHZ_MASK) >> \ 1023*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_44KHZ_SHIFT) 1024*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_48KHZ(param) \ 1025*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_48KHZ_MASK) >> \ 1026*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_48KHZ_SHIFT) 1027*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_88KHZ(param) \ 1028*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_88KHZ_MASK) >> \ 1029*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_88KHZ_SHIFT) 1030*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_96KHZ(param) \ 1031*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_96KHZ_MASK) >> \ 1032*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_96KHZ_SHIFT) 1033*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_176KHZ(param) \ 1034*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_176KHZ_MASK) >> \ 1035*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_176KHZ_SHIFT) 1036*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_192KHZ(param) \ 1037*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_192KHZ_MASK) >> \ 1038*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_192KHZ_SHIFT) 1039*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_PCM_SIZE_RATE_384KHZ(param) \ 1040*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_PCM_SIZE_RATE_384KHZ_MASK) >> \ 1041*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_PCM_SIZE_RATE_384KHZ_SHIFT) 1042*5c4a5fe1SAndy Fiddaman 1043*5c4a5fe1SAndy Fiddaman /* Supported Stream Formats */ 1044*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_STREAM_FORMATS 0x0b 1045*5c4a5fe1SAndy Fiddaman 1046*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_STREAM_FORMATS_AC3_MASK 0x00000004 1047*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_STREAM_FORMATS_AC3_SHIFT 2 1048*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_STREAM_FORMATS_FLOAT32_MASK 0x00000002 1049*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_STREAM_FORMATS_FLOAT32_SHIFT 1 1050*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_STREAM_FORMATS_PCM_MASK 0x00000001 1051*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_STREAM_FORMATS_PCM_SHIFT 0 1052*5c4a5fe1SAndy Fiddaman 1053*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_STREAM_FORMATS_AC3(param) \ 1054*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_STREAM_FORMATS_AC3_MASK) >> \ 1055*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_STREAM_FORMATS_AC3_SHIFT) 1056*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_STREAM_FORMATS_FLOAT32(param) \ 1057*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_STREAM_FORMATS_FLOAT32_MASK) >> \ 1058*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_STREAM_FORMATS_FLOAT32_SHIFT) 1059*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_STREAM_FORMATS_PCM(param) \ 1060*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_STREAM_FORMATS_PCM_MASK) >> \ 1061*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_STREAM_FORMATS_PCM_SHIFT) 1062*5c4a5fe1SAndy Fiddaman 1063*5c4a5fe1SAndy Fiddaman /* Pin Capabilities */ 1064*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP 0x0c 1065*5c4a5fe1SAndy Fiddaman 1066*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_HBR_MASK 0x08000000 1067*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_HBR_SHIFT 27 1068*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_DP_MASK 0x01000000 1069*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_DP_SHIFT 24 1070*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_EAPD_CAP_MASK 0x00010000 1071*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_EAPD_CAP_SHIFT 16 1072*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_MASK 0x0000ff00 1073*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_SHIFT 8 1074*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_100_MASK 0x00002000 1075*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_100_SHIFT 13 1076*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_80_MASK 0x00001000 1077*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_80_SHIFT 12 1078*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_GROUND_MASK 0x00000400 1079*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_GROUND_SHIFT 10 1080*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_50_MASK 0x00000200 1081*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_50_SHIFT 9 1082*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ_MASK 0x00000100 1083*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ_SHIFT 8 1084*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_HDMI_MASK 0x00000080 1085*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_HDMI_SHIFT 7 1086*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_BALANCED_IO_PINS_MASK 0x00000040 1087*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_BALANCED_IO_PINS_SHIFT 6 1088*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_INPUT_CAP_MASK 0x00000020 1089*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_INPUT_CAP_SHIFT 5 1090*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_OUTPUT_CAP_MASK 0x00000010 1091*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_OUTPUT_CAP_SHIFT 4 1092*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_HEADPHONE_CAP_MASK 0x00000008 1093*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_HEADPHONE_CAP_SHIFT 3 1094*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP_MASK 0x00000004 1095*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP_SHIFT 2 1096*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_TRIGGER_REQD_MASK 0x00000002 1097*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_TRIGGER_REQD_SHIFT 1 1098*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_IMP_SENSE_CAP_MASK 0x00000001 1099*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_IMP_SENSE_CAP_SHIFT 0 1100*5c4a5fe1SAndy Fiddaman 1101*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_HBR(param) \ 1102*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_HBR_MASK) >> \ 1103*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_HBR_SHIFT) 1104*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_DP(param) \ 1105*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_DP_MASK) >> \ 1106*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_DP_SHIFT) 1107*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_EAPD_CAP(param) \ 1108*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_EAPD_CAP_MASK) >> \ 1109*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_EAPD_CAP_SHIFT) 1110*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL(param) \ 1111*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_VREF_CTRL_MASK) >> \ 1112*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_VREF_CTRL_SHIFT) 1113*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_100(param) \ 1114*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_VREF_CTRL_100_MASK) >> \ 1115*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_VREF_CTRL_100_SHIFT) 1116*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_80(param) \ 1117*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_VREF_CTRL_80_MASK) >> \ 1118*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_VREF_CTRL_80_SHIFT) 1119*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_GROUND(param) \ 1120*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_VREF_CTRL_GROUND_MASK) >> \ 1121*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_VREF_CTRL_GROUND_SHIFT) 1122*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_50(param) \ 1123*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_VREF_CTRL_50_MASK) >> \ 1124*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_VREF_CTRL_50_SHIFT) 1125*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ(param) \ 1126*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ_MASK) >> \ 1127*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_VREF_CTRL_HIZ_SHIFT) 1128*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_HDMI(param) \ 1129*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_HDMI_MASK) >> \ 1130*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_HDMI_SHIFT) 1131*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_BALANCED_IO_PINS(param) \ 1132*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_BALANCED_IO_PINS_MASK) >> \ 1133*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_BALANCED_IO_PINS_SHIFT) 1134*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_INPUT_CAP(param) \ 1135*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_INPUT_CAP_MASK) >> \ 1136*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_INPUT_CAP_SHIFT) 1137*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_OUTPUT_CAP(param) \ 1138*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_OUTPUT_CAP_MASK) >> \ 1139*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_OUTPUT_CAP_SHIFT) 1140*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_HEADPHONE_CAP(param) \ 1141*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_HEADPHONE_CAP_MASK) >> \ 1142*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_HEADPHONE_CAP_SHIFT) 1143*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(param) \ 1144*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP_MASK) >> \ 1145*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP_SHIFT) 1146*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_TRIGGER_REQD(param) \ 1147*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_TRIGGER_REQD_MASK) >> \ 1148*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_TRIGGER_REQD_SHIFT) 1149*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PIN_CAP_IMP_SENSE_CAP(param) \ 1150*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PIN_CAP_IMP_SENSE_CAP_MASK) >> \ 1151*5c4a5fe1SAndy Fiddaman HDA_PARAM_PIN_CAP_IMP_SENSE_CAP_SHIFT) 1152*5c4a5fe1SAndy Fiddaman 1153*5c4a5fe1SAndy Fiddaman /* Input Amplifier Capabilities */ 1154*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_INPUT_AMP_CAP 0x0d 1155*5c4a5fe1SAndy Fiddaman 1156*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_INPUT_AMP_CAP_MUTE_CAP_MASK 0x80000000 1157*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_INPUT_AMP_CAP_MUTE_CAP_SHIFT 31 1158*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_INPUT_AMP_CAP_STEPSIZE_MASK 0x007f0000 1159*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_INPUT_AMP_CAP_STEPSIZE_SHIFT 16 1160*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_INPUT_AMP_CAP_NUMSTEPS_MASK 0x00007f00 1161*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_INPUT_AMP_CAP_NUMSTEPS_SHIFT 8 1162*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_INPUT_AMP_CAP_OFFSET_MASK 0x0000007f 1163*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_INPUT_AMP_CAP_OFFSET_SHIFT 0 1164*5c4a5fe1SAndy Fiddaman 1165*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_INPUT_AMP_CAP_MUTE_CAP(param) \ 1166*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_INPUT_AMP_CAP_MUTE_CAP_MASK) >> \ 1167*5c4a5fe1SAndy Fiddaman HDA_PARAM_INPUT_AMP_CAP_MUTE_CAP_SHIFT) 1168*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_INPUT_AMP_CAP_STEPSIZE(param) \ 1169*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_INPUT_AMP_CAP_STEPSIZE_MASK) >> \ 1170*5c4a5fe1SAndy Fiddaman HDA_PARAM_INPUT_AMP_CAP_STEPSIZE_SHIFT) 1171*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_INPUT_AMP_CAP_NUMSTEPS(param) \ 1172*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_INPUT_AMP_CAP_NUMSTEPS_MASK) >> \ 1173*5c4a5fe1SAndy Fiddaman HDA_PARAM_INPUT_AMP_CAP_NUMSTEPS_SHIFT) 1174*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_INPUT_AMP_CAP_OFFSET(param) \ 1175*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_INPUT_AMP_CAP_OFFSET_MASK) >> \ 1176*5c4a5fe1SAndy Fiddaman HDA_PARAM_INPUT_AMP_CAP_OFFSET_SHIFT) 1177*5c4a5fe1SAndy Fiddaman 1178*5c4a5fe1SAndy Fiddaman /* Output Amplifier Capabilities */ 1179*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_OUTPUT_AMP_CAP 0x12 1180*5c4a5fe1SAndy Fiddaman 1181*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_OUTPUT_AMP_CAP_MUTE_CAP_MASK 0x80000000 1182*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_OUTPUT_AMP_CAP_MUTE_CAP_SHIFT 31 1183*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE_MASK 0x007f0000 1184*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE_SHIFT 16 1185*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS_MASK 0x00007f00 1186*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS_SHIFT 8 1187*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_OUTPUT_AMP_CAP_OFFSET_MASK 0x0000007f 1188*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_OUTPUT_AMP_CAP_OFFSET_SHIFT 0 1189*5c4a5fe1SAndy Fiddaman 1190*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_OUTPUT_AMP_CAP_MUTE_CAP(param) \ 1191*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_OUTPUT_AMP_CAP_MUTE_CAP_MASK) >> \ 1192*5c4a5fe1SAndy Fiddaman HDA_PARAM_OUTPUT_AMP_CAP_MUTE_CAP_SHIFT) 1193*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE(param) \ 1194*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE_MASK) >> \ 1195*5c4a5fe1SAndy Fiddaman HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE_SHIFT) 1196*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS(param) \ 1197*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS_MASK) >> \ 1198*5c4a5fe1SAndy Fiddaman HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS_SHIFT) 1199*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_OUTPUT_AMP_CAP_OFFSET(param) \ 1200*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_OUTPUT_AMP_CAP_OFFSET_MASK) >> \ 1201*5c4a5fe1SAndy Fiddaman HDA_PARAM_OUTPUT_AMP_CAP_OFFSET_SHIFT) 1202*5c4a5fe1SAndy Fiddaman 1203*5c4a5fe1SAndy Fiddaman /* Connection List Length */ 1204*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_CONN_LIST_LENGTH 0x0e 1205*5c4a5fe1SAndy Fiddaman 1206*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_CONN_LIST_LENGTH_LONG_FORM_MASK 0x00000080 1207*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_CONN_LIST_LENGTH_LONG_FORM_SHIFT 7 1208*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_CONN_LIST_LENGTH_LIST_LENGTH_MASK 0x0000007f 1209*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_CONN_LIST_LENGTH_LIST_LENGTH_SHIFT 0 1210*5c4a5fe1SAndy Fiddaman 1211*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_CONN_LIST_LENGTH_LONG_FORM(param) \ 1212*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_CONN_LIST_LENGTH_LONG_FORM_MASK) >> \ 1213*5c4a5fe1SAndy Fiddaman HDA_PARAM_CONN_LIST_LENGTH_LONG_FORM_SHIFT) 1214*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_CONN_LIST_LENGTH_LIST_LENGTH(param) \ 1215*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_CONN_LIST_LENGTH_LIST_LENGTH_MASK) >> \ 1216*5c4a5fe1SAndy Fiddaman HDA_PARAM_CONN_LIST_LENGTH_LIST_LENGTH_SHIFT) 1217*5c4a5fe1SAndy Fiddaman 1218*5c4a5fe1SAndy Fiddaman /* Supported Power States */ 1219*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_POWER_STATES 0x0f 1220*5c4a5fe1SAndy Fiddaman 1221*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_POWER_STATES_D3_MASK 0x00000008 1222*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_POWER_STATES_D3_SHIFT 3 1223*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_POWER_STATES_D2_MASK 0x00000004 1224*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_POWER_STATES_D2_SHIFT 2 1225*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_POWER_STATES_D1_MASK 0x00000002 1226*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_POWER_STATES_D1_SHIFT 1 1227*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_POWER_STATES_D0_MASK 0x00000001 1228*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_POWER_STATES_D0_SHIFT 0 1229*5c4a5fe1SAndy Fiddaman 1230*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_POWER_STATES_D3(param) \ 1231*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_POWER_STATES_D3_MASK) >> \ 1232*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_POWER_STATES_D3_SHIFT) 1233*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_POWER_STATES_D2(param) \ 1234*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_POWER_STATES_D2_MASK) >> \ 1235*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_POWER_STATES_D2_SHIFT) 1236*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_POWER_STATES_D1(param) \ 1237*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_POWER_STATES_D1_MASK) >> \ 1238*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_POWER_STATES_D1_SHIFT) 1239*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_SUPP_POWER_STATES_D0(param) \ 1240*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_SUPP_POWER_STATES_D0_MASK) >> \ 1241*5c4a5fe1SAndy Fiddaman HDA_PARAM_SUPP_POWER_STATES_D0_SHIFT) 1242*5c4a5fe1SAndy Fiddaman 1243*5c4a5fe1SAndy Fiddaman /* Processing Capabilities */ 1244*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PROCESSING_CAP 0x10 1245*5c4a5fe1SAndy Fiddaman 1246*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PROCESSING_CAP_NUMCOEFF_MASK 0x0000ff00 1247*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PROCESSING_CAP_NUMCOEFF_SHIFT 8 1248*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PROCESSING_CAP_BENIGN_MASK 0x00000001 1249*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PROCESSING_CAP_BENIGN_SHIFT 0 1250*5c4a5fe1SAndy Fiddaman 1251*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PROCESSING_CAP_NUMCOEFF(param) \ 1252*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PROCESSING_CAP_NUMCOEFF_MASK) >> \ 1253*5c4a5fe1SAndy Fiddaman HDA_PARAM_PROCESSING_CAP_NUMCOEFF_SHIFT) 1254*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_PROCESSING_CAP_BENIGN(param) \ 1255*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_PROCESSING_CAP_BENIGN_MASK) >> \ 1256*5c4a5fe1SAndy Fiddaman HDA_PARAM_PROCESSING_CAP_BENIGN_SHIFT) 1257*5c4a5fe1SAndy Fiddaman 1258*5c4a5fe1SAndy Fiddaman /* GPIO Count */ 1259*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT 0x11 1260*5c4a5fe1SAndy Fiddaman 1261*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT_GPI_WAKE_MASK 0x80000000 1262*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT_GPI_WAKE_SHIFT 31 1263*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT_GPI_UNSOL_MASK 0x40000000 1264*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT_GPI_UNSOL_SHIFT 30 1265*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT_NUM_GPI_MASK 0x00ff0000 1266*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT_NUM_GPI_SHIFT 16 1267*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT_NUM_GPO_MASK 0x0000ff00 1268*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT_NUM_GPO_SHIFT 8 1269*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT_NUM_GPIO_MASK 0x000000ff 1270*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT_NUM_GPIO_SHIFT 0 1271*5c4a5fe1SAndy Fiddaman 1272*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT_GPI_WAKE(param) \ 1273*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_GPIO_COUNT_GPI_WAKE_MASK) >> \ 1274*5c4a5fe1SAndy Fiddaman HDA_PARAM_GPIO_COUNT_GPI_WAKE_SHIFT) 1275*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT_GPI_UNSOL(param) \ 1276*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_GPIO_COUNT_GPI_UNSOL_MASK) >> \ 1277*5c4a5fe1SAndy Fiddaman HDA_PARAM_GPIO_COUNT_GPI_UNSOL_SHIFT) 1278*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT_NUM_GPI(param) \ 1279*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_GPIO_COUNT_NUM_GPI_MASK) >> \ 1280*5c4a5fe1SAndy Fiddaman HDA_PARAM_GPIO_COUNT_NUM_GPI_SHIFT) 1281*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT_NUM_GPO(param) \ 1282*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_GPIO_COUNT_NUM_GPO_MASK) >> \ 1283*5c4a5fe1SAndy Fiddaman HDA_PARAM_GPIO_COUNT_NUM_GPO_SHIFT) 1284*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_GPIO_COUNT_NUM_GPIO(param) \ 1285*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_GPIO_COUNT_NUM_GPIO_MASK) >> \ 1286*5c4a5fe1SAndy Fiddaman HDA_PARAM_GPIO_COUNT_NUM_GPIO_SHIFT) 1287*5c4a5fe1SAndy Fiddaman 1288*5c4a5fe1SAndy Fiddaman /* Volume Knob Capabilities */ 1289*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_VOLUME_KNOB_CAP 0x13 1290*5c4a5fe1SAndy Fiddaman 1291*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_VOLUME_KNOB_CAP_DELTA_MASK 0x00000080 1292*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_VOLUME_KNOB_CAP_DELTA_SHIFT 7 1293*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_VOLUME_KNOB_CAP_NUM_STEPS_MASK 0x0000007f 1294*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_VOLUME_KNOB_CAP_NUM_STEPS_SHIFT 0 1295*5c4a5fe1SAndy Fiddaman 1296*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_VOLUME_KNOB_CAP_DELTA(param) \ 1297*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_VOLUME_KNOB_CAP_DELTA_MASK) >> \ 1298*5c4a5fe1SAndy Fiddaman HDA_PARAM_VOLUME_KNOB_CAP_DELTA_SHIFT) 1299*5c4a5fe1SAndy Fiddaman #define HDA_PARAM_VOLUME_KNOB_CAP_NUM_STEPS(param) \ 1300*5c4a5fe1SAndy Fiddaman (((param) & HDA_PARAM_VOLUME_KNOB_CAP_NUM_STEPS_MASK) >> \ 1301*5c4a5fe1SAndy Fiddaman HDA_PARAM_VOLUME_KNOB_CAP_NUM_STEPS_SHIFT) 1302*5c4a5fe1SAndy Fiddaman 1303*5c4a5fe1SAndy Fiddaman 1304*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_SEQUENCE_MASK 0x0000000f 1305*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_SEQUENCE_SHIFT 0 1306*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK 0x000000f0 1307*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_ASSOCIATION_SHIFT 4 1308*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_MISC_MASK 0x00000f00 1309*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_MISC_SHIFT 8 1310*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_COLOR_MASK 0x0000f000 1311*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT 12 1312*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_MASK 0x000f0000 1313*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_SHIFT 16 1314*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_MASK 0x00f00000 1315*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_SHIFT 20 1316*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_LOCATION_MASK 0x3f000000 1317*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_LOCATION_SHIFT 24 1318*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK 0xc0000000 1319*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT 30 1320*5c4a5fe1SAndy Fiddaman 1321*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_SEQUENCE(conf) \ 1322*5c4a5fe1SAndy Fiddaman (((conf) & HDA_CONFIG_DEFAULTCONF_SEQUENCE_MASK) >> \ 1323*5c4a5fe1SAndy Fiddaman HDA_CONFIG_DEFAULTCONF_SEQUENCE_SHIFT) 1324*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_ASSOCIATION(conf) \ 1325*5c4a5fe1SAndy Fiddaman (((conf) & HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK) >> \ 1326*5c4a5fe1SAndy Fiddaman HDA_CONFIG_DEFAULTCONF_ASSOCIATION_SHIFT) 1327*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_MISC(conf) \ 1328*5c4a5fe1SAndy Fiddaman (((conf) & HDA_CONFIG_DEFAULTCONF_MISC_MASK) >> \ 1329*5c4a5fe1SAndy Fiddaman HDA_CONFIG_DEFAULTCONF_MISC_SHIFT) 1330*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_COLOR(conf) \ 1331*5c4a5fe1SAndy Fiddaman (((conf) & HDA_CONFIG_DEFAULTCONF_COLOR_MASK) >> \ 1332*5c4a5fe1SAndy Fiddaman HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT) 1333*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE(conf) \ 1334*5c4a5fe1SAndy Fiddaman (((conf) & HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_MASK) >> \ 1335*5c4a5fe1SAndy Fiddaman HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_SHIFT) 1336*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE(conf) \ 1337*5c4a5fe1SAndy Fiddaman (((conf) & HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) >> \ 1338*5c4a5fe1SAndy Fiddaman HDA_CONFIG_DEFAULTCONF_DEVICE_SHIFT) 1339*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_LOCATION(conf) \ 1340*5c4a5fe1SAndy Fiddaman (((conf) & HDA_CONFIG_DEFAULTCONF_LOCATION_MASK) >> \ 1341*5c4a5fe1SAndy Fiddaman HDA_CONFIG_DEFAULTCONF_LOCATION_SHIFT) 1342*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY(conf) \ 1343*5c4a5fe1SAndy Fiddaman (((conf) & HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) >> \ 1344*5c4a5fe1SAndy Fiddaman HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT) 1345*5c4a5fe1SAndy Fiddaman 1346*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK (0<<30) 1347*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE (1<<30) 1348*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED (2<<30) 1349*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_BOTH (3<<30) 1350*5c4a5fe1SAndy Fiddaman 1351*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_OUT (0<<20) 1352*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_SPEAKER (1<<20) 1353*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT (2<<20) 1354*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_CD (3<<20) 1355*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_SPDIF_OUT (4<<20) 1356*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_DIGITAL_OTHER_OUT (5<<20) 1357*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_MODEM_LINE (6<<20) 1358*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_MODEM_HANDSET (7<<20) 1359*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN (8<<20) 1360*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_AUX (9<<20) 1361*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN (10<<20) 1362*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_TELEPHONY (11<<20) 1363*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_SPDIF_IN (12<<20) 1364*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_DIGITAL_OTHER_IN (13<<20) 1365*5c4a5fe1SAndy Fiddaman #define HDA_CONFIG_DEFAULTCONF_DEVICE_OTHER (15<<20) 1366*5c4a5fe1SAndy Fiddaman 1367*5c4a5fe1SAndy Fiddaman #endif /* _HDA_REG_H_ */ 1368