]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From 9cb36c2afc298a2f2085ae0071924b7e3f55e72d Mon Sep 17 00:00:00 2001 |
2 | From: Mauro Carvalho Chehab <mchehab@infradead.org> | |
3 | Date: Mon, 11 Aug 2008 10:18:39 +0200 | |
4 | Subject: ALSA: patch_sigmatel: Add missing Gateway entries and autodetection | |
5 | Patch-mainline: 2.6.29-rc1 | |
6 | References: bnc#460478 | |
7 | ||
8 | ||
9 | Gateway autodetection and entries are incomplete. | |
10 | ||
11 | This patch adds the entries found at the .INI file for their driver version | |
12 | 5.10.5082.0. | |
13 | ||
14 | It also uses the proper code to seek for notebook ID, since this is based on | |
15 | codec subsystem ID on those devices. | |
16 | ||
17 | This should provide a proper pinup for several gateways notebooks: | |
18 | Gateway M465-E Notebook [Part #1008637] | |
19 | Gateway M465-G Notebook [Part #1008667] | |
20 | Gateway NX260X Notebook [Part #1008794] | |
21 | Gateway NX100X Notebook [Part #1008798] | |
22 | Gateway E-100M Notebook [Part #1008799] | |
23 | Gateway E-100M G Notebook [Part #1008800] | |
24 | Gateway M255-E Notebook [Part #1008801] | |
25 | Gateway M255-G Notebook [Part #1008803] | |
26 | Gateway M285-E Convertible Notebook [Part #1008804] | |
27 | Gateway M285-G Convertible Notebook [Part #1008805] | |
28 | Gateway CX210S Convertible Notebook [Part #1008807] | |
29 | Gateway CX210X Convertible Notebook [Part #1008808] | |
30 | Gateway E-100M SB Notebook [Part #1008973] | |
31 | Gateway M255-E SB Notebook [Part #1008989] | |
32 | Gateway M285-E SB Convertible Notebook [Part #1008990] | |
33 | Gateway M465-E Notebook [Part #1009022] | |
34 | Gateway CX2724 Convertible Notebook [Part #1009036] | |
35 | Gateway MX1025 Notebook [Part #1009046] | |
36 | Gateway CX2720 Convertible Notebook [Part #1009063] | |
37 | Gateway CX2724h Convertible Notebook [Part #1009089] | |
38 | Gateway MX1023 Notebook [Part #1009097] | |
39 | Gateway MX1023h Notebook [Part #1009098] | |
40 | Gateway NX260X Notebook [Part #1009112] | |
41 | Gateway E-100M Notebook [Part #1009126] | |
42 | Gateway MX7533 Notebook [Part #1009146] [Part #1009163] | |
43 | Gateway CX210X Convertible Notebook [Part #1009346] | |
44 | Gateway NX570X Notebook [Part #1009442] | |
45 | Gateway NX570X Notebook [Part #1009448] | |
46 | Gateway NX270S Notebook [Part #1009550] | |
47 | Gateway MX6448 Notebook [Part #1013912R] | |
48 | Gateway MX6453 Notebook [Part #1013913R] | |
49 | Gateway MX6216 Notebook [Part #1013916R] | |
50 | Gateway MX6931 Notebook [Part #1013918R] | |
51 | Gateway CX2726 Convertible Notebook [Part #1013921R] | |
52 | Gateway MP8708 Notebook [Part #1013924R] | |
53 | Gateway MX6446 Notebook [Part #1013927R] | |
54 | Gateway MX6930 Notebook [Part #1013928R] | |
55 | Gateway MX6447 Notebook [Part #1013932R] | |
56 | Gateway MX6454 Notebook [Part #1013943R] | |
57 | Gateway MX6439 Notebook [Part #1013947R] [Part #1013955R] [Part #1013971R] | |
58 | Gateway MX6930h Notebook [Part #1013973R] [Part #1013974R] [Part #1013975R] | |
59 | Gateway MX6955 Notebook [Part #1014028R] | |
60 | Gateway MX6956 Notebook [Part #1014033R] | |
61 | Gateway MX6959 Notebook [Part #1014061R] | |
62 | Gateway MX6957 Notebook [Part #1014065R] | |
63 | Gateway MX6960 Notebook [Part #1014068R] | |
64 | Gateway MX6958 Notebook [Part #1014072R] | |
65 | Gateway NX570X Notebook [Part #1014077R] | |
66 | Gateway NX570XL Notebook [Part #1014078R] | |
67 | Gateway NX570QS Notebook [Part #1014079R] | |
68 | Gateway MX6961 Notebook [Part #1014080R] [Part #1014106R] | |
69 | Gateway MX6961h Notebook [Part #1014112R] | |
70 | Gateway NX270S Notebook [Part #1014120R] | |
71 | Gateway MX6431 Notebook [Part #1014121R] | |
72 | Gateway MX8710 Notebook [Part #2905895R] | |
73 | Gateway MX3702 Notebook [Part #2905898R] | |
74 | Blade-K8F GW UMA Single Core Motherboard w/RS485M and 1394 - Quanta (FRU) [Part #4006133R] | |
75 | ||
76 | Since some entries conflict with existing pinups, I'm providing a separate | |
77 | patch to fix those entries. | |
78 | ||
79 | Tested only with Gateway MX6453. | |
80 | ||
81 | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> | |
82 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | |
83 | ||
84 | --- | |
85 | sound/pci/hda/patch_sigmatel.c | 89 +++++++++++++++++++++++++++++++++++++---- | |
86 | 1 file changed, 81 insertions(+), 8 deletions(-) | |
87 | ||
88 | --- a/sound/pci/hda/patch_sigmatel.c | |
89 | +++ b/sound/pci/hda/patch_sigmatel.c | |
90 | @@ -94,7 +94,13 @@ enum { | |
91 | ||
92 | enum { | |
93 | STAC_925x_REF, | |
94 | + STAC_M1, | |
95 | + STAC_M1_2, | |
96 | + STAC_M2, | |
97 | STAC_M2_2, | |
98 | + STAC_M3, | |
99 | + STAC_M5, | |
100 | + STAC_M6, | |
101 | STAC_MA6, | |
102 | STAC_PA6, | |
103 | STAC_925x_MODELS | |
104 | @@ -1551,11 +1557,40 @@ static unsigned int ref925x_pin_configs[ | |
105 | 0x90a70320, 0x02214210, 0x01019020, 0x9033032e, | |
106 | }; | |
107 | ||
108 | +static unsigned int stac925xM1_pin_configs[8] = { | |
109 | + 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, | |
110 | + 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e, | |
111 | +}; | |
112 | +static unsigned int stac925xM1_2_pin_configs[8] = { | |
113 | + 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, | |
114 | + 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e, | |
115 | +}; | |
116 | +static unsigned int stac925xM2_pin_configs[8] = { | |
117 | + 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, | |
118 | + 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e, | |
119 | +}; | |
120 | + | |
121 | +static unsigned int stac925xM3_pin_configs[8] = { | |
122 | + 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, | |
123 | + 0x40a000f0, 0x90100210, 0x400003f1, 0x503303f3, | |
124 | +}; | |
125 | +static unsigned int stac925xM5_pin_configs[8] = { | |
126 | + 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, | |
127 | + 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e, | |
128 | +}; | |
129 | + | |
130 | +/* Original M6 entry at .ini file */ | |
131 | +static unsigned int stac925xM6_pin_configs[8] = { | |
132 | + 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, | |
133 | + 0x40a000f0, 0x90100210, 0x400003f1, 0x90330320, | |
134 | +}; | |
135 | + | |
136 | static unsigned int stac925x_MA6_pin_configs[8] = { | |
137 | 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021, | |
138 | 0x90a70320, 0x90100211, 0x400003f1, 0x9033032e, | |
139 | }; | |
140 | ||
141 | +/* This entry should be M2 */ | |
142 | static unsigned int stac925x_PA6_pin_configs[8] = { | |
143 | 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021, | |
144 | 0x50a103f0, 0x90100211, 0x400003f1, 0x9033032e, | |
145 | @@ -1568,27 +1603,55 @@ static unsigned int stac925xM2_2_pin_con | |
146 | ||
147 | static unsigned int *stac925x_brd_tbl[STAC_925x_MODELS] = { | |
148 | [STAC_REF] = ref925x_pin_configs, | |
149 | + [STAC_M1] = stac925xM1_pin_configs, | |
150 | + [STAC_M1_2] = stac925xM1_2_pin_configs, | |
151 | + [STAC_M2] = stac925xM2_pin_configs, | |
152 | [STAC_M2_2] = stac925xM2_2_pin_configs, | |
153 | + [STAC_M3] = stac925xM3_pin_configs, | |
154 | + [STAC_M5] = stac925xM5_pin_configs, | |
155 | + [STAC_M6] = stac925xM6_pin_configs, | |
156 | [STAC_MA6] = stac925x_MA6_pin_configs, | |
157 | [STAC_PA6] = stac925x_PA6_pin_configs, | |
158 | }; | |
159 | ||
160 | static const char *stac925x_models[STAC_925x_MODELS] = { | |
161 | [STAC_REF] = "ref", | |
162 | + [STAC_M1] = "m1", | |
163 | + [STAC_M1_2] = "m1-2", | |
164 | + [STAC_M2] = "m2", | |
165 | [STAC_M2_2] = "m2-2", | |
166 | - [STAC_MA6] = "m6", | |
167 | + [STAC_M3] = "m3", | |
168 | + [STAC_M5] = "m5", | |
169 | + [STAC_M6] = "m6", | |
170 | + [STAC_MA6] = "ma6", | |
171 | [STAC_PA6] = "pa6", | |
172 | }; | |
173 | ||
174 | -static struct snd_pci_quirk stac925x_cfg_tbl[] = { | |
175 | - /* SigmaTel reference board */ | |
176 | - SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF), | |
177 | - SND_PCI_QUIRK(0x8384, 0x7632, "Stac9202 Reference Board", STAC_REF), | |
178 | +static struct snd_pci_quirk stac925x_codec_id_cfg_tbl[] = { | |
179 | SND_PCI_QUIRK(0x107b, 0x0316, "Gateway M255", STAC_REF), | |
180 | SND_PCI_QUIRK(0x107b, 0x0366, "Gateway MP6954", STAC_REF), | |
181 | + | |
182 | SND_PCI_QUIRK(0x107b, 0x0461, "Gateway NX560XL", STAC_MA6), | |
183 | SND_PCI_QUIRK(0x107b, 0x0681, "Gateway NX860", STAC_PA6), | |
184 | - SND_PCI_QUIRK(0x1002, 0x437b, "Gateway MX6453", STAC_M2_2), | |
185 | + SND_PCI_QUIRK(0x107b, 0x0367, "Gateway MX6453", STAC_M1_2), | |
186 | + | |
187 | + /* Not sure about the brand name for those */ | |
188 | + SND_PCI_QUIRK(0x107b, 0x0281, "Gateway mobile", STAC_M1), | |
189 | + SND_PCI_QUIRK(0x107b, 0x0507, "Gateway mobile", STAC_M3), | |
190 | + SND_PCI_QUIRK(0x107b, 0x0281, "Gateway mobile", STAC_M6), | |
191 | + SND_PCI_QUIRK(0x107b, 0x0685, "Gateway mobile", STAC_M2_2), | |
192 | + | |
193 | + {} /* terminator */ | |
194 | +}; | |
195 | + | |
196 | +static struct snd_pci_quirk stac925x_cfg_tbl[] = { | |
197 | + /* SigmaTel reference board */ | |
198 | + SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF), | |
199 | + SND_PCI_QUIRK(0x8384, 0x7632, "Stac9202 Reference Board", STAC_REF), | |
200 | + | |
201 | + /* Default table for unknown ID */ | |
202 | + SND_PCI_QUIRK(0x1002, 0x437b, "Gateway mobile", STAC_M2_2), | |
203 | + | |
204 | {} /* terminator */ | |
205 | }; | |
206 | ||
207 | @@ -4149,12 +4212,22 @@ static int patch_stac925x(struct hda_cod | |
208 | codec->spec = spec; | |
209 | spec->num_pins = ARRAY_SIZE(stac925x_pin_nids); | |
210 | spec->pin_nids = stac925x_pin_nids; | |
211 | - spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS, | |
212 | + | |
213 | + /* Check first for codec ID */ | |
214 | + spec->board_config = snd_hda_check_board_codec_sid_config(codec, | |
215 | + STAC_925x_MODELS, | |
216 | + stac925x_models, | |
217 | + stac925x_codec_id_cfg_tbl); | |
218 | + | |
219 | + /* Now checks for PCI ID, if codec ID is not found */ | |
220 | + if (spec->board_config < 0) | |
221 | + spec->board_config = snd_hda_check_board_config(codec, | |
222 | + STAC_925x_MODELS, | |
223 | stac925x_models, | |
224 | stac925x_cfg_tbl); | |
225 | again: | |
226 | if (spec->board_config < 0) { | |
227 | - snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x," | |
228 | + snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x," | |
229 | "using BIOS defaults\n"); | |
230 | err = stac92xx_save_bios_config_regs(codec); | |
231 | if (err < 0) { |