Created 19/3/2008
Pulse Audio, the replacement for ALSA (Advanced Linux Sound Architecture), adopted as the preferred sound driver and sound hardware management for Fedora Core since FC8. The Pulse Audio project is maintained at pulseaudio.org, see also, the wikipedia:PulseAudio entry. PulseAudio is a sound server, which like the ALSA driver, runs as a daemon process. The main advantage to PulseAudio is that multiple applications can communicate with the sound hardware at the same time. For example a browser might be running an audio clip and an mp3 application might also be playing something. In ALSA and previous sound drivers, multi-application use like this would cause the second app to block, until the application currently using the hardware had released the resource.
Tip: See section 6 on troubleshooting
Pulse Audio is installed with Fedora Core, but this does not include many of the UI and extra tools that are well worth installing. There are several useful UI's that control the Pulse Audio environment, ranging from Volume Control to Device Configuration and Selection. The following list should be installed along with the Pluse Audio libraries. All of the tools and UI's can be installed via yum or compiled from source.
Refer to the Pulse Audio wiki wiki:PerfectSetup for a complete list of the Pulse Audio UI and tools and also for notes and tips on Pulse Audio configuration. The source for these tools is available from 0pointer.de (lennart/projects):
Current GNOME versions have support for starting ESD on session startup. Because PulseAudio can be used as drop-in replacement for ESD you can fool GNOME to load the PulseAudio daemon just like the traditional ESD daemon. To achieve this use the esdcompat script shipped with PulseAudio. Create a symlink from /usr/bin/esd to this script:
bash # ln -sf /usr/local/bin/esdcompat /usr/bin/esd
That's it. Now GNOME should load and make use of PulseAudio automatically on each login. (unless of course you disabled the option "Enable software sound mixing (ESD)" in GNOME's Sound Preferences. Make sure to follow instructions for GStreamer and ESOUND applications to get perfect user experience on GNOME.
Applications using the modern GStreamer media framework such as Rhythmbox or Totem can make use of the PulseAudio through gst-pulse, our PulseAudio plugin for GStreamer. After installing it, you have to enable it as default audio sink and source for all GNOME applications by changing the GConf keys /system/gstreamer/0.10/default/audiosink and /system/gstreamer/0.10/default/audiosrc:
bash $ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosink pulsesink bash $ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosrc pulsesrc
PulseAudio support is included in the current SVN version of MPlayer
bash $ svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
Make it the default by changing the line starting with ao= in /etc/mplayer/mplayer.conf:
... ao=pulse ...
Alternatively you can pass the audio driver name on MPlayer's command line:
bash $ mplayer -ao pulse movie.avi
MPlayer also works with the pulseaudio alsa plugin as configured above. To get volume control working, configure MPlayer to use alsa instead of OSS in mplayer.conf:
mixer=hw:0
The mplayerplug-in is a browser plugin that uses mplayer to play digital media from websites. In terms of mozilla browsers, like firefox, the mplayerplugin-in works only with the 32-bit version. It is configured in the same manner as the regular mplayer, except that the configuration file is $HOME/.mplayer/mplayerplug-in.conf. Also, it is not possible to pass the audio driver name from the command line, since the plugins calls mplayer directly from the browser.
Note 1: firefox and mplayer for more information on configuring the mplayerplug-in.
Note 2: The mplayerplugin-in is now not recommended as a browser audio plugin. Use gecko-mediaplayer intead
The ALSA subsystem can be configured to run over Pulse Audio. Since FC8, this in fact is the default configuration and is specified by the alsa configuration file pulse-default.conf. To disable ALSA through Pluse Audio, simple rename (or remove) the file /etc/alsa/pulse-default.conf. E.g.,
bash # mv /etc/alsa/pulse-default.conf /etc/alsa/pulse-default.conf__DISABLED
Getting Pulseaudio to work smoothly can be pretty frustrating. Often, the PulseAudio Manager (pamanager) will report no connectivity and then complain with Connection refused when the user attempts to Connect. Two obvious causes of this problem are:
Pulse Audio is located at pulseaudio.org. This site also contains a wiki, of which the wiki:PerfectSetup page contrains distribution independent information on configuring Pulse Audio. The PerfectSetup also pointers to UI's and extras for managing a Pulse Audio environment. The local document sound-linux has notes and information on configuring audio hardware in Linux. In addition, Troubleshooting wiki is also useful.
Stuart Moorfoot © 19 March 2008 foo@bund.com.au