No sound with pulseaudio

Bug #213520 reported by Tim Fisken on 2008-04-07
12
Affects Status Importance Assigned to Milestone
swfdec0.6 (Baltix)
Undecided
Unassigned
swfdec0.6 (Mandriva)
Unknown
High
swfdec0.6 (Ubuntu)
Undecided
Unassigned
Nominated for Hardy by Mantas Kriaučiūnas

Bug Description

When using either swfdec-player or the swfdec mozilla plugin, I don't hear any sound when using pulseaudio and a /etc/asound.conf as follows:

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

Other ALSA clients (e.g. alsaplayer) appear to work fine with this pulseaudio setup. When enabling or disabling sound in the flash viewer, the console prints the message:

Failed setting access

and the flash plays, but I hear no sound. I see no entry for swfdec-player in the list of pulseaudio clients in paman.

If I shut down the pulseaudio demon, and remove the asound.conf file, swfdec-player plays sound correctly via the ALSA hw device.

On an up-to-date as of 7th April 2008 version of Hardy with:
libswfdec-0.6-90 0.6.2-1
pulseaudio 0.9.10-1ubuntu1
libasound2-plugins 1.0.15-1ubuntu3

Changed in swfdec0.6:
status: Unknown → In Progress
Tim Fisken (timfisken) wrote :

Checking the source for libswfdec, the problem appears to be that it tries to mmap the audio buffer, which I don't think works with the alsa pulseaudio driver. See swfdec_playback_alsa.c line 221:

if (snd_pcm_hw_params_set_access (ret, hw_params, SND_PCM_ACCESS_MMAP_INTERLEAVED) < 0) {
    g_printerr ("Failed setting access\n");
    goto fail;
}

OTOH, swfdec does have a pulseaudio driver, which can be selected by passing --with-audio=pa to configure. With this setting enabled, sound works fine.

i experience this too on 2 computers, so i'll confirm

Changed in swfdec0.6:
status: New → Confirmed

tested compiling too, and i agree with tim fisken;
compiling with --with-audio=pa makes sound go properly through pulse, otherwise no sound. works perfectly with the switch
using ubuntu hardy heron.

Tim Fisken (timfisken) wrote :

Pavel Šefránek marked this as a dupe of #183917 . I'm pretty sure it isn't - for a start, that bug is a bug in the non-free flash plugin, whereas this is a bug in swfdec. Second, the problem in this bug is different from the problem in #183917 ; in #183917 , the flash plugin either isn't using pulseaudio or is somehow using it in such a way that it blocks and is blocked by other programs. Whereas this bug is caused by swfdec using ALSA in a way that pulseaudio doesn't support, and occours whether or not other programs are trying to play sound.

So, I've removed the duplicate mark.

Julian Andres Klode (juliank) wrote :

Have you seen Bug #234164?
0.6.6 has
  - make ALSA devices work that don't support mmap (such as Pulse audio)

Benjamin Otte (Company) (otte) wrote :

> compiling with --with-audio=pa makes sound go properly through pulse,
> otherwise no sound. works perfectly with the switch
> using ubuntu hardy heron.
>
Have you tried seeking in Youtube?

Pulse playback is experimental and works accordingly. I had to tell the Fedora packager to disable it already, don't make the same mistake in Ubuntu please.

Julian Andres Klode (juliank) wrote :

Ubuntu hardy still has 0.6.4, so I guess it won't work. Therefore we need the update to 0.6.6.

Julian Andres Klode (juliank) wrote :

I backported swfdec 0.6.6-1 from intrepid to hardy (using prevu) and it works now.

Mantas Kriaučiūnas (mantas) wrote :

Julian Andres Klode wrote on 2008-05-23:
> I backported swfdec 0.6.6-1 from intrepid to hardy (using prevu) and it works now.

So, it seems Ubuntu developers should do a SRU, requested in bug #234164
Btw, AFAIK this bug is fixed in intrepid, so, it should be closed for intrepid, right?

pheeror (pheeror) wrote :

I've tried to backport libswf and swdec-gnome to my system (libswfdec-0.6-90_0.6.6-1~8.04prevu1_amd64.deb swfdec-gnome_2.22.2-1~8.04prevu1_amd64.deb), however it still doesn't produce any sound. If i run swfdec-player in terminal I get

ALSA lib pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave
Failed to open sound device: Device or resource busy

so it's probably problem caused by using ALSA directly while a sound card doesn't support hardware multiplexing.

pheeror (pheeror) wrote :

0.6.6 compiled with --with-audio=pa works nice even on my machine and seeking in youtube player is also possible

Julian Andres Klode (juliank) wrote :

Please note that this backend is unstable (AFAIK).

Achim (ach1m) wrote :

can we close this report?

I had no problems with pulseaudio and swfdec in Intrepid.

Regards
Achim

Mackenzie Morgan (maco.m) wrote :

Are you using swfdec 0.6 in Intrepid? I think Intrepid uses 0.8. This bug report is filed against 0.6 though.

Am Montag, den 10.11.2008, 00:16 +0000 schrieb Mackenzie Morgan:
> Are you using swfdec 0.6 in Intrepid? I think Intrepid uses 0.8. This
> bug report is filed against 0.6 though.

I have tested the swfdec 0.8. If you install the swfdec-mozilla package
it automatically installs the latest version of swfdec in ubuntu.

To my mind this problem hast been fixed.

So we could also change the status of this bugreport to won't fix in
swfdec 0.6.

I haven't tested if swfdec 0.6 works because it doesn't get installed if
you install the swfdec-mozilla package.

Regards
Achim

Mackenzie Morgan (maco.m) wrote :

Marking Won't Fix in 0.6 since it's fixed upstream in a new release.

Changed in swfdec0.6:
status: Confirmed → Won't Fix
Changed in swfdec0.6:
status: In Progress → Invalid
Changed in swfdec0.6 (Mandriva):
status: Invalid → Unknown
Changed in swfdec0.6 (Mandriva):
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.