Re: writing to /dev/dsp causes lockups with SoundBlaster

Trevor Johnson (trevor@jpj.net)
Sun, 4 Jan 1998 17:50:56 -0800 (PST)


I was advised:

> Modular sound has got bugs up the wazoo. I would recommend compiling
> all your sound drivers as resident and seeing if the problem still
> occurs.

I applied Tom Lees' ISA PnP patch (as I mentioned, my sound card uses
PnP), then configured sound like this:

CONFIG_SOUND=y
CONFIG_SB=y
SBC_BASE=220
SBC_IRQ=5
SBC_DMA=1
SB_DMA2=5
SB_MPU_BASE=330
SB_MPU_IRQ=-1
CONFIG_ADLIB=m
CONFIG_SOFTOSS=m
CONFIG_YM3812=m
CONFIG_LOWLEVEL_SOUND=y
CONFIG_AWE32_SYNTH=y

Here is the dmesg output:

Linux version 2.1.77 (root@ppp7.csudh.edu) (gcc version 2.7.2.3) #20 Sun Jan 4 16:41:56 PST 1998
ide_setup: idebus=33
Console: 8 point font, 480 scans
Console: colour VGA+ 80x60, 1 virtual console (max 63)
PCI: BIOS32 Service Directory structure at 0xc00fac50
PCI: BIOS32 Service Directory entry at 0xfb0c0
PCI: PCI BIOS revision 2.10 entry at 0xfb0f0
Probing PCI hardware.
Calibrating delay loop... 66.15 BogoMIPS
Memory: 63236k/65536k available (816k kernel code, 392k reserved, 1068k data, 24k init)
Swansea University Computer Society NET3.039 for Linux 2.1
NET3: Unix domain sockets 0.16 for Linux NET3.038.
Swansea University Computer Society TCP/IP for NET3.037
IP Protocols: ICMP, UDP, TCP
CPU: Intel Pentium 75+ stepping 0c
Checking 386/387 coupling... Ok, fpu using exception 16 error reporting.
Checking 'hlt' instruction... Ok.
Intel Pentium with F0 0F bug - workaround enabled.
POSIX conformance testing by UNIFIX
PnP-Linux support version 0.3 by Tom Lees <tom@lpsg.demon.co.uk>.
Searching for PnP-ISA devices...
Found card 'Creative SB32 PnP'
5 PnP devices registered.
Starting kswapd v 1.23
Serial driver version 4.24 with no serial options enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
Sound initialization started
<Sound Blaster 16 (4.13)> at 0x220 irq 5 dma 1,5
<Sound Blaster 16> at 0x330 irq 5 dma 0
AWE32-0.4.2c (RAM8192k)
Sound initialization complete
OPTI621: IDE controller on PCI bus 0 function 160
OPTI621: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x3000-0x3007, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0x3008-0x300f, BIOS settings: hdc:pio, hdd:pio
hda: Maxtor 72004 AP, ATA DISK drive
hdc: QUANTUM FIREBALL1280A, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: Maxtor 72004 AP, 1916MB w/128kB Cache, CHS=973/64/63, DMA
hdc: QUANTUM FIREBALL1280A, 1222MB w/83kB Cache, CHS=2484/16/63, DMA
PPP: version 2.3.3 (demand dialling)
TCP compression code copyright 1989 Regents of the University of California
PPP line discipline registered.
Partition check:
hda: hda1 hda2 hda3 hda4
hdc:hdc: dma_intr: bad DMA status
hdc: dma_intr: status=0x50 { DriveReady SeekComplete }
hdc: dma_intr: bad DMA status
hdc: dma_intr: status=0x50 { DriveReady SeekComplete }
hdc: dma_intr: bad DMA status
hdc: dma_intr: status=0x50 { DriveReady SeekComplete }
hdc: dma_intr: bad DMA status
hdc: dma_intr: status=0x50 { DriveReady SeekComplete }
hdc: DMA disabled
ide1: reset: success
[PTBL] [621/64/63] hdc1 hdc2 hdc3 hdc4
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 24k freed
loading device 'eth0'...
ne.c:v1.10 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)
NE*000 ethercard probe at 0x6000: 00 40 05 32 ff d4
eth0: NE2000 found at 0x6000, using IRQ 11.
loading device 'eth1'...

I can run timidity 0.2i (which uses /dev/dsp), playmidi 2.4 with AWE32
support (using /dev/sequencer), and aumix (/dev/mixer) all at the same
time with no problems, just the same as when I was using modular sound.
However, when I put the computer in single-user mode and catted a file to
/dev/audio, it locked up, just the same as when I was using modular sound.
The file played for about a minute, the same as before. I haven't tried
my zwav script again, but I will if someone asks. I've noticed that the
LED indicating IDE activity has been "stuck" on during several of these
lockups. The .au file is on /dev/hda, and the .wav.gz file is on
/dev/hdc. I haven't loaded the opl3 or softoss2 modules.

I made a diff of my drivers/sound directory versus a clean 2.1.77 (okay,
one from which dmabuf.c.old had been removed) and made it available at
http://www.jpj.net/~trevor/sound-2.1.77.diff. It consists mostly of the
ioctl patch several people posted, along with fallout from the ISA PnP
patch and from Michael Chastain's CONFIG_SMP patch, but I made some
changes to dev_table.c, sb_mixer.h and sys_timer.c.

During compilation, I get these sound-related warnings, which appeared
only after I applied the PnP patch and configured sound as partly
non-modular:

dev_table.h:396: warning: initialization from incompatible pointer type
dev_table.h:397: warning: initialization from incompatible pointer type
___
Trevor Johnson