pulseaudio issues (vlc, flash)

Asked by Bogdan Butnaru

Hi! I've been trying to use pulseaudio for the last couple of weeks, and I keep having some trouble. (This is on Ubuntu Feisty, up to date.)

The used to be a bug with module-hal, but it's fixed now, as far as I can tell. It seems to work now. However PA Manager shows only an alsa_output sink and an alsa_output/alsa_input pair of sources; is it possible to get it to access the soundcard directly?

The main problem is that I couldn't get some programs to output sound.

Amarok plays fine when using alsa-output (through the Xine engine). However, when I use the pulseaudio output it has a 5-10 seconds delay each time I pause/unpause, I have no idea why.

Totem seems to play alright. It shows up as gstreamer[totem] in the PA Manager, so I assume it works using Pulseaudio directly rather than alsa. It doesn't have that delay on pause/play.

The big problems are VLC and flash. In VLC I tried setting alsa-output, but no sound is played. It doesn't show up in PAM at all. It also only displays a "hw:0,0" device in its alsa settings.

Flash (flash 9 on Firefox) doesn't work, either. When I try to play something (youtube, for instance), PA Manager shows a score of "ALSA plug-in [firefox-bin]" entries, but no sound plays. The entries don't go away when I close the flash page, only when I close firefox. Also, I just noticed that the volume control and volume meter applets crash on start-up with a "Connection failed:connection terminated". I'll check if this is related to flash after this post.

I don't really know where I should look for hints on what the problems are. I looked a bit on the net, but I couldn't find much.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Bogdan Butnaru (bogdanb) said :
#1

OK, I played a bit more with flash. As I said, when I start a flash video, it opens a lot of streams apparently, which remain active until I close Firefox. Programs that are working when I start Flash keep working: the volume control shows each stream as it appears (with volume to 100%), but no sound appears. Amarok plays OK.

However, as long as those streams are there, no new app works. Amarok can't play anymore. The volume control applet crashes on startup. Mplayer says:

***************************
*** PULSEAUDIO: Unable to connect: Connection terminated
alsa-init: playback open error: Connection refused
[AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource busy
*** PULSEAUDIO: Unable to connect: Connection terminated
alsa-init: playback open error: Connection refused
[AO ARTS] Connected to sound server.
[AO ARTS] Stream opened.
[AO ARTS] buffer size: 30720
[AO ARTS] buffer size: 2048
AO: [arts] 32000Hz 2ch s16le (2 bytes per sample)
Starting playback...
***************************

I assume flash simply takes up all available 'channels' or connections, and doesn't use them. I still don't know where to look for errors.

Revision history for this message
Daniel T Chen (crimsun) said :
#2

Several confusing "issues" noted here.

1) Pulse already "addresses" the hardware directly (hw:X,Y). It's further configurable in /etc/pulse/default.pa .
2) There is a PulseAudio GStreamer sink in the libgstreamer-plugins-pulse0.10-0 package (universe) for all GStreamer-based applications (totem-gstreamer, rhythmbox, etc.). Use ``gstreamer-properties'' to set the priority.
3) Install the libasound2-plugins package (main), then run ``asoundconf set-pulseaudio'' and restart your sound apps.
4) For Flash 9, see http://pulseaudio.revolutionlinux.com/PulseAudio .

Revision history for this message
Bogdan Butnaru (bogdanb) said :
#3

User confirmed that the request is solved.

Revision history for this message
Bogdan Butnaru (bogdanb) said :
#4

OK, thank you, this got all the problems solved.

(1) Gstreamer-based apps work out of the box.

(2) Alsa apps seem to work just fine.

(3) The Flash thing works OK. In case anyone has the same issues: if you run Pulseaudio as a system-wide daemon, you have to add FLASH_FORCE_PULSEAUDIO=1 to your environment, because libflashsupport can't seem to autodetect it in that case.

(4) VLC works, but you have to set it explicitely to ALSA. In my case I had to manually select the "default" output in VLC's alsa panel, but I'm not sure if that's necessary. I'm not sure why it didn't work before, maybe asoundconf helped.

I have only one issue left, but it's an Amarok bug. I filed it as https://bugs.launchpad.net/ubuntu/+source/amarok/+bug/86031

Revision history for this message
Mårten Woxberg (maxmc) said :
#5

I can also confirm that this gets things working.

Can anyone test if this works "out of the box"?

Or do users have to go through the hoops of finding this bug?

Shouldn't the pulseaudio package recommend libgstreamer-plugins-pulseX.XX? and libasound2-plugins?

Revision history for this message
Tiago Cogumbreiro (cogumbreiro) said :
#6

Flash does not work out of the box. I tried using the env var and it did not work either. To fix it I installed 'libflashsupport' .

Revision history for this message
Helge Willum Thingvad (helgesdk) said :
#7

I'm having huge audio delays in VLC. About 5 seconds.
It only happens when playing through the "Default" ALSA device, which is PulseAudio.
It's like VLC unknowingly fills up a large buffer before the sound is sent to the speakers or through the network.

Revision history for this message
Helge Willum Thingvad (helgesdk) said :
#8

oh... forgot to tell I'm running Ubuntu 8.04 Hardy

Pulseaudio is 0.9.9 and vlc is 0.8.6

Revision history for this message
Bogdan Butnaru (bogdanb) said :
#9

Yeah, that's been happening to me, too.

Revision history for this message
Launchpad Janitor (janitor) said :
#10

This question was expired because it remained in the 'Open' state without activity for the last 15 days.