Ticket #743 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Sound disappears when some app tries to access alsa

Reported by: walmis Owned by: lennart
Milestone: Component: daemon
Keywords: Cc:

Description

I can reproduce it with winecfg and audacity. It looks like this: I start playing music with audacious, then i start one of these apps, sound immediately dissapears, but pavucontrol shows bars moving and everything else looks normal, but the sound is gone. Tried fiddling with volumes, but it does not change anything. I can get sound back only when changing profile (2.0, 4.0, 4.1 etc.) or after restarting pulseaudio. I'm on ubuntu 9.10 (PA 0.9.21, alsa 1.0.21). Tried with kernels 2.6.31 and 32. The same.

Attachments

out (30.6 kB) - added by walmis 2 years ago.
Pulseaudio log

Change History

Changed 2 years ago by walmis

  • attachment out added

Pulseaudio log

Changed 2 years ago by walmis

I've managed to partly workaround this issue by enabling module suspend-idle and setting the timeout to 1 s. Now when sound disappears i can stop the stream, wait 1s and restart it and then sound starts to work.

Any ideas what might be causing this?

Changed 2 years ago by coling

I presume the apps that trigger this disappearance are trying to access the alsa h/w directly? Can you get a very basic test case using only aplay? e.g. aplay -D hw:0,0? If pulse borks with this test case then this is likely a problem at the alsa level (trying to open the device a second time should really fail (for 90% of audio h/w) or be allowed due to hardware mixing. I'm guessing that either a) Alsa is giving us some kind of signal we don't handle properly (no idea if this is the what is happening as I don't knwo this code in PA too well, but I suspect it's not the case.) or b) Alsa level playback is somehow borked when opening things twice.

Another interesting test woudl be to run:

1) Terminal 1: pasuspender cat 2) Terminal 2: aplay -D hw:0,0 3) Terminal 3: aplay -D hw:0,0 (again!)

If 3) causes the playback in 2) to get messed up then you know this is definitely an alsa bug... (although if it works fine, it doesn't mean to say it's not an alsa bug!).

Please note that there is a pulseaudio output module for wine which may work around the problem...

Lennart, any ideas?

Changed 2 years ago by walmis

Thanks for the reply. Running aplay or speaker-test takes over the sound from pulseaudio.

The second test case: Terminal 1: I launch aplay -D hw:0,0 Terminal 2: I launch aplay -D hw:0,0

The second terminal overtakes the first one, but if I interrupt either one of them, sound disappears from another.

Changed 2 years ago by lennart

Could you please diff two amixer -c0 outputs when PA works and when it doesn't? That should give us a hint if this is a mixer issue.

Changed 2 years ago by walmis

This appears to be fixed in latest alsa drivers.

Changed 2 years ago by walmis

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.