aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-11-27 06:40:51 -0500
committerTakashi Iwai <tiwai@suse.de>2014-11-27 06:40:51 -0500
commitacf403ecc4155153e5e2c1640be90fc166e56ba7 (patch)
treee9655b84776cec00a4da077f5dd1e336dfd9c7c0 /sound/pci
parent69eba10e606a80665f8573221fec589430d9d1cb (diff)
parentb61f90eac1ff9d1b30497e611aba4651d4066706 (diff)
Merge branch 'topic/usb-resume' into for-next
Merge the proper mixer resume support for quirk codes.
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_intel.c4
-rw-r--r--sound/pci/hda/patch_conexant.c31
-rw-r--r--sound/pci/hda/patch_realtek.c145
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 */
168static 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
166static int cx_auto_build_controls(struct hda_codec *codec) 178static 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
573static 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
710static const struct snd_pci_quirk cxt5045_fixups[] = { 739static 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 3fcb7d951572..0c1cad5a1574 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 */
294static 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 */
294static void alc888_coef_init(struct hda_codec *codec) 368static 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 */
342static void alc_auto_init_amp(struct hda_codec *codec, int type) 416static 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:
@@ -4480,6 +4555,8 @@ static const struct hda_fixup alc269_fixups[] = {
4480 [ALC269_FIXUP_HEADSET_MODE] = { 4555 [ALC269_FIXUP_HEADSET_MODE] = {
4481 .type = HDA_FIXUP_FUNC, 4556 .type = HDA_FIXUP_FUNC,
4482 .v.func = alc_fixup_headset_mode, 4557 .v.func = alc_fixup_headset_mode,
4558 .chained = true,
4559 .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED
4483 }, 4560 },
4484 [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC] = { 4561 [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC] = {
4485 .type = HDA_FIXUP_FUNC, 4562 .type = HDA_FIXUP_FUNC,
@@ -4669,6 +4746,8 @@ static const struct hda_fixup alc269_fixups[] = {
4669 [ALC255_FIXUP_HEADSET_MODE] = { 4746 [ALC255_FIXUP_HEADSET_MODE] = {
4670 .type = HDA_FIXUP_FUNC, 4747 .type = HDA_FIXUP_FUNC,
4671 .v.func = alc_fixup_headset_mode_alc255, 4748 .v.func = alc_fixup_headset_mode_alc255,
4749 .chained = true,
4750 .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED
4672 }, 4751 },
4673 [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = { 4752 [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = {
4674 .type = HDA_FIXUP_FUNC, 4753 .type = HDA_FIXUP_FUNC,
@@ -4704,8 +4783,6 @@ static const struct hda_fixup alc269_fixups[] = {
4704 [ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED] = { 4783 [ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED] = {
4705 .type = HDA_FIXUP_FUNC, 4784 .type = HDA_FIXUP_FUNC,
4706 .v.func = alc_fixup_dell_wmi, 4785 .v.func = alc_fixup_dell_wmi,
4707 .chained_before = true,
4708 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
4709 }, 4786 },
4710 [ALC282_FIXUP_ASPIRE_V5_PINS] = { 4787 [ALC282_FIXUP_ASPIRE_V5_PINS] = {
4711 .type = HDA_FIXUP_PINS, 4788 .type = HDA_FIXUP_PINS,
@@ -4747,10 +4824,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
4747 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 4824 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
4748 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 4825 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
4749 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 4826 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
4750 SND_PCI_QUIRK(0x1028, 0x0610, "Dell", ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED),
4751 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), 4827 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
4752 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), 4828 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
4753 SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED),
4754 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK), 4829 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK),
4755 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 4830 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
4756 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 4831 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
@@ -5252,9 +5327,6 @@ static void alc269_fill_coef(struct hda_codec *codec)
5252 } 5327 }
5253 } 5328 }
5254 5329
5255 /* Class D */
5256 alc_update_coef_idx(codec, 0xd, 0, 1<<14);
5257
5258 /* HP */ 5330 /* HP */
5259 alc_update_coef_idx(codec, 0x4, 0, 1<<11); 5331 alc_update_coef_idx(codec, 0x4, 0, 1<<11);
5260} 5332}
@@ -5695,6 +5767,35 @@ static void alc662_fixup_led_gpio1(struct hda_codec *codec,
5695 } 5767 }
5696} 5768}
5697 5769
5770static struct coef_fw alc668_coefs[] = {
5771 WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
5772 WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
5773 WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0),
5774 WRITE_COEF(0x0c, 0x7cf7), WRITE_COEF(0x0d, 0x1080), WRITE_COEF(0x0e, 0x7f7f),
5775 WRITE_COEF(0x0f, 0xcccc), WRITE_COEF(0x10, 0xddcc), WRITE_COEF(0x11, 0x0001),
5776 WRITE_COEF(0x13, 0x0), WRITE_COEF(0x14, 0x2aa0), WRITE_COEF(0x17, 0xa940),
5777 WRITE_COEF(0x19, 0x0), WRITE_COEF(0x1a, 0x0), WRITE_COEF(0x1b, 0x0),
5778 WRITE_COEF(0x1c, 0x0), WRITE_COEF(0x1d, 0x0), WRITE_COEF(0x1e, 0x7418),
5779 WRITE_COEF(0x1f, 0x0804), WRITE_COEF(0x20, 0x4200), WRITE_COEF(0x21, 0x0468),
5780 WRITE_COEF(0x22, 0x8ccc), WRITE_COEF(0x23, 0x0250), WRITE_COEF(0x24, 0x7418),
5781 WRITE_COEF(0x27, 0x0), WRITE_COEF(0x28, 0x8ccc), WRITE_COEF(0x2a, 0xff00),
5782 WRITE_COEF(0x2b, 0x8000), WRITE_COEF(0xa7, 0xff00), WRITE_COEF(0xa8, 0x8000),
5783 WRITE_COEF(0xaa, 0x2e17), WRITE_COEF(0xab, 0xa0c0), WRITE_COEF(0xac, 0x0),
5784 WRITE_COEF(0xad, 0x0), WRITE_COEF(0xae, 0x2ac6), WRITE_COEF(0xaf, 0xa480),
5785 WRITE_COEF(0xb0, 0x0), WRITE_COEF(0xb1, 0x0), WRITE_COEF(0xb2, 0x0),
5786 WRITE_COEF(0xb3, 0x0), WRITE_COEF(0xb4, 0x0), WRITE_COEF(0xb5, 0x1040),
5787 WRITE_COEF(0xb6, 0xd697), WRITE_COEF(0xb7, 0x902b), WRITE_COEF(0xb8, 0xd697),
5788 WRITE_COEF(0xb9, 0x902b), WRITE_COEF(0xba, 0xb8ba), WRITE_COEF(0xbb, 0xaaab),
5789 WRITE_COEF(0xbc, 0xaaaf), WRITE_COEF(0xbd, 0x6aaa), WRITE_COEF(0xbe, 0x1c02),
5790 WRITE_COEF(0xc0, 0x00ff), WRITE_COEF(0xc1, 0x0fa6),
5791 {}
5792};
5793
5794static void alc668_restore_default_value(struct hda_codec *codec)
5795{
5796 alc_process_coef_fw(codec, alc668_coefs);
5797}
5798
5698enum { 5799enum {
5699 ALC662_FIXUP_ASPIRE, 5800 ALC662_FIXUP_ASPIRE,
5700 ALC662_FIXUP_LED_GPIO1, 5801 ALC662_FIXUP_LED_GPIO1,
@@ -6121,29 +6222,6 @@ static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl[] = {
6121 {} 6222 {}
6122}; 6223};
6123 6224
6124static void alc662_fill_coef(struct hda_codec *codec)
6125{
6126 int coef;
6127
6128 coef = alc_get_coef0(codec);
6129
6130 switch (codec->vendor_id) {
6131 case 0x10ec0662:
6132 if ((coef & 0x00f0) == 0x0030)
6133 alc_update_coef_idx(codec, 0x4, 1<<10, 0); /* EAPD Ctrl */
6134 break;
6135 case 0x10ec0272:
6136 case 0x10ec0273:
6137 case 0x10ec0663:
6138 case 0x10ec0665:
6139 case 0x10ec0670:
6140 case 0x10ec0671:
6141 case 0x10ec0672:
6142 alc_update_coef_idx(codec, 0xd, 0, 1<<14); /* EAPD Ctrl */
6143 break;
6144 }
6145}
6146
6147/* 6225/*
6148 */ 6226 */
6149static int patch_alc662(struct hda_codec *codec) 6227static int patch_alc662(struct hda_codec *codec)
@@ -6162,8 +6240,11 @@ static int patch_alc662(struct hda_codec *codec)
6162 6240
6163 alc_fix_pll_init(codec, 0x20, 0x04, 15); 6241 alc_fix_pll_init(codec, 0x20, 0x04, 15);
6164 6242
6165 spec->init_hook = alc662_fill_coef; 6243 switch (codec->vendor_id) {
6166 alc662_fill_coef(codec); 6244 case 0x10ec0668:
6245 spec->init_hook = alc668_restore_default_value;
6246 break;
6247 }
6167 6248
6168 snd_hda_pick_fixup(codec, alc662_fixup_models, 6249 snd_hda_pick_fixup(codec, alc662_fixup_models,
6169 alc662_fixup_tbl, alc662_fixups); 6250 alc662_fixup_tbl, alc662_fixups);