25 #include <linux/module.h>
27 #include <linux/slab.h>
55 static int pnp_registered;
79 "(doesn't work with pnp)");
84 "(doesn't work with pnp)");
118 if(scc->
mpucnf.io_base > 0) {
137 static int __init sb_init_legacy(
void)
146 legacy->
conf.io_base =
io;
149 legacy->
conf.dma2 = dma16;
152 legacy->
mpucnf.io_base = mpu_io;
161 return sb_register_oss(legacy, &sbmo);
169 scc->
conf.io_base = -1;
181 scc->
conf.io_base = pnp_port_start(dev,0);
185 scc->
mpucnf.io_base = pnp_port_start(dev,1);
189 scc->
conf.io_base = pnp_port_start(dev,0);
196 scc->
conf.io_base = pnp_port_start(dev,0);
200 scc->
mpucnf.io_base = pnp_port_start(dev,2);
204 scc->
conf.io_base = pnp_port_start(dev,0);
211 scc->
conf.io_base = pnp_port_start(dev,0);
218 scc->
conf.io_base = pnp_port_start(dev,0);
222 scc->
conf.io_base = pnp_port_start(dev,0);
230 scc->
conf.io_base = pnp_port_start(dev,0);
237 static unsigned int sb_pnp_devices;
255 printk(
KERN_INFO "sb: PnP: Found Card Named = \"%s\", Card PnP id = " \
256 "%s, Device PnP id = %s\n", card->
card->name, card_id->
id,
261 sb_dev2cfg(dev, scc);
264 "dma=%d, dma16=%d\n", scc->
conf.io_base, scc->
conf.irq,
267 pnp_set_card_drvdata(card, scc);
270 return sb_register_oss(scc, &sbmo);
286 .
name =
"OSS SndBlstr",
287 .id_table = sb_pnp_card_table,
288 .probe = sb_pnp_probe,
289 .remove = sb_pnp_remove,
294 static void sb_unregister_all(
void)
302 static int __init sb_init(
void)
309 if(
io != -1 && irq != -1 &&
dma != -1) {
311 "irq=%d, dma=%d, dma16=%d\n",
io, irq,
dma, dma16);
312 lres = sb_init_legacy();
313 }
else if((
io != -1 || irq != -1 ||
dma != -1) ||
314 (!pnp && (
io == -1 && irq == -1 &&
dma == -1)))
316 "must be set for legacy cards.\n");
323 pres = sb_pnp_devices;
330 if (pres == 0 && lres <= 0) {
337 static void __exit sb_exit(
void)