PulseAudio explained

PulseAudio
Released:[1]
Latest Release Version:17.0[2]
Programming Language:C
Operating System:FreeBSD, NetBSD, OpenBSD, Linux, Illumos, Solaris, macOS, and Microsoft Windows (not maintained)
Platform:ARM, PowerPC, x86 / IA-32, x86-64, and MIPS
Genre:Sound server
License:LGPL-2.1-or-later

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

PulseAudio is free and open-source software, and is licensed under the terms of the LGPL-2.1-or-later.

It was created in 2004 under the name Polypaudio but was renamed in 2006 to PulseAudio.

PulseAudio competes with newer PipeWire, which provides a compatible PulseAudio server (known as pipewire-pulse), and PipeWire is now used by default on many Linux distributions, including Fedora Linux, Ubuntu, and Debian.[4] [5] [6]

Support for Microsoft Windows

On Microsoft Windows, PulseAudio runs in Windows Subsystem for Linux.

The NT kernel was previously supported via MinGW (an implementation of the GNU toolchain, which includes various tools such as GCC and binutils). The NT kernel port has not been updated since 2011, however.

Software architecture

In broad terms ALSA is a kernel subsystem that provides the sound hardware driver, and PulseAudio is the interface engine between applications and ALSA. However, its use is not mandatory and audio can still be played and mixed together without PulseAudio.

PulseAudio acts as a sound server, where a background process accepting sound input from one or more sources (processes, capture devices, etc.) is created. The background process then redirects these sound sources to one or more sinks (sound cards, remote network PulseAudio servers, or other processes).

One of the goals of PulseAudio is to reroute all sound streams through it, including those from processes that attempt to directly access the hardware (like legacy OSS applications). PulseAudio achieves this by providing adapters to applications using other audio systems, like aRts and ESD.

In a typical installation scenario under Linux, the user configures ALSA to use a virtual device provided by PulseAudio. Thus, applications using ALSA will output sound to PulseAudio, which then uses ALSA itself to access the real sound card. PulseAudio also provides its own native interface to applications that want to support PulseAudio directly, as well as a legacy interface for ESD applications, making it suitable as a drop-in replacement for ESD.

For OSS applications, PulseAudio provides the padsp utility, which replaces device files such as /dev/dsp, tricking the applications into believing that they have exclusive control over the sound card. In reality, their output is rerouted through PulseAudio.

libcanberra

libcanberra is an abstract API for desktop event sounds and a total replacement for the "PulseAudio sample cache API":

libSydney

libSydney is a total replacement for the "PulseAudio streaming API", and plans have been made for libSydney to eventually become the only audio API used in PulseAudio.[10]

Features

The main PulseAudio features include:

Adoption

PulseAudio first appeared for regular users in Fedora Linux, starting with version 8,[11] then was adopted by major Linux distributions such as Ubuntu, Debian, Mandriva Linux, and openSUSE. There is support for PulseAudio in the GNOME project, and also in KDE, as it is integrated into Plasma Workspaces, adding support to Phonon (the KDE multimedia framework) and KMix (the integrated mixer application) as well as a "Speaker Setup" GUI to aid the configuration of multi-channel speakers. PulseAudio is also available in the Illumos distribution OpenIndiana, and enabled by default in its MATE desktop environment.

Various Linux-based mobile devices, including Nokia N900, Nokia N9 and the Palm Pre use PulseAudio.

Tizen, an open-source mobile operating system, which is a project of the Linux Foundation and is governed by a Technical Steering Group (TSG) composed of Intel and Samsung, uses PulseAudio.

Problems during adoption phase

Related software

Other sound servers

JACK is a sound server that provides real-time, low-latency (i.e. 5 milliseconds or less) audio performance and, since JACK2, supports efficient load balancing by utilizing symmetric multiprocessing; that is, the load of all audio clients can be distributed among several processors. JACK is the preferred sound server for professional audio applications such as Ardour, ReZound, and LinuxSampler; multiple free audio-production distributions use it as the default audio server.

It is possible for JACK and PulseAudio to coexist: while JACK is running, PulseAudio can automatically connect itself as a JACK client, allowing PulseAudio clients to make and record sound at the same time as JACK clients.[21]

PipeWire is an audio and video server that "aims to support the use cases currently handled by both PulseAudio and Jack".[22] [23]

General audio infrastructures

Before JACK and PulseAudio, sound on these systems was managed by multi-purpose integrated audio solutions. These solutions do not fully cover the mixing and sound streaming process, but they are still used by JACK and PulseAudio to send the final audio stream to the sound card.

See also

Notes and References

  1. Web site: OldNews . freedesktop.org.
  2. Web site: PulseAudio 17.0 · PulseAudio / pulseaudio · GitLab . 2024-01-13 . GitLab . en.
  3. Web site: SupportedAudioFormats . 2023-05-13 . www.freedesktop.org.
  4. Web site: Changes/DefaultPipeWire - Fedora Project Wiki . 2023-02-13 . fedoraproject.org.
  5. Web site: Sneddon . Joey . 2022-05-22 . Ubuntu 22.10 Makes PipeWire Default for Audio . 2023-02-13 . OMG! Ubuntu! . en-GB.
  6. Web site: Debian 12 Switches To PipeWire & WirePlumber By Default With The GNOME Desktop . 2023-02-13 . www.phoronix.com . en.
  7. Web site: Debian -- Package Search Results -- libcanberra. packages.debian.org.
  8. Web site: Debian -- Package Search Results -- libasound. packages.debian.org.
  9. Web site: Debian -- Package Search Results -- libcanberra-pulse. packages.debian.org.
  10. Web site: FOMS/LCA Recap. Poettering. Lennart. 8 February 2007. 0pointer.de. en. 13 March 2017.
  11. Web site: LPC: Linux audio: it's a mess [LWN.net] ]. 11 July 2019 . September 18, 2008.
  12. Web site: Poettering. Lennart. Writing a PortAudio driver. audio.portaudio.devel. git.net. 28 February 2017. en. 25 September 2004.
  13. Web site: Poettering. Lennart. PulseAudio is now enabled by default on new Fedora installs. Fedora Development ML. Red Hat. 1 March 2017.
  14. Web site: Features: Glitch-free Audio. Fedora Project Wiki. 28 February 2017. en.
  15. Web site: Poettering. Lennart. Alsa Issues. PulseAudio - Trac. 28 February 2017. https://web.archive.org/web/20081016070622/http://pulseaudio.org/wiki/AlsaIssues. 16 October 2008.
  16. Web site: Over-optimistic buffering in PulseAudio causes underruns (audible stuttering, pops). Launchpad. 9 November 2013.
  17. Web site: 46466 - PulseAudio needs a way for the user to set inviolable maximum volume . Bugzilla . 6 October 2021.
  18. Web site: [SOLVED] disabling pulseaudio - Page 3 ]. Linux Questions . 6 October 2021.
  19. Web site: Bug #410948 'Volume too loud' : Bugs : pulseaudio package . Ubuntu . 6 October 2021.
  20. Web site: #837637 - Audio settings often reset to 100% Volume . Debian Bug report logs . 6 October 2021.
  21. See “Loadable Modules.” Modules, Freedesktop.org, https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#index9h2, retrieved August 28, 2019
  22. Web site: PipeWire. pipewire.org.
  23. Web site: On the Road to Fedora Workstation 31 — Christian F.K. Schaller.
  24. .