diff options
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 31 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 145 |
3 files changed, 148 insertions, 32 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 91fa959d05fe..966e6f98892d 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -219,6 +219,7 @@ MODULE_SUPPORTED_DEVICE("{{Intel, ICH6}," | |||
219 | "{Intel, LPT_LP}," | 219 | "{Intel, LPT_LP}," |
220 | "{Intel, WPT_LP}," | 220 | "{Intel, WPT_LP}," |
221 | "{Intel, SPT}," | 221 | "{Intel, SPT}," |
222 | "{Intel, SPT_LP}," | ||
222 | "{Intel, HPT}," | 223 | "{Intel, HPT}," |
223 | "{Intel, PBG}," | 224 | "{Intel, PBG}," |
224 | "{Intel, SCH}," | 225 | "{Intel, SCH}," |
@@ -2003,6 +2004,9 @@ static const struct pci_device_id azx_ids[] = { | |||
2003 | /* Sunrise Point */ | 2004 | /* Sunrise Point */ |
2004 | { PCI_DEVICE(0x8086, 0xa170), | 2005 | { PCI_DEVICE(0x8086, 0xa170), |
2005 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, | 2006 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
2007 | /* Sunrise Point-LP */ | ||
2008 | { PCI_DEVICE(0x8086, 0x9d70), | ||
2009 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, | ||
2006 | /* Haswell */ | 2010 | /* Haswell */ |
2007 | { PCI_DEVICE(0x8086, 0x0a0c), | 2011 | { PCI_DEVICE(0x8086, 0x0a0c), |
2008 | .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL }, | 2012 | .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL }, |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 71e4bad06345..e9ebc7bd752c 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -43,6 +43,7 @@ struct conexant_spec { | |||
43 | unsigned int num_eapds; | 43 | unsigned int num_eapds; |
44 | hda_nid_t eapds[4]; | 44 | hda_nid_t eapds[4]; |
45 | bool dynamic_eapd; | 45 | bool dynamic_eapd; |
46 | hda_nid_t mute_led_eapd; | ||
46 | 47 | ||
47 | unsigned int parse_flags; /* flag for snd_hda_parse_pin_defcfg() */ | 48 | unsigned int parse_flags; /* flag for snd_hda_parse_pin_defcfg() */ |
48 | 49 | ||
@@ -163,6 +164,17 @@ static void cx_auto_vmaster_hook(void *private_data, int enabled) | |||
163 | cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, enabled); | 164 | cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, enabled); |
164 | } | 165 | } |
165 | 166 | ||
167 | /* turn on/off EAPD according to Master switch (inversely!) for mute LED */ | ||
168 | static void cx_auto_vmaster_hook_mute_led(void *private_data, int enabled) | ||
169 | { | ||
170 | struct hda_codec *codec = private_data; | ||
171 | struct conexant_spec *spec = codec->spec; | ||
172 | |||
173 | snd_hda_codec_write(codec, spec->mute_led_eapd, 0, | ||
174 | AC_VERB_SET_EAPD_BTLENABLE, | ||
175 | enabled ? 0x00 : 0x02); | ||
176 | } | ||
177 | |||
166 | static int cx_auto_build_controls(struct hda_codec *codec) | 178 | static int cx_auto_build_controls(struct hda_codec *codec) |
167 | { | 179 | { |
168 | int err; | 180 | int err; |
@@ -223,6 +235,7 @@ enum { | |||
223 | CXT_FIXUP_TOSHIBA_P105, | 235 | CXT_FIXUP_TOSHIBA_P105, |
224 | CXT_FIXUP_HP_530, | 236 | CXT_FIXUP_HP_530, |
225 | CXT_FIXUP_CAP_MIX_AMP_5047, | 237 | CXT_FIXUP_CAP_MIX_AMP_5047, |
238 | CXT_FIXUP_MUTE_LED_EAPD, | ||
226 | }; | 239 | }; |
227 | 240 | ||
228 | /* for hda_fixup_thinkpad_acpi() */ | 241 | /* for hda_fixup_thinkpad_acpi() */ |
@@ -557,6 +570,18 @@ static void cxt_fixup_olpc_xo(struct hda_codec *codec, | |||
557 | } | 570 | } |
558 | } | 571 | } |
559 | 572 | ||
573 | static void cxt_fixup_mute_led_eapd(struct hda_codec *codec, | ||
574 | const struct hda_fixup *fix, int action) | ||
575 | { | ||
576 | struct conexant_spec *spec = codec->spec; | ||
577 | |||
578 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { | ||
579 | spec->mute_led_eapd = 0x1b; | ||
580 | spec->dynamic_eapd = 1; | ||
581 | spec->gen.vmaster_mute.hook = cx_auto_vmaster_hook_mute_led; | ||
582 | } | ||
583 | } | ||
584 | |||
560 | /* | 585 | /* |
561 | * Fix max input level on mixer widget to 0dB | 586 | * Fix max input level on mixer widget to 0dB |
562 | * (originally it has 0x2b steps with 0dB offset 0x14) | 587 | * (originally it has 0x2b steps with 0dB offset 0x14) |
@@ -705,6 +730,10 @@ static const struct hda_fixup cxt_fixups[] = { | |||
705 | .type = HDA_FIXUP_FUNC, | 730 | .type = HDA_FIXUP_FUNC, |
706 | .v.func = cxt_fixup_cap_mix_amp_5047, | 731 | .v.func = cxt_fixup_cap_mix_amp_5047, |
707 | }, | 732 | }, |
733 | [CXT_FIXUP_MUTE_LED_EAPD] = { | ||
734 | .type = HDA_FIXUP_FUNC, | ||
735 | .v.func = cxt_fixup_mute_led_eapd, | ||
736 | }, | ||
708 | }; | 737 | }; |
709 | 738 | ||
710 | static const struct snd_pci_quirk cxt5045_fixups[] = { | 739 | static const struct snd_pci_quirk cxt5045_fixups[] = { |
@@ -762,6 +791,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = { | |||
762 | SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410), | 791 | SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410), |
763 | SND_PCI_QUIRK(0x17aa, 0x21da, "Lenovo X220", CXT_PINCFG_LENOVO_TP410), | 792 | SND_PCI_QUIRK(0x17aa, 0x21da, "Lenovo X220", CXT_PINCFG_LENOVO_TP410), |
764 | SND_PCI_QUIRK(0x17aa, 0x21db, "Lenovo X220-tablet", CXT_PINCFG_LENOVO_TP410), | 793 | SND_PCI_QUIRK(0x17aa, 0x21db, "Lenovo X220-tablet", CXT_PINCFG_LENOVO_TP410), |
794 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo IdeaPad Z560", CXT_FIXUP_MUTE_LED_EAPD), | ||
765 | SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC), | 795 | SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC), |
766 | SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC), | 796 | SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC), |
767 | SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC), | 797 | SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC), |
@@ -780,6 +810,7 @@ static const struct hda_model_fixup cxt5066_fixup_models[] = { | |||
780 | { .id = CXT_PINCFG_LEMOTE_A1004, .name = "lemote-a1004" }, | 810 | { .id = CXT_PINCFG_LEMOTE_A1004, .name = "lemote-a1004" }, |
781 | { .id = CXT_PINCFG_LEMOTE_A1205, .name = "lemote-a1205" }, | 811 | { .id = CXT_PINCFG_LEMOTE_A1205, .name = "lemote-a1205" }, |
782 | { .id = CXT_FIXUP_OLPC_XO, .name = "olpc-xo" }, | 812 | { .id = CXT_FIXUP_OLPC_XO, .name = "olpc-xo" }, |
813 | { .id = CXT_FIXUP_MUTE_LED_EAPD, .name = "mute-led-eapd" }, | ||
783 | {} | 814 | {} |
784 | }; | 815 | }; |
785 | 816 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 3c29a558e7db..cd08d8a9a44b 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -290,6 +290,80 @@ static void alc880_unsol_event(struct hda_codec *codec, unsigned int res) | |||
290 | snd_hda_jack_unsol_event(codec, res >> 2); | 290 | snd_hda_jack_unsol_event(codec, res >> 2); |
291 | } | 291 | } |
292 | 292 | ||
293 | /* Change EAPD to verb control */ | ||
294 | static void alc_fill_eapd_coef(struct hda_codec *codec) | ||
295 | { | ||
296 | int coef; | ||
297 | |||
298 | coef = alc_get_coef0(codec); | ||
299 | |||
300 | switch (codec->vendor_id) { | ||
301 | case 0x10ec0262: | ||
302 | alc_update_coef_idx(codec, 0x7, 0, 1<<5); | ||
303 | break; | ||
304 | case 0x10ec0267: | ||
305 | case 0x10ec0268: | ||
306 | alc_update_coef_idx(codec, 0x7, 0, 1<<13); | ||
307 | break; | ||
308 | case 0x10ec0269: | ||
309 | if ((coef & 0x00f0) == 0x0010) | ||
310 | alc_update_coef_idx(codec, 0xd, 0, 1<<14); | ||
311 | if ((coef & 0x00f0) == 0x0020) | ||
312 | alc_update_coef_idx(codec, 0x4, 1<<15, 0); | ||
313 | if ((coef & 0x00f0) == 0x0030) | ||
314 | alc_update_coef_idx(codec, 0x10, 1<<9, 0); | ||
315 | break; | ||
316 | case 0x10ec0280: | ||
317 | case 0x10ec0284: | ||
318 | case 0x10ec0290: | ||
319 | case 0x10ec0292: | ||
320 | alc_update_coef_idx(codec, 0x4, 1<<15, 0); | ||
321 | break; | ||
322 | case 0x10ec0233: | ||
323 | case 0x10ec0255: | ||
324 | case 0x10ec0282: | ||
325 | case 0x10ec0283: | ||
326 | case 0x10ec0286: | ||
327 | case 0x10ec0288: | ||
328 | alc_update_coef_idx(codec, 0x10, 1<<9, 0); | ||
329 | break; | ||
330 | case 0x10ec0285: | ||
331 | case 0x10ec0293: | ||
332 | alc_update_coef_idx(codec, 0xa, 1<<13, 0); | ||
333 | break; | ||
334 | case 0x10ec0662: | ||
335 | if ((coef & 0x00f0) == 0x0030) | ||
336 | alc_update_coef_idx(codec, 0x4, 1<<10, 0); /* EAPD Ctrl */ | ||
337 | break; | ||
338 | case 0x10ec0272: | ||
339 | case 0x10ec0273: | ||
340 | case 0x10ec0663: | ||
341 | case 0x10ec0665: | ||
342 | case 0x10ec0670: | ||
343 | case 0x10ec0671: | ||
344 | case 0x10ec0672: | ||
345 | alc_update_coef_idx(codec, 0xd, 0, 1<<14); /* EAPD Ctrl */ | ||
346 | break; | ||
347 | case 0x10ec0668: | ||
348 | alc_update_coef_idx(codec, 0x7, 3<<13, 0); | ||
349 | break; | ||
350 | case 0x10ec0867: | ||
351 | alc_update_coef_idx(codec, 0x4, 1<<10, 0); | ||
352 | break; | ||
353 | case 0x10ec0888: | ||
354 | if ((coef & 0x00f0) == 0x0020 || (coef & 0x00f0) == 0x0030) | ||
355 | alc_update_coef_idx(codec, 0x7, 1<<5, 0); | ||
356 | break; | ||
357 | case 0x10ec0892: | ||
358 | alc_update_coef_idx(codec, 0x7, 1<<5, 0); | ||
359 | break; | ||
360 | case 0x10ec0899: | ||
361 | case 0x10ec0900: | ||
362 | alc_update_coef_idx(codec, 0x7, 1<<1, 0); | ||
363 | break; | ||
364 | } | ||
365 | } | ||
366 | |||
293 | /* additional initialization for ALC888 variants */ | 367 | /* additional initialization for ALC888 variants */ |
294 | static void alc888_coef_init(struct hda_codec *codec) | 368 | static void alc888_coef_init(struct hda_codec *codec) |
295 | { | 369 | { |
@@ -341,6 +415,7 @@ static void alc_eapd_shutup(struct hda_codec *codec) | |||
341 | /* generic EAPD initialization */ | 415 | /* generic EAPD initialization */ |
342 | static void alc_auto_init_amp(struct hda_codec *codec, int type) | 416 | static void alc_auto_init_amp(struct hda_codec *codec, int type) |
343 | { | 417 | { |
418 | alc_fill_eapd_coef(codec); | ||
344 | alc_auto_setup_eapd(codec, true); | 419 | alc_auto_setup_eapd(codec, true); |
345 | switch (type) { | 420 | switch (type) { |
346 | case ALC_INIT_GPIO1: | 421 | case ALC_INIT_GPIO1: |
@@ -4458,6 +4533,8 @@ static const struct hda_fixup alc269_fixups[] = { | |||
4458 | [ALC269_FIXUP_HEADSET_MODE] = { | 4533 | [ALC269_FIXUP_HEADSET_MODE] = { |
4459 | .type = HDA_FIXUP_FUNC, | 4534 | .type = HDA_FIXUP_FUNC, |
4460 | .v.func = alc_fixup_headset_mode, | 4535 | .v.func = alc_fixup_headset_mode, |
4536 | .chained = true, | ||
4537 | .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED | ||
4461 | }, | 4538 | }, |
4462 | [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC] = { | 4539 | [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC] = { |
4463 | .type = HDA_FIXUP_FUNC, | 4540 | .type = HDA_FIXUP_FUNC, |
@@ -4647,6 +4724,8 @@ static const struct hda_fixup alc269_fixups[] = { | |||
4647 | [ALC255_FIXUP_HEADSET_MODE] = { | 4724 | [ALC255_FIXUP_HEADSET_MODE] = { |
4648 | .type = HDA_FIXUP_FUNC, | 4725 | .type = HDA_FIXUP_FUNC, |
4649 | .v.func = alc_fixup_headset_mode_alc255, | 4726 | .v.func = alc_fixup_headset_mode_alc255, |
4727 | .chained = true, | ||
4728 | .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED | ||
4650 | }, | 4729 | }, |
4651 | [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = { | 4730 | [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = { |
4652 | .type = HDA_FIXUP_FUNC, | 4731 | .type = HDA_FIXUP_FUNC, |
@@ -4682,8 +4761,6 @@ static const struct hda_fixup alc269_fixups[] = { | |||
4682 | [ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED] = { | 4761 | [ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED] = { |
4683 | .type = HDA_FIXUP_FUNC, | 4762 | .type = HDA_FIXUP_FUNC, |
4684 | .v.func = alc_fixup_dell_wmi, | 4763 | .v.func = alc_fixup_dell_wmi, |
4685 | .chained_before = true, | ||
4686 | .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE | ||
4687 | }, | 4764 | }, |
4688 | [ALC282_FIXUP_ASPIRE_V5_PINS] = { | 4765 | [ALC282_FIXUP_ASPIRE_V5_PINS] = { |
4689 | .type = HDA_FIXUP_PINS, | 4766 | .type = HDA_FIXUP_PINS, |
@@ -4721,10 +4798,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4721 | SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4798 | SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4722 | SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4799 | SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4723 | SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4800 | SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4724 | SND_PCI_QUIRK(0x1028, 0x0610, "Dell", ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED), | ||
4725 | SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), | 4801 | SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), |
4726 | SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), | 4802 | SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), |
4727 | SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED), | ||
4728 | SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK), | 4803 | SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK), |
4729 | SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), | 4804 | SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), |
4730 | SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), | 4805 | SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), |
@@ -5225,9 +5300,6 @@ static void alc269_fill_coef(struct hda_codec *codec) | |||
5225 | } | 5300 | } |
5226 | } | 5301 | } |
5227 | 5302 | ||
5228 | /* Class D */ | ||
5229 | alc_update_coef_idx(codec, 0xd, 0, 1<<14); | ||
5230 | |||
5231 | /* HP */ | 5303 | /* HP */ |
5232 | alc_update_coef_idx(codec, 0x4, 0, 1<<11); | 5304 | alc_update_coef_idx(codec, 0x4, 0, 1<<11); |
5233 | } | 5305 | } |
@@ -5668,6 +5740,35 @@ static void alc662_fixup_led_gpio1(struct hda_codec *codec, | |||
5668 | } | 5740 | } |
5669 | } | 5741 | } |
5670 | 5742 | ||
5743 | static struct coef_fw alc668_coefs[] = { | ||
5744 | WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0), | ||
5745 | WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80), | ||
5746 | WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0), | ||
5747 | WRITE_COEF(0x0c, 0x7cf7), WRITE_COEF(0x0d, 0x1080), WRITE_COEF(0x0e, 0x7f7f), | ||
5748 | WRITE_COEF(0x0f, 0xcccc), WRITE_COEF(0x10, 0xddcc), WRITE_COEF(0x11, 0x0001), | ||
5749 | WRITE_COEF(0x13, 0x0), WRITE_COEF(0x14, 0x2aa0), WRITE_COEF(0x17, 0xa940), | ||
5750 | WRITE_COEF(0x19, 0x0), WRITE_COEF(0x1a, 0x0), WRITE_COEF(0x1b, 0x0), | ||
5751 | WRITE_COEF(0x1c, 0x0), WRITE_COEF(0x1d, 0x0), WRITE_COEF(0x1e, 0x7418), | ||
5752 | WRITE_COEF(0x1f, 0x0804), WRITE_COEF(0x20, 0x4200), WRITE_COEF(0x21, 0x0468), | ||
5753 | WRITE_COEF(0x22, 0x8ccc), WRITE_COEF(0x23, 0x0250), WRITE_COEF(0x24, 0x7418), | ||
5754 | WRITE_COEF(0x27, 0x0), WRITE_COEF(0x28, 0x8ccc), WRITE_COEF(0x2a, 0xff00), | ||
5755 | WRITE_COEF(0x2b, 0x8000), WRITE_COEF(0xa7, 0xff00), WRITE_COEF(0xa8, 0x8000), | ||
5756 | WRITE_COEF(0xaa, 0x2e17), WRITE_COEF(0xab, 0xa0c0), WRITE_COEF(0xac, 0x0), | ||
5757 | WRITE_COEF(0xad, 0x0), WRITE_COEF(0xae, 0x2ac6), WRITE_COEF(0xaf, 0xa480), | ||
5758 | WRITE_COEF(0xb0, 0x0), WRITE_COEF(0xb1, 0x0), WRITE_COEF(0xb2, 0x0), | ||
5759 | WRITE_COEF(0xb3, 0x0), WRITE_COEF(0xb4, 0x0), WRITE_COEF(0xb5, 0x1040), | ||
5760 | WRITE_COEF(0xb6, 0xd697), WRITE_COEF(0xb7, 0x902b), WRITE_COEF(0xb8, 0xd697), | ||
5761 | WRITE_COEF(0xb9, 0x902b), WRITE_COEF(0xba, 0xb8ba), WRITE_COEF(0xbb, 0xaaab), | ||
5762 | WRITE_COEF(0xbc, 0xaaaf), WRITE_COEF(0xbd, 0x6aaa), WRITE_COEF(0xbe, 0x1c02), | ||
5763 | WRITE_COEF(0xc0, 0x00ff), WRITE_COEF(0xc1, 0x0fa6), | ||
5764 | {} | ||
5765 | }; | ||
5766 | |||
5767 | static void alc668_restore_default_value(struct hda_codec *codec) | ||
5768 | { | ||
5769 | alc_process_coef_fw(codec, alc668_coefs); | ||
5770 | } | ||
5771 | |||
5671 | enum { | 5772 | enum { |
5672 | ALC662_FIXUP_ASPIRE, | 5773 | ALC662_FIXUP_ASPIRE, |
5673 | ALC662_FIXUP_LED_GPIO1, | 5774 | ALC662_FIXUP_LED_GPIO1, |
@@ -6094,29 +6195,6 @@ static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl[] = { | |||
6094 | {} | 6195 | {} |
6095 | }; | 6196 | }; |
6096 | 6197 | ||
6097 | static void alc662_fill_coef(struct hda_codec *codec) | ||
6098 | { | ||
6099 | int coef; | ||
6100 | |||
6101 | coef = alc_get_coef0(codec); | ||
6102 | |||
6103 | switch (codec->vendor_id) { | ||
6104 | case 0x10ec0662: | ||
6105 | if ((coef & 0x00f0) == 0x0030) | ||
6106 | alc_update_coef_idx(codec, 0x4, 1<<10, 0); /* EAPD Ctrl */ | ||
6107 | break; | ||
6108 | case 0x10ec0272: | ||
6109 | case 0x10ec0273: | ||
6110 | case 0x10ec0663: | ||
6111 | case 0x10ec0665: | ||
6112 | case 0x10ec0670: | ||
6113 | case 0x10ec0671: | ||
6114 | case 0x10ec0672: | ||
6115 | alc_update_coef_idx(codec, 0xd, 0, 1<<14); /* EAPD Ctrl */ | ||
6116 | break; | ||
6117 | } | ||
6118 | } | ||
6119 | |||
6120 | /* | 6198 | /* |
6121 | */ | 6199 | */ |
6122 | static int patch_alc662(struct hda_codec *codec) | 6200 | static int patch_alc662(struct hda_codec *codec) |
@@ -6135,8 +6213,11 @@ static int patch_alc662(struct hda_codec *codec) | |||
6135 | 6213 | ||
6136 | alc_fix_pll_init(codec, 0x20, 0x04, 15); | 6214 | alc_fix_pll_init(codec, 0x20, 0x04, 15); |
6137 | 6215 | ||
6138 | spec->init_hook = alc662_fill_coef; | 6216 | switch (codec->vendor_id) { |
6139 | alc662_fill_coef(codec); | 6217 | case 0x10ec0668: |
6218 | spec->init_hook = alc668_restore_default_value; | ||
6219 | break; | ||
6220 | } | ||
6140 | 6221 | ||
6141 | snd_hda_pick_fixup(codec, alc662_fixup_models, | 6222 | snd_hda_pick_fixup(codec, alc662_fixup_models, |
6142 | alc662_fixup_tbl, alc662_fixups); | 6223 | alc662_fixup_tbl, alc662_fixups); |