Open Sound System

Last updated
Open Sound System
Original author(s) Hannu Savolainen
Developer(s) NCR Corporation
Stable release
4.2 build 2019 / March 5, 2019;5 years ago (2019-03-05) [1]
Operating system Cross-platform [2]
Type Audio
License
Website www.opensound.com

The Open Sound System (OSS) is an interface for making and capturing sound in Unix and Unix-like operating systems. It is based on standard Unix devices system calls (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.

Contents

OSS was created by Hannu Savolainen and is distributed under four license options, three of which are free software licences, thus making OSS free software. [3]

API

The API is designed to use the traditional Unix framework of open(), read(), write(), and ioctl(), via device files. For instance, the default device for sound input and output is /dev/dsp. Examples using the shell:

cat /dev/random > /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

OSS implements the /dev/audio interface. Detailed access to individual sound devices is provided via the /dev/oss directory. OSS also has MIDI support in /dev/sequencer, /dev/music (both legacy) and /dev/mini. [4] [5]

On Linux, OSS4 is also able to emulate ALSA, its open-source replacement. [6]

History

OSS was originally "VoxWare", a Linux kernel sound driver by Hannu Savolainen. Savolainen made the code available under free software licenses, GPL for Linux and BSD for BSD distributions. Between November 1993 (and Linux 1.00) [7] and 1997, OSS was the sole choice of sound system in FreeBSD and Linux. This was changed when Luigi Rizzo wrote a new "pcm" driver for FreeBSD in 1997, and when Jaroslav Kysela started Advanced Linux Sound Architecture in 1998. [8]

In 2002, Savolainen was contracted by the company 4Front Technologies and made the upcoming OSS 4, which includes support for newer sound devices and improvements, proprietary. In response, the Linux community abandoned the OSS/free implementation included in the kernel and development effort switched to the replacement Advanced Linux Sound Architecture (ALSA). FreeBSD by this time had switched to a "newpcm" project started in 1999 and was not affected. [8]

In July 2007, 4Front Technologies released sources for OSS under CDDL-1.0 for OpenSolaris and GPL-2.0-only for Linux. Drivers for some soundcards remained closed-source and were not included in the release. [3] In January 2008, 4Front Technologies released OSS for FreeBSD (and other BSD systems) under the BSD-2-Clause. [9]

Adoption status

Code

OSS4 now exists mostly as a standalone piece of software, not integrated into the kernel source code. The exception is Solaris and OpenSolaris, which use a fork of OSS4 called Boomer. It combines the OSS4 framework (audio and mixer) together with Sun's earlier SADA (/dev/audio) API. [10]

Although Linux distributions such as Ubuntu made OSS4 available as a software package after it was made free software, they have chosen to ignore any bugs filed against these packages. [11]

API

The OSS API has remained influential despite the obscurity of the original library. NetBSD's documentation describes it as "the preferred API in FreeBSD and Solaris". [12]

FreeBSD contains an independently developed implementation of the OSS API, which includes, among other things, in-kernel resampling, mixing (vchans), equalizer, surround sound, and independent volume control for each application. It also supports bit-perfect mode. [13] It gradually evolved from the "newpcm" replacement written in 1999 and caught up with OSS4 API around 2005. [8]

NetBSD 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 Sun-like audio interface. The replacement was first seen in NetBSD 1.3 of 1998. [12]

Linux had, as aforementioned, switched to Advanced Linux Sound Architecture since 2003 (kernel 2.6). ALSA provides an optional, in-kernel, OSS emulation mode that appears to programs as if it were OSS. [14] ALSA also has a aoss userspace program that works by intercepting systems calls directed to the OSS device files. [15]

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. [16]

Criticism

OSS both as API and as software has been criticized by some developers, such as Paul Davis (of JACK Audio Connection Kit) and Lennart Poettering (of competing PulseAudio). [17] [ failed verification ] [18]

See also

Related Research Articles

<span class="mw-page-title-main">Advanced Linux Sound Architecture</span> Software framework

Advanced Linux Sound Architecture (ALSA) is a software framework and part of the Linux kernel that provides an application programming interface (API) for sound card device drivers.

The Filesystem Hierarchy Standard (FHS) is a reference describing the conventions used for the layout of Unix-like systems. It has been made popular by its use in Linux distributions, but it is used by other Unix-like systems as well. It is maintained by the Linux Foundation. The latest version is 3.0, released on 3 June 2015.

JACK Audio Connection Kit is a professional sound server API and pair of daemon implementations to provide real-time, low-latency connections for both audio and MIDI data between applications. JACK was developed by a community of open-source developers led by Paul Davis and has been a key piece of infrastructure and the de facto standard for professional audio software on Linux since its inception in 2002. The server is free software, licensed under GPL-2.0-or-later, while the library is licensed under LGPL-2.1-or-later.

<span class="mw-page-title-main">/dev/random</span> Pseudorandom number generator file in Unix-like operating systems

In Unix-like operating systems, /dev/random and /dev/urandom are special files that serve as cryptographically secure pseudorandom number generators (CSPRNGs). They allow access to a CSPRNG that is seeded with entropy from environmental noise, collected from device drivers and other sources. /dev/random typically blocked if there was less entropy available than requested; more recently it usually blocks at startup until sufficient entropy has been gathered, then unblocks permanently. The /dev/urandom device typically was never a blocking device, even if the pseudorandom number generator seed was not fully initialized with entropy since boot. Not all operating systems implement the same methods for /dev/random and /dev/urandom.

A sound server is software that manages the use of and access to audio devices. It commonly runs as a background process.

The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory. Typically, it is mapped to a mount point named /proc at boot time. The proc file system acts as an interface to internal data structures about running processes in the kernel. In Linux, it can also be used to obtain information about the kernel and to change certain kernel parameters at runtime (sysctl).

In computing, ioctl is a system call for device-specific input/output operations and other operations which cannot be expressed by regular file semantics. It takes a parameter specifying a request code; the effect of a call depends completely on the request code. Request codes are often device-specific. For instance, a CD-ROM device driver which can instruct a physical device to eject a disc would provide an ioctl request code to do so. Device-independent request codes are sometimes used to give userspace access to kernel functions which are only used by core system software or still under development.

In Unix-like operating systems, a loop device, vnd, or lofi is a pseudo-device that makes a computer file accessible as a block device.

<span class="mw-page-title-main">PulseAudio</span> Sound server for Unix-like operating systems

PulseAudio is a network-capable sound server program distributed via the freedesktop.org project. It runs mainly on Linux, including Windows Subsystem for Linux on Microsoft Windows and Termux on Android; various BSD distributions such as FreeBSD, OpenBSD, and macOS; as well as Illumos distributions and the Solaris operating system. It serves as a middleware in between applications and hardware and handles raw PCM audio streams.

In the context of free and open-source software, proprietary software only available as a binary executable is referred to as a blob or binary blob. The term usually refers to a device driver module loaded into the kernel of an open-source operating system, and is sometimes also applied to code running outside the kernel, such as system firmware images, microcode updates, or userland programs. The term blob was first used in database management systems to describe a collection of binary data stored as a single entity.

<span class="mw-page-title-main">Kernel-based Virtual Machine</span> Virtualization module in the Linux kernel

Kernel-based Virtual Machine (KVM) is a free and open-source virtualization module in the Linux kernel that allows the kernel to function as a hypervisor. It was merged into the mainline Linux kernel in version 2.6.20, which was released on February 5, 2007. KVM requires a processor with hardware virtualization extensions, such as Intel VT or AMD-V. KVM has also been ported to other operating systems such as FreeBSD and illumos in the form of loadable kernel modules.

<span class="mw-page-title-main">Ubuntu Studio</span> Derivative of the Ubuntu operating system

Ubuntu Studio is a recognized flavor of the Ubuntu Linux distribution, which is geared to general multimedia production. The original version, based on Ubuntu 7.04, was released on 10 May 2007.

In computing, entropy is the randomness collected by an operating system or application for use in cryptography or other uses that require random data. This randomness is often collected from hardware sources, either pre-existing ones such as mouse movements or specially provided randomness generators. A lack of entropy can have a negative impact on performance and security.

In Unix-like operating systems, a device file, device node, or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These special files allow an application program to interact with a device by using its device driver via standard input/output system calls. Using standard system calls simplifies many programming tasks, and leads to consistent user-space I/O mechanisms regardless of device features and functions.

<span class="mw-page-title-main">Unix-like</span> Operating system that behaves similarly to Unix, e.g. Linux

A Unix-like operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-like application is one that behaves like the corresponding Unix command or shell. Although there are general philosophies for Unix design, there is no technical standard defining the term, and opinions can differ about the degree to which a particular operating system or application is Unix-like.

<span class="mw-page-title-main">Lennart Poettering</span> German software engineer

Lennart Poettering is a German software engineer working for Microsoft and the original author of PulseAudio, Avahi and systemd.

WildMIDI is a free open-source software synthesizer which converts MIDI note data into an audio signal using GUS sound patches without need for a GUS patch-compatible soundcard. WildMIDI, whose aim is to be as small as possible and easily portable, started in December 2001, can act as a virtual MIDI device, capable of receiving MIDI data from any program and transforming it into audio on-the-fly. It is the standard MIDI renderer for the GStreamer framework.

<span class="mw-page-title-main">DeaDBeeF</span> Audio player

DeaDBeeF is an audio player software available for Windows, Linux and other Unix-like operating systems. An ad-supported Android version is available, but has not been updated since 2017. DeaDBeeF is free and open-source software, except on Android.

The bio(4) pseudo-device driver and the bioctl(8) utility implement a generic RAID volume management interface in OpenBSD and NetBSD. The idea behind this software is similar to ifconfig, where a single utility from the operating system can be used to control any RAID controller using a generic interface, instead of having to rely on many proprietary and custom RAID management utilities specific for each given hardware RAID manufacturer. Features include monitoring of the health status of the arrays, controlling identification through blinking the LEDs and managing of sound alarms, and specifying hot spare disks. Additionally, the softraid configuration in OpenBSD is delegated to bioctl as well; whereas the initial creation of volumes and configuration of hardware RAID is left to card BIOS as non-essential after the operating system has already been booted. Interfacing between the kernel and userland is performed through the ioctl system call through the /dev/bio pseudo-device.

References

  1. OSS v4.2 build 2019, archived from the original on 2022-09-25, retrieved 2019-05-10
  2. "OSS Download Registration".
  3. 1 2 4Front technologies releases the source code for open sound system, Linux PR, archived from the original on July 25, 2011, retrieved 2012-01-08
  4. "OSS v4.x API reference - OSS API basics". manuals.opensound.com.
  5. "Open Sound System (3.x) Programmer's Guide" (PDF). 2000. Retrieved 22 February 2023.
  6. "Tips And Tricks - Open Sound System". ossnext.trueinstruments.com.
  7. "Linux 0.99 patchlevel 14 - Diff - 75bb5836a8a8c0ee44ffd60a51f357b9568f1381^! - pub/scm/linux/kernel/git/nico/archive - Git at Google". kernel.googlesource.com. Retrieved 2024-03-22.
  8. 1 2 3 "Sound - FreeBSD Wiki". wiki.freebsd.org.
  9. 4Front Technologies releases OSS for FreeBSD under the BSD license, opensound.com, retrieved 2012-01-08
  10. Hannu's Blog » Boomer, 4front-tech.com, archived from the original on 2012-03-16, retrieved 2012-01-08
  11. Ubuntu Documentation: OpenSound, ubuntu.com, retrieved 2012-01-08
  12. 1 2 "ossaudio(3) - NetBSD Manual Pages". man.netbsd.org.
  13. sound, Freebsd.org, 2009-07-13, retrieved 2012-01-08
  14. OSS Emulation, archived from the original on 2012-06-05, retrieved 2012-07-07
  15. "aoss(1) — Arch manual pages". man.archlinux.org.
  16. · Obsolete product reference, Yohng.com, retrieved 2012-01-08
  17. "A tutorial on using the ALSA Audio API".
  18. "Interview with Lennart Poettering (LinuxFR.org) [LWN.net]". lwn.net.