PulseAudio-17.0

#### Beyond Linux® From Scratch (System V Edition) - Version r13.1-84

### Chapter 42. Multimedia Libraries and Drivers

- Prev

  Pipewire-1.6.8

- Next

  SBC-2.2

- Up
- Home

# 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. Operations such as 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.

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

### Package Information

- Download (HTTP): https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-17.0.tar.xz

- Download MD5 sum: c4a3596a26ff4b9dcd0c394dd1d4f8ee

- Download size: 1.5 MB

- Estimated disk space required: 42 MB (with tests)

- Estimated build time: 0.2 SBU (Using parallelism=4; add 0.2 SBU for tests)

### PulseAudio Dependencies

#### Required

libsndfile-1.2.2

#### Recommended

alsa-lib-1.2.16.1, dbus-1.16.2, elogind-257.16, GLib-2.88.3, Speex-1.2.1, XML-Parser-2.59, and Xorg Libraries

#### Optional

Avahi-0.9-rc5, BlueZ-5.87, Doxygen-1.18.0 (for documentation), fftw-3.3.11, gst-plugins-base-1.28.6, GTK-3.24.52, libsamplerate-0.2.2, SBC-2.2 (Bluetooth support), Valgrind-3.27.1, check (for testing), JACK, libasyncns, LIRC, ORC, soxr, TDB, and WebRTC AudioProcessing

## Installation of PulseAudio

### Note

If you intend to use pipewire-1.6.8 as the sound system instead of PulseAudio, you can pass the `-D daemon=false` option to only build the support libraries of this package. If so, those libraries will require Wireplumber-0.5.17 installed and `pipewire-pulse.socket` enabled to be really functional.

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  \
                -D tests=false      \
                ..                  &&
    ninja

To test the results, issue: ninja test. Only the shipped XML files are validated because other tests need Check that we've removed from LFS.

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

### Note

If you have installed Wireplumber-0.5.17, make sure to follow the commands to disable the Pulseaudio server to prevent conflicts with Pipewire.

## 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-1.16.2 and SBC-2.2 are both installed but BlueZ-5.87 is not installed. Remove this if you have installed all three packages.

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

`-D tests=false`: This allows the package to compile if Check is not installed. We've removed Check from LFS.

`-D man=false`: This option disables generating man pages. Use this option if you have not installed XML-Parser-2.59.

## 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 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, which allows 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-3.3.11 at build time)
start-pulseaudio-x11 | starts PulseAudio and registers it to the X11 session manager

- Prev

  Pipewire-1.6.8

- Next

  SBC-2.2

- Up
- Home