Wednesday, June 25, 2008

PulseAudio, Flash, and Firefox

After installing Hardy, I was having a variety of problems with sound as well as Flash. Apparently there is some conflict between Flash and PulseAudio. For example, I was only getting sound from the first application I launched. So if I had firefox open, it would have sound. But then if I then opened a second application like rhythmbox, exaile, etc, no sound from that. This also worked the opposite way. In addition, I was having a problem with Firefox crashing everytime flash was running on sites like youtube.

The following has worked for me:
1. Uninstall the following packages using synaptic: libflashsupport and flashplugin-nonfree
2. Install the following packages using synaptic: pulseaudio-module-hal pulseaudio-module-x11 libasound2 libasound2-plugins padevchooser swh-plugins libao-pulse ladspa-sdk libsdl1.2debian libsdl1.2debian-pulseaudio
3. Run the following command to edit the /etc/libao.conf file:
sudo gedit /etc/libao.conf
Edit the file so that it looks like this:
Then save and close the file
4. Run the following command to edit (or create if has not been) the asound.conf file:
sudo gedit /etc/asound.conf
Then add the following to the file:
pcm.pulse {
type pulse
ctl.pulse {
type pulse
pcm.!default {
type pulse
ctl.!default {
type pulse

Then save and close the file. This addition makes it so that all sound runs through pulse.
5. Go to System-->Preferences-->Sound and change the first four lines to "PulseAudio Sound Server"
6. To get flash working properly, we need to download the beta version of Flash 10. Download the deb package here. Then double click to install. To see other versions, check the site here.
7. Finally, reboot.

Sources: The (almost) Perfect Pulse Audio Setup and PulseAudio Fixes & System-Wide Equalizer Support (Hardy Heron)

No comments: