PulseAudio is a standard audio stack used by as good as all Linux distributions. It places itself between end-user software and the kernels ALSA audio stack. It can be used for mixing, per-application volume control and network audio. It has a history of criticism for it's high CPU use and many, many bugs. Most of this was valid from it's creation in 2004 to about 2014. Modern versions are fine and quite useful.
History[edit | edit source]
PulseAudio was in 2012 described as:
"Pulse is the single worst Linux move I've ever seen. In the interest of removing audio from the kernel space (necessary for low-latency), it simply eliminated what used to be advanced capabilities. Lennart Poettering, author of Pulse simply disregarded these concerns, waved his hands and said "that's not the concerns Pulse was designed to address!"
Configuration example for (placebo) better audio[edit | edit source]
PulseAudio is system-wide configured by
/etc/pulse/daemon.conf and this has some settings which may affect audio quality.
These settings may be of interest:
default-sample-rate = 48000 default-sample-format = float32le resample-method = speex-float-10 avoid-resampling = false enable-remixing = yes remixing-use-all-sink-channels = no enable-lfe-remixing = no
You will also want this if you are using a 5.1 surround setup:
default-sample-channels = 6
The above settings provide the following benefits:
default-sample-ratesets the default sample-rate used by PulseAudio. Modern digital audio equipment can usually handle 48000 just fine. Using 96000 would also be fine.
default-sample-format = float32lesends higher quality samples to ALSA which in turn sends it to the actual audio card. You may not be able to use the better
float32leoption. Run the command
pacmd list-sinks | grep sampleto see what your card(s) actually support.
avoid-resamplingmeans PulseAudio will use the
default-sample-rateeven if it means re-sampling 441000 audio. The alternative is to have PulseAudio switch between 48000 and 44100 depending on what is being played. This has historically been buggy and problematic when playing say 44100 music in the background and opening a video file that's 48000.
resample-methodsets the type of technology used for resampling.
speex-float-10provides better quality than say
speex-float-2- higher values produce better quality and consume more CPU, lower values have lower quality and consume less CPU. The difference in CPU power required to re-sample audio mattered in 2005. Perhaps it meant something in 2010. It's irrelevant on modern machines.
enable-remixingrefers to re-mixing audio channels. It is useful for remixing mono to stereo. It should be combined with
remixing-use-all-sink-channelsset to true or false decides if stereo should be up-mixed to all channels on a surround system. Setting this to
nomakes it possible to have
enable-remixingset to yes and still have mono up-mixed to stereo.
enable-lfe-remixingrefers to the sub-woofer channel.
PulseAudio can do Network Audi o[edit | edit source]
A dedicated machine next to a nice HI-FI surround receiver can run PulseAudio with the following in
/etc/pulse/system.pa if PulseAudio is started as a system user - or
/etc/pulse/default.pa if you start it as a user for some reason - and allow other machines to use it to output audio:
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;10.66.78.0/24 auth-anonymous=1 load-module module-zeroconf-publish
The client(s) on the network would just need this in
A working zeroconf setup like Avahi is also required for automatic discovery.