# PulseAudio
PulseAudio is a network-capable sound server for [[Linux]] and other [[POSIX]]-compliant operating systems. Created by [[Lennart Poettering]] in 2004, it acts as an intermediary layer between applications and audio hardware, sitting on top of lower-level audio frameworks like ALSA. PulseAudio became the default sound server on most major Linux distributions starting around 2008-2009, replacing direct ALSA usage for desktop audio.
## Key Features
- **Per-application volume control**: Each audio stream can be independently adjusted
- **Automatic device switching**: Seamlessly moves audio between outputs (e.g., when headphones are plugged in)
- **Network audio**: Stream audio between machines over the network using native [[TCP IP|TCP]] or RTP
- **Hot-plug support**: Automatically detects and configures new audio devices
- **Module system**: Extensible architecture with loadable modules for different protocols and features
- **Mixing**: Combines multiple audio streams from different applications into a single output
## Architecture
PulseAudio uses a client-server model:
- **pulseaudio** (daemon): The sound server that manages audio routing and mixing
- **libpulse**: Client library used by applications to communicate with the server
- **pactl / pacmd**: Command-line tools for controlling the server
- **pavucontrol**: GTK-based graphical volume control
## Common Commands
```bash
# List audio sinks (outputs)
pactl list short sinks
# List audio sources (inputs)
pactl list short sources
# Set default output sink
pactl set-default-sink <sink_name>
# Adjust volume
pactl set-sink-volume @DEFAULT_SINK@ 80%
# Mute/unmute
pactl set-sink-mute @DEFAULT_SINK@ toggle
# List running audio streams
pactl list short sink-inputs
# Move a stream to a different output
pactl move-sink-input <stream_id> <sink_name>
```
## PulseAudio vs PipeWire
PipeWire is the modern replacement for PulseAudio, designed to handle both audio and video streams. It provides a PulseAudio compatibility layer (`pipewire-pulse`) so existing applications continue to work without modification. PipeWire offers lower latency, better Bluetooth audio codec support, and unified handling of consumer audio and professional (JACK) audio. Most major Linux distributions have transitioned or are transitioning from PulseAudio to PipeWire.
## References
- https://www.freedesktop.org/wiki/Software/PulseAudio/
- https://en.wikipedia.org/wiki/PulseAudio
## Related
- [[Lennart Poettering]]
- [[Linux]]
- [[systemd]]