PulseAudio-17.0

Introduction to PulseAudio

PulseAudio is a sound system for POSIX OSes, meaning that it is a proxy for sound applications. It allows you to do advanced operations on your sound data as it passes between your application and your hardware. Things like transferring the audio to a different machine, changing the sample format or channel count and mixing several sounds into one are easily achieved using a sound server.

PulseAudio Dependencies

Required

libsndfile-1.2.2 and Meson Toolchain Files (for lib32)

Recommended

Optional

Avahi, BlueZ, Doxygen (for documentation), fftw, GTK+-3, libsamplerate, SBC (Bluetooth support), Valgrind, JACK, libasyncns, LIRC, ORC, soxr, TDB, and WebRTC AudioProcessing

Installation of PulseAudio

Install PulseAudio by running the following commands:

mkdir build &&
cd    build &&

meson setup --prefix=/usr       \
            --buildtype=release \
            -D database=gdbm    \
            -D doxygen=false    \
            -D bluez5=disabled  \
            .. &&

ninja

To test the results, issue: ninja test. One test fails if the tests are not run as the root user, but this can be ignored.

Now, as the root user:

ninja install

Running PulseAudio as a system-wide daemon is possible but not recommended. See https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/ for more information. While still as the root user, remove the D-Bus configuration file for the system wide daemon to avoid creating unnecessary system users and groups:

rm /usr/share/dbus-1/system.d/pulseaudio-system.conf

32-bit Installation of PulseAudio

[Note]

Note

Check from LFS Multilib does not contain 32-bit instructions currently and this package depends on Check. Compile 32-bit Check by following the instructions below if you have not installed 32-bit Check if the directory is clean:

CC="gcc -m32" CXX="g++ -m32"         \
./configure --prefix=/usr            \
            --libdir=/usr/lib32      \
            --host=i686-pc-linux-gnu \
            --disable-static &&

make

Now as the root user:

make DESTDIR=$PWD/DESTDIR install     &&
cp -Rv DESTDIR/usr/lib32/* /usr/lib32 &&
rm -rf DESTDIR                        &&
ldconfig

First clean the build directory:

rm -rf *

Install lib32-PulseAudio by running the following commands:

meson setup --cross-file lib32       \
            --prefix=/usr            \
            --libdir=/usr/lib32      \
            --buildtype=release      \
            -D database=gdbm         \
            -D doxygen=false         \
            -D bluez5=disabled       \
            .. &&

ninja

Now, as the root user:

DESTDIR=$PWD/DESTDIR ninja install    &&
cp -vr DESTDIR/usr/lib32/* /usr/lib32 &&
rm -rf DESTDIR                        &&
ldconfig

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-D bluez5=disabled: This switch prevents a runtime error if dbus and SBC are both installed but BlueZ is not installed. Remove this if you have installed all three packages.

-D doxygen=false: This allows the package to compile if Doxygen is not installed. Remove this if you have installed this and wish to build the documentation.

Configuring PulseAudio

Config Files

There are system wide configuration files: /etc/pulse/daemon.conf, /etc/pulse/client.conf, /etc/pulse/default.pa, and user configuration files with the same names in ~/.config/pulse. User configuration files take precedence over system wide ones.

Configuration Information

You may have to configure the audio system. You can start pulseaudio in command line mode using pulseaudio -C and then list various information and change settings. See man pulse-cli-syntax.

If you did not build this package with elogind-255.5 support, you will also need to add any non-root users to the audio group as the root user:

usermod -a -G audio <username>

If pulseaudio was working but you no-longer have sound, after checking for hardware issues (speakers or headphones not connected, external amplifier not connected) you may need to fix it.

One suggestion is to close the application, such as firefox where sound has stopped working, then run: pactl list short sinks followed by: pacmd set-default-sink <sink #> and then restart the application.

If that does not work, a more drastic approach often works. After closing the application, close pulseaudio, either using pulseaudio --kill or, if that fails, killall -KILL pulseaudio and then rm -rf ~/.config/pulse/* (and perhaps also rm -rf ~/.pulse/* if you have used a very old version of pulse on this machine), then run pulseaudio --verbose to restart it. If the daemon starts, restart the application. See man pulseaudio for more options.

Contents

Installed Programs: pacat, pacmd, pactl, padsp, pamon (symlink to pacat), paplay (symlink to pacat), parec (symlink to pacat), parecord (symlink to pacat), qpaeq, pasuspender, pax11publish, pulseaudio, and start-pulseaudio-x11
Installed Libraries: libpulse.so, libpulse-mainloop-glib.so, libpulse-simple.so, libpulsecommon-17.0.so, libpulsecore-17.0.so, and libpulsedsp.so
Installed Directories: /etc/pulse, /usr/include/pulse, /usr/lib/cmake/PulseAudio, /usr/lib/{pulseaudio,pulse-17.0}, /usr/libexec/pulse, and /usr/share/pulseaudio

Short Descriptions

pacat

plays back or records raw or encoded audio streams on a PulseAudio sound server

pacmd

is a tool used to reconfigure a PulseAudio sound server during runtime

pactl

is used to control a running PulseAudio sound server

padsp

is the PulseAudio OSS Wrapper

pamon

is a symbolic link to pacat

paplay

is used to play audio files on a PulseAudio sound server

parec

is a symbolic link to pacat

parecord

is a symbolic link to pacat

pasuspender

is a tool that can be used to tell a local PulseAudio sound server to temporarily suspend access to the audio devices, to allow other applications to access them directly

pax11publish

is the PulseAudio X11 Credential Utility

pa-info

is a shell script that prints various information relating to the Pulseaudio server currently in use

pulseaudio

is a networked low-latency sound server for Linux

qpaeq

is an equalizer interface for PulseAudio equalizer sinks (Requires fftw at build time)

start-pulseaudio-x11

starts PulseAudio and registers it to the X11 session manager