From LinuxReviews
Jump to navigationJump to search

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.


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

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

You will also want this if you are using a 5.1 surround setup:

default-sample-channels = 6
enable-lfe-remixing = no

But you may want

enable-lfe-remixing = yes

if you are using a stereo setup connected by RCA cables.

The above settings provide the following benefits:

  • default-sample-rate sets 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 = float32le sends higher quality samples to ALSA which in turn sends it to the actual audio card. You may not be able to use the better float32le option. Run the command pacmd list-sinks | grep sample to see what your card(s) actually support.
  • avoid-resampling will, if true, make PulseAudio switch between 48000 and 44100 audio output to the sound device 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. Setting this to false makes PulseAudio use the default-sample-rate even if it means re-sampling 441000 audio. This is the better choice you will be playing audio from different sources - and you will end up doing that from time to time.
  • resample-method sets the type of technology used for resampling. speex-float-10 provides 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-remixing refers to re-mixing audio channels. It is useful for remixing mono to stereo. It should be combined with remixing-use-all-sink-channels
  • remixing-use-all-sink-channels set to true or false decides if stereo should be up-mixed to all channels on a surround system. Setting this to no makes it possible to have enable-remixing set to yes and still have mono up-mixed to stereo.
  • enable-lfe-remixing refers to remixing of the sub-woofer channel. Modern surround receivers will typically have a built-in speaker setup where you can configure how many speakers you have. A surround receiver which knows there's 5 speakers and no subwoofer in a 5.1 setup (actually 5.0) will send the LFE sub-woofer channel to the front-speakers. enable-lfe-remixing=no may be the better option even if you have no sub-woofer. However, if you are connecting two stereo speakers by RCA then you may want to have pulseaudio convert LFE channel into a part of the stereo signal.

PulseAudio can do Audio over Network

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 via this content of /etc/pulse/system.pa:

load-module module-native-protocol-tcp auth-ip-acl=; auth-anonymous=1
load-module module-zeroconf-publish

The client(s) on the network would just need this in /etc/pulse/default.pa

load-module module-zeroconf-discover

A working zeroconf setup like Avahi is also required for automatic discovery.


in bash, pactl info and stat and list will not tell you much if your PA has crashed.

Add your comment
LinuxReviews welcomes all comments. If you do not want to be anonymous, register or log in. It is free.