The officially official Devuan Forum!

You are not logged in.

#1 2021-07-04 21:13:02

Registered: 2017-05-07
Posts: 865  

Sound in Linux: OSS, ALSA, Pulse Audio ...


My recent search for a simple/lightweight system mail notification for my Devuan Beowulf installation got me more or less what I wanted.

Simple in that it was only for the installed MTA (no POP/SMTP/etc.) and lightweight because it had to be independent and do just that: notify me of system mail.
ie: not integrated to a panel or desktop, I am not at all happy with Xfce4 and will eventually move on to something similar to what #! Waldorf had as a desktop.

I found a very interesting ca. 1995 (!) application called Coolmail which does all I want.
If interested, you can read about it here.

Besides firing up a mail utility such as mutt, mailx, etc., this application has is the possibility of playing a system beep ie: through the on-board hardware's piezo or a sound file through external speakers.

I cannot seem to get the system beep to be loud enough and the application is rather dated so it uses OSS drivers.
And Linux kernel support for OSS was dropped around 4.15.

My Beowulf installation has Poettering's Pulse Audio installed and I've never paid much attention to it save to raise the main volume when I'm listening to music or watching a movie.

My box does no games and I'm still using the same Sony SRS-PC30 active speaker system I reluctantly purchased (whatever for?) along with a SB16 ISA card back in 1995. Works great and even have a service manual in case it ever acts up.

In any case, I was unable to get a *.au sound file played as coolmail complained of not being able to write to /dev/audio which was not present in my file system.

Seems Linux sound is a complicated thing.

After a while I came across a post (sorry, lost the link) that gave indications for installing the oss-compat package, which I promptly I did.
Doing so removed osspd-pulseaudio.

Could not help but smile ...  8^D
I'll look into ripping out the rest of it further on ...

Now I have /dev/audio in my system, along with /dev/dsp and /dev/mixer which were already present:

groucho@devuan:~$ ls -l /dev/ | grep audio
crw-rw----+ 1 root audio      14,   4 Jul  4 15:53 audio
crw-rw----+ 1 root audio      14,   3 Jul  4 15:53 dsp
crw-rw----+ 1 root audio      14,   0 Jul  4 15:53 mixer

Q: for some reason my terminal output shows dsp and mixer in yellow lettering but audio in red. Why?
Dumb question ...  8^|

Now the *.au file coolmail could not play is played but unrecognizably distorted.
And I am still getting an error from the application:

groucho@devuan:~$ coolmail -v
Coolmail 1.3 watching file: /var/spool/mail/groucho
Coolmail: Error writing to /dev/audio.
--- snip ---

The file plays normally via Audacious, VLC and aplay:

groucho@devuan:~$ aplay -v /home/groucho/Downloads/
Playing Sparc Audio '/home/groucho/Downloads/' : Signed 16 bit Big Endian, Rate 48000 Hz, Stereo
ALSA <-> PulseAudio PCM I/O Plugin
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_BE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 24000
  period_size  : 6000
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : GETTIMEOFDAY
  period_step  : 1
  avail_min    : 6000
  period_event : 0
  start_threshold  : 24000
  stop_threshold   : 24000
  silence_threshold: 0
  silence_size : 0
  boundary     : 6755399441055744000

Any idea on what is going on?

Thanks in advance,


Last edited by Altoid (2021-07-05 00:43:47)


Board footer