blob: a076a6ce8071b344ff12d9ce4be8305f4ec8b67e [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Driver for generic CS4232/CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239 chips
Jaroslav Kyselac1017a42007-10-15 09:50:19 +02003 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 *
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 */
21
Linus Torvalds1da177e2005-04-16 15:20:36 -070022#include <linux/init.h>
Takashi Iwai6bba41a2005-11-17 17:00:53 +010023#include <linux/err.h>
Takashi Iwai5e24c1c2007-02-22 12:50:54 +010024#include <linux/isa.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070025#include <linux/slab.h>
26#include <linux/pnp.h>
27#include <linux/moduleparam.h>
28#include <sound/core.h>
Krzysztof Helt61ef19d2008-07-31 21:02:42 +020029#include <sound/wss.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070030#include <sound/mpu401.h>
31#include <sound/opl3.h>
32#include <sound/initval.h>
33
Jaroslav Kyselac1017a42007-10-15 09:50:19 +020034MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>");
Linus Torvalds1da177e2005-04-16 15:20:36 -070035MODULE_LICENSE("GPL");
Krzysztof Heltc2b73d12009-02-16 21:38:37 +010036MODULE_DESCRIPTION("Cirrus Logic CS4232-9");
Linus Torvalds1da177e2005-04-16 15:20:36 -070037MODULE_SUPPORTED_DEVICE("{{Turtle Beach,TBS-2000},"
38 "{Turtle Beach,Tropez Plus},"
39 "{SIC CrystalWave 32},"
40 "{Hewlett Packard,Omnibook 5500},"
41 "{TerraTec,Maestro 32/96},"
Krzysztof Heltc2b73d12009-02-16 21:38:37 +010042 "{Philips,PCA70PS}},"
43 "{{Crystal Semiconductors,CS4235},"
Linus Torvalds1da177e2005-04-16 15:20:36 -070044 "{Crystal Semiconductors,CS4236},"
45 "{Crystal Semiconductors,CS4237},"
46 "{Crystal Semiconductors,CS4238},"
47 "{Crystal Semiconductors,CS4239},"
48 "{Acer,AW37},"
49 "{Acer,AW35/Pro},"
50 "{Crystal,3D},"
51 "{Crystal Computer,TidalWave128},"
52 "{Dell,Optiplex GX1},"
53 "{Dell,Workstation 400 sound},"
54 "{EliteGroup,P5TX-LA sound},"
55 "{Gallant,SC-70P},"
56 "{Gateway,E1000 Onboard CS4236B},"
57 "{Genius,Sound Maker 3DJ},"
58 "{Hewlett Packard,HP6330 sound},"
59 "{IBM,PC 300PL sound},"
60 "{IBM,Aptiva 2137 E24},"
61 "{IBM,IntelliStation M Pro},"
62 "{Intel,Marlin Spike Mobo CS4235},"
63 "{Intel PR440FX Onboard},"
64 "{Guillemot,MaxiSound 16 PnP},"
65 "{NewClear,3D},"
66 "{TerraTec,AudioSystem EWS64L/XL},"
67 "{Typhoon Soundsystem,CS4236B},"
68 "{Turtle Beach,Malibu},"
69 "{Unknown,Digital PC 5000 Onboard}}");
Linus Torvalds1da177e2005-04-16 15:20:36 -070070
Krzysztof Heltc2b73d12009-02-16 21:38:37 +010071MODULE_ALIAS("snd_cs4232");
72
73#define IDENT "CS4232+"
74#define DEV_NAME "cs4232+"
Linus Torvalds1da177e2005-04-16 15:20:36 -070075
76static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
77static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
78static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_ISAPNP; /* Enable this card */
79#ifdef CONFIG_PNP
80static int isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
81#endif
82static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* PnP setup */
83static long cport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* PnP setup */
84static long mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;/* PnP setup */
85static long fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* PnP setup */
86static long sb_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* PnP setup */
87static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 5,7,9,11,12,15 */
88static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 9,11,12,15 */
89static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* 0,1,3,5,6,7 */
90static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* 0,1,3,5,6,7 */
91
92module_param_array(index, int, NULL, 0444);
93MODULE_PARM_DESC(index, "Index value for " IDENT " soundcard.");
94module_param_array(id, charp, NULL, 0444);
95MODULE_PARM_DESC(id, "ID string for " IDENT " soundcard.");
96module_param_array(enable, bool, NULL, 0444);
97MODULE_PARM_DESC(enable, "Enable " IDENT " soundcard.");
98#ifdef CONFIG_PNP
99module_param_array(isapnp, bool, NULL, 0444);
100MODULE_PARM_DESC(isapnp, "ISA PnP detection for specified soundcard.");
101#endif
102module_param_array(port, long, NULL, 0444);
103MODULE_PARM_DESC(port, "Port # for " IDENT " driver.");
104module_param_array(cport, long, NULL, 0444);
105MODULE_PARM_DESC(cport, "Control port # for " IDENT " driver.");
106module_param_array(mpu_port, long, NULL, 0444);
107MODULE_PARM_DESC(mpu_port, "MPU-401 port # for " IDENT " driver.");
108module_param_array(fm_port, long, NULL, 0444);
109MODULE_PARM_DESC(fm_port, "FM port # for " IDENT " driver.");
110module_param_array(sb_port, long, NULL, 0444);
111MODULE_PARM_DESC(sb_port, "SB port # for " IDENT " driver (optional).");
112module_param_array(irq, int, NULL, 0444);
113MODULE_PARM_DESC(irq, "IRQ # for " IDENT " driver.");
114module_param_array(mpu_irq, int, NULL, 0444);
115MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for " IDENT " driver.");
116module_param_array(dma1, int, NULL, 0444);
117MODULE_PARM_DESC(dma1, "DMA1 # for " IDENT " driver.");
118module_param_array(dma2, int, NULL, 0444);
119MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver.");
120
Takashi Iwai59b1b342006-01-04 15:06:44 +0100121#ifdef CONFIG_PNP
Rene Herman609d7692007-05-15 11:42:56 +0200122static int isa_registered;
Clemens Ladischf7a92752005-12-07 09:13:42 +0100123static int pnpc_registered;
Clemens Ladischf7a92752005-12-07 09:13:42 +0100124static int pnp_registered;
Takashi Iwai59b1b342006-01-04 15:06:44 +0100125#endif /* CONFIG_PNP */
Clemens Ladischf7a92752005-12-07 09:13:42 +0100126
Linus Torvalds1da177e2005-04-16 15:20:36 -0700127struct snd_card_cs4236 {
Krzysztof Helt7779f752008-07-31 21:03:41 +0200128 struct snd_wss *chip;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700129 struct resource *res_sb_port;
130#ifdef CONFIG_PNP
131 struct pnp_dev *wss;
132 struct pnp_dev *ctrl;
133 struct pnp_dev *mpu;
134#endif
135};
136
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137#ifdef CONFIG_PNP
138
Takashi Iwaia9824c82005-11-17 17:51:00 +0100139/*
140 * PNP BIOS
141 */
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100142static const struct pnp_device_id snd_cs423x_pnpbiosids[] = {
Takashi Iwaia9824c82005-11-17 17:51:00 +0100143 { .id = "CSC0100" },
144 { .id = "CSC0000" },
145 /* Guillemot Turtlebeach something appears to be cs4232 compatible
146 * (untested) */
147 { .id = "GIM0100" },
148 { .id = "" }
149};
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100150MODULE_DEVICE_TABLE(pnp, snd_cs423x_pnpbiosids);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700151
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100152#define CS423X_ISAPNP_DRIVER "cs4232_isapnp"
Linus Torvalds1da177e2005-04-16 15:20:36 -0700153static struct pnp_card_device_id snd_cs423x_pnpids[] = {
154 /* Philips PCA70PS */
155 { .id = "CSC0d32", .devs = { { "CSC0000" }, { "CSC0010" }, { "PNPb006" } } },
156 /* TerraTec Maestro 32/96 (CS4232) */
157 { .id = "CSC1a32", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
158 /* HP Omnibook 5500 onboard */
159 { .id = "CSC4232", .devs = { { "CSC0000" }, { "CSC0002" }, { "CSC0003" } } },
160 /* Unnamed CS4236 card (Made in Taiwan) */
161 { .id = "CSC4236", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
162 /* Turtle Beach TBS-2000 (CS4232) */
163 { .id = "CSC7532", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSCb006" } } },
164 /* Turtle Beach Tropez Plus (CS4232) */
165 { .id = "CSC7632", .devs = { { "CSC0000" }, { "CSC0010" }, { "PNPb006" } } },
166 /* SIC CrystalWave 32 (CS4232) */
167 { .id = "CSCf032", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
Lukasz Stemach50f794c2006-01-23 15:22:13 +0100168 /* Netfinity 3000 on-board soundcard */
169 { .id = "CSCe825", .devs = { { "CSC0100" }, { "CSC0110" }, { "CSC010f" } } },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700170 /* Intel Marlin Spike Motherboard - CS4235 */
171 { .id = "CSC0225", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
172 /* Intel Marlin Spike Motherboard (#2) - CS4235 */
173 { .id = "CSC0225", .devs = { { "CSC0100" }, { "CSC0110" }, { "CSC0103" } } },
174 /* Unknown Intel mainboard - CS4235 */
175 { .id = "CSC0225", .devs = { { "CSC0100" }, { "CSC0110" } } },
176 /* Genius Sound Maker 3DJ - CS4237B */
177 { .id = "CSC0437", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
178 /* Digital PC 5000 Onboard - CS4236B */
179 { .id = "CSC0735", .devs = { { "CSC0000" }, { "CSC0010" } } },
180 /* some uknown CS4236B */
181 { .id = "CSC0b35", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
182 /* Intel PR440FX Onboard sound */
183 { .id = "CSC0b36", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
184 /* CS4235 on mainboard without MPU */
185 { .id = "CSC1425", .devs = { { "CSC0100" }, { "CSC0110" } } },
186 /* Gateway E1000 Onboard CS4236B */
187 { .id = "CSC1335", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
188 /* HP 6330 Onboard sound */
189 { .id = "CSC1525", .devs = { { "CSC0100" }, { "CSC0110" }, { "CSC0103" } } },
190 /* Crystal Computer TidalWave128 */
191 { .id = "CSC1e37", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
192 /* ACER AW37 - CS4235 */
193 { .id = "CSC4236", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
194 /* build-in soundcard in EliteGroup P5TX-LA motherboard - CS4237B */
195 { .id = "CSC4237", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
196 /* Crystal 3D - CS4237B */
197 { .id = "CSC4336", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
198 /* Typhoon Soundsystem PnP - CS4236B */
199 { .id = "CSC4536", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
200 /* Crystal CX4235-XQ3 EP - CS4235 */
201 { .id = "CSC4625", .devs = { { "CSC0100" }, { "CSC0110" }, { "CSC0103" } } },
202 /* Crystal Semiconductors CS4237B */
203 { .id = "CSC4637", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
204 /* NewClear 3D - CX4237B-XQ3 */
205 { .id = "CSC4837", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
206 /* Dell Optiplex GX1 - CS4236B */
207 { .id = "CSC6835", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
208 /* Dell P410 motherboard - CS4236B */
209 { .id = "CSC6835", .devs = { { "CSC0000" }, { "CSC0010" } } },
210 /* Dell Workstation 400 Onboard - CS4236B */
211 { .id = "CSC6836", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
212 /* Turtle Beach Malibu - CS4237B */
213 { .id = "CSC7537", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
214 /* CS4235 - onboard */
215 { .id = "CSC8025", .devs = { { "CSC0100" }, { "CSC0110" }, { "CSC0103" } } },
216 /* IBM Aptiva 2137 E24 Onboard - CS4237B */
217 { .id = "CSC8037", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
218 /* IBM IntelliStation M Pro motherboard */
219 { .id = "CSCc835", .devs = { { "CSC0000" }, { "CSC0010" } } },
220 /* Guillemot MaxiSound 16 PnP - CS4236B */
221 { .id = "CSC9836", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
222 /* Gallant SC-70P */
223 { .id = "CSC9837", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
Rene Hermanebae2252008-08-04 01:23:43 +0200224 /* Techmakers MF-4236PW */
225 { .id = "CSCa736", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700226 /* TerraTec AudioSystem EWS64XL - CS4236B */
227 { .id = "CSCa836", .devs = { { "CSCa800" }, { "CSCa810" }, { "CSCa803" } } },
228 /* TerraTec AudioSystem EWS64XL - CS4236B */
229 { .id = "CSCa836", .devs = { { "CSCa800" }, { "CSCa810" } } },
230 /* ACER AW37/Pro - CS4235 */
231 { .id = "CSCd925", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
232 /* ACER AW35/Pro - CS4237B */
233 { .id = "CSCd937", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
234 /* CS4235 without MPU401 */
235 { .id = "CSCe825", .devs = { { "CSC0100" }, { "CSC0110" } } },
236 /* Unknown SiS530 - CS4235 */
237 { .id = "CSC4825", .devs = { { "CSC0100" }, { "CSC0110" } } },
238 /* IBM IntelliStation M Pro 6898 11U - CS4236B */
239 { .id = "CSCe835", .devs = { { "CSC0000" }, { "CSC0010" } } },
240 /* IBM PC 300PL Onboard - CS4236B */
241 { .id = "CSCe836", .devs = { { "CSC0000" }, { "CSC0010" } } },
242 /* Some noname CS4236 based card */
243 { .id = "CSCe936", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
244 /* CS4236B */
245 { .id = "CSCf235", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
246 /* CS4236B */
247 { .id = "CSCf238", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
248 /* --- */
249 { .id = "" } /* end */
250};
Linus Torvalds1da177e2005-04-16 15:20:36 -0700251
252MODULE_DEVICE_TABLE(pnp_card, snd_cs423x_pnpids);
253
Takashi Iwaia9824c82005-11-17 17:51:00 +0100254/* WSS initialization */
Rene Herman109c53f842007-11-30 17:59:25 +0100255static int __devinit snd_cs423x_pnp_init_wss(int dev, struct pnp_dev *pdev)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700256{
Rene Herman109c53f842007-11-30 17:59:25 +0100257 if (pnp_activate_dev(pdev) < 0) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700258 printk(KERN_ERR IDENT " WSS PnP configure failed for WSS (out of resources?)\n");
259 return -EBUSY;
260 }
261 port[dev] = pnp_port_start(pdev, 0);
262 if (fm_port[dev] > 0)
263 fm_port[dev] = pnp_port_start(pdev, 1);
264 sb_port[dev] = pnp_port_start(pdev, 2);
265 irq[dev] = pnp_irq(pdev, 0);
266 dma1[dev] = pnp_dma(pdev, 0);
267 dma2[dev] = pnp_dma(pdev, 1) == 4 ? -1 : (int)pnp_dma(pdev, 1);
268 snd_printdd("isapnp WSS: wss port=0x%lx, fm port=0x%lx, sb port=0x%lx\n",
269 port[dev], fm_port[dev], sb_port[dev]);
270 snd_printdd("isapnp WSS: irq=%i, dma1=%i, dma2=%i\n",
271 irq[dev], dma1[dev], dma2[dev]);
Takashi Iwaia9824c82005-11-17 17:51:00 +0100272 return 0;
273}
274
275/* CTRL initialization */
Rene Herman109c53f842007-11-30 17:59:25 +0100276static int __devinit snd_cs423x_pnp_init_ctrl(int dev, struct pnp_dev *pdev)
Takashi Iwaia9824c82005-11-17 17:51:00 +0100277{
Rene Herman109c53f842007-11-30 17:59:25 +0100278 if (pnp_activate_dev(pdev) < 0) {
Takashi Iwaia9824c82005-11-17 17:51:00 +0100279 printk(KERN_ERR IDENT " CTRL PnP configure failed for WSS (out of resources?)\n");
280 return -EBUSY;
281 }
282 cport[dev] = pnp_port_start(pdev, 0);
283 snd_printdd("isapnp CTRL: control port=0x%lx\n", cport[dev]);
284 return 0;
285}
286
287/* MPU initialization */
Rene Herman109c53f842007-11-30 17:59:25 +0100288static int __devinit snd_cs423x_pnp_init_mpu(int dev, struct pnp_dev *pdev)
Takashi Iwaia9824c82005-11-17 17:51:00 +0100289{
Rene Herman109c53f842007-11-30 17:59:25 +0100290 if (pnp_activate_dev(pdev) < 0) {
Takashi Iwaia9824c82005-11-17 17:51:00 +0100291 printk(KERN_ERR IDENT " MPU401 PnP configure failed for WSS (out of resources?)\n");
292 mpu_port[dev] = SNDRV_AUTO_PORT;
293 mpu_irq[dev] = SNDRV_AUTO_IRQ;
294 } else {
295 mpu_port[dev] = pnp_port_start(pdev, 0);
296 if (mpu_irq[dev] >= 0 &&
297 pnp_irq_valid(pdev, 0) && pnp_irq(pdev, 0) >= 0) {
298 mpu_irq[dev] = pnp_irq(pdev, 0);
299 } else {
300 mpu_irq[dev] = -1; /* disable interrupt */
301 }
302 }
303 snd_printdd("isapnp MPU: port=0x%lx, irq=%i\n", mpu_port[dev], mpu_irq[dev]);
304 return 0;
305}
306
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100307static int __devinit snd_card_cs423x_pnp(int dev, struct snd_card_cs4236 *acard,
308 struct pnp_dev *pdev,
309 struct pnp_dev *cdev)
Takashi Iwaia9824c82005-11-17 17:51:00 +0100310{
Krzysztof Heltb15ebe22008-07-23 07:48:49 +0200311 acard->wss = pdev;
Rene Herman109c53f842007-11-30 17:59:25 +0100312 if (snd_cs423x_pnp_init_wss(dev, acard->wss) < 0)
Takashi Iwaia9824c82005-11-17 17:51:00 +0100313 return -EBUSY;
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100314 if (cdev)
315 cport[dev] = pnp_port_start(cdev, 0);
316 else
317 cport[dev] = -1;
Takashi Iwaia9824c82005-11-17 17:51:00 +0100318 return 0;
319}
Takashi Iwaia9824c82005-11-17 17:51:00 +0100320
321static int __devinit snd_card_cs423x_pnpc(int dev, struct snd_card_cs4236 *acard,
322 struct pnp_card_link *card,
323 const struct pnp_card_device_id *id)
324{
Takashi Iwaia9824c82005-11-17 17:51:00 +0100325 acard->wss = pnp_request_card_device(card, id->devs[0].id, NULL);
326 if (acard->wss == NULL)
Rene Herman109c53f842007-11-30 17:59:25 +0100327 return -EBUSY;
Takashi Iwaia9824c82005-11-17 17:51:00 +0100328 acard->ctrl = pnp_request_card_device(card, id->devs[1].id, NULL);
329 if (acard->ctrl == NULL)
Rene Herman109c53f842007-11-30 17:59:25 +0100330 return -EBUSY;
Takashi Iwaia9824c82005-11-17 17:51:00 +0100331 if (id->devs[2].id[0]) {
332 acard->mpu = pnp_request_card_device(card, id->devs[2].id, NULL);
333 if (acard->mpu == NULL)
Rene Herman109c53f842007-11-30 17:59:25 +0100334 return -EBUSY;
Takashi Iwaia9824c82005-11-17 17:51:00 +0100335 }
336
337 /* WSS initialization */
Rene Herman109c53f842007-11-30 17:59:25 +0100338 if (snd_cs423x_pnp_init_wss(dev, acard->wss) < 0)
339 return -EBUSY;
Takashi Iwaia9824c82005-11-17 17:51:00 +0100340
Linus Torvalds1da177e2005-04-16 15:20:36 -0700341 /* CTRL initialization */
342 if (acard->ctrl && cport[dev] > 0) {
Rene Herman109c53f842007-11-30 17:59:25 +0100343 if (snd_cs423x_pnp_init_ctrl(dev, acard->ctrl) < 0)
344 return -EBUSY;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700345 }
346 /* MPU initialization */
347 if (acard->mpu && mpu_port[dev] > 0) {
Rene Herman109c53f842007-11-30 17:59:25 +0100348 if (snd_cs423x_pnp_init_mpu(dev, acard->mpu) < 0)
349 return -EBUSY;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700350 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700351 return 0;
352}
353#endif /* CONFIG_PNP */
354
Takashi Iwai43bcd972005-09-05 17:19:20 +0200355#ifdef CONFIG_PNP
356#define is_isapnp_selected(dev) isapnp[dev]
357#else
358#define is_isapnp_selected(dev) 0
359#endif
360
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100361static void snd_card_cs4236_free(struct snd_card *card)
362{
363 struct snd_card_cs4236 *acard = card->private_data;
364
365 release_and_free_resource(acard->res_sb_port);
366}
367
Takashi Iwai3e7fb9f2008-12-28 16:47:30 +0100368static int snd_cs423x_card_new(int dev, struct snd_card **cardp)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700369{
Takashi Iwaiba2375a2005-11-17 14:30:42 +0100370 struct snd_card *card;
Takashi Iwaic95eadd2008-12-28 16:43:35 +0100371 int err;
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100372
Takashi Iwaic95eadd2008-12-28 16:43:35 +0100373 err = snd_card_create(index[dev], id[dev], THIS_MODULE,
374 sizeof(struct snd_card_cs4236), &card);
375 if (err < 0)
Takashi Iwai3e7fb9f2008-12-28 16:47:30 +0100376 return err;
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100377 card->private_free = snd_card_cs4236_free;
Takashi Iwai3e7fb9f2008-12-28 16:47:30 +0100378 *cardp = card;
379 return 0;
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100380}
381
382static int __devinit snd_cs423x_probe(struct snd_card *card, int dev)
383{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700384 struct snd_card_cs4236 *acard;
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100385 struct snd_pcm *pcm;
Krzysztof Helt7779f752008-07-31 21:03:41 +0200386 struct snd_wss *chip;
Takashi Iwaiba2375a2005-11-17 14:30:42 +0100387 struct snd_opl3 *opl3;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700388 int err;
389
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100390 acard = card->private_data;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700391 if (sb_port[dev] > 0 && sb_port[dev] != SNDRV_AUTO_PORT)
392 if ((acard->res_sb_port = request_region(sb_port[dev], 16, IDENT " SB")) == NULL) {
393 printk(KERN_ERR IDENT ": unable to register SB port at 0x%lx\n", sb_port[dev]);
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100394 return -EBUSY;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700395 }
396
Krzysztof Helt7779f752008-07-31 21:03:41 +0200397 err = snd_wss_create(card, port[dev], cport[dev],
398 irq[dev],
399 dma1[dev], dma2[dev],
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100400 WSS_HW_DETECT3, 0, &chip);
Krzysztof Helt7779f752008-07-31 21:03:41 +0200401 if (err < 0)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100402 return err;
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100403 if (chip->hardware & WSS_HW_CS4236B_MASK) {
404 snd_wss_free(chip);
405 err = snd_cs4236_create(card,
406 port[dev], cport[dev],
407 irq[dev], dma1[dev], dma2[dev],
408 WSS_HW_DETECT, 0, &chip);
409 if (err < 0)
410 return err;
411 acard->chip = chip;
Takashi Iwai43bcd972005-09-05 17:19:20 +0200412
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100413 err = snd_cs4236_pcm(chip, 0, &pcm);
414 if (err < 0)
415 return err;
Takashi Iwai43bcd972005-09-05 17:19:20 +0200416
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100417 err = snd_cs4236_mixer(chip);
418 if (err < 0)
419 return err;
420 } else {
421 acard->chip = chip;
422 err = snd_wss_pcm(chip, 0, &pcm);
423 if (err < 0)
424 return err;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700425
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100426 err = snd_wss_mixer(chip);
427 if (err < 0)
428 return err;
429 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700430 strcpy(card->driver, pcm->name);
431 strcpy(card->shortname, pcm->name);
432 sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i",
433 pcm->name,
434 chip->port,
435 irq[dev],
436 dma1[dev]);
437 if (dma2[dev] >= 0)
438 sprintf(card->longname + strlen(card->longname), "&%d", dma2[dev]);
439
Krzysztof Helt7779f752008-07-31 21:03:41 +0200440 err = snd_wss_timer(chip, 0, NULL);
441 if (err < 0)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100442 return err;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700443
444 if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) {
445 if (snd_opl3_create(card,
446 fm_port[dev], fm_port[dev] + 2,
447 OPL3_HW_OPL3_CS, 0, &opl3) < 0) {
Takashi Iwai43bcd972005-09-05 17:19:20 +0200448 printk(KERN_WARNING IDENT ": OPL3 not detected\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700449 } else {
Takashi Iwai43bcd972005-09-05 17:19:20 +0200450 if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100451 return err;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700452 }
453 }
454
455 if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) {
456 if (mpu_irq[dev] == SNDRV_AUTO_IRQ)
457 mpu_irq[dev] = -1;
458 if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232,
459 mpu_port[dev], 0,
460 mpu_irq[dev],
Thomas Gleixner65ca68b2006-07-01 19:29:46 -0700461 mpu_irq[dev] >= 0 ? IRQF_DISABLED : 0, NULL) < 0)
Takashi Iwai43bcd972005-09-05 17:19:20 +0200462 printk(KERN_WARNING IDENT ": MPU401 not detected\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700463 }
Takashi Iwai43bcd972005-09-05 17:19:20 +0200464
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100465 return snd_card_register(card);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700466}
467
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100468static int __devinit snd_cs423x_isa_match(struct device *pdev,
469 unsigned int dev)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100470{
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100471 if (!enable[dev] || is_isapnp_selected(dev))
472 return 0;
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100473
474 if (port[dev] == SNDRV_AUTO_PORT) {
Takashi Iwai0418ff02008-11-03 08:51:33 +0100475 dev_err(pdev, "please specify port\n");
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100476 return 0;
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100477 }
478 if (cport[dev] == SNDRV_AUTO_PORT) {
Takashi Iwai0418ff02008-11-03 08:51:33 +0100479 dev_err(pdev, "please specify cport\n");
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100480 return 0;
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100481 }
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100482 if (irq[dev] == SNDRV_AUTO_IRQ) {
Takashi Iwai0418ff02008-11-03 08:51:33 +0100483 dev_err(pdev, "please specify irq\n");
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100484 return 0;
485 }
486 if (dma1[dev] == SNDRV_AUTO_DMA) {
Takashi Iwai0418ff02008-11-03 08:51:33 +0100487 dev_err(pdev, "please specify dma1\n");
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100488 return 0;
489 }
490 return 1;
491}
492
493static int __devinit snd_cs423x_isa_probe(struct device *pdev,
494 unsigned int dev)
495{
496 struct snd_card *card;
497 int err;
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100498
Takashi Iwai3e7fb9f2008-12-28 16:47:30 +0100499 err = snd_cs423x_card_new(dev, &card);
500 if (err < 0)
501 return err;
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100502 snd_card_set_dev(card, pdev);
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100503 if ((err = snd_cs423x_probe(card, dev)) < 0) {
504 snd_card_free(card);
505 return err;
506 }
Bjorn Helgaased7cb192006-03-27 01:17:04 -0800507
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100508 dev_set_drvdata(pdev, card);
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100509 return 0;
510}
511
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100512static int __devexit snd_cs423x_isa_remove(struct device *pdev,
513 unsigned int dev)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100514{
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100515 snd_card_free(dev_get_drvdata(pdev));
516 dev_set_drvdata(pdev, NULL);
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100517 return 0;
518}
519
520#ifdef CONFIG_PM
521static int snd_cs423x_suspend(struct snd_card *card)
522{
523 struct snd_card_cs4236 *acard = card->private_data;
524 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
525 acard->chip->suspend(acard->chip);
526 return 0;
527}
528
529static int snd_cs423x_resume(struct snd_card *card)
530{
531 struct snd_card_cs4236 *acard = card->private_data;
532 acard->chip->resume(acard->chip);
533 snd_power_change_state(card, SNDRV_CTL_POWER_D0);
534 return 0;
535}
536
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100537static int snd_cs423x_isa_suspend(struct device *dev, unsigned int n,
538 pm_message_t state)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100539{
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100540 return snd_cs423x_suspend(dev_get_drvdata(dev));
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100541}
542
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100543static int snd_cs423x_isa_resume(struct device *dev, unsigned int n)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100544{
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100545 return snd_cs423x_resume(dev_get_drvdata(dev));
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100546}
547#endif
548
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100549static struct isa_driver cs423x_isa_driver = {
550 .match = snd_cs423x_isa_match,
551 .probe = snd_cs423x_isa_probe,
552 .remove = __devexit_p(snd_cs423x_isa_remove),
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100553#ifdef CONFIG_PM
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100554 .suspend = snd_cs423x_isa_suspend,
555 .resume = snd_cs423x_isa_resume,
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100556#endif
557 .driver = {
Rene Herman83c51c02007-03-20 11:33:46 +0100558 .name = DEV_NAME
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100559 },
560};
561
562
Linus Torvalds1da177e2005-04-16 15:20:36 -0700563#ifdef CONFIG_PNP
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100564static int __devinit snd_cs423x_pnpbios_detect(struct pnp_dev *pdev,
Takashi Iwaia9824c82005-11-17 17:51:00 +0100565 const struct pnp_device_id *id)
566{
567 static int dev;
568 int err;
569 struct snd_card *card;
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100570 struct pnp_dev *cdev;
571 char cid[PNP_ID_LEN];
Takashi Iwaia9824c82005-11-17 17:51:00 +0100572
573 if (pnp_device_is_isapnp(pdev))
574 return -ENOENT; /* we have another procedure - card */
575 for (; dev < SNDRV_CARDS; dev++) {
576 if (enable[dev] && isapnp[dev])
577 break;
578 }
579 if (dev >= SNDRV_CARDS)
580 return -ENODEV;
581
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100582 /* prepare second id */
583 strcpy(cid, pdev->id[0].id);
584 cid[5] = '1';
585 cdev = NULL;
586 list_for_each_entry(cdev, &(pdev->protocol->devices), protocol_list) {
587 if (!strcmp(cdev->id[0].id, cid))
588 break;
589 }
Takashi Iwai3e7fb9f2008-12-28 16:47:30 +0100590 err = snd_cs423x_card_new(dev, &card);
591 if (err < 0)
592 return err;
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100593 err = snd_card_cs423x_pnp(dev, card->private_data, pdev, cdev);
594 if (err < 0) {
Takashi Iwaia9824c82005-11-17 17:51:00 +0100595 printk(KERN_ERR "PnP BIOS detection failed for " IDENT "\n");
596 snd_card_free(card);
597 return err;
598 }
599 snd_card_set_dev(card, &pdev->dev);
600 if ((err = snd_cs423x_probe(card, dev)) < 0) {
601 snd_card_free(card);
602 return err;
603 }
604 pnp_set_drvdata(pdev, card);
605 dev++;
606 return 0;
607}
608
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100609static void __devexit snd_cs423x_pnp_remove(struct pnp_dev *pdev)
Takashi Iwaia9824c82005-11-17 17:51:00 +0100610{
611 snd_card_free(pnp_get_drvdata(pdev));
612 pnp_set_drvdata(pdev, NULL);
613}
614
615#ifdef CONFIG_PM
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100616static int snd_cs423x_pnp_suspend(struct pnp_dev *pdev, pm_message_t state)
Takashi Iwaia9824c82005-11-17 17:51:00 +0100617{
618 return snd_cs423x_suspend(pnp_get_drvdata(pdev));
619}
620
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100621static int snd_cs423x_pnp_resume(struct pnp_dev *pdev)
Takashi Iwaia9824c82005-11-17 17:51:00 +0100622{
623 return snd_cs423x_resume(pnp_get_drvdata(pdev));
624}
625#endif
626
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100627static struct pnp_driver cs423x_pnp_driver = {
628 .name = "cs423x-pnpbios",
629 .id_table = snd_cs423x_pnpbiosids,
630 .probe = snd_cs423x_pnpbios_detect,
631 .remove = __devexit_p(snd_cs423x_pnp_remove),
Takashi Iwaia9824c82005-11-17 17:51:00 +0100632#ifdef CONFIG_PM
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100633 .suspend = snd_cs423x_pnp_suspend,
634 .resume = snd_cs423x_pnp_resume,
Takashi Iwaia9824c82005-11-17 17:51:00 +0100635#endif
636};
Takashi Iwaia9824c82005-11-17 17:51:00 +0100637
638static int __devinit snd_cs423x_pnpc_detect(struct pnp_card_link *pcard,
639 const struct pnp_card_device_id *pid)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700640{
641 static int dev;
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100642 struct snd_card *card;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700643 int res;
644
645 for ( ; dev < SNDRV_CARDS; dev++) {
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100646 if (enable[dev] && isapnp[dev])
647 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700648 }
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100649 if (dev >= SNDRV_CARDS)
650 return -ENODEV;
651
Takashi Iwai3e7fb9f2008-12-28 16:47:30 +0100652 res = snd_cs423x_card_new(dev, &card);
653 if (res < 0)
654 return res;
Takashi Iwaia9824c82005-11-17 17:51:00 +0100655 if ((res = snd_card_cs423x_pnpc(dev, card->private_data, pcard, pid)) < 0) {
656 printk(KERN_ERR "isapnp detection failed and probing for " IDENT
657 " is not supported\n");
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100658 snd_card_free(card);
659 return res;
660 }
661 snd_card_set_dev(card, &pcard->card->dev);
662 if ((res = snd_cs423x_probe(card, dev)) < 0) {
663 snd_card_free(card);
664 return res;
665 }
666 pnp_set_card_drvdata(pcard, card);
667 dev++;
668 return 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700669}
670
Takashi Iwaia9824c82005-11-17 17:51:00 +0100671static void __devexit snd_cs423x_pnpc_remove(struct pnp_card_link * pcard)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700672{
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100673 snd_card_free(pnp_get_card_drvdata(pcard));
674 pnp_set_card_drvdata(pcard, NULL);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700675}
Bjorn Helgaased7cb192006-03-27 01:17:04 -0800676
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100677#ifdef CONFIG_PM
Takashi Iwaia9824c82005-11-17 17:51:00 +0100678static int snd_cs423x_pnpc_suspend(struct pnp_card_link *pcard, pm_message_t state)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100679{
680 return snd_cs423x_suspend(pnp_get_card_drvdata(pcard));
681}
682
Takashi Iwaia9824c82005-11-17 17:51:00 +0100683static int snd_cs423x_pnpc_resume(struct pnp_card_link *pcard)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100684{
685 return snd_cs423x_resume(pnp_get_card_drvdata(pcard));
686}
687#endif
688
Linus Torvalds1da177e2005-04-16 15:20:36 -0700689static struct pnp_card_driver cs423x_pnpc_driver = {
690 .flags = PNP_DRIVER_RES_DISABLE,
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100691 .name = CS423X_ISAPNP_DRIVER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700692 .id_table = snd_cs423x_pnpids,
Takashi Iwaia9824c82005-11-17 17:51:00 +0100693 .probe = snd_cs423x_pnpc_detect,
694 .remove = __devexit_p(snd_cs423x_pnpc_remove),
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100695#ifdef CONFIG_PM
Takashi Iwaia9824c82005-11-17 17:51:00 +0100696 .suspend = snd_cs423x_pnpc_suspend,
697 .resume = snd_cs423x_pnpc_resume,
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100698#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700699};
700#endif /* CONFIG_PNP */
701
702static int __init alsa_card_cs423x_init(void)
703{
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100704 int err;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700705
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100706 err = isa_register_driver(&cs423x_isa_driver, SNDRV_CARDS);
Takashi Iwai59b1b342006-01-04 15:06:44 +0100707#ifdef CONFIG_PNP
Rene Herman609d7692007-05-15 11:42:56 +0200708 if (!err)
709 isa_registered = 1;
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100710 err = pnp_register_driver(&cs423x_pnp_driver);
Bjorn Helgaased7cb192006-03-27 01:17:04 -0800711 if (!err)
Clemens Ladischf7a92752005-12-07 09:13:42 +0100712 pnp_registered = 1;
Bjorn Helgaased7cb192006-03-27 01:17:04 -0800713 err = pnp_register_card_driver(&cs423x_pnpc_driver);
714 if (!err)
Clemens Ladischf7a92752005-12-07 09:13:42 +0100715 pnpc_registered = 1;
Rene Herman609d7692007-05-15 11:42:56 +0200716 if (pnp_registered)
717 err = 0;
Rene Herman609d7692007-05-15 11:42:56 +0200718 if (isa_registered)
719 err = 0;
720#endif
721 return err;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700722}
723
724static void __exit alsa_card_cs423x_exit(void)
725{
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100726#ifdef CONFIG_PNP
727 if (pnpc_registered)
728 pnp_unregister_card_driver(&cs423x_pnpc_driver);
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100729 if (pnp_registered)
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100730 pnp_unregister_driver(&cs423x_pnp_driver);
Rene Herman609d7692007-05-15 11:42:56 +0200731 if (isa_registered)
732#endif
733 isa_unregister_driver(&cs423x_isa_driver);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700734}
735
736module_init(alsa_card_cs423x_init)
737module_exit(alsa_card_cs423x_exit)