19e7647b5SLucas Tanure // SPDX-License-Identifier: GPL-2.0-only
29e7647b5SLucas Tanure /*
39e7647b5SLucas Tanure  * patch_cs8409-tables.c  --  HD audio interface patch for Cirrus Logic CS8409 HDA bridge chip
49e7647b5SLucas Tanure  *
59e7647b5SLucas Tanure  * Copyright (C) 2021 Cirrus Logic, Inc. and
69e7647b5SLucas Tanure  *                    Cirrus Logic International Semiconductor Ltd.
79e7647b5SLucas Tanure  *
89e7647b5SLucas Tanure  * Author: Lucas Tanure <tanureal@opensource.cirrus.com>
99e7647b5SLucas Tanure  */
109e7647b5SLucas Tanure 
119e7647b5SLucas Tanure #include "patch_cs8409.h"
129e7647b5SLucas Tanure 
13b2a88774SLucas Tanure /******************************************************************************
14b2a88774SLucas Tanure  *                          CS42L42 Specific Data
15b2a88774SLucas Tanure  *
16b2a88774SLucas Tanure  ******************************************************************************/
17b2a88774SLucas Tanure 
18636eb9d2SLucas Tanure static const DECLARE_TLV_DB_SCALE(cs42l42_dac_db_scale, CS42L42_HP_VOL_REAL_MIN * 100, 100, 1);
19b2a88774SLucas Tanure 
20636eb9d2SLucas Tanure static const DECLARE_TLV_DB_SCALE(cs42l42_adc_db_scale, CS42L42_AMIC_VOL_REAL_MIN * 100, 100, 1);
21b2a88774SLucas Tanure 
22b2a88774SLucas Tanure const struct snd_kcontrol_new cs42l42_dac_volume_mixer = {
23b2a88774SLucas Tanure 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
24b2a88774SLucas Tanure 	.index = 0,
25b2a88774SLucas Tanure 	.subdevice = (HDA_SUBDEV_AMP_FLAG | HDA_SUBDEV_NID_FLAG),
26b2a88774SLucas Tanure 	.access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ),
27636eb9d2SLucas Tanure 	.info = cs42l42_volume_info,
28636eb9d2SLucas Tanure 	.get = cs42l42_volume_get,
29636eb9d2SLucas Tanure 	.put = cs42l42_volume_put,
30b2a88774SLucas Tanure 	.tlv = { .p = cs42l42_dac_db_scale },
3124f7ac3dSLucas Tanure 	.private_value = HDA_COMPOSE_AMP_VAL_OFS(CS8409_PIN_ASP1_TRANSMITTER_A, 3, CS8409_CODEC0,
32b2a88774SLucas Tanure 			 HDA_OUTPUT, CS42L42_VOL_DAC) | HDA_AMP_VAL_MIN_MUTE
33b2a88774SLucas Tanure };
34b2a88774SLucas Tanure 
35b2a88774SLucas Tanure const struct snd_kcontrol_new cs42l42_adc_volume_mixer = {
36b2a88774SLucas Tanure 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
37b2a88774SLucas Tanure 	.index = 0,
38b2a88774SLucas Tanure 	.subdevice = (HDA_SUBDEV_AMP_FLAG | HDA_SUBDEV_NID_FLAG),
39b2a88774SLucas Tanure 	.access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ),
40636eb9d2SLucas Tanure 	.info = cs42l42_volume_info,
41636eb9d2SLucas Tanure 	.get = cs42l42_volume_get,
42636eb9d2SLucas Tanure 	.put = cs42l42_volume_put,
43b2a88774SLucas Tanure 	.tlv = { .p = cs42l42_adc_db_scale },
4424f7ac3dSLucas Tanure 	.private_value = HDA_COMPOSE_AMP_VAL_OFS(CS8409_PIN_ASP1_RECEIVER_A, 1, CS8409_CODEC0,
45b2a88774SLucas Tanure 			 HDA_INPUT, CS42L42_VOL_ADC) | HDA_AMP_VAL_MIN_MUTE
46b2a88774SLucas Tanure };
47b2a88774SLucas Tanure 
4824f7ac3dSLucas Tanure /******************************************************************************
4924f7ac3dSLucas Tanure  *                   BULLSEYE / WARLOCK / CYBORG Specific Arrays
5024f7ac3dSLucas Tanure  *                               CS8409/CS42L42
5124f7ac3dSLucas Tanure  ******************************************************************************/
529e7647b5SLucas Tanure 
539e7647b5SLucas Tanure const struct hda_verb cs8409_cs42l42_init_verbs[] = {
54ccff0064SStefan Binding 	{ CS8409_PIN_AFG, AC_VERB_SET_GPIO_WAKE_MASK, 0x0018 },		/* WAKE from GPIO 3,4 */
55ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, AC_VERB_SET_PROC_STATE, 0x0001 },	/* Enable VPW processing */
56ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, AC_VERB_SET_COEF_INDEX, 0x0002 },	/* Configure GPIO 6,7 */
57ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, AC_VERB_SET_PROC_COEF,  0x0080 },	/* I2C mode */
58ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, AC_VERB_SET_COEF_INDEX, 0x005b },	/* Set I2C bus speed */
59ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, AC_VERB_SET_PROC_COEF,  0x0200 },	/* 100kHz I2C_STO = 2 */
609e7647b5SLucas Tanure 	{} /* terminator */
619e7647b5SLucas Tanure };
629e7647b5SLucas Tanure 
639e7647b5SLucas Tanure const struct hda_pintbl cs8409_cs42l42_pincfgs[] = {
64ccff0064SStefan Binding 	{ CS8409_PIN_ASP1_TRANSMITTER_A, 0x042120f0 },	/* ASP-1-TX */
65ccff0064SStefan Binding 	{ CS8409_PIN_ASP1_RECEIVER_A, 0x04a12050 },	/* ASP-1-RX */
66ccff0064SStefan Binding 	{ CS8409_PIN_ASP2_TRANSMITTER_A, 0x901000f0 },	/* ASP-2-TX */
67ccff0064SStefan Binding 	{ CS8409_PIN_DMIC1_IN, 0x90a00090 },		/* DMIC-1 */
689e7647b5SLucas Tanure 	{} /* terminator */
699e7647b5SLucas Tanure };
709e7647b5SLucas Tanure 
719e7647b5SLucas Tanure /* Vendor specific HW configuration for CS42L42 */
7224f7ac3dSLucas Tanure static const struct cs8409_i2c_param cs42l42_init_reg_seq[] = {
739e7647b5SLucas Tanure 	{ 0x1010, 0xB0 },
749e7647b5SLucas Tanure 	{ 0x1D01, 0x00 },
759e7647b5SLucas Tanure 	{ 0x1D02, 0x06 },
769e7647b5SLucas Tanure 	{ 0x1D03, 0x00 },
779e7647b5SLucas Tanure 	{ 0x1107, 0x01 },
789e7647b5SLucas Tanure 	{ 0x1009, 0x02 },
799e7647b5SLucas Tanure 	{ 0x1007, 0x03 },
809e7647b5SLucas Tanure 	{ 0x1201, 0x00 },
819e7647b5SLucas Tanure 	{ 0x1208, 0x13 },
829e7647b5SLucas Tanure 	{ 0x1205, 0xFF },
839e7647b5SLucas Tanure 	{ 0x1206, 0x00 },
849e7647b5SLucas Tanure 	{ 0x1207, 0x20 },
859e7647b5SLucas Tanure 	{ 0x1202, 0x0D },
869e7647b5SLucas Tanure 	{ 0x2A02, 0x02 },
879e7647b5SLucas Tanure 	{ 0x2A03, 0x00 },
889e7647b5SLucas Tanure 	{ 0x2A04, 0x00 },
899e7647b5SLucas Tanure 	{ 0x2A05, 0x02 },
909e7647b5SLucas Tanure 	{ 0x2A06, 0x00 },
919e7647b5SLucas Tanure 	{ 0x2A07, 0x20 },
929e7647b5SLucas Tanure 	{ 0x2A08, 0x02 },
939e7647b5SLucas Tanure 	{ 0x2A09, 0x00 },
949e7647b5SLucas Tanure 	{ 0x2A0A, 0x80 },
959e7647b5SLucas Tanure 	{ 0x2A0B, 0x02 },
969e7647b5SLucas Tanure 	{ 0x2A0C, 0x00 },
979e7647b5SLucas Tanure 	{ 0x2A0D, 0xA0 },
989e7647b5SLucas Tanure 	{ 0x2A01, 0x0C },
999e7647b5SLucas Tanure 	{ 0x2902, 0x01 },
1009e7647b5SLucas Tanure 	{ 0x2903, 0x02 },
1019e7647b5SLucas Tanure 	{ 0x2904, 0x00 },
1029e7647b5SLucas Tanure 	{ 0x2905, 0x00 },
1039e7647b5SLucas Tanure 	{ 0x2901, 0x01 },
1049e7647b5SLucas Tanure 	{ 0x1101, 0x0A },
1059e7647b5SLucas Tanure 	{ 0x1102, 0x84 },
1069e7647b5SLucas Tanure 	{ 0x2301, 0x00 },
1079e7647b5SLucas Tanure 	{ 0x2303, 0x00 },
1089e7647b5SLucas Tanure 	{ 0x2302, 0x3f },
1099e7647b5SLucas Tanure 	{ 0x2001, 0x03 },
1109e7647b5SLucas Tanure 	{ 0x1B75, 0xB6 },
1119e7647b5SLucas Tanure 	{ 0x1B73, 0xC2 },
1129e7647b5SLucas Tanure 	{ 0x1129, 0x01 },
1139e7647b5SLucas Tanure 	{ 0x1121, 0xF3 },
1149e7647b5SLucas Tanure 	{ 0x1103, 0x20 },
1159e7647b5SLucas Tanure 	{ 0x1105, 0x00 },
1161f03db68SStefan Binding 	{ 0x1112, 0x00 },
1179e7647b5SLucas Tanure 	{ 0x1113, 0x80 },
1189e7647b5SLucas Tanure 	{ 0x1C03, 0xC0 },
1199e7647b5SLucas Tanure 	{ 0x1101, 0x02 },
120cab82a22SStefan Binding 	{ 0x1316, 0xff },
121cab82a22SStefan Binding 	{ 0x1317, 0xff },
122cab82a22SStefan Binding 	{ 0x1318, 0xff },
123cab82a22SStefan Binding 	{ 0x1319, 0xff },
124cab82a22SStefan Binding 	{ 0x131a, 0xff },
125cab82a22SStefan Binding 	{ 0x131b, 0xff },
126cab82a22SStefan Binding 	{ 0x131c, 0xff },
127cab82a22SStefan Binding 	{ 0x131e, 0xff },
128cab82a22SStefan Binding 	{ 0x131f, 0xff },
129cab82a22SStefan Binding 	{ 0x1320, 0xff },
130cab82a22SStefan Binding 	{ 0x1b79, 0xff },
131cab82a22SStefan Binding 	{ 0x1b7a, 0xff },
1329e7647b5SLucas Tanure };
1339e7647b5SLucas Tanure 
1349e7647b5SLucas Tanure /* Vendor specific hw configuration for CS8409 */
1359e7647b5SLucas Tanure const struct cs8409_cir_param cs8409_cs42l42_hw_cfg[] = {
136ccff0064SStefan Binding 	/* +PLL1/2_EN, +I2C_EN */
137ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_DEV_CFG1, 0xb008 },
138ccff0064SStefan Binding 	/* ASP1/2_EN=0, ASP1_STP=1 */
139ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_DEV_CFG2, 0x0002 },
140ccff0064SStefan Binding 	/* ASP1/2_BUS_IDLE=10, +GPIO_I2C */
141ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_DEV_CFG3, 0x0a80 },
142ccff0064SStefan Binding 	/* ASP1.A: TX.LAP=0, TX.LSZ=24 bits, TX.LCS=0 */
143ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, ASP1_A_TX_CTRL1, 0x0800 },
144ccff0064SStefan Binding 	/* ASP1.A: TX.RAP=0, TX.RSZ=24 bits, TX.RCS=32 */
145ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, ASP1_A_TX_CTRL2, 0x0820 },
146ccff0064SStefan Binding 	/* ASP2.A: TX.LAP=0, TX.LSZ=24 bits, TX.LCS=0 */
147ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, ASP2_A_TX_CTRL1, 0x0800 },
148ccff0064SStefan Binding 	/* ASP2.A: TX.RAP=1, TX.RSZ=24 bits, TX.RCS=0 */
149ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, ASP2_A_TX_CTRL2, 0x2800 },
150ccff0064SStefan Binding 	/* ASP1.A: RX.LAP=0, RX.LSZ=24 bits, RX.LCS=0 */
151ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, ASP1_A_RX_CTRL1, 0x0800 },
152ccff0064SStefan Binding 	/* ASP1.A: RX.RAP=0, RX.RSZ=24 bits, RX.RCS=0 */
153ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, ASP1_A_RX_CTRL2, 0x0800 },
154ccff0064SStefan Binding 	/* ASP1: LCHI = 00h */
155ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_ASP1_CLK_CTRL1, 0x8000 },
156ccff0064SStefan Binding 	/* ASP1: MC/SC_SRCSEL=PLL1, LCPR=FFh */
157ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_ASP1_CLK_CTRL2, 0x28ff },
158ccff0064SStefan Binding 	/* ASP1: MCEN=0, FSD=011, SCPOL_IN/OUT=0, SCDIV=1:4 */
159ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_ASP1_CLK_CTRL3, 0x0062 },
160ccff0064SStefan Binding 	/* ASP2: LCHI=1Fh */
161ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_ASP2_CLK_CTRL1, 0x801f },
162ccff0064SStefan Binding 	/* ASP2: MC/SC_SRCSEL=PLL1, LCPR=3Fh */
163ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_ASP2_CLK_CTRL2, 0x283f },
164ccff0064SStefan Binding 	/* ASP2: 5050=1, MCEN=0, FSD=010, SCPOL_IN/OUT=1, SCDIV=1:16 */
165ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_ASP2_CLK_CTRL3, 0x805c },
166ccff0064SStefan Binding 	/* DMIC1_MO=10b, DMIC1/2_SR=1 */
167ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_DMIC_CFG, 0x0023 },
168ccff0064SStefan Binding 	/* ASP1/2_BEEP=0 */
169ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_BEEP_CFG, 0x0000 },
170ccff0064SStefan Binding 	/* ASP1/2_EN=1, ASP1_STP=1 */
171ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_DEV_CFG2, 0x0062 },
172ccff0064SStefan Binding 	/* -PLL2_EN */
173ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_DEV_CFG1, 0x9008 },
174ccff0064SStefan Binding 	/* TX2.A: pre-scale att.=0 dB */
175ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PRE_SCALE_ATTN2, 0x0000 },
176ccff0064SStefan Binding 	/* ASP1/2_xxx_EN=1, ASP1/2_MCLK_EN=0, DMIC1_SCL_EN=1 */
177ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PAD_CFG_SLW_RATE_CTRL, 0xfc03 },
178ccff0064SStefan Binding 	/* test mode on */
179ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, 0xc0, 0x9999 },
180ccff0064SStefan Binding 	/* GPIO hysteresis = 30 us */
181ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, 0xc5, 0x0000 },
182ccff0064SStefan Binding 	/* test mode off */
183ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, 0xc0, 0x0000 },
1849e7647b5SLucas Tanure 	{} /* Terminator */
1859e7647b5SLucas Tanure };
1869e7647b5SLucas Tanure 
1879e7647b5SLucas Tanure const struct cs8409_cir_param cs8409_cs42l42_bullseye_atn[] = {
188ccff0064SStefan Binding 	/* EQ_SEL=1, EQ1/2_EN=0 */
189ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_CTRL1, 0x4000 },
190ccff0064SStefan Binding 	/* +EQ_ACC */
191ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W2, 0x4000 },
192ccff0064SStefan Binding 	/* +EQ2_EN */
193ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_CTRL1, 0x4010 },
194ccff0064SStefan Binding 	/* EQ_DATA_HI=0x0647 */
195ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W1, 0x0647 },
196ccff0064SStefan Binding 	/* +EQ_WRT, +EQ_ACC, EQ_ADR=0, EQ_DATA_LO=0x67 */
197ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W2, 0xc0c7 },
198ccff0064SStefan Binding 	/* EQ_DATA_HI=0x0647 */
199ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W1, 0x0647 },
200ccff0064SStefan Binding 	/* +EQ_WRT, +EQ_ACC, EQ_ADR=1, EQ_DATA_LO=0x67 */
201ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W2, 0xc1c7 },
202ccff0064SStefan Binding 	/* EQ_DATA_HI=0xf370 */
203ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W1, 0xf370 },
204ccff0064SStefan Binding 	/* +EQ_WRT, +EQ_ACC, EQ_ADR=2, EQ_DATA_LO=0x71 */
205ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W2, 0xc271 },
206ccff0064SStefan Binding 	/* EQ_DATA_HI=0x1ef8 */
207ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W1, 0x1ef8 },
208ccff0064SStefan Binding 	/* +EQ_WRT, +EQ_ACC, EQ_ADR=3, EQ_DATA_LO=0x48 */
209ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W2, 0xc348 },
210ccff0064SStefan Binding 	/* EQ_DATA_HI=0xc110 */
211ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W1, 0xc110 },
212ccff0064SStefan Binding 	/* +EQ_WRT, +EQ_ACC, EQ_ADR=4, EQ_DATA_LO=0x5a */
213ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W2, 0xc45a },
214ccff0064SStefan Binding 	/* EQ_DATA_HI=0x1f29 */
215ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W1, 0x1f29 },
216ccff0064SStefan Binding 	/* +EQ_WRT, +EQ_ACC, EQ_ADR=5, EQ_DATA_LO=0x74 */
217ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W2, 0xc574 },
218ccff0064SStefan Binding 	/* EQ_DATA_HI=0x1d7a */
219ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W1, 0x1d7a },
220ccff0064SStefan Binding 	/* +EQ_WRT, +EQ_ACC, EQ_ADR=6, EQ_DATA_LO=0x53 */
221ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W2, 0xc653 },
222ccff0064SStefan Binding 	/* EQ_DATA_HI=0xc38c */
223ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W1, 0xc38c },
224ccff0064SStefan Binding 	/* +EQ_WRT, +EQ_ACC, EQ_ADR=7, EQ_DATA_LO=0x14 */
225ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W2, 0xc714 },
226ccff0064SStefan Binding 	/* EQ_DATA_HI=0x1ca3 */
227ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W1, 0x1ca3 },
228ccff0064SStefan Binding 	/* +EQ_WRT, +EQ_ACC, EQ_ADR=8, EQ_DATA_LO=0xc7 */
229ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W2, 0xc8c7 },
230ccff0064SStefan Binding 	/* EQ_DATA_HI=0xc38c */
231ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W1, 0xc38c },
232ccff0064SStefan Binding 	/* +EQ_WRT, +EQ_ACC, EQ_ADR=9, EQ_DATA_LO=0x14 */
233ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W2, 0xc914 },
234ccff0064SStefan Binding 	/* -EQ_ACC, -EQ_WRT */
235ccff0064SStefan Binding 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PFE_COEF_W2, 0x0000 },
2369e7647b5SLucas Tanure 	{} /* Terminator */
2379e7647b5SLucas Tanure };
23824f7ac3dSLucas Tanure 
23924f7ac3dSLucas Tanure struct sub_codec cs8409_cs42l42_codec = {
24024f7ac3dSLucas Tanure 	.addr = CS42L42_I2C_ADDR,
24124f7ac3dSLucas Tanure 	.reset_gpio = CS8409_CS42L42_RESET,
24224f7ac3dSLucas Tanure 	.irq_mask = CS8409_CS42L42_INT,
24324f7ac3dSLucas Tanure 	.init_seq = cs42l42_init_reg_seq,
24424f7ac3dSLucas Tanure 	.init_seq_num = ARRAY_SIZE(cs42l42_init_reg_seq),
24524f7ac3dSLucas Tanure 	.hp_jack_in = 0,
24624f7ac3dSLucas Tanure 	.mic_jack_in = 0,
24724f7ac3dSLucas Tanure 	.paged = 1,
24824f7ac3dSLucas Tanure 	.suspended = 1,
249404e770aSStefan Binding 	.no_type_dect = 0,
25024f7ac3dSLucas Tanure };
25124f7ac3dSLucas Tanure 
25224f7ac3dSLucas Tanure /******************************************************************************
253*20e50772SLucas Tanure  *                          Dolphin Specific Arrays
254*20e50772SLucas Tanure  *                            CS8409/ 2 X CS42L42
255*20e50772SLucas Tanure  ******************************************************************************/
256*20e50772SLucas Tanure 
257*20e50772SLucas Tanure const struct hda_verb dolphin_init_verbs[] = {
258*20e50772SLucas Tanure 	{ 0x01, AC_VERB_SET_GPIO_WAKE_MASK, DOLPHIN_WAKE }, /* WAKE from GPIO 0,4 */
259*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, AC_VERB_SET_PROC_STATE, 0x0001 }, /* Enable VPW processing  */
260*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, AC_VERB_SET_COEF_INDEX, 0x0002 }, /* Configure GPIO 6,7 */
261*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, AC_VERB_SET_PROC_COEF,  0x0080 }, /* I2C mode */
262*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, AC_VERB_SET_COEF_INDEX, 0x005b }, /* Set I2C bus speed */
263*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, AC_VERB_SET_PROC_COEF,  0x0200 }, /* 100kHz I2C_STO = 2 */
264*20e50772SLucas Tanure 	{} /* terminator */
265*20e50772SLucas Tanure };
266*20e50772SLucas Tanure 
267*20e50772SLucas Tanure const struct hda_pintbl dolphin_pincfgs[] = {
268*20e50772SLucas Tanure 	{ 0x24, 0x022210f0 }, /* ASP-1-TX-A */
269*20e50772SLucas Tanure 	{ 0x25, 0x010240f0 }, /* ASP-1-TX-B */
270*20e50772SLucas Tanure 	{ 0x34, 0x02a21050 }, /* ASP-1-RX */
271*20e50772SLucas Tanure 	{} /* terminator */
272*20e50772SLucas Tanure };
273*20e50772SLucas Tanure 
274*20e50772SLucas Tanure /* Vendor specific HW configuration for CS42L42 */
275*20e50772SLucas Tanure static const struct cs8409_i2c_param dolphin_c0_init_reg_seq[] = {
276*20e50772SLucas Tanure 	{ 0x1010, 0xB0 },
277*20e50772SLucas Tanure 	{ 0x1D01, 0x00 },
278*20e50772SLucas Tanure 	{ 0x1D02, 0x06 },
279*20e50772SLucas Tanure 	{ 0x1D03, 0x00 },
280*20e50772SLucas Tanure 	{ 0x1107, 0x01 },
281*20e50772SLucas Tanure 	{ 0x1009, 0x02 },
282*20e50772SLucas Tanure 	{ 0x1007, 0x03 },
283*20e50772SLucas Tanure 	{ 0x1201, 0x00 },
284*20e50772SLucas Tanure 	{ 0x1208, 0x13 },
285*20e50772SLucas Tanure 	{ 0x1205, 0xFF },
286*20e50772SLucas Tanure 	{ 0x1206, 0x00 },
287*20e50772SLucas Tanure 	{ 0x1207, 0x20 },
288*20e50772SLucas Tanure 	{ 0x1202, 0x0D },
289*20e50772SLucas Tanure 	{ 0x2A02, 0x02 },
290*20e50772SLucas Tanure 	{ 0x2A03, 0x00 },
291*20e50772SLucas Tanure 	{ 0x2A04, 0x00 },
292*20e50772SLucas Tanure 	{ 0x2A05, 0x02 },
293*20e50772SLucas Tanure 	{ 0x2A06, 0x00 },
294*20e50772SLucas Tanure 	{ 0x2A07, 0x20 },
295*20e50772SLucas Tanure 	{ 0x2A01, 0x0C },
296*20e50772SLucas Tanure 	{ 0x2902, 0x01 },
297*20e50772SLucas Tanure 	{ 0x2903, 0x02 },
298*20e50772SLucas Tanure 	{ 0x2904, 0x00 },
299*20e50772SLucas Tanure 	{ 0x2905, 0x00 },
300*20e50772SLucas Tanure 	{ 0x2901, 0x01 },
301*20e50772SLucas Tanure 	{ 0x1101, 0x0A },
302*20e50772SLucas Tanure 	{ 0x1102, 0x84 },
303*20e50772SLucas Tanure 	{ 0x2301, 0x00 },
304*20e50772SLucas Tanure 	{ 0x2303, 0x00 },
305*20e50772SLucas Tanure 	{ 0x2302, 0x3f },
306*20e50772SLucas Tanure 	{ 0x2001, 0x03 },
307*20e50772SLucas Tanure 	{ 0x1B75, 0xB6 },
308*20e50772SLucas Tanure 	{ 0x1B73, 0xC2 },
309*20e50772SLucas Tanure 	{ 0x1129, 0x01 },
310*20e50772SLucas Tanure 	{ 0x1121, 0xF3 },
311*20e50772SLucas Tanure 	{ 0x1103, 0x20 },
312*20e50772SLucas Tanure 	{ 0x1105, 0x00 },
313*20e50772SLucas Tanure 	{ 0x1112, 0x00 },
314*20e50772SLucas Tanure 	{ 0x1113, 0x80 },
315*20e50772SLucas Tanure 	{ 0x1C03, 0xC0 },
316*20e50772SLucas Tanure 	{ 0x1101, 0x02 },
317*20e50772SLucas Tanure 	{ 0x1316, 0xff },
318*20e50772SLucas Tanure 	{ 0x1317, 0xff },
319*20e50772SLucas Tanure 	{ 0x1318, 0xff },
320*20e50772SLucas Tanure 	{ 0x1319, 0xff },
321*20e50772SLucas Tanure 	{ 0x131a, 0xff },
322*20e50772SLucas Tanure 	{ 0x131b, 0xff },
323*20e50772SLucas Tanure 	{ 0x131c, 0xff },
324*20e50772SLucas Tanure 	{ 0x131e, 0xff },
325*20e50772SLucas Tanure 	{ 0x131f, 0xff },
326*20e50772SLucas Tanure 	{ 0x1320, 0xff },
327*20e50772SLucas Tanure 	{ 0x1b79, 0xff },
328*20e50772SLucas Tanure 	{ 0x1b7a, 0xff }
329*20e50772SLucas Tanure };
330*20e50772SLucas Tanure 
331*20e50772SLucas Tanure static const struct cs8409_i2c_param dolphin_c1_init_reg_seq[] = {
332*20e50772SLucas Tanure 	{ 0x1010, 0xB0 },
333*20e50772SLucas Tanure 	{ 0x1D01, 0x00 },
334*20e50772SLucas Tanure 	{ 0x1D02, 0x06 },
335*20e50772SLucas Tanure 	{ 0x1D03, 0x00 },
336*20e50772SLucas Tanure 	{ 0x1107, 0x01 },
337*20e50772SLucas Tanure 	{ 0x1009, 0x02 },
338*20e50772SLucas Tanure 	{ 0x1007, 0x03 },
339*20e50772SLucas Tanure 	{ 0x1201, 0x00 },
340*20e50772SLucas Tanure 	{ 0x1208, 0x13 },
341*20e50772SLucas Tanure 	{ 0x1205, 0xFF },
342*20e50772SLucas Tanure 	{ 0x1206, 0x00 },
343*20e50772SLucas Tanure 	{ 0x1207, 0x20 },
344*20e50772SLucas Tanure 	{ 0x1202, 0x0D },
345*20e50772SLucas Tanure 	{ 0x2A02, 0x02 },
346*20e50772SLucas Tanure 	{ 0x2A03, 0x00 },
347*20e50772SLucas Tanure 	{ 0x2A04, 0x80 },
348*20e50772SLucas Tanure 	{ 0x2A05, 0x02 },
349*20e50772SLucas Tanure 	{ 0x2A06, 0x00 },
350*20e50772SLucas Tanure 	{ 0x2A07, 0xA0 },
351*20e50772SLucas Tanure 	{ 0x2A01, 0x0C },
352*20e50772SLucas Tanure 	{ 0x2902, 0x00 },
353*20e50772SLucas Tanure 	{ 0x2903, 0x02 },
354*20e50772SLucas Tanure 	{ 0x2904, 0x00 },
355*20e50772SLucas Tanure 	{ 0x2905, 0x00 },
356*20e50772SLucas Tanure 	{ 0x2901, 0x00 },
357*20e50772SLucas Tanure 	{ 0x1101, 0x0E },
358*20e50772SLucas Tanure 	{ 0x1102, 0x84 },
359*20e50772SLucas Tanure 	{ 0x2301, 0x00 },
360*20e50772SLucas Tanure 	{ 0x2303, 0x00 },
361*20e50772SLucas Tanure 	{ 0x2302, 0x3f },
362*20e50772SLucas Tanure 	{ 0x2001, 0x03 },
363*20e50772SLucas Tanure 	{ 0x1B75, 0xB6 },
364*20e50772SLucas Tanure 	{ 0x1B73, 0xC2 },
365*20e50772SLucas Tanure 	{ 0x1129, 0x01 },
366*20e50772SLucas Tanure 	{ 0x1121, 0xF3 },
367*20e50772SLucas Tanure 	{ 0x1103, 0x20 },
368*20e50772SLucas Tanure 	{ 0x1105, 0x00 },
369*20e50772SLucas Tanure 	{ 0x1112, 0x00 },
370*20e50772SLucas Tanure 	{ 0x1113, 0x80 },
371*20e50772SLucas Tanure 	{ 0x1C03, 0xC0 },
372*20e50772SLucas Tanure 	{ 0x1101, 0x02 },
373*20e50772SLucas Tanure 	{ 0x1316, 0xff },
374*20e50772SLucas Tanure 	{ 0x1317, 0xff },
375*20e50772SLucas Tanure 	{ 0x1318, 0xff },
376*20e50772SLucas Tanure 	{ 0x1319, 0xff },
377*20e50772SLucas Tanure 	{ 0x131a, 0xff },
378*20e50772SLucas Tanure 	{ 0x131b, 0xff },
379*20e50772SLucas Tanure 	{ 0x131c, 0xff },
380*20e50772SLucas Tanure 	{ 0x131e, 0xff },
381*20e50772SLucas Tanure 	{ 0x131f, 0xff },
382*20e50772SLucas Tanure 	{ 0x1320, 0xff },
383*20e50772SLucas Tanure 	{ 0x1b79, 0xff },
384*20e50772SLucas Tanure 	{ 0x1b7a, 0xff }
385*20e50772SLucas Tanure };
386*20e50772SLucas Tanure 
387*20e50772SLucas Tanure /* Vendor specific hw configuration for CS8409 */
388*20e50772SLucas Tanure const struct cs8409_cir_param dolphin_hw_cfg[] = {
389*20e50772SLucas Tanure 	/* +PLL1/2_EN, +I2C_EN */
390*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_DEV_CFG1, 0xb008 },
391*20e50772SLucas Tanure 	/* ASP1_EN=0, ASP1_STP=1 */
392*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_DEV_CFG2, 0x0002 },
393*20e50772SLucas Tanure 	/* ASP1/2_BUS_IDLE=10, +GPIO_I2C */
394*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_DEV_CFG3, 0x0a80 },
395*20e50772SLucas Tanure 	/* ASP1.A: TX.LAP=0, TX.LSZ=24 bits, TX.LCS=0 */
396*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, ASP1_A_TX_CTRL1, 0x0800 },
397*20e50772SLucas Tanure 	/* ASP1.A: TX.RAP=0, TX.RSZ=24 bits, TX.RCS=32 */
398*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, ASP1_A_TX_CTRL2, 0x0820 },
399*20e50772SLucas Tanure 	/* ASP1.B: TX.LAP=0, TX.LSZ=24 bits, TX.LCS=128 */
400*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, ASP1_B_TX_CTRL1, 0x0880 },
401*20e50772SLucas Tanure 	/* ASP1.B: TX.RAP=0, TX.RSZ=24 bits, TX.RCS=160 */
402*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, ASP1_B_TX_CTRL2, 0x08a0 },
403*20e50772SLucas Tanure 	/* ASP1.A: RX.LAP=0, RX.LSZ=24 bits, RX.LCS=0 */
404*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, ASP1_A_RX_CTRL1, 0x0800 },
405*20e50772SLucas Tanure 	/* ASP1.A: RX.RAP=0, RX.RSZ=24 bits, RX.RCS=0 */
406*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, ASP1_A_RX_CTRL2, 0x0800 },
407*20e50772SLucas Tanure 	/* ASP1: LCHI = 00h */
408*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_ASP1_CLK_CTRL1, 0x8000 },
409*20e50772SLucas Tanure 	/* ASP1: MC/SC_SRCSEL=PLL1, LCPR=FFh */
410*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_ASP1_CLK_CTRL2, 0x28ff },
411*20e50772SLucas Tanure 	/* ASP1: MCEN=0, FSD=011, SCPOL_IN/OUT=0, SCDIV=1:4 */
412*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_ASP1_CLK_CTRL3, 0x0062 },
413*20e50772SLucas Tanure 	/* ASP1/2_BEEP=0 */
414*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_BEEP_CFG, 0x0000 },
415*20e50772SLucas Tanure 	/* ASP1_EN=1, ASP1_STP=1 */
416*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_DEV_CFG2, 0x0022 },
417*20e50772SLucas Tanure 	/* -PLL2_EN */
418*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_DEV_CFG1, 0x9008 },
419*20e50772SLucas Tanure 	/* ASP1_xxx_EN=1, ASP1_MCLK_EN=0 */
420*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, CS8409_PAD_CFG_SLW_RATE_CTRL, 0x5400 },
421*20e50772SLucas Tanure 	/* test mode on */
422*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, 0xc0, 0x9999 },
423*20e50772SLucas Tanure 	/* GPIO hysteresis = 30 us */
424*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, 0xc5, 0x0000 },
425*20e50772SLucas Tanure 	/* test mode off */
426*20e50772SLucas Tanure 	{ CS8409_PIN_VENDOR_WIDGET, 0xc0, 0x0000 },
427*20e50772SLucas Tanure 	{} /* Terminator */
428*20e50772SLucas Tanure };
429*20e50772SLucas Tanure 
430*20e50772SLucas Tanure struct sub_codec dolphin_cs42l42_0 = {
431*20e50772SLucas Tanure 	.addr = DOLPHIN_C0_I2C_ADDR,
432*20e50772SLucas Tanure 	.reset_gpio = DOLPHIN_C0_RESET,
433*20e50772SLucas Tanure 	.irq_mask = DOLPHIN_C0_INT,
434*20e50772SLucas Tanure 	.init_seq = dolphin_c0_init_reg_seq,
435*20e50772SLucas Tanure 	.init_seq_num = ARRAY_SIZE(dolphin_c0_init_reg_seq),
436*20e50772SLucas Tanure 	.hp_jack_in = 0,
437*20e50772SLucas Tanure 	.mic_jack_in = 0,
438*20e50772SLucas Tanure 	.paged = 1,
439*20e50772SLucas Tanure 	.suspended = 1,
440*20e50772SLucas Tanure 	.no_type_dect = 0,
441*20e50772SLucas Tanure };
442*20e50772SLucas Tanure 
443*20e50772SLucas Tanure struct sub_codec dolphin_cs42l42_1 = {
444*20e50772SLucas Tanure 	.addr = DOLPHIN_C1_I2C_ADDR,
445*20e50772SLucas Tanure 	.reset_gpio = DOLPHIN_C1_RESET,
446*20e50772SLucas Tanure 	.irq_mask = DOLPHIN_C1_INT,
447*20e50772SLucas Tanure 	.init_seq = dolphin_c1_init_reg_seq,
448*20e50772SLucas Tanure 	.init_seq_num = ARRAY_SIZE(dolphin_c1_init_reg_seq),
449*20e50772SLucas Tanure 	.hp_jack_in = 0,
450*20e50772SLucas Tanure 	.mic_jack_in = 0,
451*20e50772SLucas Tanure 	.paged = 1,
452*20e50772SLucas Tanure 	.suspended = 1,
453*20e50772SLucas Tanure 	.no_type_dect = 1,
454*20e50772SLucas Tanure };
455*20e50772SLucas Tanure 
456*20e50772SLucas Tanure /******************************************************************************
45724f7ac3dSLucas Tanure  *                         CS8409 Patch Driver Structs
45824f7ac3dSLucas Tanure  *                    Arrays Used for all projects using CS8409
45924f7ac3dSLucas Tanure  ******************************************************************************/
46024f7ac3dSLucas Tanure 
46124f7ac3dSLucas Tanure const struct snd_pci_quirk cs8409_fixup_tbl[] = {
46224f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A11, "Bullseye", CS8409_BULLSEYE),
46324f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A12, "Bullseye", CS8409_BULLSEYE),
46424f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A23, "Bullseye", CS8409_BULLSEYE),
46524f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A24, "Bullseye", CS8409_BULLSEYE),
46624f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A25, "Bullseye", CS8409_BULLSEYE),
46724f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A29, "Bullseye", CS8409_BULLSEYE),
46824f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A2A, "Bullseye", CS8409_BULLSEYE),
46924f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A2B, "Bullseye", CS8409_BULLSEYE),
47024f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AB0, "Warlock", CS8409_WARLOCK),
47124f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AB2, "Warlock", CS8409_WARLOCK),
47224f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AB1, "Warlock", CS8409_WARLOCK),
47324f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AB3, "Warlock", CS8409_WARLOCK),
47424f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AB4, "Warlock", CS8409_WARLOCK),
47524f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AB5, "Warlock", CS8409_WARLOCK),
47624f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AD9, "Warlock", CS8409_WARLOCK),
47724f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0ADA, "Warlock", CS8409_WARLOCK),
47824f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0ADB, "Warlock", CS8409_WARLOCK),
47924f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0ADC, "Warlock", CS8409_WARLOCK),
48024f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AF4, "Warlock", CS8409_WARLOCK),
48124f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AF5, "Warlock", CS8409_WARLOCK),
48224f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A77, "Cyborg", CS8409_CYBORG),
48324f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A78, "Cyborg", CS8409_CYBORG),
48424f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A79, "Cyborg", CS8409_CYBORG),
48524f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A7A, "Cyborg", CS8409_CYBORG),
48624f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A7D, "Cyborg", CS8409_CYBORG),
48724f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A7E, "Cyborg", CS8409_CYBORG),
48824f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A7F, "Cyborg", CS8409_CYBORG),
48924f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0A80, "Cyborg", CS8409_CYBORG),
49024f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0ADF, "Cyborg", CS8409_CYBORG),
49124f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AE0, "Cyborg", CS8409_CYBORG),
49224f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AE1, "Cyborg", CS8409_CYBORG),
49324f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AE2, "Cyborg", CS8409_CYBORG),
49424f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AE9, "Cyborg", CS8409_CYBORG),
49524f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AEA, "Cyborg", CS8409_CYBORG),
49624f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AEB, "Cyborg", CS8409_CYBORG),
49724f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AEC, "Cyborg", CS8409_CYBORG),
49824f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AED, "Cyborg", CS8409_CYBORG),
49924f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AEE, "Cyborg", CS8409_CYBORG),
50024f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AEF, "Cyborg", CS8409_CYBORG),
50124f7ac3dSLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AF0, "Cyborg", CS8409_CYBORG),
502*20e50772SLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AD0, "Dolphin", CS8409_DOLPHIN),
503*20e50772SLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AD1, "Dolphin", CS8409_DOLPHIN),
504*20e50772SLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AD2, "Dolphin", CS8409_DOLPHIN),
505*20e50772SLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0AD3, "Dolphin", CS8409_DOLPHIN),
506*20e50772SLucas Tanure 	SND_PCI_QUIRK(0x1028, 0x0ACF, "Dolphin", CS8409_DOLPHIN),
50724f7ac3dSLucas Tanure 	{} /* terminator */
50824f7ac3dSLucas Tanure };
50924f7ac3dSLucas Tanure 
51024f7ac3dSLucas Tanure /* Dell Inspiron models with cs8409/cs42l42 */
51124f7ac3dSLucas Tanure const struct hda_model_fixup cs8409_models[] = {
51224f7ac3dSLucas Tanure 	{ .id = CS8409_BULLSEYE, .name = "bullseye" },
51324f7ac3dSLucas Tanure 	{ .id = CS8409_WARLOCK, .name = "warlock" },
51424f7ac3dSLucas Tanure 	{ .id = CS8409_CYBORG, .name = "cyborg" },
515*20e50772SLucas Tanure 	{ .id = CS8409_DOLPHIN, .name = "dolphin" },
51624f7ac3dSLucas Tanure 	{}
51724f7ac3dSLucas Tanure };
51824f7ac3dSLucas Tanure 
51924f7ac3dSLucas Tanure const struct hda_fixup cs8409_fixups[] = {
52024f7ac3dSLucas Tanure 	[CS8409_BULLSEYE] = {
52124f7ac3dSLucas Tanure 		.type = HDA_FIXUP_PINS,
52224f7ac3dSLucas Tanure 		.v.pins = cs8409_cs42l42_pincfgs,
52324f7ac3dSLucas Tanure 		.chained = true,
52424f7ac3dSLucas Tanure 		.chain_id = CS8409_FIXUPS,
52524f7ac3dSLucas Tanure 	},
52624f7ac3dSLucas Tanure 	[CS8409_WARLOCK] = {
52724f7ac3dSLucas Tanure 		.type = HDA_FIXUP_PINS,
52824f7ac3dSLucas Tanure 		.v.pins = cs8409_cs42l42_pincfgs,
52924f7ac3dSLucas Tanure 		.chained = true,
53024f7ac3dSLucas Tanure 		.chain_id = CS8409_FIXUPS,
53124f7ac3dSLucas Tanure 	},
53224f7ac3dSLucas Tanure 	[CS8409_CYBORG] = {
53324f7ac3dSLucas Tanure 		.type = HDA_FIXUP_PINS,
53424f7ac3dSLucas Tanure 		.v.pins = cs8409_cs42l42_pincfgs,
53524f7ac3dSLucas Tanure 		.chained = true,
53624f7ac3dSLucas Tanure 		.chain_id = CS8409_FIXUPS,
53724f7ac3dSLucas Tanure 	},
53824f7ac3dSLucas Tanure 	[CS8409_FIXUPS] = {
53924f7ac3dSLucas Tanure 		.type = HDA_FIXUP_FUNC,
54024f7ac3dSLucas Tanure 		.v.func = cs8409_cs42l42_fixups,
54124f7ac3dSLucas Tanure 	},
542*20e50772SLucas Tanure 	[CS8409_DOLPHIN] = {
543*20e50772SLucas Tanure 		.type = HDA_FIXUP_PINS,
544*20e50772SLucas Tanure 		.v.pins = dolphin_pincfgs,
545*20e50772SLucas Tanure 		.chained = true,
546*20e50772SLucas Tanure 		.chain_id = CS8409_DOLPHIN_FIXUPS,
547*20e50772SLucas Tanure 	},
548*20e50772SLucas Tanure 	[CS8409_DOLPHIN_FIXUPS] = {
549*20e50772SLucas Tanure 		.type = HDA_FIXUP_FUNC,
550*20e50772SLucas Tanure 		.v.func = dolphin_fixups,
551*20e50772SLucas Tanure 	},
55224f7ac3dSLucas Tanure };
553