PulseAudio

Differences between revisions 1 and 14 (spanning 13 versions)
Revision 1 as of 2007-12-08 14:50:54
Size: 4500
Editor: c-24-6-134-7
Comment:
Revision 14 as of 2008-04-29 16:14:47
Size: 6225
Editor: host-92-3-241-150
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
It's a drop in replacement for EsounD. It's a drop in replacement for EsounD. PulseAudio is the standard sound server in Ubuntu Hardy Heron 8.04.
Line 16: Line 16:
{{{
Line 18: Line 18:
}}}
Line 25: Line 25:

sudo gedit /etc/asound.conf
{{{
gksudo gedit /etc/asound.conf
}}}
Line 34: Line 34:
{{{
Line 35: Line 36:
type pulse     type pulse
Line 38: Line 39:
type pulse     type pulse
Line 41: Line 42:
type pulse     type pulse
Line 44: Line 45:
type pulse     type pulse
Line 46: Line 47:
}}}
Line 67: Line 68:
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)
    * 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)
Line 76: Line 77:
Reboot your machine to enable the PulseAudio server.     * Restart the current session with Ctrl + Alt + Backspace to enable pulseaudio (Save any work 1st)
Line 78: Line 79:
== Using PulseAudio ==

One of the most notable new features of PulseAudio is the ability to change the volume of applications interdependently, this can be accessed to by the program pavuconrol (you may want to add a launcher for it to your panel).
Line 87: Line 91:
To disable pulseaudio in hardy you need to select alsa for for all options in /system/preferences/sound
Line 94: Line 100:
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. '''Update:''' libflashsupport is available in Hardy as a package via the synaptic package manager.

Go to logicalnetworking.net to download the libflashsupport .deb and install it:

{{{
wget http://logicalnetworking.net/other/libflashsupport_1.0~2219-1_i386.deb
}}}
Line 97: Line 109:

- OR -

Instead I found the files http://pulseaudio.vdbonline.net/flashplugin-nonfree-pulse_0.1~000.tar.gz and http://pulseaudio.vdbonline.net/flashplugin-nonfree-pulse_0.1~000.dsc. --akaihola

'''Note:''' You can download and compile it by doing:

{{{
wget http://pulseaudio.vdbonline.net/flashplugin-nonfree-pulse_0.1~000.tar.gz
tar xvfz flashplugin-nonfree-pulse_0.1~000.tar.gz
cd flashplugin-nonfree-pulse-0.1~000
sudo apt-get install libpulse-dev
make
sudo make install
}}}

'''Note:''' For Hardy64 users:
{{{
http://ubuntuforums.org/showpost.php?p=4350045&postcount=12
}}}
Line 104: Line 136:

sudo gedit /etc/firestarter/user-pre
{{{
gksudo gedit /etc/firestarter/user-pre
}}}
Line 108: Line 140:
{{{
Line 111: Line 143:
}}}
Line 113: Line 145:
{{{
Line 115: Line 147:
}}}
Line 119: Line 151:
Kamilion initially wrote this wikipage on Dec-08-2007. Kamilion initially wrote this wikipage on Dec-08-2007 using information found through the following sources:
Line 124: Line 156:
! ! Note ! - As of 2008-02-10 the URL mentioned above, ghost.thewatch.org/2007/05/pulseaudio-in-ubuntu does not exist.
Line 126: Line 160:

akaihola added the note about broken Flash fix URL on 2008-02-03.

jerickson (Logical Networking Solutions) modified the libflashsupport .deb URL to point to a valid location on 2008-03-24.

twright added information on compiling flashplugin-nonfree-pulse and using pavucontrol

PulseAudio

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. PulseAudio is the standard sound server in Ubuntu Hardy Heron 8.04.

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.

ALSA Configuration

Now, type the following:

gksudo gedit /etc/asound.conf

This will open /etc/asound.conf in a Text Editor as the root user.

Normally on Ubuntu 7.10, this file will not exist, so we're creating it.

Paste in the following:

pcm.pulse {
    type pulse
}
ctl.pulse {
    type pulse
}
pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

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.

Save and exit Text Editor.

Adding Users to the PulseAudio groups

Next we go to System -> Administration -> and click on Users and Groups.

Click on Manage Groups, and scroll all the way to the bottom of the list where you will find:

  • pulse
  • pulse-access
  • pulse-rt

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)

Configuring PulseAudio

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)

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.

  • Restart the current session with Ctrl + Alt + Backspace to enable pulseaudio (Save any work 1st)

Using PulseAudio

One of the most notable new features of PulseAudio is the ability to change the volume of applications interdependently, this can be accessed to by the program pavuconrol (you may want to add a launcher for it to your panel).

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.

To disable pulseaudio in hardy you need to select alsa for for all options in /system/preferences/sound

Known Issues

Firefox/Flash and PulseAudio

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

Update: libflashsupport is available in Hardy as a package via the synaptic package manager.

Go to logicalnetworking.net to download the libflashsupport .deb and install it:

wget http://logicalnetworking.net/other/libflashsupport_1.0~2219-1_i386.deb

Restart Firefox to enable audio output from flash.

- OR -

Instead I found the files http://pulseaudio.vdbonline.net/flashplugin-nonfree-pulse_0.1~000.tar.gz and http://pulseaudio.vdbonline.net/flashplugin-nonfree-pulse_0.1~000.dsc. --akaihola

Note: You can download and compile it by doing:

wget http://pulseaudio.vdbonline.net/flashplugin-nonfree-pulse_0.1~000.tar.gz
tar xvfz flashplugin-nonfree-pulse_0.1~000.tar.gz
cd flashplugin-nonfree-pulse-0.1~000
sudo apt-get install libpulse-dev
make
sudo make install

Note: For Hardy64 users:

http://ubuntuforums.org/showpost.php?p=4350045&postcount=12

Firestarter & Avahi

If you have firestarter 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

Credits

Kamilion initially wrote this wikipage on Dec-08-2007 using information found through the following sources:

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

! ! Note ! - As of 2008-02-10 the URL mentioned above, ghost.thewatch.org/2007/05/pulseaudio-in-ubuntu does not exist.

varunus supplied the information on how to make Avahi work with Firestarter here: http://ubuntuforums.org/showthread.php?t=164193

akaihola added the note about broken Flash fix URL on 2008-02-03.

jerickson (Logical Networking Solutions) modified the libflashsupport .deb URL to point to a valid location on 2008-03-24.

twright added information on compiling flashplugin-nonfree-pulse and using pavucontrol

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