Pulseaudio udev module doesn't seem to work properly here. alsa-sink module seems loaded but then, using ALSA and PA afterwards to play sound causes the latter to make your sound app hanging indefinitely. To workaround this issue I just enabled alsa-sink module in default.pa. I'm attaching some logs. Kernel is 2.6.31, Gentoo unstable. Currently using PA 0.9.17, let me know if I should update to 0.9.18. Reproducible: Always Steps to Reproduce: How I reproduced: 1. make sure you're using PA udev autodetection module and disable "load-module module-alsa-sink" from default.pa 2. Fire up Audacious (make sure it's using PA output) 3. Fire up Firefox and load a YT video, play the video 4. Play music in Audacious 5. See Audacious hang
Created attachment 205533 [details] emerge --info
Created attachment 205535 [details] uname -a (kernel is based on gentoo-sources w/tuxonice patches)
Created attachment 205537 [details] dmesg output
Created attachment 205539 [details] lspci -vvv output
Created attachment 205541 [details] lsmod output
This is the error when manually launching PA (and doing all the procedure listed in #0): E: alsa-sink.c: Error opening PCM device front:0: Device or resource busy E: alsa-sink.c: Error opening PCM device front:0: Device or resource busy I can collect any further information or give ssh access to the box.
Well, that's obvious: Firefox got exclusive access to the device. It's the same as if there wasn't pulseaudio and Audacious were to use the ALSA device directly: they cannot. You need to set up ALSA to output to PulseAudio, or use libflashsupport to output directly to Pulse. if use alsa; then local pkg="media-plugins/alsa-plugins" if has_version ${pkg} && ! built_with_use --missing false ${pkg} pulseaudio; then elog elog "You have alsa support enabled so you probably want to install" elog "${pkg} with pulseaudio support to have" elog "alsa using applications route their sound through pulseaudio" fi fi
I know that, and I also have libflashsupport installed.
As I told you: enabling alsa-sink module _fixes_ the issue. So it's NOT libflashsupport.
Then post the pulseaudio log file.
Created attachment 205543 [details] here it is, thanks!
Here's what I've done so far (to collect the log): - launched (as user) pulseaudio -k --log-level=debug - launched Audacious2 - launched Firefox and played a YT video - played a song on Audacious2 (which hanged until timeout) - closed Audacious2 - closed Firefox
Your Firefox is still accessing alsa directly: I: module-suspend-on-idle.c: Source alsa_input.pci-0000_00_05.0.analog-stereo idle for too long, suspending ... D: source.c: Suspend cause of source alsa_input.pci-0000_00_05.0.analog-stereo is 0x0004, suspending I: alsa-source.c: Device suspended... I: module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_05.0.analog-stereo idle for too long, suspending ... D: sink.c: Suspend cause of sink alsa_output.pci-0000_00_05.0.analog-stereo is 0x0004, suspending I: alsa-sink.c: Device suspended... [snip] I: alsa-sink.c: Trying resume... E: alsa-sink.c: Error opening PCM device front:0: Device or resource busy Have you configured /etc/asound.conf to output by default on PulseAudio? It really shouldn't matter whether alsa is loaded manually or through udev, but the suspension is going to free the device for enough time for Firefox to open it.
No, I have no /etc/asound.conf. From my PA-ignorant POV, I was able to workaround and make all working by just manually enabling the alsa-sink module. I got your point though, but still, that seems to fix it. Do you want me to provide logs with alsa-sink module manually enabled in default.pa? Thanks
No I don't really care to be honest, since the issue is the usual "somebody stole my device" problem. Just google around for "pulseaudio perfect setup" and you'll see what you have to do; which is, by the way, configuring the alsa-plugins[pulseaudio] thing which I noted in Comment #7.
I think you're still missing the fact that enabling alsa-sink modules makes fixes every single issue. But I understand you're the PA dev and ebuild maintainer.
(In reply to comment #16) > I think you're still missing the fact that enabling alsa-sink modules makes > fixes every single issue. But I understand you're the PA dev and ebuild > maintainer. > s/s makes//
Seriously, if that workaround works for you (for whatever reason), it's going to break for 10 more users. I'm not going to start adding a number of different workarounds for problems that are configuration problems. If you feel like spending some time on something useful, we _could_ use a Gentoo-specific PulseAudio documentation; it has been in my TODO list for a while but I have nowhere near enough time for that.
I still think there's something wrong somewhere (perhaps in the udev module?), because as you said, alsa-sink is automatically enabled by the udev module and thus, this shouldn't make any diff. Instead, it seems to make the diff here, because manually enabling alsa-sink makes Firefox(flash), and any other app using PA happy. Maybe I failed at explaining things better, but all this means that (maybe only with some particular devices or what -- issue reproduced inside virtualbox) media-sound/pulseaudio is not shipping with default config working out of the box, or at least in a basic way. I'm sure it is a bug somewhere but as I said, i'm not a PA expert at the moment but I think to be smart enough to understand that there's still something wrong. Closing with "INVALID" doesn't help solving issues. And yes, it could be a config issue that is masking a software issue. Why am I supposed to enable alsa-sink if you said that it is taken care by udev module? Don't get me wrong, I'm not criticizing you and PA, I just, would like to make sure it's not a bug somewhere, that is.