audio/PCI/mmap oddity

Paul Barton-Davis (pbd@Op.Net)
Sun, 25 Jul 1999 13:41:15 -0400


can anyone shed any possible light on this problem ? I just made some
small modifications to ALSA to allow mmap() to be used with the native
ALSA PCM interface. then i wrote a test program to use it. it maps the
ADC buffer into user space, then alternates between scribbling magic 4
byte patterns in various locations in the buffer and busy-waiting for
them to be erased as the ADC overwrites them.

when i use the test program with an ISA soundcard, things work exactly
as i expected: we get a smooth stepping as the patterns are erased.

however, when i use it with a PCI soundcard, quite often the pattern
erasing skips a pattern or two. lets say i wrote 128 copies of my 4
byte pattern throughout the ADC buffer. i would expect them to erased
in order. But instead, if i was waiting for pattern #10 to be erased,
i will find that pattern #11 has been overwritten but pattern #10 is
still in place.

i am at a loss to understand anything that could cause this. the
skipping is pretty random, and typically, when cycling through the
buffer, it will happen 2-3 times out of, say, 256 patterns.

h/w info:
dual PII-450 on a supermicro P6DGU motherboard
onboard SCSI 7890UW controller
matrox G200 AGP video
tropez+ ISA soundcard (CS4231 ADAC)
hoontech 4DWave soundcard (Trident 4D-NX ADAC)
no other PCI devices

thanks for any suggestions

--p

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