xref: /freebsd/sys/dev/sound/pci/hda/hdac.h (revision 5036d9652a5701d00e9e40ea942c278e9f77d33d)
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause
3  *
4  * Copyright (c) 2006 Stephane E. Potvin <sepotvin@videotron.ca>
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26  * SUCH DAMAGE.
27  */
28 
29 #ifndef _HDAC_H_
30 #define _HDAC_H_
31 
32 #include "hdac_if.h"
33 
34 /****************************************************************************
35  * Miscellaneous defines
36  ****************************************************************************/
37 
38 /* Controller models */
39 #define HDA_MODEL_CONSTRUCT(vendor, model)	\
40 		(((uint32_t)(model) << 16) | ((vendor##_VENDORID) & 0xffff))
41 
42 /* Intel */
43 #define INTEL_VENDORID		0x8086
44 #define HDA_INTEL_CMLKLP	HDA_MODEL_CONSTRUCT(INTEL, 0x02c8)
45 #define HDA_INTEL_CMLKH		HDA_MODEL_CONSTRUCT(INTEL, 0x06c8)
46 #define HDA_INTEL_OAK		HDA_MODEL_CONSTRUCT(INTEL, 0x080a)
47 #define HDA_INTEL_BAY		HDA_MODEL_CONSTRUCT(INTEL, 0x0f04)
48 #define HDA_INTEL_HSW1		HDA_MODEL_CONSTRUCT(INTEL, 0x0a0c)
49 #define HDA_INTEL_HSW2		HDA_MODEL_CONSTRUCT(INTEL, 0x0c0c)
50 #define HDA_INTEL_HSW3		HDA_MODEL_CONSTRUCT(INTEL, 0x0d0c)
51 #define HDA_INTEL_BDW1		HDA_MODEL_CONSTRUCT(INTEL, 0x160c)
52 #define HDA_INTEL_BXTNT		HDA_MODEL_CONSTRUCT(INTEL, 0x1a98)
53 #define HDA_INTEL_CPT		HDA_MODEL_CONSTRUCT(INTEL, 0x1c20)
54 #define HDA_INTEL_PATSBURG	HDA_MODEL_CONSTRUCT(INTEL, 0x1d20)
55 #define HDA_INTEL_PPT1		HDA_MODEL_CONSTRUCT(INTEL, 0x1e20)
56 #define HDA_INTEL_BR		HDA_MODEL_CONSTRUCT(INTEL, 0x2284)
57 #define HDA_INTEL_82801F	HDA_MODEL_CONSTRUCT(INTEL, 0x2668)
58 #define HDA_INTEL_63XXESB	HDA_MODEL_CONSTRUCT(INTEL, 0x269a)
59 #define HDA_INTEL_82801G	HDA_MODEL_CONSTRUCT(INTEL, 0x27d8)
60 #define HDA_INTEL_82801H	HDA_MODEL_CONSTRUCT(INTEL, 0x284b)
61 #define HDA_INTEL_82801I	HDA_MODEL_CONSTRUCT(INTEL, 0x293e)
62 #define HDA_INTEL_GMLK		HDA_MODEL_CONSTRUCT(INTEL, 0x3198)
63 #define HDA_INTEL_JLK		HDA_MODEL_CONSTRUCT(INTEL, 0x38c8)
64 #define HDA_INTEL_82801JI	HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e)
65 #define HDA_INTEL_82801JD	HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e)
66 #define HDA_INTEL_PCH		HDA_MODEL_CONSTRUCT(INTEL, 0x3b56)
67 #define HDA_INTEL_PCH2		HDA_MODEL_CONSTRUCT(INTEL, 0x3b57)
68 #define HDA_INTEL_ELLK		HDA_MODEL_CONSTRUCT(INTEL, 0x4b55)
69 #define HDA_INTEL_JLK2		HDA_MODEL_CONSTRUCT(INTEL, 0x4dc8)
70 #define HDA_INTEL_BXTNP		HDA_MODEL_CONSTRUCT(INTEL, 0x5a98)
71 #define HDA_INTEL_MACBOOKPRO92	HDA_MODEL_CONSTRUCT(INTEL, 0x7270)
72 #define HDA_INTEL_ALLK		HDA_MODEL_CONSTRUCT(INTEL, 0x7ad0)
73 #define HDA_INTEL_ALLKM		HDA_MODEL_CONSTRUCT(INTEL, 0x51cc)
74 #define HDA_INTEL_ALLKN		HDA_MODEL_CONSTRUCT(INTEL, 0x54c8)
75 #define HDA_INTEL_ALLKP1	HDA_MODEL_CONSTRUCT(INTEL, 0x51c8)
76 #define HDA_INTEL_ALLKP2	HDA_MODEL_CONSTRUCT(INTEL, 0x51cd)
77 #define HDA_INTEL_ALLKPS	HDA_MODEL_CONSTRUCT(INTEL, 0x51c9)
78 #define HDA_INTEL_RPTLK1	HDA_MODEL_CONSTRUCT(INTEL, 0x51ca)
79 #define HDA_INTEL_RPTLK2	HDA_MODEL_CONSTRUCT(INTEL, 0x51cb)
80 #define HDA_INTEL_SCH		HDA_MODEL_CONSTRUCT(INTEL, 0x811b)
81 #define HDA_INTEL_LPT1		HDA_MODEL_CONSTRUCT(INTEL, 0x8c20)
82 #define HDA_INTEL_LPT2		HDA_MODEL_CONSTRUCT(INTEL, 0x8c21)
83 #define HDA_INTEL_WCPT		HDA_MODEL_CONSTRUCT(INTEL, 0x8ca0)
84 #define HDA_INTEL_WELLS1	HDA_MODEL_CONSTRUCT(INTEL, 0x8d20)
85 #define HDA_INTEL_WELLS2	HDA_MODEL_CONSTRUCT(INTEL, 0x8d21)
86 #define HDA_INTEL_LPTLP1	HDA_MODEL_CONSTRUCT(INTEL, 0x9c20)
87 #define HDA_INTEL_LPTLP2	HDA_MODEL_CONSTRUCT(INTEL, 0x9c21)
88 #define HDA_INTEL_BDW2		HDA_MODEL_CONSTRUCT(INTEL, 0x9ca0)
89 #define HDA_INTEL_SRPTLP	HDA_MODEL_CONSTRUCT(INTEL, 0x9d70)
90 #define HDA_INTEL_KBLKLP	HDA_MODEL_CONSTRUCT(INTEL, 0x9d71)
91 #define HDA_INTEL_SRPT		HDA_MODEL_CONSTRUCT(INTEL, 0xa170)
92 #define HDA_INTEL_KBLK		HDA_MODEL_CONSTRUCT(INTEL, 0xa171)
93 #define HDA_INTEL_KBLKH		HDA_MODEL_CONSTRUCT(INTEL, 0xa2f0)
94 #define HDA_INTEL_CFLK		HDA_MODEL_CONSTRUCT(INTEL, 0xa348)
95 #define HDA_INTEL_CMLKS		HDA_MODEL_CONSTRUCT(INTEL, 0xa3f0)
96 #define HDA_INTEL_CNLK		HDA_MODEL_CONSTRUCT(INTEL, 0x9dc8)
97 #define HDA_INTEL_ICLK		HDA_MODEL_CONSTRUCT(INTEL, 0x34c8)
98 #define HDA_INTEL_TGLK		HDA_MODEL_CONSTRUCT(INTEL, 0xa0c8)
99 #define HDA_INTEL_TGLKH		HDA_MODEL_CONSTRUCT(INTEL, 0x43c8)
100 #define HDA_INTEL_MTL		HDA_MODEL_CONSTRUCT(INTEL, 0x7e28)
101 #define HDA_INTEL_ARLS		HDA_MODEL_CONSTRUCT(INTEL, 0x7f50)
102 #define HDA_INTEL_ARL		HDA_MODEL_CONSTRUCT(INTEL, 0x7728)
103 #define HDA_INTEL_LNLP		HDA_MODEL_CONSTRUCT(INTEL, 0xa828)
104 #define INTEL_A100ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(INTEL, 0xa100)
105 #define INTEL_D400ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(INTEL, 0xd400)
106 #define INTEL_D401ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(INTEL, 0xd401)
107 #define INTEL_D402ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(INTEL, 0xd402)
108 #define INTEL_E305ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(INTEL, 0xe305)
109 #define INTEL_E308ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(INTEL, 0xe308)
110 #define INTEL_E224ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(INTEL, 0xe224)
111 #define INTEL_E400ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(INTEL, 0xe400)
112 #define INTEL_E401ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(INTEL, 0xe401)
113 #define INTEL_E402ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(INTEL, 0xe402)
114 #define HDA_INTEL_ALL		HDA_MODEL_CONSTRUCT(INTEL, 0xffff)
115 
116 /* Nvidia */
117 #define NVIDIA_VENDORID		0x10de
118 #define HDA_NVIDIA_MCP51	HDA_MODEL_CONSTRUCT(NVIDIA, 0x026c)
119 #define HDA_NVIDIA_MCP55	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0371)
120 #define HDA_NVIDIA_MCP61_1	HDA_MODEL_CONSTRUCT(NVIDIA, 0x03e4)
121 #define HDA_NVIDIA_MCP61_2	HDA_MODEL_CONSTRUCT(NVIDIA, 0x03f0)
122 #define HDA_NVIDIA_MCP65_1	HDA_MODEL_CONSTRUCT(NVIDIA, 0x044a)
123 #define HDA_NVIDIA_MCP65_2	HDA_MODEL_CONSTRUCT(NVIDIA, 0x044b)
124 #define HDA_NVIDIA_MCP67_1	HDA_MODEL_CONSTRUCT(NVIDIA, 0x055c)
125 #define HDA_NVIDIA_MCP67_2	HDA_MODEL_CONSTRUCT(NVIDIA, 0x055d)
126 #define HDA_NVIDIA_MCP78_1	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0774)
127 #define HDA_NVIDIA_MCP78_2	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0775)
128 #define HDA_NVIDIA_MCP78_3	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0776)
129 #define HDA_NVIDIA_MCP78_4	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0777)
130 #define HDA_NVIDIA_MCP73_1	HDA_MODEL_CONSTRUCT(NVIDIA, 0x07fc)
131 #define HDA_NVIDIA_MCP73_2	HDA_MODEL_CONSTRUCT(NVIDIA, 0x07fd)
132 #define HDA_NVIDIA_MCP79_1	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac0)
133 #define HDA_NVIDIA_MCP79_2	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac1)
134 #define HDA_NVIDIA_MCP79_3	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac2)
135 #define HDA_NVIDIA_MCP79_4	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac3)
136 #define HDA_NVIDIA_0BE2		HDA_MODEL_CONSTRUCT(NVIDIA, 0x0be2)
137 #define HDA_NVIDIA_0BE3		HDA_MODEL_CONSTRUCT(NVIDIA, 0x0be3)
138 #define HDA_NVIDIA_0BE4		HDA_MODEL_CONSTRUCT(NVIDIA, 0x0be4)
139 #define HDA_NVIDIA_GT100	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0be5)
140 #define HDA_NVIDIA_GT106	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0be9)
141 #define HDA_NVIDIA_GT108	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0bea)
142 #define HDA_NVIDIA_GT104	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0beb)
143 #define HDA_NVIDIA_GT116	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0bee)
144 #define HDA_NVIDIA_MCP89_1	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d94)
145 #define HDA_NVIDIA_MCP89_2	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d95)
146 #define HDA_NVIDIA_MCP89_3	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d96)
147 #define HDA_NVIDIA_MCP89_4	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d97)
148 #define HDA_NVIDIA_GF119	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0e08)
149 #define HDA_NVIDIA_GF110_1	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0e09)
150 #define HDA_NVIDIA_GF110_2	HDA_MODEL_CONSTRUCT(NVIDIA, 0x0e0c)
151 #define HDA_NVIDIA_ALL		HDA_MODEL_CONSTRUCT(NVIDIA, 0xffff)
152 
153 /* ATI */
154 #define ATI_VENDORID		0x1002
155 #define HDA_ATI_SB450		HDA_MODEL_CONSTRUCT(ATI, 0x437b)
156 #define HDA_ATI_SB600		HDA_MODEL_CONSTRUCT(ATI, 0x4383)
157 #define HDA_ATI_RS600		HDA_MODEL_CONSTRUCT(ATI, 0x793b)
158 #define HDA_ATI_RS690		HDA_MODEL_CONSTRUCT(ATI, 0x7919)
159 #define HDA_ATI_RS780		HDA_MODEL_CONSTRUCT(ATI, 0x960f)
160 #define HDA_ATI_RS880		HDA_MODEL_CONSTRUCT(ATI, 0x970f)
161 #define HDA_ATI_R600		HDA_MODEL_CONSTRUCT(ATI, 0xaa00)
162 #define HDA_ATI_RV630		HDA_MODEL_CONSTRUCT(ATI, 0xaa08)
163 #define HDA_ATI_RV610		HDA_MODEL_CONSTRUCT(ATI, 0xaa10)
164 #define HDA_ATI_RV670		HDA_MODEL_CONSTRUCT(ATI, 0xaa18)
165 #define HDA_ATI_RV635		HDA_MODEL_CONSTRUCT(ATI, 0xaa20)
166 #define HDA_ATI_RV620		HDA_MODEL_CONSTRUCT(ATI, 0xaa28)
167 #define HDA_ATI_RV770		HDA_MODEL_CONSTRUCT(ATI, 0xaa30)
168 #define HDA_ATI_RV730		HDA_MODEL_CONSTRUCT(ATI, 0xaa38)
169 #define HDA_ATI_RV710		HDA_MODEL_CONSTRUCT(ATI, 0xaa40)
170 #define HDA_ATI_RV740		HDA_MODEL_CONSTRUCT(ATI, 0xaa48)
171 #define HDA_ATI_RV870		HDA_MODEL_CONSTRUCT(ATI, 0xaa50)
172 #define HDA_ATI_RV840		HDA_MODEL_CONSTRUCT(ATI, 0xaa58)
173 #define HDA_ATI_RV830		HDA_MODEL_CONSTRUCT(ATI, 0xaa60)
174 #define HDA_ATI_RV810		HDA_MODEL_CONSTRUCT(ATI, 0xaa68)
175 #define HDA_ATI_RV970		HDA_MODEL_CONSTRUCT(ATI, 0xaa80)
176 #define HDA_ATI_RV940		HDA_MODEL_CONSTRUCT(ATI, 0xaa88)
177 #define HDA_ATI_RV930		HDA_MODEL_CONSTRUCT(ATI, 0xaa90)
178 #define HDA_ATI_RV910		HDA_MODEL_CONSTRUCT(ATI, 0xaa98)
179 #define HDA_ATI_R1000		HDA_MODEL_CONSTRUCT(ATI, 0xaaa0)
180 #define HDA_ATI_OLAND		HDA_MODEL_CONSTRUCT(ATI, 0xaab0)
181 #define HDA_ATI_KABINI		HDA_MODEL_CONSTRUCT(ATI, 0x9840)
182 #define HDA_ATI_TRINITY		HDA_MODEL_CONSTRUCT(ATI, 0x9902)
183 #define HDA_ATI_ALL		HDA_MODEL_CONSTRUCT(ATI, 0xffff)
184 
185 #define AMD_VENDORID		0x1022
186 #define HDA_AMD_X370		HDA_MODEL_CONSTRUCT(AMD, 0x1457)
187 #define HDA_AMD_X570		HDA_MODEL_CONSTRUCT(AMD, 0x1487)
188 #define HDA_AMD_STONEY		HDA_MODEL_CONSTRUCT(AMD, 0x157a)
189 #define HDA_AMD_RAVEN		HDA_MODEL_CONSTRUCT(AMD, 0x15e3)
190 #define HDA_AMD_HUDSON2		HDA_MODEL_CONSTRUCT(AMD, 0x780d)
191 #define HDA_AMD_ALL		HDA_MODEL_CONSTRUCT(AMD, 0xffff)
192 
193 /* RDC */
194 #define RDC_VENDORID		0x17f3
195 #define HDA_RDC_M3010		HDA_MODEL_CONSTRUCT(RDC, 0x3010)
196 
197 /* Creative */
198 #define CREATIVE_VENDORID	0x1102
199 #define	HDA_CREATIVE_SB1570	HDA_MODEL_CONSTRUCT(CREATIVE, 0x0012)
200 #define HDA_CREATIVE_ALL	HDA_MODEL_CONSTRUCT(CREATIVE, 0xffff)
201 
202 /* VIA */
203 #define VIA_VENDORID		0x1106
204 #define HDA_VIA_VT82XX		HDA_MODEL_CONSTRUCT(VIA, 0x3288)
205 #define HDA_VIA_ALL		HDA_MODEL_CONSTRUCT(VIA, 0xffff)
206 
207 /* VMware */
208 #define VMWARE_VENDORID		0x15ad
209 #define HDA_VMWARE		HDA_MODEL_CONSTRUCT(VMWARE, 0x1977)
210 #define HDA_VMWARE_ALL		HDA_MODEL_CONSTRUCT(VMWARE, 0xffff)
211 
212 /* SiS */
213 #define SIS_VENDORID		0x1039
214 #define HDA_SIS_966		HDA_MODEL_CONSTRUCT(SIS, 0x7502)
215 #define HDA_SIS_ALL		HDA_MODEL_CONSTRUCT(SIS, 0xffff)
216 
217 /* ULI */
218 #define ULI_VENDORID		0x10b9
219 #define HDA_ULI_M5461		HDA_MODEL_CONSTRUCT(ULI, 0x5461)
220 #define HDA_ULI_ALL		HDA_MODEL_CONSTRUCT(ULI, 0xffff)
221 
222 /* OEM/subvendors */
223 
224 /* Intel */
225 #define	INTEL_DH87RL_SUBVENDOR	HDA_MODEL_CONSTRUCT(INTEL, 0x204a)
226 #define INTEL_D101GGC_SUBVENDOR	HDA_MODEL_CONSTRUCT(INTEL, 0xd600)
227 
228 /* HP/Compaq */
229 #define HP_VENDORID		0x103c
230 #define HP_Z200_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x103c)
231 #define HP_225AID_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x225a)
232 #define HP_2272ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x2272)
233 #define HP_2273ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x2273)
234 #define HP_V3000_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x30b5)
235 #define HP_NX7400_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x30a2)
236 #define HP_NX6310_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x30aa)
237 #define HP_NX6325_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x30b0)
238 #define HP_XW4300_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x3013)
239 #define HP_3010_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x3010)
240 #define HP_DV5000_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x30a5)
241 #define HP_DC7700S_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x2801)
242 #define HP_DC7700_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x2802)
243 #define HP_DC5750_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x280a)
244 #define HP_AF006UR_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0x83a2)
245 #define HP_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(HP, 0xffff)
246 /* What is wrong with XN 2563 anyway? (Got the picture ?) */
247 #define HP_NX6325_SUBVENDORX	0x103c30b0
248 
249 /* Dell */
250 #define DELL_VENDORID		0x1028
251 #define DELL_D630_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x01f9)
252 #define DELL_D820_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x01cc)
253 #define DELL_V1400_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x0227)
254 #define DELL_V1500_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x0228)
255 #define DELL_I1300_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x01c9)
256 #define DELL_L7480_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x07a0)
257 #define DELL_XPSM1210_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x01d7)
258 #define DELL_OPLX745_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x01da)
259 #define DELL_05F4ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x05f4)
260 #define DELL_05F5ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x05f5)
261 #define DELL_05F6ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x05f6)
262 #define DELL_V5470_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x0615)
263 #define DELL_V5470_1_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x0616)
264 #define DELL_064AID_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x064a)
265 #define DELL_064BID_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x064b)
266 #define DELL_9020M_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x0669)
267 #define DELL_V5480_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x069a)
268 #define DELL_06D9ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x06d9)
269 #define DELL_06DAID_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x06da)
270 #define DELL_06DBID_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x06db)
271 #define DELL_06DDID_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x06dd)
272 #define DELL_06DEID_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x06de)
273 #define DELL_06DFID_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x06df)
274 #define DELL_06E0ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x06e0)
275 #define DELL_7559_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x0706)
276 #define DELL_7000_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x0798)
277 #define DELL_XPS9560_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x07be)
278 #define DELL_E7240_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x05ca)
279 #define DELL_164AID_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x164a)
280 #define DELL_164BID_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x164b)
281 #define DELL_I7577_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0x0802)
282 #define DELL_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(DELL, 0xffff)
283 
284 /* Clevo */
285 #define CLEVO_VENDORID		0x1558
286 #define CLEVO_D900T_SUBVENDOR	HDA_MODEL_CONSTRUCT(CLEVO, 0x0900)
287 #define CLEVO_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(CLEVO, 0xffff)
288 
289 /* Acer */
290 #define ACER_VENDORID		0x1025
291 #define ACER_0070ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x0070)
292 #define ACER_0077ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x0077)
293 #define ACER_0078ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x0078)
294 #define ACER_0087ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x0087)
295 #define ACER_A5050_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x010f)
296 #define ACER_A4520_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x0127)
297 #define ACER_A4710_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x012f)
298 #define ACER_A4715_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x0133)
299 #define ACER_TM_6293_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x0139)
300 #define ACER_3681WXM_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x0110)
301 #define ACER_T6292_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x011b)
302 #define ACER_T5320_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x011f)
303 #define ACER_TM_6293_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x0139)
304 #define ACER_AC700_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x047c)
305 #define ACER_V5_571G_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x072d)
306 #define ACER_AO725_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x0740)
307 #define ACER_AO756_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x0742)
308 #define ACER_E1_472_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x0762)
309 #define ACER_E1_572_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x0775)
310 #define ACER_V5_573G_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x079b)
311 #define ACER_CB_14_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0x106d)
312 #define ACER_V5_122P_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0xa80d)
313 #define ACER_APFV_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0xa884)
314 #define ACER_E309ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0xe309)
315 #define ACER_E310ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0xe310)
316 #define ACER_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(ACER, 0xffff)
317 
318 /* Asus */
319 #define ASUS_VENDORID		0x1043
320 #define ASUS_X540A_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x103e)
321 #define ASUS_X540SA_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x10c0)
322 #define ASUS_X556UR_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x11c0)
323 #define ASUS_W5A_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x10c3)
324 #define ASUS_X540LA_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x10d0)
325 #define ASUS_A8X_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1153)
326 #define ASUS_U5F_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1263)
327 #define ASUS_W6F_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1263)
328 #define ASUS_X541SA_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x12e0)
329 #define ASUS_X541UV_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x12f0)
330 #define ASUS_A7M_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1323)
331 #define ASUS_F3JC_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1338)
332 #define ASUS_G2K_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1339)
333 #define ASUS_Z550SA_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x13b0)
334 #define ASUS_A7T_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x13c2)
335 #define ASUS_UX331_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x14de)
336 #define ASUS_UX31A_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1517)
337 #define ASUS_GL553VE_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x15e0)
338 #define ASUS_Z71V_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1964)
339 #define ASUS_W2J_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1971)
340 #define ASUS_M5200_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1993)
341 #define ASUS_G73JW_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1a13)
342 #define ASUS_X705UD_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1a30)
343 #define ASUS_Z550MA_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1bbd)
344 #define ASUS_X555UB_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1ccd)
345 #define ASUS_P5PL2_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x817f)
346 #define ASUS_P1AH2_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x81cb)
347 #define ASUS_M2NPVMX_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x81cb)
348 #define ASUS_M2V_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x81e7)
349 #define ASUS_P5BWD_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x81ec)
350 #define ASUS_M2N_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x8234)
351 #define ASUS_A8NVMCSM_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0xcb84)
352 #define ASUS_X101CH_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x8516)
353 #define ASUS_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0xffff)
354 
355 /* IBM / Lenovo */
356 #define IBM_VENDORID		0x1014
357 #define IBM_M52_SUBVENDOR	HDA_MODEL_CONSTRUCT(IBM, 0x02f6)
358 #define IBM_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(IBM, 0xffff)
359 
360 /* Lenovo */
361 #define LENOVO_VENDORID		0x17aa
362 #define LENOVO_3KN100_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x2066)
363 #define LENOVO_3KN200_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x384e)
364 #define LENOVO_B450_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3a0d)
365 #define LENOVO_TCA55_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x1015)
366 #define	LENOVO_X1_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x21e8)
367 #define	LENOVO_X1CRBN_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x21f9)
368 #define	LENOVO_X120BS_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x2227)
369 #define	LENOVO_X120KH_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x225c)
370 #define	LENOVO_X120QD_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x2292)
371 #define LENOVO_X220_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x21da)
372 #define LENOVO_X300_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x20ac)
373 #define	LENOVO_T400_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x20f2)
374 #define	LENOVO_T420_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x21ce)
375 #define	LENOVO_T430_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x21f3)
376 #define	LENOVO_T430S_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb)
377 #define	LENOVO_T520_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x21cf)
378 #define	LENOVO_T530_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x21f6)
379 #define	LENOVO_X230_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x21fa)
380 #define	LENOVO_X230T_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x2203)
381 #define	LENOVO_T431S_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x2208)
382 #define	LENOVO_X1CRBNG11_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x2315)
383 #define	LENOVO_G580_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x3977)
384 #define	LENOVO_L5AMD_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x381b)
385 #define	LENOVO_L5INTEL_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x380f)
386 #define	LENOVO_3000_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x384e)
387 #define	LENOVO_IDEAPAD330_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x3808)
388 #define	LENOVO_IDEAPAD3_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0x3881)
389 #define LENOVO_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(LENOVO, 0xffff)
390 
391 /* Samsung */
392 #define SAMSUNG_VENDORID	0x144d
393 #define SAMSUNG_Q1_SUBVENDOR	HDA_MODEL_CONSTRUCT(SAMSUNG, 0xc027)
394 #define SAMSUNG_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(SAMSUNG, 0xffff)
395 
396 /* Medion ? */
397 #define MEDION_VENDORID			0x161f
398 #define MEDION_MD95257_SUBVENDOR	HDA_MODEL_CONSTRUCT(MEDION, 0x203d)
399 #define MEDION_ALL_SUBVENDOR		HDA_MODEL_CONSTRUCT(MEDION, 0xffff)
400 
401 /* Apple Computer Inc. */
402 #define APPLE_VENDORID		0x106b
403 #define APPLE_MB3_SUBVENDOR	HDA_MODEL_CONSTRUCT(APPLE, 0x00a1)
404 
405 /* Sony */
406 #define SONY_VENDORID		0x104d
407 #define SONY_S5_SUBVENDOR	HDA_MODEL_CONSTRUCT(SONY, 0x81cc)
408 #define SONY_81A0ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(SONY, 0x81a0)
409 #define SONY_81D6ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(SONY, 0x81d6)
410 #define SONY_81BBID_SUBVENDOR	HDA_MODEL_CONSTRUCT(SONY, 0x81bb)
411 #define SONY_VAIO_TX_SUBVENDOR	HDA_MODEL_CONSTRUCT(SONY, 0x81e2)
412 #define SONY_VAIO_S13_SUBVENDOR	HDA_MODEL_CONSTRUCT(SONY, 0x9099)
413 #define SONY_VAIO_P11_SUBVENDOR	HDA_MODEL_CONSTRUCT(SONY, 0x90b5)
414 #define SONY_VAIO_P13_SUBVENDOR	HDA_MODEL_CONSTRUCT(SONY, 0x90b6)
415 #define SONY_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(SONY, 0xffff)
416 
417 /* Tyan? */
418 #define TYAN_VENDORID		0x10f1
419 #define TYAN_N6650W_SUBVENDOR	HDA_MODEL_CONSTRUCT(TYAN, 0x2915)
420 
421 /*
422  * Apple Intel MacXXXX seems using Sigmatel codec/vendor id
423  * instead of their own, which is beyond my comprehension
424  * (see HDA_CODEC_STAC9221 below).
425  */
426 #define APPLE_INTEL_MAC		0x76808384
427 #define APPLE_MACBOOKAIR31	0x0d9410de
428 #define APPLE_MACBOOKPRO55	0xcb7910de
429 #define APPLE_MACBOOKPRO71	0xcb8910de
430 
431 /* LG Electronics */
432 #define LG_VENDORID		0x1854
433 #define LG_LW20_SUBVENDOR	HDA_MODEL_CONSTRUCT(LG, 0x0018)
434 #define LG_M1_SUBVENDOR		HDA_MODEL_CONSTRUCT(LG, 0x003b)
435 #define LG_P1_SUBVENDOR		HDA_MODEL_CONSTRUCT(LG, 0x005f)
436 #define LG_W1_SUBVENDOR		HDA_MODEL_CONSTRUCT(LG, 0x0068)
437 #define LG_LW25_SUBVENDOR	HDA_MODEL_CONSTRUCT(LG, 0x0077)
438 #define LG_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(LG, 0xffff)
439 
440 /* Fujitsu Siemens */
441 #define FS_VENDORID		0x1734
442 #define FS_PA1510_SUBVENDOR	HDA_MODEL_CONSTRUCT(FS, 0x10b8)
443 #define FS_SI1848_SUBVENDOR	HDA_MODEL_CONSTRUCT(FS, 0x10cd)
444 #define FS_AMILO_M1437_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x107c)
445 #define FS_AMILO_M1451G_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x1094)
446 #define FS_AMILO_PI1556_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b0)
447 #define FS_AMILO_XI1526_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10ac)
448 #define FS_H270_SUBVENDOR	HDA_MODEL_CONSTRUCT(FS, 0x1147)
449 #define FS_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(FS, 0xffff)
450 
451 /* Fujitsu Limited */
452 #define FL_VENDORID		0x10cf
453 #define FL_S7020D_SUBVENDOR	HDA_MODEL_CONSTRUCT(FL, 0x1326)
454 #define FL_LB_S7110_SUBVENDOR	HDA_MODEL_CONSTRUCT(FL, 0x1397)
455 #define FL_U1010_SUBVENDOR	HDA_MODEL_CONSTRUCT(FL, 0x142d)
456 #define FL_1475ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(FL, 0x1475)
457 #define FL_LB_U904_SUBVENDOR	HDA_MODEL_CONSTRUCT(FL, 0x1845)
458 #define FL_LB_T731_SUBVENDOR	HDA_MODEL_CONSTRUCT(FL, 0x15dc)
459 #define FL_LB_E725_SUBVENDOR	HDA_MODEL_CONSTRUCT(FL, 0x1757)
460 #define FL_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(FL, 0xffff)
461 
462 /* Toshiba */
463 #define TOSHIBA_VENDORID	0x1179
464 #define TOSHIBA_U200_SUBVENDOR	HDA_MODEL_CONSTRUCT(TOSHIBA, 0x0001)
465 #define TOSHIBA_A135_SUBVENDOR	HDA_MODEL_CONSTRUCT(TOSHIBA, 0xff01)
466 #define TOSHIBA_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(TOSHIBA, 0xffff)
467 
468 /* Micro-Star International (MSI) */
469 #define MSI_VENDORID		0x1462
470 #define MSI_MS1034_SUBVENDOR	HDA_MODEL_CONSTRUCT(MSI, 0x0349)
471 #define MSI_MS034A_SUBVENDOR	HDA_MODEL_CONSTRUCT(MSI, 0x034a)
472 #define MSI_1150ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(MSI, 0x1150)
473 #define MSI_MS_B120_SUBVENDOR	HDA_MODEL_CONSTRUCT(MSI, 0xb120)
474 #define MSI_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(MSI, 0xffff)
475 
476 /* Giga-Byte Technology */
477 #define GB_VENDORID		0x1458
478 #define GB_G33S2H_SUBVENDOR	HDA_MODEL_CONSTRUCT(GB, 0xa022)
479 #define GB_K8_SUBVENDOR		HDA_MODEL_CONSTRUCT(GB, 0xa102)
480 #define GB_BXBT2807_SUBVENDOR	HDA_MODEL_CONSTRUCT(GB, 0xfa53)
481 #define GP_ALL_SUBVENDOR	HDA_MODEL_CONSTRUCT(GB, 0xffff)
482 
483 /* Uniwill ? */
484 #define UNIWILL_VENDORID	0x1584
485 #define UNIWILL_9075_SUBVENDOR	HDA_MODEL_CONSTRUCT(UNIWILL, 0x9075)
486 #define UNIWILL_9050_SUBVENDOR	HDA_MODEL_CONSTRUCT(UNIWILL, 0x9050)
487 #define UNIWILL_9054_SUBVENDOR	HDA_MODEL_CONSTRUCT(UNIWILL, 0x9054)
488 #define UNIWILL_9070_SUBVENDOR	HDA_MODEL_CONSTRUCT(UNIWILL, 0x9070)
489 #define UNIWILL_9080_SUBVENDOR	HDA_MODEL_CONSTRUCT(UNIWILL, 0x9080)
490 
491 /* Coeus / Elitegroup */
492 #define COEUS_VENDORID		0x1019
493 #define COEUS_G610P_SUBVENDOR	HDA_MODEL_CONSTRUCT(COEUS, 0x0f69)
494 #define COEUS_A880ID_SUBVENDOR	HDA_MODEL_CONSTRUCT(COEUS, 0xa880)
495 
496 /* Arima */
497 #define ARIMA_VENDORID		0x161f
498 #define ARIMA_W810_SUBVENDOR	HDA_MODEL_CONSTRUCT(ARIMA, 0x0f69)
499 
500 /* Shuttle Computer */
501 #define SHUTTLE_VENDORID	0x1039
502 #define SHUTTLE_ST20G5_SUBVENDOR HDA_MODEL_CONSTRUCT(SHUTTLE, 0xc790)
503 
504 /* First International Computer */
505 #define FIC_VENDORID		0x1509
506 #define FIC_P4M_SUBVENDOR	HDA_MODEL_CONSTRUCT(FIC, 0x925d)
507 
508 /* Gateway 2000 */
509 #define GATEWAY_VENDORID	0x107b
510 #define GATEWAY_3032ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x3032)
511 #define GATEWAY_3033ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x3033)
512 #define GATEWAY_4039ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x4039)
513 
514 /* Biostar */
515 #define BIOSTAR_VENDORID	0x1565
516 #define BIOSTAR_8202ID_SUBVENDOR HDA_MODEL_CONSTRUCT(BIOSTAR, 0x8202)
517 
518 /* EPoX Computer Co., Ltd. */
519 #define EPOX_VENDORID		0x1695
520 #define EPOX_400DID_SUBVENDOR	HDA_MODEL_CONSTRUCT(EPOX, 0x400d)
521 #define EPOX_EP5LDA_SUBVENDOR	HDA_MODEL_CONSTRUCT(EPOX, 0x4012)
522 
523 /* AOpen */
524 #define AOPEN_VENDORID	0xa0a0
525 #define AOPEN_I915GMMHFS_SUBVENDOR HDA_MODEL_CONSTRUCT(AOPEN, 0x8202)
526 
527 /* Framework */
528 #define FRAMEWORK_VENDORID	0xf111
529 #define FRAMEWORK_LAPTOP_0001_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0001)
530 #define FRAMEWORK_LAPTOP_0002_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0002)
531 
532 /* All codecs you can eat... */
533 #define HDA_CODEC_CONSTRUCT(vendor, id) \
534 		(((uint32_t)(vendor##_VENDORID) << 16) | ((id) & 0xffff))
535 
536 /* Cirrus Logic */
537 #define CIRRUSLOGIC_VENDORID	0x1013
538 #define HDA_CODEC_CS4206	HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4206)
539 #define HDA_CODEC_CS4207	HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4207)
540 #define HDA_CODEC_CS4210	HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4210)
541 #define HDA_CODEC_CSXXXX	HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0xffff)
542 
543 /* Realtek */
544 #define REALTEK_VENDORID	0x10ec
545 #define HDA_CODEC_ALC215	HDA_CODEC_CONSTRUCT(REALTEK, 0x0215)
546 #define HDA_CODEC_ALC221	HDA_CODEC_CONSTRUCT(REALTEK, 0x0221)
547 #define HDA_CODEC_ALC222	HDA_CODEC_CONSTRUCT(REALTEK, 0x0222)
548 #define HDA_CODEC_ALC225	HDA_CODEC_CONSTRUCT(REALTEK, 0x0225)
549 #define HDA_CODEC_ALC230	HDA_CODEC_CONSTRUCT(REALTEK, 0x0230)
550 #define HDA_CODEC_ALC231	HDA_CODEC_CONSTRUCT(REALTEK, 0x0231)
551 #define HDA_CODEC_ALC233	HDA_CODEC_CONSTRUCT(REALTEK, 0x0233)
552 #define HDA_CODEC_ALC234	HDA_CODEC_CONSTRUCT(REALTEK, 0x0234)
553 #define HDA_CODEC_ALC235	HDA_CODEC_CONSTRUCT(REALTEK, 0x0235)
554 #define HDA_CODEC_ALC236	HDA_CODEC_CONSTRUCT(REALTEK, 0x0236)
555 #define HDA_CODEC_ALC245	HDA_CODEC_CONSTRUCT(REALTEK, 0x0245)
556 #define HDA_CODEC_ALC255	HDA_CODEC_CONSTRUCT(REALTEK, 0x0255)
557 #define HDA_CODEC_ALC256	HDA_CODEC_CONSTRUCT(REALTEK, 0x0256)
558 #define HDA_CODEC_ALC257	HDA_CODEC_CONSTRUCT(REALTEK, 0x0257)
559 #define HDA_CODEC_ALC260	HDA_CODEC_CONSTRUCT(REALTEK, 0x0260)
560 #define HDA_CODEC_ALC262	HDA_CODEC_CONSTRUCT(REALTEK, 0x0262)
561 #define HDA_CODEC_ALC267	HDA_CODEC_CONSTRUCT(REALTEK, 0x0267)
562 #define HDA_CODEC_ALC268	HDA_CODEC_CONSTRUCT(REALTEK, 0x0268)
563 #define HDA_CODEC_ALC269	HDA_CODEC_CONSTRUCT(REALTEK, 0x0269)
564 #define HDA_CODEC_ALC270	HDA_CODEC_CONSTRUCT(REALTEK, 0x0270)
565 #define HDA_CODEC_ALC271	HDA_CODEC_CONSTRUCT(REALTEK, 0x0271)
566 #define HDA_CODEC_ALC272	HDA_CODEC_CONSTRUCT(REALTEK, 0x0272)
567 #define HDA_CODEC_ALC273	HDA_CODEC_CONSTRUCT(REALTEK, 0x0273)
568 #define HDA_CODEC_ALC274	HDA_CODEC_CONSTRUCT(REALTEK, 0x0274)
569 #define HDA_CODEC_ALC275	HDA_CODEC_CONSTRUCT(REALTEK, 0x0275)
570 #define HDA_CODEC_ALC276	HDA_CODEC_CONSTRUCT(REALTEK, 0x0276)
571 #define HDA_CODEC_ALC280	HDA_CODEC_CONSTRUCT(REALTEK, 0x0280)
572 #define HDA_CODEC_ALC282	HDA_CODEC_CONSTRUCT(REALTEK, 0x0282)
573 #define HDA_CODEC_ALC283	HDA_CODEC_CONSTRUCT(REALTEK, 0x0283)
574 #define HDA_CODEC_ALC284	HDA_CODEC_CONSTRUCT(REALTEK, 0x0284)
575 #define HDA_CODEC_ALC285	HDA_CODEC_CONSTRUCT(REALTEK, 0x0285)
576 #define HDA_CODEC_ALC286	HDA_CODEC_CONSTRUCT(REALTEK, 0x0286)
577 #define HDA_CODEC_ALC287	HDA_CODEC_CONSTRUCT(REALTEK, 0x0287)
578 #define HDA_CODEC_ALC288	HDA_CODEC_CONSTRUCT(REALTEK, 0x0288)
579 #define HDA_CODEC_ALC289	HDA_CODEC_CONSTRUCT(REALTEK, 0x0289)
580 #define HDA_CODEC_ALC290	HDA_CODEC_CONSTRUCT(REALTEK, 0x0290)
581 #define HDA_CODEC_ALC292	HDA_CODEC_CONSTRUCT(REALTEK, 0x0292)
582 #define HDA_CODEC_ALC293	HDA_CODEC_CONSTRUCT(REALTEK, 0x0293)
583 #define HDA_CODEC_ALC294	HDA_CODEC_CONSTRUCT(REALTEK, 0x0294)
584 #define HDA_CODEC_ALC295	HDA_CODEC_CONSTRUCT(REALTEK, 0x0295)
585 #define HDA_CODEC_ALC298	HDA_CODEC_CONSTRUCT(REALTEK, 0x0298)
586 #define HDA_CODEC_ALC299	HDA_CODEC_CONSTRUCT(REALTEK, 0x0299)
587 #define HDA_CODEC_ALC300	HDA_CODEC_CONSTRUCT(REALTEK, 0x0300)
588 #define HDA_CODEC_ALC623	HDA_CODEC_CONSTRUCT(REALTEK, 0x0623)
589 #define HDA_CODEC_ALC660	HDA_CODEC_CONSTRUCT(REALTEK, 0x0660)
590 #define HDA_CODEC_ALC662	HDA_CODEC_CONSTRUCT(REALTEK, 0x0662)
591 #define HDA_CODEC_ALC663	HDA_CODEC_CONSTRUCT(REALTEK, 0x0663)
592 #define HDA_CODEC_ALC665	HDA_CODEC_CONSTRUCT(REALTEK, 0x0665)
593 #define HDA_CODEC_ALC670	HDA_CODEC_CONSTRUCT(REALTEK, 0x0670)
594 #define HDA_CODEC_ALC671	HDA_CODEC_CONSTRUCT(REALTEK, 0x0671)
595 #define HDA_CODEC_ALC680	HDA_CODEC_CONSTRUCT(REALTEK, 0x0680)
596 #define HDA_CODEC_ALC700	HDA_CODEC_CONSTRUCT(REALTEK, 0x0700)
597 #define HDA_CODEC_ALC701	HDA_CODEC_CONSTRUCT(REALTEK, 0x0701)
598 #define HDA_CODEC_ALC703	HDA_CODEC_CONSTRUCT(REALTEK, 0x0703)
599 #define HDA_CODEC_ALC861	HDA_CODEC_CONSTRUCT(REALTEK, 0x0861)
600 #define HDA_CODEC_ALC861VD	HDA_CODEC_CONSTRUCT(REALTEK, 0x0862)
601 #define HDA_CODEC_ALC880	HDA_CODEC_CONSTRUCT(REALTEK, 0x0880)
602 #define HDA_CODEC_ALC882	HDA_CODEC_CONSTRUCT(REALTEK, 0x0882)
603 #define HDA_CODEC_ALC883	HDA_CODEC_CONSTRUCT(REALTEK, 0x0883)
604 #define HDA_CODEC_ALC885	HDA_CODEC_CONSTRUCT(REALTEK, 0x0885)
605 #define HDA_CODEC_ALC887	HDA_CODEC_CONSTRUCT(REALTEK, 0x0887)
606 #define HDA_CODEC_ALC888	HDA_CODEC_CONSTRUCT(REALTEK, 0x0888)
607 #define HDA_CODEC_ALC889	HDA_CODEC_CONSTRUCT(REALTEK, 0x0889)
608 #define HDA_CODEC_ALC892	HDA_CODEC_CONSTRUCT(REALTEK, 0x0892)
609 #define HDA_CODEC_ALC897	HDA_CODEC_CONSTRUCT(REALTEK, 0x0897)
610 #define HDA_CODEC_ALC899	HDA_CODEC_CONSTRUCT(REALTEK, 0x0899)
611 #define HDA_CODEC_ALC1150	HDA_CODEC_CONSTRUCT(REALTEK, 0x0900)
612 #define HDA_CODEC_ALCS1200A	HDA_CODEC_CONSTRUCT(REALTEK, 0x0b00)
613 #define HDA_CODEC_ALC1220_1	HDA_CODEC_CONSTRUCT(REALTEK, 0x1168)
614 #define HDA_CODEC_ALC1220	HDA_CODEC_CONSTRUCT(REALTEK, 0x1220)
615 #define HDA_CODEC_ALCXXXX	HDA_CODEC_CONSTRUCT(REALTEK, 0xffff)
616 
617 /* Motorola */
618 #define MOTO_VENDORID		0x1057
619 #define HDA_CODEC_MOTOXXXX	HDA_CODEC_CONSTRUCT(MOTO, 0xffff)
620 
621 /* Creative */
622 #define CREATIVE_VENDORID	0x1102
623 #define HDA_CODEC_CA0110	HDA_CODEC_CONSTRUCT(CREATIVE, 0x000a)
624 #define HDA_CODEC_CA0110_2	HDA_CODEC_CONSTRUCT(CREATIVE, 0x000b)
625 #define HDA_CODEC_SB0880	HDA_CODEC_CONSTRUCT(CREATIVE, 0x000d)
626 #define HDA_CODEC_CA0132	HDA_CODEC_CONSTRUCT(CREATIVE, 0x0011)
627 #define HDA_CODEC_CAXXXX	HDA_CODEC_CONSTRUCT(CREATIVE, 0xffff)
628 
629 /* Analog Devices */
630 #define ANALOGDEVICES_VENDORID	0x11d4
631 #define HDA_CODEC_AD1884A	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x184a)
632 #define HDA_CODEC_AD1882	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1882)
633 #define HDA_CODEC_AD1883	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1883)
634 #define HDA_CODEC_AD1884	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1884)
635 #define HDA_CODEC_AD1984A	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x194a)
636 #define HDA_CODEC_AD1984B	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x194b)
637 #define HDA_CODEC_AD1981HD	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1981)
638 #define HDA_CODEC_AD1983	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1983)
639 #define HDA_CODEC_AD1984	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1984)
640 #define HDA_CODEC_AD1986A	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1986)
641 #define HDA_CODEC_AD1987	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1987)
642 #define HDA_CODEC_AD1988	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1988)
643 #define HDA_CODEC_AD1988B	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x198b)
644 #define HDA_CODEC_AD1882A	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x882a)
645 #define HDA_CODEC_AD1989A	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x989a)
646 #define HDA_CODEC_AD1989B	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x989b)
647 #define HDA_CODEC_ADXXXX	HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0xffff)
648 
649 /* CMedia */
650 #define CMEDIA_VENDORID		0x13f6
651 #define HDA_CODEC_CMI9880	HDA_CODEC_CONSTRUCT(CMEDIA, 0x9880)
652 #define HDA_CODEC_CMIXXXX	HDA_CODEC_CONSTRUCT(CMEDIA, 0xffff)
653 
654 #define CMEDIA2_VENDORID	0x434d
655 #define HDA_CODEC_CMI98802	HDA_CODEC_CONSTRUCT(CMEDIA2, 0x4980)
656 #define HDA_CODEC_CMIXXXX2	HDA_CODEC_CONSTRUCT(CMEDIA2, 0xffff)
657 
658 /* Sigmatel */
659 #define SIGMATEL_VENDORID	0x8384
660 #define HDA_CODEC_STAC9230X	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7612)
661 #define HDA_CODEC_STAC9230D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7613)
662 #define HDA_CODEC_STAC9229X	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7614)
663 #define HDA_CODEC_STAC9229D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7615)
664 #define HDA_CODEC_STAC9228X	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7616)
665 #define HDA_CODEC_STAC9228D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7617)
666 #define HDA_CODEC_STAC9227X	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7618)
667 #define HDA_CODEC_STAC9227D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7619)
668 #define HDA_CODEC_STAC9274	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7620)
669 #define HDA_CODEC_STAC9274D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7621)
670 #define HDA_CODEC_STAC9273X	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7622)
671 #define HDA_CODEC_STAC9273D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7623)
672 #define HDA_CODEC_STAC9272X	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7624)
673 #define HDA_CODEC_STAC9272D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7625)
674 #define HDA_CODEC_STAC9271X	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7626)
675 #define HDA_CODEC_STAC9271D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7627)
676 #define HDA_CODEC_STAC9274X5NH	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7628)
677 #define HDA_CODEC_STAC9274D5NH	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7629)
678 #define HDA_CODEC_STAC9250	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7634)
679 #define HDA_CODEC_STAC9251	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7636)
680 #define HDA_CODEC_IDT92HD700X	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7638)
681 #define HDA_CODEC_IDT92HD700D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7639)
682 #define HDA_CODEC_IDT92HD206X	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7645)
683 #define HDA_CODEC_IDT92HD206D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7646)
684 #define HDA_CODEC_CXD9872RDK	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7661)
685 #define HDA_CODEC_STAC9872AK	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7662)
686 #define HDA_CODEC_CXD9872AKD	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7664)
687 #define HDA_CODEC_STAC9221	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7680)
688 #define HDA_CODEC_STAC922XD	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7681)
689 #define HDA_CODEC_STAC9221_A2	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7682)
690 #define HDA_CODEC_STAC9221D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7683)
691 #define HDA_CODEC_STAC9220	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7690)
692 #define HDA_CODEC_STAC9200D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7691)
693 #define HDA_CODEC_IDT92HD005	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7698)
694 #define HDA_CODEC_IDT92HD005D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7699)
695 #define HDA_CODEC_STAC9205X	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a0)
696 #define HDA_CODEC_STAC9205D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a1)
697 #define HDA_CODEC_STAC9204X	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a2)
698 #define HDA_CODEC_STAC9204D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a3)
699 #define HDA_CODEC_STAC9255	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a4)
700 #define HDA_CODEC_STAC9255D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a5)
701 #define HDA_CODEC_STAC9254	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a6)
702 #define HDA_CODEC_STAC9254D	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a7)
703 #define HDA_CODEC_STAC9220_A2	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7880)
704 #define HDA_CODEC_STAC9220_A1	HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7882)
705 #define HDA_CODEC_STACXXXX	HDA_CODEC_CONSTRUCT(SIGMATEL, 0xffff)
706 
707 /* IDT / Tempo Semiconductor */
708 #define IDT_VENDORID		0x111d
709 #define HDA_CODEC_IDT92HD75BX	HDA_CODEC_CONSTRUCT(IDT, 0x7603)
710 #define HDA_CODEC_IDT92HD83C1X	HDA_CODEC_CONSTRUCT(IDT, 0x7604)
711 #define HDA_CODEC_IDT92HD81B1X	HDA_CODEC_CONSTRUCT(IDT, 0x7605)
712 #define HDA_CODEC_IDT92HD75B3	HDA_CODEC_CONSTRUCT(IDT, 0x7608)
713 #define HDA_CODEC_IDT92HD73D1	HDA_CODEC_CONSTRUCT(IDT, 0x7674)
714 #define HDA_CODEC_IDT92HD73C1	HDA_CODEC_CONSTRUCT(IDT, 0x7675)
715 #define HDA_CODEC_IDT92HD73E1	HDA_CODEC_CONSTRUCT(IDT, 0x7676)
716 #define HDA_CODEC_IDT92HD95B	HDA_CODEC_CONSTRUCT(IDT, 0x7695)
717 #define HDA_CODEC_IDT92HD71B8	HDA_CODEC_CONSTRUCT(IDT, 0x76b0)
718 #define HDA_CODEC_IDT92HD71B8_2	HDA_CODEC_CONSTRUCT(IDT, 0x76b1)
719 #define HDA_CODEC_IDT92HD71B7	HDA_CODEC_CONSTRUCT(IDT, 0x76b2)
720 #define HDA_CODEC_IDT92HD71B7_2	HDA_CODEC_CONSTRUCT(IDT, 0x76b3)
721 #define HDA_CODEC_IDT92HD71B6	HDA_CODEC_CONSTRUCT(IDT, 0x76b4)
722 #define HDA_CODEC_IDT92HD71B6_2	HDA_CODEC_CONSTRUCT(IDT, 0x76b5)
723 #define HDA_CODEC_IDT92HD71B5	HDA_CODEC_CONSTRUCT(IDT, 0x76b6)
724 #define HDA_CODEC_IDT92HD71B5_2	HDA_CODEC_CONSTRUCT(IDT, 0x76b7)
725 #define HDA_CODEC_IDT92HD89C3	HDA_CODEC_CONSTRUCT(IDT, 0x76c0)
726 #define HDA_CODEC_IDT92HD89C2	HDA_CODEC_CONSTRUCT(IDT, 0x76c1)
727 #define HDA_CODEC_IDT92HD89C1	HDA_CODEC_CONSTRUCT(IDT, 0x76c2)
728 #define HDA_CODEC_IDT92HD89B3	HDA_CODEC_CONSTRUCT(IDT, 0x76c3)
729 #define HDA_CODEC_IDT92HD89B2	HDA_CODEC_CONSTRUCT(IDT, 0x76c4)
730 #define HDA_CODEC_IDT92HD89B1	HDA_CODEC_CONSTRUCT(IDT, 0x76c5)
731 #define HDA_CODEC_IDT92HD89E3	HDA_CODEC_CONSTRUCT(IDT, 0x76c6)
732 #define HDA_CODEC_IDT92HD89E2	HDA_CODEC_CONSTRUCT(IDT, 0x76c7)
733 #define HDA_CODEC_IDT92HD89E1	HDA_CODEC_CONSTRUCT(IDT, 0x76c8)
734 #define HDA_CODEC_IDT92HD89D3	HDA_CODEC_CONSTRUCT(IDT, 0x76c9)
735 #define HDA_CODEC_IDT92HD89D2	HDA_CODEC_CONSTRUCT(IDT, 0x76ca)
736 #define HDA_CODEC_IDT92HD89D1	HDA_CODEC_CONSTRUCT(IDT, 0x76cb)
737 #define HDA_CODEC_IDT92HD89F3	HDA_CODEC_CONSTRUCT(IDT, 0x76cc)
738 #define HDA_CODEC_IDT92HD89F2	HDA_CODEC_CONSTRUCT(IDT, 0x76cd)
739 #define HDA_CODEC_IDT92HD89F1	HDA_CODEC_CONSTRUCT(IDT, 0x76ce)
740 #define HDA_CODEC_IDT92HD87B1_3	HDA_CODEC_CONSTRUCT(IDT, 0x76d1)
741 #define HDA_CODEC_IDT92HD83C1C	HDA_CODEC_CONSTRUCT(IDT, 0x76d4)
742 #define HDA_CODEC_IDT92HD81B1C	HDA_CODEC_CONSTRUCT(IDT, 0x76d5)
743 #define HDA_CODEC_IDT92HD87B2_4	HDA_CODEC_CONSTRUCT(IDT, 0x76d9)
744 #define HDA_CODEC_IDT92HD93BXX	HDA_CODEC_CONSTRUCT(IDT, 0x76df)
745 #define HDA_CODEC_IDT92HD91BXX	HDA_CODEC_CONSTRUCT(IDT, 0x76e0)
746 #define HDA_CODEC_IDT92HD98BXX	HDA_CODEC_CONSTRUCT(IDT, 0x76e3)
747 #define HDA_CODEC_IDT92HD99BXX	HDA_CODEC_CONSTRUCT(IDT, 0x76e5)
748 #define HDA_CODEC_IDT92HD90BXX	HDA_CODEC_CONSTRUCT(IDT, 0x76e7)
749 #define HDA_CODEC_IDT92HD66B1X5	HDA_CODEC_CONSTRUCT(IDT, 0x76e8)
750 #define HDA_CODEC_IDT92HD66B2X5	HDA_CODEC_CONSTRUCT(IDT, 0x76e9)
751 #define HDA_CODEC_IDT92HD66B3X5	HDA_CODEC_CONSTRUCT(IDT, 0x76ea)
752 #define HDA_CODEC_IDT92HD66C1X5	HDA_CODEC_CONSTRUCT(IDT, 0x76eb)
753 #define HDA_CODEC_IDT92HD66C2X5	HDA_CODEC_CONSTRUCT(IDT, 0x76ec)
754 #define HDA_CODEC_IDT92HD66C3X5	HDA_CODEC_CONSTRUCT(IDT, 0x76ed)
755 #define HDA_CODEC_IDT92HD66B1X3	HDA_CODEC_CONSTRUCT(IDT, 0x76ee)
756 #define HDA_CODEC_IDT92HD66B2X3	HDA_CODEC_CONSTRUCT(IDT, 0x76ef)
757 #define HDA_CODEC_IDT92HD66B3X3	HDA_CODEC_CONSTRUCT(IDT, 0x76f0)
758 #define HDA_CODEC_IDT92HD66C1X3	HDA_CODEC_CONSTRUCT(IDT, 0x76f1)
759 #define HDA_CODEC_IDT92HD66C2X3	HDA_CODEC_CONSTRUCT(IDT, 0x76f2)
760 #define HDA_CODEC_IDT92HD66C3_65	HDA_CODEC_CONSTRUCT(IDT, 0x76f3)
761 #define HDA_CODEC_IDTXXXX	HDA_CODEC_CONSTRUCT(IDT, 0xffff)
762 
763 /* Silicon Image */
764 #define SII_VENDORID	0x1095
765 #define HDA_CODEC_SII1390	HDA_CODEC_CONSTRUCT(SII, 0x1390)
766 #define HDA_CODEC_SII1392	HDA_CODEC_CONSTRUCT(SII, 0x1392)
767 #define HDA_CODEC_SIIXXXX	HDA_CODEC_CONSTRUCT(SII, 0xffff)
768 
769 /* Lucent/Agere */
770 #define AGERE_VENDORID	0x11c1
771 #define HDA_CODEC_AGEREXXXX	HDA_CODEC_CONSTRUCT(AGERE, 0xffff)
772 
773 /* Conexant */
774 #define CONEXANT_VENDORID	0x14f1
775 #define HDA_CODEC_CX20549	HDA_CODEC_CONSTRUCT(CONEXANT, 0x5045)
776 #define HDA_CODEC_CX20551	HDA_CODEC_CONSTRUCT(CONEXANT, 0x5047)
777 #define HDA_CODEC_CX20561	HDA_CODEC_CONSTRUCT(CONEXANT, 0x5051)
778 #define HDA_CODEC_CX20582	HDA_CODEC_CONSTRUCT(CONEXANT, 0x5066)
779 #define HDA_CODEC_CX20583	HDA_CODEC_CONSTRUCT(CONEXANT, 0x5067)
780 #define HDA_CODEC_CX20584	HDA_CODEC_CONSTRUCT(CONEXANT, 0x5068)
781 #define HDA_CODEC_CX20585	HDA_CODEC_CONSTRUCT(CONEXANT, 0x5069)
782 #define HDA_CODEC_CX20588	HDA_CODEC_CONSTRUCT(CONEXANT, 0x506c)
783 #define HDA_CODEC_CX20590	HDA_CODEC_CONSTRUCT(CONEXANT, 0x506e)
784 #define HDA_CODEC_CX20631	HDA_CODEC_CONSTRUCT(CONEXANT, 0x5097)
785 #define HDA_CODEC_CX20632	HDA_CODEC_CONSTRUCT(CONEXANT, 0x5098)
786 #define HDA_CODEC_CX20641	HDA_CODEC_CONSTRUCT(CONEXANT, 0x50a1)
787 #define HDA_CODEC_CX20642	HDA_CODEC_CONSTRUCT(CONEXANT, 0x50a2)
788 #define HDA_CODEC_CX20651	HDA_CODEC_CONSTRUCT(CONEXANT, 0x50ab)
789 #define HDA_CODEC_CX20652	HDA_CODEC_CONSTRUCT(CONEXANT, 0x50ac)
790 #define HDA_CODEC_CX20664	HDA_CODEC_CONSTRUCT(CONEXANT, 0x50b8)
791 #define HDA_CODEC_CX20665	HDA_CODEC_CONSTRUCT(CONEXANT, 0x50b9)
792 #define HDA_CODEC_CX21722	HDA_CODEC_CONSTRUCT(CONEXANT, 0x50f1)
793 #define HDA_CODEC_CX20722	HDA_CODEC_CONSTRUCT(CONEXANT, 0x50f2)
794 #define HDA_CODEC_CX21724	HDA_CODEC_CONSTRUCT(CONEXANT, 0x50f3)
795 #define HDA_CODEC_CX20724	HDA_CODEC_CONSTRUCT(CONEXANT, 0x50f4)
796 #define HDA_CODEC_CX20751	HDA_CODEC_CONSTRUCT(CONEXANT, 0x510f)
797 #define HDA_CODEC_CX20751_2	HDA_CODEC_CONSTRUCT(CONEXANT, 0x5110)
798 #define HDA_CODEC_CX20753	HDA_CODEC_CONSTRUCT(CONEXANT, 0x5111)
799 #define HDA_CODEC_CX20755	HDA_CODEC_CONSTRUCT(CONEXANT, 0x5113)
800 #define HDA_CODEC_CX20756	HDA_CODEC_CONSTRUCT(CONEXANT, 0x5114)
801 #define HDA_CODEC_CX20757	HDA_CODEC_CONSTRUCT(CONEXANT, 0x5115)
802 #define HDA_CODEC_CX20952	HDA_CODEC_CONSTRUCT(CONEXANT, 0x51d7)
803 #define HDA_CODEC_CXXXXX	HDA_CODEC_CONSTRUCT(CONEXANT, 0xffff)
804 
805 /* VIA */
806 #define HDA_CODEC_VT1708_8	HDA_CODEC_CONSTRUCT(VIA, 0x1708)
807 #define HDA_CODEC_VT1708_9	HDA_CODEC_CONSTRUCT(VIA, 0x1709)
808 #define HDA_CODEC_VT1708_A	HDA_CODEC_CONSTRUCT(VIA, 0x170a)
809 #define HDA_CODEC_VT1708_B	HDA_CODEC_CONSTRUCT(VIA, 0x170b)
810 #define HDA_CODEC_VT1709_0	HDA_CODEC_CONSTRUCT(VIA, 0xe710)
811 #define HDA_CODEC_VT1709_1	HDA_CODEC_CONSTRUCT(VIA, 0xe711)
812 #define HDA_CODEC_VT1709_2	HDA_CODEC_CONSTRUCT(VIA, 0xe712)
813 #define HDA_CODEC_VT1709_3	HDA_CODEC_CONSTRUCT(VIA, 0xe713)
814 #define HDA_CODEC_VT1709_4	HDA_CODEC_CONSTRUCT(VIA, 0xe714)
815 #define HDA_CODEC_VT1709_5	HDA_CODEC_CONSTRUCT(VIA, 0xe715)
816 #define HDA_CODEC_VT1709_6	HDA_CODEC_CONSTRUCT(VIA, 0xe716)
817 #define HDA_CODEC_VT1709_7	HDA_CODEC_CONSTRUCT(VIA, 0xe717)
818 #define HDA_CODEC_VT1708B_0	HDA_CODEC_CONSTRUCT(VIA, 0xe720)
819 #define HDA_CODEC_VT1708B_1	HDA_CODEC_CONSTRUCT(VIA, 0xe721)
820 #define HDA_CODEC_VT1708B_2	HDA_CODEC_CONSTRUCT(VIA, 0xe722)
821 #define HDA_CODEC_VT1708B_3	HDA_CODEC_CONSTRUCT(VIA, 0xe723)
822 #define HDA_CODEC_VT1708B_4	HDA_CODEC_CONSTRUCT(VIA, 0xe724)
823 #define HDA_CODEC_VT1708B_5	HDA_CODEC_CONSTRUCT(VIA, 0xe725)
824 #define HDA_CODEC_VT1708B_6	HDA_CODEC_CONSTRUCT(VIA, 0xe726)
825 #define HDA_CODEC_VT1708B_7	HDA_CODEC_CONSTRUCT(VIA, 0xe727)
826 #define HDA_CODEC_VT1708S_0	HDA_CODEC_CONSTRUCT(VIA, 0x0397)
827 #define HDA_CODEC_VT1708S_1	HDA_CODEC_CONSTRUCT(VIA, 0x1397)
828 #define HDA_CODEC_VT1708S_2	HDA_CODEC_CONSTRUCT(VIA, 0x2397)
829 #define HDA_CODEC_VT1708S_3	HDA_CODEC_CONSTRUCT(VIA, 0x3397)
830 #define HDA_CODEC_VT1708S_4	HDA_CODEC_CONSTRUCT(VIA, 0x4397)
831 #define HDA_CODEC_VT1708S_5	HDA_CODEC_CONSTRUCT(VIA, 0x5397)
832 #define HDA_CODEC_VT1708S_6	HDA_CODEC_CONSTRUCT(VIA, 0x6397)
833 #define HDA_CODEC_VT1708S_7	HDA_CODEC_CONSTRUCT(VIA, 0x7397)
834 #define HDA_CODEC_VT1702_0	HDA_CODEC_CONSTRUCT(VIA, 0x0398)
835 #define HDA_CODEC_VT1702_1	HDA_CODEC_CONSTRUCT(VIA, 0x1398)
836 #define HDA_CODEC_VT1702_2	HDA_CODEC_CONSTRUCT(VIA, 0x2398)
837 #define HDA_CODEC_VT1702_3	HDA_CODEC_CONSTRUCT(VIA, 0x3398)
838 #define HDA_CODEC_VT1702_4	HDA_CODEC_CONSTRUCT(VIA, 0x4398)
839 #define HDA_CODEC_VT1702_5	HDA_CODEC_CONSTRUCT(VIA, 0x5398)
840 #define HDA_CODEC_VT1702_6	HDA_CODEC_CONSTRUCT(VIA, 0x6398)
841 #define HDA_CODEC_VT1702_7	HDA_CODEC_CONSTRUCT(VIA, 0x7398)
842 #define HDA_CODEC_VT1716S_0	HDA_CODEC_CONSTRUCT(VIA, 0x0433)
843 #define HDA_CODEC_VT1716S_1	HDA_CODEC_CONSTRUCT(VIA, 0xa721)
844 #define HDA_CODEC_VT1718S_0	HDA_CODEC_CONSTRUCT(VIA, 0x0428)
845 #define HDA_CODEC_VT1718S_1	HDA_CODEC_CONSTRUCT(VIA, 0x4428)
846 #define HDA_CODEC_VT1802_0	HDA_CODEC_CONSTRUCT(VIA, 0x0446)
847 #define HDA_CODEC_VT1802_1	HDA_CODEC_CONSTRUCT(VIA, 0x8446)
848 #define HDA_CODEC_VT1812	HDA_CODEC_CONSTRUCT(VIA, 0x0448)
849 #define HDA_CODEC_VT1818S	HDA_CODEC_CONSTRUCT(VIA, 0x0440)
850 #define HDA_CODEC_VT1828S	HDA_CODEC_CONSTRUCT(VIA, 0x4441)
851 #define HDA_CODEC_VT2002P_0	HDA_CODEC_CONSTRUCT(VIA, 0x0438)
852 #define HDA_CODEC_VT2002P_1	HDA_CODEC_CONSTRUCT(VIA, 0x4438)
853 #define HDA_CODEC_VT2020	HDA_CODEC_CONSTRUCT(VIA, 0x0441)
854 #define HDA_CODEC_VTXXXX	HDA_CODEC_CONSTRUCT(VIA, 0xffff)
855 
856 /* VMware */
857 #define HDA_CODEC_VMWARE	HDA_CODEC_CONSTRUCT(VMWARE, 0x1975)
858 #define HDA_CODEC_VMWAREXXXX	HDA_CODEC_CONSTRUCT(VMWARE, 0xffff)
859 
860 /* ATI */
861 #define HDA_CODEC_ATIRS600_1	HDA_CODEC_CONSTRUCT(ATI, 0x793c)
862 #define HDA_CODEC_ATIRS600_2	HDA_CODEC_CONSTRUCT(ATI, 0x7919)
863 #define HDA_CODEC_ATIRS690	HDA_CODEC_CONSTRUCT(ATI, 0x791a)
864 #define HDA_CODEC_ATIR6XX	HDA_CODEC_CONSTRUCT(ATI, 0xaa01)
865 #define HDA_CODEC_ATIXXXX	HDA_CODEC_CONSTRUCT(ATI, 0xffff)
866 
867 /* NVIDIA */
868 #define HDA_CODEC_NVIDIAMCP78	HDA_CODEC_CONSTRUCT(NVIDIA, 0x0002)
869 #define HDA_CODEC_NVIDIAMCP78_2	HDA_CODEC_CONSTRUCT(NVIDIA, 0x0003)
870 #define HDA_CODEC_NVIDIAMCP78_3	HDA_CODEC_CONSTRUCT(NVIDIA, 0x0005)
871 #define HDA_CODEC_NVIDIAMCP78_4	HDA_CODEC_CONSTRUCT(NVIDIA, 0x0006)
872 #define HDA_CODEC_NVIDIAMCP7A	HDA_CODEC_CONSTRUCT(NVIDIA, 0x0007)
873 #define HDA_CODEC_NVIDIAGT220	HDA_CODEC_CONSTRUCT(NVIDIA, 0x000a)
874 #define HDA_CODEC_NVIDIAGT21X	HDA_CODEC_CONSTRUCT(NVIDIA, 0x000b)
875 #define HDA_CODEC_NVIDIAMCP89	HDA_CODEC_CONSTRUCT(NVIDIA, 0x000c)
876 #define HDA_CODEC_NVIDIAGT240	HDA_CODEC_CONSTRUCT(NVIDIA, 0x000d)
877 #define HDA_CODEC_NVIDIAGTS450	HDA_CODEC_CONSTRUCT(NVIDIA, 0x0011)
878 #define HDA_CODEC_NVIDIAGT440	HDA_CODEC_CONSTRUCT(NVIDIA, 0x0014)
879 #define HDA_CODEC_NVIDIAGTX550	HDA_CODEC_CONSTRUCT(NVIDIA, 0x0015)
880 #define HDA_CODEC_NVIDIAGTX570	HDA_CODEC_CONSTRUCT(NVIDIA, 0x0018)
881 #define HDA_CODEC_NVIDIATEGRA30	HDA_CODEC_CONSTRUCT(NVIDIA, 0x0020)
882 #define HDA_CODEC_NVIDIATEGRA114 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0022)
883 #define HDA_CODEC_NVIDIATEGRA124 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0028)
884 #define HDA_CODEC_NVIDIATEGRA210 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0029)
885 #define HDA_CODEC_NVIDIAMCP67	HDA_CODEC_CONSTRUCT(NVIDIA, 0x0067)
886 #define HDA_CODEC_NVIDIAGM204	HDA_CODEC_CONSTRUCT(NVIDIA, 0x0071)
887 #define HDA_CODEC_NVIDIAMCP73	HDA_CODEC_CONSTRUCT(NVIDIA, 0x8001)
888 #define HDA_CODEC_NVIDIAXXXX	HDA_CODEC_CONSTRUCT(NVIDIA, 0xffff)
889 
890 /* Chrontel */
891 #define CHRONTEL_VENDORID	0x17e8
892 #define HDA_CODEC_CHXXXX	HDA_CODEC_CONSTRUCT(CHRONTEL, 0xffff)
893 
894 /* INTEL */
895 #define HDA_CODEC_INTELIP	HDA_CODEC_CONSTRUCT(INTEL, 0x0054)
896 #define HDA_CODEC_INTELGMLK	HDA_CODEC_CONSTRUCT(INTEL, 0x2800)
897 #define HDA_CODEC_INTELBL	HDA_CODEC_CONSTRUCT(INTEL, 0x2801)
898 #define HDA_CODEC_INTELCA	HDA_CODEC_CONSTRUCT(INTEL, 0x2802)
899 #define HDA_CODEC_INTELEL	HDA_CODEC_CONSTRUCT(INTEL, 0x2803)
900 #define HDA_CODEC_INTELIP2	HDA_CODEC_CONSTRUCT(INTEL, 0x2804)
901 #define HDA_CODEC_INTELCPT	HDA_CODEC_CONSTRUCT(INTEL, 0x2805)
902 #define HDA_CODEC_INTELPPT	HDA_CODEC_CONSTRUCT(INTEL, 0x2806)
903 #define HDA_CODEC_INTELHSW	HDA_CODEC_CONSTRUCT(INTEL, 0x2807)
904 #define HDA_CODEC_INTELBDW	HDA_CODEC_CONSTRUCT(INTEL, 0x2808)
905 #define HDA_CODEC_INTELSKLK	HDA_CODEC_CONSTRUCT(INTEL, 0x2809)
906 #define HDA_CODEC_INTELBXTN	HDA_CODEC_CONSTRUCT(INTEL, 0x280a)
907 #define HDA_CODEC_INTELKBLK	HDA_CODEC_CONSTRUCT(INTEL, 0x280b)
908 #define HDA_CODEC_INTELCNLK	HDA_CODEC_CONSTRUCT(INTEL, 0x280c)
909 #define HDA_CODEC_INTELGMLK1	HDA_CODEC_CONSTRUCT(INTEL, 0x280d)
910 #define HDA_CODEC_INTELICLK	HDA_CODEC_CONSTRUCT(INTEL, 0x280f)
911 #define HDA_CODEC_INTELTGLK	HDA_CODEC_CONSTRUCT(INTEL, 0x2812)
912 #define HDA_CODEC_INTELTGLKH	HDA_CODEC_CONSTRUCT(INTEL, 0x2814)
913 #define HDA_CODEC_INTELALLK	HDA_CODEC_CONSTRUCT(INTEL, 0x2815)
914 #define HDA_CODEC_INTELJLK	HDA_CODEC_CONSTRUCT(INTEL, 0x281a)
915 #define HDA_CODEC_INTELELLK	HDA_CODEC_CONSTRUCT(INTEL, 0x281b)
916 #define HDA_CODEC_INTELCT	HDA_CODEC_CONSTRUCT(INTEL, 0x2880)
917 #define HDA_CODEC_INTELVV2	HDA_CODEC_CONSTRUCT(INTEL, 0x2882)
918 #define HDA_CODEC_INTELBR	HDA_CODEC_CONSTRUCT(INTEL, 0x2883)
919 #define HDA_CODEC_INTELCL	HDA_CODEC_CONSTRUCT(INTEL, 0x29fb)
920 #define HDA_CODEC_INTELXXXX	HDA_CODEC_CONSTRUCT(INTEL, 0xffff)
921 
922 /****************************************************************************
923  * Helper Macros
924  ****************************************************************************/
925 
926 #define HDA_DMA_ALIGNMENT	128
927 
928 #define HDA_BDL_MIN		2
929 #define HDA_BDL_MAX		256
930 #define HDA_BDL_DEFAULT		HDA_BDL_MIN
931 
932 #define HDA_BLK_MIN		HDA_DMA_ALIGNMENT
933 #define HDA_BLK_ALIGN		(~(HDA_BLK_MIN - 1))
934 
935 #define HDA_BUFSZ_MIN		(HDA_BDL_MIN * HDA_BLK_MIN)
936 #define HDA_BUFSZ_MAX		262144
937 #define HDA_BUFSZ_DEFAULT	65536
938 
939 #define HDA_GPIO_MAX		8
940 
941 #define HDA_DEV_MATCH(fl, v)	((fl) == (v) || \
942 				(fl) == 0xffffffff || \
943 				(((fl) & 0xffff0000) == 0xffff0000 && \
944 				((fl) & 0x0000ffff) == ((v) & 0x0000ffff)) || \
945 				(((fl) & 0x0000ffff) == 0x0000ffff && \
946 				((fl) & 0xffff0000) == ((v) & 0xffff0000)))
947 #define HDA_MATCH_ALL		0xffffffff
948 #define HDA_INVALID		0xffffffff
949 
950 #define HDA_BOOTVERBOSE(stmt)	do {			\
951 	if (bootverbose != 0 || snd_verbose > 3) {	\
952 		stmt					\
953 	}						\
954 } while (0)
955 
956 #define HDA_BOOTHVERBOSE(stmt)	do {			\
957 	if (snd_verbose > 3) {				\
958 		stmt					\
959 	}						\
960 } while (0)
961 
962 #define hda_command(dev, verb)					\
963     HDAC_CODEC_COMMAND(device_get_parent(dev), (dev), (verb))
964 
965 typedef int nid_t;
966 
967 /****************************************************************************
968  * Simplified Accessors for HDA devices
969  ****************************************************************************/
970 
971 enum hdac_device_ivars {
972     HDA_IVAR_CODEC_ID,
973     HDA_IVAR_NODE_ID,
974     HDA_IVAR_VENDOR_ID,
975     HDA_IVAR_DEVICE_ID,
976     HDA_IVAR_REVISION_ID,
977     HDA_IVAR_STEPPING_ID,
978     HDA_IVAR_SUBVENDOR_ID,
979     HDA_IVAR_SUBDEVICE_ID,
980     HDA_IVAR_SUBSYSTEM_ID,
981     HDA_IVAR_NODE_TYPE,
982     HDA_IVAR_DMA_NOCACHE,
983     HDA_IVAR_STRIPES_MASK,
984 };
985 
986 #define HDA_ACCESSOR(var, ivar, type)					\
987     __BUS_ACCESSOR(hda, var, HDA, ivar, type)
988 
989 HDA_ACCESSOR(codec_id,		CODEC_ID,	uint8_t);
990 HDA_ACCESSOR(node_id,		NODE_ID,	uint8_t);
991 HDA_ACCESSOR(vendor_id,		VENDOR_ID,	uint16_t);
992 HDA_ACCESSOR(device_id,		DEVICE_ID,	uint16_t);
993 HDA_ACCESSOR(revision_id,	REVISION_ID,	uint8_t);
994 HDA_ACCESSOR(stepping_id,	STEPPING_ID,	uint8_t);
995 HDA_ACCESSOR(subvendor_id,	SUBVENDOR_ID,	uint16_t);
996 HDA_ACCESSOR(subdevice_id,	SUBDEVICE_ID,	uint16_t);
997 HDA_ACCESSOR(subsystem_id,	SUBSYSTEM_ID,	uint32_t);
998 HDA_ACCESSOR(node_type,		NODE_TYPE,	uint8_t);
999 HDA_ACCESSOR(dma_nocache,	DMA_NOCACHE,	uint8_t);
1000 HDA_ACCESSOR(stripes_mask,	STRIPES_MASK,	uint8_t);
1001 
1002 #define PCIS_MULTIMEDIA_HDA    0x03
1003 
1004 #endif
1005