diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-11-10 10:01:47 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-11-10 10:01:47 -0500 |
commit | c3e837bbcc03e39991da5dd1f791c06cde9f7a45 (patch) | |
tree | 83f38e26549ae0bb0d347534f12852e4f27a4c57 /sound | |
parent | 07b18f69a766375736a5313c29d808e59b1e13e9 (diff) |
ALSA: hda/realtek - Rewrite ALC882 acer-aspire-* models with the auto-parser
Now we can move the big acer-aspire-* static quirks to the auto-paresr
with some additional pin-configs and verbs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/alc882_quirks.c | 425 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 74 |
2 files changed, 69 insertions, 430 deletions
diff --git a/sound/pci/hda/alc882_quirks.c b/sound/pci/hda/alc882_quirks.c index ccd20d1cfdfd..c1f6ac660fea 100644 --- a/sound/pci/hda/alc882_quirks.c +++ b/sound/pci/hda/alc882_quirks.c | |||
@@ -21,322 +21,6 @@ enum { | |||
21 | ALC882_MODEL_LAST, | 21 | ALC882_MODEL_LAST, |
22 | }; | 22 | }; |
23 | 23 | ||
24 | /* | ||
25 | * ALC888 Acer Aspire 4930G model | ||
26 | */ | ||
27 | |||
28 | static const struct hda_verb alc888_acer_aspire_4930g_verbs[] = { | ||
29 | /* Front Mic: set to PIN_IN (empty by default) */ | ||
30 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
31 | /* Unselect Front Mic by default in input mixer 3 */ | ||
32 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0xb)}, | ||
33 | /* Enable unsolicited event for HP jack */ | ||
34 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN}, | ||
35 | /* Connect Internal HP to front */ | ||
36 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
37 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
38 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
39 | /* Connect HP out to front */ | ||
40 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
41 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
42 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
43 | {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2}, | ||
44 | { } | ||
45 | }; | ||
46 | |||
47 | /* | ||
48 | * ALC888 Acer Aspire 6530G model | ||
49 | */ | ||
50 | |||
51 | static const struct hda_verb alc888_acer_aspire_6530g_verbs[] = { | ||
52 | /* Route to built-in subwoofer as well as speakers */ | ||
53 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
54 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
55 | {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
56 | {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
57 | /* Bias voltage on for external mic port */ | ||
58 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN | PIN_VREF80}, | ||
59 | /* Front Mic: set to PIN_IN (empty by default) */ | ||
60 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
61 | /* Unselect Front Mic by default in input mixer 3 */ | ||
62 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0xb)}, | ||
63 | /* Enable unsolicited event for HP jack */ | ||
64 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN}, | ||
65 | /* Enable speaker output */ | ||
66 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
67 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
68 | {0x14, AC_VERB_SET_EAPD_BTLENABLE, 2}, | ||
69 | /* Enable headphone output */ | ||
70 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT | PIN_HP}, | ||
71 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
72 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
73 | {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2}, | ||
74 | { } | ||
75 | }; | ||
76 | |||
77 | /* | ||
78 | *ALC888 Acer Aspire 7730G model | ||
79 | */ | ||
80 | |||
81 | static const struct hda_verb alc888_acer_aspire_7730G_verbs[] = { | ||
82 | /* Bias voltage on for external mic port */ | ||
83 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN | PIN_VREF80}, | ||
84 | /* Front Mic: set to PIN_IN (empty by default) */ | ||
85 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
86 | /* Unselect Front Mic by default in input mixer 3 */ | ||
87 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0xb)}, | ||
88 | /* Enable unsolicited event for HP jack */ | ||
89 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN}, | ||
90 | /* Enable speaker output */ | ||
91 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
92 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
93 | {0x14, AC_VERB_SET_EAPD_BTLENABLE, 2}, | ||
94 | /* Enable headphone output */ | ||
95 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT | PIN_HP}, | ||
96 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
97 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
98 | {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2}, | ||
99 | /*Enable internal subwoofer */ | ||
100 | {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
101 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
102 | {0x17, AC_VERB_SET_CONNECT_SEL, 0x02}, | ||
103 | {0x17, AC_VERB_SET_EAPD_BTLENABLE, 2}, | ||
104 | { } | ||
105 | }; | ||
106 | |||
107 | /* | ||
108 | * ALC889 Acer Aspire 8930G model | ||
109 | */ | ||
110 | |||
111 | static const struct hda_verb alc889_acer_aspire_8930g_verbs[] = { | ||
112 | /* Front Mic: set to PIN_IN (empty by default) */ | ||
113 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
114 | /* Unselect Front Mic by default in input mixer 3 */ | ||
115 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0xb)}, | ||
116 | /* Enable unsolicited event for HP jack */ | ||
117 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN}, | ||
118 | /* Connect Internal Front to Front */ | ||
119 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
120 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
121 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
122 | /* Connect Internal Rear to Rear */ | ||
123 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
124 | {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
125 | {0x1b, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
126 | /* Connect Internal CLFE to CLFE */ | ||
127 | {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
128 | {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
129 | {0x16, AC_VERB_SET_CONNECT_SEL, 0x02}, | ||
130 | /* Connect HP out to Front */ | ||
131 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT | PIN_HP}, | ||
132 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
133 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
134 | /* Enable all DACs */ | ||
135 | /* DAC DISABLE/MUTE 1? */ | ||
136 | /* setting bits 1-5 disables DAC nids 0x02-0x06 apparently. Init=0x38 */ | ||
137 | {0x20, AC_VERB_SET_COEF_INDEX, 0x03}, | ||
138 | {0x20, AC_VERB_SET_PROC_COEF, 0x0000}, | ||
139 | /* DAC DISABLE/MUTE 2? */ | ||
140 | /* some bit here disables the other DACs. Init=0x4900 */ | ||
141 | {0x20, AC_VERB_SET_COEF_INDEX, 0x08}, | ||
142 | {0x20, AC_VERB_SET_PROC_COEF, 0x0000}, | ||
143 | /* DMIC fix | ||
144 | * This laptop has a stereo digital microphone. The mics are only 1cm apart | ||
145 | * which makes the stereo useless. However, either the mic or the ALC889 | ||
146 | * makes the signal become a difference/sum signal instead of standard | ||
147 | * stereo, which is annoying. So instead we flip this bit which makes the | ||
148 | * codec replicate the sum signal to both channels, turning it into a | ||
149 | * normal mono mic. | ||
150 | */ | ||
151 | /* DMIC_CONTROL? Init value = 0x0001 */ | ||
152 | {0x20, AC_VERB_SET_COEF_INDEX, 0x0b}, | ||
153 | {0x20, AC_VERB_SET_PROC_COEF, 0x0003}, | ||
154 | { } | ||
155 | }; | ||
156 | |||
157 | static const struct hda_input_mux alc888_2_capture_sources[2] = { | ||
158 | /* Front mic only available on one ADC */ | ||
159 | { | ||
160 | .num_items = 4, | ||
161 | .items = { | ||
162 | { "Mic", 0x0 }, | ||
163 | { "Line", 0x2 }, | ||
164 | { "CD", 0x4 }, | ||
165 | { "Front Mic", 0xb }, | ||
166 | }, | ||
167 | }, | ||
168 | { | ||
169 | .num_items = 3, | ||
170 | .items = { | ||
171 | { "Mic", 0x0 }, | ||
172 | { "Line", 0x2 }, | ||
173 | { "CD", 0x4 }, | ||
174 | }, | ||
175 | } | ||
176 | }; | ||
177 | |||
178 | static const struct hda_input_mux alc888_acer_aspire_6530_sources[2] = { | ||
179 | /* Interal mic only available on one ADC */ | ||
180 | { | ||
181 | .num_items = 5, | ||
182 | .items = { | ||
183 | { "Mic", 0x0 }, | ||
184 | { "Line In", 0x2 }, | ||
185 | { "CD", 0x4 }, | ||
186 | { "Input Mix", 0xa }, | ||
187 | { "Internal Mic", 0xb }, | ||
188 | }, | ||
189 | }, | ||
190 | { | ||
191 | .num_items = 4, | ||
192 | .items = { | ||
193 | { "Mic", 0x0 }, | ||
194 | { "Line In", 0x2 }, | ||
195 | { "CD", 0x4 }, | ||
196 | { "Input Mix", 0xa }, | ||
197 | }, | ||
198 | } | ||
199 | }; | ||
200 | |||
201 | static const struct hda_input_mux alc889_capture_sources[3] = { | ||
202 | /* Digital mic only available on first "ADC" */ | ||
203 | { | ||
204 | .num_items = 5, | ||
205 | .items = { | ||
206 | { "Mic", 0x0 }, | ||
207 | { "Line", 0x2 }, | ||
208 | { "CD", 0x4 }, | ||
209 | { "Front Mic", 0xb }, | ||
210 | { "Input Mix", 0xa }, | ||
211 | }, | ||
212 | }, | ||
213 | { | ||
214 | .num_items = 4, | ||
215 | .items = { | ||
216 | { "Mic", 0x0 }, | ||
217 | { "Line", 0x2 }, | ||
218 | { "CD", 0x4 }, | ||
219 | { "Input Mix", 0xa }, | ||
220 | }, | ||
221 | }, | ||
222 | { | ||
223 | .num_items = 4, | ||
224 | .items = { | ||
225 | { "Mic", 0x0 }, | ||
226 | { "Line", 0x2 }, | ||
227 | { "CD", 0x4 }, | ||
228 | { "Input Mix", 0xa }, | ||
229 | }, | ||
230 | } | ||
231 | }; | ||
232 | |||
233 | static const struct snd_kcontrol_new alc888_base_mixer[] = { | ||
234 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
235 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
236 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | ||
237 | HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), | ||
238 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, | ||
239 | HDA_OUTPUT), | ||
240 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), | ||
241 | HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), | ||
242 | HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), | ||
243 | HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), | ||
244 | HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT), | ||
245 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
246 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
247 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
248 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
249 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
250 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
251 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
252 | { } /* end */ | ||
253 | }; | ||
254 | |||
255 | static const struct snd_kcontrol_new alc888_acer_aspire_4930g_mixer[] = { | ||
256 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
257 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
258 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | ||
259 | HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), | ||
260 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, | ||
261 | HDA_OUTPUT), | ||
262 | HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), | ||
263 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), | ||
264 | HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), | ||
265 | HDA_CODEC_VOLUME_MONO("Internal LFE Playback Volume", 0x0f, 1, 0x0, HDA_OUTPUT), | ||
266 | HDA_BIND_MUTE_MONO("Internal LFE Playback Switch", 0x0f, 1, 2, HDA_INPUT), | ||
267 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
268 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
269 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
270 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
271 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
272 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
273 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
274 | { } /* end */ | ||
275 | }; | ||
276 | |||
277 | static const struct snd_kcontrol_new alc889_acer_aspire_8930g_mixer[] = { | ||
278 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
279 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
280 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | ||
281 | HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), | ||
282 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, | ||
283 | HDA_OUTPUT), | ||
284 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), | ||
285 | HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), | ||
286 | HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), | ||
287 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
288 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
289 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
290 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
291 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
292 | { } /* end */ | ||
293 | }; | ||
294 | |||
295 | |||
296 | static void alc888_acer_aspire_4930g_setup(struct hda_codec *codec) | ||
297 | { | ||
298 | struct alc_spec *spec = codec->spec; | ||
299 | |||
300 | spec->autocfg.hp_pins[0] = 0x15; | ||
301 | spec->autocfg.speaker_pins[0] = 0x14; | ||
302 | spec->autocfg.speaker_pins[1] = 0x16; | ||
303 | spec->autocfg.speaker_pins[2] = 0x17; | ||
304 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | ||
305 | } | ||
306 | |||
307 | static void alc888_acer_aspire_6530g_setup(struct hda_codec *codec) | ||
308 | { | ||
309 | struct alc_spec *spec = codec->spec; | ||
310 | |||
311 | spec->autocfg.hp_pins[0] = 0x15; | ||
312 | spec->autocfg.speaker_pins[0] = 0x14; | ||
313 | spec->autocfg.speaker_pins[1] = 0x16; | ||
314 | spec->autocfg.speaker_pins[2] = 0x17; | ||
315 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | ||
316 | } | ||
317 | |||
318 | static void alc888_acer_aspire_7730g_setup(struct hda_codec *codec) | ||
319 | { | ||
320 | struct alc_spec *spec = codec->spec; | ||
321 | |||
322 | spec->autocfg.hp_pins[0] = 0x15; | ||
323 | spec->autocfg.speaker_pins[0] = 0x14; | ||
324 | spec->autocfg.speaker_pins[1] = 0x16; | ||
325 | spec->autocfg.speaker_pins[2] = 0x17; | ||
326 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | ||
327 | } | ||
328 | |||
329 | static void alc889_acer_aspire_8930g_setup(struct hda_codec *codec) | ||
330 | { | ||
331 | struct alc_spec *spec = codec->spec; | ||
332 | |||
333 | spec->autocfg.hp_pins[0] = 0x15; | ||
334 | spec->autocfg.speaker_pins[0] = 0x14; | ||
335 | spec->autocfg.speaker_pins[1] = 0x16; | ||
336 | spec->autocfg.speaker_pins[2] = 0x1b; | ||
337 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | ||
338 | } | ||
339 | |||
340 | #define ALC882_DIGOUT_NID 0x06 | 24 | #define ALC882_DIGOUT_NID 0x06 |
341 | #define ALC882_DIGIN_NID 0x0a | 25 | #define ALC882_DIGIN_NID 0x0a |
342 | #define ALC883_DIGOUT_NID ALC882_DIGOUT_NID | 26 | #define ALC883_DIGOUT_NID ALC882_DIGOUT_NID |
@@ -1301,32 +985,10 @@ static const char * const alc882_models[ALC882_MODEL_LAST] = { | |||
1301 | [ALC885_MBP3] = "mbp3", | 985 | [ALC885_MBP3] = "mbp3", |
1302 | [ALC885_IMAC24] = "imac24", | 986 | [ALC885_IMAC24] = "imac24", |
1303 | [ALC885_IMAC91] = "imac91", | 987 | [ALC885_IMAC91] = "imac91", |
1304 | [ALC888_ACER_ASPIRE_4930G] = "acer-aspire-4930g", | ||
1305 | [ALC888_ACER_ASPIRE_6530G] = "acer-aspire-6530g", | ||
1306 | [ALC888_ACER_ASPIRE_8930G] = "acer-aspire-8930g", | ||
1307 | [ALC888_ACER_ASPIRE_7730G] = "acer-aspire-7730g", | ||
1308 | [ALC889A_MB31] = "mb31", | 988 | [ALC889A_MB31] = "mb31", |
1309 | [ALC882_AUTO] = "auto", | 989 | [ALC882_AUTO] = "auto", |
1310 | }; | 990 | }; |
1311 | 991 | ||
1312 | static const struct snd_pci_quirk alc882_cfg_tbl[] = { | ||
1313 | SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G", | ||
1314 | ALC888_ACER_ASPIRE_4930G), | ||
1315 | SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G", | ||
1316 | ALC888_ACER_ASPIRE_4930G), | ||
1317 | SND_PCI_QUIRK(0x1025, 0x0145, "Acer Aspire 8930G", | ||
1318 | ALC888_ACER_ASPIRE_8930G), | ||
1319 | SND_PCI_QUIRK(0x1025, 0x0146, "Acer Aspire 6935G", | ||
1320 | ALC888_ACER_ASPIRE_8930G), | ||
1321 | SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G", | ||
1322 | ALC888_ACER_ASPIRE_6530G), | ||
1323 | SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G", | ||
1324 | ALC888_ACER_ASPIRE_6530G), | ||
1325 | SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G", | ||
1326 | ALC888_ACER_ASPIRE_7730G), | ||
1327 | {} | ||
1328 | }; | ||
1329 | |||
1330 | /* codec SSID table for Intel Mac */ | 992 | /* codec SSID table for Intel Mac */ |
1331 | static const struct snd_pci_quirk alc882_ssid_cfg_tbl[] = { | 993 | static const struct snd_pci_quirk alc882_ssid_cfg_tbl[] = { |
1332 | SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC885_MBP3), | 994 | SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC885_MBP3), |
@@ -1454,93 +1116,6 @@ static const struct alc_config_preset alc882_presets[] = { | |||
1454 | .setup = alc885_imac91_setup, | 1116 | .setup = alc885_imac91_setup, |
1455 | .init_hook = alc_hp_automute, | 1117 | .init_hook = alc_hp_automute, |
1456 | }, | 1118 | }, |
1457 | [ALC888_ACER_ASPIRE_4930G] = { | ||
1458 | .mixers = { alc888_acer_aspire_4930g_mixer, | ||
1459 | alc883_chmode_mixer }, | ||
1460 | .init_verbs = { alc883_init_verbs, alc880_gpio1_init_verbs, | ||
1461 | alc888_acer_aspire_4930g_verbs }, | ||
1462 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
1463 | .dac_nids = alc883_dac_nids, | ||
1464 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_rev), | ||
1465 | .adc_nids = alc883_adc_nids_rev, | ||
1466 | .capsrc_nids = alc883_capsrc_nids_rev, | ||
1467 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
1468 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), | ||
1469 | .channel_mode = alc883_3ST_6ch_modes, | ||
1470 | .need_dac_fix = 1, | ||
1471 | .const_channel_count = 6, | ||
1472 | .num_mux_defs = | ||
1473 | ARRAY_SIZE(alc888_2_capture_sources), | ||
1474 | .input_mux = alc888_2_capture_sources, | ||
1475 | .unsol_event = alc_sku_unsol_event, | ||
1476 | .setup = alc888_acer_aspire_4930g_setup, | ||
1477 | .init_hook = alc_hp_automute, | ||
1478 | }, | ||
1479 | [ALC888_ACER_ASPIRE_6530G] = { | ||
1480 | .mixers = { alc888_acer_aspire_6530_mixer }, | ||
1481 | .init_verbs = { alc883_init_verbs, alc880_gpio1_init_verbs, | ||
1482 | alc888_acer_aspire_6530g_verbs }, | ||
1483 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
1484 | .dac_nids = alc883_dac_nids, | ||
1485 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_rev), | ||
1486 | .adc_nids = alc883_adc_nids_rev, | ||
1487 | .capsrc_nids = alc883_capsrc_nids_rev, | ||
1488 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
1489 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), | ||
1490 | .channel_mode = alc883_3ST_2ch_modes, | ||
1491 | .num_mux_defs = | ||
1492 | ARRAY_SIZE(alc888_2_capture_sources), | ||
1493 | .input_mux = alc888_acer_aspire_6530_sources, | ||
1494 | .unsol_event = alc_sku_unsol_event, | ||
1495 | .setup = alc888_acer_aspire_6530g_setup, | ||
1496 | .init_hook = alc_hp_automute, | ||
1497 | }, | ||
1498 | [ALC888_ACER_ASPIRE_8930G] = { | ||
1499 | .mixers = { alc889_acer_aspire_8930g_mixer, | ||
1500 | alc883_chmode_mixer }, | ||
1501 | .init_verbs = { alc883_init_verbs, alc880_gpio1_init_verbs, | ||
1502 | alc889_acer_aspire_8930g_verbs, | ||
1503 | alc889_eapd_verbs}, | ||
1504 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
1505 | .dac_nids = alc883_dac_nids, | ||
1506 | .num_adc_nids = ARRAY_SIZE(alc889_adc_nids), | ||
1507 | .adc_nids = alc889_adc_nids, | ||
1508 | .capsrc_nids = alc889_capsrc_nids, | ||
1509 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
1510 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), | ||
1511 | .channel_mode = alc883_3ST_6ch_modes, | ||
1512 | .need_dac_fix = 1, | ||
1513 | .const_channel_count = 6, | ||
1514 | .num_mux_defs = | ||
1515 | ARRAY_SIZE(alc889_capture_sources), | ||
1516 | .input_mux = alc889_capture_sources, | ||
1517 | .unsol_event = alc_sku_unsol_event, | ||
1518 | .setup = alc889_acer_aspire_8930g_setup, | ||
1519 | .init_hook = alc_hp_automute, | ||
1520 | #ifdef CONFIG_SND_HDA_POWER_SAVE | ||
1521 | .power_hook = alc_power_eapd, | ||
1522 | #endif | ||
1523 | }, | ||
1524 | [ALC888_ACER_ASPIRE_7730G] = { | ||
1525 | .mixers = { alc883_3ST_6ch_mixer, | ||
1526 | alc883_chmode_mixer }, | ||
1527 | .init_verbs = { alc883_init_verbs, alc880_gpio1_init_verbs, | ||
1528 | alc888_acer_aspire_7730G_verbs }, | ||
1529 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
1530 | .dac_nids = alc883_dac_nids, | ||
1531 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_rev), | ||
1532 | .adc_nids = alc883_adc_nids_rev, | ||
1533 | .capsrc_nids = alc883_capsrc_nids_rev, | ||
1534 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
1535 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), | ||
1536 | .channel_mode = alc883_3ST_6ch_modes, | ||
1537 | .need_dac_fix = 1, | ||
1538 | .const_channel_count = 6, | ||
1539 | .input_mux = &alc883_capture_source, | ||
1540 | .unsol_event = alc_sku_unsol_event, | ||
1541 | .setup = alc888_acer_aspire_7730g_setup, | ||
1542 | .init_hook = alc_hp_automute, | ||
1543 | }, | ||
1544 | [ALC889A_MB31] = { | 1119 | [ALC889A_MB31] = { |
1545 | .mixers = { alc889A_mb31_mixer, alc883_chmode_mixer}, | 1120 | .mixers = { alc889A_mb31_mixer, alc883_chmode_mixer}, |
1546 | .init_verbs = { alc883_init_verbs, alc889A_mb31_verbs, | 1121 | .init_verbs = { alc883_init_verbs, alc889A_mb31_verbs, |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 8194c0725b6d..9fc2ba009489 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4280,6 +4280,9 @@ enum { | |||
4280 | ALC882_FIXUP_GPIO3, | 4280 | ALC882_FIXUP_GPIO3, |
4281 | ALC889_FIXUP_COEF, | 4281 | ALC889_FIXUP_COEF, |
4282 | ALC882_FIXUP_ASUS_W2JC, | 4282 | ALC882_FIXUP_ASUS_W2JC, |
4283 | ALC882_FIXUP_ACER_ASPIRE_4930G, | ||
4284 | ALC882_FIXUP_ACER_ASPIRE_8930G, | ||
4285 | ALC882_FIXUP_ASPIRE_8930G_VERBS, | ||
4283 | }; | 4286 | }; |
4284 | 4287 | ||
4285 | static void alc889_fixup_coef(struct hda_codec *codec, | 4288 | static void alc889_fixup_coef(struct hda_codec *codec, |
@@ -4382,6 +4385,57 @@ static const struct alc_fixup alc882_fixups[] = { | |||
4382 | .type = ALC_FIXUP_FUNC, | 4385 | .type = ALC_FIXUP_FUNC, |
4383 | .v.func = alc889_fixup_coef, | 4386 | .v.func = alc889_fixup_coef, |
4384 | }, | 4387 | }, |
4388 | [ALC882_FIXUP_ACER_ASPIRE_4930G] = { | ||
4389 | .type = ALC_FIXUP_PINS, | ||
4390 | .v.pins = (const struct alc_pincfg[]) { | ||
4391 | { 0x16, 0x99130111 }, /* CLFE speaker */ | ||
4392 | { 0x17, 0x99130112 }, /* surround speaker */ | ||
4393 | { } | ||
4394 | } | ||
4395 | }, | ||
4396 | [ALC882_FIXUP_ACER_ASPIRE_8930G] = { | ||
4397 | .type = ALC_FIXUP_PINS, | ||
4398 | .v.pins = (const struct alc_pincfg[]) { | ||
4399 | { 0x16, 0x99130111 }, /* CLFE speaker */ | ||
4400 | { 0x1b, 0x99130112 }, /* surround speaker */ | ||
4401 | { } | ||
4402 | }, | ||
4403 | .chained = true, | ||
4404 | .chain_id = ALC882_FIXUP_ASPIRE_8930G_VERBS, | ||
4405 | }, | ||
4406 | [ALC882_FIXUP_ASPIRE_8930G_VERBS] = { | ||
4407 | /* additional init verbs for Acer Aspire 8930G */ | ||
4408 | .type = ALC_FIXUP_VERBS, | ||
4409 | .v.verbs = (const struct hda_verb[]) { | ||
4410 | /* Enable all DACs */ | ||
4411 | /* DAC DISABLE/MUTE 1? */ | ||
4412 | /* setting bits 1-5 disables DAC nids 0x02-0x06 | ||
4413 | * apparently. Init=0x38 */ | ||
4414 | { 0x20, AC_VERB_SET_COEF_INDEX, 0x03 }, | ||
4415 | { 0x20, AC_VERB_SET_PROC_COEF, 0x0000 }, | ||
4416 | /* DAC DISABLE/MUTE 2? */ | ||
4417 | /* some bit here disables the other DACs. | ||
4418 | * Init=0x4900 */ | ||
4419 | { 0x20, AC_VERB_SET_COEF_INDEX, 0x08 }, | ||
4420 | { 0x20, AC_VERB_SET_PROC_COEF, 0x0000 }, | ||
4421 | /* DMIC fix | ||
4422 | * This laptop has a stereo digital microphone. | ||
4423 | * The mics are only 1cm apart which makes the stereo | ||
4424 | * useless. However, either the mic or the ALC889 | ||
4425 | * makes the signal become a difference/sum signal | ||
4426 | * instead of standard stereo, which is annoying. | ||
4427 | * So instead we flip this bit which makes the | ||
4428 | * codec replicate the sum signal to both channels, | ||
4429 | * turning it into a normal mono mic. | ||
4430 | */ | ||
4431 | /* DMIC_CONTROL? Init value = 0x0001 */ | ||
4432 | { 0x20, AC_VERB_SET_COEF_INDEX, 0x0b }, | ||
4433 | { 0x20, AC_VERB_SET_PROC_COEF, 0x0003 }, | ||
4434 | { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, | ||
4435 | { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 }, | ||
4436 | { } | ||
4437 | } | ||
4438 | }, | ||
4385 | }; | 4439 | }; |
4386 | 4440 | ||
4387 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { | 4441 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { |
@@ -4391,6 +4445,20 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { | |||
4391 | SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_FIXUP_ACER_EAPD), | 4445 | SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_FIXUP_ACER_EAPD), |
4392 | SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_FIXUP_ACER_EAPD), | 4446 | SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_FIXUP_ACER_EAPD), |
4393 | SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_FIXUP_ACER_EAPD), | 4447 | SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_FIXUP_ACER_EAPD), |
4448 | SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G", | ||
4449 | ALC882_FIXUP_ACER_ASPIRE_4930G), | ||
4450 | SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G", | ||
4451 | ALC882_FIXUP_ACER_ASPIRE_4930G), | ||
4452 | SND_PCI_QUIRK(0x1025, 0x0145, "Acer Aspire 8930G", | ||
4453 | ALC882_FIXUP_ACER_ASPIRE_8930G), | ||
4454 | SND_PCI_QUIRK(0x1025, 0x0146, "Acer Aspire 6935G", | ||
4455 | ALC882_FIXUP_ACER_ASPIRE_8930G), | ||
4456 | SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G", | ||
4457 | ALC882_FIXUP_ACER_ASPIRE_4930G), | ||
4458 | SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G", | ||
4459 | ALC882_FIXUP_ACER_ASPIRE_4930G), | ||
4460 | SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G", | ||
4461 | ALC882_FIXUP_ACER_ASPIRE_4930G), | ||
4394 | SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210), | 4462 | SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210), |
4395 | SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736), | 4463 | SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736), |
4396 | SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD), | 4464 | SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD), |
@@ -4453,11 +4521,7 @@ static int patch_alc882(struct hda_codec *codec) | |||
4453 | if (err < 0) | 4521 | if (err < 0) |
4454 | goto error; | 4522 | goto error; |
4455 | 4523 | ||
4456 | board_config = alc_board_config(codec, ALC882_MODEL_LAST, | 4524 | board_config = alc_board_codec_sid_config(codec, |
4457 | alc882_models, alc882_cfg_tbl); | ||
4458 | |||
4459 | if (board_config < 0) | ||
4460 | board_config = alc_board_codec_sid_config(codec, | ||
4461 | ALC882_MODEL_LAST, alc882_models, alc882_ssid_cfg_tbl); | 4525 | ALC882_MODEL_LAST, alc882_models, alc882_ssid_cfg_tbl); |
4462 | 4526 | ||
4463 | if (board_config < 0) { | 4527 | if (board_config < 0) { |