Update of /cvsroot/alsa/alsa-kernel/isa/sb
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15244/sb
Modified Files:
sb16.c sb8.c
Log Message:
<[EMAIL PROTECTED]>
This is a *really* silly one. The various probing routines in these
drivers can return -ENODEV, -ENOMEM etc.. so when we do something like
cards += probe_routine()
In some situations we can end up with -13 sound cards, and other
such nonsense. Result : lots of fun oopses.
Index: sb16.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/isa/sb/sb16.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- sb16.c 26 Jan 2004 14:27:13 -0000 1.44
+++ sb16.c 15 Mar 2004 19:33:52 -0000 1.45
@@ -629,7 +629,7 @@
static int __init alsa_card_sb16_init(void)
{
- int dev, cards = 0;
+ int dev, cards = 0, i;
static unsigned long possible_ports[] = {0x220, 0x240, 0x260, 0x280, -1};
/* legacy non-auto cards at first */
@@ -649,10 +649,15 @@
#endif
}
/* legacy auto configured cards */
- cards += snd_legacy_auto_probe(possible_ports, snd_sb16_probe_legacy_port);
+ i = snd_legacy_auto_probe(possible_ports, snd_sb16_probe_legacy_port);
+ if (i > 0)
+ cards += i;
+
#ifdef CONFIG_PNP
/* PnP cards at last */
- cards += pnp_register_card_driver(&sb16_pnpc_driver);
+ i = pnp_register_card_driver(&sb16_pnpc_driver);
+ if (i >0)
+ cards += i;
#endif
if (!cards) {
Index: sb8.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/isa/sb/sb8.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- sb8.c 14 Oct 2003 13:08:18 -0000 1.17
+++ sb8.c 15 Mar 2004 19:33:52 -0000 1.18
@@ -199,7 +199,7 @@
static int __init alsa_card_sb8_init(void)
{
static unsigned long possible_ports[] = {0x220, 0x240, 0x260, -1};
- int dev, cards;
+ int dev, cards, i;
for (dev = cards = 0; dev < SNDRV_CARDS && enable[dev]; dev++) {
if (port[dev] == SNDRV_AUTO_PORT)
@@ -207,7 +207,10 @@
if (snd_sb8_probe(dev) >= 0)
cards++;
}
- cards += snd_legacy_auto_probe(possible_ports, snd_card_sb8_legacy_auto_probe);
+ i = snd_legacy_auto_probe(possible_ports, snd_card_sb8_legacy_auto_probe);
+ if (i > 0)
+ cards += i;
+
if (!cards) {
#ifdef MODULE
snd_printk(KERN_ERR "Sound Blaster soundcard not found or device
busy\n");
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog