Re: /dev/dsp, and /dev/audio

Aaron M. Ucko (
14 Jul 1997 01:28:55 -0400

Michael Ballbach <> writes:

> I'm trying to determine the format of the sound data returned by
> /dev/audio and /dev/dsp. How is this data encoded? I know /dev/audio
> returns data as though it were an au, but how is that encoded? Is one byte
> frequency, and one byte amplitude? I'm especially interested in /dev/dsp's
> format. Thanks for any response. :)

That depends in part on what you ask for, but both devices default to
8-kHz monophonic operation. /dev/dsp defaults to 8-bit unsigned
encoding, and /dev/audio defaults to logarithmic mu-Law encoding. See
<> for more details, including
how to ask the driver to use a different format.

Aaron M. Ucko ( | For Geek Code, PGP public key, and other info,
finger | "Kids! Bringing about Armageddon can be dangerous.
Do not attempt it in your home." -- T. Pratchett & N. Gaiman, _Good Omens_