diff options
Diffstat (limited to 'sound/pci/hda/alc262_quirks.c')
-rw-r--r-- | sound/pci/hda/alc262_quirks.c | 875 |
1 files changed, 0 insertions, 875 deletions
diff --git a/sound/pci/hda/alc262_quirks.c b/sound/pci/hda/alc262_quirks.c deleted file mode 100644 index 7894b2b5aac..00000000000 --- a/sound/pci/hda/alc262_quirks.c +++ /dev/null | |||
@@ -1,875 +0,0 @@ | |||
1 | /* | ||
2 | * ALC262 quirk models | ||
3 | * included by patch_realtek.c | ||
4 | */ | ||
5 | |||
6 | /* ALC262 models */ | ||
7 | enum { | ||
8 | ALC262_AUTO, | ||
9 | ALC262_BASIC, | ||
10 | ALC262_HIPPO, | ||
11 | ALC262_HIPPO_1, | ||
12 | ALC262_FUJITSU, | ||
13 | ALC262_BENQ_ED8, | ||
14 | ALC262_BENQ_T31, | ||
15 | ALC262_ULTRA, | ||
16 | ALC262_LENOVO_3000, | ||
17 | ALC262_NEC, | ||
18 | ALC262_TOSHIBA_S06, | ||
19 | ALC262_TOSHIBA_RX1, | ||
20 | ALC262_TYAN, | ||
21 | ALC262_MODEL_LAST /* last tag */ | ||
22 | }; | ||
23 | |||
24 | #define ALC262_DIGOUT_NID ALC880_DIGOUT_NID | ||
25 | #define ALC262_DIGIN_NID ALC880_DIGIN_NID | ||
26 | |||
27 | #define alc262_dac_nids alc260_dac_nids | ||
28 | #define alc262_adc_nids alc882_adc_nids | ||
29 | #define alc262_adc_nids_alt alc882_adc_nids_alt | ||
30 | #define alc262_capsrc_nids alc882_capsrc_nids | ||
31 | #define alc262_capsrc_nids_alt alc882_capsrc_nids_alt | ||
32 | |||
33 | #define alc262_modes alc260_modes | ||
34 | #define alc262_capture_source alc882_capture_source | ||
35 | |||
36 | static const hda_nid_t alc262_dmic_adc_nids[1] = { | ||
37 | /* ADC0 */ | ||
38 | 0x09 | ||
39 | }; | ||
40 | |||
41 | static const hda_nid_t alc262_dmic_capsrc_nids[1] = { 0x22 }; | ||
42 | |||
43 | static const struct snd_kcontrol_new alc262_base_mixer[] = { | ||
44 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
45 | HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), | ||
46 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
47 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
48 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
49 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
50 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
51 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
52 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
53 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | ||
54 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | ||
55 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
56 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0D, 0x0, HDA_OUTPUT), | ||
57 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
58 | HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), | ||
59 | HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT), | ||
60 | { } /* end */ | ||
61 | }; | ||
62 | |||
63 | /* bind hp and internal speaker mute (with plug check) as master switch */ | ||
64 | |||
65 | static int alc262_hippo_master_sw_get(struct snd_kcontrol *kcontrol, | ||
66 | struct snd_ctl_elem_value *ucontrol) | ||
67 | { | ||
68 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | ||
69 | struct alc_spec *spec = codec->spec; | ||
70 | *ucontrol->value.integer.value = !spec->master_mute; | ||
71 | return 0; | ||
72 | } | ||
73 | |||
74 | static int alc262_hippo_master_sw_put(struct snd_kcontrol *kcontrol, | ||
75 | struct snd_ctl_elem_value *ucontrol) | ||
76 | { | ||
77 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | ||
78 | struct alc_spec *spec = codec->spec; | ||
79 | int val = !*ucontrol->value.integer.value; | ||
80 | |||
81 | if (val == spec->master_mute) | ||
82 | return 0; | ||
83 | spec->master_mute = val; | ||
84 | update_outputs(codec); | ||
85 | return 1; | ||
86 | } | ||
87 | |||
88 | #define ALC262_HIPPO_MASTER_SWITCH \ | ||
89 | { \ | ||
90 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | ||
91 | .name = "Master Playback Switch", \ | ||
92 | .info = snd_ctl_boolean_mono_info, \ | ||
93 | .get = alc262_hippo_master_sw_get, \ | ||
94 | .put = alc262_hippo_master_sw_put, \ | ||
95 | }, \ | ||
96 | { \ | ||
97 | .iface = NID_MAPPING, \ | ||
98 | .name = "Master Playback Switch", \ | ||
99 | .subdevice = SUBDEV_HP(0) | (SUBDEV_LINE(0) << 8) | \ | ||
100 | (SUBDEV_SPEAKER(0) << 16), \ | ||
101 | } | ||
102 | |||
103 | #define alc262_hp_master_sw_get alc262_hippo_master_sw_get | ||
104 | #define alc262_hp_master_sw_put alc262_hippo_master_sw_put | ||
105 | |||
106 | static const struct snd_kcontrol_new alc262_hippo_mixer[] = { | ||
107 | ALC262_HIPPO_MASTER_SWITCH, | ||
108 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
109 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
110 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
111 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
112 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
113 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
114 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
115 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
116 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | ||
117 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | ||
118 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
119 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | ||
120 | { } /* end */ | ||
121 | }; | ||
122 | |||
123 | static const struct snd_kcontrol_new alc262_hippo1_mixer[] = { | ||
124 | HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
125 | ALC262_HIPPO_MASTER_SWITCH, | ||
126 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
127 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
128 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
129 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
130 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
131 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
132 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
133 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | ||
134 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | ||
135 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
136 | { } /* end */ | ||
137 | }; | ||
138 | |||
139 | /* mute/unmute internal speaker according to the hp jack and mute state */ | ||
140 | static void alc262_hippo_setup(struct hda_codec *codec) | ||
141 | { | ||
142 | struct alc_spec *spec = codec->spec; | ||
143 | |||
144 | spec->autocfg.hp_pins[0] = 0x15; | ||
145 | spec->autocfg.speaker_pins[0] = 0x14; | ||
146 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | ||
147 | } | ||
148 | |||
149 | static void alc262_hippo1_setup(struct hda_codec *codec) | ||
150 | { | ||
151 | struct alc_spec *spec = codec->spec; | ||
152 | |||
153 | spec->autocfg.hp_pins[0] = 0x1b; | ||
154 | spec->autocfg.speaker_pins[0] = 0x14; | ||
155 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | ||
156 | } | ||
157 | |||
158 | |||
159 | static const struct snd_kcontrol_new alc262_sony_mixer[] = { | ||
160 | HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
161 | ALC262_HIPPO_MASTER_SWITCH, | ||
162 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
163 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
164 | HDA_CODEC_VOLUME("ATAPI Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | ||
165 | HDA_CODEC_MUTE("ATAPI Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | ||
166 | { } /* end */ | ||
167 | }; | ||
168 | |||
169 | static const struct snd_kcontrol_new alc262_benq_t31_mixer[] = { | ||
170 | HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
171 | ALC262_HIPPO_MASTER_SWITCH, | ||
172 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
173 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
174 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
175 | HDA_CODEC_VOLUME("ATAPI Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | ||
176 | HDA_CODEC_MUTE("ATAPI Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | ||
177 | { } /* end */ | ||
178 | }; | ||
179 | |||
180 | static const struct snd_kcontrol_new alc262_tyan_mixer[] = { | ||
181 | HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
182 | HDA_BIND_MUTE("Master Playback Switch", 0x0c, 2, HDA_INPUT), | ||
183 | HDA_CODEC_VOLUME("Aux Playback Volume", 0x0b, 0x06, HDA_INPUT), | ||
184 | HDA_CODEC_MUTE("Aux Playback Switch", 0x0b, 0x06, HDA_INPUT), | ||
185 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
186 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
187 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
188 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
189 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
190 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | ||
191 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | ||
192 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
193 | { } /* end */ | ||
194 | }; | ||
195 | |||
196 | static const struct hda_verb alc262_tyan_verbs[] = { | ||
197 | /* Headphone automute */ | ||
198 | {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | ||
199 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
200 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
201 | |||
202 | /* P11 AUX_IN, white 4-pin connector */ | ||
203 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
204 | {0x14, AC_VERB_SET_CONFIG_DEFAULT_BYTES_1, 0xe1}, | ||
205 | {0x14, AC_VERB_SET_CONFIG_DEFAULT_BYTES_2, 0x93}, | ||
206 | {0x14, AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0x19}, | ||
207 | |||
208 | {} | ||
209 | }; | ||
210 | |||
211 | /* unsolicited event for HP jack sensing */ | ||
212 | static void alc262_tyan_setup(struct hda_codec *codec) | ||
213 | { | ||
214 | struct alc_spec *spec = codec->spec; | ||
215 | |||
216 | spec->autocfg.hp_pins[0] = 0x1b; | ||
217 | spec->autocfg.speaker_pins[0] = 0x15; | ||
218 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | ||
219 | } | ||
220 | |||
221 | |||
222 | #define alc262_capture_mixer alc882_capture_mixer | ||
223 | #define alc262_capture_alt_mixer alc882_capture_alt_mixer | ||
224 | |||
225 | /* | ||
226 | * generic initialization of ADC, input mixers and output mixers | ||
227 | */ | ||
228 | static const struct hda_verb alc262_init_verbs[] = { | ||
229 | /* | ||
230 | * Unmute ADC0-2 and set the default input to mic-in | ||
231 | */ | ||
232 | {0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
233 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
234 | {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
235 | {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
236 | {0x09, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
237 | {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
238 | |||
239 | /* Mute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback | ||
240 | * mixer widget | ||
241 | * Note: PASD motherboards uses the Line In 2 as the input for | ||
242 | * front panel mic (mic 2) | ||
243 | */ | ||
244 | /* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */ | ||
245 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
246 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | ||
247 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, | ||
248 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, | ||
249 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, | ||
250 | |||
251 | /* | ||
252 | * Set up output mixers (0x0c - 0x0e) | ||
253 | */ | ||
254 | /* set vol=0 to output mixers */ | ||
255 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | ||
256 | {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | ||
257 | {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | ||
258 | /* set up input amps for analog loopback */ | ||
259 | /* Amp Indices: DAC = 0, mixer = 1 */ | ||
260 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
261 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
262 | {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
263 | {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
264 | {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
265 | {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
266 | |||
267 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, | ||
268 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0}, | ||
269 | {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, | ||
270 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, | ||
271 | {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, | ||
272 | {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, | ||
273 | |||
274 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, | ||
275 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, | ||
276 | {0x16, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, | ||
277 | {0x18, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, | ||
278 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, | ||
279 | |||
280 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
281 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
282 | |||
283 | /* FIXME: use matrix-type input source selection */ | ||
284 | /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */ | ||
285 | /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */ | ||
286 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, | ||
287 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x03 << 8))}, | ||
288 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8))}, | ||
289 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x04 << 8))}, | ||
290 | /* Input mixer2 */ | ||
291 | {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, | ||
292 | {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x03 << 8))}, | ||
293 | {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8))}, | ||
294 | {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x04 << 8))}, | ||
295 | /* Input mixer3 */ | ||
296 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, | ||
297 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x03 << 8))}, | ||
298 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8))}, | ||
299 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x04 << 8))}, | ||
300 | |||
301 | { } | ||
302 | }; | ||
303 | |||
304 | static const struct hda_verb alc262_eapd_verbs[] = { | ||
305 | {0x14, AC_VERB_SET_EAPD_BTLENABLE, 2}, | ||
306 | {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2}, | ||
307 | { } | ||
308 | }; | ||
309 | |||
310 | static const struct hda_verb alc262_hippo1_unsol_verbs[] = { | ||
311 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0}, | ||
312 | {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
313 | {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, | ||
314 | |||
315 | {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | ||
316 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
317 | {} | ||
318 | }; | ||
319 | |||
320 | static const struct hda_verb alc262_sony_unsol_verbs[] = { | ||
321 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0}, | ||
322 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
323 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, // Front Mic | ||
324 | |||
325 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | ||
326 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
327 | {} | ||
328 | }; | ||
329 | |||
330 | static const struct snd_kcontrol_new alc262_toshiba_s06_mixer[] = { | ||
331 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
332 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), | ||
333 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
334 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
335 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
336 | { } /* end */ | ||
337 | }; | ||
338 | |||
339 | static const struct hda_verb alc262_toshiba_s06_verbs[] = { | ||
340 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
341 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
342 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
343 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
344 | {0x22, AC_VERB_SET_CONNECT_SEL, 0x09}, | ||
345 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, | ||
346 | {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT}, | ||
347 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | ||
348 | {} | ||
349 | }; | ||
350 | |||
351 | static void alc262_toshiba_s06_setup(struct hda_codec *codec) | ||
352 | { | ||
353 | struct alc_spec *spec = codec->spec; | ||
354 | |||
355 | spec->autocfg.hp_pins[0] = 0x15; | ||
356 | spec->autocfg.speaker_pins[0] = 0x14; | ||
357 | spec->ext_mic_pin = 0x18; | ||
358 | spec->int_mic_pin = 0x12; | ||
359 | spec->auto_mic = 1; | ||
360 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_PIN); | ||
361 | } | ||
362 | |||
363 | /* | ||
364 | * nec model | ||
365 | * 0x15 = headphone | ||
366 | * 0x16 = internal speaker | ||
367 | * 0x18 = external mic | ||
368 | */ | ||
369 | |||
370 | static const struct snd_kcontrol_new alc262_nec_mixer[] = { | ||
371 | HDA_CODEC_VOLUME_MONO("Speaker Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), | ||
372 | HDA_CODEC_MUTE_MONO("Speaker Playback Switch", 0x16, 0, 0x0, HDA_OUTPUT), | ||
373 | |||
374 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
375 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
376 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
377 | |||
378 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | ||
379 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
380 | { } /* end */ | ||
381 | }; | ||
382 | |||
383 | static const struct hda_verb alc262_nec_verbs[] = { | ||
384 | /* Unmute Speaker */ | ||
385 | {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
386 | |||
387 | /* Headphone */ | ||
388 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | ||
389 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
390 | |||
391 | /* External mic to headphone */ | ||
392 | {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
393 | /* External mic to speaker */ | ||
394 | {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
395 | {} | ||
396 | }; | ||
397 | |||
398 | /* | ||
399 | * fujitsu model | ||
400 | * 0x14 = headphone/spdif-out, 0x15 = internal speaker, | ||
401 | * 0x1b = port replicator headphone out | ||
402 | */ | ||
403 | |||
404 | static const struct hda_verb alc262_fujitsu_unsol_verbs[] = { | ||
405 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | ||
406 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
407 | {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | ||
408 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
409 | {} | ||
410 | }; | ||
411 | |||
412 | static const struct hda_verb alc262_lenovo_3000_unsol_verbs[] = { | ||
413 | {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | ||
414 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
415 | {} | ||
416 | }; | ||
417 | |||
418 | static const struct hda_verb alc262_lenovo_3000_init_verbs[] = { | ||
419 | /* Front Mic pin: input vref at 50% */ | ||
420 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50}, | ||
421 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
422 | {} | ||
423 | }; | ||
424 | |||
425 | static const struct hda_input_mux alc262_fujitsu_capture_source = { | ||
426 | .num_items = 3, | ||
427 | .items = { | ||
428 | { "Mic", 0x0 }, | ||
429 | { "Internal Mic", 0x1 }, | ||
430 | { "CD", 0x4 }, | ||
431 | }, | ||
432 | }; | ||
433 | |||
434 | static void alc262_fujitsu_setup(struct hda_codec *codec) | ||
435 | { | ||
436 | struct alc_spec *spec = codec->spec; | ||
437 | |||
438 | spec->autocfg.hp_pins[0] = 0x14; | ||
439 | spec->autocfg.hp_pins[1] = 0x1b; | ||
440 | spec->autocfg.speaker_pins[0] = 0x15; | ||
441 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | ||
442 | } | ||
443 | |||
444 | /* bind volumes of both NID 0x0c and 0x0d */ | ||
445 | static const struct hda_bind_ctls alc262_fujitsu_bind_master_vol = { | ||
446 | .ops = &snd_hda_bind_vol, | ||
447 | .values = { | ||
448 | HDA_COMPOSE_AMP_VAL(0x0c, 3, 0, HDA_OUTPUT), | ||
449 | HDA_COMPOSE_AMP_VAL(0x0d, 3, 0, HDA_OUTPUT), | ||
450 | 0 | ||
451 | }, | ||
452 | }; | ||
453 | |||
454 | static const struct snd_kcontrol_new alc262_fujitsu_mixer[] = { | ||
455 | HDA_BIND_VOL("Master Playback Volume", &alc262_fujitsu_bind_master_vol), | ||
456 | { | ||
457 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
458 | .name = "Master Playback Switch", | ||
459 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x14, | ||
460 | .info = snd_ctl_boolean_mono_info, | ||
461 | .get = alc262_hp_master_sw_get, | ||
462 | .put = alc262_hp_master_sw_put, | ||
463 | }, | ||
464 | { | ||
465 | .iface = NID_MAPPING, | ||
466 | .name = "Master Playback Switch", | ||
467 | .private_value = 0x1b, | ||
468 | }, | ||
469 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
470 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
471 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
472 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
473 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
474 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
475 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
476 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
477 | { } /* end */ | ||
478 | }; | ||
479 | |||
480 | static void alc262_lenovo_3000_setup(struct hda_codec *codec) | ||
481 | { | ||
482 | struct alc_spec *spec = codec->spec; | ||
483 | |||
484 | spec->autocfg.hp_pins[0] = 0x1b; | ||
485 | spec->autocfg.speaker_pins[0] = 0x14; | ||
486 | spec->autocfg.speaker_pins[1] = 0x16; | ||
487 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | ||
488 | } | ||
489 | |||
490 | static const struct snd_kcontrol_new alc262_lenovo_3000_mixer[] = { | ||
491 | HDA_BIND_VOL("Master Playback Volume", &alc262_fujitsu_bind_master_vol), | ||
492 | { | ||
493 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
494 | .name = "Master Playback Switch", | ||
495 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x1b, | ||
496 | .info = snd_ctl_boolean_mono_info, | ||
497 | .get = alc262_hp_master_sw_get, | ||
498 | .put = alc262_hp_master_sw_put, | ||
499 | }, | ||
500 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
501 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
502 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
503 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
504 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
505 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
506 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
507 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
508 | { } /* end */ | ||
509 | }; | ||
510 | |||
511 | static const struct snd_kcontrol_new alc262_toshiba_rx1_mixer[] = { | ||
512 | HDA_BIND_VOL("Master Playback Volume", &alc262_fujitsu_bind_master_vol), | ||
513 | ALC262_HIPPO_MASTER_SWITCH, | ||
514 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
515 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
516 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
517 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | ||
518 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | ||
519 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
520 | { } /* end */ | ||
521 | }; | ||
522 | |||
523 | /* additional init verbs for Benq laptops */ | ||
524 | static const struct hda_verb alc262_EAPD_verbs[] = { | ||
525 | {0x20, AC_VERB_SET_COEF_INDEX, 0x07}, | ||
526 | {0x20, AC_VERB_SET_PROC_COEF, 0x3070}, | ||
527 | {} | ||
528 | }; | ||
529 | |||
530 | static const struct hda_verb alc262_benq_t31_EAPD_verbs[] = { | ||
531 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
532 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, | ||
533 | |||
534 | {0x20, AC_VERB_SET_COEF_INDEX, 0x07}, | ||
535 | {0x20, AC_VERB_SET_PROC_COEF, 0x3050}, | ||
536 | {} | ||
537 | }; | ||
538 | |||
539 | /* Samsung Q1 Ultra Vista model setup */ | ||
540 | static const struct snd_kcontrol_new alc262_ultra_mixer[] = { | ||
541 | HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
542 | HDA_BIND_MUTE("Master Playback Switch", 0x0c, 2, HDA_INPUT), | ||
543 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | ||
544 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | ||
545 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
546 | HDA_CODEC_VOLUME("Headphone Mic Boost Volume", 0x15, 0, HDA_INPUT), | ||
547 | { } /* end */ | ||
548 | }; | ||
549 | |||
550 | static const struct hda_verb alc262_ultra_verbs[] = { | ||
551 | /* output mixer */ | ||
552 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
553 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | ||
554 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | ||
555 | /* speaker */ | ||
556 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
557 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
558 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
559 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
560 | /* HP */ | ||
561 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
562 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
563 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
564 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
565 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | ||
566 | /* internal mic */ | ||
567 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | ||
568 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | ||
569 | /* ADC, choose mic */ | ||
570 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
571 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
572 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
573 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, | ||
574 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, | ||
575 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, | ||
576 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)}, | ||
577 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)}, | ||
578 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(7)}, | ||
579 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(8)}, | ||
580 | {} | ||
581 | }; | ||
582 | |||
583 | /* mute/unmute internal speaker according to the hp jack and mute state */ | ||
584 | static void alc262_ultra_automute(struct hda_codec *codec) | ||
585 | { | ||
586 | struct alc_spec *spec = codec->spec; | ||
587 | unsigned int mute; | ||
588 | |||
589 | mute = 0; | ||
590 | /* auto-mute only when HP is used as HP */ | ||
591 | if (!spec->cur_mux[0]) { | ||
592 | spec->hp_jack_present = snd_hda_jack_detect(codec, 0x15); | ||
593 | if (spec->hp_jack_present) | ||
594 | mute = HDA_AMP_MUTE; | ||
595 | } | ||
596 | /* mute/unmute internal speaker */ | ||
597 | snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0, | ||
598 | HDA_AMP_MUTE, mute); | ||
599 | /* mute/unmute HP */ | ||
600 | snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0, | ||
601 | HDA_AMP_MUTE, mute ? 0 : HDA_AMP_MUTE); | ||
602 | } | ||
603 | |||
604 | /* unsolicited event for HP jack sensing */ | ||
605 | static void alc262_ultra_unsol_event(struct hda_codec *codec, | ||
606 | unsigned int res) | ||
607 | { | ||
608 | if ((res >> 26) != ALC_HP_EVENT) | ||
609 | return; | ||
610 | alc262_ultra_automute(codec); | ||
611 | } | ||
612 | |||
613 | static const struct hda_input_mux alc262_ultra_capture_source = { | ||
614 | .num_items = 2, | ||
615 | .items = { | ||
616 | { "Mic", 0x1 }, | ||
617 | { "Headphone", 0x7 }, | ||
618 | }, | ||
619 | }; | ||
620 | |||
621 | static int alc262_ultra_mux_enum_put(struct snd_kcontrol *kcontrol, | ||
622 | struct snd_ctl_elem_value *ucontrol) | ||
623 | { | ||
624 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | ||
625 | struct alc_spec *spec = codec->spec; | ||
626 | int ret; | ||
627 | |||
628 | ret = alc_mux_enum_put(kcontrol, ucontrol); | ||
629 | if (!ret) | ||
630 | return 0; | ||
631 | /* reprogram the HP pin as mic or HP according to the input source */ | ||
632 | snd_hda_codec_write_cache(codec, 0x15, 0, | ||
633 | AC_VERB_SET_PIN_WIDGET_CONTROL, | ||
634 | spec->cur_mux[0] ? PIN_VREF80 : PIN_HP); | ||
635 | alc262_ultra_automute(codec); /* mute/unmute HP */ | ||
636 | return ret; | ||
637 | } | ||
638 | |||
639 | static const struct snd_kcontrol_new alc262_ultra_capture_mixer[] = { | ||
640 | HDA_CODEC_VOLUME("Capture Volume", 0x07, 0x0, HDA_INPUT), | ||
641 | HDA_CODEC_MUTE("Capture Switch", 0x07, 0x0, HDA_INPUT), | ||
642 | { | ||
643 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
644 | .name = "Capture Source", | ||
645 | .info = alc_mux_enum_info, | ||
646 | .get = alc_mux_enum_get, | ||
647 | .put = alc262_ultra_mux_enum_put, | ||
648 | }, | ||
649 | { | ||
650 | .iface = NID_MAPPING, | ||
651 | .name = "Capture Source", | ||
652 | .private_value = 0x15, | ||
653 | }, | ||
654 | { } /* end */ | ||
655 | }; | ||
656 | |||
657 | static const struct hda_verb alc262_toshiba_rx1_unsol_verbs[] = { | ||
658 | |||
659 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, /* Front Speaker */ | ||
660 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
661 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
662 | |||
663 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* MIC jack */ | ||
664 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* Front MIC */ | ||
665 | {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) }, | ||
666 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) }, | ||
667 | |||
668 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, /* HP jack */ | ||
669 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
670 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | ||
671 | {} | ||
672 | }; | ||
673 | |||
674 | /* | ||
675 | * configuration and preset | ||
676 | */ | ||
677 | static const char * const alc262_models[ALC262_MODEL_LAST] = { | ||
678 | [ALC262_BASIC] = "basic", | ||
679 | [ALC262_HIPPO] = "hippo", | ||
680 | [ALC262_HIPPO_1] = "hippo_1", | ||
681 | [ALC262_FUJITSU] = "fujitsu", | ||
682 | [ALC262_BENQ_ED8] = "benq", | ||
683 | [ALC262_BENQ_T31] = "benq-t31", | ||
684 | [ALC262_TOSHIBA_S06] = "toshiba-s06", | ||
685 | [ALC262_TOSHIBA_RX1] = "toshiba-rx1", | ||
686 | [ALC262_ULTRA] = "ultra", | ||
687 | [ALC262_LENOVO_3000] = "lenovo-3000", | ||
688 | [ALC262_NEC] = "nec", | ||
689 | [ALC262_TYAN] = "tyan", | ||
690 | [ALC262_AUTO] = "auto", | ||
691 | }; | ||
692 | |||
693 | static const struct snd_pci_quirk alc262_cfg_tbl[] = { | ||
694 | SND_PCI_QUIRK(0x1002, 0x437b, "Hippo", ALC262_HIPPO), | ||
695 | SND_PCI_QUIRK(0x1033, 0x8895, "NEC Versa S9100", ALC262_NEC), | ||
696 | SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", | ||
697 | ALC262_TOSHIBA_RX1), | ||
698 | SND_PCI_QUIRK(0x1179, 0xff7b, "Toshiba S06", ALC262_TOSHIBA_S06), | ||
699 | SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), | ||
700 | SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), | ||
701 | SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W", ALC262_TYAN), | ||
702 | SND_PCI_QUIRK_MASK(0x144d, 0xff00, 0xc032, "Samsung Q1", | ||
703 | ALC262_ULTRA), | ||
704 | SND_PCI_QUIRK(0x144d, 0xc510, "Samsung Q45", ALC262_HIPPO), | ||
705 | SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000 y410", ALC262_LENOVO_3000), | ||
706 | SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_BENQ_ED8), | ||
707 | SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_BENQ_T31), | ||
708 | SND_PCI_QUIRK(0x17ff, 0x058f, "Benq Hippo", ALC262_HIPPO_1), | ||
709 | {} | ||
710 | }; | ||
711 | |||
712 | static const struct alc_config_preset alc262_presets[] = { | ||
713 | [ALC262_BASIC] = { | ||
714 | .mixers = { alc262_base_mixer }, | ||
715 | .init_verbs = { alc262_init_verbs }, | ||
716 | .num_dacs = ARRAY_SIZE(alc262_dac_nids), | ||
717 | .dac_nids = alc262_dac_nids, | ||
718 | .hp_nid = 0x03, | ||
719 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | ||
720 | .channel_mode = alc262_modes, | ||
721 | .input_mux = &alc262_capture_source, | ||
722 | }, | ||
723 | [ALC262_HIPPO] = { | ||
724 | .mixers = { alc262_hippo_mixer }, | ||
725 | .init_verbs = { alc262_init_verbs, alc_hp15_unsol_verbs}, | ||
726 | .num_dacs = ARRAY_SIZE(alc262_dac_nids), | ||
727 | .dac_nids = alc262_dac_nids, | ||
728 | .hp_nid = 0x03, | ||
729 | .dig_out_nid = ALC262_DIGOUT_NID, | ||
730 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | ||
731 | .channel_mode = alc262_modes, | ||
732 | .input_mux = &alc262_capture_source, | ||
733 | .unsol_event = alc_sku_unsol_event, | ||
734 | .setup = alc262_hippo_setup, | ||
735 | .init_hook = alc_inithook, | ||
736 | }, | ||
737 | [ALC262_HIPPO_1] = { | ||
738 | .mixers = { alc262_hippo1_mixer }, | ||
739 | .init_verbs = { alc262_init_verbs, alc262_hippo1_unsol_verbs}, | ||
740 | .num_dacs = ARRAY_SIZE(alc262_dac_nids), | ||
741 | .dac_nids = alc262_dac_nids, | ||
742 | .hp_nid = 0x02, | ||
743 | .dig_out_nid = ALC262_DIGOUT_NID, | ||
744 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | ||
745 | .channel_mode = alc262_modes, | ||
746 | .input_mux = &alc262_capture_source, | ||
747 | .unsol_event = alc_sku_unsol_event, | ||
748 | .setup = alc262_hippo1_setup, | ||
749 | .init_hook = alc_inithook, | ||
750 | }, | ||
751 | [ALC262_FUJITSU] = { | ||
752 | .mixers = { alc262_fujitsu_mixer }, | ||
753 | .init_verbs = { alc262_init_verbs, alc262_EAPD_verbs, | ||
754 | alc262_fujitsu_unsol_verbs }, | ||
755 | .num_dacs = ARRAY_SIZE(alc262_dac_nids), | ||
756 | .dac_nids = alc262_dac_nids, | ||
757 | .hp_nid = 0x03, | ||
758 | .dig_out_nid = ALC262_DIGOUT_NID, | ||
759 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | ||
760 | .channel_mode = alc262_modes, | ||
761 | .input_mux = &alc262_fujitsu_capture_source, | ||
762 | .unsol_event = alc_sku_unsol_event, | ||
763 | .setup = alc262_fujitsu_setup, | ||
764 | .init_hook = alc_inithook, | ||
765 | }, | ||
766 | [ALC262_BENQ_ED8] = { | ||
767 | .mixers = { alc262_base_mixer }, | ||
768 | .init_verbs = { alc262_init_verbs, alc262_EAPD_verbs }, | ||
769 | .num_dacs = ARRAY_SIZE(alc262_dac_nids), | ||
770 | .dac_nids = alc262_dac_nids, | ||
771 | .hp_nid = 0x03, | ||
772 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | ||
773 | .channel_mode = alc262_modes, | ||
774 | .input_mux = &alc262_capture_source, | ||
775 | }, | ||
776 | [ALC262_BENQ_T31] = { | ||
777 | .mixers = { alc262_benq_t31_mixer }, | ||
778 | .init_verbs = { alc262_init_verbs, alc262_benq_t31_EAPD_verbs, | ||
779 | alc_hp15_unsol_verbs }, | ||
780 | .num_dacs = ARRAY_SIZE(alc262_dac_nids), | ||
781 | .dac_nids = alc262_dac_nids, | ||
782 | .hp_nid = 0x03, | ||
783 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | ||
784 | .channel_mode = alc262_modes, | ||
785 | .input_mux = &alc262_capture_source, | ||
786 | .unsol_event = alc_sku_unsol_event, | ||
787 | .setup = alc262_hippo_setup, | ||
788 | .init_hook = alc_inithook, | ||
789 | }, | ||
790 | [ALC262_ULTRA] = { | ||
791 | .mixers = { alc262_ultra_mixer }, | ||
792 | .cap_mixer = alc262_ultra_capture_mixer, | ||
793 | .init_verbs = { alc262_ultra_verbs }, | ||
794 | .num_dacs = ARRAY_SIZE(alc262_dac_nids), | ||
795 | .dac_nids = alc262_dac_nids, | ||
796 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | ||
797 | .channel_mode = alc262_modes, | ||
798 | .input_mux = &alc262_ultra_capture_source, | ||
799 | .adc_nids = alc262_adc_nids, /* ADC0 */ | ||
800 | .capsrc_nids = alc262_capsrc_nids, | ||
801 | .num_adc_nids = 1, /* single ADC */ | ||
802 | .unsol_event = alc262_ultra_unsol_event, | ||
803 | .init_hook = alc262_ultra_automute, | ||
804 | }, | ||
805 | [ALC262_LENOVO_3000] = { | ||
806 | .mixers = { alc262_lenovo_3000_mixer }, | ||
807 | .init_verbs = { alc262_init_verbs, alc262_EAPD_verbs, | ||
808 | alc262_lenovo_3000_unsol_verbs, | ||
809 | alc262_lenovo_3000_init_verbs }, | ||
810 | .num_dacs = ARRAY_SIZE(alc262_dac_nids), | ||
811 | .dac_nids = alc262_dac_nids, | ||
812 | .hp_nid = 0x03, | ||
813 | .dig_out_nid = ALC262_DIGOUT_NID, | ||
814 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | ||
815 | .channel_mode = alc262_modes, | ||
816 | .input_mux = &alc262_fujitsu_capture_source, | ||
817 | .unsol_event = alc_sku_unsol_event, | ||
818 | .setup = alc262_lenovo_3000_setup, | ||
819 | .init_hook = alc_inithook, | ||
820 | }, | ||
821 | [ALC262_NEC] = { | ||
822 | .mixers = { alc262_nec_mixer }, | ||
823 | .init_verbs = { alc262_nec_verbs }, | ||
824 | .num_dacs = ARRAY_SIZE(alc262_dac_nids), | ||
825 | .dac_nids = alc262_dac_nids, | ||
826 | .hp_nid = 0x03, | ||
827 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | ||
828 | .channel_mode = alc262_modes, | ||
829 | .input_mux = &alc262_capture_source, | ||
830 | }, | ||
831 | [ALC262_TOSHIBA_S06] = { | ||
832 | .mixers = { alc262_toshiba_s06_mixer }, | ||
833 | .init_verbs = { alc262_init_verbs, alc262_toshiba_s06_verbs, | ||
834 | alc262_eapd_verbs }, | ||
835 | .num_dacs = ARRAY_SIZE(alc262_dac_nids), | ||
836 | .capsrc_nids = alc262_dmic_capsrc_nids, | ||
837 | .dac_nids = alc262_dac_nids, | ||
838 | .adc_nids = alc262_dmic_adc_nids, /* ADC0 */ | ||
839 | .num_adc_nids = 1, /* single ADC */ | ||
840 | .dig_out_nid = ALC262_DIGOUT_NID, | ||
841 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | ||
842 | .channel_mode = alc262_modes, | ||
843 | .unsol_event = alc_sku_unsol_event, | ||
844 | .setup = alc262_toshiba_s06_setup, | ||
845 | .init_hook = alc_inithook, | ||
846 | }, | ||
847 | [ALC262_TOSHIBA_RX1] = { | ||
848 | .mixers = { alc262_toshiba_rx1_mixer }, | ||
849 | .init_verbs = { alc262_init_verbs, alc262_toshiba_rx1_unsol_verbs }, | ||
850 | .num_dacs = ARRAY_SIZE(alc262_dac_nids), | ||
851 | .dac_nids = alc262_dac_nids, | ||
852 | .hp_nid = 0x03, | ||
853 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | ||
854 | .channel_mode = alc262_modes, | ||
855 | .input_mux = &alc262_capture_source, | ||
856 | .unsol_event = alc_sku_unsol_event, | ||
857 | .setup = alc262_hippo_setup, | ||
858 | .init_hook = alc_inithook, | ||
859 | }, | ||
860 | [ALC262_TYAN] = { | ||
861 | .mixers = { alc262_tyan_mixer }, | ||
862 | .init_verbs = { alc262_init_verbs, alc262_tyan_verbs}, | ||
863 | .num_dacs = ARRAY_SIZE(alc262_dac_nids), | ||
864 | .dac_nids = alc262_dac_nids, | ||
865 | .hp_nid = 0x02, | ||
866 | .dig_out_nid = ALC262_DIGOUT_NID, | ||
867 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | ||
868 | .channel_mode = alc262_modes, | ||
869 | .input_mux = &alc262_capture_source, | ||
870 | .unsol_event = alc_sku_unsol_event, | ||
871 | .setup = alc262_tyan_setup, | ||
872 | .init_hook = alc_hp_automute, | ||
873 | }, | ||
874 | }; | ||
875 | |||