[pulseaudio-tickets] [Bug 50256] New: pasuspender alsa hook test fix.
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue May 22 18:15:02 PDT 2012
https://bugs.freedesktop.org/show_bug.cgi?id=50256
Bug #: 50256
Summary: pasuspender alsa hook test fix.
Classification: Unclassified
Product: PulseAudio
Version: unspecified
Platform: Other
OS/Version: Linux (All)
Status: NEW
Severity: critical
Priority: medium
Component: alsa
AssignedTo: pulseaudio-bugs at lists.freedesktop.org
ReportedBy: oiaohm at gmail.com
QAContact: pulseaudio-bugs at lists.freedesktop.org
CC: lennart at poettering.net
This is why wine fails with pasuspender so badly.
Wine tries to use pcm.default when suspended this is still pointing to PA sink
so of course this does not work.
Now this is a case I can ask for a solution in wine or a solution in pulseaudio
and the solution done to wine code base will not turn out good for pulseaudio.
Solution in wine is to detect PA in suspended state hope that jackaudio or
something else that wine should be redirecting to is not started and use
pcm.sysdefault. Not ideal outcome and most likely will not work in every case
and possible result in PA not being able to leave suspended state if something
in wine malfunctions or any other running application in suspended stuffs up.
Basically not a nice outcome for PA. Good for wine since wine now runs
dependable in suspended state.
Solution in PA is to fix pasuspender call to disconnect hooks to also correct
the pcm.default and point it back to pcm.sysdefault where it should be and has
someway to know what applications are using the configuration so getting out of
suspended mode is possible. Question is how.
In a lot of ways it would be good to bind alsa displayed configuration of the
sound system to application to the cgroup of the application. So making clean
up when leaving suspend simpler also prevent confusing suspended pulse using
applications. Everything is that using while suspended cgroup has to be
terminated to give sound back to pulse-audio 100 percent of the time. So to
fix this might be change alsa library for the better.
Yes the cgroup would give PA a sledgehammer to get out of a suspended state if
required. So addressing problem of stuck in suspended how to get out of it.
Currently bad solutions is to use a .asoundrc correcting what pasuspender has
left. pcm.default redirected to pcm.sysdefault and hopefully remove to remove
that before you leave suspend. This change is really better part of the
suspend process. This does risk other issues due to dmix and other alsa parts
being started.
Or to manually change wine in registry to use pcm.sysdefault for suspended and
remembering to turn it back when on pulse again.
Both options make testing unstable so simpler to just recommend pulseaudio
removal so less testing of wine on pulseaudio.
Also don't say go to straight to hardware device like jackaudio does. Wine
depends on the sound system under it to mix. This is not something that is
going to change any time soon. Really why should it. When pulseaudio is
running its providing mixing. When pulseaudio is not on the system alsa
provides mixing. Just pasuspender lead to a problem the generic interface of
alsa to get mixing for sure is stuffed up.
Not all sound cards providing mixing. pcm.default and pcm.sysdefault as
generated by alsa without pulseaudio always include mixing.
So this is really a behaviour problem of pulseaudio and alsa that has to be
fixed at one of them or both of them. Fixing at wine level is going to risk
more problems. Alsa global configuration with multi-seat setups is going to be
problematic as well without cgroups support and usage.
Basically fixing pulseaudio or alsa I see as the path with the least issue of
failure. In the process allowing more flex.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the pulseaudio-bugs
mailing list