blob: 93fa6720d197da7af15e84b6ef9d8a712919f82e [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 Heltd114cd82009-11-05 18:32:41 +0100397 err = snd_cs4236_create(card, port[dev], cport[dev],
Krzysztof Helt7779f752008-07-31 21:03:41 +0200398 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 Heltd114cd82009-11-05 18:32:41 +0100403
404 acard->chip = chip;
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100405 if (chip->hardware & WSS_HW_CS4236B_MASK) {
Takashi Iwai43bcd972005-09-05 17:19:20 +0200406
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100407 err = snd_cs4236_pcm(chip, 0, &pcm);
408 if (err < 0)
409 return err;
Takashi Iwai43bcd972005-09-05 17:19:20 +0200410
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100411 err = snd_cs4236_mixer(chip);
412 if (err < 0)
413 return err;
414 } else {
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100415 err = snd_wss_pcm(chip, 0, &pcm);
416 if (err < 0)
417 return err;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700418
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100419 err = snd_wss_mixer(chip);
420 if (err < 0)
421 return err;
422 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700423 strcpy(card->driver, pcm->name);
424 strcpy(card->shortname, pcm->name);
425 sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i",
426 pcm->name,
427 chip->port,
428 irq[dev],
429 dma1[dev]);
430 if (dma2[dev] >= 0)
431 sprintf(card->longname + strlen(card->longname), "&%d", dma2[dev]);
432
Krzysztof Helt7779f752008-07-31 21:03:41 +0200433 err = snd_wss_timer(chip, 0, NULL);
434 if (err < 0)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100435 return err;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700436
437 if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) {
438 if (snd_opl3_create(card,
439 fm_port[dev], fm_port[dev] + 2,
440 OPL3_HW_OPL3_CS, 0, &opl3) < 0) {
Takashi Iwai43bcd972005-09-05 17:19:20 +0200441 printk(KERN_WARNING IDENT ": OPL3 not detected\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700442 } else {
Takashi Iwai43bcd972005-09-05 17:19:20 +0200443 if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100444 return err;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700445 }
446 }
447
448 if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) {
449 if (mpu_irq[dev] == SNDRV_AUTO_IRQ)
450 mpu_irq[dev] = -1;
451 if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232,
452 mpu_port[dev], 0,
453 mpu_irq[dev],
Thomas Gleixner65ca68b2006-07-01 19:29:46 -0700454 mpu_irq[dev] >= 0 ? IRQF_DISABLED : 0, NULL) < 0)
Takashi Iwai43bcd972005-09-05 17:19:20 +0200455 printk(KERN_WARNING IDENT ": MPU401 not detected\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700456 }
Takashi Iwai43bcd972005-09-05 17:19:20 +0200457
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100458 return snd_card_register(card);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700459}
460
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100461static int __devinit snd_cs423x_isa_match(struct device *pdev,
462 unsigned int dev)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100463{
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100464 if (!enable[dev] || is_isapnp_selected(dev))
465 return 0;
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100466
467 if (port[dev] == SNDRV_AUTO_PORT) {
Takashi Iwai0418ff02008-11-03 08:51:33 +0100468 dev_err(pdev, "please specify port\n");
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100469 return 0;
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100470 }
471 if (cport[dev] == SNDRV_AUTO_PORT) {
Takashi Iwai0418ff02008-11-03 08:51:33 +0100472 dev_err(pdev, "please specify cport\n");
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100473 return 0;
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100474 }
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100475 if (irq[dev] == SNDRV_AUTO_IRQ) {
Takashi Iwai0418ff02008-11-03 08:51:33 +0100476 dev_err(pdev, "please specify irq\n");
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100477 return 0;
478 }
479 if (dma1[dev] == SNDRV_AUTO_DMA) {
Takashi Iwai0418ff02008-11-03 08:51:33 +0100480 dev_err(pdev, "please specify dma1\n");
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100481 return 0;
482 }
483 return 1;
484}
485
486static int __devinit snd_cs423x_isa_probe(struct device *pdev,
487 unsigned int dev)
488{
489 struct snd_card *card;
490 int err;
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100491
Takashi Iwai3e7fb9f2008-12-28 16:47:30 +0100492 err = snd_cs423x_card_new(dev, &card);
493 if (err < 0)
494 return err;
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100495 snd_card_set_dev(card, pdev);
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100496 if ((err = snd_cs423x_probe(card, dev)) < 0) {
497 snd_card_free(card);
498 return err;
499 }
Bjorn Helgaased7cb192006-03-27 01:17:04 -0800500
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100501 dev_set_drvdata(pdev, card);
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100502 return 0;
503}
504
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100505static int __devexit snd_cs423x_isa_remove(struct device *pdev,
506 unsigned int dev)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100507{
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100508 snd_card_free(dev_get_drvdata(pdev));
509 dev_set_drvdata(pdev, NULL);
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100510 return 0;
511}
512
513#ifdef CONFIG_PM
514static int snd_cs423x_suspend(struct snd_card *card)
515{
516 struct snd_card_cs4236 *acard = card->private_data;
517 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
518 acard->chip->suspend(acard->chip);
519 return 0;
520}
521
522static int snd_cs423x_resume(struct snd_card *card)
523{
524 struct snd_card_cs4236 *acard = card->private_data;
525 acard->chip->resume(acard->chip);
526 snd_power_change_state(card, SNDRV_CTL_POWER_D0);
527 return 0;
528}
529
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100530static int snd_cs423x_isa_suspend(struct device *dev, unsigned int n,
531 pm_message_t state)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100532{
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100533 return snd_cs423x_suspend(dev_get_drvdata(dev));
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100534}
535
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100536static int snd_cs423x_isa_resume(struct device *dev, unsigned int n)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100537{
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100538 return snd_cs423x_resume(dev_get_drvdata(dev));
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100539}
540#endif
541
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100542static struct isa_driver cs423x_isa_driver = {
543 .match = snd_cs423x_isa_match,
544 .probe = snd_cs423x_isa_probe,
545 .remove = __devexit_p(snd_cs423x_isa_remove),
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100546#ifdef CONFIG_PM
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100547 .suspend = snd_cs423x_isa_suspend,
548 .resume = snd_cs423x_isa_resume,
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100549#endif
550 .driver = {
Rene Herman83c51c02007-03-20 11:33:46 +0100551 .name = DEV_NAME
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100552 },
553};
554
555
Linus Torvalds1da177e2005-04-16 15:20:36 -0700556#ifdef CONFIG_PNP
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100557static int __devinit snd_cs423x_pnpbios_detect(struct pnp_dev *pdev,
Takashi Iwaia9824c82005-11-17 17:51:00 +0100558 const struct pnp_device_id *id)
559{
560 static int dev;
561 int err;
562 struct snd_card *card;
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100563 struct pnp_dev *cdev;
564 char cid[PNP_ID_LEN];
Takashi Iwaia9824c82005-11-17 17:51:00 +0100565
566 if (pnp_device_is_isapnp(pdev))
567 return -ENOENT; /* we have another procedure - card */
568 for (; dev < SNDRV_CARDS; dev++) {
569 if (enable[dev] && isapnp[dev])
570 break;
571 }
572 if (dev >= SNDRV_CARDS)
573 return -ENODEV;
574
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100575 /* prepare second id */
576 strcpy(cid, pdev->id[0].id);
577 cid[5] = '1';
578 cdev = NULL;
579 list_for_each_entry(cdev, &(pdev->protocol->devices), protocol_list) {
580 if (!strcmp(cdev->id[0].id, cid))
581 break;
582 }
Takashi Iwai3e7fb9f2008-12-28 16:47:30 +0100583 err = snd_cs423x_card_new(dev, &card);
584 if (err < 0)
585 return err;
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100586 err = snd_card_cs423x_pnp(dev, card->private_data, pdev, cdev);
587 if (err < 0) {
Takashi Iwaia9824c82005-11-17 17:51:00 +0100588 printk(KERN_ERR "PnP BIOS detection failed for " IDENT "\n");
589 snd_card_free(card);
590 return err;
591 }
592 snd_card_set_dev(card, &pdev->dev);
593 if ((err = snd_cs423x_probe(card, dev)) < 0) {
594 snd_card_free(card);
595 return err;
596 }
597 pnp_set_drvdata(pdev, card);
598 dev++;
599 return 0;
600}
601
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100602static void __devexit snd_cs423x_pnp_remove(struct pnp_dev *pdev)
Takashi Iwaia9824c82005-11-17 17:51:00 +0100603{
604 snd_card_free(pnp_get_drvdata(pdev));
605 pnp_set_drvdata(pdev, NULL);
606}
607
608#ifdef CONFIG_PM
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100609static int snd_cs423x_pnp_suspend(struct pnp_dev *pdev, pm_message_t state)
Takashi Iwaia9824c82005-11-17 17:51:00 +0100610{
611 return snd_cs423x_suspend(pnp_get_drvdata(pdev));
612}
613
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100614static int snd_cs423x_pnp_resume(struct pnp_dev *pdev)
Takashi Iwaia9824c82005-11-17 17:51:00 +0100615{
616 return snd_cs423x_resume(pnp_get_drvdata(pdev));
617}
618#endif
619
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100620static struct pnp_driver cs423x_pnp_driver = {
621 .name = "cs423x-pnpbios",
622 .id_table = snd_cs423x_pnpbiosids,
623 .probe = snd_cs423x_pnpbios_detect,
624 .remove = __devexit_p(snd_cs423x_pnp_remove),
Takashi Iwaia9824c82005-11-17 17:51:00 +0100625#ifdef CONFIG_PM
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100626 .suspend = snd_cs423x_pnp_suspend,
627 .resume = snd_cs423x_pnp_resume,
Takashi Iwaia9824c82005-11-17 17:51:00 +0100628#endif
629};
Takashi Iwaia9824c82005-11-17 17:51:00 +0100630
631static int __devinit snd_cs423x_pnpc_detect(struct pnp_card_link *pcard,
632 const struct pnp_card_device_id *pid)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700633{
634 static int dev;
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100635 struct snd_card *card;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700636 int res;
637
638 for ( ; dev < SNDRV_CARDS; dev++) {
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100639 if (enable[dev] && isapnp[dev])
640 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700641 }
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100642 if (dev >= SNDRV_CARDS)
643 return -ENODEV;
644
Takashi Iwai3e7fb9f2008-12-28 16:47:30 +0100645 res = snd_cs423x_card_new(dev, &card);
646 if (res < 0)
647 return res;
Takashi Iwaia9824c82005-11-17 17:51:00 +0100648 if ((res = snd_card_cs423x_pnpc(dev, card->private_data, pcard, pid)) < 0) {
649 printk(KERN_ERR "isapnp detection failed and probing for " IDENT
650 " is not supported\n");
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100651 snd_card_free(card);
652 return res;
653 }
654 snd_card_set_dev(card, &pcard->card->dev);
655 if ((res = snd_cs423x_probe(card, dev)) < 0) {
656 snd_card_free(card);
657 return res;
658 }
659 pnp_set_card_drvdata(pcard, card);
660 dev++;
661 return 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700662}
663
Takashi Iwaia9824c82005-11-17 17:51:00 +0100664static void __devexit snd_cs423x_pnpc_remove(struct pnp_card_link * pcard)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700665{
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100666 snd_card_free(pnp_get_card_drvdata(pcard));
667 pnp_set_card_drvdata(pcard, NULL);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700668}
Bjorn Helgaased7cb192006-03-27 01:17:04 -0800669
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100670#ifdef CONFIG_PM
Takashi Iwaia9824c82005-11-17 17:51:00 +0100671static int snd_cs423x_pnpc_suspend(struct pnp_card_link *pcard, pm_message_t state)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100672{
673 return snd_cs423x_suspend(pnp_get_card_drvdata(pcard));
674}
675
Takashi Iwaia9824c82005-11-17 17:51:00 +0100676static int snd_cs423x_pnpc_resume(struct pnp_card_link *pcard)
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100677{
678 return snd_cs423x_resume(pnp_get_card_drvdata(pcard));
679}
680#endif
681
Linus Torvalds1da177e2005-04-16 15:20:36 -0700682static struct pnp_card_driver cs423x_pnpc_driver = {
683 .flags = PNP_DRIVER_RES_DISABLE,
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100684 .name = CS423X_ISAPNP_DRIVER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700685 .id_table = snd_cs423x_pnpids,
Takashi Iwaia9824c82005-11-17 17:51:00 +0100686 .probe = snd_cs423x_pnpc_detect,
687 .remove = __devexit_p(snd_cs423x_pnpc_remove),
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100688#ifdef CONFIG_PM
Takashi Iwaia9824c82005-11-17 17:51:00 +0100689 .suspend = snd_cs423x_pnpc_suspend,
690 .resume = snd_cs423x_pnpc_resume,
Takashi Iwai6bba41a2005-11-17 17:00:53 +0100691#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700692};
693#endif /* CONFIG_PNP */
694
695static int __init alsa_card_cs423x_init(void)
696{
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100697 int err;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700698
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100699 err = isa_register_driver(&cs423x_isa_driver, SNDRV_CARDS);
Takashi Iwai59b1b342006-01-04 15:06:44 +0100700#ifdef CONFIG_PNP
Rene Herman609d7692007-05-15 11:42:56 +0200701 if (!err)
702 isa_registered = 1;
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100703 err = pnp_register_driver(&cs423x_pnp_driver);
Bjorn Helgaased7cb192006-03-27 01:17:04 -0800704 if (!err)
Clemens Ladischf7a92752005-12-07 09:13:42 +0100705 pnp_registered = 1;
Bjorn Helgaased7cb192006-03-27 01:17:04 -0800706 err = pnp_register_card_driver(&cs423x_pnpc_driver);
707 if (!err)
Clemens Ladischf7a92752005-12-07 09:13:42 +0100708 pnpc_registered = 1;
Rene Herman609d7692007-05-15 11:42:56 +0200709 if (pnp_registered)
710 err = 0;
Rene Herman609d7692007-05-15 11:42:56 +0200711 if (isa_registered)
712 err = 0;
713#endif
714 return err;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700715}
716
717static void __exit alsa_card_cs423x_exit(void)
718{
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100719#ifdef CONFIG_PNP
720 if (pnpc_registered)
721 pnp_unregister_card_driver(&cs423x_pnpc_driver);
Takashi Iwai5e24c1c2007-02-22 12:50:54 +0100722 if (pnp_registered)
Krzysztof Heltc2b73d12009-02-16 21:38:37 +0100723 pnp_unregister_driver(&cs423x_pnp_driver);
Rene Herman609d7692007-05-15 11:42:56 +0200724 if (isa_registered)
725#endif
726 isa_unregister_driver(&cs423x_isa_driver);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700727}
728
729module_init(alsa_card_cs423x_init)
730module_exit(alsa_card_cs423x_exit)