--685023584-1361530737-946898350=:27631
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi!
Last week, I had to make a program that records sound, so
I have put the "old" SB16PnP back into my machine. Since I use
2.3.x kernels, obviously I tried to use the isapnp facilities.
Well, the first thing was that I removed the sb options from
/etc/modules.conf.
So I tried to load the sb module with no options and this is where
my problem started. :-) The following lines are from dmesg:
Soundblaster audio driver Copyright (C) by Hannu Savolainen 1993-1996
ISAPnP reports Sound Blaster 16 at i/o 0x220, irq 5, dma 1, 5
SB 4.13 detected OK (220)
sb: Interrupt test on IRQ7 failed - Probable IRQ conflict
YM3812 and OPL-3 driver Copyright (C) by Hannu Savolainen, Rob Hooft 1993-1996
Hmm, why it wanted to test irq 7 when it found the card at irq 5?
After some debugging I found this part in init_module() of sb_card.c:
...
#ifdef CONFIG_ISAPNP
if (isapnp == 1 && sb_probe_isapnp(&config, &config_mpu)<0)
{
printk(KERN_ERR "sb_card: No ISAPnP cards found\n");
return -EINVAL;
}
else
{
#endif
if (io == -1 || dma == -1 || irq == -1)
{
printk(KERN_ERR "sb_card: I/O, IRQ, and DMA are mandatory\n");
return -EINVAL;
}
config.io_base = io;
config.irq = irq;
config.dma = dma;
config.dma2 = dma16;
config.card_subtype = type;
#ifdef CONFIG_ISAPNP
}
#endif
...
What happens is that even if there is an isapnp soundblaster card
(and the driver finds it) the else branch gets executed so
the freshly found io_base, irq and dma values will be overwritten
with some bad defaults. At least the irq changed from 5 to 7
but I was unable to find where this 7 comes from. I have not
given _any_ options, so the interesting values should be -1
initially if I may believe the source. If I supply it with
io, irq, etc. values, the module gets them correctly. But with
no options given, in the very first line of init_module the
defaults are:
io=0x220, irq=7, dma=1, dma16=5, mpu_io=0x330, type=0
Anyway, the patch I came up with is attached and is against 2.3.35.
With this patch, I got rid of the isapnp option. With no options,
my PnP SB16 works. If yours is not a PnP one then you still have
to explicitly give "io=X irq=Y ..." options to the sb module
as before.
Regards,
Zoltan Boszormenyi <zboszor@mail.externet.hu>
--685023584-1361530737-946898350=:27631
Content-Type: APPLICATION/octet-stream; name="sbpnp.gz"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.02.10001031219100.27631@prins.externet.hu>
Content-Description:
Content-Disposition: attachment; filename="sbpnp.gz"
H4sICBYaajgAA3NicG5wLTIuMy4zNS02LmRpZmYAjVTbbtpAEH22v2KUShHE
NrAmEMBFIiq0QgUHkSYvbWXZeJ2ugr2O106pkv5792LMpTSqhGzm7JzZOWdG
tiwL1iQpNs0wI884Y01GiyRsssBb+VnYWDXoOtS+FBjGeAU2AtQZtOxB6xJQ
v9/XDcN4m76j9sC2B+3+AF0p6mgEFrrsmAiBId5dGI10IEkOrEhTmuUwhJaj
NS/gFu+wnMKa+iHkPwgDn/+qk5iGxRrDRbMsEnsPfoxZVWVONjgDCxjGwNuL
RdhYVfn+ip/KXJE8pgpIaI4DSh95CslFrvWORCGO4MON+3H6yZveXi/chW6J
CoT5aZLyGsjhaXjN8BHekngSkkgHHeY347vZxFtcL+c1Qk04I2d15wjOnra4
dKvbNvvcrE6vNGs/N/WZfbLI1oiTh5ix/FeKt2f/UHfQk1SzI1R6nikJ4YLF
P70o4xYPwb2bzfh1snW73TaRDYZtd8wr2btGIqjFfoi6MOTWwPk55BnZVIHQ
UwXVRvC4zrkvOpzqVNM03dJk5a3pfBqyQOClGQ2wp/Da+YomEXkwofzjxWlR
f89rc/qLeGhpxmf3WPs8WbreZLmEs3KlB+BSENclCxAxg0hs/LdE2sGJGc6L
LAFrMnXvr2cS+y0eciEM1d1/twOa1CpNFup4rORRIc1C8PoKYezvAr4yKqgr
3zuI74pht3t8c6TtmqauaEiaIDtHqK1g1D04EFo9VgRiXXiCeDm6cTiF+XQ8
FRK1nYoGoV7gM0HhkUeoIJU7c3LZQNhVKlYSusjscQlSiZJAolrZFVvTnH1t
fR8OhWLYt9+9GU/uneNbZIt/7UirDnJ2b/YNiqUGxwIO1/bHpa6XuPoGwHbW
4lT/AymLwmhpBQAA
--685023584-1361530737-946898350=:27631--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/