diff options
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 22d9d2104e99..ba72fffa7460 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -291,18 +291,14 @@ static void alc880_unsol_event(struct hda_codec *codec, unsigned int res) | |||
291 | /* additional initialization for ALC888 variants */ | 291 | /* additional initialization for ALC888 variants */ |
292 | static void alc888_coef_init(struct hda_codec *codec) | 292 | static void alc888_coef_init(struct hda_codec *codec) |
293 | { | 293 | { |
294 | if (alc_get_coef0(codec) == 0x20) | 294 | switch (alc_get_coef0(codec) & 0x00f0) { |
295 | /* alc888S-VC */ | 295 | /* alc888-VA */ |
296 | alc_write_coef_idx(codec, 7, 0x830); | 296 | case 0x00: |
297 | else | 297 | /* alc888-VB */ |
298 | /* alc888-VB */ | 298 | case 0x10: |
299 | alc_write_coef_idx(codec, 7, 0x3030); | 299 | alc_update_coef_idx(codec, 7, 0, 0x2030); /* Turn EAPD to High */ |
300 | } | 300 | break; |
301 | 301 | } | |
302 | /* additional initialization for ALC889 variants */ | ||
303 | static void alc889_coef_init(struct hda_codec *codec) | ||
304 | { | ||
305 | alc_update_coef_idx(codec, 7, 0, 0x2010); | ||
306 | } | 302 | } |
307 | 303 | ||
308 | /* turn on/off EAPD control (only if available) */ | 304 | /* turn on/off EAPD control (only if available) */ |
@@ -359,25 +355,15 @@ static void alc_auto_init_amp(struct hda_codec *codec, int type) | |||
359 | case 0x10ec0260: | 355 | case 0x10ec0260: |
360 | alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x2010); | 356 | alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x2010); |
361 | break; | 357 | break; |
362 | case 0x10ec0262: | ||
363 | case 0x10ec0880: | 358 | case 0x10ec0880: |
364 | case 0x10ec0882: | 359 | case 0x10ec0882: |
365 | case 0x10ec0883: | 360 | case 0x10ec0883: |
366 | case 0x10ec0885: | 361 | case 0x10ec0885: |
367 | case 0x10ec0887: | 362 | alc_update_coef_idx(codec, 7, 0, 0x2030); |
368 | /*case 0x10ec0889:*/ /* this causes an SPDIF problem */ | ||
369 | case 0x10ec0900: | ||
370 | alc889_coef_init(codec); | ||
371 | break; | 363 | break; |
372 | case 0x10ec0888: | 364 | case 0x10ec0888: |
373 | alc888_coef_init(codec); | 365 | alc888_coef_init(codec); |
374 | break; | 366 | break; |
375 | #if 0 /* XXX: This may cause the silent output on speaker on some machines */ | ||
376 | case 0x10ec0267: | ||
377 | case 0x10ec0268: | ||
378 | alc_update_coef_idx(codec, 7, 0, 0x3000); | ||
379 | break; | ||
380 | #endif /* XXX */ | ||
381 | } | 367 | } |
382 | break; | 368 | break; |
383 | } | 369 | } |
@@ -1710,7 +1696,7 @@ static void alc889_fixup_coef(struct hda_codec *codec, | |||
1710 | { | 1696 | { |
1711 | if (action != HDA_FIXUP_ACT_INIT) | 1697 | if (action != HDA_FIXUP_ACT_INIT) |
1712 | return; | 1698 | return; |
1713 | alc889_coef_init(codec); | 1699 | alc_update_coef_idx(codec, 7, 0, 0x2030); |
1714 | } | 1700 | } |
1715 | 1701 | ||
1716 | /* toggle speaker-output according to the hp-jack state */ | 1702 | /* toggle speaker-output according to the hp-jack state */ |