This post explains what a sound server is, specifically in a Linux context, and provides a list of Sound Server APIs for Linux.
What is a Sound Server?
A sound server is software that manages the use of and access to audio devices, usually a sound card. It commonly runs as a background process or daemons.
Audio apps make use of a sound server API to access the sound card drivers, and this is the reason why there are dependencies between them.
There are many sound servers available in the market. The features of each sound server are different, for example some prioritize low latency while other desktop environment functionalities. This is why there are many available and not a one-for-all.
An app may be compatible with different sound server APIs, but not necessarily all of them. The sound servers that are compatible with an app is a decision made by the app developers.
What are the Layers involved in a Sound Server?
Layers involved in a sound server, from a top-down perspective, are:
- Application (e.g., Ardour)
- Sound Server (e.g., JACK)
- Sound System (e.g., ALSA)
- Operating System (e.g., Ubuntu)
Linux Sound Systems
Sound system provides an API to communicate to sound drivers. Unlike the sound servers, they are part of the Linux kernel.
Linux sound systems or frameworks:
- OSS
- ALSA
As of 2023, most modern Linux distributions use ALSA.
OSS
Open Sound System (OSS) was the first sound system for Linux and BSD.
OSS is FOSS, under a GPL license.
It was released in 1993, and it was originally written by Finnish developer Hannu Savolainen.
OSS has been largely superseded by ALSA.
ALSA
ALSA (acronym for Advanced Linux Sound Architecture) is a software framework that provides an API for sound card device drivers on Linux systems. It is part of the Linux kernel, and it is installed by default on Linux distributions.
ALSA replaced OSS (Open Sound System).
Sound servers like the ones listed below work on top of ALSA. Linux apps may access the sound card via a sound server or directly through a sound system like ALSA.
Using ALSA directly by apps gets the lowest latency compared to sound servers. On the other hand, ALSA lacks features provided by sound servers like audio processing, effects, upmixing, etc.
ALSA is a sound system and cannot be considered a sound server, but it is important to understand what it is as sound servers work on top of it and it is commonly offered as an alternative to them.
Linux Sound Servers
Sound servers rely on a sound system to communicate to the sound drivers.
Linux sound servers listed on this post:
- JACK
- PulseAudio
- PipeWire
If you are a developer looking for which sound server to use, you probably should have a try with the latest one, PipeWire.
JACK
JACK is the recursive acronym for JACK Audio Connection Kit.
JACK is a professional sound server aimed at music production applications, possibly in real-time environments.
It has higher latency than ALSA, and lower than pulseaudio.
One GUI to control the sound server JACK is the app QJackCtl.
PulseAudio
PulseAudio is distributed via project freedesktop.org
Pulseaudio has higher latency than ALSA and JACK.
Ubuntu desktop environment used PulseAudio in version prior to 22.10, before moving to PipeWire. Common Linux apps like web browsers or media players also uses pulseaudio.
PipeWire
PipeWire is a multimedia server, working both for video and audio.
It is the newest of all Linux sound servers listed in this post, first released in 2017. It solves some issues of the other sound servers, but some developers find it less mature than the older alternatives.
The first distribution to have it by default was Fedora in April 2021. Ubuntu uses PipeWire by default since version 22.10.
You might be also interested in…
External references
- Wikipedia community; “Advanced Linux Sound Architecture“; Wikipedia.org
- Wikipedia community; “Sound server“; Wikipedia.org
- Reddit community; “Let’s talk about how the Linux/Arch sound infrastructure works – ALSA, PulseAudio, Jack, Pipewire,“; Reddit
- Ask Ubuntu community; “https://askubuntu.com/questions/253664/what-is-jack-audio-i-have-problems-with-hydrogenjack“; Ask Ubuntu
- Ardour community; “Pipewire 1.0 – Is it time now?“; Ardour
[…] Linux Sound Servers […]