diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-11-09 12:24:44 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-11-09 12:28:35 -0500 |
commit | 68ef0561efe494143516df38c03a16b837b8e79c (patch) | |
tree | 8b0c1b7a8db492e9638e3a7251952a6e5496e5bc /sound | |
parent | eb844d51cccca0ce9fad316da803f1bbe53d323b (diff) |
ALSA: hda/realtek - Drop ALC882 desktop model quirks
Now we're touching the desktop static configs for ALC88x codecs.
These are mostly OK with the auto-parser, but some models need careful
handling; ALC889 intel mobo requires the COEF setup, and W2JC needs
GPIO1 and COEF.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/alc882_quirks.c | 780 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 30 |
2 files changed, 22 insertions, 788 deletions
diff --git a/sound/pci/hda/alc882_quirks.c b/sound/pci/hda/alc882_quirks.c index 185ad65a311e..ccd20d1cfdfd 100644 --- a/sound/pci/hda/alc882_quirks.c +++ b/sound/pci/hda/alc882_quirks.c | |||
@@ -6,9 +6,6 @@ | |||
6 | /* ALC882 models */ | 6 | /* ALC882 models */ |
7 | enum { | 7 | enum { |
8 | ALC882_AUTO, | 8 | ALC882_AUTO, |
9 | ALC882_3ST_DIG, | ||
10 | ALC882_6ST_DIG, | ||
11 | ALC882_W2JC, | ||
12 | ALC885_MACPRO, | 9 | ALC885_MACPRO, |
13 | ALC885_MBA21, | 10 | ALC885_MBA21, |
14 | ALC885_MBP3, | 11 | ALC885_MBP3, |
@@ -16,108 +13,15 @@ enum { | |||
16 | ALC885_MACMINI3, | 13 | ALC885_MACMINI3, |
17 | ALC885_IMAC24, | 14 | ALC885_IMAC24, |
18 | ALC885_IMAC91, | 15 | ALC885_IMAC91, |
19 | ALC883_3ST_2ch_DIG, | ||
20 | ALC883_3ST_6ch_DIG, | ||
21 | ALC883_3ST_6ch, | ||
22 | ALC883_6ST_DIG, | ||
23 | ALC888_ACER_ASPIRE_4930G, | 16 | ALC888_ACER_ASPIRE_4930G, |
24 | ALC888_ACER_ASPIRE_6530G, | 17 | ALC888_ACER_ASPIRE_6530G, |
25 | ALC888_ACER_ASPIRE_8930G, | 18 | ALC888_ACER_ASPIRE_8930G, |
26 | ALC888_ACER_ASPIRE_7730G, | 19 | ALC888_ACER_ASPIRE_7730G, |
27 | ALC883_3ST_6ch_INTEL, | ||
28 | ALC889A_INTEL, | ||
29 | ALC889_INTEL, | ||
30 | ALC889A_MB31, | 20 | ALC889A_MB31, |
31 | ALC882_MODEL_LAST, | 21 | ALC882_MODEL_LAST, |
32 | }; | 22 | }; |
33 | 23 | ||
34 | /* | 24 | /* |
35 | * 2ch mode | ||
36 | */ | ||
37 | static const struct hda_verb alc888_4ST_ch2_intel_init[] = { | ||
38 | /* Mic-in jack as mic in */ | ||
39 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | ||
40 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
41 | /* Line-in jack as Line in */ | ||
42 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, | ||
43 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
44 | /* Line-Out as Front */ | ||
45 | { 0x17, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
46 | { } /* end */ | ||
47 | }; | ||
48 | |||
49 | /* | ||
50 | * 4ch mode | ||
51 | */ | ||
52 | static const struct hda_verb alc888_4ST_ch4_intel_init[] = { | ||
53 | /* Mic-in jack as mic in */ | ||
54 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | ||
55 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
56 | /* Line-in jack as Surround */ | ||
57 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
58 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
59 | /* Line-Out as Front */ | ||
60 | { 0x17, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
61 | { } /* end */ | ||
62 | }; | ||
63 | |||
64 | /* | ||
65 | * 6ch mode | ||
66 | */ | ||
67 | static const struct hda_verb alc888_4ST_ch6_intel_init[] = { | ||
68 | /* Mic-in jack as CLFE */ | ||
69 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
70 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
71 | /* Line-in jack as Surround */ | ||
72 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
73 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
74 | /* Line-Out as CLFE (workaround because Mic-in is not loud enough) */ | ||
75 | { 0x17, AC_VERB_SET_CONNECT_SEL, 0x03}, | ||
76 | { } /* end */ | ||
77 | }; | ||
78 | |||
79 | /* | ||
80 | * 8ch mode | ||
81 | */ | ||
82 | static const struct hda_verb alc888_4ST_ch8_intel_init[] = { | ||
83 | /* Mic-in jack as CLFE */ | ||
84 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
85 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
86 | /* Line-in jack as Surround */ | ||
87 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
88 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
89 | /* Line-Out as Side */ | ||
90 | { 0x17, AC_VERB_SET_CONNECT_SEL, 0x03}, | ||
91 | { } /* end */ | ||
92 | }; | ||
93 | |||
94 | static const struct hda_channel_mode alc888_4ST_8ch_intel_modes[4] = { | ||
95 | { 2, alc888_4ST_ch2_intel_init }, | ||
96 | { 4, alc888_4ST_ch4_intel_init }, | ||
97 | { 6, alc888_4ST_ch6_intel_init }, | ||
98 | { 8, alc888_4ST_ch8_intel_init }, | ||
99 | }; | ||
100 | |||
101 | static void alc889_automute_setup(struct hda_codec *codec) | ||
102 | { | ||
103 | struct alc_spec *spec = codec->spec; | ||
104 | |||
105 | spec->autocfg.hp_pins[0] = 0x15; | ||
106 | spec->autocfg.speaker_pins[0] = 0x14; | ||
107 | spec->autocfg.speaker_pins[1] = 0x16; | ||
108 | spec->autocfg.speaker_pins[2] = 0x17; | ||
109 | spec->autocfg.speaker_pins[3] = 0x19; | ||
110 | spec->autocfg.speaker_pins[4] = 0x1a; | ||
111 | alc_simple_setup_automute(spec, ALC_AUTOMUTE_AMP); | ||
112 | } | ||
113 | |||
114 | static void alc889_intel_init_hook(struct hda_codec *codec) | ||
115 | { | ||
116 | alc889_coef_init(codec); | ||
117 | alc_hp_automute(codec); | ||
118 | } | ||
119 | |||
120 | /* | ||
121 | * ALC888 Acer Aspire 4930G model | 25 | * ALC888 Acer Aspire 4930G model |
122 | */ | 26 | */ |
123 | 27 | ||
@@ -586,79 +490,6 @@ static const struct hda_channel_mode alc882_3ST_6ch_modes[3] = { | |||
586 | 490 | ||
587 | #define alc883_3ST_6ch_modes alc882_3ST_6ch_modes | 491 | #define alc883_3ST_6ch_modes alc882_3ST_6ch_modes |
588 | 492 | ||
589 | /* | ||
590 | * 2ch mode | ||
591 | */ | ||
592 | static const struct hda_verb alc883_3ST_ch2_clevo_init[] = { | ||
593 | { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, | ||
594 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | ||
595 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
596 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, | ||
597 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
598 | { } /* end */ | ||
599 | }; | ||
600 | |||
601 | /* | ||
602 | * 4ch mode | ||
603 | */ | ||
604 | static const struct hda_verb alc883_3ST_ch4_clevo_init[] = { | ||
605 | { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
606 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | ||
607 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
608 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
609 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
610 | { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, | ||
611 | { } /* end */ | ||
612 | }; | ||
613 | |||
614 | /* | ||
615 | * 6ch mode | ||
616 | */ | ||
617 | static const struct hda_verb alc883_3ST_ch6_clevo_init[] = { | ||
618 | { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
619 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
620 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
621 | { 0x18, AC_VERB_SET_CONNECT_SEL, 0x02 }, | ||
622 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
623 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
624 | { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, | ||
625 | { } /* end */ | ||
626 | }; | ||
627 | |||
628 | static const struct hda_channel_mode alc883_3ST_6ch_clevo_modes[3] = { | ||
629 | { 2, alc883_3ST_ch2_clevo_init }, | ||
630 | { 4, alc883_3ST_ch4_clevo_init }, | ||
631 | { 6, alc883_3ST_ch6_clevo_init }, | ||
632 | }; | ||
633 | |||
634 | |||
635 | /* | ||
636 | * 6ch mode | ||
637 | */ | ||
638 | static const struct hda_verb alc882_sixstack_ch6_init[] = { | ||
639 | { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 }, | ||
640 | { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
641 | { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
642 | { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
643 | { } /* end */ | ||
644 | }; | ||
645 | |||
646 | /* | ||
647 | * 8ch mode | ||
648 | */ | ||
649 | static const struct hda_verb alc882_sixstack_ch8_init[] = { | ||
650 | { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
651 | { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
652 | { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
653 | { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
654 | { } /* end */ | ||
655 | }; | ||
656 | |||
657 | static const struct hda_channel_mode alc882_sixstack_modes[2] = { | ||
658 | { 6, alc882_sixstack_ch6_init }, | ||
659 | { 8, alc882_sixstack_ch8_init }, | ||
660 | }; | ||
661 | |||
662 | 493 | ||
663 | /* Macbook Air 2,1 */ | 494 | /* Macbook Air 2,1 */ |
664 | 495 | ||
@@ -728,216 +559,6 @@ static const struct hda_channel_mode alc885_mb5_6ch_modes[2] = { | |||
728 | 559 | ||
729 | #define alc885_macmini3_6ch_modes alc885_mb5_6ch_modes | 560 | #define alc885_macmini3_6ch_modes alc885_mb5_6ch_modes |
730 | 561 | ||
731 | /* | ||
732 | * 2ch mode | ||
733 | */ | ||
734 | static const struct hda_verb alc883_4ST_ch2_init[] = { | ||
735 | { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
736 | { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
737 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | ||
738 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
739 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, | ||
740 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
741 | { } /* end */ | ||
742 | }; | ||
743 | |||
744 | /* | ||
745 | * 4ch mode | ||
746 | */ | ||
747 | static const struct hda_verb alc883_4ST_ch4_init[] = { | ||
748 | { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
749 | { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
750 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | ||
751 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
752 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
753 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
754 | { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, | ||
755 | { } /* end */ | ||
756 | }; | ||
757 | |||
758 | /* | ||
759 | * 6ch mode | ||
760 | */ | ||
761 | static const struct hda_verb alc883_4ST_ch6_init[] = { | ||
762 | { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
763 | { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
764 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
765 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
766 | { 0x18, AC_VERB_SET_CONNECT_SEL, 0x02 }, | ||
767 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
768 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
769 | { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, | ||
770 | { } /* end */ | ||
771 | }; | ||
772 | |||
773 | /* | ||
774 | * 8ch mode | ||
775 | */ | ||
776 | static const struct hda_verb alc883_4ST_ch8_init[] = { | ||
777 | { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
778 | { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
779 | { 0x17, AC_VERB_SET_CONNECT_SEL, 0x03 }, | ||
780 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
781 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
782 | { 0x18, AC_VERB_SET_CONNECT_SEL, 0x02 }, | ||
783 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
784 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
785 | { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, | ||
786 | { } /* end */ | ||
787 | }; | ||
788 | |||
789 | static const struct hda_channel_mode alc883_4ST_8ch_modes[4] = { | ||
790 | { 2, alc883_4ST_ch2_init }, | ||
791 | { 4, alc883_4ST_ch4_init }, | ||
792 | { 6, alc883_4ST_ch6_init }, | ||
793 | { 8, alc883_4ST_ch8_init }, | ||
794 | }; | ||
795 | |||
796 | |||
797 | /* | ||
798 | * 2ch mode | ||
799 | */ | ||
800 | static const struct hda_verb alc883_3ST_ch2_intel_init[] = { | ||
801 | { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | ||
802 | { 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
803 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, | ||
804 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
805 | { } /* end */ | ||
806 | }; | ||
807 | |||
808 | /* | ||
809 | * 4ch mode | ||
810 | */ | ||
811 | static const struct hda_verb alc883_3ST_ch4_intel_init[] = { | ||
812 | { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | ||
813 | { 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
814 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
815 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
816 | { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, | ||
817 | { } /* end */ | ||
818 | }; | ||
819 | |||
820 | /* | ||
821 | * 6ch mode | ||
822 | */ | ||
823 | static const struct hda_verb alc883_3ST_ch6_intel_init[] = { | ||
824 | { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
825 | { 0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
826 | { 0x19, AC_VERB_SET_CONNECT_SEL, 0x02 }, | ||
827 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
828 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
829 | { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, | ||
830 | { } /* end */ | ||
831 | }; | ||
832 | |||
833 | static const struct hda_channel_mode alc883_3ST_6ch_intel_modes[3] = { | ||
834 | { 2, alc883_3ST_ch2_intel_init }, | ||
835 | { 4, alc883_3ST_ch4_intel_init }, | ||
836 | { 6, alc883_3ST_ch6_intel_init }, | ||
837 | }; | ||
838 | |||
839 | /* | ||
840 | * 2ch mode | ||
841 | */ | ||
842 | static const struct hda_verb alc889_ch2_intel_init[] = { | ||
843 | { 0x14, AC_VERB_SET_CONNECT_SEL, 0x00 }, | ||
844 | { 0x19, AC_VERB_SET_CONNECT_SEL, 0x00 }, | ||
845 | { 0x16, AC_VERB_SET_CONNECT_SEL, 0x00 }, | ||
846 | { 0x17, AC_VERB_SET_CONNECT_SEL, 0x00 }, | ||
847 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, | ||
848 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
849 | { } /* end */ | ||
850 | }; | ||
851 | |||
852 | /* | ||
853 | * 6ch mode | ||
854 | */ | ||
855 | static const struct hda_verb alc889_ch6_intel_init[] = { | ||
856 | { 0x14, AC_VERB_SET_CONNECT_SEL, 0x00 }, | ||
857 | { 0x19, AC_VERB_SET_CONNECT_SEL, 0x01 }, | ||
858 | { 0x16, AC_VERB_SET_CONNECT_SEL, 0x02 }, | ||
859 | { 0x17, AC_VERB_SET_CONNECT_SEL, 0x03 }, | ||
860 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, | ||
861 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
862 | { } /* end */ | ||
863 | }; | ||
864 | |||
865 | /* | ||
866 | * 8ch mode | ||
867 | */ | ||
868 | static const struct hda_verb alc889_ch8_intel_init[] = { | ||
869 | { 0x14, AC_VERB_SET_CONNECT_SEL, 0x00 }, | ||
870 | { 0x19, AC_VERB_SET_CONNECT_SEL, 0x01 }, | ||
871 | { 0x16, AC_VERB_SET_CONNECT_SEL, 0x02 }, | ||
872 | { 0x17, AC_VERB_SET_CONNECT_SEL, 0x03 }, | ||
873 | { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x03 }, | ||
874 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
875 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
876 | { } /* end */ | ||
877 | }; | ||
878 | |||
879 | static const struct hda_channel_mode alc889_8ch_intel_modes[3] = { | ||
880 | { 2, alc889_ch2_intel_init }, | ||
881 | { 6, alc889_ch6_intel_init }, | ||
882 | { 8, alc889_ch8_intel_init }, | ||
883 | }; | ||
884 | |||
885 | /* | ||
886 | * 6ch mode | ||
887 | */ | ||
888 | static const struct hda_verb alc883_sixstack_ch6_init[] = { | ||
889 | { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 }, | ||
890 | { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
891 | { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
892 | { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
893 | { } /* end */ | ||
894 | }; | ||
895 | |||
896 | /* | ||
897 | * 8ch mode | ||
898 | */ | ||
899 | static const struct hda_verb alc883_sixstack_ch8_init[] = { | ||
900 | { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
901 | { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
902 | { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
903 | { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
904 | { } /* end */ | ||
905 | }; | ||
906 | |||
907 | static const struct hda_channel_mode alc883_sixstack_modes[2] = { | ||
908 | { 6, alc883_sixstack_ch6_init }, | ||
909 | { 8, alc883_sixstack_ch8_init }, | ||
910 | }; | ||
911 | |||
912 | |||
913 | /* Pin assignment: Front=0x14, Rear=0x15, CLFE=0x16, Side=0x17 | ||
914 | * Mic=0x18, Front Mic=0x19, Line-In=0x1a, HP=0x1b | ||
915 | */ | ||
916 | static const struct snd_kcontrol_new alc882_base_mixer[] = { | ||
917 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
918 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
919 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | ||
920 | HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), | ||
921 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), | ||
922 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), | ||
923 | HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), | ||
924 | HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), | ||
925 | HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), | ||
926 | HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT), | ||
927 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | ||
928 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
929 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
930 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
931 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
932 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
933 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
934 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
935 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
936 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
937 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
938 | { } /* end */ | ||
939 | }; | ||
940 | |||
941 | /* Macbook Air 2,1 same control for HP and internal Speaker */ | 562 | /* Macbook Air 2,1 same control for HP and internal Speaker */ |
942 | 563 | ||
943 | static const struct snd_kcontrol_new alc885_mba21_mixer[] = { | 564 | static const struct snd_kcontrol_new alc885_mba21_mixer[] = { |
@@ -1002,19 +623,6 @@ static const struct snd_kcontrol_new alc885_imac91_mixer[] = { | |||
1002 | }; | 623 | }; |
1003 | 624 | ||
1004 | 625 | ||
1005 | static const struct snd_kcontrol_new alc882_w2jc_mixer[] = { | ||
1006 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
1007 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
1008 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
1009 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
1010 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
1011 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
1012 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
1013 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
1014 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
1015 | { } /* end */ | ||
1016 | }; | ||
1017 | |||
1018 | static const struct snd_kcontrol_new alc882_chmode_mixer[] = { | 626 | static const struct snd_kcontrol_new alc882_chmode_mixer[] = { |
1019 | { | 627 | { |
1020 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 628 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -1100,100 +708,12 @@ static const struct hda_verb alc882_adc1_init_verbs[] = { | |||
1100 | { } | 708 | { } |
1101 | }; | 709 | }; |
1102 | 710 | ||
1103 | static const struct hda_verb alc882_eapd_verbs[] = { | ||
1104 | /* change to EAPD mode */ | ||
1105 | {0x20, AC_VERB_SET_COEF_INDEX, 0x07}, | ||
1106 | {0x20, AC_VERB_SET_PROC_COEF, 0x3060}, | ||
1107 | { } | ||
1108 | }; | ||
1109 | |||
1110 | static const struct hda_verb alc889_eapd_verbs[] = { | 711 | static const struct hda_verb alc889_eapd_verbs[] = { |
1111 | {0x14, AC_VERB_SET_EAPD_BTLENABLE, 2}, | 712 | {0x14, AC_VERB_SET_EAPD_BTLENABLE, 2}, |
1112 | {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2}, | 713 | {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2}, |
1113 | { } | 714 | { } |
1114 | }; | 715 | }; |
1115 | 716 | ||
1116 | static const struct hda_verb alc_hp15_unsol_verbs[] = { | ||
1117 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | ||
1118 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
1119 | {} | ||
1120 | }; | ||
1121 | |||
1122 | static const struct hda_verb alc885_init_verbs[] = { | ||
1123 | /* Front mixer: unmute input/output amp left and right (volume = 0) */ | ||
1124 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
1125 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
1126 | /* Rear mixer */ | ||
1127 | {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
1128 | {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
1129 | /* CLFE mixer */ | ||
1130 | {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
1131 | {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
1132 | /* Side mixer */ | ||
1133 | {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
1134 | {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
1135 | |||
1136 | /* Front HP Pin: output 0 (0x0c) */ | ||
1137 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
1138 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
1139 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
1140 | /* Front Pin: output 0 (0x0c) */ | ||
1141 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
1142 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
1143 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
1144 | /* Rear Pin: output 1 (0x0d) */ | ||
1145 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
1146 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
1147 | {0x19, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
1148 | /* CLFE Pin: output 2 (0x0e) */ | ||
1149 | {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
1150 | {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
1151 | {0x16, AC_VERB_SET_CONNECT_SEL, 0x02}, | ||
1152 | /* Side Pin: output 3 (0x0f) */ | ||
1153 | {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
1154 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
1155 | {0x17, AC_VERB_SET_CONNECT_SEL, 0x03}, | ||
1156 | /* Mic (rear) pin: input vref at 80% */ | ||
1157 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | ||
1158 | {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
1159 | /* Front Mic pin: input vref at 80% */ | ||
1160 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | ||
1161 | {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
1162 | /* Line In pin: input */ | ||
1163 | {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
1164 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
1165 | |||
1166 | /* Mixer elements: 0x18, , 0x1a, 0x1b */ | ||
1167 | /* Input mixer1 */ | ||
1168 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
1169 | /* Input mixer2 */ | ||
1170 | {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
1171 | /* Input mixer3 */ | ||
1172 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
1173 | /* ADC2: mute amp left and right */ | ||
1174 | {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
1175 | /* ADC3: mute amp left and right */ | ||
1176 | {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
1177 | |||
1178 | { } | ||
1179 | }; | ||
1180 | |||
1181 | static const struct hda_verb alc885_init_input_verbs[] = { | ||
1182 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
1183 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, | ||
1184 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)}, | ||
1185 | { } | ||
1186 | }; | ||
1187 | |||
1188 | |||
1189 | /* Unmute Selector 24h and set the default input to front mic */ | ||
1190 | static const struct hda_verb alc889_init_input_verbs[] = { | ||
1191 | {0x24, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
1192 | {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
1193 | { } | ||
1194 | }; | ||
1195 | |||
1196 | |||
1197 | #define alc883_init_verbs alc882_base_init_verbs | 717 | #define alc883_init_verbs alc882_base_init_verbs |
1198 | 718 | ||
1199 | /* Mac Pro test */ | 719 | /* Mac Pro test */ |
@@ -1662,25 +1182,6 @@ static const struct hda_channel_mode alc889A_mb31_6ch_modes[4] = { | |||
1662 | { 6, alc889A_mb31_ch6_init }, | 1182 | { 6, alc889A_mb31_ch6_init }, |
1663 | }; | 1183 | }; |
1664 | 1184 | ||
1665 | #define alc883_base_mixer alc882_base_mixer | ||
1666 | |||
1667 | static const struct snd_kcontrol_new alc883_3ST_2ch_mixer[] = { | ||
1668 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
1669 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
1670 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | ||
1671 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
1672 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
1673 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
1674 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
1675 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
1676 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
1677 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
1678 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
1679 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
1680 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
1681 | { } /* end */ | ||
1682 | }; | ||
1683 | |||
1684 | static const struct snd_kcontrol_new alc883_3ST_6ch_mixer[] = { | 1185 | static const struct snd_kcontrol_new alc883_3ST_6ch_mixer[] = { |
1685 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | 1186 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), |
1686 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | 1187 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), |
@@ -1704,77 +1205,6 @@ static const struct snd_kcontrol_new alc883_3ST_6ch_mixer[] = { | |||
1704 | { } /* end */ | 1205 | { } /* end */ |
1705 | }; | 1206 | }; |
1706 | 1207 | ||
1707 | static const struct snd_kcontrol_new alc883_3ST_6ch_intel_mixer[] = { | ||
1708 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
1709 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
1710 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | ||
1711 | HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), | ||
1712 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, | ||
1713 | HDA_OUTPUT), | ||
1714 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), | ||
1715 | HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), | ||
1716 | HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), | ||
1717 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
1718 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
1719 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
1720 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
1721 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
1722 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
1723 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
1724 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
1725 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
1726 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
1727 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
1728 | { } /* end */ | ||
1729 | }; | ||
1730 | |||
1731 | static const struct snd_kcontrol_new alc885_8ch_intel_mixer[] = { | ||
1732 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
1733 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
1734 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | ||
1735 | HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), | ||
1736 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, | ||
1737 | HDA_OUTPUT), | ||
1738 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), | ||
1739 | HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), | ||
1740 | HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), | ||
1741 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0f, 0x0, HDA_OUTPUT), | ||
1742 | HDA_BIND_MUTE("Speaker Playback Switch", 0x0f, 2, HDA_INPUT), | ||
1743 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
1744 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
1745 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
1746 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x3, HDA_INPUT), | ||
1747 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x1b, 0, HDA_INPUT), | ||
1748 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x3, HDA_INPUT), | ||
1749 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
1750 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
1751 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
1752 | { } /* end */ | ||
1753 | }; | ||
1754 | |||
1755 | static const struct snd_kcontrol_new alc883_fivestack_mixer[] = { | ||
1756 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
1757 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
1758 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | ||
1759 | HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), | ||
1760 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), | ||
1761 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), | ||
1762 | HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), | ||
1763 | HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), | ||
1764 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | ||
1765 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
1766 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
1767 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
1768 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
1769 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
1770 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), | ||
1771 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
1772 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
1773 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), | ||
1774 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
1775 | { } /* end */ | ||
1776 | }; | ||
1777 | |||
1778 | static const struct snd_kcontrol_new alc888_acer_aspire_6530_mixer[] = { | 1208 | static const struct snd_kcontrol_new alc888_acer_aspire_6530_mixer[] = { |
1779 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | 1209 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), |
1780 | HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT), | 1210 | HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT), |
@@ -1814,24 +1244,6 @@ static const struct snd_kcontrol_new alc889A_mb31_mixer[] = { | |||
1814 | { } /* end */ | 1244 | { } /* end */ |
1815 | }; | 1245 | }; |
1816 | 1246 | ||
1817 | static const struct hda_bind_ctls alc883_bind_cap_vol = { | ||
1818 | .ops = &snd_hda_bind_vol, | ||
1819 | .values = { | ||
1820 | HDA_COMPOSE_AMP_VAL(0x08, 3, 0, HDA_INPUT), | ||
1821 | HDA_COMPOSE_AMP_VAL(0x09, 3, 0, HDA_INPUT), | ||
1822 | 0 | ||
1823 | }, | ||
1824 | }; | ||
1825 | |||
1826 | static const struct hda_bind_ctls alc883_bind_cap_switch = { | ||
1827 | .ops = &snd_hda_bind_sw, | ||
1828 | .values = { | ||
1829 | HDA_COMPOSE_AMP_VAL(0x08, 3, 0, HDA_INPUT), | ||
1830 | HDA_COMPOSE_AMP_VAL(0x09, 3, 0, HDA_INPUT), | ||
1831 | 0 | ||
1832 | }, | ||
1833 | }; | ||
1834 | |||
1835 | static const struct snd_kcontrol_new alc883_chmode_mixer[] = { | 1247 | static const struct snd_kcontrol_new alc883_chmode_mixer[] = { |
1836 | { | 1248 | { |
1837 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1249 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -1878,21 +1290,10 @@ static void alc889A_mb31_unsol_event(struct hda_codec *codec, unsigned int res) | |||
1878 | alc889A_mb31_automute(codec); | 1290 | alc889A_mb31_automute(codec); |
1879 | } | 1291 | } |
1880 | 1292 | ||
1881 | static const hda_nid_t alc883_slave_dig_outs[] = { | ||
1882 | ALC1200_DIGOUT_NID, 0, | ||
1883 | }; | ||
1884 | |||
1885 | static const hda_nid_t alc1200_slave_dig_outs[] = { | ||
1886 | ALC883_DIGOUT_NID, 0, | ||
1887 | }; | ||
1888 | |||
1889 | /* | 1293 | /* |
1890 | * configuration and preset | 1294 | * configuration and preset |
1891 | */ | 1295 | */ |
1892 | static const char * const alc882_models[ALC882_MODEL_LAST] = { | 1296 | static const char * const alc882_models[ALC882_MODEL_LAST] = { |
1893 | [ALC882_3ST_DIG] = "3stack-dig", | ||
1894 | [ALC882_6ST_DIG] = "6stack-dig", | ||
1895 | [ALC882_W2JC] = "w2jc", | ||
1896 | [ALC885_MACPRO] = "macpro", | 1297 | [ALC885_MACPRO] = "macpro", |
1897 | [ALC885_MB5] = "mb5", | 1298 | [ALC885_MB5] = "mb5", |
1898 | [ALC885_MACMINI3] = "macmini3", | 1299 | [ALC885_MACMINI3] = "macmini3", |
@@ -1900,24 +1301,15 @@ static const char * const alc882_models[ALC882_MODEL_LAST] = { | |||
1900 | [ALC885_MBP3] = "mbp3", | 1301 | [ALC885_MBP3] = "mbp3", |
1901 | [ALC885_IMAC24] = "imac24", | 1302 | [ALC885_IMAC24] = "imac24", |
1902 | [ALC885_IMAC91] = "imac91", | 1303 | [ALC885_IMAC91] = "imac91", |
1903 | [ALC883_3ST_2ch_DIG] = "3stack-2ch-dig", | ||
1904 | [ALC883_3ST_6ch_DIG] = "3stack-6ch-dig", | ||
1905 | [ALC883_3ST_6ch] = "3stack-6ch", | ||
1906 | [ALC883_6ST_DIG] = "alc883-6stack-dig", | ||
1907 | [ALC888_ACER_ASPIRE_4930G] = "acer-aspire-4930g", | 1304 | [ALC888_ACER_ASPIRE_4930G] = "acer-aspire-4930g", |
1908 | [ALC888_ACER_ASPIRE_6530G] = "acer-aspire-6530g", | 1305 | [ALC888_ACER_ASPIRE_6530G] = "acer-aspire-6530g", |
1909 | [ALC888_ACER_ASPIRE_8930G] = "acer-aspire-8930g", | 1306 | [ALC888_ACER_ASPIRE_8930G] = "acer-aspire-8930g", |
1910 | [ALC888_ACER_ASPIRE_7730G] = "acer-aspire-7730g", | 1307 | [ALC888_ACER_ASPIRE_7730G] = "acer-aspire-7730g", |
1911 | [ALC883_3ST_6ch_INTEL] = "3stack-6ch-intel", | ||
1912 | [ALC889A_INTEL] = "intel-alc889a", | ||
1913 | [ALC889_INTEL] = "intel-x58", | ||
1914 | [ALC889A_MB31] = "mb31", | 1308 | [ALC889A_MB31] = "mb31", |
1915 | [ALC882_AUTO] = "auto", | 1309 | [ALC882_AUTO] = "auto", |
1916 | }; | 1310 | }; |
1917 | 1311 | ||
1918 | static const struct snd_pci_quirk alc882_cfg_tbl[] = { | 1312 | static const struct snd_pci_quirk alc882_cfg_tbl[] = { |
1919 | SND_PCI_QUIRK(0x1019, 0x6668, "ECS", ALC882_6ST_DIG), | ||
1920 | |||
1921 | SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G", | 1313 | SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G", |
1922 | ALC888_ACER_ASPIRE_4930G), | 1314 | ALC888_ACER_ASPIRE_4930G), |
1923 | SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G", | 1315 | SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G", |
@@ -1926,50 +1318,12 @@ static const struct snd_pci_quirk alc882_cfg_tbl[] = { | |||
1926 | ALC888_ACER_ASPIRE_8930G), | 1318 | ALC888_ACER_ASPIRE_8930G), |
1927 | SND_PCI_QUIRK(0x1025, 0x0146, "Acer Aspire 6935G", | 1319 | SND_PCI_QUIRK(0x1025, 0x0146, "Acer Aspire 6935G", |
1928 | ALC888_ACER_ASPIRE_8930G), | 1320 | ALC888_ACER_ASPIRE_8930G), |
1929 | SND_PCI_QUIRK(0x1025, 0x0157, "Acer X3200", ALC882_AUTO), | ||
1930 | SND_PCI_QUIRK(0x1025, 0x0158, "Acer AX1700-U3700A", ALC882_AUTO), | ||
1931 | SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G", | 1321 | SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G", |
1932 | ALC888_ACER_ASPIRE_6530G), | 1322 | ALC888_ACER_ASPIRE_6530G), |
1933 | SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G", | 1323 | SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G", |
1934 | ALC888_ACER_ASPIRE_6530G), | 1324 | ALC888_ACER_ASPIRE_6530G), |
1935 | SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G", | 1325 | SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G", |
1936 | ALC888_ACER_ASPIRE_7730G), | 1326 | ALC888_ACER_ASPIRE_7730G), |
1937 | |||
1938 | SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavilion", ALC883_6ST_DIG), | ||
1939 | SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), | ||
1940 | |||
1941 | SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_W2JC), | ||
1942 | SND_PCI_QUIRK(0x1043, 0x817f, "Asus P5LD2", ALC882_6ST_DIG), | ||
1943 | SND_PCI_QUIRK(0x1043, 0x81d8, "Asus P5WD", ALC882_6ST_DIG), | ||
1944 | SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), | ||
1945 | SND_PCI_QUIRK(0x1043, 0x8284, "Asus Z37E", ALC883_6ST_DIG), | ||
1946 | |||
1947 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), | ||
1948 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC882_6ST_DIG), | ||
1949 | SND_PCI_QUIRK(0x108e, 0x534d, NULL, ALC883_3ST_6ch), | ||
1950 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte P35 DS3R", ALC882_6ST_DIG), | ||
1951 | |||
1952 | SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG), | ||
1953 | SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC883_6ST_DIG), | ||
1954 | SND_PCI_QUIRK(0x1462, 0x7187, "MSI", ALC883_6ST_DIG), | ||
1955 | SND_PCI_QUIRK(0x1462, 0x7250, "MSI", ALC883_6ST_DIG), | ||
1956 | SND_PCI_QUIRK(0x1462, 0x7267, "MSI", ALC883_3ST_6ch_DIG), | ||
1957 | SND_PCI_QUIRK(0x1462, 0x7280, "MSI", ALC883_6ST_DIG), | ||
1958 | SND_PCI_QUIRK(0x1462, 0x7327, "MSI", ALC883_6ST_DIG), | ||
1959 | SND_PCI_QUIRK(0x1462, 0x7350, "MSI", ALC883_6ST_DIG), | ||
1960 | |||
1961 | SND_PCI_QUIRK(0x147b, 0x1083, "Abit IP35-PRO", ALC883_6ST_DIG), | ||
1962 | SND_PCI_QUIRK(0x1558, 0x0571, "Clevo laptop M570U", ALC883_3ST_6ch_DIG), | ||
1963 | SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch), | ||
1964 | SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG), | ||
1965 | |||
1966 | SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL), | ||
1967 | SND_PCI_QUIRK(0x8086, 0x0002, "DG33FBC", ALC883_3ST_6ch_INTEL), | ||
1968 | SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC889_INTEL), | ||
1969 | SND_PCI_QUIRK(0x8086, 0x0021, "Intel IbexPeak", ALC889A_INTEL), | ||
1970 | SND_PCI_QUIRK(0x8086, 0x3b56, "Intel IbexPeak", ALC889A_INTEL), | ||
1971 | SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC882_6ST_DIG), | ||
1972 | |||
1973 | {} | 1327 | {} |
1974 | }; | 1328 | }; |
1975 | 1329 | ||
@@ -2001,43 +1355,6 @@ static const struct snd_pci_quirk alc882_ssid_cfg_tbl[] = { | |||
2001 | }; | 1355 | }; |
2002 | 1356 | ||
2003 | static const struct alc_config_preset alc882_presets[] = { | 1357 | static const struct alc_config_preset alc882_presets[] = { |
2004 | [ALC882_3ST_DIG] = { | ||
2005 | .mixers = { alc882_base_mixer }, | ||
2006 | .init_verbs = { alc882_base_init_verbs, | ||
2007 | alc882_adc1_init_verbs }, | ||
2008 | .num_dacs = ARRAY_SIZE(alc882_dac_nids), | ||
2009 | .dac_nids = alc882_dac_nids, | ||
2010 | .dig_out_nid = ALC882_DIGOUT_NID, | ||
2011 | .dig_in_nid = ALC882_DIGIN_NID, | ||
2012 | .num_channel_mode = ARRAY_SIZE(alc882_ch_modes), | ||
2013 | .channel_mode = alc882_ch_modes, | ||
2014 | .need_dac_fix = 1, | ||
2015 | .input_mux = &alc882_capture_source, | ||
2016 | }, | ||
2017 | [ALC882_6ST_DIG] = { | ||
2018 | .mixers = { alc882_base_mixer, alc882_chmode_mixer }, | ||
2019 | .init_verbs = { alc882_base_init_verbs, | ||
2020 | alc882_adc1_init_verbs }, | ||
2021 | .num_dacs = ARRAY_SIZE(alc882_dac_nids), | ||
2022 | .dac_nids = alc882_dac_nids, | ||
2023 | .dig_out_nid = ALC882_DIGOUT_NID, | ||
2024 | .dig_in_nid = ALC882_DIGIN_NID, | ||
2025 | .num_channel_mode = ARRAY_SIZE(alc882_sixstack_modes), | ||
2026 | .channel_mode = alc882_sixstack_modes, | ||
2027 | .input_mux = &alc882_capture_source, | ||
2028 | }, | ||
2029 | [ALC882_W2JC] = { | ||
2030 | .mixers = { alc882_w2jc_mixer, alc882_chmode_mixer }, | ||
2031 | .init_verbs = { alc882_base_init_verbs, alc882_adc1_init_verbs, | ||
2032 | alc882_eapd_verbs, alc880_gpio1_init_verbs }, | ||
2033 | .num_dacs = ARRAY_SIZE(alc882_dac_nids), | ||
2034 | .dac_nids = alc882_dac_nids, | ||
2035 | .num_channel_mode = ARRAY_SIZE(alc880_threestack_modes), | ||
2036 | .channel_mode = alc880_threestack_modes, | ||
2037 | .need_dac_fix = 1, | ||
2038 | .input_mux = &alc882_capture_source, | ||
2039 | .dig_out_nid = ALC882_DIGOUT_NID, | ||
2040 | }, | ||
2041 | [ALC885_MBA21] = { | 1358 | [ALC885_MBA21] = { |
2042 | .mixers = { alc885_mba21_mixer }, | 1359 | .mixers = { alc885_mba21_mixer }, |
2043 | .init_verbs = { alc885_mba21_init_verbs, alc880_gpio1_init_verbs }, | 1360 | .init_verbs = { alc885_mba21_init_verbs, alc880_gpio1_init_verbs }, |
@@ -2137,103 +1454,6 @@ static const struct alc_config_preset alc882_presets[] = { | |||
2137 | .setup = alc885_imac91_setup, | 1454 | .setup = alc885_imac91_setup, |
2138 | .init_hook = alc_hp_automute, | 1455 | .init_hook = alc_hp_automute, |
2139 | }, | 1456 | }, |
2140 | [ALC883_3ST_2ch_DIG] = { | ||
2141 | .mixers = { alc883_3ST_2ch_mixer }, | ||
2142 | .init_verbs = { alc883_init_verbs }, | ||
2143 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
2144 | .dac_nids = alc883_dac_nids, | ||
2145 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
2146 | .dig_in_nid = ALC883_DIGIN_NID, | ||
2147 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), | ||
2148 | .channel_mode = alc883_3ST_2ch_modes, | ||
2149 | .input_mux = &alc883_capture_source, | ||
2150 | }, | ||
2151 | [ALC883_3ST_6ch_DIG] = { | ||
2152 | .mixers = { alc883_3ST_6ch_mixer, alc883_chmode_mixer }, | ||
2153 | .init_verbs = { alc883_init_verbs }, | ||
2154 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
2155 | .dac_nids = alc883_dac_nids, | ||
2156 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
2157 | .dig_in_nid = ALC883_DIGIN_NID, | ||
2158 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), | ||
2159 | .channel_mode = alc883_3ST_6ch_modes, | ||
2160 | .need_dac_fix = 1, | ||
2161 | .input_mux = &alc883_capture_source, | ||
2162 | }, | ||
2163 | [ALC883_3ST_6ch] = { | ||
2164 | .mixers = { alc883_3ST_6ch_mixer, alc883_chmode_mixer }, | ||
2165 | .init_verbs = { alc883_init_verbs }, | ||
2166 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
2167 | .dac_nids = alc883_dac_nids, | ||
2168 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), | ||
2169 | .channel_mode = alc883_3ST_6ch_modes, | ||
2170 | .need_dac_fix = 1, | ||
2171 | .input_mux = &alc883_capture_source, | ||
2172 | }, | ||
2173 | [ALC883_3ST_6ch_INTEL] = { | ||
2174 | .mixers = { alc883_3ST_6ch_intel_mixer, alc883_chmode_mixer }, | ||
2175 | .init_verbs = { alc883_init_verbs }, | ||
2176 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
2177 | .dac_nids = alc883_dac_nids, | ||
2178 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
2179 | .dig_in_nid = ALC883_DIGIN_NID, | ||
2180 | .slave_dig_outs = alc883_slave_dig_outs, | ||
2181 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_intel_modes), | ||
2182 | .channel_mode = alc883_3ST_6ch_intel_modes, | ||
2183 | .need_dac_fix = 1, | ||
2184 | .input_mux = &alc883_3stack_6ch_intel, | ||
2185 | }, | ||
2186 | [ALC889A_INTEL] = { | ||
2187 | .mixers = { alc885_8ch_intel_mixer, alc883_chmode_mixer }, | ||
2188 | .init_verbs = { alc885_init_verbs, alc885_init_input_verbs, | ||
2189 | alc_hp15_unsol_verbs }, | ||
2190 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
2191 | .dac_nids = alc883_dac_nids, | ||
2192 | .num_adc_nids = ARRAY_SIZE(alc889_adc_nids), | ||
2193 | .adc_nids = alc889_adc_nids, | ||
2194 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
2195 | .dig_in_nid = ALC883_DIGIN_NID, | ||
2196 | .slave_dig_outs = alc883_slave_dig_outs, | ||
2197 | .num_channel_mode = ARRAY_SIZE(alc889_8ch_intel_modes), | ||
2198 | .channel_mode = alc889_8ch_intel_modes, | ||
2199 | .capsrc_nids = alc889_capsrc_nids, | ||
2200 | .input_mux = &alc889_capture_source, | ||
2201 | .setup = alc889_automute_setup, | ||
2202 | .init_hook = alc_hp_automute, | ||
2203 | .unsol_event = alc_sku_unsol_event, | ||
2204 | .need_dac_fix = 1, | ||
2205 | }, | ||
2206 | [ALC889_INTEL] = { | ||
2207 | .mixers = { alc885_8ch_intel_mixer, alc883_chmode_mixer }, | ||
2208 | .init_verbs = { alc885_init_verbs, alc889_init_input_verbs, | ||
2209 | alc889_eapd_verbs, alc_hp15_unsol_verbs}, | ||
2210 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
2211 | .dac_nids = alc883_dac_nids, | ||
2212 | .num_adc_nids = ARRAY_SIZE(alc889_adc_nids), | ||
2213 | .adc_nids = alc889_adc_nids, | ||
2214 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
2215 | .dig_in_nid = ALC883_DIGIN_NID, | ||
2216 | .slave_dig_outs = alc883_slave_dig_outs, | ||
2217 | .num_channel_mode = ARRAY_SIZE(alc889_8ch_intel_modes), | ||
2218 | .channel_mode = alc889_8ch_intel_modes, | ||
2219 | .capsrc_nids = alc889_capsrc_nids, | ||
2220 | .input_mux = &alc889_capture_source, | ||
2221 | .setup = alc889_automute_setup, | ||
2222 | .init_hook = alc889_intel_init_hook, | ||
2223 | .unsol_event = alc_sku_unsol_event, | ||
2224 | .need_dac_fix = 1, | ||
2225 | }, | ||
2226 | [ALC883_6ST_DIG] = { | ||
2227 | .mixers = { alc883_base_mixer, alc883_chmode_mixer }, | ||
2228 | .init_verbs = { alc883_init_verbs }, | ||
2229 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
2230 | .dac_nids = alc883_dac_nids, | ||
2231 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
2232 | .dig_in_nid = ALC883_DIGIN_NID, | ||
2233 | .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes), | ||
2234 | .channel_mode = alc883_sixstack_modes, | ||
2235 | .input_mux = &alc883_capture_source, | ||
2236 | }, | ||
2237 | [ALC888_ACER_ASPIRE_4930G] = { | 1457 | [ALC888_ACER_ASPIRE_4930G] = { |
2238 | .mixers = { alc888_acer_aspire_4930g_mixer, | 1458 | .mixers = { alc888_acer_aspire_4930g_mixer, |
2239 | alc883_chmode_mixer }, | 1459 | alc883_chmode_mixer }, |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 5aa8deb4ae88..c1fa4c3945d2 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4239,8 +4239,18 @@ enum { | |||
4239 | ALC883_FIXUP_EAPD, | 4239 | ALC883_FIXUP_EAPD, |
4240 | ALC883_FIXUP_ACER_EAPD, | 4240 | ALC883_FIXUP_ACER_EAPD, |
4241 | ALC882_FIXUP_GPIO3, | 4241 | ALC882_FIXUP_GPIO3, |
4242 | ALC889_FIXUP_COEF, | ||
4243 | ALC882_FIXUP_ASUS_W2JC, | ||
4242 | }; | 4244 | }; |
4243 | 4245 | ||
4246 | static void alc889_fixup_coef(struct hda_codec *codec, | ||
4247 | const struct alc_fixup *fix, int action) | ||
4248 | { | ||
4249 | if (action != ALC_FIXUP_ACT_INIT) | ||
4250 | return; | ||
4251 | alc889_coef_init(codec); | ||
4252 | } | ||
4253 | |||
4244 | static const struct alc_fixup alc882_fixups[] = { | 4254 | static const struct alc_fixup alc882_fixups[] = { |
4245 | [ALC882_FIXUP_ABIT_AW9D_MAX] = { | 4255 | [ALC882_FIXUP_ABIT_AW9D_MAX] = { |
4246 | .type = ALC_FIXUP_PINS, | 4256 | .type = ALC_FIXUP_PINS, |
@@ -4323,6 +4333,16 @@ static const struct alc_fixup alc882_fixups[] = { | |||
4323 | .type = ALC_FIXUP_VERBS, | 4333 | .type = ALC_FIXUP_VERBS, |
4324 | .v.verbs = alc_gpio3_init_verbs, | 4334 | .v.verbs = alc_gpio3_init_verbs, |
4325 | }, | 4335 | }, |
4336 | [ALC882_FIXUP_ASUS_W2JC] = { | ||
4337 | .type = ALC_FIXUP_VERBS, | ||
4338 | .v.verbs = alc_gpio1_init_verbs, | ||
4339 | .chained = true, | ||
4340 | .chain_id = ALC882_FIXUP_EAPD, | ||
4341 | }, | ||
4342 | [ALC889_FIXUP_COEF] = { | ||
4343 | .type = ALC_FIXUP_FUNC, | ||
4344 | .v.func = alc889_fixup_coef, | ||
4345 | }, | ||
4326 | }; | 4346 | }; |
4327 | 4347 | ||
4328 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { | 4348 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { |
@@ -4336,6 +4356,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { | |||
4336 | SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736), | 4356 | SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736), |
4337 | SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD), | 4357 | SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD), |
4338 | SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V), | 4358 | SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V), |
4359 | SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC), | ||
4339 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), | 4360 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), |
4340 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), | 4361 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), |
4341 | SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), /* codec SSID */ | 4362 | SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), /* codec SSID */ |
@@ -4345,6 +4366,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { | |||
4345 | SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD), | 4366 | SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD), |
4346 | SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD), | 4367 | SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD), |
4347 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530), | 4368 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530), |
4369 | SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC889_FIXUP_COEF), | ||
4348 | {} | 4370 | {} |
4349 | }; | 4371 | }; |
4350 | 4372 | ||
@@ -4417,14 +4439,6 @@ static int patch_alc882(struct hda_codec *codec) | |||
4417 | err = alc882_parse_auto_config(codec); | 4439 | err = alc882_parse_auto_config(codec); |
4418 | if (err < 0) | 4440 | if (err < 0) |
4419 | goto error; | 4441 | goto error; |
4420 | #ifdef CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS | ||
4421 | else if (!err) { | ||
4422 | printk(KERN_INFO | ||
4423 | "hda_codec: Cannot set up configuration " | ||
4424 | "from BIOS. Using base mode...\n"); | ||
4425 | board_config = ALC882_3ST_DIG; | ||
4426 | } | ||
4427 | #endif | ||
4428 | } | 4442 | } |
4429 | 4443 | ||
4430 | if (board_config != ALC_MODEL_AUTO) | 4444 | if (board_config != ALC_MODEL_AUTO) |