PulseAudio is a networked sound server, similar in theory to the Enlightened Sound Daemon (EsounD). PulseAudio is however much more advanced and has numerous features.
A sound server can serve many functions:
- Software mixing of multiple audio streams, bypassing any restrictions the hardware has.
- Network transparency, allowing an application to play back or record audio on a different machine than the one it is running on.
- Sound API abstraction, alleviating the need for multiple backends in applications to handle the wide diversity of sound systems out there.
- Generic hardware abstraction, giving the possibility of doing things like individual volumes per application.
PulseAudio comes with many plugin modules. All audio from/to clients and audio interfaces goes through modules.
Manuel Amador created a diagram describing how the different parts of PulseAudio play together. (Not all modules are shown.) Another, simpler architecture diagram is attached to this page (scroll to the bottom).
PulseAudio clients can send audio to "sinks" and receive audio from "sources". A client can be GStreamer, xinelib, MPlayer or any other audio application. Only the device drivers/audio interfaces can be either sources or sinks (they are often hardware in- and out-puts).
OI-Hipster, PulseAudio-10.0 port:
→ /export/home/kmays$ uname -a
SunOS external 5.11 illumos-fd3bae1 i86pc i386 i86pc Solaris
→ /export/home/kmays$ /opt/pulseaudio-10.0/bin/pulseaudio --version
pulseaudio 10.0
→ /export/home/kmays$ /opt/pulseaudio-10.0/bin/pulseaudio --dump-modules
- module-allow-passthrough When a passthrough stream is requested, route all the other streams to a dummy device
- module-always-sink Always keeps at least one sink loaded even if it's a null one
- module-augment-properties Augment the property sets of streams with additional static information
- module-card-restore Automatically restore profile of cards
- module-cli Command line interface
- module-cli-protocol-tcp Command line interface protocol (TCP sockets)
- module-cli-protocol-unix Command line interface protocol (UNIX sockets)
- module-combine Compatibility module (module-combine rename)
- module-combine-sink Combine multiple sinks to one
- module-console-kit Create a client for each ConsoleKit session of this user
- module-dbus-protocol D-Bus interface
- module-default-device-restore Automatically restore the default sink and source
- module-detect Detect available audio hardware and load matching drivers
- module-device-manager Keep track of devices (and their descriptions) both past and present and prioritise by role
- module-device-restore Automatically restore the volume/mute state of devices
- module-echo-cancel Echo Cancellation
- module-filter-apply Load filter sinks automatically when needed
- module-filter-heuristics Detect when various filters are desirable
- module-http-protocol-tcp HTTP (TCP sockets)
- module-http-protocol-unix HTTP (UNIX sockets)
- module-intended-roles Automatically set device of streams based on intended roles of devices
- module-ladspa-sink Virtual LADSPA sink
- module-loopback Loopback from source to sink
- module-match Playback stream expression matching module
- module-native-protocol-fd Native protocol autospawn helper
- module-native-protocol-tcp Native protocol (TCP sockets)
- module-native-protocol-unix Native protocol (UNIX sockets)
- module-null-sink Clocked NULL sink
- module-null-source Clocked NULL source
- module-oss OSS Sink/Source
- module-pipe-sink UNIX pipe sink
- module-pipe-source UNIX pipe source
- module-position-event-sounds Position event sounds between L and R depending on the position on screen of the widget triggering them.
- module-raop-discover mDNS/DNS-SD Service Discovery of RAOP devices
- module-raop-sink RAOP Sink
- module-remap-sink Virtual channel remapping sink
- module-remap-source Virtual channel remapping source
- module-rescue-streams When a sink/source is removed, try to move its streams to the default sink/source
- module-role-cork Mute & cork streams with certain roles while others exist
- module-role-ducking Apply a ducking effect based on streams roles
- module-rtp-recv Receive data from a network via RTP/SAP/SDP
- module-rtp-send Read data from source and send it to the network via RTP/SAP/SDP
- module-rygel-media-server UPnP MediaServer Plugin for Rygel
- module-simple-protocol-tcp Simple protocol (TCP sockets)
- module-simple-protocol-unix Simple protocol (UNIX sockets)
- module-sine Sine wave generator
- module-sine-source Sine wave generator source
- module-solaris Solaris Sink/Source
- module-stream-restore Automatically restore the volume/mute/device state of streams
- module-suspend-on-idle When a sink/source is idle for too long, suspend it
- module-switch-on-connect When a sink/source is added, switch to it or conditionally switch to it
- module-switch-on-port-available n/a
- module-tunnel-sink Tunnel module for sinks
- module-tunnel-sink-new Create a network sink which connects via a stream to a remote PulseAudio server
- module-tunnel-source Tunnel module for sources
- module-tunnel-source-new Create a network source which connects via a stream to a remote PulseAudio server
- module-virtual-sink Virtual sink
- module-virtual-source Virtual source
- module-virtual-surround-sink Virtual surround sink
- module-volume-restore Compatibility module
- module-x11-bell X11 bell interceptor
- module-x11-cork-request Synthesize X11 media key events when cork/uncork is requested
- module-x11-publish X11 credential publisher
- module-x11-xsmp X11 session management
- module-zeroconf-discover mDNS/DNS-SD Service Discovery
- module-zeroconf-publish mDNS/DNS-SD Service Publisher
→ /opt/pulseaudio-10.0/bin/pulseaudio --dump-resample-methods
- trivial
- speex-float-0
- speex-float-1
- speex-float-2
- speex-float-3
- speex-float-4
- speex-float-5
- speex-float-6
- speex-float-7
- speex-float-8
- speex-float-9
- speex-float-10
- speex-fixed-0
- speex-fixed-1
- speex-fixed-2
- speex-fixed-3
- speex-fixed-4
- speex-fixed-5
- speex-fixed-6
- speex-fixed-7
- speex-fixed-8
- speex-fixed-9
- speex-fixed-10
- ffmpeg
- auto
- copy
- peaks
Troubleshooting
After an update, the PulseAudio daemon may fail to start, for example:
$ uname -rosv
SunOS 5.11 illumos-63982b82e6 Solaris
$ pkg info pulseaudio
Name: library/audio/pulseaudio
Summary: Sample Rate Converter for audio
Category: System/Multimedia Libraries
State: Installed
Publisher: openindiana.org
Version: 10.0
Branch: 2017.0.0.0
Packaging Date: Sun Apr 23 08:35:43 2017
Size: 12.60 MB
FMRI: pkg://openindiana.org/library/audio/pulseaudio@10.0-2017.0.0.0:20170423T083543Z
Project URL: http://www.freedesktop.org/wiki/Software/PulseAudio/
Source URL: http://freedesktop.org/software/pulseaudio/releases/pulseaudio-10.0.tar.gz
From syslog:
[2017-04-25 14:59:10] xxx pulseaudio[2731]: [ID 295310 user.error] [solaris] sink.c: Assertion '!pa_thread_mq_get()' failed at pulsecore/sink.c:2229, function pa_sink_set_mute(). Aborting.
[2017-04-25 14:59:10] xxx genunix: [ID 603404 kern.notice] NOTICE: core_log: pulseaudio[2731] core dumped: /export/tmp/cores/core.pulseaudio.2731
and you see no elements in mate-volume-control-applet preferences (see ticket: https://www.illumos.org/issues/8110).
This is usually due to regressions in PulseAudio for handling modules and configuration databases: the only known workaround is to make sure the configuration files match the default Hipster files and remove the configuration in the user's home directory. Similar issues have been reported in Linux distributions.