creative sb16 pnp on mobo problems

Ian Peters (itp@andrew.cmu.edu)
Sat, 17 Oct 1998 18:21:29 -0400


Hello all.

I have a hand-assembled dual-PII 300 running on a Tyan Thunder 100,
running Linux 2.1.125. The documentation for this board lists the
onboard sound card as a Creative Labs Vibra 16XV. The card works
fine under Windows 98, where it is detected as a plug and play
device, and configures itself on irq 5, dma's 1 and 3. After some
snooping around, I came across the file c:\windows\ctpnp.cfg, with
the following contents:

[SB16]
Csn=1
LogDev=0
CardId=CTL00F0
Serial=FFFFFFFF
Port0=220
Port1=330
Port2=388
Irq0=5
Dma0=1
Dma1=3

[PNP]
Readport=277

Which to me indicates that the card is using ports 0x220, 0x330, and
0x388, irq 5, dma8 as 1, and dma16 as 3.

Next, I downloaded isapnptools-1.16, and ran pnpdumb on the card. The
relevant parts of isapnp.conf are:

(READPORT 0x0203)
(ISOLATE PRESERVE)
(IDENTIFY *)
# Card 1: (serial identifier 6d ff ff ff ff f0 00 8c 0e)
# Vendor Id CTL00f0, No Serial Number (-1), checksum 0x6D.
# Version 1.0, Vendor version 1.0
# ANSI string -->Creative ViBRA16X PnP<--
(CONFIGURE CTL00f0/-1 (LD 0
(INT 0 (IRQ 5 (MODE +E)))
(DMA 0 (CHANNEL 1))
(DMA 1 (CHANNEL 3))
(IO 0 (BASE 0x0220))
(IO 1 (BASE 0x0330))
(IO 2 (BASE 0x0388))
(ACT Y)
))
(CONFIGURE CTL00f0/-1 (LD 1
# Compatible device id PNPb02f
# ANSI string -->Game<--
(IO 0 (BASE 0x0201))
(ACT Y)
))
(WAITFORKEY)

This looks to be in agreement with the values that windows detected
for the card. So, I set up /etc/conf.modules with

obtions sb io=0x220 irq=5 dma=1 dma16=3

and ran modprobe sb. All of the modules (soundcore, sound, uart401,
sb) load, except that module sb produces the following messages:

Soundblaster audio driver Copyright (C) by Hannu Savolainen 1993-1996
SB 4.16 detected OK (220)
SB16: Bad or missing 16 bit DMA channel

At this point, /proc/interrupts looks like:

CPU0 CPU1
0: 11784802 11780801 IO-APIC-edge timer
1: 107771 106999 IO-APIC-edge keyboard
2: 0 0 XT-PIC cascade
5: 1369449 1366117 IO-APIC-edge soundblaster
10: 181183 180971 IO-APIC-level aic7xxx, aic7xxx
11: 579097 579213 IO-APIC-level Intel EtherExpress Pro
10/100 Ethernet
12: 570130 565577 IO-APIC-edge PS/2 Mouse
13: 1 0 XT-PIC fpu
14: 5576 4057 IO-APIC-edge ide0
NMI: 0
IPI: 0

and /proc/dma looks like:

1: SoundBlaster8
4: cascade

It should be noted that audio seems to work - in my quick testing, I
could play mp3's with mpg123, use snes9x, and play audio cd's.

I tried looking at the source code for the sb driver, and I believe
the relevant lines are from /usr/src/linux/drivers/sb_common.c :

if (hw_config->dma2 == -1)
devc->dma16 = devc->dma8;
else if (hw_config->dma2 < 5 || hw_config->dma2 > 7)
{
printk(KERN_WARNING "SB16: Bad or missing 16 bit DMA channel\n");
devc->dma16 = devc->dma8;
}
else
devc->dma16 = hw_config->dma2;

Well, this explains why dma16=3 was being rejected. I tried changing
this line, and recompiling, and unsurprisingly, the module then went
in without a hitch. However, any attempt to play sounds results in:

Sound: DMA (output) timed out - IRQ/DRQ config error?
Sound: DMA (output) timed out - IRQ/DRQ config error?
...
Sound: DMA (output) timed out - IRQ/DRQ config error?

etc...

When I look again at /proc/dma, it looks good:

1: SoundBlaster8
4: cascade
5: SoundBlaster16

And /proc/interrupts looks good:

CPU0 CPU1
0: 11815226 11811866 IO-APIC-edge timer
1: 109930 109200 IO-APIC-edge keyboard
2: 0 0 XT-PIC cascade
5: 1376150 1372403 IO-APIC-edge soundblaster
10: 181992 181794 IO-APIC-level aic7xxx, aic7xxx
11: 582264 582361 IO-APIC-level Intel EtherExpress Pro
10/100 Ethernet
12: 576700 571679 IO-APIC-edge PS/2 Mouse
13: 1 0 XT-PIC fpu
14: 5576 4057 IO-APIC-edge ide0
NMI: 0
IPI: 0

Next, I tried changing the line for the second dma in /etc/isapnp.conf
to:

(DMA 1 (CHANNEL 3))

and changing /etc/conf.modules to dma16=5, and rerunning isapnp, and
then reinserting all the modules...and it again gives:

Sound: DMA (output) timed out - IRQ/DRQ config error?

I've tried this for possibly any legal combination of irq and dma's I
can imagine...I've cold booted the machine, and had it boot with
different settings, to make sure that the 5,1,3 setting wasn't
persisting...nothing.

If anyone has any idea what to do, I'd very much appreciate the help.
If you need any additional information, I'll be happy to provide it.
If there is a more appropriate forum for me to ask this question, I'd
love to hear that, too.

Please CC: any replies to me at ipeters@acm.org. Thank you in
advance.

-- 
Ian Peters
ipeters@acm.org

- 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/