PulseAudio

Differences between revisions 1 and 51 (spanning 50 versions)
Revision 1 as of 2007-12-08 14:50:54
Size: 4500
Editor: c-24-6-134-7
Comment:
Revision 51 as of 2019-08-09 07:30:56
Size: 3235
Editor: guiverc
Comment: it is now in all flavors, remove bad canonical url, Lubuntu now comes with pulseaudio too
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= PulseAudio = ||<tablestyle="float:right; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;">'''Contents'''<<BR>><<TableOfContents>>||
Line 3: Line 3:
PulseAudio is a sound server for POSIX and Win32 systems. A sound server is basically a proxy for your 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.

It's a drop in replacement for EsounD.

Here's how to install it, as of Dec-08-2007, on Ubuntu Gutsy Gibbon 7.10, with PulseAudio 0.9.6

== Installation ==

=== Installing PulseAudio ===

Open a Terminal window.

Type the following:

sudo apt-get install libasound2-plugins "pulseaudio-*" paman padevchooser paprefs pavucontrol pavumeter

This will install the ALSA Pulse plugin, the PulseAudio daemons and the PulseAudio tools.
[[http://www.pulseaudio.org|PulseAudio]] is a sound server for POSIX and Win32 systems. A sound server is basically a proxy for your 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.
Line 22: Line 6:
=== ALSA Configuration === = Installation =
Line 24: Line 8:
Now, type the following: Pulseaudio is already installed by default on Ubuntu and flavors.
Line 26: Line 10:
sudo gedit /etc/asound.conf TODO(?): document how to install pulseaudio on a fresh Lubuntu install.
Line 28: Line 12:
This will open /etc/asound.conf in a Text Editor as the root user. = PulseAudio Removal =
Line 30: Line 14:
Normally on Ubuntu 7.10, this file will not exist, so we're creating it. This is generally a bad idea.
Line 32: Line 16:
Paste in the following: = Using PulseAudio =
Line 34: Line 18:
pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}
For Ubuntu environments that use pulseaudio, Ubuntu has its own custom sound indicator that will allow you to select the preferred device and control the volume of each application. If you would prefer to try pulseaudio's generic control GUI, install the pavucontrol package and launch it with terminal command:
{{{
pavucontrol
}}}
Line 47: Line 23:
= Troubleshooting =
Line 48: Line 25:
The top two will create new output and input definitions for PulseAudio, and the bottom two will set PulseAudio as the default audio device for programs using the ALSA interface. == Resetting User Configuration ==
Line 50: Line 27:
Save and exit Text Editor. For some reason, pulseaudio's user configuration files can become corrupt(unsynced?) in some way, and deleting them (and forcing fresh ones to be generated) fixes a no sound condition. After using the command below, log out/in.
Line 52: Line 29:
=== Adding Users to the PulseAudio groups === === Ubuntu 12.10/Quantal (and earlier) ===
{{{
rm -r ~/.pulse*; pulseaudio -k
}}}
Line 54: Line 34:
Next we go to System -> Administration -> and click on Users and Groups. === Ubuntu 13.04/Raring (and later) ===
{{{
rm -r ~/.config/pulse; pulseaudio -k
}}}
Line 56: Line 39:
Click on Manage Groups, and scroll all the way to the bottom of the list where you will find: == Getting A Verbose Diagnostic Log ==
Line 58: Line 41:
    * pulse
    * pulse-access
    * pulse-rt
This log can aid bug reports. If possible, attach it to any bug report filed against pulseaudio or even to ALSA bug reports where pulseaudio is involved: https://wiki.ubuntu.com/PulseAudio/Log
Line 62: Line 43:
Make sure to highlight each, one at a time, and click Properties. Just put a check next to each user that you want to be able to have access to sound (for example, there's "ted" and "root" and "kamilion" listed, and you only want "kamilion" to have access to sound, that's the one to check, leave the other two blank) == Using A Lubuntu 16.04 (and older) LiveUSB/CD ==
Line 64: Line 45:
== Configuring PulseAudio == Because Lubuntu does not use pulseaudio, it can be useful in determining whether an audio issue is caused by pulseaudio, the ALSA driver, or another program. If the issue still occurs in a Lubuntu environment, pulseaudio is probably not causing it.
Line 66: Line 47:
Now, go into Applications -> Sound and Video -> click on PulseAudio Preferences.
Checkmark all three options under Network Access. This will allow other computers on your LAN with PulseAudio to access this computer's sound devices.
Checkmark Enable Multicast/RTP Receiver. This allows receiving multicast streams from other systems on your LAN.
Checkmark Enable Multicast/RTP Sender. This allows sending multicast streams (One source sends packets, all others may receive them simultaneously)
== Static, Underruns ==
Line 71: Line 49:
Leave the other options alone for now, unless you want to loop outgoing streams through the local speakers.

Next go into System -> Preferences -> Sound and make sure that Enable Software Sound Mixing is checked.
Also, under the Sounds Tab, I set devices to Autodetect.

Reboot your machine to enable the PulseAudio server.


== PulseAudio Removal ==

If you decide you no longer like PulseAudio and would like to disable it:
Remove the added lines to /etc/asound.conf
If /etc/asound.conf did not exist when you installed PulseAudio, you may remove /etc/asound.conf entirely.

After this, you may remove all of the installed PulseAudio packages.
https://wiki.ubuntu.com/Audio/PositionReporting
Line 90: Line 53:
== Firefox/Flash and PulseAudio ==

Be Default, libflashplugin (Flash 9 support in Firefox) doesn't work properly with PulseAudio.

Go to http://pulseaudio.vdbonline.net/libflashsupport/ and download the deb package (as of this posting) libflashsupport_1.0~2219-1_i386.deb (9kb) and install it.

Restart Firefox to enable audio output from flash.

Line 101: Line 55:
If you have firestarter installed, it *WILL* stop PulseAudio from properly communicating over Zeroconf/Avahi's port 5353. If you have firestarter firewall installed, it *WILL* stop PulseAudio from properly communicating over Zeroconf/Avahi's port 5353.
Line 104: Line 58:

sudo gedit /etc/firestarter/user-pre
{{{
gksudo gedit /etc/firestarter/user-pre
}}}
Line 108: Line 62:
{{{
Line 111: Line 65:
}}}
Then, save and close the file, and then type:
{{{
/etc/init.d/avahi-daemon restart
}}}
Line 112: Line 71:
Then, save and close the file, and then type: == Programs Using OpenSound/OSS output ==
Line 114: Line 73:
/etc/init.d/avahi-daemon restart


= Credits =

Kamilion initially wrote this wikipage on Dec-08-2007.

Ghost|BTFH supplied the initial Ubuntu howto for older Ubuntu versions and the libflashplugin fix in his blog, here:
http://ghost.thewatch.org/2007/05/pulseaudio-in-ubuntu.html

varunus supplied the information on how to make Avahi work with Firestarter here:
http://ubuntuforums.org/showthread.php?t=164193
You may run into applications that use OSS output (programs looking for /dev/dsp). Ubuntu no longer supports OSS natively, and you should try to switch the program's audio output to something better supported, like ALSA or esound/esd (which pulse emulates very well). If that's not possible, you can run the program using OSS emulation:
{{{
padsp <command_to_start_program>
}}}

PulseAudio is a sound server for POSIX and Win32 systems. A sound server is basically a proxy for your 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.

Installation

Pulseaudio is already installed by default on Ubuntu and flavors.

TODO(?): document how to install pulseaudio on a fresh Lubuntu install.

PulseAudio Removal

This is generally a bad idea.

Using PulseAudio

For Ubuntu environments that use pulseaudio, Ubuntu has its own custom sound indicator that will allow you to select the preferred device and control the volume of each application. If you would prefer to try pulseaudio's generic control GUI, install the pavucontrol package and launch it with terminal command:

pavucontrol

Troubleshooting

Resetting User Configuration

For some reason, pulseaudio's user configuration files can become corrupt(unsynced?) in some way, and deleting them (and forcing fresh ones to be generated) fixes a no sound condition. After using the command below, log out/in.

Ubuntu 12.10/Quantal (and earlier)

rm -r ~/.pulse*; pulseaudio -k

Ubuntu 13.04/Raring (and later)

rm -r ~/.config/pulse; pulseaudio -k

Getting A Verbose Diagnostic Log

This log can aid bug reports. If possible, attach it to any bug report filed against pulseaudio or even to ALSA bug reports where pulseaudio is involved: https://wiki.ubuntu.com/PulseAudio/Log

Using A Lubuntu 16.04 (and older) LiveUSB/CD

Because Lubuntu does not use pulseaudio, it can be useful in determining whether an audio issue is caused by pulseaudio, the ALSA driver, or another program. If the issue still occurs in a Lubuntu environment, pulseaudio is probably not causing it.

Static, Underruns

https://wiki.ubuntu.com/Audio/PositionReporting

Known Issues

Firestarter & Avahi

If you have firestarter firewall installed, it *WILL* stop PulseAudio from properly communicating over Zeroconf/Avahi's port 5353.

How to Fix:

gksudo gedit /etc/firestarter/user-pre

In the file, add the following lines:

$IPT -A INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
$IPT -A OUTPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT

Then, save and close the file, and then type:

/etc/init.d/avahi-daemon restart

Programs Using OpenSound/OSS output

You may run into applications that use OSS output (programs looking for /dev/dsp). Ubuntu no longer supports OSS natively, and you should try to switch the program's audio output to something better supported, like ALSA or esound/esd (which pulse emulates very well). If that's not possible, you can run the program using OSS emulation:

padsp <command_to_start_program>

PulseAudio (last edited 2021-06-16 11:56:57 by guiverc)