PulseAudio
{{short description|Sound server for Unix-like operating systems}}
{{Multiple issues|
{{self-published|date=March 2017}}
{{third-party|date=March 2017}}
}}
{{Infobox software
| name = PulseAudio
| logo = Pulseaudio-logo.svg
| screenshot = PulseAudio GUI.png
| caption = Screenshot
| developer = {{ubl|Lennart Poettering|Pierre Ossman|Shahms E. King|Tanu Kaskinen|Colin Guthrie|Arun Raghavan|David Henningsson}}
| released = {{Start date and age|df=yes|2004|07|17}}{{cite web
| url = https://www.freedesktop.org/wiki/Software/PulseAudio/OldNews/
| title = OldNews
| website = freedesktop.org}}
| latest release version = 17.0{{Cite web |title=PulseAudio 17.0 · PulseAudio / pulseaudio · GitLab |url=https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/releases/v17.0 |access-date=2024-01-13 |website=GitLab |language=en}}
| latest release date = {{Start date and age|df=yes|2024|1|12}}
| latest preview version =
| latest preview date =
| repo = {{URL|https://gitlab.freedesktop.org/pulseaudio/pulseaudio}}
| programming language = C{{citation
| url = https://www.openhub.net/p/pulseaudio
| publisher = Open Hub
| work = Analysis Summary
| title = PulseAudio}}
| 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{{citation
|url = http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/LICENSE
|title = License
|publisher = Free desktop
|work = PulseAudio git
|access-date = 16 June 2011
|archive-url = https://web.archive.org/web/20140304220414/http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/LICENSE
|archive-date = 4 March 2014
|url-status = dead
}}
| website = {{URL|https://www.freedesktop.org/wiki/Software/PulseAudio/|pulseaudio.org}}
}}
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.{{Cite web |title=SupportedAudioFormats |url=https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SupportedAudioFormats/ |access-date=2023-05-13 |website=www.freedesktop.org}}
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.{{citation
| title = The Project Formerly Known as Polypaudio
| url = http://0pointer.de/blog/projects/pulse.html}}
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.{{Cite web |title=Changes/DefaultPipeWire - Fedora Project Wiki |url=https://fedoraproject.org/wiki/Changes/DefaultPipeWire |access-date=2023-02-13 |website=fedoraproject.org}}{{Cite web |last=Sneddon |first=Joey |date=2022-05-22 |title=Ubuntu 22.10 Makes PipeWire Default for Audio |url=https://www.omgubuntu.co.uk/2022/05/ubuntu-22-10-makes-pipewire-default |access-date=2023-02-13 |website=OMG! Ubuntu! |language=en-GB}}{{Cite web |title=Debian 12 Switches To PipeWire & WirePlumber By Default With The GNOME Desktop |url=https://www.phoronix.com/news/Debian-12-PipeWire |access-date=2023-02-13 |website=www.phoronix.com |language=en}}
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.{{citation
| title = PulseAudio on Windows
| url = https://www.freedesktop.org/wiki/Software/PulseAudio/Ports/Windows/Support/}}
Software architecture
File:Linux kernel and daemons with exclusive access.svg
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).{{citation |title=About |work=PulseAudio |url=http://www.freedesktop.org/wiki/Software/PulseAudio/About |publisher= Free desktop |access-date= 11 March 2013}}
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":
- Complies with the [https://www.freedesktop.org/wiki/Specifications/sound-theme-spec/ XDG Sound Theme and Naming Specifications].
- Defines a simple abstract interface for playing event sounds.{{cite web|url=https://packages.debian.org/libcanberra|title=Debian -- Package Search Results -- libcanberra|website=packages.debian.org}}
- Interfaces with ALSA through libasound.{{cite web|url=https://packages.debian.org/libasound|title=Debian -- Package Search Results -- libasound|website=packages.debian.org}}
- Has a back-end to PulseAudio.{{cite web|url=https://packages.debian.org/libcanberra-pulse|title=Debian -- Package Search Results -- libcanberra-pulse|website=packages.debian.org}}
=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.{{Cite web|url=http://0pointer.de/blog/projects/foms-lca-recap.html|title=FOMS/LCA Recap|last=Poettering|first=Lennart|date=8 February 2007|website=0pointer.de|language=en|access-date=13 March 2017}}
Features
The main PulseAudio features include:
- Per-application volume controls{{citation | url= http://fedoraproject.org/wiki/Interviews/LennartPoettering | contribution =Interviews | first = Lennart | last = Poettering | title =Fedora Project | publisher = Red Hat | access-date = 3 July 2009}}
- An extensible plugin architecture with support for loadable modules
- Compatibility with many popular audio applications{{citation |url=http://pulseaudio.org/wiki/PerfectSetup#ThirdPartyApplications |title=Pulse Audio wiki |publisher=PulseAudio |archive-url=https://web.archive.org/web/20090831054457/http://fedoraproject.org/wiki/Interviews/LennartPoettering#ThirdPartyApplications |archive-date=31 August 2009 |access-date=19 July 2009 |url-status=dead |df=dmy-all }}
- Support for multiple audio sources and sinks
- A zero-copy memory architecture for processor resource efficiency
- Ability to discover other computers using PulseAudio on the local network and play sound through their speakers directly
- Ability to change which output device applications use to play sound through while they are playing sound (Applications do not need to support this, PulseAudio is capable of doing this without applications detecting that it has happened)
- A command-line interface with scripting capabilities
- A sound daemon with command line reconfiguration capabilities
- Built-in sample conversion and resampling capabilities
- The ability to combine multiple sound cards into one
- The ability to synchronize multiple playback streams
- Bluetooth audio device support with dynamic detection capabilities
- The ability to enable system wide equalization
Adoption
PulseAudio first appeared for regular users in Fedora Linux, starting with version 8,{{cite web |title=LPC: Linux audio: it's a mess [LWN.net] |url=https://lwn.net/Articles/299211/ |access-date=11 July 2019 |date=September 18, 2008}} then was adopted by major Linux distributions such as Ubuntu, Debian,{{citation |url = https://wiki.debian.org/en/PulseAudio |title = PulseAudio |publisher = Debian |format = wiki |access-date = 9 November 2013 |archive-url = https://web.archive.org/web/20131109124458/https://wiki.debian.org/en/PulseAudio |archive-date = 9 November 2013 |url-status = dead }} 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{{citation |url = http://www.techworld.com.au/article/320807/open_source_identity_pulseaudio_creator_lennart_poettering |title = Open source identity: PulseAudio creator Lennart Poettering |work=TechWorld |date=8 October 2009}} 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=
- The PortAudio API was incompatible with PulseAudio's design and needed to be modified.{{cite web|last1=Poettering|first1=Lennart|title=Writing a PortAudio driver|url=http://git.net/ml/audio.portaudio.devel/2004-10/threads.html|website=audio.portaudio.devel|publisher=git.net|access-date=28 February 2017|language=en|date=25 September 2004}} Almost all packages using OSS and many of the packages using ALSA needed to be modified to support PulseAudio.{{cite web|last1=Poettering|first1=Lennart|title=PulseAudio is now enabled by default on new Fedora installs|url=https://www.redhat.com/archives/fedora-devel-list/2007-August/msg01196.html|website=Fedora Development ML|publisher=Red Hat|access-date=1 March 2017}} Further development of the glitch-free audio feature required a complete rewrite of the PulseAudio core, and also changes to the ALSA API and internals were needed.{{cite web|title=Features: Glitch-free Audio|url=https://fedoraproject.org/wiki/Features/GlitchFreeAudio|website=Fedora Project Wiki|access-date=28 February 2017|language=en}}{{cite web|last1=Poettering|first1=Lennart|title=Alsa Issues|url=http://pulseaudio.org/wiki/AlsaIssues|website=PulseAudio - Trac|access-date=28 February 2017|archive-url=https://web.archive.org/web/20081016070622/http://pulseaudio.org/wiki/AlsaIssues|archive-date=16 October 2008}}
- When first adopted by distributions, PulseAudio developer Lennart Poettering (also the creator of systemd) described it as "the software that currently breaks your audio".{{citation |url=https://lwn.net/Articles/299211/ |title=LPC: Linux audio: it's a mess |archive-url=https://web.archive.org/web/20090901150150/http://lwn.net/Articles/299211/ |archive-date=1 September 2009 |publisher=LWN |date=18 September 2008 |access-date=3 July 2009 |url-status=live |df=dmy-all }} Poettering later claimed that "Ubuntu didn't exactly do a stellar job. They didn't do their homework" in adopting PulseAudio{{citation |url=http://0pointer.de/blog/projects/jeffrey-stedfast.html |title=PulseAudio FUD |author=Lennart Poettering |archive-url=https://web.archive.org/web/20090902040308/http://0pointer.de/blog/projects/jeffrey-stedfast.html |archive-date=2 September 2009 |publisher=0pointer.de |date=18 July 2008 |access-date=30 December 2009 |url-status=live |df=dmy-all }} for Ubuntu "Hardy Heron" (8.04), a problem that was improved with subsequent Ubuntu releases.{{citation |url=http://ubuntuforums.org/showthread.php?t=789578 |title=How-to: PulseAudio Fixes & System-Wide Equalizer Support |date=10 May 2008 |publisher=Ubuntu Forums |access-date=18 October 2009 |archive-url=https://web.archive.org/web/20100301151732/http://ubuntuforums.org/showthread.php?t=789578 |archive-date=1 March 2010 |url-status=live |df=dmy-all }} However, in October 2009, Poettering reported that he was still not happy with Ubuntu's integration of PulseAudio.{{citation |url = http://0pointer.de/blog/projects/pa-in-ubuntu.html |title=I'll Break Your Audio |publisher=Lennart Poettering Blog |date=19 October 2009 |access-date=26 December 2009}}
- Interaction with old sound components by particular software: Certain programs, such as Adobe Flash for Linux, caused instability in PulseAudio.{{citation |url=http://ubuntuforums.org/showthread.php?t=772632 |title=No sound after running Flash, YouTube, etc. (pulseaudio solution) |publisher=Ubuntu Forums |access-date=18 October 2009 |archive-url=https://web.archive.org/web/20120229214151/http://ubuntuforums.org/showthread.php?t=772632 |archive-date=29 February 2012 |url-status=live |df=dmy-all }}{{citation |url=https://wiki.ubuntu.com/PulseAudio |title=PulseAudio |publisher=Ubuntu Wiki |access-date=18 October 2009 |archive-url=https://web.archive.org/web/20110225154719/https://wiki.ubuntu.com/PulseAudio |archive-date=25 February 2011 |url-status=live |df=dmy-all }} Newer implementations of Flash plugins do not require the conflicting elements, and as a result Flash and PulseAudio are now compatible.
- Early management of buffer over/underruns: Earlier versions of PulseAudio sometimes started to distort the processed audio due to incorrect handling of buffer over/underruns.{{cite web|title=Over-optimistic buffering in PulseAudio causes underruns (audible stuttering, pops)|url=https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/190754|work=Launchpad|date=10 February 2008 |access-date=9 November 2013}}
- For headphone users, the potential for noise-induced hearing loss due to extremely loud volumes in the event of a misbehaving application.{{cite web |title=46466 - PulseAudio needs a way for the user to set inviolable maximum volume |url=https://bugs.freedesktop.org/show_bug.cgi?id=46466 |website=Bugzilla |access-date=6 October 2021}}{{cite web |title=[SOLVED] disabling pulseaudio - Page 3 |url=https://www.linuxquestions.org/questions/slackware-14/disabling-pulseaudio-4175563797/page3.html |website=Linux Questions |access-date=6 October 2021}}{{cite web |title=Bug #410948 'Volume too loud' : Bugs : pulseaudio package |url=https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/410948 |website=Ubuntu |date=9 August 2009 |access-date=6 October 2021}}{{cite web |title=#837637 - Audio settings often reset to 100% Volume |url=https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837637#25 |website=Debian Bug report logs |access-date=6 October 2021}}
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.See “Loadable Modules.” Modules, Freedesktop.org, https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#index9h2, retrieved August 28, 2019
PipeWire is an audio and video server that "aims to support the use cases currently handled by both PulseAudio and Jack".{{Cite web|url=https://pipewire.org/|title=PipeWire|website=pipewire.org}}{{Cite web|url=https://blogs.gnome.org/uraeus/2019/06/24/on-the-road-to-fedora-workstation-31/|title=On the Road to Fedora Workstation 31 — Christian F.K. Schaller|date=24 June 2019 }}
=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.
- ALSA provides a software mixer called dmix, which was developed prior to PulseAudio. This is available on almost all Linux distributions and is a simpler PCM audio mixing solution. It does not provide the advanced features (such as timer-based scheduling and network audio) of PulseAudio. On the other hand, ALSA offers, when combined with corresponding sound cards and software, low latencies.
- OSS was the original sound system used in Linux and other Unix operating systems, but was deprecated after the 2.5 Linux kernel.{{citation |url=http://archive09.linux.com/articles/113775 |title=An introduction to Linux sound systems and APIs |date=9 August 2004 |publisher=Linux.com |quote=OSS is available not only for Linux but also for BSD OSes and other Unixes. That may be its only advantage, because this system is not very powerful and was officially replaced by ALSA in 2.5 kernels... |access-date=23 March 2013 |archive-url=https://web.archive.org/web/20141019000257/http://archive09.linux.com/articles/113775 |archive-date=19 October 2014 |url-status=dead }} Proprietary development was continued by 4Front Technologies, who in July 2007 released sources for OSS under CDDL-1.0 for OpenSolaris and under GPL-2.0-only for Linux.{{citation | url= http://www.linuxpr.com/releases/9766.html | archive-url= https://web.archive.org/web/20071008104426/http://www.linuxpr.com/releases/9766.html | url-status= usurped | archive-date= 8 October 2007 | title= 4Front technologies releases the source code for open sound system |publisher= Linux PR | date= 14 June 2007 | access-date = 8 January 2012}}. The modern implementation, Open Sound System v4, provides software mixing, resampling, and changing of the volume on a per-application basis; in contrast to PulseAudio, these features are implemented within the kernel. PulseAudio support in OpenIndiana and other illumos distributions relies on the in-kernel OSS implementation ("Boomer").
See also
{{Portal|Free and open-source software}}
References
{{Reflist|30em}}
External links
{{Commons category}}
- {{Official website}}
{{Freedesktop.org}}
{{Use dmy dates|date=March 2017}}
{{DEFAULTSORT:Pulseaudio}}
Category:Audio software for Linux
Category:Free software programmed in C
Category:Software using the GNU Lesser General Public License