PulseAudio: Difference between revisions

From Alpine Linux
No edit summary
(add Bluetooth instructions from Bluetooth_audio)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Note|[[PipeWire]] is becoming a PulseAudio replacement, consider migrating.}}
{{Note|[[PipeWire]] is a PulseAudio replacement, consider migrating.}}


== Installation ==
== Installation ==


apk add pulseaudio pulseaudio-alsa
{{Cmd|apk add pulseaudio pulseaudio-alsa}}


== Alsa only applications support ==
== Alsa only applications support ==
Line 9: Line 9:
Most applications on Alpine Linux are compiled to support only ALSA, foregoing linking against libpulse and the ability to dynamically switch to pulseaudio output when it finds that pulseaudio is running. Install the pulse output plugin for ALSA so applications can output to Pulseaudio.
Most applications on Alpine Linux are compiled to support only ALSA, foregoing linking against libpulse and the ability to dynamically switch to pulseaudio output when it finds that pulseaudio is running. Install the pulse output plugin for ALSA so applications can output to Pulseaudio.


apk add alsa-plugins-pulse
{{Cmd|apk add alsa-plugins-pulse}}
 
== Bluetooth ==
 
Before you can connect your device to Bluetooth speakers or headphones, you'll have to make sure {{Pkg|pulseaudio-bluez}} is installed. See the [[Bluetooth]] page for more general Bluetooth installation instructions.
 
{{Cmd|apk add pulseaudio-bluez}}


== Process Priority ==
== Process Priority ==
Line 15: Line 21:
Pulseaudio should run with an elevated priority, because e.g. crackling or delayed audio is more annoying than a low framerate in games.
Pulseaudio should run with an elevated priority, because e.g. crackling or delayed audio is more annoying than a low framerate in games.


Installing the shadow package (which is compiled against linux-pam) is an easy way for the non-root user to be granted the ability to change niceness, and pulseaudio is recommended to be run as the user, rather than as root. E.g. in /etc/security/limits.d/audio.conf (and putting the user in the "audio" group):
Installing the shadow package (which is compiled against linux-pam) is an easy way for the non-root user to be granted the ability to change niceness, and pulseaudio is recommended to be run as the user, rather than as root. E.g. in {{Path|/etc/security/limits.d/audio.conf}} (and putting the user in the "audio" group):


  @audio - nice -11
  @audio - nice -11


== See also ==
* [https://wiki.archlinux.org/title/PulseAudio Arch wiki]
* [https://wiki.gentoo.org/wiki/PulseAudio Gentoo wiki]
* [https://wiki.gentoo.org/wiki/PulseAudio#Without_udev_or_systemd Gentoo wiki - pipewire without udev]
* [https://wiki.postmarketos.org/wiki/Audio PostmarketOS Wiki - Audio]


[[category:Multimedia]]
[[category:Multimedia]]
[[Category:Sound]]
[[Category:Sound]]

Latest revision as of 09:26, 10 November 2023

Note: PipeWire is a PulseAudio replacement, consider migrating.

Installation

apk add pulseaudio pulseaudio-alsa

Alsa only applications support

Most applications on Alpine Linux are compiled to support only ALSA, foregoing linking against libpulse and the ability to dynamically switch to pulseaudio output when it finds that pulseaudio is running. Install the pulse output plugin for ALSA so applications can output to Pulseaudio.

apk add alsa-plugins-pulse

Bluetooth

Before you can connect your device to Bluetooth speakers or headphones, you'll have to make sure pulseaudio-bluez is installed. See the Bluetooth page for more general Bluetooth installation instructions.

apk add pulseaudio-bluez

Process Priority

Pulseaudio should run with an elevated priority, because e.g. crackling or delayed audio is more annoying than a low framerate in games.

Installing the shadow package (which is compiled against linux-pam) is an easy way for the non-root user to be granted the ability to change niceness, and pulseaudio is recommended to be run as the user, rather than as root. E.g. in /etc/security/limits.d/audio.conf (and putting the user in the "audio" group):

@audio - nice -11

See also