Open Sound System
Encyclopedia
The Open Sound System is an interface for making and capturing sound in Unix
or Unix-like
operating systems. It is based on standard Unix devices (i.e. POSIX
read, write, ioctl, etc.). The term also sometimes refers to the software in a Unix kernel that provides the OSS interface; it can be thought of as a device driver, or a collection of device drivers for sound controller hardware. The goal of OSS is to allow the writing of sound-based applications that are agnostic of the underlying sound hardware.
OSS was created in 1992 by Hannu Savolainen and is available in 11 major Unix-like
operating systems. OSS is distributed under four license options, three of which are free software licences, thus making OSS free software
.
cat /dev/urandom >/dev/dsp # plays white noise
through the speaker
cat /dev/dsp >a.a # reads data from the microphone and copies it to file a.a
, but following the project's success, Savolainen was contracted by the company 4Front Technologies
and made his support for newer sound devices and improvements proprietary
. In response, eventually the Linux community abandoned the OSS/free implementation included in the kernel (an outdated 3.x version, while 4front continued working on 4.x) and development effort switched to the replacement Advanced Linux Sound Architecture (ALSA). Many free software operating systems such as Linux
and FreeBSD
continued to distribute previous versions of OSS, and continued to maintain and improve these versions.
In July 2007, 4Front Technologies released sources for OSS under CDDL for OpenSolaris
and GPL for Linux
. In January 2008, 4Front Technologies released OSS for FreeBSD
(and other BSD systems) under the BSD License.
, there have historically been two uniform sound APIs used. One is OSS;
the other is ALSA (Advanced Linux Sound Architecture). ALSA is available for Linux only, and as there is only one implementation of the ALSA interface, ALSA refers equally to that implementation and to the interface itself.
OSS is the only audio API in Linux up through the 2.4 series of official (kernel.org) Linux kernels. ALSA was added starting with 2.5, and in those versions, Linux kernel authors marked OSS as deprecated. 4Front continued to develop OSS outside of the Linux kernel.
ALSA provides an optional OSS emulation mode that appears to programs as if it were OSS. Similarly, there was an ALSA emulation mode in the Linux implementation of OSS.
According to some, OSS is better documented than ALSA and its API is much simpler and easier to use.
4Front OSS3D was later renamed to Joesoft Hear.
and Lennart Poettering
. Often heard arguments against OSS are: the API is practically impossible to virtualize, it lacks support for modern audio features such as timer-based scheduling or proper surround sound support, inability of its developers to work with the Linux kernel community, lack of integration with modern kernel features such as the device model, too low-level interface, as well as general rejection of its design with moving a lot of signal processing code into the kernel.
Most of these criticisms have been addressed in OSS version 4.
contains an independently developed implementation of the OSS API, which includes, among other things, in-kernel resampling, mixing (vchans), equalizer, and independent volume control for each application. It also supports bit-perfect mode.
NetBSD
supports a compatibility mode for the OSS API, by providing the
Solaris and OpenSolaris
uses a fork of OSS4 call Boomer. It combines the OSS4 framework (audio and mixer) together with Sun's earlier SADA(/dev/audio) API.
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...
or Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....
operating systems. It is based on standard Unix devices (i.e. POSIX
POSIX
POSIX , an acronym for "Portable Operating System Interface", is a family of standards specified by the IEEE for maintaining compatibility between operating systems...
read, write, ioctl, etc.). The term also sometimes refers to the software in a Unix kernel that provides the OSS interface; it can be thought of as a device driver, or a collection of device drivers for sound controller hardware. The goal of OSS is to allow the writing of sound-based applications that are agnostic of the underlying sound hardware.
OSS was created in 1992 by Hannu Savolainen and is available in 11 major Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....
operating systems. OSS is distributed under four license options, three of which are free software licences, thus making OSS free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...
.
API
The API is designed to use the traditional Unix framework of open, read, write, and ioctl, via special devices. For instance, the default device for sound input and output is /dev/dsp. Examples using the shell:cat /dev/urandom >/dev/dsp # plays white noise
White noise
White noise is a random signal with a flat power spectral density. In other words, the signal contains equal power within a fixed bandwidth at any center frequency...
through the speaker
cat /dev/dsp >a.a # reads data from the microphone and copies it to file a.a
Free, proprietary, free
The project was initially free softwareFree software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...
, but following the project's success, Savolainen was contracted by the company 4Front Technologies
4Front Technologies
4Front Technologies is the company behind the Open Sound System for Linux and Unix operating systems. Since June 1999, 4Front has also been sponsoring development of the XMMS music player.- External Link :*...
and made his support for newer sound devices and improvements proprietary
Proprietary software
Proprietary software is computer software licensed under exclusive legal right of the copyright holder. The licensee is given the right to use the software under certain conditions, while restricted from other uses, such as modification, further distribution, or reverse engineering.Complementary...
. In response, eventually the Linux community abandoned the OSS/free implementation included in the kernel (an outdated 3.x version, while 4front continued working on 4.x) and development effort switched to the replacement Advanced Linux Sound Architecture (ALSA). Many free software operating systems such as Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...
and FreeBSD
FreeBSD
FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...
continued to distribute previous versions of OSS, and continued to maintain and improve these versions.
In July 2007, 4Front Technologies released sources for OSS under CDDL for OpenSolaris
OpenSolaris
OpenSolaris was an open source computer operating system based on Solaris created by Sun Microsystems. It was also the name of the project initiated by Sun to build a developer and user community around the software...
and GPL for Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...
. In January 2008, 4Front Technologies released OSS for FreeBSD
FreeBSD
FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...
(and other BSD systems) under the BSD License.
OSS in relation to ALSA
In the Linux kernelLinux kernel
The Linux kernel is an operating system kernel used by the Linux family of Unix-like operating systems. It is one of the most prominent examples of free and open source software....
, there have historically been two uniform sound APIs used. One is OSS;
the other is ALSA (Advanced Linux Sound Architecture). ALSA is available for Linux only, and as there is only one implementation of the ALSA interface, ALSA refers equally to that implementation and to the interface itself.
OSS is the only audio API in Linux up through the 2.4 series of official (kernel.org) Linux kernels. ALSA was added starting with 2.5, and in those versions, Linux kernel authors marked OSS as deprecated. 4Front continued to develop OSS outside of the Linux kernel.
ALSA provides an optional OSS emulation mode that appears to programs as if it were OSS. Similarly, there was an ALSA emulation mode in the Linux implementation of OSS.
According to some, OSS is better documented than ALSA and its API is much simpler and easier to use.
OSS/3D
OSS/3D is a plugin for music players, which acts as an audio postprocessing engine. Supported players include Winamp, Windows Media Player (9 or later), musicmatch, Sonique, Foobar2000, JetAudio, XMMS. It is ported to Windows and Linux platforms. Unlike the OSS, it is shareware.4Front OSS3D was later renamed to Joesoft Hear.
Criticism
OSS both as API and as software has been criticized openly and vocally by many free software developers, such as Paul DavisPaul Davis (programmer)
Paul Davis is a British software developer best known for his work on audio software for the Linux operating system, and for his role as one of the first two programmers at Amazon.com....
and Lennart Poettering
Lennart Poettering
Lennart Poettering is a computer programmer, best known for the creation of the PulseAudio cross-platform sound server, the systemd replacement for the System V init daemon, and the Avahi zeroconf implementation....
. Often heard arguments against OSS are: the API is practically impossible to virtualize, it lacks support for modern audio features such as timer-based scheduling or proper surround sound support, inability of its developers to work with the Linux kernel community, lack of integration with modern kernel features such as the device model, too low-level interface, as well as general rejection of its design with moving a lot of signal processing code into the kernel.
Most of these criticisms have been addressed in OSS version 4.
Other implementations
FreeBSDFreeBSD
FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...
contains an independently developed implementation of the OSS API, which includes, among other things, in-kernel resampling, mixing (vchans), equalizer, and independent volume control for each application. It also supports bit-perfect mode.
NetBSD
NetBSD
NetBSD is a freely available open source version of the Berkeley Software Distribution Unix operating system. It was the second open source BSD descendant to be formally released, after 386BSD, and continues to be actively developed. The NetBSD project is primarily focused on high quality design,...
supports a compatibility mode for the OSS API, by providing the
soundcard.h
header file and the libossaudio
library, which internally operate using the native NetBSD Sun-like audio interface.Solaris and OpenSolaris
OpenSolaris
OpenSolaris was an open source computer operating system based on Solaris created by Sun Microsystems. It was also the name of the project initiated by Sun to build a developer and user community around the software...
uses a fork of OSS4 call Boomer. It combines the OSS4 framework (audio and mixer) together with Sun's earlier SADA(/dev/audio) API.