Tuesday, May 6, 2008

Sound problems in Hardy? Multiple sources not working?

Hardy now uses Pulseaudio as the default sound backend in Gnome. Though this is a good development (esd wasn't maintained anymore, various apps use different sound backends), this also creates a lot of problems.

For me, the situation was as follows: I have an Intel HDA sound chip on my mainboard. Very low tech by today's standards, but otherwise works fine. My sound setup was the default as I had done a fresh install Hardy. This gave me a sound setup that either work for Pulseaudio (which is a drop-in for esd), so I had Rhythmbox working, or worked for Firefox (Flash), depending on which I started first. That sucks. Sometimes you want both at the same time, or just pause on to run the other, not closing it completely.

I think I have that working now pretty well. This is how it goes:

  1. First, install some extras: libflashsupport, libasound2-plugins and libsdl1.2debian-pulseaudio. These are libs to support Pulseaudio for Adobe's Flash, for Alsa and for SDL. The SDL lib will replace the default Alsa backend for SDL. The Flash lib will need no extra configuration, but I hear this is notoriously instable. I haven't noticed this myself, but ymmv.
  2. Now either create a /etc/asound.conf file, or a .asoundrc in your home. I have both, but then again: I have been tinkering.
  3. This is what goes into your /etc/asound.conf:
    pcm.pulse {
    type pulse
    }
    ctl.pulse {
    type pulse
    }
    pcm.!default {
    type pulse
    }
    ctl.!default {
    type pulse
    }
  4. Then run "asoundconf set-pulseaudio" to fix up your personal Alsa configuration to redirect to Pulseaudio.
  5. Profit!
For me, this gives a situation in which Flash sound works, Rhythmbox works and Totem sound works. All at the same time. Good :) Again, ymmv, but it doesn't hurt to try this.

I know libaflashsupport was left out intentionally and that it is prone to destroying everything in a 5 mile radius rather frequently. But it hasn't done so for me yet, so for the moment, I'll settle for using it and having sound instead of not using it and not having sound :)

For more information, try reading through this bug.


5 comments:

yungchin said...

Gozert! Can't you get sound using the swfdec plugin? I think I like it better than Adobe's plugin - no problems with sound here.

PS: what's up with the word verification? I hate jumping through hoops just to leave a comment... you really want to have Akismet instead!

wzzrd said...

Using swfdec is an interesting option. I didn't know the project reached a usable status. Last time I tried it, it didn't really work yet: blank spaces where YouTube player should have been, Flash games not working and so on. Does it have Pulseaudio support built in?

And for the Akismet stuff: I don't think Blogger supports it natively, so that would mean hacking it in myself: no time, not going to happen ;-)

yungchin said...

Heh, have to admit I am completely ignorant as to what audio backend it uses. I'll see if I have trouble using swfdec concurrently with quodlibet or such...

As for Akismet: Wordpress has an excellent import function for Blogger blogs... ;)

yungchin said...

Just to follow up: same problem you're describing here also exists with swfdec, after all :(

wzzrd said...

You might consider reading my most recent post ;-)