Problems with OSS driver (/dev/dsp).

Problems with OSS driver (/dev/dsp).

Post by RĂ­khareur Egilss » Tue, 13 Apr 1999 04:00:00

Problems with OSS driver (/dev/dsp).

I am having problems with /dev/dsp programming under Linux.

I'm experimenting with Gtk/sound/threads and I am having pretty bad
I have no problems with simple things like (1) opening the device,
(2) record or play and (3) closing the device.
Those simple things work just fine.

But if I try to do anything more complex, it doesn't work.

I'm using plain RedHat 5.2 (kernel 2.0.36).

-- First problem --
I am recording an sample at 8000Hz, 8 bits, it doesn't matter if I
record in stereo or not, I get a 7-8 seconds delay after doing
ioctl(fd_dsp, SNDCTL_DSP_RESET, 0).
That is, recording stops immediately but the read(2) does not
return '-1' until 7-8 seconds after the ioctl.

The kernel logs (immediately after the ioctl):
kernel: Sound: DMA (input) timed out - IRQ/DRQ config error?

The ioctl(2) and read(2) are done in seperate threads on the same fd.
The ioctl reports no error (0 returned).

-- Second Problem --
Switching between record/play doesn't work well.
Using the simple parrot.c (no threads, no Gtk) from the package at {select 'examples'}
The first record/play is OK, but each record after that has an ~6 seconds
delay in front of it. That is, the driver does not start recording until
~6 seconds after the read(2) call.

The program does not close the driver in between read/writes just
calles "ioctl(fd, SOUND_PCM_SYNC, 0);" after each playback.

If anybody can get parrot.c to work I would be interested in knowing
how it was done.

 RIKHARDUR EGILSSON -  Ingnieur Systme
 echo '[q]sa[ln0=aln80%Pln80/snlbx]16isb15CB32EF3AF9C0E5D7272C3AF4F2snlbxq'|dc


1. /dev/dsp and /dev/audio in OSS sound engine

hi all,

how does the OSS module handle the /dev/dsp and /dev/audio devices ?
there is no option available in the kernel setup, in 2.0.x it is.

if i try to write into the device, following error occurs :
bash: /dev/dsp: Operation not supported by device

any clues ?


IT Support Grp, Department of Mathematics - Bonn University
{PGP|GPG} key available - ICQ #5068320

2. Howto punch unreal tournament through firewall?

3. problem getting OSS compatability to work with ALSA: aplay works; /dev/dsp gives noise.

4. libs

5. Can OSS share /dev/dsp amongst more than one app?


7. /dev/dsp, /dev/audio, /dev/midi., /dev/sndsta

8. PATCH: fix __NO_VERSION__ in audio_syms

9. Commercial drivers OSS better than free driver OSS for 7012 audio chipset ?

10. problem linking support for /dev/audio and /dev/dsp

11. Permissions to /dev/cdrom, /dev/dsp etc. problem

12. /dev/audio & /dev/dsp problem