[pulseaudio-discuss] Moving sources and sinks

Nikolai Beier nikbeier at gmail.com
Sun May 4 09:11:22 PDT 2008


2008/5/4 Tomas Carnecky <tom at dbservice.com>:
>
> Nikolai Beier wrote:
>  > 2008/5/4 Tomas Carnecky <tom at dbservice.com>:
>  >> Colin Guthrie wrote:
>  >>  > Tomas Carnecky wrote:
>  >>  >> Colin Guthrie wrote:
>  >>  >>> I disagree that this community is unresponsive. You just have to be
>  >>  >>> patient. Lennart is the main developer but he does not sit slavishly
>  >>  >>> reading the mailing list and responding immediately. He'll usually have
>  >>  >>> a big purge every couple weeks, but generally does respond to almost
>  >>  >>> everyone who asks something, unless someone else has jumped in already.
>  >>  >> PulseAudio + Wine is still a big no-no. Like described in my earlier
>  >>  >> mail to this mailing list (sent 24.2.2008) I've come to a point where I
>  >>  >> don't know any further and asked for help. Nobody answered. Not even to
>  >>  >> the ticket in PA trac or the ticket in the alsa bugtracker.
>  >>  >>
>  >>  >> Ubuntu now ships with PA enabled by default, which causes big troubles
>  >>  >> for those wanting to play games under Wine. I know the best solution
>  >>  >> would be to have a native PA driver in Wine, but that won't happen
>  >>  >> anytime soon. There are bugs in the pulse alsa driver. Fixing those
>  >>  >> shouldn't be such big problem for someone familiar with the inner
>  >>  >> workings of PA.
>  >>  >
>  >>  > What are the bugs in the pulse alsa plugin you refer to? There are some
>  >>  > feature limitations but they are typically down to what any ioplug
>  >>  > plugin is capable of.
>  >>
>  >>  https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2601 (see the
>  >>  comments made by wereHamster, that's me).
>  >>
>  >>  http://pulseaudio.org/ticket/198
>  >>
>  >>
>  >>  > When I last looked at the wine alsa layer it was *really* nasty. It
>  >>  > didn't even open the "default" device, it would instead try to open
>  >>  > "default:0".... I think it was cleaned up a bit, but it should be very
>  >>  > simple for someone to rewrite it or write a direct pulse driver. The
>  >>  > main wine folks don't use PA so don't really care about this.
>  >>   >
>  >>  > If there is something in pulse that can be fixed, it shoudl be reported,
>  >>  > but as tonnes of apps out there work fine with pulse+alsa, I suspect
>  >>  > strongly (and this is based on actually having a quick peak at the code
>  >>  > a while back) that the problems lie at the wine end.
>  >>
>  >>  There may be applications that work fine, but you only have to find a
>  >>  single app that works with native alsa and fails with alsa-pulse
>  >>  emulation to prove that there's a bug in your code. Wine is probably one
>  >>  of the more complex users of the alsa API, and therefore exposing bugs
>  >>  in alsa-pulse that other applications don't hit.
>  >>
>  >>  I have patched the Wine alsa driver and the alsa-pulse plugin and sound
>  >>  works for me, tested in World of Warcraft and foobar2000. The Wine patch
>  >>  maybe isn't necessary. But the patch to alsa-pulse is required, see my
>  >>  comments in the alsa bugtracker or the PA ticket.
>  >
>  > This case is a bit confusing. I have tried to look at the realted bug
>  > reports this morning. (nothing seemed to have happened since
>  > February).
>
>  Yeah, because I posted all I know, my patches etc, and I've been waiting
>  for someone familiar with the inner workings of PA to comment on the
>  issues. As I said, sound in Wine works for me, but the patches I'm using
>   I consider hacks and not a real solution.
>
>
>  > There are mentioned two patches for Wine that should fix some of the
>  > problems, like the bad hard coded defaults on names for default
>  > devices and volume controls. (here: pulseaudio.org/ticket/198 and
>  > winehq.org/pipermail/wine-patches/2008-February/050561.html ). I
>  > wonder if they are included now? (Really a question for people working
>  > on the wine code)
>
>  The first issue with the device names seems to be fixed. As of March 4,
>  2008 Wine uses "default" instead of "default:0". The only patch to Wine
>  I'm using now is the one I posted to wine-patches. That one was not
>  merged into Wine - I haven't asked why. I'm not even sure it's
>  necessary. I'll test without my Wine patch to confirm that. But the
>  biggest problem seems to be the delay/latency computation in the
>  alsa-pulse plugin.
>
>
>  > What about Wines OSS and ESD output? If they work, it could be
>  > recommended to try these if alsa output does not work.
>
>  I disabled OSS support in my kernel, so I can't test paoss. It might
>  work, but it would still be a workaround and not a real fix.
>
>
>  > Note that there are reported separate problems with DirectSound
>
>  Where did you see that? Where can I read more about that?

At http://www.pulseaudio.org/ticket/198#comment:7 (comment by
"proyvind", apparently testet with a patch that fixes both the
hardcoded volume control and the use of default:0 .

And here: http://bugs.winehq.org/show_bug.cgi?id=10910#c3 and
http://bugs.winehq.org/show_bug.cgi?id=10495#c4 and
http://bugs.winehq.org/show_bug.cgi?id=10495#c22

Oh, now I looked at the bug reports and got confused again. Is this
the key points? (Ses below:)

== Wine and the alsa plugin for PulseAudio (alsa pulse plugin) ==
PulseAudio normally takes control of the hardware through the device
driver/ALSA. Thereby the hardware "device" in ALSA is blocked for
other clients like Wine.

Perhaps Winealsa (the output driver for ALSA) needs direct hardware
access? Or it is/was just coded that way, but does not need to be. Or
it was never a problem?

Winealsa is now (may 4. 20008) fixed, so it uses the alsa device
"default" instead of "default:0" (or like numbers), and does not
require a volume control called PCM but uses the default volume
control.

Finally there are the delay problem(s).
* "wereHamster" noted that the ALSA pulse plugin might set Wine in an
endles loop. http://www.pulseaudio.org/ticket/198#comment:8
* Some have notices large delays (like one second), which is tracked
back to some delay calculations in the ALSA pulse plugin.

If a gamer wants lowest possible latency, and does not need any other
app to play sound (like voice chats like "Teamspeak"), then they
should use pasuspender.

-- 
Nikolai Beier



More information about the pulseaudio-discuss mailing list