]>
Commit | Line | Data |
---|---|---|
1d045db9 TI |
1 | /* |
2 | * ALC260 quirk models | |
3 | * included by patch_realtek.c | |
4 | */ | |
5 | ||
6 | /* ALC260 models */ | |
7 | enum { | |
8 | ALC260_AUTO, | |
9 | ALC260_BASIC, | |
1d045db9 TI |
10 | #ifdef CONFIG_SND_DEBUG |
11 | ALC260_TEST, | |
12 | #endif | |
13 | ALC260_MODEL_LAST /* last tag */ | |
14 | }; | |
15 | ||
16 | static const hda_nid_t alc260_dac_nids[1] = { | |
17 | /* front */ | |
18 | 0x02, | |
19 | }; | |
20 | ||
21 | static const hda_nid_t alc260_adc_nids[1] = { | |
22 | /* ADC0 */ | |
23 | 0x04, | |
24 | }; | |
25 | ||
26 | static const hda_nid_t alc260_adc_nids_alt[1] = { | |
27 | /* ADC1 */ | |
28 | 0x05, | |
29 | }; | |
30 | ||
31 | /* NIDs used when simultaneous access to both ADCs makes sense. Note that | |
32 | * alc260_capture_mixer assumes ADC0 (nid 0x04) is the first ADC. | |
33 | */ | |
34 | static const hda_nid_t alc260_dual_adc_nids[2] = { | |
35 | /* ADC0, ADC1 */ | |
36 | 0x04, 0x05 | |
37 | }; | |
38 | ||
39 | #define ALC260_DIGOUT_NID 0x03 | |
40 | #define ALC260_DIGIN_NID 0x06 | |
41 | ||
42 | static const struct hda_input_mux alc260_capture_source = { | |
43 | .num_items = 4, | |
44 | .items = { | |
45 | { "Mic", 0x0 }, | |
46 | { "Front Mic", 0x1 }, | |
47 | { "Line", 0x2 }, | |
48 | { "CD", 0x4 }, | |
49 | }, | |
50 | }; | |
51 | ||
1d045db9 TI |
52 | /* Acer TravelMate(/Extensa/Aspire) notebooks have similar configuration to |
53 | * the Fujitsu S702x, but jacks are marked differently. | |
54 | */ | |
55 | static const struct hda_input_mux alc260_acer_capture_sources[2] = { | |
56 | { | |
57 | .num_items = 4, | |
58 | .items = { | |
59 | { "Mic", 0x0 }, | |
60 | { "Line", 0x2 }, | |
61 | { "CD", 0x4 }, | |
62 | { "Headphone", 0x5 }, | |
63 | }, | |
64 | }, | |
65 | { | |
66 | .num_items = 5, | |
67 | .items = { | |
68 | { "Mic", 0x0 }, | |
69 | { "Line", 0x2 }, | |
70 | { "CD", 0x4 }, | |
71 | { "Headphone", 0x6 }, | |
72 | { "Mixer", 0x5 }, | |
73 | }, | |
74 | }, | |
75 | }; | |
76 | ||
1d045db9 TI |
77 | /* |
78 | * This is just place-holder, so there's something for alc_build_pcms to look | |
79 | * at when it calculates the maximum number of channels. ALC260 has no mixer | |
80 | * element which allows changing the channel mode, so the verb list is | |
81 | * never used. | |
82 | */ | |
83 | static const struct hda_channel_mode alc260_modes[1] = { | |
84 | { 2, NULL }, | |
85 | }; | |
86 | ||
87 | ||
88 | /* Mixer combinations | |
89 | * | |
90 | * basic: base_output + input + pc_beep + capture | |
1d045db9 TI |
91 | * fujitsu: fujitsu + capture |
92 | * acer: acer + capture | |
93 | */ | |
94 | ||
95 | static const struct snd_kcontrol_new alc260_base_output_mixer[] = { | |
96 | HDA_CODEC_VOLUME("Front Playback Volume", 0x08, 0x0, HDA_OUTPUT), | |
97 | HDA_BIND_MUTE("Front Playback Switch", 0x08, 2, HDA_INPUT), | |
98 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x09, 0x0, HDA_OUTPUT), | |
99 | HDA_BIND_MUTE("Headphone Playback Switch", 0x09, 2, HDA_INPUT), | |
100 | HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT), | |
101 | HDA_BIND_MUTE_MONO("Mono Playback Switch", 0x0a, 1, 2, HDA_INPUT), | |
102 | { } /* end */ | |
103 | }; | |
104 | ||
105 | static const struct snd_kcontrol_new alc260_input_mixer[] = { | |
106 | HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT), | |
107 | HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT), | |
108 | HDA_CODEC_VOLUME("Line Playback Volume", 0x07, 0x02, HDA_INPUT), | |
109 | HDA_CODEC_MUTE("Line Playback Switch", 0x07, 0x02, HDA_INPUT), | |
110 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x07, 0x0, HDA_INPUT), | |
111 | HDA_CODEC_MUTE("Mic Playback Switch", 0x07, 0x0, HDA_INPUT), | |
112 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x07, 0x01, HDA_INPUT), | |
113 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x07, 0x01, HDA_INPUT), | |
114 | { } /* end */ | |
115 | }; | |
116 | ||
1d045db9 TI |
117 | /* |
118 | * initialization verbs | |
119 | */ | |
120 | static const struct hda_verb alc260_init_verbs[] = { | |
121 | /* Line In pin widget for input */ | |
122 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | |
123 | /* CD pin widget for input */ | |
124 | {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | |
125 | /* Mic1 (rear panel) pin widget for input and vref at 80% */ | |
126 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | |
127 | /* Mic2 (front panel) pin widget for input and vref at 80% */ | |
128 | {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | |
129 | /* LINE-2 is used for line-out in rear */ | |
130 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | |
131 | /* select line-out */ | |
132 | {0x0e, AC_VERB_SET_CONNECT_SEL, 0x00}, | |
133 | /* LINE-OUT pin */ | |
134 | {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | |
135 | /* enable HP */ | |
136 | {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | |
137 | /* enable Mono */ | |
138 | {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | |
139 | /* mute capture amp left and right */ | |
140 | {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | |
141 | /* set connection select to line in (default select for this ADC) */ | |
142 | {0x04, AC_VERB_SET_CONNECT_SEL, 0x02}, | |
143 | /* mute capture amp left and right */ | |
144 | {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | |
145 | /* set connection select to line in (default select for this ADC) */ | |
146 | {0x05, AC_VERB_SET_CONNECT_SEL, 0x02}, | |
147 | /* set vol=0 Line-Out mixer amp left and right */ | |
148 | {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | |
149 | /* unmute pin widget amp left and right (no gain on this amp) */ | |
150 | {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | |
151 | /* set vol=0 HP mixer amp left and right */ | |
152 | {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | |
153 | /* unmute pin widget amp left and right (no gain on this amp) */ | |
154 | {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | |
155 | /* set vol=0 Mono mixer amp left and right */ | |
156 | {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | |
157 | /* unmute pin widget amp left and right (no gain on this amp) */ | |
158 | {0x11, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | |
159 | /* unmute LINE-2 out pin */ | |
160 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | |
161 | /* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 & | |
162 | * Line In 2 = 0x03 | |
163 | */ | |
164 | /* mute analog inputs */ | |
165 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | |
166 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | |
167 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, | |
168 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, | |
169 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, | |
170 | /* Amp Indexes: DAC = 0x01 & mixer = 0x00 */ | |
171 | /* mute Front out path */ | |
172 | {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | |
173 | {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | |
174 | /* mute Headphone out path */ | |
175 | {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | |
176 | {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | |
177 | /* mute Mono out path */ | |
178 | {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | |
179 | {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | |
180 | { } | |
181 | }; | |
182 | ||
1d045db9 TI |
183 | static const struct hda_verb alc260_hp_dc7600_verbs[] = { |
184 | {0x05, AC_VERB_SET_CONNECT_SEL, 0x01}, | |
185 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, | |
186 | {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | |
187 | {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | |
188 | {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | |
189 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | |
190 | {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | |
191 | {0x10, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | |
192 | {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | |
193 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | |
194 | {} | |
195 | }; | |
196 | ||
197 | /* Test configuration for debugging, modelled after the ALC880 test | |
198 | * configuration. | |
199 | */ | |
200 | #ifdef CONFIG_SND_DEBUG | |
201 | static const hda_nid_t alc260_test_dac_nids[1] = { | |
202 | 0x02, | |
203 | }; | |
204 | static const hda_nid_t alc260_test_adc_nids[2] = { | |
205 | 0x04, 0x05, | |
206 | }; | |
207 | /* For testing the ALC260, each input MUX needs its own definition since | |
208 | * the signal assignments are different. This assumes that the first ADC | |
209 | * is NID 0x04. | |
210 | */ | |
211 | static const struct hda_input_mux alc260_test_capture_sources[2] = { | |
212 | { | |
213 | .num_items = 7, | |
214 | .items = { | |
215 | { "MIC1 pin", 0x0 }, | |
216 | { "MIC2 pin", 0x1 }, | |
217 | { "LINE1 pin", 0x2 }, | |
218 | { "LINE2 pin", 0x3 }, | |
219 | { "CD pin", 0x4 }, | |
220 | { "LINE-OUT pin", 0x5 }, | |
221 | { "HP-OUT pin", 0x6 }, | |
222 | }, | |
223 | }, | |
224 | { | |
225 | .num_items = 8, | |
226 | .items = { | |
227 | { "MIC1 pin", 0x0 }, | |
228 | { "MIC2 pin", 0x1 }, | |
229 | { "LINE1 pin", 0x2 }, | |
230 | { "LINE2 pin", 0x3 }, | |
231 | { "CD pin", 0x4 }, | |
232 | { "Mixer", 0x5 }, | |
233 | { "LINE-OUT pin", 0x6 }, | |
234 | { "HP-OUT pin", 0x7 }, | |
235 | }, | |
236 | }, | |
237 | }; | |
238 | static const struct snd_kcontrol_new alc260_test_mixer[] = { | |
239 | /* Output driver widgets */ | |
240 | HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT), | |
241 | HDA_BIND_MUTE_MONO("Mono Playback Switch", 0x0a, 1, 2, HDA_INPUT), | |
242 | HDA_CODEC_VOLUME("LOUT2 Playback Volume", 0x09, 0x0, HDA_OUTPUT), | |
243 | HDA_BIND_MUTE("LOUT2 Playback Switch", 0x09, 2, HDA_INPUT), | |
244 | HDA_CODEC_VOLUME("LOUT1 Playback Volume", 0x08, 0x0, HDA_OUTPUT), | |
245 | HDA_BIND_MUTE("LOUT1 Playback Switch", 0x08, 2, HDA_INPUT), | |
246 | ||
247 | /* Modes for retasking pin widgets | |
248 | * Note: the ALC260 doesn't seem to act on requests to enable mic | |
249 | * bias from NIDs 0x0f and 0x10. The ALC260 datasheet doesn't | |
250 | * mention this restriction. At this stage it's not clear whether | |
251 | * this behaviour is intentional or is a hardware bug in chip | |
252 | * revisions available at least up until early 2006. Therefore for | |
253 | * now allow the "HP-OUT" and "LINE-OUT" Mode controls to span all | |
254 | * choices, but if it turns out that the lack of mic bias for these | |
255 | * NIDs is intentional we could change their modes from | |
256 | * ALC_PIN_DIR_INOUT to ALC_PIN_DIR_INOUT_NOMICBIAS. | |
257 | */ | |
258 | ALC_PIN_MODE("HP-OUT pin mode", 0x10, ALC_PIN_DIR_INOUT), | |
259 | ALC_PIN_MODE("LINE-OUT pin mode", 0x0f, ALC_PIN_DIR_INOUT), | |
260 | ALC_PIN_MODE("LINE2 pin mode", 0x15, ALC_PIN_DIR_INOUT), | |
261 | ALC_PIN_MODE("LINE1 pin mode", 0x14, ALC_PIN_DIR_INOUT), | |
262 | ALC_PIN_MODE("MIC2 pin mode", 0x13, ALC_PIN_DIR_INOUT), | |
263 | ALC_PIN_MODE("MIC1 pin mode", 0x12, ALC_PIN_DIR_INOUT), | |
264 | ||
265 | /* Loopback mixer controls */ | |
266 | HDA_CODEC_VOLUME("MIC1 Playback Volume", 0x07, 0x00, HDA_INPUT), | |
267 | HDA_CODEC_MUTE("MIC1 Playback Switch", 0x07, 0x00, HDA_INPUT), | |
268 | HDA_CODEC_VOLUME("MIC2 Playback Volume", 0x07, 0x01, HDA_INPUT), | |
269 | HDA_CODEC_MUTE("MIC2 Playback Switch", 0x07, 0x01, HDA_INPUT), | |
270 | HDA_CODEC_VOLUME("LINE1 Playback Volume", 0x07, 0x02, HDA_INPUT), | |
271 | HDA_CODEC_MUTE("LINE1 Playback Switch", 0x07, 0x02, HDA_INPUT), | |
272 | HDA_CODEC_VOLUME("LINE2 Playback Volume", 0x07, 0x03, HDA_INPUT), | |
273 | HDA_CODEC_MUTE("LINE2 Playback Switch", 0x07, 0x03, HDA_INPUT), | |
274 | HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT), | |
275 | HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT), | |
276 | HDA_CODEC_VOLUME("LINE-OUT loopback Playback Volume", 0x07, 0x06, HDA_INPUT), | |
277 | HDA_CODEC_MUTE("LINE-OUT loopback Playback Switch", 0x07, 0x06, HDA_INPUT), | |
278 | HDA_CODEC_VOLUME("HP-OUT loopback Playback Volume", 0x07, 0x7, HDA_INPUT), | |
279 | HDA_CODEC_MUTE("HP-OUT loopback Playback Switch", 0x07, 0x7, HDA_INPUT), | |
280 | ||
281 | /* Controls for GPIO pins, assuming they are configured as outputs */ | |
282 | ALC_GPIO_DATA_SWITCH("GPIO pin 0", 0x01, 0x01), | |
283 | ALC_GPIO_DATA_SWITCH("GPIO pin 1", 0x01, 0x02), | |
284 | ALC_GPIO_DATA_SWITCH("GPIO pin 2", 0x01, 0x04), | |
285 | ALC_GPIO_DATA_SWITCH("GPIO pin 3", 0x01, 0x08), | |
286 | ||
287 | /* Switches to allow the digital IO pins to be enabled. The datasheet | |
288 | * is ambigious as to which NID is which; testing on laptops which | |
289 | * make this output available should provide clarification. | |
290 | */ | |
291 | ALC_SPDIF_CTRL_SWITCH("SPDIF Playback Switch", 0x03, 0x01), | |
292 | ALC_SPDIF_CTRL_SWITCH("SPDIF Capture Switch", 0x06, 0x01), | |
293 | ||
294 | /* A switch allowing EAPD to be enabled. Some laptops seem to use | |
295 | * this output to turn on an external amplifier. | |
296 | */ | |
297 | ALC_EAPD_CTRL_SWITCH("LINE-OUT EAPD Enable Switch", 0x0f, 0x02), | |
298 | ALC_EAPD_CTRL_SWITCH("HP-OUT EAPD Enable Switch", 0x10, 0x02), | |
299 | ||
300 | { } /* end */ | |
301 | }; | |
302 | static const struct hda_verb alc260_test_init_verbs[] = { | |
303 | /* Enable all GPIOs as outputs with an initial value of 0 */ | |
304 | {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x0f}, | |
305 | {0x01, AC_VERB_SET_GPIO_DATA, 0x00}, | |
306 | {0x01, AC_VERB_SET_GPIO_MASK, 0x0f}, | |
307 | ||
308 | /* Enable retasking pins as output, initially without power amp */ | |
309 | {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | |
310 | {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | |
311 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | |
312 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | |
313 | {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | |
314 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | |
315 | ||
316 | /* Disable digital (SPDIF) pins initially, but users can enable | |
317 | * them via a mixer switch. In the case of SPDIF-out, this initverb | |
318 | * payload also sets the generation to 0, output to be in "consumer" | |
319 | * PCM format, copyright asserted, no pre-emphasis and no validity | |
320 | * control. | |
321 | */ | |
322 | {0x03, AC_VERB_SET_DIGI_CONVERT_1, 0}, | |
323 | {0x06, AC_VERB_SET_DIGI_CONVERT_1, 0}, | |
324 | ||
325 | /* Ensure mic1, mic2, line1 and line2 pin widgets take input from the | |
326 | * OUT1 sum bus when acting as an output. | |
327 | */ | |
328 | {0x0b, AC_VERB_SET_CONNECT_SEL, 0}, | |
329 | {0x0c, AC_VERB_SET_CONNECT_SEL, 0}, | |
330 | {0x0d, AC_VERB_SET_CONNECT_SEL, 0}, | |
331 | {0x0e, AC_VERB_SET_CONNECT_SEL, 0}, | |
332 | ||
333 | /* Start with output sum widgets muted and their output gains at min */ | |
334 | {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | |
335 | {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | |
336 | {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | |
337 | {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | |
338 | {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | |
339 | {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | |
340 | {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | |
341 | {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | |
342 | {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | |
343 | ||
344 | /* Unmute retasking pin widget output buffers since the default | |
345 | * state appears to be output. As the pin mode is changed by the | |
346 | * user the pin mode control will take care of enabling the pin's | |
347 | * input/output buffers as needed. | |
348 | */ | |
349 | {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | |
350 | {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | |
351 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | |
352 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | |
353 | {0x13, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | |
354 | {0x12, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | |
355 | /* Also unmute the mono-out pin widget */ | |
356 | {0x11, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | |
357 | ||
358 | /* Mute capture amp left and right */ | |
359 | {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | |
360 | /* Set ADC connection select to match default mixer setting (mic1 | |
361 | * pin) | |
362 | */ | |
363 | {0x04, AC_VERB_SET_CONNECT_SEL, 0x00}, | |
364 | ||
365 | /* Do the same for the second ADC: mute capture input amp and | |
366 | * set ADC connection to mic1 pin | |
367 | */ | |
368 | {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | |
369 | {0x05, AC_VERB_SET_CONNECT_SEL, 0x00}, | |
370 | ||
371 | /* Mute all inputs to mixer widget (even unconnected ones) */ | |
372 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* mic1 pin */ | |
373 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, /* mic2 pin */ | |
374 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, /* line1 pin */ | |
375 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, /* line2 pin */ | |
376 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, /* CD pin */ | |
377 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)}, /* Beep-gen pin */ | |
378 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)}, /* Line-out pin */ | |
379 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(7)}, /* HP-pin pin */ | |
380 | ||
381 | { } | |
382 | }; | |
383 | #endif | |
384 | ||
385 | /* | |
386 | * ALC260 configurations | |
387 | */ | |
388 | static const char * const alc260_models[ALC260_MODEL_LAST] = { | |
389 | [ALC260_BASIC] = "basic", | |
1d045db9 TI |
390 | #ifdef CONFIG_SND_DEBUG |
391 | [ALC260_TEST] = "test", | |
392 | #endif | |
393 | [ALC260_AUTO] = "auto", | |
394 | }; | |
395 | ||
396 | static const struct snd_pci_quirk alc260_cfg_tbl[] = { | |
1d045db9 TI |
397 | SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_BASIC), |
398 | SND_PCI_QUIRK(0x104d, 0x81cc, "Sony VAIO", ALC260_BASIC), | |
399 | SND_PCI_QUIRK(0x104d, 0x81cd, "Sony VAIO", ALC260_BASIC), | |
1d045db9 | 400 | SND_PCI_QUIRK(0x152d, 0x0729, "CTL U553W", ALC260_BASIC), |
1d045db9 TI |
401 | {} |
402 | }; | |
403 | ||
404 | static const struct alc_config_preset alc260_presets[] = { | |
405 | [ALC260_BASIC] = { | |
406 | .mixers = { alc260_base_output_mixer, | |
407 | alc260_input_mixer }, | |
408 | .init_verbs = { alc260_init_verbs }, | |
409 | .num_dacs = ARRAY_SIZE(alc260_dac_nids), | |
410 | .dac_nids = alc260_dac_nids, | |
411 | .num_adc_nids = ARRAY_SIZE(alc260_dual_adc_nids), | |
412 | .adc_nids = alc260_dual_adc_nids, | |
413 | .num_channel_mode = ARRAY_SIZE(alc260_modes), | |
414 | .channel_mode = alc260_modes, | |
415 | .input_mux = &alc260_capture_source, | |
416 | }, | |
1d045db9 TI |
417 | #ifdef CONFIG_SND_DEBUG |
418 | [ALC260_TEST] = { | |
419 | .mixers = { alc260_test_mixer }, | |
420 | .init_verbs = { alc260_test_init_verbs }, | |
421 | .num_dacs = ARRAY_SIZE(alc260_test_dac_nids), | |
422 | .dac_nids = alc260_test_dac_nids, | |
423 | .num_adc_nids = ARRAY_SIZE(alc260_test_adc_nids), | |
424 | .adc_nids = alc260_test_adc_nids, | |
425 | .num_channel_mode = ARRAY_SIZE(alc260_modes), | |
426 | .channel_mode = alc260_modes, | |
427 | .num_mux_defs = ARRAY_SIZE(alc260_test_capture_sources), | |
428 | .input_mux = alc260_test_capture_sources, | |
429 | }, | |
430 | #endif | |
431 | }; | |
432 |