Occasional sound drops in Wine via PulseAudio

Bug #371897 reported by Neil Wilson
224
This bug affects 48 people
Affects Status Importance Assigned to Milestone
Wine
Fix Released
Wishlist
pulseaudio (Ubuntu)
Invalid
Undecided
Unassigned
wine (Ubuntu)
Fix Released
Low
Maarten Lankhorst

Bug Description

Binary package hint: wine

I'm running the Spotify Windows application on two laptops under Wine with both internal and external USB sound card. With both cards you get the occasional pop and click in the sound suggesting some data loss somewhere.

I've selected the alsa drivers in winecfg and the whole thing is running via the alsa compatibility layer in pulseaudio.

Jaunty 9.04 UNR and standard Ubuntu desktop.

wine:
  Installed: 1.0.1-0ubuntu6
  Candidate: 1.0.1-0ubuntu6
  Version table:
 *** 1.0.1-0ubuntu6 0
        500 http://gb.archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status

pulseaudio:
  Installed: 1:0.9.14-0ubuntu20
  Candidate: 1:0.9.14-0ubuntu20
  Version table:
 *** 1:0.9.14-0ubuntu20 0
        500 http://gb.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
In , magilus (magilus) wrote :

Wine should have a PulseAudio output plugin. This is a feature request.

Revision history for this message
In , Stefan Dösinger (stefandoesinger) wrote :

What does Pulseaudio support that the sound system for the existing plugins can't do? We have way too many half-working sound plugins already, there should be a good reason before we add and maintain yet another one.

Revision history for this message
In , magilus (magilus) wrote :

1) Distribution are currently moving over to PulseAudio as default. Fedora 8 already uses it as default sound system, Ubuntu and OpenSuSE plan to do so. When PulseAudio is being used, you can not use ALSA or OSS directly. There are compatibility layers for OSS and ALSA being provided by PulseAudio, but they both increase the latency. The ALSA layer does not work in connection with Wine.

2) When everything works well, nearly all applications using sound will use PulseAudio as sound output. Many already have PulseAudio output plugins, namely Gstreamer, Xine and Mumble. Because of them all using PA, Wine would not have to maintain great amounts of backends.

3) Proper software mixing. Because of 2, software mixing should work fine using almost all software then.

4) Better support for Thin Clients as Pulse Audio has great Networking Support. Many LTSP implentations already using PA.

5) Moving sounds on-the-fly between devices.

This statements are without warranty, but should be true.

Also have a look at http://fedoraproject.org/wiki/Interviews/LennartPoettering

Revision history for this message
In , magilus (magilus) wrote :

There has already been some discussion here: http://<email address hidden>/msg39145.html

It even seems that someone is already working on it. I will subscribe him.

http://<email address hidden>/msg35153.html

Revision history for this message
In , Thunderbird2k (thunderbird2k) wrote :

At the moment we aren't much interested in PulseAudio. We have had different sound drivers in Wine and they end up being half baked. It took years to get our current oss and alsa drivers sort of working and even those aren't that great yet. We can't use another audio backend.

Especially games use DirectSound which means direct soundcard access. Right now the current audio situation (partly due to bad sound drivers) is already very bad and we have bad audio quality and latency. An additional layer in between will make it worse.

Pulseaudio should deliver a good replacement for dmix and let Wine and other apps keep Alsa. Apps like Quake4 and Unreal Tournament won't get rewritten to use pulseaudio.

Revision history for this message
In , Marcus Meissner (marcus-jet) wrote :

"planning to" is not really an argument.

Please understand that Wine absolutely needs lowlevel low latency soundsupport, otherwise we will get countless reports of
"stuttering audio" and similar.
And audio middlewares are not really known for "low latency".

A framework like arts,esd or pulseaudio will not help,
and most users do not care about network transparency.

If someone wants to write a pulseaudio driver, he should feel free to do so, but he should be aware that just writing a simple 20 line linear PCM out driver is not sufficient.

Revision history for this message
In , magilus (magilus) wrote :

PA will offer a good latency as soon as some kernel patches flow in. If you need more information, please ask.

I understand your arguments and I think that currently, you are right.

But then, there should be at least some communication with the PA devs in order to make it possible to use Wine using the ALSA backend.

The more distros switch to PA (and they currently are doing so), the more users will complain about "no sound in Wine".

Revision history for this message
In , Stefan Dösinger (stefandoesinger) wrote :

PA will never be an option for gaming in Wine. You're right, we have to get in contact with the PA developers, to make sure PA allows us to bypass it entirely.

"Good latency" is not enough, we need "no latency". Even if PA gets latency down to 50 or even 25 ms it is way too long. Did you ever watch a professional counterstrike player? My (unscientific) estimate is that the (eye,ear) -> hand reaction time is around 100 ms. Adding another 25 ms game -> sound hardware delay is absolutely unacceptable.
CS players say that they feel the difference between a 20 ms ping and a 50 ms network ping when playing online, and I am sure they are right about this.

If a sound server is active by default that needs extra user action to be bypassed then it will make Linux unusable for professional gamers. Gamers do not care about mixing two applications' sounds, since they have only one app anyway.

ARTS surrendered its exclusive control of the sound device when it was not used, and we need at least something like that from PA for proper DirectSound support. A better solution would be if PA passed alsa calls through to the driver without going through its mixer when only one app is using alsa, and transparently enables and disables the mixer if other apps pop up.

Revision history for this message
In , magilus (magilus) wrote :

> Gamers do not care about mixing two applications' sounds, since they have only one app anyway.

This is not true. Most professional gamers use TeamSpeak / Ventrilo / Mumble to communicate with their team.

The other things are probably true, but I wonder how far the latency will be cut down when the Kernel is compiled with the right patches.

Revision history for this message
In , magilus (magilus) wrote :

Regarding latency:

=== QUOTE ===

Gustavo then played the latency card: yes, PA increases the latency
over direct hw access. But so does dmix, because it enforces fixed
fragment settings for all apps. What you really want to do (which
however right now is only partially implemented in PA) is allowing
per-stream fragment settings, by scheduling audio based on timer
interrupts instead of sound io interrupts (based on fixed fragment
settings). Those timer interrupts can be dynamically changed so we can
change the wakeup points dynamically during playback without too much
effort. However this needs some kind of kernel support (hrtimers,
HPET), which only has become available very recently and on x86 only
(not even amd64 yet), so until we get this fully implemented a few
months will pass. If we have that however, we basically get the same
PCM pipeline that Vista and MacOS have: a huge mixing buffer managed
by a real-time userspace sound server which allows rewriting at any
time and notifying clients dynamically, scheduled via timer
interrupts. In essence, in the long run we really *need* something
like PA, if we want to provide low latencies (i.e. short fragments ==
frequent interrupts) and low power consumption (i.e. few interrupts ==
huge fragments) at the same time and switch between them
dynamically. Yes, right now, PA increases your achievable latencies a
bit (but just a bit), but in the end we *need* a process that does the
audio scheduling based on timers -- something that PA will then do. Of
course, PA doesn't fully implement yet, which is partially PA's fault
and partially the kernel's fault that sucks when it comes to timers,
right now. We're getting there.

=== /QUOTE === Source: http://<email address hidden>/msg11086.html

Written by Lennart Poettering, PA developer at Red Hat.

Regarding

> Apps like Quake4 and Unreal Tournament won't get rewritten to
> use pulseaudio.

Doesn't Quake4 use SDL? Then, if SDL would offer PA support, Quake4 should work fine, also.

Revision history for this message
In , Stefan Dösinger (stefandoesinger) wrote :

Teamspeak is a good point, yeah. However, often fps gamers sit in the same room, so no need for such a chat app. (Online gaming doesn't allow proper competitive gaming anyway due to high network latencies).

Regarding the latency of dmix and software mixing: Yes, dmix isn't any better, but for people that need highly efficient mixing there is sound hardware that supports hardware mixing(the usual AC97 chips don't support that). Wine currently does not support hardware mixing due to Alsa limitations, but I doubt a sound middleware like PA will fix that. (Lennart Poettering says it is "bullshit" and gives the Intel HDA soundchip as an example. Gamers do not use the HDA and AC97 chips for a reason. Gamers slap Microsoft for disallowing HW mixing in Vista for a reason).

Even with hardware that doesn't do HW mixing, games expect to be able to mix themselves and write the results directly to the card, bypassing any other mixing software.

However, it sounds like PA already does what we want:

===
Gustavo brought up the issue that PA "hogs" the sound device. Sure we
do. The idea is having everything go through PA, so that we can treat
everything the same. However, since there are some APIs that are
notoriously hard to virtualize (e.g. OSS with mmap) and some areas
where you don't want the extra context-switching PA adds (pro audio,
for now), there's now a tool called "pasuspender" which when passed a
command line it will execute that, but before doing so suspend PA's
sound card access and afterwards resume it again. So, prefix your
"quake2" invocation with "pasuspender" and everything should be
fine. Also, we now close all audio devices after 1s of idle time by
default. We do this mostly to save power. However this also has the
side effect of releasing the audio device quickly for other apps. The
drawback of course is that many sound cards generate pops and clicks
everytime you open/close the device (some intel hda for example), but
that can probably be worked around in the drivers (according to
Takashi) and I guess you cannot have everything at the same time, so
power saving is more important for now. In practice you probably
shouldn't notice PA's presence at all -- unless you try to play a ALSA
stream to hw:0 and a PA stream at the same time. And last but not
least, we have been shipping a PA plugin for libasound for a while
now. It's enabled by default in F8 and redirects all ALSA audio to
PA -- unless some borked app hard codes "hw:0" as device name.
===

So we can just stick to Alsa, and the game gets direct access without delays.

Revision history for this message
In , magilus (magilus) wrote :

> So we can just stick to Alsa, and the game gets direct access without delays.

Only when Wine is being called using pasuspender, which suspends the sound of all other applications using PA.

But you are right, the free-time gamer is probably content using the PA Alsa plugin if it would work. So we can finally sum up that it should be made to work using Wine and that everything should be as it should be then.

The professional gamer would have to use pasuspender.

Revision history for this message
In , Stefan Dösinger (stefandoesinger) wrote :

"Also, we now close all audio devices after 1s of idle time by
default". I don't read this as if pasuspender needs to be called. pasuspender sounds like a way to force PA off, even if some app is using PA. A feature like this was missing from arts: If you can't get direct access for some reason you had to search through all the apps to find the app that kept the sound device hostage.

Revision history for this message
In , magilus (magilus) wrote :

Okay, sorry, I misunderstood.

Revision history for this message
In , Kai-blin (kai-blin) wrote :

Not meaning to be a nuisance, but if this topic is encouraging discussion, how about moving it to the wine-devel mailing list? Bugzilla is not a forum, and not all developers follow bugzilla that closely.

Revision history for this message
In , Stéphan Kochen (stephank) wrote :

Thank you for subscribing me, Martin.

I won't be making any promises regarding the driver. I still have the code lying around, but it's far from finished.

There's not much I can say about whether it is a good or bad decision to include PA support. But I personally think that software mixing is very important; I'm a laptop user and casual gamer. Last time I tried, PA's ALSA emulation wasn't working in Wine either. (But that was a while ago, and I should try again with 0.9.7.) (Also, OSS emulation worked fine, just with some crackling in the sound.)

Assuming that PA is going to polish it's ALSA emulation, it *might* be a good decision to only support the ALSA API in Wine. But ALSA emulation is also another layer inbetween, and I can't tell how that influences latency, which also seems to be important to many.

Revision history for this message
In , Diablownik (diablownik) wrote :

*** This bug has been confirmed by popular vote. ***

Revision history for this message
In , Cristian Aravena Romero (caravena) wrote :

In Ubuntu Hardy Heron (8.04) Alpha 2, pulseaudio is enable for default.

References:
https://wiki.ubuntu.com/HardyHeron/Alpha2#head-efb28122d420eb09a74d286f3439126dd14bbafd

Revision history for this message
In , Susan Cragin (susancragin) wrote :
Revision history for this message
In , Susan Cragin (susancragin) wrote :

But wait! There are more! Alsa tells me they have one for Ekiga, and Gnome has one, too.
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3825
http://bugzilla.gnome.org/show_bug.cgi?id=413552

Revision history for this message
In , magilus (magilus) wrote :

I dunno if this has been posted before but a PulseAudio developer writes this in his blog:

:::::::::::::

I am not really asking anyone to port their apps to the native PulseAudio API
right now. While I do think the API is quite powerful and not redundant, I also
acknowledge that it is very difficult to use properly (and very easy to misuse),
(mostly) due to its fully asynchronous nature. The mysterious libsydney project is supposed to fix this and a lot more. libsydney is mostly the Dukem Nukem
Forever of audio APIs right now, but in contrast to DNF I didn't really announce it publicly yet, so it doesn't really count. ;-)

But, most importantly: please stop misusing the existing APIs. I am doing my best to allow all current APIs to run without hassles on top of PA, but due to the sometimes blatant misues, or even brutal violations of those APIs it is very hard to get that working for all applications (yes, that means you, Adobe, and you, Skype). Don't expect that mmap is available on all audio devices -- it's not, and especially not on PA. Don't use /proc/asound/pcm as an API for enumerating audio devices. It's totally unsuitable for that. Don't hard code device strings. Use default as device string. Don't make assumptions that are not and cannot be true for non-hardware devices. Don't fiddle around with period settings unless you fully grok them and know what you are doing. In short: be a better citizen, write code you don't need to be ashamed of. ALSA has its limitations and my compatibility code certainly as well, but this is not an excuse for working around them by writing code that makes little children cry. If you have a good ALSA backend for your program than this will not only fix your issues with PA, but also with Bluetooth, you will have less code to maintain and also code that is much easier to maintain.

Or even shorter: Fix. Your. Broken. ALSA. Client. Code. Thank you.

:::::::::::::

http://0pointer.de/blog/projects/lca2008.html

Maybe that's the current way to go for Wine; see that it works together with PA when using the ALSA backend.

Revision history for this message
In , Kevin-kofler (kevin-kofler) wrote :

Have you tried the esound backend? That works just fine with PulseAudio on Fedora 8.

Revision history for this message
In , magilus (magilus) wrote :

While it worked for me, there was a delay of ~ 1 second between playing the sound and hearing the sound :(

Well with this patch: http://www.winehq.org/pipermail/wine-patches/2008-February/050561.html commited and a little bit of work on the PulseAudio side, the ALSA Wine plugin should work with PulseAudio. (bug 10910), but on the DirectSound-side of life, it still does not work.

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

Just for reference, have a look at some comments here:
http://bugs.winehq.org/show_bug.cgi?id=13090

Revision history for this message
In , Saul D (david130890-deactivatedaccount) wrote :

*** Bug 14103 has been marked as a duplicate of this bug. ***

Revision history for this message
In , mo0n_sniper (bl4ck-3yed) wrote :

*** Bug 14876 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

Before this bug gets closed, I want to repeat something I sent to the list:
while those patches, that hit 1.1.3 do help,
they don't fully fix the problem.
Observed with pulseaudio 0.9.11.
With those patches, sound is played, but much faster than it should.
Referring to http://source.winehq.org/git/wine.git/?a=commitdiff;h=944cb7ea15a3e8cbdded643b91ba85acbac827c8 :
when I change period_time from 20000 to 40000, sound seems to be played at correct rate.

Revision history for this message
In , Susan Cragin (susancragin) wrote :

(In reply to comment #26)
----

> when I change period_time from 20000 to 40000, sound seems to be played at
> correct rate.
>
That's for playing sound. What about recording sound? Did you test that?

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

Using what ?
While `aplay -d 3 < /dev/urandom` works nicely,
if you just want to see if the sound works,
I don't think it's what you have in mind.
I use wine mostly to have a look at a few games
(and while I enjoy games, I'm not using them often
and those games I tested were not the ones you'd call timing-reliant).

As my mails seem to have been lost,
I'll repeat their main point:
it seems that period_time is a magic number,
that worked for the person who dropped those patches into the git,
but it doesn't work for me.
My value is a magic number too, it seems to work
for me, but I don't know if there's any reason behind it.
I simply tested a few values, significantly smaller than 20000 didn't make a change, slightly larger wasn't enough, but 40000 seems to be enough.

Now, unless the author will reveal the reason behind those numbers,
this won't help anybody.

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

A breaking news !!!
With wine 1.1.4, pulseaudio 0.9.11 and today's git of alsa plugins,
sound just works, no patches needed.
It looks like the most important part is the git,
cause the pulse plugin was nearly rewritten.

Well, anyway, pulseaudio author is the one, who submitted those patches,
so let's simply enjoy (and thank him).

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

Damn, looks like I spoke too soon.
But it did seem to work.
However, when I tried it again today, it failed to.
When I recompiled with period_time changed, it works again.

The only thing that changed between today and the previous test was
that my system load is a lot lighter today, but why should it matter ?
And does that magic number really depend on system load ?

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Created an attachment (id=16189)
PulseAudio support for Wine

PulseAudio support for wine. This proves the viability. DSound works very well with low latencies, even over a local network. The code works better than the wine esd driver. WaveIn support is not included (yet) and there is currently no code dealing with connection losses. I'm putting this out there so others can build from it and make improvements as they see fit.

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

First of all, you mark an attachment as a patch only if it's plain text,
if it's plain text, if it's compressed, there's no point of it.

On a not quite related note, no changes in 1.1.5 with pulseaudio 0.9.12,
still it sometimes works, sometimes not with period_time=20000 and
seems to work every time with period_time=40000.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Created an attachment (id=16246)
PulseAudio support for wine

Not compressed this time :P. Now includes basic WaveIn support as well as some cleanups and improvements to WaveOut. Deals with connection losses and stream errors a little better now.

Revision history for this message
In , mo0n_sniper (bl4ck-3yed) wrote :

Hi Art,

Wine hasn't worked for me since Ubuntu introduced Pulse Audio.
I only play a few old games and most of them work horribly with pulseaudio.I have a dual core 1.6 Ghz processor, 1GB RAM, Ati Radeon X1150 video card, so performance on those games shouldn't be a problem.

With the alsa plugin
Counter Strike non-source 1.6 has very low performance 10-15 fps
Disciples II ROTE the game lags a lot, even the mouse moves laggy
Starcraft you can notice some lag.
Heroes III the only game that works good for me.

With the OSS plugin the games play a few times better, but still the performance is bad.

If I disable the sound all games run like before.

The really bad thing is that before pulseaudio most games had good performance, CounterStrike even had better fps than in WINDOWS and lower ping.

So Art can you tell us more about your patch, and if it will fix the pulse audio performance problem?

Also will it be included in wine, because for me the performance drop is a huge drawback from using wine anymore?

Most distributions use Pulseaudio so a solution should be found.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Hello

This patch adds native support for pulseaudio. It should allow better performance of over the esound driver. As for problems with performance, the short answer is, it depends. How are the games seeming to run slow. Personally I have a pentium-m 1.6 gHz, ATI Radeon 7500 32mb, 1gb ram and I can play Max Payne 2 without issue (no pixel shaders thought ;-) ), with audio going over the network or locally.

If the performance slowdown you experience is because of the pulseaudio daemon, I would check it's configuation (how is it accessing the hardware, what's the default sample spec vs the sink sample specs, what resampling algorithm is being used).

On the other hand, if the poor performance is due to windows apps not expecting a large audio buffer, larger than usual latencies, or that wavehdrs will be return monotonically rather than in bursts, this patch will help. The patch's method for returning wavehdrs to the app is based entirely on timing functions rather than stream position estimates or written totals. This ensures that audio data appears played at a consistent rate. In fact, if this is your main problem with audio, this patch will preform better than _any_ of the other drivers, as really, we are lying to the app here.

A waveout app controls how large it's audio buffer is by how many and how large of wavehdrs it queues. Apps do not queue more wavehdrs than this size, thus if no wavehdrs are returned, no new ones will be given. This is a problem if the size of the app's desired buffer is smaller than pulse's prebuffer, as pulse will not start playback until the prebuffer is full. If pulse doesn't start playback, no wavehdr's are returned, no new wavehdr's come in, no new data, prebuffer will never fill, nothing happens. To deal with this if a stall in the prebuffer is detected this code will start the wavehdr releasing clock earlier than when the audio actually starts playing. The upside is apps always work and seem to get the buffer size they want, the downside is that we are actually lying to the windows apps, and there really is an extra bit of latency that they just don't know about. Another upside is that pulseaudio is good at managing latencies.

WaveIn support in this patch is still hack-ish as I wrote and tested it early in the morning.

Revision history for this message
In , Morgane “Sardem FF7” Glidic (sardemff7) wrote :

I have tried your patch but I don't have any PulseAudio choice in the list of drivers, why ? I like PulseAudio so if I can help developing a PulseAudio driver, it will be nice.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Created an attachment (id=16263)
Add pulseaudio to know audio drivers in winecfg

Pulseaudio would not appear in winecfg as winecfg's list of possible audio drivers is static. This patch adds winepulse.drv to winecfg. Without this patch to enable the pulseaudio driver, edit HKCU->Software->Wine->Drivers->Audio to "pulse" (or a comma separated list of drivers, with pulse in front.)

Revision history for this message
In , Jan-wine (jan-wine) wrote :

Althought i'm sceptical about the aproach I included the patches in the hacks repo (www: http://repo.or.cz/w/wine/hacks.git ).

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Created an attachment (id=16412)
PulseAudio support for Wine

A newer patch here. Much better handling of stream and connection failures, more useful trace information and multiple playback instances per device. Removed wavein support for now.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Created an attachment (id=16753)
Add pulseaudio to build system and stub pulseaudio driver

As I was asked to split this patch up, this is part 1 of 2. This patch adds a pulseaudio driver which only supports listing devices and retrieving device properties.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Created an attachment (id=16754)
Waveout functionality for winepulse

Part 2 of 2. Now should detect and support pulesaudio versions prior to 0.9.11

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

Created an attachment (id=16977)
new patch

OK, wine 1.1.7, pulseaudio 0.9.13 with all the git patches,
that rawhide took (without them that version is simply broken).

New patch then.
Most of it is updating to alsa 1.0.18 (yes, released today).
In case of waveout.c, I'm not sure whether it should be
snd_pcm_avail or snd_pcm_avail_update.
The only independent change is frames -> 3*frames.
Again, a magic number.

Revision history for this message
In , Dmitry-codeweavers (dmitry-codeweavers) wrote :

*** Bug 15998 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Vitaliy-bugzilla (vitaliy-bugzilla) wrote :

*** Bug 16022 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

Created an attachment (id=17378)
patch I'm using now

While 3 was enough for some programs, some still failed.
So I simply put a comment on that line and those programs worked.

This worked even with heavy swapping, but I'm not sure how it affects timing.

Revision history for this message
In , Kyle1-schrecknet (kyle1-schrecknet) wrote :

I'd like to test pulseaudio support, but can't figure out what patches should I apply. Should I use patches from Art Taylor first and from Rafał Mużyło after that or there is another order/way?

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Speaking only for myself, I believe the patches are independent of each other. My patches attempt to add a new audio driver winepulse.drv to wine which communicates directly to the pulseaudio server using libpulse. The patches from Rafał Mużyło attempt to make the existing wine audio driver winealsa.drv work better when it is outputting to the alsa-pulse alsa-io-plug which allows most alsa apps to use pulseaudio. I believe both patches can be used at the same time. You can select which method is being used by the registry.

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

I've already mentioned it in a different bug,
but it's time to do it here.

It seems that with wine 1.1.10, sound just works.

At least it does for me on:
pulseaudio 0.9.13 (patched)
alsa 1.0.18 (lib and driver)
AC'97 (intel8x0)

On the other hand, it seems that people on
0.9.10 complain now about extra echo...

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

Patch in bug 16416 comment 6 seems to solve the echo problem too.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Created an attachment (id=19505)
winepulse [1 of 2]: Add checks for pulseaudio in configure

The patch is against 1.1.15. Adds checks for libpulse >= 0.9.8 to configure, defines HAVE_PULSEAUDIO=1 if found and tells configure to build dlls/winepulse.drv/Makefile.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Created an attachment (id=19506)
winepulse [2 of 2]: New winmm driver for pulseaudio

This patch does not modify any existing files, it only creates the new winepulse.drv winmm driver under dlls/winepulse.drv. Patch contains pulseaudio support for WaveIn, WaveOut and DirectSound output. To build apply the patches for configure.ac and this one, autoreconf, and build. Once built you have to tell wine to use the pulseaudio driver by setting the registry key HKCU->Software->Wine->Drivers->Audio to "pulse." I have also put these instructions at http://art.ified.ca/?page_id=40 . To see if winepulse.drv is in use or to debug it set the WINEDEBUG environment variable to "+wave,+dspulse"

Revision history for this message
In , Dmitry-codeweavers (dmitry-codeweavers) wrote :

Please read the comments again: Wine is not going to include new semi-working
sound drivers, what you need to do to improve existing ones to work well with
pulseaudio.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Please test code: this driver is _more_ complete than existing drivers and provides the best possible way for wine to interact with pulesaudio. I stand by that statement. Frankly the existing wine audio drivers are all scary and suffering from rot. Many are outdated, or have been over tweeked over the years. Particularily winealsa.drv, although the most feature-full, needs a good shake.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Sorry if I over reacted, but let me restate why winepulse should be seriously considered:

Reading the comments reveals:

"If someone wants to write a pulseaudio driver, he should feel free to do so,
but he should be aware that just writing a simple 20 line linear PCM out driver
is not sufficient." - Done

Second, this code does _not_ inhibit the possibilities of improving winealsa.drv and alsa-pulse's interactions, or the ability for hard-core gamers to use alsa mmap (with pasuspender.)

Third, this code allows for devices to be selected by the applications. Audio apps can choose which sinks or sources to play or record from the pulse server.

Fourth, code does not require that a new connection to the server and new audio stream be made every call of waveOutReset et a la unlike when we try to use pulseaudio behind the alsa api.

Fifth, it is possible to get audio latency down to 25ms in directsound, maybe less depending on your pulseaudio server. We are talking one memcpy removed from hardware for local audio, and the memcpy happens in the realtime scheduled pulseaudio daemon.

Sixth, wavehdr's are returned to the app based on a timer which is close to actual playback time, causing a more smooth and accurate playback for applications which use when a wavehdr is returned for timing info. This is not the case for wineesd.

Revision history for this message
In , Marcus Meissner (marcus-jet) wrote :

I suggest to just post it for review to either wine-patches or wine-devel.

Revision history for this message
In , NSLW (nslw) wrote :

Created an attachment (id=19513)
WINEDEBUG=+wave,+dspulse wine hl -game cstrike

Sound doesn't work if the registry key “Audio” in "HKCU\Software\Wine\Drivers" is set to "pulse" with CounterStrike 1.6 NonSteam. I'm running on Fedora 10 i386 with pulseaudio 0.9.14 on WINE 1.1.15 patched with winepulse-0.17.patch and winepulse-0.17-configure.ac.patch

Revision history for this message
In , Julian Sikorski (belegdol) wrote :

Wild guess: did you regenerate configure (./autogen.sh, autoconf) before rebuilding?

Revision history for this message
In , NSLW (nslw) wrote :

(In reply to comment #57)
> Wild guess: did you regenerate configure (./autogen.sh, autoconf) before
> rebuilding?
>
I did autoreconf after applying both patches as described at http://art.ified.ca/?page_id=40

Revision history for this message
In , Julian Sikorski (belegdol) wrote :

OK. I was just making sure we aren't missing something obvious. Cheers!

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Seems in that log that the pulseaudio server crashed or killed the connection. I would suggest first testing without using capture/wavein and seeing if the problem is repeatable. I do confess to never having run counterstrike ever in my life. I would like to hear more about this, but to avoid bugspam we should move this off bugzilla by either emailing me (and maybe cc wine-devel) or the wine forums.

Revision history for this message
In , Morgane “Sardem FF7” Glidic (sardemff7) wrote :

Created an attachment (id=19517)
Patch to add WinePulse in the winecfg, all languages

A little contribution, to make it easier.

Revision history for this message
In , mo0n_sniper (bl4ck-3yed) wrote :

Can you create a .deb with wine and your patch applied.
I would really like to test it, but I really don't like compiling things.
Ever since PulseAudio I can't play any of my favorite games on linux because of huge performance loss.

Revision history for this message
In , NSLW (nslw) wrote :

(In reply to comment #62)
> Can you create a .deb with wine and your patch applied.
> I would really like to test it, but I really don't like compiling things.
> Ever since PulseAudio I can't play any of my favorite games on linux because of
> huge performance loss.
>

If you would like to test PulseAudio without compiling thing then from some time there is non official wine-pulseaudio-1.1.12-1.fc10.rpm for Wine 1.1.12 in Fedora 10.

Revision history for this message
In , Julian Sikorski (belegdol) wrote :

Patches which are present in Fedora 1.1.14 rpm do not work for me.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

I have posted a new version of the winepulse patch on my blog at http://art.ified.ca/?page_id=40 . I would not suggest using the fedora RPMs. No one from red-hat has been in contact with me and I have no idea how old those patches are (methinks they are ancient.) That said, if someone from red-hat wishes to contact me I'll be more than happy to talk :) . I'm not sure how old the patches to the wine-hacks git repository are as well. As for building debs for debian I'm not sure I know how to do that. Personally I run gentoo and have little (but some) experience with Debian / Ubuntu. I develop with the git versions of both the pulseaudio and wine. Best of luck. For people who experience problems with directsound I suggest testing with "hardware acceleration" set to both "emulation" and "full" in winecfg.

Revision history for this message
In , Julian Sikorski (belegdol) wrote :

Not sure how recent the Fedora patches are, but I know they were added at the time 1.1.12 was built:
http://cvs.fedoraproject.org/viewvc/rpms/wine/devel/

Revision history for this message
In , Emmanuel Andry (eandry) wrote :

I've tested the winepulse driver on Mandriva cooker, and I must say that it works very well, even better than ALSA driver : better audio quality and sound glitches disappeared. Very nice work !
I've tested in on Half Life 2 and Dungeon Keeper 2.

I think the patches should be integrated into main tree, since this is the end of sound nightmares on modern main distros which have pulseaudio as default.

Revision history for this message
In , Vitaliy-bugzilla (vitaliy-bugzilla) wrote :

(In reply to comment #67)
> works very well, even better than ALSA driver : better audio quality and sound
> glitches disappeared. Very nice work !
You want to say Wine->Pulse->ALSA works better then Wine->ALSA->Pulse->ALSA? Well DOH! How about Wine->ALSA? Any better?

Revision history for this message
In , Jeremy Visser (jeremy-visser) wrote :

(In reply to comment #68)
> You want to say Wine->Pulse->ALSA works better then Wine->ALSA->Pulse->ALSA?
> Well DOH! How about Wine->ALSA? Any better?

Please refrain from unconstructive comments on this bug report in the future. It is just noise.

(And I am sorry to be making noise myself. I will not say this a second time.)

Revision history for this message
In , Vitaliy-bugzilla (vitaliy-bugzilla) wrote :

This is a point about inclusion of this driver into Wine. It's been stated why it's a bad idea. I've explained AGAIN why. Unless person comparing apples to apples any arguments like "gee it works better then broken ALSA driver" are not going to cut it.

As for the patches themselves:
One of the core functions is not properly implemented (not sure how anything really works for you especially in games where timing of audio events is really critical):

+static HRESULT WINAPI IDsDriverBufferImpl_GetPosition(PIDSDRIVERBUFFER iface,
+ /* These values are fake, and must remain so */
+ if (lpdwPlay)
+ *lpdwPlay = (This->buffer_read_offset + This->buffer_length - This->fraglen * 5) % This->buffer_length;
+ if (lpdwWrite)
+ *lpdwWrite = This->buffer_read_offset;

This is wrong (obviously needs more work):
+static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface,
+ That->buffer = pa_xmalloc0(That->buffer_length);

+ if (That->buffer)
+ HeapFree(GetProcessHeap(), 0, That->buffer);
+ if (*ippdsdb)
+ HeapFree(GetProcessHeap(), 0, That);

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

At last, comments on the code itself :D

For the second example cited from wine/dlls/winepulse.drv/dsoutput.c I'm not sure what you are trying to show, it looks alright to me. The first instance That->buffer = pa_xmalloc0(That->buffer_length) allocates the buffer through the libpulse function pa_xmalloc0 which initializes That->buffer to 0 and in the case off OOM terminates the application. Should HeapAlloc be used in this instance instead? As for the HeapFree() calls on That->buffer and *ippdsdb (which is the value of That), those calls are only reached on error:

    return DS_OK;

err:
    pa_threaded_mainloop_lock(PULSE_ml);
    if (That->stream) {
 if (pa_stream_get_state(That->stream) == PA_STREAM_READY)
     pa_stream_disconnect(That->stream);
 pa_stream_unref(That->stream);
 That->stream = NULL;
    }
    pa_threaded_mainloop_unlock(PULSE_ml);
    if (That->buffer)
 HeapFree(GetProcessHeap(), 0, That->buffer);

    if (*ippdsdb)
 HeapFree(GetProcessHeap(), 0, That);
    *ippdsdb = NULL;
    WARN("exiting with failure.\n");
    return ret;
}

For the first example, the answer is more difficult. It is very hard to place the play pointer, so we set it to be just lagging the write cursor by how much we commit at a time to pulse. The location of This->buffer_read_offset is always correct. It is always a multiple of the fragment size, just like it is for WaveOut Dsound HEL.

I'm waiting until WaveIn support works better before submitting the patches for inclusion because I think that is the right thing to do. Comments? As an aside note, I endorse the fedora packages, if that means anything ;)

Please keep this bug report on topic: better interaction between pulseaudio and wine. You cannot believe that all users will stop using pulseaudio just for the sake of wine. In the long run as pulse becomes and more common and most all applications support it, as current trends suggest, having to manually deal with killing pulseaudio for wine apps to get sound will not look bad for pulseaudio but for wine as it will not "just work." Please be constructive. Commenting on the code is helpful, discrediting the intelligence of people trying the patches is not.

Revision history for this message
In , Vitaliy-bugzilla (vitaliy-bugzilla) wrote :

(In reply to comment #71)
> At last, comments on the code itself :D
You'll get much more of them if you send patches (a series of patches not one big huge as you have here that's impossible to review) to wine-patches ML as RFC.

> For the second example cited from wine/dlls/winepulse.drv/dsoutput.c I'm not
> sure what you are trying to show, it looks alright to me. The first instance
> That->buffer = pa_xmalloc0(That->buffer_length) allocates the buffer through
> the libpulse function pa_xmalloc0 which initializes That->buffer to 0 and in
> the case off OOM terminates the application. Should HeapAlloc be used in this
> instance instead?
You can't allocate something via one method and free it via another one. pa_xmalloc0 and HeapAlloc do not allocate the same memory.

> As for the HeapFree() calls on That->buffer and *ippdsdb
> (which is the value of That), those calls are only reached on error:
Don't check for ptr != NULL before freeing it. HeapFree does that already.

No one shown arguments how pulseaudio any different then most other sound servers (other then minor cosmetic fixes accumulated over the years of arts/esd neglect). Any sound server is just that - a sound server that introduces extra latency and restricts direct sound access. If it can not be disabled programmatically then it's the sound server's bug, not application's that want to access sound directly.

> Please keep this bug report on topic: better interaction between pulseaudio and
> wine.
If you want to make it better fix pulseaudio to be properly suspendable when another applications needs ALSA. Not adding more layers on top. Or at least fix those layers to work properly.

Revision history for this message
In , thgreasi (thgreasi) wrote :

This bug`s name is "Wine should support PulseAudio" and 37 people have already voted that they want it on their wine.
If anyone don`t like pulse, this is not a place for him, especially because OTHER PEOPLE USE THEIR TIME TO SOLVE IT.
On the other hand code discussions are welcome :)

Revision history for this message
In , Dmitry-codeweavers (dmitry-codeweavers) wrote :

As was stated many times "Wine should support PulseAudio" means that
*existing* sound drivers in Wine should be fixed to work better with
PulseAudio, introducing a new driver is not a solution of any kind.

Revision history for this message
In , Myk002 (myk002) wrote :

(In reply to comment #74)
> As was stated many times "Wine should support PulseAudio" means that
> *existing* sound drivers in Wine should be fixed to work better with
> PulseAudio, introducing a new driver is not a solution of any kind.

As an end user, I disagree. PulseAudio is the only sound solution that works properly with my sound setup (ALSA can't handle 6-channel dmixing on my sound card) and I use PulseAudio's ability to set different levels for different streams all the time. I am using PulseAudio very successfully for every other multimedia application in my system. Having to suspend PulseAudio just for wine is an annoyance. Not being able to adjust the sound levels for wine without affecting the rest of the system is an annoyance. Having to manually kill wineserver since my games lock up when I try to run winealsa through a "type pulse" device is an annoyance.

The winealsa driver may need some love as well, but the native PulseAudio driver is the one that I am waiting to use.

Revision history for this message
In , Sorceror (shacklein) wrote :

My personal opinion is that if Wine is going to provide any real support for pulseaudio that a new driver is suitable, like with NAS or ESD. However, it would be nice if pulseaudio would play nice with winealsa (which is not the case currently, nor is it an issue with Wine). If pulseaudio improves its ALSA layer (e.g. making it work beyond "here's a stream I want you to play", I suspect buffering issues are the main problem), Wine may not need any special work at all.

If Wine developers are going to commit a new audio driver, it should be (almost) complete. It's been said before, but we don't need another half-a*** ... I mean half-working audio driver in Wine (like jack, NAS or ESD).

It has also been argued that the *nix world doesn't need another sound daemon. I agree with that, but pulse still exists (unlike arts and ESD), and it would be nice (at least in theory) if Wine could work seamlessly with it. pulse has the capacity to work seamlessly for most ALSA and OSS applications, but its support is not complete enough to keep Wine, Skype and some other applications/games happy.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

(In reply to comment #74)
> As was stated many times "Wine should support PulseAudio" means that
> *existing* sound drivers in Wine should be fixed to work better with
> PulseAudio, introducing a new driver is not a solution of any kind.

That day is almost here. Using PulseAudio 0.9.15-test5 git and the latest wine
git one can get audio to work through winealsa.drv using the pulse alsa plugin
with reasonable success. That said, it makes wine a second-class citizen of
pulseaudio. Some of it's best features, such as the glitch-free playback method
(dynamic hardware buffer size), latency handling and complex audio configurations cannot be exposed or efficiently used.

(In reply to comment #72)
> If you want to make it better fix pulseaudio to be properly suspendable when
> another applications needs ALSA.

pasuspender <command> can do exactly that. This is through the functions
pa_context_suspend_sink_by_index() and pa_context_suspend_source_by_index with
PA_INVALID_INDEX as an argument.

Revision history for this message
In , Walldorf2000 (walldorf2000) wrote :

[quote]Wine->Pulse->ALSA works better then Wine->ALSA->Pulse->ALSA?
[/quote]
Wine->Pulse->ALSA sounds a lot better for me.

Sure any sound server also has disadvantages. But Pulse is there per default in the majority of the current LINIX desktops and this is for good reasons. Gnome, KDE, XFCE all use Pulse. Thus it is not just one more sound server but currently the sound server for LINUX.

There really should be no need for Wine to suspend Pulse.

It should only be necessary as an extra option for special requirements but not for the average user.

Thus it is no question for me that Wine needs a Puls audio driver. The question is if there is somebody willing and capable of writing one with sufficient quality and support.

This seems to be the case. Thus supporting the people who write the driver would be much more efficient then arguing against it.

That there would be much less need for a Pulse driver if Pulse should improve the ALSA layer is not an argument against a Pulse driver.

Revision history for this message
In , Timo A. Hummel (privat-timohummel) wrote :

I have to second Volker's opinion. I'm using an Alesis IO|2 USB sound interface was designed for musicans. As such, it does not provide software mixing - just 2 outputs fixed to 24bits with 48/44.1kHz. Since ALSA does NOT support software mixing on that device for some reason, I decided to go via PulseAudio, and as of today, it is supported by most applications I use.

Since it would not be possible to use VirtualBox and WINE software (and even Firefox with Flash Plugins) at the same time since all three are open virtually all day, it absolutely makes sense to support PulseAudio.

From an end user's point of view, I do not care how it works - it just should work. This is not the case with ALSA and OSS, maybe it would work somehow if I would switch to another soundcard, but that's not a good solution either.

I don't mind if the PulseAudio-Support has higher latency issues - a bad solution is often better than no solution at all.

Revision history for this message
In , Dmitry-codeweavers (dmitry-codeweavers) wrote :

You may try to make this work from the other way around: request PulseAudio
to support Wine properly.

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

Hello,

What do you mean by sound drops ? Do you mean that it stops and you have to restart Wine, or the music stops for a few seconds and then runs again ?

Changed in wine (Ubuntu):
status: New → Incomplete
Revision history for this message
Neil Wilson (neil-aldur) wrote : Re: [Bug 371897] Re: Occasional sound drops in Wine

It's more pops and clicks - suggesting either a latency delay for a
few milli-seconds or the odd usb packet loss. My gut feeling is that
it is delay rather than loss.

Spotify caches tunes in the Windows file system and you get the same
problem replaying a track from the cache - so it doesn't appear to be
buffer exhaustion due to delay over the TCP network. When you get that
the music usually stops for several seconds while it finds a better
peer.

2009/5/5 Steve Dodier <email address hidden>:
> Hello,
>
> What do you mean by sound drops ? Do you mean that it stops and you have
> to restart Wine, or the music stops for a few seconds and then runs
> again ?
>
> ** Changed in: wine (Ubuntu)
>       Status: New => Incomplete
>
> --
> Occasional sound drops in Wine
> https://bugs.launchpad.net/bugs/371897
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Neil Wilson

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote : Re: Occasional sound drops in Wine

I'm not sure Spotify caches the *whole* song, because songs can't be played at all if you're offline. How is your CPU when you listen to music ? Thats not likely but if you abuse your CPU or if it's really old, it could be latency while decyphering the songs, too (since they're encrypted).

Also, you might want to try Wine 1.1.20. I used Spotify a few days ago on Jaunty, with this version, and I didn't have any lags, despite my terribly low bandwidth !

Revision history for this message
Neil Wilson (neil-aldur) wrote : Re: [Bug 371897] Re: Occasional sound drops in Wine

I'll run up the latest 1.1.20 packages from WineHQ and see if it makes
any difference. I don't think the processor is that taxed - usage is
in the 20% range. The first laptop is a brand new Acer Aspire Netbook
with a dual core Atom processor and the other laptop is a T5300 -
which isn't that much of a slouch.

The problem is more pronounced on the slower netbook while using the
USB Audio interface to the external DAC unit.

And regrettably I don't get any of these issues if I switch to the
Dark Side of the Force and run Spotify in Windows.

2009/5/5 Steve Dodier <email address hidden>:
> I'm not sure Spotify caches the *whole* song, because songs can't be
> played at all if you're offline. How is your CPU when you listen to
> music ? Thats not likely but if you abuse your CPU or if it's really
> old, it could be latency while decyphering the songs, too (since they're
> encrypted).
>
> Also, you might want to try Wine 1.1.20. I used Spotify a few days ago
> on Jaunty, with this version, and I didn't have any lags, despite my
> terribly low bandwidth !
>
> --
> Occasional sound drops in Wine
> https://bugs.launchpad.net/bugs/371897
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Neil Wilson

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

Alright, there is something I forgot, as I'm myself not using it :
PulseAudio :)

Try to shut PulseAudio down (set ALSA in your sound preferences, everywhere,
then "ps aux | grep pulse" then for each PID (second number from the left)
"kill -9 PID", and make sure it doesnt spawn back by doing another ps aux
after - if it does spawn back, modify /etc/pulse/client.conf with a text
editor, and change autospawn to false).

Once Pulse is down, change the sound driver of Wine to ALSA in winecfg, and
tell me how the sound is.

Cordially, SD.
--
Steve Dodier
OpenPGP : 0E5E4ECB
IRC : SiDi on irc.freenode.net
Jabber : <email address hidden>
<email address hidden>
https://launchpad.net/~sidi

Revision history for this message
Neil Wilson (neil-aldur) wrote :

The idea of filing this bug is to work our how to get Spotify/Wine to
work *with* pulseaudio and the standard Ubuntu audio stack.

Yes getting rid of Pulseaudio eliminates the problem, but it also
eliminates the ability to switch streams 'on the fly' between
different output devices.

How do we fix pulseaudio so that it works properly?

2009/5/5 Steve Dodier <email address hidden>:
> Alright, there is something I forgot, as I'm myself not using it :
> PulseAudio :)
>
> Try to shut PulseAudio down (set ALSA in your sound preferences, everywhere,
> then "ps aux | grep pulse" then for each PID (second number from the left)
> "kill -9 PID", and make sure it doesnt spawn back by doing another ps aux
> after - if it does spawn back, modify /etc/pulse/client.conf with a text
> editor, and change autospawn to false).
>
> Once Pulse is down, change the sound driver of Wine to ALSA in winecfg, and
> tell me how the sound is.
>
> Cordially, SD.
> --
> Steve Dodier
> OpenPGP : 0E5E4ECB
> IRC : SiDi on irc.freenode.net
> Jabber : <email address hidden>
> <email address hidden>
> https://launchpad.net/~sidi
>
> --
> Occasional sound drops in Wine
> https://bugs.launchpad.net/bugs/371897
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Neil Wilson

summary: - Occasional sound drops in Wine
+ Occasional sound drops in Wine via PulseAudio
Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

The Wine devs are extremely aware of the problem with PulseAudio, but I
don't think it's a priority, as they currently work on Wine 64bit
applications and Directx10, amongst other things. There isn't much we can do
by the meanwhile. I'm personnally under Xubuntu, I don't have PA and Spotify
rocks here.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #78)
> Sure any sound server also has disadvantages. But Pulse is there per default in
> the majority of the current LINIX desktops and this is for good reasons. Gnome,
> KDE, XFCE all use Pulse. Thus it is not just one more sound server but
> currently the sound server for LINUX.

Big falsehood here. Gnome and KDE on *some* distributions (Ubuntu, Fedora, Mandriva come to mind) use pulse by default. They are all capable of using ALSA (with dmix if required) directly. XFCE does not use pulse, nor does xubuntu from what I've heard.

(In reply to comment #78)
> There really should be no need for Wine to suspend Pulse.
>
> It should only be necessary as an extra option for special requirements but not
> for the average user.

Pulseaudio itself is a special requirement because its ALSA layer is broken.

(In reply to comment #78)
> Thus it is no question for me that Wine needs a Puls audio driver. The question
> is if there is somebody willing and capable of writing one with sufficient
> quality and support.
>
> This seems to be the case. Thus supporting the people who write the driver
> would be much more efficient then arguing against it.
>
> That there would be much less need for a Pulse driver if Pulse should improve
> the ALSA layer is not an argument against a Pulse driver.

Yes it is. One of the main points about pulseaudio is that it's meant to work with <insert sound system here> without the application needing modifications. This is true for the majority of ALSA/OSS applications. Wine doesn't *need* a pulse driver if:
1) winealsa is improved to work better with current pulseaudio
2) pulseaudio is improved to have a fully working ALSA compatibility layer

Both of these options have the advantage that no new driver needs to be included and maintained.

Revision history for this message
In , nh2 (nh2) wrote :

I can confirm that these patches work very well for me.

Until now, this seems to be the only way to get a Wine game and a native program (e.g. a VoIP client like Mumble) working with sound simultaneously.
Imagine the stupidity of the situation before: I had to chose if I either wanted to hear the people I'm playing with speaking OR ingame sound.

Revision history for this message
In , magilus (magilus) wrote :

Fedora has been shipping those patches for a long time now and I did not run into any problem except that sound just works fine - no matter if I listen to music or not. Output is set to ALSA.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Well, I'm still trying to improve the patches in my spare time as a slight hobby. Time has just been kind of short because of travel and work. If somebody has a good suggestion of a simple Directsound Capture application to test with other than the wine directsound tests I would appreciate it.

Revision history for this message
In , nh2 (nh2) wrote :

Some were asking for binary packages. Well, here you are.
I created .debs with the WinePulse patches (currently based on Wine 1.1.21) for Ubuntu Jaunty in my PPA (https://launchpad.net/~nh2/+archive/ppa).
Feel free to test, link or copy them - whatever you want.
(You may add them via sources.list or just download the deb package; they might work well on Debian, too.)

Revision history for this message
In , Aigars Mahinovs (aigarius) wrote :

As a coment to people suggesting suspending Pulse is the solution - a lot of people play WoW with a Ventrilo client and need to hear the sound from *both*, also it is common to have some relaxing music in the background from a non-Wine source. Pulse and DMix can provide that, but DMix is a pain to configure, while Pulse looks to be nicely preconfigured out-of-the-box in latest distributions, so supporting such mode of operation by default would be very useful.

Revision history for this message
In , Dmitry-codeweavers (dmitry-codeweavers) wrote :

*** Bug 18740 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Scott Ritchie (scottritchie) wrote :
Download full text (5.3 KiB)

http://0pointer.de/blog/projects/guide-to-sound-apis.html

If we want PulseAudio to work well, we have to limit ourselves to the safe
subset of the ALSA API.

DONTS:

    * Do not use "async handlers", e.g. via snd_async_add_pcm_handler() and
friends. Asynchronous handlers are implemented using POSIX signals, which is a
very questionable use of them, especially from libraries and plugins. Even when
you don't want to limit yourself to the safe ALSA subset it is highly
recommended not to use this functionality. Read this for a longer explanation
why signals for audio IO are evil.
    * Do not parse the ALSA configuration file yourself or with any of the ALSA
functions such as snd_config_xxx(). If you need to enumerate audio devices use
snd_device_name_hint() (and related functions). That is the only API that also
supports enumerating non-hardware audio devices and audio devices with drivers
implemented in userspace.
    * Do not parse any of the files from /proc/asound/. Those files only
include information about kernel sound drivers -- user-space plugins are not
listed there. Also, the set of kernel devices might differ from the way they
are presented in user-space. (i.e. sub-devices are mapped in different ways to
actual user-space devices such as surround51 an suchlike.
    * Do not rely on stable device indexes from ALSA. Nowadays they depend on
the initialization order of the drivers during boot-up time and are thus not
stable.
    * Do not use the snd_card_xxx() APIs. For enumerating use
snd_device_name_hint() (and related functions). snd_card_xxx() is obsolete. It
will only list kernel hardware devices. User-space devices such as sound
servers, Bluetooth audio are not included. snd_card_load() is completely
obsolete in these days.
    * Do not hard-code device strings, especially not hw:0 or plughw:0 or even
dmix -- these devices define no channel mapping and are mapped to raw kernel
devices. It is highly recommended to use exclusively default as device string.
If specific channel mappings are required the correct device strings should be
front for stereo, surround40 for Surround 4.0, surround41, surround51, and so
on. Unfortunately at this point ALSA does not define standard device names with
channel mappings for non-kernel devices. This means default may only be used
safely for mono and stereo streams. You should probably prefix your device
string with plug: to make sure ALSA transparently reformats/remaps/resamples
your PCM stream for you if the hardware/backend does not support your sampling
parameters natively.
    * Do not assume that any particular sample type is supported except the
following ones: U8, S16_LE, S16_BE, S32_LE, S32_BE, FLOAT_LE, FLOAT_BE, MU_LAW,
A_LAW.
    * Do not use snd_pcm_avail_update() for synchronization purposes. It should
be used exclusively to query the amount of bytes that may be written/read right
now. Do not use snd_pcm_delay() to query the fill level of your playback
buffer. It should be used exclusively for synchronisation purposes. Make sure
you fully understand the difference, and note that the two functions return
values that are not necessarily directly connected!
    * Do not assume that the m...

Read more...

Revision history for this message
In , Walldorf2000 (walldorf2000) wrote :

Is there any hope that the list of DONTS in Scott Richies bug report:
   http://bugs.winehq.org/show_bug.cgi?id=18740

And the analysis of Roderick Colenbrander in
   http://www.winehq.org/pipermail/wine-devel/2009-June/076112.html

brings Wine any further on this topic?

"I have quickly checked the code and this are I think some of the
'easy' DONTs we violate:
- we use snd_config_xxx(), this is replaceable by snd_device_name_hint()
- we use snd_card_xxx(), this can be replaced by snd_device_name_hint()
- we hard code device strings (e.g. plughw0)
- we use snd_pcm_avail_update and snd_pcm_delay
(there might be some more but those are less trivial to check)

The most critical are the following:
- Do not assume that all devices support MMAP style buffer access.
- Do not assume that the hardware pointer inside the (possibly mmaped)
playback buffer is the actual position of the sample in the DAC. There
might be an extra latency involved.
- Do not try to recover with your own code from ALSA error conditions
such as buffer under-runs. Use snd_pcm_recover() instead.
- Do not touch buffering/period metrics unless you have specific
latency needs. Develop defensively, handling correctly the case when
the backend cannot fulfill your buffering metrics requests. Be aware
that the buffering metrics of the playback buffer only indirectly
influence the overall latency in many cases. i.e. setting the buffer
size to a fixed value might actually result in practical latencies
that are much higher.

Especially the first one direct sound is all about direct card access
and hence mmap ..

Roderick
"

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #86)
> As a coment to people suggesting suspending Pulse is the solution - a lot of
> people play WoW with a Ventrilo client and need to hear the sound from *both*,
> also it is common to have some relaxing music in the background from a non-Wine
> source. Pulse and DMix can provide that, but DMix is a pain to configure, while
> Pulse looks to be nicely preconfigured out-of-the-box in latest distributions,
> so supporting such mode of operation by default would be very useful.

dmix should not require configuration. It should Just Work(TM) with default settings (i.e. no asound.conf or .asoundrc files).

Revision history for this message
Neil Wilson (neil-aldur) wrote :

There seems to be an ongoing debate as to whether to add a direct Pulseaudio driver to wine, or improve the ALSA conversion layer in Pulseaudio.

I think we need to get a consensus on which direction to take first - and that will determine which package gets this bug.

Changed in wine (Ubuntu):
status: Incomplete → New
Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Created an attachment (id=21805)
winepulse [2 of 2]: Winmm driver for pulseaudio

Adds winmm driver dlls/winepulse.drv providing support for audio playback and capture from pulseaudio. See comment 50 for the required configure script checks. See comment 61 for adding support to winecfg. See http://art.ified.ca/?page_id=40 for more information.

Revision history for this message
In , Dmitry-codeweavers (dmitry-codeweavers) wrote :

(In reply to comment #91)
> Created an attachment (id=21805) [details]
> winepulse [2 of 2]: Winmm driver for pulseaudio

Adding such an attachment is wrong and useless. Please keep this separate
from this bug, since
1. this will never be committed to WineHQ (the reasons are mentioned
numerous times in this bug)
2. bugzilla is not an appropriate storage place for not acceptable patches

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

(In reply to comment #92)

> 1. this will never be committed to WineHQ (the reasons are mentioned
> numerous times in this bug)
Only comments against the _inclusion_ of such a driver are:
comment 4 - assumes the cassical view of audio hardware (what about USB? Bluetooth headsets? Networked? Hotplugged? Device change-on-fly?)
comment 6 - assumes that the only use of wine is for games. What about media players? Audio development environments? Telephony/VoIP?
comment 52 - claims non-existent or non-factual previous comments as proof

"Serious gamers" can always continue to use direct alsa. This is in no way changed by the inclusion of a pulse winmm driver.

The text of this bug is "Wine should have a PulseAudio output plugin" not "Wine should clean up its alsa code"

Using a pulseaudio wine driver it is easy for me to capture audio from live playback or hardware inputs by recording software. This is not easy under alsa. Multiple stream instances per device in both directions are supported. Easy network transparency, better hardware buffer control, better volume control. All are possible.

I personally have been contacted by many wine users who have championed my efforts and offered support. I cannot believe that a project the size of wine would allow the misguided best interests of few to alienate users.

Revision history for this message
In , Removed by request (removed1836289) wrote :

(In reply to comment #92)
> (In reply to comment #91)
> > Created an attachment (id=21805) [details] [details]
> > winepulse [2 of 2]: Winmm driver for pulseaudio
>
> Adding such an attachment is wrong and useless. Please keep this separate
> from this bug, since
> 1. this will never be committed to WineHQ (the reasons are mentioned
> numerous times in this bug)
> 2. bugzilla is not an appropriate storage place for not acceptable patches

There are plenty of "hacks" floating around bugzilla. This patch is actually useful, there is really no need to just shrug it off.
It should probably be uploaded on hacks.git, as well.

Revision history for this message
In , Kyle1-schrecknet (kyle1-schrecknet) wrote :

(In reply to comment #92)
> Adding such an attachment is wrong and useless. Please keep this separate
> from this bug, since
> 1. this will never be committed to WineHQ (the reasons are mentioned
> numerous times in this bug)
> 2. bugzilla is not an appropriate storage place for not acceptable patches

Please stop referencing these dummy reasons and admit that Codeweavers is going to make its next product with "exclusive" PulseAudio suport. Art sounds absolutely sane - PulseAudio has its demand between Wine users and you know it. I'm sick of ALSA plugin for PulseAudio and using Wine with PulseAdio patches. Thank you Art for your efforts.

Revision history for this message
In , Austin English (austinenglish) wrote :

(In reply to comment #95)
> (In reply to comment #92)
> > Adding such an attachment is wrong and useless. Please keep this separate
> > from this bug, since
> > 1. this will never be committed to WineHQ (the reasons are mentioned
> > numerous times in this bug)
> > 2. bugzilla is not an appropriate storage place for not acceptable patches
>
> Please stop referencing these dummy reasons and admit that Codeweavers is going
> to make its next product with "exclusive" PulseAudio suport. Art sounds
> absolutely sane - PulseAudio has its demand between Wine users and you know it.
> I'm sick of ALSA plugin for PulseAudio and using Wine with PulseAdio patches.
> Thank you Art for your efforts.

You're free to compile Wine with Puleaudio drivers, the source is there. The PulseAudio driver won't be accepted as is for the reasons mentioned.

-A volunteer wine developer with no Codeweavers' ties

Revision history for this message
In , Hverbeet (hverbeet) wrote :

(In reply to comment #95)
> Please stop referencing these dummy reasons and admit that Codeweavers is going
> to make its next product with "exclusive" PulseAudio suport.
I'm pretty sure we won't.

You could of course try submitting the patch anyway and watch it drop. Last time someone submitted this patch Michael Stefaniuc actually reviewed part of it (http://www.winehq.org/pipermail/wine-devel/2009-April/074666.html). As far as I can see the issues he brought up aren't even fixed in this version.

Revision history for this message
In , Dmitry-codeweavers (dmitry-codeweavers) wrote :

(In reply to comment #95)
> Please stop referencing these dummy reasons and admit that Codeweavers is going
> to make its next product with "exclusive" PulseAudio suport.

Please stop thinking that other people tend to do what you do think is
appropriate by your own merits.

> Art sounds
> absolutely sane - PulseAudio has its demand between Wine users and you know it.

Please carefully re-read all the comments in this bug report from the very
start.

> I'm sick of ALSA plugin for PulseAudio and using Wine with PulseAdio patches.

Patches are always welcome.

Revision history for this message
In , Kyle1-schrecknet (kyle1-schrecknet) wrote :

(In reply to comment #98)
> Please carefully re-read all the comments in this bug report from the very
> start.

Just did it. There are 2 types of comments here:
1) From users who got their stuff working with winepulse.
2) From developers speaking about a)hardcore gaming and b)redundant code.

a)References to "hardcore" gamers make me smile, they use Windows or native games. Btw didn't Vista bury DirectSound?
b)Technically you are right, there is no reason to make something already done.
There is very interesting comment #89 pointing to http://www.winehq.org/pipermail/wine-devel/2009-June/076112.html.

Quote:
>> > First, I talked with a Pulseaudio expert about what we can do to make
>> > things work better. He said that if we want good compatibility we will
>> > need our ALSA stack to use the Pulseaudio safe subset:
>> > http://0pointer.de/blog/projects/guide-to-sound-apis.html. I've filed a
>> > metabug tracking this here:
>> > http://bugs.winehq.org/show_bug.cgi?id=18740. Use of this unsafe subset
>> > can cause most problems with stuttering or even complete dropoff.

So, your opinion is that someone has to rewrite ALSA stack in Wine to close this bug. Fine. Any ideas when?
Why not to use native backend when it solves the problem? End users are interested only in convenience and stability.

<offtopic> I wonder why all the ancient sound backends still live in the code tree. Doesn't ALSA and Jack cover all user needs? <offtopic/>

Revision history for this message
In , Walldorf2000 (walldorf2000) wrote :

In my opinion http://bugs.winehq.org/show_bug.cgi?id=18740 is not a DUPREC of this message and hence should be reopened.

This message here is about getting a PulseAudio driver in Wine.

The other message is about using the known save ALSA API for the ALSA driver.

Both could help to change the situation for the better.

Force the people to switch of PulseAudio until PulseAudio supports the complete ALSA API flawlessly is not an option. You should really read
http://0pointer.de/blog/projects/guide-to-sound-apis.html
to understand that this will never happen.

Once Wine uses the known save ALSA API and there are still problems with PulseAudio I'm sure that the colleagues from PulseAudio are willing to iron out the remaining issues.

PulsAudio is the most important sound system on contemporary LINUX systems. It doesn't end with Mandriva, Fedora and Ubuntu. ESD e.g. is virtually dead.

I suggest to reopen bug 18740 and discuss here what is needed to get the PulseAudio driver into Wine.

Developers should support each other instead of running useless discussions. The situation is somewhat similar to the DIB engine saga and is not helpful for Wine on the long run.

Revision history for this message
In , Austin English (austinenglish) wrote :

(In reply to comment #99)
> So, your opinion is that someone has to rewrite ALSA stack in Wine to close
> this bug. Fine. Any ideas when?

As was pointed out in the recent wine-devel topic, there's not anyone actively maintaining the sound code. Volunteers/patches would be welcome to do this work.

> <offtopic> I wonder why all the ancient sound backends still live in the code
> tree. Doesn't ALSA and Jack cover all user needs? <offtopic/>

People forget that wine is used on more than just Linux...OpenSolaris, for instance, has no support for ALSA and depends on OSS.

Revision history for this message
In , Johan Walles (walles) wrote :

(In reply to comment #101)
> As was pointed out in the recent wine-devel topic, there's not anyone actively
> maintaining the sound code. Volunteers/patches would be welcome to do this
> work.

1. The Wine maintainers want volunteers/patches for the sound code.
2. Art voluntarily writes a very popular patch to the sound code.
3. The Wine maintainers tell Art to go away and take his patches with him.

Maybe Wine needs to try some other way of attracting new maintainers?

Revision history for this message
In , Austin English (austinenglish) wrote :

(In reply to comment #102)
> (In reply to comment #101)
> > As was pointed out in the recent wine-devel topic, there's not anyone actively
> > maintaining the sound code. Volunteers/patches would be welcome to do this
> > work.
>
> 1. The Wine maintainers want volunteers/patches for the sound code.
> 2. Art voluntarily writes a very popular patch to the sound code.
> 3. The Wine maintainers tell Art to go away and take his patches with him.
>
> Maybe Wine needs to try some other way of attracting new maintainers?

Adding a large new feature != maintaining old stuff.

Getting some smaller fixes in and proving you know what you're doing in the wine source code would help with getting the pulseaudio driver in.

As has been said before, rather than adding new features and causing new regressions, let's start by fixing the easy stuff first, by making winealsa behave better.

Revision history for this message
In , Sorceror (shacklein) wrote :
Download full text (3.3 KiB)

(In reply to comment #100)
> In my opinion http://bugs.winehq.org/show_bug.cgi?id=18740 is not a DUPREC of
> this message and hence should be reopened.
>
> This message here is about getting a PulseAudio driver in Wine.

The original post was, but it has also become related to getting winealsa to talk to pulse better, hence the DUPLICATE.

> Force the people to switch of PulseAudio until PulseAudio supports the complete
> ALSA API flawlessly is not an option. You should really read
> http://0pointer.de/blog/projects/guide-to-sound-apis.html
> to understand that this will never happen.

Blogs are not generally good references for unbiased information on any subject, however there is some very interesting information in this article.
1) "PulseAudio is not useful in professional audio production environments."
2) "I want to do professional audio programming, hard-disk recording, music synthesizing, MIDI interfacing! Use JACK and/or the full ALSA interface."
3) "I want to write audio software for the plumbing layer! Use the full ALSA stack."

Wine has to be able to provide a professional-quality audio system for those apps and users who need it. Though this does not impair the inclusion of a pulseaudio driver for those who *don't* need professional audio, point #2 implies that Pulseaudio support will be crippled or insufficient even for more common tasks.

I also suspect that Wine fits into the #3 category. Remember that Wine is not a regular application but a compatibility layer between win32 and Unix-likes. By definition, it does weird stuff.

> Once Wine uses the known save ALSA API and there are still problems with
> PulseAudio I'm sure that the colleagues from PulseAudio are willing to iron out
> the remaining issues.

Once someone proves that it is even possible for Wine to use *only* the safe ALSA API for everything (ideally with patches), this might be a valid point to argue.

> PulsAudio is the most important sound system on contemporary LINUX systems. It
> doesn't end with Mandriva, Fedora and Ubuntu. ESD e.g. is virtually dead.

Pulseaudio is NOT the most important sound system on Linux; ALSA is (some would argue OSS is, but they usually mean OSS4 which is not included in kernel upstream). You couldn't have sound daemons without the ALSA (or OSS) drivers and (in the case of ALSA) the userspace libraries supporting them.

ALSA is guaranteed (barring user fiddling) to be installed with software mixing capabilities superior to Pulseaudio (as in not restricting to the "safe" ALSA call subset) on all Linux systems. OSS is virtually guaranteed to be available on other Unix-likes (coreaudio for MacOSX, I believe). Pulseaudio is still at best an optional extra for most, and probably should still be optional for everyone using Mandriva, Fedora and Ubuntu due to the number of problems with the architecture.

Pulseaudio is a return to the ancient, pre-dmix-by-default architecture of driver + daemon (that produced the now dead esd and arts daemons) to provide software mixing to cards that don't have hardware mixing. It SHOULD have been a drop-in replacement for dmix, but it's far from it.

Long post. Short version is: Pulseaudio driver is uns...

Read more...

Revision history for this message
In , Aigars Mahinovs (aigarius) wrote :

> Pulseaudio is a return to the ancient, pre-dmix-by-default architecture of
> driver + daemon (that produced the now dead esd and arts daemons) to provide
> software mixing to cards that don't have hardware mixing. It SHOULD have been a
> drop-in replacement for dmix, but it's far from it.

Pulseaudio is far superior to dmix from the end-user functionality - there is a trivial interface provided to adjust volume for each application individually with a live feed of sound level alongside it to see the effect, applications can be transferred from one sound to another without interrupting playback and with no need to support this transition in any way in the application itself, this includes hot-plug support for sound devises such as usb headphones, bluetooth headsets and soundcards connected to remote computers. Try running 'padevchooser' on Ubuntu 9.04 and explore the options there to see what I am talking about.

I was a sceptic of PA seeing it as just another ESD replacements, but the fact is PulseAudio is much more - it has finally brought real and usable control over the sound in Linux systems. All other options that we currently have in Linux do not even come close.

JACK is only needed for sound editing, where you must have guaranteed real-time latency (which Wine does not provide anyway) and it is possible that FPS players could benefit by disabling PA and using ALSA directly to gain a few miliseconds in audio latency. However for the rest of Wine users PulseAudio is the ultimate option in usability.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #105)
> > Pulseaudio is a return to the ancient, pre-dmix-by-default architecture of
> > driver + daemon (that produced the now dead esd and arts daemons) to provide
> > software mixing to cards that don't have hardware mixing. It SHOULD have been a
> > drop-in replacement for dmix, but it's far from it.
>
> Pulseaudio is far superior to dmix from the end-user functionality

Not for Wine (currently), nor is that an issue relating to this bug. It's not developer-friendly. Your discussion of end-user features is irrelevant to this discussion. It is still a sound daemon, with all the limitations thereof (e.g. no hardware mixing), and plug pulse still SHOULD have been a drop-in replacement for dmix.

> I was a sceptic of PA seeing it as just another ESD replacements, but the fact
> is PulseAudio is much more - it has finally brought real and usable control
> over the sound in Linux systems. All other options that we currently have in
> Linux do not even come close.

So fix it. Write a per-stream volume control plugin for ALSA/dmix or JACK.

> JACK is only needed for sound editing, where you must have guaranteed real-time
> latency (which Wine does not provide anyway)

Wine's support for latency is not the real issue here, nor are you correct about JACK *only* being needed for sound editing, but that's all off-topic here.

> and it is possible that FPS
> players could benefit by disabling PA and using ALSA directly to gain a few
> miliseconds in audio latency. However for the rest of Wine users PulseAudio is
> the ultimate option in usability.

Not when it doesn't work. And "a few milliseconds" is much more significant than you may think, especially when it's adding to already existing latency issues (which is the current problem with winealsa and plug pulse).

Regardless, you're not adding much (if anything) to this discussion ... Which option are you voting for, the "winepulse driver" option or the "fix winealsa" option?

Revision history for this message
In , Removed by request (removed1836289) wrote :

(In reply to comment #106)
> Regardless, you're not adding much (if anything) to this discussion ... Which
> option are you voting for, the "winepulse driver" option or the "fix winealsa"
> option?

There's no vote going on! Everyone agreed winealsa needs to be fixed. What still is undetermined is whether, once fixed, there will still be a need for a winepulse driver.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #107)
> (In reply to comment #106)
> > Regardless, you're not adding much (if anything) to this discussion ... Which
> > option are you voting for, the "winepulse driver" option or the "fix winealsa"
> > option?
>
> There's no vote going on! Everyone agreed winealsa needs to be fixed. What
> still is undetermined is whether, once fixed, there will still be a need for a
> winepulse driver.

Sorry, I didn't mean to imply the vote was valid :)

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

http://www.winehq.org/pipermail/wine-devel/2009-June/076575.html

"I would still continue to work and maintain the pulseaudio winmm
patches externally, but I will not try for inclusion."

Revision history for this message
In , Aigars Mahinovs (aigarius) wrote :

(In reply to comment #106)
> > Pulseaudio is far superior to dmix from the end-user functionality
>
> Not for Wine (currently), nor is that an issue relating to this bug. It's not
> developer-friendly. Your discussion of end-user features is irrelevant to this
> discussion.

You contradict yourself just a few lines down where you talk about latency. Pulseaudio provides what is desired by users, so a suggestion to just disable it to run Wine is likely to be greeted just like a suggestion to just disable X and run Wine in a framebuffer.

> > All other options that we currently have in
> > Linux do not even come close.
>
> So fix it. Write a per-stream volume control plugin for ALSA/dmix or JACK.

That is not possible - an ALSA device changing the amount of mixers it has at runtime will break all kinds of funny things. And why should I write a completely new sound driver in the kernel or a subsystem in Jack just because you don't want to accept a new feature or a subsystem in Wine?

> > JACK is only needed for sound editing, where you must have guaranteed real-time
> > latency (which Wine does not provide anyway)
>
> Wine's support for latency is not the real issue here, nor are you correct
> about JACK *only* being needed for sound editing, but that's all off-topic
> here.

And yet you bring up latency as the reason why adding PulseAudio to the stack is unacceptable and do not provide an example of widespread Jack use outside audio editing circles.

> > and it is possible that FPS
> > players could benefit by disabling PA and using ALSA directly to gain a few
> > miliseconds in audio latency. However for the rest of Wine users PulseAudio is
> > the ultimate option in usability.
>
> Not when it doesn't work.

PulseAudio works just fine. It has far less bugs than ESD had when driver for it was introduced into Wine.

> And "a few milliseconds" is much more significant
> than you may think, especially when it's adding to already existing latency
> issues (which is the current problem with winealsa and plug pulse).

And if that is so, then no pro-gamer would choose Wine anyway, so why cater to them?

> Regardless, you're not adding much (if anything) to this discussion ... Which
> option are you voting for, the "winepulse driver" option or the "fix winealsa"
> option?

I *advocate* that both bugs - the wishlist bug of a new driver for pulse and a bug that wine uses nonsafe ALSA API should be fixed.

With the way Ubuntu and Fedora are pushing for PulseAudio, I would not be surprised if the respective maintainers would pick this patch up and apply it in these distributions, regardless of your personal opinion on the matter. It would be better if such features were included and cleaned up upstream, however.

Revision history for this message
In , Sorceror (shacklein) wrote :
Download full text (4.2 KiB)

(In reply to comment #110)
> Pulseaudio provides what is desired by users, so a suggestion to just disable
> it to run Wine is likely to be greeted just like a suggestion to just disable X
> and run Wine in a framebuffer.

I don't follow the logic, unless you can provide a working X11 emulator for framebuffer that provides hardware accelerated OpenGL. It'd be more like if XCB wasn't written to be fully backwards compatible with libx11, and the developers of XCB saying "fix your broken X11 apps so they'll work with our shiny new XCB".

> > So fix it. Write a per-stream volume control plugin for ALSA/dmix or JACK.
>
> That is not possible - an ALSA device changing the amount of mixers it has at
> runtime will break all kinds of funny things. And why should I write a
> completely new sound driver in the kernel or a subsystem in Jack just because
> you don't want to accept a new feature or a subsystem in Wine?

libasound is userspace, not kernel.

> > > JACK is only needed for sound editing, where you must have guaranteed real-time
> > > latency (which Wine does not provide anyway)
> >
> > Wine's support for latency is not the real issue here, nor are you correct
> > about JACK *only* being needed for sound editing, but that's all off-topic
> > here.
>
> And yet you bring up latency as the reason why adding PulseAudio to the stack
> is unacceptable and do not provide an example of widespread Jack use outside
> audio editing circles.

1) JACK is completely off-topic for this bug.
2) "not the real issue" for JACK. JACK needs real-time kernel support for real low-latency stuff. Same as Pulse in this way.
3) I did not bring up latency; I was responding to someone else who did.

> > > and it is possible that FPS
> > > players could benefit by disabling PA and using ALSA directly to gain a few
> > > miliseconds in audio latency. However for the rest of Wine users PulseAudio is
> > > the ultimate option in usability.
> >
> > Not when it doesn't work.
>
> PulseAudio works just fine.

No it doesn't. If it did, we wouldn't need a discussion on the best way to improve Pulseaudio support in Wine.

> It has far less bugs than ESD had when driver for
> it was introduced into Wine.

Difference is that ESD and Arts daemons did not provide an ALSA compatibility layer. Pulseaudio does, but it doesn't suit Wine's current needs.

> > And "a few milliseconds" is much more significant
> > than you may think, especially when it's adding to already existing latency
> > issues (which is the current problem with winealsa and plug pulse).
>
> And if that is so, then no pro-gamer would choose Wine anyway, so why cater to
> them?

Who said anything about GAMING? Wine is not just used by gamers, nor is Linux. Even so, Wine's goal is to cater to *everyone*. Low-latency is required for professionals, but it doesn't matter for regular users. So you're suggesting Wine should explicitly say "we don't want professionals, only casual users" by saying latency is not an issue.

> > Regardless, you're not adding much (if anything) to this discussion ... Which
> > option are you voting for, the "winepulse driver" option or the "fix winealsa"
> > option?
>
> I *advocate* that b...

Read more...

Revision history for this message
In , Morgane “Sardem FF7” Glidic (sardemff7) wrote :

(In reply to comment #111)
> > PulseAudio works just fine.
>
> No it doesn't. If it did, we wouldn't need a discussion on the best way to
> improve Pulseaudio support in Wine.

PulseAudio works fine, any application using natively PulseAudio doesn't have problem. There is no way to say "this application doesn't work fine" just because you don't want to use it.

> Difference is that ESD and Arts daemons did not provide an ALSA compatibility
> layer. Pulseaudio does, but it doesn't suit Wine's current needs.

And Wine provide compatibility layer for Windows application, doesn't it ? And I note that so much applications doesn't work, it doesn't suit users' needs so ?

> Who said anything about GAMING? Wine is not just used by gamers, nor is Linux.
> Even so, Wine's goal is to cater to *everyone*. Low-latency is required for
> professionals, but it doesn't matter for regular users. So you're suggesting
> Wine should explicitly say "we don't want professionals, only casual users" by
> saying latency is not an issue.

Wine is not the solution for professional, they use Windows, as gamers. And we don't say "remove ALSA and Jack drivers", they have to still in Wine, for these aims. We just need a PulseAudio driver, because no other driver provides what a PulseAudio one can : simple software mixing without latency (for human ear).

And PulseAudio can use ALSA and/or OSS to output sound, so a common WinePulse driver is a good solution about "OSS or ALSA"-platform choice.

> These patches are not supported by WineHQ in any way. If Ubuntu and Fedora
> package maintainers do so, then it is their responsibility to manage any bugs
> or technical support relating to Pulse and Wine. Users with prepackaged
> winepulse drivers that post on the WineHQ forum, users mailing list or IRC
> channel will be inevitably turned away and sent to the relevant distro-specific
> forum.

Fedora does it yet, and does fine. They are thinking about users, and all main applications in Fedora works fine with PulseAudio.

But why discuss about that ? The driver is here. It needs some improvement, I agree, but it works. Will another sound driver in Wine broke it ? We need the ALSA driver, for hardware stuff, but we need PulseAudio too.

Revision history for this message
In , Aigars Mahinovs (aigarius) wrote :

(In reply to comment #111)
> (In reply to comment #110)
> > Pulseaudio provides what is desired by users, so a suggestion to just disable
> > it to run Wine is likely to be greeted just like a suggestion to just disable X
> > and run Wine in a framebuffer.
>
> I don't follow the logic

That is obvious. A new technology comes along that is by many account better than the one before it and that build upon the previous technology. And instead of supporting the new technology directly you demand that users disable the new technology to use your software.

> > PulseAudio works just fine.
>
> No it doesn't. If it did, we wouldn't need a discussion on the best way to
> improve Pulseaudio support in Wine.

Pulseaudio works just fine. Wine is the one that fails to provide support for pulseaudio.

> > It has far less bugs than ESD had when driver for
> > it was introduced into Wine.
>
> Difference is that ESD and Arts daemons did not provide an ALSA compatibility
> layer. Pulseaudio does, but it doesn't suit Wine's current needs.

So, Pulseaudio is being penalized befause it is better??? You are getting ridiculous here.

> > > And "a few milliseconds" is much more significant
> > > than you may think, especially when it's adding to already existing latency
> > > issues (which is the current problem with winealsa and plug pulse).
> >
> > And if that is so, then no pro-gamer would choose Wine anyway, so why cater to
> > them?
>
> Who said anything about GAMING?

Please read back the bug thread your are replying to (starting with comment number 4 and 7). All specific examples related to latency mentioned here were about gaming, first-person shooters to be exact. If you want to provide another example where overhead of Pulseaudio would be significant, please provide examples with testable use cases.

> > I *advocate* that both bugs - the wishlist bug of a new driver for pulse and a
> > bug that wine uses nonsafe ALSA API should be fixed.
>
> This is no longer a considered a "wishlist for driver" bug; it is considered to
> be for improvement of winealsa to talk to Pulse better.

You can consider it what you want. The bug is a feature request for adding a PulseAudio output driver to Wine and nothing else. Restricting Wine's ALSA driver to the safe subset of the API is a separate bug that has nothing to do with this one ( http://bugs.winehq.org/show_bug.cgi?id=18740 ).

I will stop replying to you comments now, because you have not provided a single logical objection to Pulseaudio output driver besides 'I am too lazy to potentially have to look at it at some point later on'.

Revision history for this message
In , Dmitry-codeweavers (dmitry-codeweavers) wrote :

(In reply to comment #112)
> > Difference is that ESD and Arts daemons did not provide an ALSA compatibility
> > layer. Pulseaudio does, but it doesn't suit Wine's current needs.
> And Wine provide compatibility layer for Windows application, doesn't it ? And
> I note that so much applications doesn't work, it doesn't suit users' needs so
> ?

But you still go and complain here instead of telling say Adobe to fix
Photoshop CS4 to use a "safe Win32 API subset supported by Wine"?

Revision history for this message
In , Pacho Ramos (pacho) wrote :

Maybe the problem is that wine maintainers don't want to merge winepulse because they don't know what would occur once it's merged, who will maintain it? Who will take care of bugs opened for winepulse? What will occur if Art doesn't want to maintain winepulse in the future?

Of course, I am not against its merging (well, I am a simple wine user), it's a conjecture about the reasons of not including more sound plugins in wine.

Revision history for this message
In , Dmitry-codeweavers (dmitry-codeweavers) wrote :

*** Bug 18740 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #113)
> (In reply to comment #111)
> > I don't follow the logic
>
> That is obvious. A new technology comes along that is by many account better
> than the one before it and that build upon the previous technology. And instead
> of supporting the new technology directly you demand that users disable the new
> technology to use your software.

Obviously you do not feel you need to read a post to respond to it. This "new technology" is not all it seems - they promised seamless support for current ALSA apps for one.

> > Difference is that ESD and Arts daemons did not provide an ALSA compatibility
> > layer. Pulseaudio does, but it doesn't suit Wine's current needs.
>
> So, Pulseaudio is being penalized befause it is better??? You are getting
> ridiculous here.

Twist my words as much as you like. You ignored the bit that said "doesn't suit Wine's current needs". That means that winealsa doesn't work with Pulse's ALSA layer through no fault of Wine.

> > Who said anything about GAMING?
>
> Please read back the bug thread your are replying to (starting with comment
> number 4 and 7). All specific examples related to latency mentioned here were
> about gaming, first-person shooters to be exact. If you want to provide another
> example where overhead of Pulseaudio would be significant, please provide
> examples with testable use cases.

The examples of cases where low-latency are required are off-topic. We don't need to saturate this bug with more useless situations. Just that it is known that low-latency is important is enough.

> > This is no longer a considered a "wishlist for driver" bug; it is considered to
> > be for improvement of winealsa to talk to Pulse better.
>
> You can consider it what you want. The bug is a feature request for adding a
> PulseAudio output driver to Wine and nothing else. Restricting Wine's ALSA
> driver to the safe subset of the API is a separate bug that has nothing to do
> with this one ( http://bugs.winehq.org/show_bug.cgi?id=18740 ).

18740 was correctly marked a duplicate - twice - as there has been no attempt improve winealsa to be more Pulse-friendly. As a result, there is no proof that a driver is even required.

> I will stop replying to you comments now, because you have not provided a
> single logical objection to Pulseaudio output driver besides 'I am too lazy to
> potentially have to look at it at some point later on'.

No loss of mine if you refuse to read my posts or *all of the rest of this thread*.

(In reply to comment #115)
> Maybe the problem is that wine maintainers don't want to merge winepulse
> because they don't know what would occur once it's merged, who will maintain
> it? Who will take care of bugs opened for winepulse? What will occur if Art
> doesn't want to maintain winepulse in the future?
>
> Of course, I am not against its merging (well, I am a simple wine user), it's a
> conjecture about the reasons of not including more sound plugins in wine.

If anything, the problem is that there is no one actively maintaining the current audio code, and no one even submitting patches to make winealsa more Pulse-friendly.

Revision history for this message
In , Stefan Dösinger (stefandoesinger) wrote :

* The Wine sound architecture needs some improvements. Nobody disputes this, but there's nobody who's willing to fix it either.

* I'd love to fix it, but the day has only 24 hours. I am busy with d3d, university, and I want some free time with my friends too. Replace "I" with everybody else who's working on Wine, and you get an idea about why nobody seems to care.

As has been adequately expressed in this bug, Wine is not perfect. There are many, many areas that need attention, and Wine has maybe 20 full and part time developers. And ranting that we don't care about users if we don't instantly buckle down and support the 15th sound API on Linux won't help.

* You can't fix problems in the core sound architecture by adding yet another sound plugin based on the broken core.

--> Anybody complaining in this bug report, check out the git code and fire up your favorite text editor and fix the issues. What needs to be done has been expressed multiple times here and on wine-devel. Now stop posting ranty wishlists and start fixing the problems.

Revision history for this message
In , Stefan Dösinger (stefandoesinger) wrote :

Just to add a comment about Art Taylor's work - Art has done the right thing. Instead of complaining he has actually done some constructive work to fix the problem. Unfortunately there were technical issues with it, which could be debated in an orderly fashion and fixed. Unfortunately, the only constructive contribution to this bug has been collateral damage in the flamewar this bug caused.

Again, for anyone attempting to fix this bug: This is not a weekend's task, expect it to take a while, and expect to run into setbacks in the form of incorrect and not accepted solutions. And don't get distracted by flamewars. And you may have to get patches accepted by Pulse, which probably has its own challenges.

Revision history for this message
In , Walldorf2000 (walldorf2000) wrote :

Very nice factual words from Stephan.

Wine needs both, evaluate the usage of save ALSA API and a PulseAudio driver.

The problem is that there is nobody who is able to do it, is willing to do it and has time to do it.

Read through the complete bug an through man posts all over the mailing lists. It's not only simple Wine users who are rantig, but some Wine devs, too.

Marking bug http://bugs.winehq.org/show_bug.cgi?id=18740 as a DUPREC and hijacking this message does not help at all so solve the problem.

Ranting against PuleAudio is fighting against windmills.

LINUX/Unix sound system will basically consist of the following elements:
 - ALSA/OSS for hardware access
 - PulesAudio for desktop sound server
 - JACK for low latency professional needs

Many issues with PulseAudio are already fixed or they are in work:
 - Coexistence of JACK and PulseAudio is one of the topics e.g. Fedora is working on.
 - KDE 4 just learn to use PulseAudio with Phonon
 - many latency issues are actually kernel issues

PulseAudio offers easy access to all kind of sound features for the ordinary user. They just want to plug in their USB device or BlueTooth device and it should work. They want to ability to mute it individually etc. More and more people use network streaming etc.

Sure, not everybody needs PulesAudio. JACK is needed from even less people, and people who need JACK usually have the ability to configure their system according their needs.

But PulseAudio is needed by many users without any detailed computer knowledge and I'm quite happy that it is preinstalled on many distros nowadays.

Please just leave these two bugs open and help motivating someone to work on it. Putting both topics in one bug only clutters this one.

Don't rant against much needed progress in LINUX/Unix. And yes, PulseAudio is a big step in the right direction.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #120)
> Please just leave these two bugs open and help motivating someone to work on
> it. Putting both topics in one bug only clutters this one.

Leaving two bugs open for the same problem doesn't make sense, hence the closed DUP.

> Don't rant against much needed progress in LINUX/Unix. And yes, PulseAudio is a
> big step in the right direction.

I personally think Pulseaudio does it the wrong way, but whatever. It's there and people are using it.

What we DON'T need on this bug are more posts saying "Pulseaudio is awesome for these reasons". It's a waste of time, energy, space and emails. No matter how awesome it is for whoever, support won't magically appear without patches.

Sure, there are the winepulse driver patches here, but consensus of established devs seems to be that it's the wrong way to go about it, and that the existing winealsa code should be made more Pulse-friendly. For anyone new to this thread, *that* is what is meant by the "Wine should support PulseAudio" summary. Only once that has been proven impossible should a winepulse driver be considered.

Revision history for this message
In , Stefan Dösinger (stefandoesinger) wrote :

(In reply to comment #120)
> LINUX/Unix sound system will basically consist of the following elements:
> - ALSA/OSS for hardware access
> - PulesAudio for desktop sound server
> - JACK for low latency professional needs
>
> Many issues with PulseAudio are already fixed or they are in work:
> - Coexistence of JACK and PulseAudio is one of the topics e.g. Fedora is
> working on.
> - KDE 4 just learn to use PulseAudio with Phonon
> - many latency issues are actually kernel issues
I am not the one who designs the Linux sound APIs, but there are number of flaws in this approach:

*) If I want gaming(a low latency audio application) I don't want to do something manually to get it. PulseAudio on a default Ubuntu setup gets me about 300 milliseconds latency. That is enough to make Tuxracer not fun. You can't have 5 solutions for 5 different applications. You need one solution for all of them. Windows can do it. MacOS can do it.

Likewise Wine users should not have to configure manually whether they want low latency(alsa plugin) or software mixing(pulse plugin). There has to be one solution for all.

*) Low latency audio in multiple apps worked with Alsa + Dmix. Before Pulse arrived, I could listen to my MP3s and play Counter Strike, and actually hear gunfire before I was dead. PulseAudio is a network daemon, which cannot get low latency by design without realtime hacks. Blaming that on kernel issues is the wrong way to work around design flaws IMHO.

*) If you write an app that claims it has a compatibility layer for Alsa, and 50% of the apps out there need adjustments(KDE, Skype, Wine, apparently even Tuxracer), then the compatibility layer is not actually compatible.

*) PulseAudio is like the 15th sound API on Linux. All the reasons cited why PulseAudio is good were cited for ESD and Arts before. I am still not convinced why Pulse is suddenly going to fix all that. ESD and Arts were dropped for good reasons. For a while SW mixing was done by dmix, until people went back in time and reinvented ESD and Arts under a different name.

/me anticipates the same flamewar in one or two years when Wine urgently needs to support, say, SpeedAudio, which will be the definite solution to all sound issues on Linux.

Revision history for this message
In , Walldorf2000 (walldorf2000) wrote :

(In reply to comment #122)
> ... Blaming that on kernel issues is the
When more that 230 ms come from the kernel it is fair to blame the kernel. The Fedora kernel gives less than 5 ms in the same scenario. On the current Fedora system you don't have these latency issues with PulseAudio.

On a good configured system you don't need to change anything for 99% of the users and 99% of the use cases.

"Hard Core" gaming with PulseAudio is just fine.

This is how it should be.

To ask casual computer users to switch off PulseAudio in order to get Wine working will not work on the long run.

> *) PulseAudio is like the 15th sound API on Linux. All the reasons cited why
> PulseAudio is good were cited for ESD and Arts before. I am still not convinced
> why Pulse is suddenly going to fix all that. ESD and Arts were dropped for good
> reasons.
And PulesAudio was developed for good reasons and has learned a lot from the "14" predecessors. It is far more than a network daemon and software mixer. It is the integrated sound system LINUX/Unix was missing so bitterly.

ESD was not simply dropped, it was replaced by PulseAudio.

It is fine when DMIX is enough for your needs, but you can't reduce the level of sound support on this level. It is simply not sufficient for average users any more.

> /me anticipates the same flamewar in one or two years when Wine urgently needs
> to support, say, SpeedAudio, which will be the definite solution to all sound
> issues on Linux.
This time it is not just a KDE or Gnome project. Not even a LINUX project. It is on the way to become the standard desktop sound system at least on LINUX for normal desktop usage. Give it a chance. I don't believe that we will see SpeedAudio in the next ten years ...

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #123)
> (In reply to comment #122)
> > ... Blaming that on kernel issues is the
> When more that 230 ms come from the kernel it is fair to blame the kernel. The
> Fedora kernel gives less than 5 ms in the same scenario. On the current Fedora
> system you don't have these latency issues with PulseAudio.

Not when the reported latency in the kernel does not exist with dmix.

> On a good configured system you don't need to change anything for 99% of the
> users and 99% of the use cases.

Good luck finding one. The "real-time" kernel hacks are still hacks and not in upstream sources.

> "Hard Core" gaming with PulseAudio is just fine.

Only on one of your mystical "good configured" systems. Pulseaudio's latency certainly does not help the matter.

> To ask casual computer users to switch off PulseAudio in order to get Wine
> working will not work on the long run.

That's what pasuspender is for. I don't believe PulseAudio will survive in the long run (or at least, not as the default soundsystem of the strong-user distros). Something better will come along to replace it.

> And PulesAudio was developed for good reasons and has learned a lot from the
> "14" predecessors. It is far more than a network daemon and software mixer. It
> is the integrated sound system LINUX/Unix was missing so bitterly.

It "learnt" from maybe one of them - esd (and forks thereof). Biggest problem was that while running the daemon you couldn't have ALSA or OSS playing. Pulse fixes that, but wait, it doesn't work (for many pre-Pulse apps, and some continuing apps such as Wine and Skype)! Thus it's not integrated.

> It is fine when DMIX is enough for your needs, but you can't reduce the level
> of sound support on this level. It is simply not sufficient for average users
> any more.

Average user wants sound to Just Play(TM). dmix is sufficient for that. Fancy features like per-app volume control or sending the audio to another computer on your network are in reality not necessary for the average user.

> > /me anticipates the same flamewar in one or two years when Wine urgently needs
> > to support, say, SpeedAudio, which will be the definite solution to all sound
> > issues on Linux.
> This time it is not just a KDE or Gnome project. Not even a LINUX project. It
> is on the way to become the standard desktop sound system at least on LINUX for
> normal desktop usage. Give it a chance. I don't believe that we will see
> SpeedAudio in the next ten years ...

I agree with Stefan. There are too many problems with Pulse. It will get redesigned, it will get replaced by something with full ALSA/OSS compatibility, and when that happens, Ubuntu and Fedora users will no longer rant about how awesome Pulse is and how Wine should have supported it (in difficult-to-maintain and broken ways) 20 billion years ago.

Revision history for this message
In , Austin English (austinenglish) wrote :

Everyone, please. As Stefan said, more comments here don't help. It distracts developers from fixing bugs when they have to read through more long comments about PulseAudio.

Unless you're working on fixing the wine alsa/sound bugs and have questions or are uploading test patches, please refrain from posting in this bug.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Regardless of one's opinion on the merits of PulseAudio, more and more wine users will be left out in the cold if no work is done to improve the current situation. Asking general users not to use pulse is probably unrealistic, thus the energy should be focused on improving the way in which the two interact.

To those using wine with pulseaudio on 64-bit systems, beware of older version 32-bit binary pulse libraries. I'm not sure if this affects winealsa->libasound->pulse but it does for winepulse->pulse. Gentoo in particular ships (shipped?) old 32-bit pulse libraries. These would contain errors, causeing the local shm transport to fail, falling back to tcp which will inevitably lock up from protocol issues of the older more buggy libraries. Ideally the version of the 32-bit libraries should be identical to the 64-bit.

Revision history for this message
In , Walldorf2000 (walldorf2000) wrote :

(In reply to comment #125)
> Everyone, please. As Stefan said, more comments here don't help. It distracts
> developers from fixing bugs when they have to read through more long comments
> about PulseAudio.

This is why http://bugs.winehq.org/show_bug.cgi?id=18740 should have been kept separately. The decision to mark it as a duprec lead to very much noise here. 18740 would be ideal to find someone to work on the save ALSA API.

Maybe the save ALSA API is an idea for the next SOC?

It is one thing not to accept a new PulseAudio driver in Wine due to concerns about maintenance. It is another thing to sabotage the usage of winehq.org to discuss and provide a separately maintained driver which has the chance to mature and enrich Wine in the future.

But it is your decision and I promise not to post here anymore until I have some really meaningful to say ...

Revision history for this message
In , Marcus Meissner (marcus-jet) wrote :

I think the safe API has limitations which hinder using it for dsound currently. (snd_pcm_avail and mmap assymptions for instance)

Changed in wine (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Changed in wine:
status: Unknown → Confirmed
Revision history for this message
In , Aigars Mahinovs (aigarius) wrote :

This bug is now 10th most voted for bug in this database.

Revision history for this message
tomten (fredrik-corneliusson) wrote :

I had the same problem.
I found a workaround solution here (you do not have to disable PA just use OSS wine output instead):

http://www.matt-helps.com/how-to-stop-spotify-on-linux-audio-skipping

Revision history for this message
In , Neil Wilson (neil-aldur) wrote :

If you are working with Ubuntu and testing the latest release of the distribution then you can help improve the PulseAudio driver for Wine.

I have created a version of the wine1.2 package that includes the native PulseAudio driver for Wine. This package is targeted at the Karmic distribution, so if you are testing out the new release can you try this package and see if it improves the Wine sound on Ubuntu for you.

If you try it, can you report back your experiences in Launchpad please, rather than winehq.

https://bugs.launchpad.net/wine/+bug/371897

You can install the software from my PPA

https://launchpad.net/~neil-aldur/+archive/ppa

To install the software follow the instructions on Launchpad (https://help.launchpad.net/Packaging/PPA/InstallingSoftware)

Revision history for this message
Neil Wilson (neil-aldur) wrote :

I have created a version of the wine1.2 package that includes a native PulseAudio driver for wine. This packaged is targeted at the Karmic distribution, so if you are testing out the new release can you try this package and see if it improves the Wine sound on Ubuntu for you.

If you try it, can you report back your experiences here please.

You can install the software from my PPA

https://launchpad.net/~neil-aldur/+archive/ppa

To install the software follow the instructions on Launchpad (https://help.launchpad.net/Packaging/PPA/InstallingSoftware)

Read more about the Winepulse patches and why they're not in the upstream source: http://art.ified.ca/?page_id=40

Revision history for this message
Neil Wilson (neil-aldur) wrote :

Note that once you install the package you will need to configure Wine to use the PulseAudio driver.

Select 'Configure Wine' from Applications menu.
Click the audio tab.
Select the PulseAudio Driver and deselect the one you are currently using.
Click apply.

Click Test Sound and if you hear a noise then you are in business!

Revision history for this message
Ynot (tatkinson321) wrote :

This patch to Wine works perfectly

I can successfully run WoW, Ventrillo & any number of native apps at the same time

Can we please get this patch into the main wine1.2 package? as the pulseaudio driver for Wine fixes all the little problems I had

Many thanks to all the people involved

Revision history for this message
In , Aigars Mahinovs (aigarius) wrote :

Wine is now slower in adapting to new technologies than closed-source software - Skype has PulseAudio support.

I must say however that I see less problems with wine 1.1.29 alsa backend interaction with pulseaudio that there were before.

Revision history for this message
In , Sirbubbles01 (sirbubbles01) wrote :

(In reply to comment #131)
> Wine is now slower in adapting to new technologies than closed-source software
> - Skype has PulseAudio support.
>
> I must say however that I see less problems with wine 1.1.29 alsa backend
> interaction with pulseaudio that there were before.

Isn't it acceptable to just use either the aoss wrapper or the padsp command with your wine app? I've been doing it for a couple of years now, I think, and I've had very few issues indeed. If the wine devs could somehow make wine take into account the presence of pulseaudio in a system so we didn't have to use these commands, that'd be great. I don't know for sure about things like audio latency with pulseaudio using this method, but from my own experiences, it shouldn't be a big deal at all, since I've been using pulse for both native and wine multiplayer games for some time now.

Revision history for this message
Matt Walker (matthaeus123) wrote :

I've encountered this issue recently with the customized builds from the ~neil-aldur/+archive/ppa repo. The sound works perfectly for a while, but after a while it ends up messing up pulseaudio and I don't get any sound till I start a new session. I'll try to get a debug report next time it occurs.

I had this issue with the 1.1.28 version of the neil-aldur Wine

Revision history for this message
Neil Wilson (neil-aldur) wrote : Re: [Bug 371897] Re: Occasional sound drops in Wine via PulseAudio

Can you try the vanilla wine1.2 in the archives (which will go via the
pulse alsa redirector) and see if you get the same problem.

Pulseaudio has been much improved and I want to see if there is still
a problem with just going via the alsa redirector.

2009/9/10 Matt Walker <email address hidden>:
> I've encountered this issue recently with the customized builds from the
> ~neil-aldur/+archive/ppa repo. The sound works perfectly for a while,
> but after a while it ends up messing up pulseaudio and I don't get any
> sound till I start a new session. I'll try to get a debug report next
> time it occurs.
>
> I had this issue with the 1.1.28 version of the neil-aldur Wine
>
> --
> Occasional sound drops in Wine via PulseAudio
> https://bugs.launchpad.net/bugs/371897
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Neil Wilson

Revision history for this message
In , Elmano (elmano) wrote :

biiig +1 from me. just patched wine with WinePulse (http://art.ified.ca/?page_id=40) and it works like a charm. no more killing of media player audio streams when starting wine.

Revision history for this message
Neil Wilson (neil-aldur) wrote :

The latest karmic pulseaudio and wine1.2 packages appear to solve the sound skipping issue on all my platforms.

Is anybody still having problems with wine sound?

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #129)
> This bug is now 10th most voted for bug in this database.

So there are 9 things that should be fixed before this? Sounds fine to me ;)

(In reply to comment #131)
> Wine is now slower in adapting to new technologies than closed-source software
> - Skype has PulseAudio support.

The main reason why Wine doesn't have a pulse driver in upstream is because it doesn't need one. We have tools like padsp or aoss that work for some people and pasuspender for everyone else.

Another reason, as has been discussed, is that pulse adds unreasonable latency to be used as a general purpose software mixer (as in one that is suitable for professional applications).

Furthermore, no one has proven that a pulse driver is actually NEEDED. The preferred solution is to modify, if possible, winealsa and/or wineoss drivers to work nicely with pulse. In this case, a pulse driver would *never* be needed.

Revision history for this message
In , Jeremy Visser (jeremy-visser) wrote :

(In reply to comment #134)
> Another reason, as has been discussed, is that pulse adds unreasonable latency
> to be used as a general purpose software mixer (as in one that is suitable for
> professional applications).

Dude, that's an argument against PulseAudio in general; not a valid reason for Wine not to support a native Pulse output (not that there aren't valid reasons). The fact is that most desktop distributions are shipping PulseAudio by default, and audio not working is a major paper cut for less technical users.

> Furthermore, no one has proven that a pulse driver is actually NEEDED. The
> preferred solution is to modify, if possible, winealsa and/or wineoss drivers
> to work nicely with pulse. In this case, a pulse driver would *never* be
> needed.

That said, I am already very happy with Wine's ALSA output. It works beautifully with Pulse through the Alsa plugin these days. However, timing is an issue -- lip sync still doesn't work properly with my Bluetooth headset (which adds a 0.25sec latency), but lip sync is now perfect with native Linux apps (e.g. GStreamer apps).

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #135)
> (In reply to comment #134)
> > Another reason, as has been discussed, is that pulse adds unreasonable latency
> > to be used as a general purpose software mixer (as in one that is suitable for
> > professional applications).
>
> Dude, that's an argument against PulseAudio in general; not a valid reason for
> Wine not to support a native Pulse output (not that there aren't valid
> reasons). The fact is that most desktop distributions are shipping PulseAudio
> by default, and audio not working is a major paper cut for less technical
> users.

Agreed, but my point is that Wine is a general-purpose solution that has to cater for professional-level applications. It is my understanding that Wine is simply incapable of doing that with pulse due to the latency issues and the design of pulse.

Revision history for this message
In , Neil Wilson (neil-aldur) wrote :

2009/9/27 <email address hidden>:
> The main reason why Wine doesn't have a pulse driver in upstream is because it
> doesn't need one. We have tools like padsp or aoss that work for some people
> and pasuspender for everyone else.

Why are the JACK and OSS drivers needed then? By that argument they could be stripped and the whole sound driver selection dialog could be removed. Surely, if your argument holds, there is a whole batch of simplification that could take place. Why not do that if a single ALSA driver is the one true path?

pasuspender always seems like a good answer until your softphone fails to ring because your ALSA layer is locked out and you miss an important call.

The truth is that the Wine ALSA layer drives ALSA hard. Much harder than Pulseaudio's abstraction layer can ever provide. That generates an impedence mismatch that results in skips and broken streams.

>
> Another reason, as has been discussed, is that pulse adds unreasonable latency
> to be used as a general purpose software mixer (as in one that is suitable for
> professional applications).

Last time I looked you could select which audio driver you require. Nobody is saying remove the ALSA driver or requiring that 'professional' applications use Pulseaudio. Neither is anybody suggesting that Wine should default to the Pulseaudio driver in the main installation. Distributions could make that choice as required in their build configuration.

Professional level applications are likely to use JACK anyway.

>
> Furthermore, no one has proven that a pulse driver is actually NEEDED. The
> preferred solution is to modify, if possible, winealsa and/or wineoss drivers
> to work nicely with pulse. In this case, a pulse driver would *never* be
> needed.

The proof is straightforward. Altering the ALSA driver to work with pulse would require that the ALSA driver work at the lowest common denominator and that all the fancy twiddles you can do for a *local* sound card installation would have to be disabled for Pulse due to its inherent remote nature. The alternative is a complex mess where you're checking all the time what is going on - or the current abstraction layer which fails when Wine ALSA asks for a 'fancy' option that PulseAudio simply can't provide (like access to the hardware).

In other words the ALSA driver would have to be compromised to support Pulse, either in capability or structurally. That is unnecessary code coupling that would affect those users who want a clean ALSA driver .

The alternative is that you have an ALSA layer that can assume it is sat directly on ALSA all the time and can fully exploit the interface plus a Pulseaudio module that does all the compromising - but keeping Wine informed of the compromises so you don't get errors.

Plus pragmatically we have somebody who is interested in maintaining a Pulseaudio layer and apparently nobody who is interested in maintaining the ALSA layer beyond keeping the existing system running. That ought to count for something.

This is not an either/or situation. I don't see how it is helpful to portray it as such.

Revision history for this message
In , Sorceror (shacklein) wrote :
Download full text (3.5 KiB)

(In reply to comment #137)
> 2009/9/27 <email address hidden>:
> > The main reason why Wine doesn't have a pulse driver in upstream is because it
> > doesn't need one. We have tools like padsp or aoss that work for some people
> > and pasuspender for everyone else.
>
> Why are the JACK and OSS drivers needed then? By that argument they could be
> stripped and the whole sound driver selection dialog could be removed. Surely,
> if your argument holds, there is a whole batch of simplification that could
> take place. Why not do that if a single ALSA driver is the one true path?

Because JACK and in-kernel-tree OSS do not provide ALSA compatibility. Pulse does, but it's broken for the purposes of Wine. The solution is therefore to fix winealsa to be pulse-friendly, to not use pulse (e.g. pasuspender) or trick pulse into likeing Wine (e.g. padsp, which only works for some people). A separate pulse driver is not needed.

> pasuspender always seems like a good answer until your softphone fails to ring
> because your ALSA layer is locked out and you miss an important call.

Then use a system that works properly and doesn't hate Wine like ALSA's built-in dmix. Or don't use Wine with audio.

> The truth is that the Wine ALSA layer drives ALSA hard. Much harder than
> Pulseaudio's abstraction layer can ever provide. That generates an impedence
> mismatch that results in skips and broken streams.

So you're saying Wine can never provide a satisfactory pulse driver because of limitations of pulse? On this point, we are agreed.

> Last time I looked you could select which audio driver you require. Nobody is
> saying remove the ALSA driver or requiring that 'professional' applications use
> Pulseaudio.

If pulse is "officially" supported by Wine, then the implication is there that it will be suitable for the general-purpose nature that Wine has.

> > Furthermore, no one has proven that a pulse driver is actually NEEDED. The
> > preferred solution is to modify, if possible, winealsa and/or wineoss drivers
> > to work nicely with pulse. In this case, a pulse driver would *never* be
> > needed.
>
> The proof is straightforward.
-- snip --
> In other words the ALSA driver would have to be compromised to support Pulse,
> either in capability or structurally. That is unnecessary code coupling that
> would affect those users who want a clean ALSA driver .

There is as of yet no demonstration that the ALSA driver cannot be reduced to the "pulse-safe" subset without compromising features or performance. I suspect this is the case, but if you have read the discussion, Wine's core developers require a definite and demonstrated (by code) NEED for a separate pulse driver before it will be considered for upstream.

> Plus pragmatically we have somebody who is interested in maintaining a
> Pulseaudio layer and apparently nobody who is interested in maintaining the
> ALSA layer beyond keeping the existing system running. That ought to count for
> something.

Enthusiastic developers have been known to disappear completely. "Someone is willing to maintain it" certainly goes in favour of the pulse driver, but does not satisfy the remaining objections.

> This is not an e...

Read more...

Revision history for this message
In , Elmano (elmano) wrote :

(In reply to comment #138)
> [...]to not use pulse (e.g. pasuspender) or tric pulse into likeing Wine
> (e.g. padsp, which only works for some people).
sry, but imo pasuspender/padsp are non-solutions as for me they break more than they fix.
> Then use a system that works properly and doesn't hate Wine like ALSA's
> built-in dmix. Or don't use Wine with audio.
that's also a non-solution
> So you're saying Wine can never provide a satisfactory pulse driver because of
> limitations of pulse? On this point, we are agreed.
nope, he said that wine sometimes does some nasty stuff in its alsa-driver and thus can't be expected to work 100%.
> There is as of yet no demonstration that the ALSA driver cannot be reduced to
> the "pulse-safe" subset without compromising features or performance. I suspect
> this is the case, but if you have read the discussion, Wine's core developers
> require a definite and demonstrated (by code) NEED for a separate pulse driver
> before it will be considered for upstream.
I can give them a demo-system with non-working alsa-driver (as it kills other audio streams) and working pulse-driver. if that's not enough I may say I'm a little annoyed by that policy.
> Enthusiastic developers have been known to disappear completely. "Someone is
> willing to maintain it" certainly goes in favour of the pulse driver, but does
> not satisfy the remaining objections.
jeah, and maybe he gets hit by a car next week, who knows. and maybe all the devs have the same faith and we should cancel the project alltogether -.-
No, seriously: it could work the same way it does in the kernel where drivers with no maintainer get flagged and removed in subsequent releases.

just m2c

Revision history for this message
In , Neil Wilson (neil-aldur) wrote :

(In reply to comment #138)

> > The truth is that the Wine ALSA layer drives ALSA hard. Much harder than
> > Pulseaudio's abstraction layer can ever provide. That generates an impedence
> > mismatch that results in skips and broken streams.
>
> So you're saying Wine can never provide a satisfactory pulse driver because of
> limitations of pulse? On this point, we are agreed.

You have to remember that Pulse might not be talking to Alsa at the back end. It might be talking to an Apple Airport or even another Windows machine. Therefore it can only offer an Alsa subset that is the lowest common denominator between Alsa and the native pulse capabilities.

Also by definition if you can't create a native Pulse driver, then operating through the abstraction layer would be worse because you lose access to native knobs and twiddles. An abstraction layer can't offer more than the native.

So again if your argument holds, then it holds for modifying the alsa driver to work with pulse. So it is not rational that the ALSA driver can be made to work with Pulse, but a Pulseaudio driver can never be constructed. That suggests there is more to your position than objective technical and logistical issues.

> So if it is possible (in code) to make the ALSA driver work nicer with
> pulse (apparently there has already been movement in this direction), then that
> is definitely the way to go.

If it is possible, and there are people to do the work, then it should be attempted. From my position 1.1.29 is a lot better than before, but we're still losing streams randomly. So there is a way to go there, but the improvement is to be congratulated for all involved.

I also have a great deal of sympathy for the maintenance argument. I may be worth examining the commonality between JACK, OSS, ALSA and Pulse to see if unification is possible. Then everything can be native with very little code and the maintenance overhead can be reduced.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #139)
> (In reply to comment #138)
> > [...]to not use pulse (e.g. pasuspender) or tric pulse into likeing Wine
> > (e.g. padsp, which only works for some people).
> sry, but imo pasuspender/padsp are non-solutions as for me they break more than
> they fix.

Sorry, but IMO, pulse is a non-solution because it breaks more than it fixes.

> I can give them a demo-system with non-working alsa-driver (as it kills other
> audio streams) and working pulse-driver.

Sounds like your dmix is broken, in which case you're comparing apples and oranges.

(In reply to comment #140)
> Also by definition if you can't create a native Pulse driver, then operating
> through the abstraction layer would be worse because you lose access to native
> knobs and twiddles. An abstraction layer can't offer more than the native.

The question remains, are those knobs and twiddles actually necessary for a fully-functional ALSA driver? So far no one has answered that question.

Revision history for this message
In , Removed by request (removed1836289) wrote :

(In reply to comment #141)
> (In reply to comment #139)
> > (In reply to comment #138)
> > > [...]to not use pulse (e.g. pasuspender) or tric pulse into likeing Wine
> > > (e.g. padsp, which only works for some people).
> > sry, but imo pasuspender/padsp are non-solutions as for me they break more than
> > they fix.
>
> Sorry, but IMO, pulse is a non-solution because it breaks more than it fixes.

Ben you know better than to troll on this kind of subject. You are forcing the user to use another application to fix something that doesn't work properly within wine, that's like saying "We won't fix the wine problems with MSWord, use Open Office instead".

Revision history for this message
In , thgreasi (thgreasi) wrote :

Ubuntu Fedora and other major distributions are using PulseAudio for nearly two years now.
Professionals can use ALSA on whatever distribution or operating system they want, BUT still most linux users use PulseAudio by default.
So according to wikipedia
http://upload.wikimedia.org/wikipedia/commons/0/00/Pulseaudio-diagram.svg
using ALSA on a PulseAudio system, adds more delay because of the use of 'libalsa Pulse' on the library layer, and causes even more problems.
Remember that this is the current situation for MOST linux users.

So using ALSA is more professional (you can just let it be the default), but not providing native PulseAudio driver hurts the masses.
Of course, we can try forcing all those users to use ALSA, or event force them to use windows... You forget that linux (most Wine users use it) is about freedom.

And yes there is someone who is willing to be a maintainer, it`s him who will write the code not you (PulseAudio haters) so stop complaining.

+1 to Jerome

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

Probably the largest problem for audio in WINE is the WaveOut/WaveIn API's. Currently the WaveOut and WaveIn API's are the base for the other audio api's in WINE (except openAL.) The audio api, designed probably in the early 90s for PCs of the day seems to have been the first implemented in wine, and all audio api's fall-back to it (except openAL and DSound on OSS and ALSA in special occasions.) Probably the biggest pro-native-pulseaudio reason is the waveout functions. Through libalsa pulse, calls such as waveOutReset() and waveOutResume() require a reconnection to pulseaudio each call. Using a native pulseaudio driver we can write audio data into pulseaudio and do the pause, resume and reset calls without penalty.

My two cents is that audio in wine is long overdue for an overhaul. Probably the best way would be to implement some sensible abstracted buffer situation and then have _one_ waveout/wavein driver written to use it. Currently the winmm drivers each contain parallel implementations of the code required to set up another thread to manage feeding the hardware, timing wavehdr's and calling back to the application. Probably the biggest problem with winealsa.drv is that it will exhibit different behavior if it receives different behavior from whatever audio device it is using. The different behavior has to be dealt with by the windows application, which may have it's own issues. The same is probably true of wineoss or others. This is not the native audio api's fault IMO, but the failure of WaveOut/In. In winepulse tried to make it behave the same all the time. The argument that this different behavior is the fault of the alsa driver is also not acceptable. We cannot believe that it is still 1994 and every audio device behaves like we are writing straight to a 10ms DAC buffer.

What is the state of audio in windows these days? I shudder to think that the only way to play audio on a windows box is dsound or waveout. Surely there is a new audio api out of redmond that will require implementing anyways?

In either case, in lue of further progress I'm maintaining a (blasphemous) patch for a native wine pulseaudio backend, and shall continue to maintain it so long as it is useful.

Revision history for this message
Neil Wilson (neil-aldur) wrote :

Updated wine1.1.30 with Winepulse 0.30 uploaded to ppa:neil-aldur/ppa

Revision history for this message
In , Ernst (ernst-blaauw) wrote :

For your info, on Karmic beta using wine1.2 (1.1.30) from the Ubuntu repositories, it is impossible for me to get foobar working properly. The only possibility is to use padsp and kill all other applications which use the sound engine. This is really frustrating.

Thus, I applied the PulseAudio patch and now I can use foobar again without problems! I think this patch should be added to the main tree, as there is a maintainer and the current audio solutions are not sufficient.

Revision history for this message
In , Removed by request (removed1836289) wrote :

(In reply to comment #145)
> For your info, on Karmic beta using wine1.2 (1.1.30) from the Ubuntu
> repositories, it is impossible for me to get foobar working properly. The only
> possibility is to use padsp and kill all other applications which use the sound
> engine. This is really frustrating.
>
> Thus, I applied the PulseAudio patch and now I can use foobar again without
> problems! I think this patch should be added to the main tree, as there is a
> maintainer and the current audio solutions are not sufficient.

Wine1.2? What?

Revision history for this message
In , Ernst (ernst-blaauw) wrote :

In Ubuntu Karmic, there are two wine packages: wine and wine1.2.
wine is the 'stable' version: wine 1.0.1
wine1.2 is the latest version: wine 1.1.30

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #147)
> In Ubuntu Karmic, there are two wine packages: wine and wine1.2.
> wine is the 'stable' version: wine 1.0.1
> wine1.2 is the latest version: wine 1.1.30

Yet another reason why we shouldn't be bound by anything that a particular distro does.

Revision history for this message
In , Walldorf2000 (walldorf2000) wrote :

Sure what a crime from Scott to offer both, the 1.0 and the dev release.

And the stupid user who simply want their sound to work are just annoying.

I'm so happy that there are biased stubborn devs who take care for the needs of professional users.

I'm sorry, I just try to reflect what I found in this message. I tried to keep quiet for some time now but it's very hard when you read the comments here.

Average users don't have any problems with the latency of a good configured pulse audio.

Professional users who need very low latency need JACK.

To ask 90% of the unexperienced user to deeply manipulate their system to have sound work in order to make it easier for a handful "professionals" sounds very wise to me.

There exists a dev who is willing and able to deliver a solution but instead of a welcome he earns only prejudice.

Revision history for this message
In , Scott Ritchie (scottritchie) wrote :

The wine betas are provided by an Ubuntu "wine1.2" package because:
1) It needs to be named different from the stable Wine since it's a different package
2) Renaming a package is not an easy task (as upgrades are done based on name)
3) They will eventually be replaced by the real Wine 1.2 (which shouldn't be any worse than their current status)

So while "wine1.2 version 1.1.30-0ubuntu4" might sound like a weird package name, it will never be seen by anyone unless they're running terminal commands (it's called "beta release" in the Software Center, for instance)

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #149)
> Sure what a crime from Scott to offer both, the 1.0 and the dev release.

"wine1.2" is a poor choice though. Even "wine-1.2" would be better. Debian has "wine-unstable" now.

> Average users don't have any problems with the latency of a good configured
> pulse audio.

Except when using Wine, Skype etc. Hence the issue. And given that dmix does not suffer from these same latency issues, it's obviously a problem with pulse. Face it, pulse is virtually broken by design, and was adopted far too early by distros like *buntu and Fedora.

> Professional users who need very low latency need JACK.

Or hardware-accelerated ALSA, which is disabled by pulse.

> To ask 90% of the unexperienced user to deeply manipulate their system to have
> sound work in order to make it easier for a handful "professionals" sounds very
> wise to me.

Wine can't support a broken distro. If it's really so difficult to disable pulseaudio, it's not Wine's fault but the distro's.

> There exists a dev who is willing and able to deliver a solution but instead of
> a welcome he earns only prejudice.

There have been specific objections to the proposed winepulse *code* (not just the concept) before and I as far as I know the few people who have worked on it are no longer attempting to get it accepted upstream. Patches have to be sent to wine-patches mailing list for review.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

(In reply to comment #151)

Arguing the merits of PulseAudio is periphery. Some people use it, some people also use wine. You cannot "fix" people into not trying to use them together. That said...

> Except when using Wine, Skype etc. Hence the issue. And given that dmix does
> not suffer from these same latency issues, it's obviously a problem with pulse.
> Face it, pulse is virtually broken by design

Substantiate? Dynamic latency management is probably one of pulse's most wonderful features. Is it for a professional, static, audio situation? No. Is it for real-life, dynamic audio situation? Yes. 50ms total latency is common.

> Or hardware-accelerated ALSA, which is disabled by pulse.
Most audio hardware has no hardware accelerated mixing, which makes it difficult to implement hardware-accelerated mixing.

> There have been specific objections to the proposed winepulse *code* (not just
> the concept) before and I as far as I know the few people who have worked on it
> are no longer attempting to get it accepted upstream. Patches have to be sent
> to wine-patches mailing list for review.

That was a /long/ time ago. I've stopped trying to get it accepted in vanilla wine because arguing the concept to people with prejudgments seems barrier enough.

IMO the audio aspects of wine should be redesigned (nobody's fault, things evolve over time.) However, such an undertaking is a lot of work. Meanwhile the wine-pulse code exists and works better for people who use pulseaudio to using an different audio api in parallel or emulated on top of pulseaudio.

If wine's implementation of the (depreciated) MME was consolidated from per-driver to one location and then a common audio interface abstraction for MME was written, I would lobby for the inclusion of pulse as a target backend into official wine.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #152)
> (In reply to comment #151)
>
> Arguing the merits of PulseAudio is periphery. Some people use it, some people
> also use wine. You cannot "fix" people into not trying to use them together.
> That said...

Equally cannot "fix" people trying to use Wine on Windows natively.

> > Except when using Wine, Skype etc. Hence the issue. And given that dmix does
> > not suffer from these same latency issues, it's obviously a problem with pulse.
> > Face it, pulse is virtually broken by design
>
> Substantiate? Dynamic latency management is probably one of pulse's most
> wonderful features. Is it for a professional, static, audio situation? No. Is
> it for real-life, dynamic audio situation? Yes. 50ms total latency is common.

50ms latency from pulse is only achievable with the -rt branch kernel. For everything else, dmix does not suffer from such serious latency issues (especially in Wine, Skype etc).

> > Or hardware-accelerated ALSA, which is disabled by pulse.
> Most audio hardware has no hardware accelerated mixing, which makes it
> difficult to implement hardware-accelerated mixing.

*Professional* audio users, those addressed by the comment, are most likely to use cards that have hardware mixing in hardware and drivers.

> > There have been specific objections to the proposed winepulse *code* (not just
> > the concept) before and I as far as I know the few people who have worked on it
> > are no longer attempting to get it accepted upstream. Patches have to be sent
> > to wine-patches mailing list for review.
>
> That was a /long/ time ago. I've stopped trying to get it accepted in vanilla
> wine because arguing the concept to people with prejudgments seems barrier
> enough.

If you've stopped trying to get Wine upstream to support pulse, this whole discussion is moot. So much for the "developer willing to maintain" argument.

> IMO the audio aspects of wine should be redesigned (nobody's fault, things
> evolve over time.) However, such an undertaking is a lot of work.

Then someone needs to start working on it. I believe you just volunteered, Art :P

> If wine's implementation of the (depreciated) MME was consolidated from
> per-driver to one location and then a common audio interface abstraction for
> MME was written, I would lobby for the inclusion of pulse as a target backend
> into official wine.

Assuming this is even possible. Even just a Proof of Concept would be helpful here.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

(In reply to comment #153)

> 50ms latency from pulse is only achievable with the -rt branch kernel. For
> everything else, dmix does not suffer from such serious latency issues
> (especially in Wine, Skype etc).

/me is using the linus branch and pulse releases. *scratches head*

> If you've stopped trying to get Wine upstream to support pulse, this whole
> discussion is moot. So much for the "developer willing to maintain" argument.

I am, outside of wine currently.

> Assuming this is even possible. Even just a Proof of Concept would be helpful
> here.

Problem with writing a proof-of-concept for the wine project is that while it may be better, it will be regarded as too large a change and rejected unless it could be done incrementally. It's hard to make a horse and buggy into an automobile without being allowed to replace logical parts in their entirety.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #154)
> > If you've stopped trying to get Wine upstream to support pulse, this whole
> > discussion is moot. So much for the "developer willing to maintain" argument.
>
> I am, outside of wine currently.

But you're not willing to submit your patches upstream, so you're not willing to maintain it as a part of Wine (which is what the argument against "developer willing to maintain" is).

> Problem with writing a proof-of-concept for the wine project is that while it
> may be better, it will be regarded as too large a change and rejected unless it
> could be done incrementally. It's hard to make a horse and buggy into an
> automobile without being allowed to replace logical parts in their entirety.

Defeatism isn't healthy. You don't know until you try. If it is possible, it would as you say make *all* sound drivers easier to maintain, and I'm sure the core devs would consider such an improvement seriously.

Revision history for this message
In , nh2 (nh2) wrote :

(In reply to comment #151)
> > Average users don't have any problems with the latency of a good configured
> > pulse audio.
>
> Except when using Wine, Skype etc. Hence the issue. And given that dmix does
> not suffer from these same latency issues, it's obviously a problem with pulse.
> Face it, pulse is virtually broken by design, and was adopted far too early by
> distros like *buntu and Fedora.
Of course. It's important to have low latency on these audio streams I can't
hear since my card is blocked by another application.

> Wine can't support a broken distro. If it's really so difficult to disable
> pulseaudio, it's not Wine's fault but the distro's.
Again: If I disable software mixing by pulse, I cannot use a voice application
and watch a video simultaneously.

About the whole latency issue: Who cares? There is a checkbox to choose another
audio backend whenever you want; each winecfg user is capable of using ALSA or
JACK if latency disturbs him.

Revision history for this message
In , Stefan Dösinger (stefandoesinger) wrote :
Download full text (3.4 KiB)

While this flamewar here was going on, Maarten Lankhorst sent a few patches to improve our Alsa backend with PulseAudio. During this process, he also reported a number of bugs to the PulseAudio developers, so PA can be improved. This doesn't produce angry attack mails, but it does improve the situation.

I think this whole discussion has reached a dead end. I think this issue can't be fixed in PulseAudio alone, and it can't be fixed in Wine alone. The sound infrastructure in Linux still seems broken after years of replacing one solution with a better solution.

First of all, it apparently isn't impossible to get this right. MacOS has low latency(subjectively 0 ms) sound. I can play music in iTunes and play counterstrike at the same time, and I am sure I could also use TeamSpeak/Ventrillo if I wanted to. I haven't seen any problem on Windows either, although I barely use it.

I have little personal interest in Linux sound at the moment - I'm working on 3D, and currently my main development platform is a Mac, where sound just works. But still, here's my suggestion:

0) Stop this flamewar here. It doesn't fix the problem. (Yeah, I know my posting violates this). Instead, help Maarten's work by coding or useful bug reports.

1) Accept that PulseAudio is here to stay, and that we have to work with it. Don't deny it, but don't deny that PulseAudio needs a lot of work as well(Ask Maarten for details - I don't know them)

2) Help the PA developers to make PA work. If we fight PA, and persuade distro's to drop it, its just a matter of time before someone else has starts up a new sound daemon called SpeedAudio. PA is a typical case where someone invented a new solution instead of fixing the existing one. They didn't yet succeed at fixing the problem, but they succeeded at adding this to all distros. If we attack PA, all we'll get is yet another broken replacement.

3) Possibly try to arrange a meeting between PulseAudio developers and Wine devs. A personal meeting doesn't lead to a flamefest, and might produce a useful set of isolated bugs to work on. (Unfortunately that is expensive, and I don't know any established meeting that might provide a backdrop for this)

4) Make sure Alsa + Pulse works well enough for users.

5) I think Art has done a great work with trying to fix this by adding a PA driver to Wine, but currently, as he correctly states, this cannot be accepted. Instead of trying to get yet another copy of wineoss.drv + a few changes into Wine, someone should fix the Wine sound infrastructure. I know this is unsexy work, and hard to make Alexandre like it. Maybe I should persuade Jeremy White to throw some $$$ at this process. We're having trouble with sound on CrossOver as well, so I guess he might be open to that.

6) Once the Wine sound infrastructure is fixed, we can monitor the situation and see where the Linux sound development leads to. If PulseAudio is nevertheless replaced with SpeedAudio in 2 years, punch some distro maintainers in the face. If PulseAudio remains the sound server of choice, but most other apps keep talking to it via the Alsa interface, stick to winealsa.drv, same if PA is dropped in favor of plain alsa+dmix. If Pul...

Read more...

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #157)
> 6) Once the Wine sound infrastructure is fixed, we can monitor the situation
> and see where the Linux sound development leads to. If PulseAudio is
> nevertheless replaced with SpeedAudio in 2 years, punch some distro maintainers
> in the face. If PulseAudio remains the sound server of choice, but most other
> apps keep talking to it via the Alsa interface, stick to winealsa.drv, same if
> PA is dropped in favor of plain alsa+dmix. If PulseAudio is used pretty much
> everywhere, and all other apps use it, add a winepulse.drv and drop
> winealsa.drv. I think we should only add a pulse driver if it can either be
> shown that there are issues that can't be fixed with alsa by design, or if we
> can drop winealsa in exchange.

Dropping winealsa would annoy everyone who has a *REAL* soundcard, has no need for pulse, and uses a distribution that hasn't already forced pulse down the users' throats.

You could argue a similar case for winejack - either drop winealsa in favour of winejack (because jack can be used on top of alsa without problems) or drop winejack in favour of winealsa (because winejack is generally unmaintained and buggy).

The only case where winealsa should be dropped is if some other driver (e.g. pulse) provides a hybrid winefoo/winealsa support, which would defeat the purpose of having *any* different sound drivers IMO. It's my understanding that the winepulse driver should use libpulse calls and not libalsa calls to do everything.

Revision history for this message
In , William Lightning (kassah) wrote :

So..... I'm tired of everyone saying get rid of OSS and just have ALSA because everything supports ALSA. FYI, BSD only supports OSS, and ALSA has OSS emulation, so if we drop anything, it should be everything but OSS. OSS has been around forever and virtually everyone supports it.

That being said, I'm pro-pulse. As an "average" non-heavy-gamer user, I do crap like run Quicken through wine, where I like my little ka-ching sound when I add a transaction, and I don't want to suspend my music via rhythmbox to get it.

The idea is if you want to tweak every last ounce of performance out of your sound server, then let them, keep ALSA or JACK or OSS. Pulse is moving to be an "average" user solution. Is it bug free? absolutely not. Then again, what is? Are the pulse devs willing to improve it? As far as I can tell yes. But their primary users are "average" joe. They use ALSA as a base because it has the drivers, but they provide a simple yet powerful front end to users.

So please, read Stefan's advice in Comment 157. I especially like #3, and would love to know where to donate to make this happen =). Art, Thank you so much for your patch. Even if it isn't accepted, it's a step in the right direction.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #159)
> So..... I'm tired of everyone saying get rid of OSS and just have ALSA because
> everything supports ALSA. FYI, BSD only supports OSS, and ALSA has OSS
> emulation, so if we drop anything, it should be everything but OSS. OSS has
> been around forever and virtually everyone supports it.

OSS4 has ALSA emulation (and software mixing), and I hear it's quite good. However, OSS4 won't get into the Linux kernel due to licensing issues ...

> Are the pulse devs willing to improve it? As far as I can tell yes. But their
> primary users are "average" joe. They use ALSA as a base because it has the
> drivers, but they provide a simple yet powerful front end to users.

Technically, ALSA isn't the only backend that pulse supports, it's just that it's the primary backend on Linux systems because OSS in Linux is terrible by modern standards.

But part of the problem is that pulse is marketed as a general solution to all audio problems. They claim it has low latency etc., which fuels calls for it to replace every other audio API. However, on closer inspection, it's unsuited to anything more than the most basic usage.

The point remains that winepulse will only be accepted if a definite, demonstrated need is presented - i.e. that winealsa (and other drivers) can't be made pulse-friendly. The suggestion of redesigning wine's audio subsystem, although time-consuming and resource heavy, is the first stepping stone in this direction.

Revision history for this message
In , Elmano (elmano) wrote :

(In reply to comment #160)
> But part of the problem is that pulse is marketed as a general solution to all
> audio problems. They claim it has low latency etc., which fuels calls for it to
> replace every other audio API. However, on closer inspection, it's unsuited to
> anything more than the most basic usage.
the only difference being that it works quite well for my needs (in contrast to some "advanced" solutions) and offers some nifty features.

> The point remains that winepulse will only be accepted if a definite,
> demonstrated need is presented - i.e. that winealsa (and other drivers) can't
> be made pulse-friendly.
So, to rephrase this: right now we have a working solution (winepulse) and one that "we may get compatible some day" (winealsa) and you are telling us is that "all we have to do" is to _prove_ that winealsa "can't be made pulse-friendly"? what kind of logic is that?
> The suggestion of redesigning wine's audio subsystem,
> although time-consuming and resource heavy, is the first stepping stone in this
> direction.
woohoo, maybe we get pulse-support in 2012 -.-

Revision history for this message
In , Walldorf2000 (walldorf2000) wrote :

(In reply to comment #158)
Again another great contributione to the flameware. Do you have any idea what Stefan was writing about? Maybe you should read his comment again.

(In reply to comment #160)
> But part of the problem is that pulse is marketed as a general solution to all
> audio problems. They claim it has low latency etc.,
This is not true. JACK ist the sound server of joice for low latency needs. It does not claim to be a low latency solution. Pulse and JACK devs work on making both sound servers working together nicely.

> The point remains that winepulse will only be accepted if a definite,
> demonstrated need is presented - i.e. that winealsa (and other drivers) can't
> be made pulse-friendly.
I don't know the Wine set-up in detail but AFAIK it is not your decision and I'm very glad about that.

You simply don't know what Pulse is good for and cultivate your prejudice.

ALSA via Pulse does have a higher latency than a direct Pulse API. Thus you demand a "definite, demonstrated need" on one side but claim that latency is the highest priority on the other side.

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

To keep the flames burning:

1. It's not license issues that keep OSS4 out of the kernel.
If you filter out personal bickering between those two teams
(about 95% of that discussion - in a way, same as here),
there are some technological issues too, i.e.
using float processing in kernel space.

2. My opinion here is rather biased, as I don't use wine
for anything resource heavy and though having a crappy soundcard
(just onboard AC'97), pulseaudio works just fine for me,
at least for playback (IIRC, never tried capture).

3. For me, comment 157 sums up this problem best
- there's a need to redesign whole Wine audio infrastructure,
not simply tweak old (or add new) drivers. winepulse could
be an acceptable temporary solution, the problem is that
often there's nothing longer living than a temporary hack.
If somebody found time for that redesign, winepulse could
be useful till things really get fixed, otherwise it would
eventually end up as an unmaintained hack. After all, pulseaudio
already went a few times through changes, that broke its
plugins in other libs/programs.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #162)
> (In reply to comment #158)
> Again another great contributione to the flameware. Do you have any idea what
> Stefan was writing about? Maybe you should read his comment again.

So you argue that Linux users be forced to either use an inferior OSS or install pulseaudio and live with it if they happen to want sound in Wine?

The main argument for supporting pulse *at all* is that people use it. People still use plain ALSA, and with good cause. It's hypocritical to drop winealsa in favour of winepulse *unless* some other driver takes over the job of winealsa and provides native ALSA support.

> > The point remains that winepulse will only be accepted if a definite,
> > demonstrated need is presented - i.e. that winealsa (and other drivers) can't
> > be made pulse-friendly.
> I don't know the Wine set-up in detail but AFAIK it is not your decision and
> I'm very glad about that.
>
> You simply don't know what Pulse is good for and cultivate your prejudice.

Obviously you have no interest in ending the flamewar. Your accusation, correct or not, of my contribution to the war is hypocritical.

> ALSA via Pulse does have a higher latency than a direct Pulse API. Thus you
> demand a "definite, demonstrated need" on one side but claim that latency is
> the highest priority on the other side.

In this case, latency and performance are not synonymous. Apparently, improvements have already been made to winealsa that make it pulse-friendlier. If those improvements continue enough, there is no need for winepulse.

It seems to me that pulse is used by people to whom latency isn't an issue as long as it is "good enough". If winealsa can be made equally "good enough" for pulse users, then it should be.

Revision history for this message
In , Stefan Dösinger (stefandoesinger) wrote :

I think my previous statement wasn't quite clear. What I intended to say is that the only situation in which I'd favor a winepulse.drv is when nobody needs winealsa.drv because the pulse native API has become the a de-facto standard, and there's nobody who does not use PulseAudio.
(I personally don't think this is likely to happen)

If under such circumstances there are still users who prefer not to use PA, a winealsa.drv could be test-wise maintained out-of-tree to see if it retains critical mass. In case anyone says this would be developer ignorance: Our resources are limited. We have to be ignorant sometimes. Currently, the situation that Linux changes sound APIs like underwear forces us to deal with this situation instead of doing the work we'd actually want to do: Make Windows apps run better.

The fundamental problem is that it's more sexy to write something new, rather than fixing existing solutions.

Revision history for this message
In , Rotbart van Dainig (rotbart-van-dainig) wrote :

(In reply to comment #165)
> I think my previous statement wasn't quite clear. What I intended to say is
> that the only situation in which I'd favor a winepulse.drv is when nobody needs
> winealsa.drv because the pulse native API has become the a de-facto standard,
> and there's nobody who does not use PulseAudio.
> (I personally don't think this is likely to happen)

Why do you assume a need for dropping winealsa.drv?
If you really absolutely need to drop a driver to add a new one - drop the obsolete wineesd.drv in favor of the working winepulse.drv.

EsounD is EOL and PulseAudio is it's replacement. PulseAudio isn't going to go away, especially not on the large desktop distros - even Skype and Adobe accepted that one.

The patches are there, they compile, seem to work (at least here) and they are a solution to a realworld problem: Running Windows Games with sound hassle-free via Wine on a modern desktop distro like openSUSE, Fedora or Ubuntu. And, to be honest - those are the main targets for people switching from Windows. And Wine targets exactly those people: http://wiki.winehq.org/ImportanceOfWine#head-5de2e9203c0811bff87c77b0fa026f0b0753a117

Sure, when the new sound system hits Wine, all of that needs to be implemented again. But a good solution today is better than a perfect solution tomorrow - even if it's just a stop-gap solution.

Revision history for this message
In , Stefan Dösinger (stefandoesinger) wrote :

I thought wineesd had been dropped a long time ago, along with winearts. The main reason for dropping drivers are maintenance efforts.

I am fine with having multiple drivers to deal with different OSes. winecoreaudio for OSX. Wineaudioio for solaris. winealsa for Linux, etc. I don't understand why Linux needs 5 different audio APIs, while every other system works just fine with one. I don't care what it's name is, just give me one system that (a) is available everywhere, (b) doesn't need manual user setup, (c) provides low latency and (d) allows software mixing. Windows gets that done. OSX gets that done. How hard can it be?

Revision history for this message
In , Rotbart van Dainig (rotbart-van-dainig) wrote :

(In reply to comment #167)
> How hard can it be?

Pretty hard, obviously. ;)

The thing is, while ALSA alone may catch a) and c), b) and d) always were an issue for a normal user.

PulseAudio, on the other hand, certainly excels in b) (just look at the new gnome-volume-control) and obviously d). While it's not yet as optimized for c) - the latency of winepulse.drv is way better than the up-to-1s latency of wineesd.drv when connected to PulseAudio.

As for a), PulseAudio is the choice for the desktop distributions - and, while technically irrelevant to Wine because of ARM chipsets, even Nokia's Maemo and Palm's WebOS use PulseAudio on mobiles.

Revision history for this message
In , Stefan Dösinger (stefandoesinger) wrote :

Any sound system that's supposed to be configuration-free shouldn't need a wiki page like this: http://www.pulseaudio.org/wiki/PerfectSetup . Or this: http://alsa.opensrc.org/DmixPlugin.

I personally didn't have any issue with software mixing or manual configuration with Alsa+dmix, ie, without PA in the past 3 years. Yeah, a long time ago I had to config dmix manually. On my two Ubuntu distros I get long sound delays with PA, even in Tuxracer. But as this discussion indicates, other people had different experiences.

Let me define my personal criteria for when the Linux sound system is useable: I have a lot of different computers here. I am using a few non-wine Linux apps with sound(skype, ut2004, quake 3, amarok, some other voip app, tuxracer.

To stick with the number 6: I want to be able to download 6 different distros, install them on any of my computers. I don't care what the sound system name is, but it should be the same on all of them. I don't care what kind of API it uses. I don't care what API the different apps talk to it with. But I want sound in all of my 6 sound apps working out of the box in all 6 distros on all of my 6 computers. Once these 6*6*6=216 combinations work out of the box, I'll say that the Linux sound system is useable.

Revision history for this message
In , Hverbeet (hverbeet) wrote :

This discussion is quite unnecessary and off-topic, but I guess most people participating already know that.

Personal opinions about PulseAudio aside, the way to get a PulseAudio driver into Wine would be to first fix Wine's audio driver architecture, and implement the driver afterwards. Neither of those is entirely trivial, but most people (understandably) probably aren't interested in the first part. I think it's extremely unlikely that anything said in this bug will change any of that. If the goal is improved sound support for Wine with PulseAudio, improving winealsa/PulseAudio interactions on both sides is probably a more realistic option.

Revision history for this message
In , Rotbart van Dainig (rotbart-van-dainig) wrote :

(In reply to comment #169)
> Any sound system that's supposed to be configuration-free shouldn't need a wiki
> page like this:

Sure, that's why there is the new Volume Controle in GNOME 2.28, making use of PulseAudio's capability to be reconfigured on runtime.

Give it a try.

(In reply to comment #170)
> Personal opinions about PulseAudio aside, the way to get a PulseAudio driver
> into Wine would be to first fix Wine's audio driver architecture, and implement
> the driver afterwards.

Why would the first part be a prereuisite?

Sure, it's the nice way of doing it, but there are people waiting to use Wine. Those would really apreaciate a stop-gap solution like the working, existing winepulse.drv.

Revision history for this message
In , Hverbeet (hverbeet) wrote :

(In reply to comment #171)
> > Personal opinions about PulseAudio aside, the way to get a PulseAudio driver
> > into Wine would be to first fix Wine's audio driver architecture, and implement
> > the driver afterwards.
>
> Why would the first part be a prereuisite?
>
Because the current architecture doesn't scale that well. You're free to try of course, but I think you'd have a hard time trying to make a convincing case to Alexandre that that part can be skipped. Realistically, I don't think that requirement will go away anytime soon.

Doing that part would also make a more convincing case that you (whoever would implement it) know what you're doing, which would make the second part more likely to go in, but that's secondary here.

> Sure, it's the nice way of doing it, but there are people waiting to use Wine.
> Those would really apreaciate a stop-gap solution like the working, existing
> winepulse.drv.
Well, winepulse.drv exists, it's just not supported by the Wine project. That creates issues for people reporting bugs while using it, but that's the trade they make.

Revision history for this message
In , Austin English (austinenglish) wrote :

(In reply to comment #166)
> Why do you assume a need for dropping winealsa.drv?
> If you really absolutely need to drop a driver to add a new one - drop the
> obsolete wineesd.drv in favor of the working winepulse.drv.
>
> EsounD is EOL and PulseAudio is it's replacement. PulseAudio isn't going to go
> away, especially not on the large desktop distros - even Skype and Adobe
> accepted that one.

Wine supports more than just Linux...Esound is the easiest way to get sound working on OpenSolaris, and perhaps others.

(In reply to comment #171)
> Sure, it's the nice way of doing it, but there are people waiting to use Wine.
> Those would really apreaciate a stop-gap solution like the working, existing
> winepulse.drv.

Like someone else pointed out earlier, stop-gap solutions are usually hacks, and when a hack is in place, people are rarely tempted to fix it properly. If you'd like a stop-gap solution, compile wine yourself with winepulse's driver.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #166)
> Why do you assume a need for dropping winealsa.drv?

Not assuming.

> PulseAudio isn't going to go away

ALSA isn't going away, not even on "small" distros like Debian and Gentoo. Remember those anyone? You know, distros that allow you to install what YOU want?

> Running Windows Games with sound hassle-free via Wine on a modern
> desktop distro like openSUSE, Fedora or Ubuntu. And, to be honest - those
> are the main targets for people switching from Windows. And Wine
> targets exactly those people:
> http://wiki.winehq.org/ImportanceOfWine#head-5de2e9203c0811bff87c77b0fa026f0b0753a117

No. Wine does not target specific distros.

> But a good solution today is better than a perfect solution tomorrow -
> even if it's just a stop-gap solution.

The problem is that winepulse is not even a "good" solution - if the whole internal sound API gets rewritten to be more modular, then it's even more work to port a new driver over to it. Regardless, AJ tends to only like (near-)perfect solutions.

(In reply to comment #168)
> (In reply to comment #167)
> > How hard can it be?
>
> The thing is, while ALSA alone may catch a) and c), b) and d) always were an
> issue for a normal user.

No. None of these are an issue for a "normal" user since dmix was enabled by default back in 1.0.something. (Power/professional users may have to fiddle with b) a bit more, but that's true for any system.) It's only cases where things like pulse steal the hardware (especially on Ubuntu, it seems) that b) and d) become problems.

That said, ALSA's OSS emulation steals the hardware from the rest of ALSA.

> PulseAudio, on the other hand, certainly excels in b) (just look at the new
> gnome-volume-control) and obviously d).

But it most certainly fails fails a).

> As for a), PulseAudio is the choice for the desktop distributions - and, while
> technically irrelevant to Wine because of ARM chipsets, even Nokia's Maemo and
> Palm's WebOS use PulseAudio on mobiles.

Maemo historically used ESD. Pulse is the natural step from ESD as it means your software doesn't have to be rewritten. This really isn't relevant though; you could equally argue that Intel processors are obsolete because all the current games consoles use PPCs.

Maybe we should have a separate bug for redesigning Wine's audio API, and set it up as a blocker to this one?

Revision history for this message
In , Ishan Arora (ishanarora) wrote :

(In reply to comment #174)
> ALSA isn't going away, not even on "small" distros like Debian and Gentoo.
> Remember those anyone? You know, distros that allow you to install what YOU
> want?

To start with I want to say that i have been a loyal Gentoo user for the past 3-4 years, and always have been installing from stage3 builds

> No. Wine does not target specific distros.

But the point is wine targets people who want to run Windows programs on Linux. I used wine to play windows games on Linux. I always had to apply unsupported patches to get things working (e.g. see bug 9787). But there was always a good reason as to why the patches were not included in the main tree. Recently i had the need to use network audio. ALSA doesn't support it natively. ALSA doesn't support to record the audio output on my Intel Audio Chipset, so no streaming programs would work. It was time to switch to PulseAudio. It worked perfectly for all my applications but wine. With wine I must use the the PulseAudio plugin for ALSA, which started hitting performance for games like Warcraft III, and did not give any good audio results. I have been tracking this bug for a long time. I don't think there is any point of that now. I seems like adding pulseaudio support with hurt many people's pride here. I know I could use the unsupported patch, but I don't anymore want to use a piece of code written by people who keep referring to themselves in third person as professional users. I will be using Windows/Gentoo coLinux, and don't bother replying to this message, I won't be checking the bug anymore.

Revision history for this message
In , Removed by request (removed1836289) wrote :

(In reply to comment #174)
> (In reply to comment #166)
> > PulseAudio isn't going to go away
>
> ALSA isn't going away, not even on "small" distros like Debian and Gentoo.
> Remember those anyone? You know, distros that allow you to install what YOU
> want?

This is a discussion about **Fixing Pulse support in Wine**. Here is a quick reminder of what this discussion is NOT about:
- Which distro is better than the other
- Why distros should not package Pulse
- Why Pulse developers are lazy
- Anything else not related to "Fixing Pulseaudio support in Wine"

Please, for what's left of this bug's sanity, avoid trolling.

Revision history for this message
In , William Lightning (kassah) wrote :

This is long range, but the refactor of the wine sound code might be a project we could do up a proposal for Google Summer of Code 2010 with support of both Wine and PulseAudio developers.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #176)
> (In reply to comment #174)
> > (In reply to comment #166)
> > > PulseAudio isn't going to go away
> >
> > ALSA isn't going away, not even on "small" distros like Debian and Gentoo.
> > Remember those anyone? You know, distros that allow you to install what YOU
> > want?
>
> Please, for what's left of this bug's sanity, avoid trolling.

This isn't trolling. This is pointing out that despite all the discussion of "popular" distros (Ubuntu, Fedora, OpenSUSE) that have switched to pulse as default, there is still a plethora of other distros that haven't (and likely will not). Debian and Gentoo are probably the most popular distros in this category.

It is an objection to the idea of dropping winealsa for winepulse. Any solution to the problem of Wine and pulse must not detract from current functionality.

Revision history for this message
In , Rotbart van Dainig (rotbart-van-dainig) wrote :

(In reply to comment #172)
> Because the current architecture doesn't scale that well.

Obviously, right now it scales well enough to allow a working driver for PulseAudio. ;)

(In reply to comment #173)
> Wine supports more than just Linux...Esound is the easiest way to get sound
> working on OpenSolaris, and perhaps others.

And GNOME just dropped EsounD in favor of PulseAudio.

> Like someone else pointed out earlier, stop-gap solutions are usually hacks,
> and when a hack is in place, people are rarely tempted to fix it properly.

Those people also tend to point out that there will be a complete rewrite of the Wine sound layer and all the drivers need to be rewritten anyway - so that proper fix will happen anyway.

> If you'd like a stop-gap solution, compile wine yourself with winepulse's driver.

Sure _I_ can. Can those people switching straight from Windows?

(In reply to comment #174)
> ALSA isn't going away, not even on "small" distros like Debian and Gentoo.

As pointed out above, PulseAudio is a GNOME dependecy now, so even those will ship with it sooner than later.

> Wine does not target specific distros.

True - Wine targets users switching from Windows to other systems, allowing them to run their programs and games. Those users tend to switch to a specific _kind_ of distros... and those being mostly the popular desktop ones.

So while Wine might not target _specific_ distros, it indirectly targets a _kind_ of distros.

> The problem is that winepulse is not even a "good" solution - if the whole
> internal sound API gets rewritten to be more modular, then it's even more work
> to port a new driver over to it.

If it's a complete rewrite anyway, where's the problem getting a working driver now for the old system?

> Maybe we should have a separate bug for redesigning Wine's audio API, and set
> it up as a blocker to this one?

Why? It works right now - a total redesign is a completely different matter.

(In reply to comment #178)
> It is an objection to the idea of dropping winealsa for winepulse.

Good. Drop wineesd for winepulse, problem solved.

Revision history for this message
In , Austin English (austinenglish) wrote :

> (In reply to comment #178)
> > It is an objection to the idea of dropping winealsa for winepulse.
>
> Good. Drop wineesd for winepulse, problem solved.

Then you screw over OpenSolaris users.

People, unless you're going to post about fixing wine's sound architecture, or something else that isn't common knowledge/already said dozens of times/complaining that the bug isn't fixed, don't post. The problem is known, there's a patch out, use it if you like. Complaining that the patch is not in wine won't magically get it in. Wine is LPGL'ed, so feel free to release your own binaries with the pulse driver in if you'd like.

But for the purpose of this bug, and for those of us subscribed to wine-bugs that read every bug comment, please stop posting comments in this bug.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #179)
> (In reply to comment #173)
> > Wine supports more than just Linux...Esound is the easiest way to get sound
> > working on OpenSolaris, and perhaps others.
>
> And GNOME just dropped EsounD in favor of PulseAudio.

Because they didn't have to rewrite all their apps to support pulse; pulse has esd compatibility.

> (In reply to comment #174)
> > ALSA isn't going away, not even on "small" distros like Debian and Gentoo.
>
> As pointed out above, PulseAudio is a GNOME dependecy now, so even those will
> ship with it sooner than later.

No, it's not a *dependency*. You can still get sound in GNOME without pulse running.

> > Wine does not target specific distros.
>
> So while Wine might not target _specific_ distros, it indirectly targets a
> _kind_ of distros.

"Indirectly" being the key word here. Wine does not target specific distros, nor does it (explicitly) target specific types of distros. Changing something just because some - but not all - distros changed it is not a good reason to accept code into Wine.

> If it's a complete rewrite anyway, where's the problem getting a working driver
> now for the old system?

Because adding drivers now means more work - potentially a lot more work - later on.

> > Maybe we should have a separate bug for redesigning Wine's audio API, and set
> > it up as a blocker to this one?
>
> Why? It works right now - a total redesign is a completely different matter.

You just answered your own question. A total redesign IS a completely different matter, so I suggested a separate bug. It looks like no new audio drivers will be accepted until those internal API issues are resolved (basically, no more code duplication), thus the suggestion for an audio redesign bug to block the pulse support bug.

> (In reply to comment #178)
> > It is an objection to the idea of dropping winealsa for winepulse.
>
> Good. Drop wineesd for winepulse, problem solved.

No, because the underlying issue of Wine's internal sound API is not solved. It also cuts out people using systems, e.g. Solaris, where ESD is still more common than pulse.

If wineesd was in better condition, we could actually drop winepulse in favour of wineesd.

Revision history for this message
In , Rotbart van Dainig (rotbart-van-dainig) wrote :

(In reply to comment #181)
> Because they didn't have to rewrite all their apps to support pulse; pulse has
> esd compatibility.

Just they did rewrite all the apps and dropped any reference to ESD completely in 2.28. It's gone from GNOME.

> No, it's not a *dependency*. You can still get sound in GNOME without pulse
> running.

Sure, I'm certain there are patches floating around to do that by hand.

> Changing something just because some - but not all - distros changed it is not a good reason to accept code into Wine.

Let's replace "some" by "most" makes it a good reason, tough.

> Because adding drivers now means more work - potentially a lot more work -
> later on.

No. A complete rewrite later only depends on what systems it will target.

> A total redesign IS a completely different matter, so I suggested a separate bug.

Just that doesn't make it a blocker for this bug.

> It looks like no new audio drivers will
> be accepted until those internal API issues are resolved (basically, no more
> code duplication), thus the suggestion for an audio redesign bug to block the
> pulse support bug.

Which doesn't make any sense at all, as API design has nothing to do with code.

> It also cuts out people using systems, e.g. Solaris, where ESD is still more
> common than pulse.

You are aware that Linux running PulseAudio is a lot more common than OpenSolaris running EsounD?

> If wineesd was in better condition, we could actually drop winepulse in favour
> of wineesd.

Sure, because writing code the dead ESD system seems the perfect way to go.

(In reply to comment #180)
> Then you screw over OpenSolaris users.

Doesn't OpenSolaris rely on OSS and gstreamer? At least for OpenSolaris GNOME, there is no more ESD - and Boomer is the new hype there.

Then again, it's probably easier to ignore this problem, hope that it goes away and screw over most Linux users. That has the additional benefit of doing the same when either PulseAudio or Boomer hit OpenSolaris, right?

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #182)
> (In reply to comment #181)
> > Because they didn't have to rewrite all their apps to support pulse; pulse has
> > esd compatibility.
>
> Just they did rewrite all the apps and dropped any reference to ESD completely
> in 2.28. It's gone from GNOME.
>
> > No, it's not a *dependency*. You can still get sound in GNOME without pulse
> > running.
>
> Sure, I'm certain there are patches floating around to do that by hand.

No. Vanilla GNOME supports ALSA audio backend.

> > Changing something just because some - but not all - distros changed it is not a good reason to accept code into Wine.
>
> Let's replace "some" by "most" makes it a good reason, tough.

No it doesn't.

> > Because adding drivers now means more work - potentially a lot more work -
> > later on.
>
> No. A complete rewrite later only depends on what systems it will target.

All systems, by definition.

> > It looks like no new audio drivers will
> > be accepted until those internal API issues are resolved (basically, no more
> > code duplication), thus the suggestion for an audio redesign bug to block the
> > pulse support bug.
>
> Which doesn't make any sense at all, as API design has nothing to do with code.

API design has *everything* to do with code, because the code implements the API design.

> > It also cuts out people using systems, e.g. Solaris, where ESD is still more
> > common than pulse.
>
> You are aware that Linux running PulseAudio is a lot more common than
> OpenSolaris running EsounD?

You are aware that Wine cannot just support what is "common" or popular?

> > If wineesd was in better condition, we could actually drop winepulse in favour
> > of wineesd.
>
> Sure, because writing code the dead ESD system seems the perfect way to go.

Don't knock it till you've tried it. It *would* work just as well as a native pulse driver. As it is, wineesd doesn't even work well with ESD.

> (In reply to comment #180)
> Then again, it's probably easier to ignore this problem, hope that it goes away
> and screw over most Linux users. That has the additional benefit of doing the
> same when either PulseAudio or Boomer hit OpenSolaris, right?

Or, on the other hand, we could overhaul the internal audio API and make it a lot easier to maintain new and existing drivers, thus paving the way for winepulse/wineboomer/winespeedaudio/wineopenal whatever inclusion upstream.

Revision history for this message
In , Rotbart van Dainig (rotbart-van-dainig) wrote :

(In reply to comment #183)
> You are aware that Wine cannot just support what is "common" or popular?

I think I'm used to be aware that the use case for Wine is exactly to support what's "common" and popular - that's the whole point of supporting Windows applications under different OS', isn't it?

> API design has *everything* to do with code, because the code implements the
> API design.

That way around, sure - sorry for being unclear. Just old code, that is simply scrapped when the API redesign comes, should in no way influence either the API design or the new code written from scratch.

> It *would* work just as well as a native pulse driver. As it is, wineesd doesn't even work well with ESD.

Hey, if you can fix wineesd for _now_ to allow, say, playing Diablo 2 without action samples playing about a second after the action - go for it.

> Or, on the other hand, we could overhaul the internal audio API and make it a
> lot easier to maintain new and existing drivers, thus paving the way for
> winepulse/wineboomer/winespeedaudio/wineopenal whatever inclusion upstream.

Nobody is asking you to stop that, on the contrary.

The only thing people are asking is to get a driver in vanilla Wine that allows them to use Wine well with current desktop distros until that golden age of new Wine Audio dawns.

On the other hand, I'm tired of reading the same excuses to artificially create deadlocks over and over again: Postponing everthing to the shiny new code that will miraculosly fix everything (but didn't even start for about two years now) is just as frustrating as claiming the need to drop drivers when including new ones, then later on locking down on that with the point that people still need it, even if other whonder why those are still there.
Don't bother repeating those - I won't bother you repeating myself anymore, don't worry Austin.

PS: I'm well aware that there are coding style issues with the patches.

Revision history for this message
In , Alexander-scott-johns+winebug (alexander-scott-johns+winebug) wrote :

(In reply to comment #183)
> Or, on the other hand, we could overhaul the internal audio API and make it
> a lot easier to maintain new and existing drivers, thus paving the way for
> winepulse/wineboomer/winespeedaudio/wineopenal whatever inclusion upstream.

I have opened bug 20308 ("Wine's sound architecture needs an overhaul") for this.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #184)
> (In reply to comment #183)
> > You are aware that Wine cannot just support what is "common" or popular?
>
> I think I'm used to be aware that the use case for Wine is exactly to support
> what's "common" and popular - that's the whole point of supporting Windows
> applications under different OS', isn't it?

See bug 10000. Your argument means that Wine should drop support for OSX, Solaris, Freebsd, etc.

> > API design has *everything* to do with code, because the code implements the
> > API design.
>
> That way around, sure - sorry for being unclear. Just old code, that is simply
> scrapped when the API redesign comes, should in no way influence either the API
> design or the new code written from scratch.

But the old code is not scrapped, it has to be ported to the new API design. Hence the reluctance in accepting *any* new audio drivers until the framework is fixed.

> The only thing people are asking is to get a driver in vanilla Wine that allows
> them to use Wine well with current desktop distros until that golden age of new
> Wine Audio dawns.

winealsa and dmix. Done. It's not Wine's fault that distros like Ubuntu make it difficult to get what really *is* the standard audio solution on Linux working.

Revision history for this message
In , Rotbart van Dainig (rotbart-van-dainig) wrote :

(In reply to comment #186)
> Your argument means that Wine should drop support for OSX, Solaris, Freebsd, etc.

Actually, the whole 'need to drop' stuff was not _my_ argument.

But hey, go on repeating excuses.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #187)
> (In reply to comment #186)
> > > (In reply to comment #184)
> > >
> > > I think I'm used to be aware that the use case for Wine is exactly to support
> > > what's "common" and popular - that's the whole point of supporting Windows
> > > applications under different OS', isn't it?
> >
> > Your argument means that Wine should drop support for OSX, Solaris, Freebsd, etc.
>
> Actually, the whole 'need to drop' stuff was not _my_ argument.

You're saying that Wine only needs to/should only support what's "common" and popular. That is obviously not OSX, Solaris or FreeBSD.

Revision history for this message
In , Rotbart van Dainig (rotbart-van-dainig) wrote :

(In reply to comment #188)
> You're saying that Wine _only_ needs to/should _only_ support what's "common"
> and popular.

No.

Revision history for this message
Phil Moorhouse (phil-moorhouse) wrote :

I'm having major problems trying to use spotify under wine1.2 package in Karmic beta (ALSA driver).

Spotify will play somewhere between 2 and a dozen tracks, and then start to stutter and not recover until it's restarted. This is not a network issue as it happens with cached playlists also.

Please see attached trace.

Revision history for this message
Daniel T Chen (crimsun) wrote :

On Mon, Oct 12, 2009 at 12:02 PM, Phil Moorhouse
<email address hidden> wrote:
> Spotify will play somewhere between 2 and a dozen tracks, and then start
> to stutter and not recover until it's restarted. This is not a network
> issue as it happens with cached playlists also.

You should reproduce this symptom using current Karmic.

Revision history for this message
Neil Wilson (neil-aldur) wrote :

The Winepulse version on my PPA has been updated to winepulse0.32.
This has a fix that it supposed to prevent stream stalling.

The new 1.1.31 wine1.2 package on the main archives has sound fixes in
the version.

Can everybody with Wine sound problems retry the new vanilla 1.1.31
uplolad and if possible the Winepulse version on my PPA
(https://launchpad.net/~neil-aldur/+archive/ppa).

Please report your findings back here about the quality of the sound.

--
Neil Wilson

Revision history for this message
Christopher Armstrong (radix) wrote :

When I use the default "wine1.2" (1.1.31) in karmic, with its default of ALSA audio output, the sound in World of Warcraft is extremely jittery. When I play a test sound with the ALSA audio output plugin configured (in winecfg), it jitters out part of the sound and then freezes.

When I use Neil Wilson's PPA of wine w/ pulseaudio, and then configure wine to use the pulseaudio plugin, sound works perfectly (so far).

I'm not very happy about using a version of wine that's not condoned by the wine upstreams, but they (or the Ubuntu developers) need to fix *something* for wine audio to work in karmic.

Revision history for this message
Yuri Alvarez (yurialvarez1984) wrote :

I tried wine1.2 from Neil's PPA in Karmic Beta, and the sound problem is solved. Actually I didn't changed the audio config in winecfg. It works immediately after installing the package.

Thanks!

Revision history for this message
Scott Ritchie (scottritchie) wrote :

Yuri, you may just have had good luck when running the game right after changing packages - in my experience the jitter/cut out of sound is an intermittent problem that only occurs some of the time.

Revision history for this message
Neil Wilson (neil-aldur) wrote :

With Spotify I get very heavy jitter and stuttering right after a
track change using the Alsa driver on 1.1.31. Even closing Spotify and
restarting often has no effect. The only solution is a logoff, or to
kill the pulseaudio daemon.

The new 0.32 Winepulse driver is a smoother experience and the hanging
appears to have gone. However there were occasional pauses last night
that I couldn't work out if it was network congestion or the driver.

--
Neil Wilson

Revision history for this message
Andris Sprūds (aspruds) wrote :

Pulseaudio + Wine (Spotify) still has random problems in Karmic beta (9.10) with all the updates applied as of today (14 oct 2009, 01:43am GMT-7). Audio from Wine occasionally makes clicking sounds, and sometimes the audio is completely garbled. Seems a random issue associated with changing songs in Spotify. As Neil pointed out above, a solution which sometimes works is restarting pulseaudio and/or Spotify. I have not experienced this in Ubuntu 9.04.

Revision history for this message
Phil Moorhouse (phil-moorhouse) wrote :

With all updates applied as of 14 Oct, 10:00am BST using vanilla wine1.2 (1.1.31-0ubuntu1) from the Kamic sources, I'm still experiencing occasional pops and crackles fairly regularly, and then eventually permanent stuttering that can only be resolved with a restart of Spotify. Please see attached trace.

I spent the last couple of days running Neil's package and did not experience any stuttering during that time - I've moved back to the vanilla package to try and give some feedback on this issue.

Revision history for this message
Phil Moorhouse (phil-moorhouse) wrote :

Also, as mentioned it seems to be more prevalent when the audio stops and starts, either between songs or after being paused.

Revision history for this message
macstevejb (macstevejb) wrote :

Installed wine 1.2 from Neil's PPA and running Spotify, I can confirm that my sound problems have been resolved with pulseaudio driver selected in the wine config settings. Using Karmic Beta.

Revision history for this message
Andris Sprūds (aspruds) wrote :

Winepulse version from Neil's PPA seems to work well. Have not had any problems since I installed them.

Revision history for this message
Ernst (ernst-blaauw) wrote :

The standard Karmic wine1.2 does not produce any normal sound in foobar - it's stuttering.
The wine1.2 packages from Neil Wilson solve those problems - thanks! I hope this patch can be included in the wine1.2 package from Ubuntu.

Another question: if the standard ubuntu repo's do update their wine version earlier than the ppa, I will get an unpatched version which will destroy my wine sound experience. Is it possible to block wine1.2 updates from Karmic's repo's?

Revision history for this message
Gustav Nilson (gustavnilsson) wrote :

Wonderful winepulse version from Neil's PPA! Now Spotify sounds much better!

Revision history for this message
Ernst (ernst-blaauw) wrote :

Currently, I get (normal) audio from wine by setting the audio driver to ALSA and 'full' instead of 'emulation' in the audio tab of winecfg.

Revision history for this message
Dundun Orrestad (dundun-f) wrote :

I agree with Gustav, wonderful! Tried all available fixes and workarounds to make Spotify work under 9.10, with no luck. Neil's Wine and pulse audio works flawlessly.

Revision history for this message
Robert Shaw (rshaw3) wrote :

I also installed Neil's version of Wine w/pulseaudio and I'm pretty satisfied (had all sorts of clicking and popping before). However, the sound will still occasionally drop out completely and the only way to get it back is to restart whatever application in wine (I'm usually playing WoW). Not sure if this is an issue with this version of wine or with pulseaudio itself. Anybody have any ideas how to track down the main culprit?

Revision history for this message
Daniel T Chen (crimsun) wrote :

You'd need to disable autospawn and enable verbose logging:

echo autospawn = no|tee -a ~/.pulse/client.conf

killall pulseaudio

pulseaudio -vvvv >~/pulseaudio.log 2>&1

On Oct 22, 2009 11:16 AM, "Robert Shaw" <email address hidden> wrote:

I also installed Neil's version of Wine w/pulseaudio and I'm pretty
satisfied (had all sorts of clicking and popping before). However, the
sound will still occasionally drop out completely and the only way to
get it back is to restart whatever application in wine (I'm usually
playing WoW). Not sure if this is an issue with this version of wine or
with pulseaudio itself. Anybody have any ideas how to track down the
main culprit?

-- Occasional sound drops in Wine via PulseAudio
https://bugs.launchpad.net/bugs/371897 You receiv...

Revision history for this message
Christopher Armstrong (radix) wrote :

@Robert Shaw: I've experienced the exact same problem with audio dropping out entirely while in WoW using Niel's Wine-pulse. For the record, apparently you don't need to restart it entirely; you can just get WoW to reinitialize its audio stack by going into sound preferences and toggling "use hardware" (which doesn't seem to do anything in wine, as far as I can tell, but does get it to give audio a kick-start).

Revision history for this message
Neil Wilson (neil-aldur) wrote :

Is that with the up to date package?

2009/10/22 Christopher Armstrong <email address hidden>:
> @Robert Shaw: I've experienced the exact same problem with audio
> dropping out entirely while in WoW using Niel's Wine-pulse. For the
> record, apparently you don't need to restart it entirely; you can just
> get WoW to reinitialize its audio stack by going into sound preferences
> and toggling "use hardware" (which doesn't seem to do anything in wine,
> as far as I can tell, but does get it to give audio a kick-start).
>
> --
> Occasional sound drops in Wine via PulseAudio
> https://bugs.launchpad.net/bugs/371897
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Neil Wilson

Revision history for this message
Ernst (ernst-blaauw) wrote :

I have the same symptoms as Robert and Christopher, and I'm running:$
apt-cache policy wine1.2
wine1.2:
  Installed: 1.1.31-0ubuntu1+winepulse0.32~ppa1
  Candidate: 1.1.31-0ubuntu1+winepulse0.32~ppa1
  Version table:
 *** 1.1.31-0ubuntu1+winepulse0.32~ppa1 0
        500 http://ppa.launchpad.net karmic/main Packages
        100 /var/lib/dpkg/status
     1.1.31-0ubuntu1 0
        500 http://nl.archive.ubuntu.com karmic/universe Packages

On Thu, Oct 22, 2009 at 19:50, Neil Wilson <email address hidden> wrote:

> Is that with the up to date package?
>
> 2009/10/22 Christopher Armstrong <email address hidden>:
> > @Robert Shaw: I've experienced the exact same problem with audio
> > dropping out entirely while in WoW using Niel's Wine-pulse. For the
> > record, apparently you don't need to restart it entirely; you can just
> > get WoW to reinitialize its audio stack by going into sound preferences
> > and toggling "use hardware" (which doesn't seem to do anything in wine,
> > as far as I can tell, but does get it to give audio a kick-start).
> >
> > --
> > Occasional sound drops in Wine via PulseAudio
> > https://bugs.launchpad.net/bugs/371897
> > You received this bug notification because you are a direct subscriber
> > of the bug.
> >
>
>
> --
> Neil Wilson
>
> --
> Occasional sound drops in Wine via PulseAudio
> https://bugs.launchpad.net/bugs/371897
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Christopher Armstrong (radix) wrote :

I just upgraded my karmic system to all the latest packages (including PulseAudio and the stock Wine package) and my sound on WoW now works fine using the ALSA wine output plugin. I no longer need Neil Wilson's wine-pulse PPA.

At least, this is true after about 10 minutes of play. I'll report if it goes downhill.

Revision history for this message
Christopher Armstrong (radix) wrote :

Sorry, I spoke too soon. It started going choppy for a few seconds at a time, and now it's choppy all the time, just like it used to be. I guess it's not totally deterministic; it must be sensitive to something environmental on my system, but I'm not sure what. All other sound-producing programs are working fine.

Back to Neil's PPA... configured to use the pulse backend...

and it's working again. I guess I'll have to pin it for now.

Revision history for this message
Neil Wilson (neil-aldur) wrote :

I'll get an update out just as soon as the Bazaar branch at
lp:ubuntu/wine1.2 updates to the latest version - which will probably
be after the final release this weekend.

2009/10/29 Christopher Armstrong <email address hidden>:
> Back to Neil's PPA... configured to use the pulse backend...
>
> and it's working again. I guess I'll have to pin it for now.

Revision history for this message
nl25 (neverland888) wrote :

The sound with Neil's ppa is actually much better comparing to what i ever heard from spotify when it was working fine on jaunty without any additional changes. Thanks.

Revision history for this message
Neil Wilson (neil-aldur) wrote :

My PPA has been updated with patch version 0.32 now. I've been experiencing occasional drop outs with the patch (on a netbook with an SSD) which look like buffer under-runs. Is anybody else suffering the same issue?

Revision history for this message
Brendan_P (brendan-p) wrote :

Works a treat for me Neil although I'm not using Spotify but rather World of
Warcraft. Ihave not upgraed to the new packages yet but will do and will let
you know if anything goes pear shaped.

Thanks for the great work.

All the best
Brendan

2009/11/7 Neil Wilson <email address hidden>

> My PPA has been updated with patch version 0.32 now. I've been
> experiencing occasional drop outs with the patch (on a netbook with an
> SSD) which look like buffer under-runs. Is anybody else suffering the
> same issue?
>
> --
> Occasional sound drops in Wine via PulseAudio
> https://bugs.launchpad.net/bugs/371897
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Wine: Confirmed
> Status in “pulseaudio” package in Ubuntu: New
> Status in “wine” package in Ubuntu: Triaged
>
> Bug description:
> Binary package hint: wine
>
> I'm running the Spotify Windows application on two laptops under Wine with
> both internal and external USB sound card. With both cards you get the
> occasional pop and click in the sound suggesting some data loss somewhere.
>
> I've selected the alsa drivers in winecfg and the whole thing is running
> via the alsa compatibility layer in pulseaudio.
>
> Jaunty 9.04 UNR and standard Ubuntu desktop.
>
> wine:
> Installed: 1.0.1-0ubuntu6
> Candidate: 1.0.1-0ubuntu6
> Version table:
> *** 1.0.1-0ubuntu6 0
> 500 http://gb.archive.ubuntu.com jaunty/universe Packages
> 100 /var/lib/dpkg/status
>
> pulseaudio:
> Installed: 1:0.9.14-0ubuntu20
> Candidate: 1:0.9.14-0ubuntu20
> Version table:
> *** 1:0.9.14-0ubuntu20 0
> 500 http://gb.archive.ubuntu.com jaunty/main Packages
> 100 /var/lib/dpkg/status
>

Revision history for this message
Eric Astor (eric-astor) wrote :

To give another perspective - I was trying to get Civilization 4 and Heroes of Might & Magic 3 working. I tested using Wine directly, and through PlayOnLinux. In both cases:

Testing with vanilla Wine 1.1.31 - sound occasionally crackled/popped (once or twice a second)
Testing with WineHQ's Wine 1.1.32 - same crackle/pop, same frequency

I pulled the source for WineHQ's Wine 1.1.32, and re-compiled with winepulse 0.32 included.

Testing with 1.1.32+winepulse0.32, ALSA driver - crackle was significantly worse (essentially constant)
Testing with 1.1.32+winepulse0.32, PulseAudio driver - no crackle at all, sound crisp & clear

Since I'm running off WineHQ (and thus on 1.1.32), I haven't yet tested Neil Wilson's version - but I can confirm that I have a sound dropping problem (stutter/pop - sounds like dropped data / underrun) on vanilla and WineHQ Wine, and that it goes away completely if I switch to a winepulse-patched Wine.

Revision history for this message
Jaime Rave (jaimerave) wrote :

Acording to Scott Ritchie, during the WineConf 2009 they agree to:

"We’re giving up on separate Pulse/ALSA/OSS/Jack sound driver layers and instead doing the smart thing: passing everything to OpenAL. Maarten Lankhorst will handle most of it."

More info: http://yokozar.org/blog/archives/171

Revision history for this message
Andrew C. Oliver (acoliver) wrote :

the winepulse bit from Neil Wilson's repository works great. Sound on Civ IV has never been better. Even before pulse was in the distro I never got good sound from wine. Now I do. Thanks!

Revision history for this message
In , Juan-lang (juan-lang) wrote :

*** Bug 20752 has been marked as a duplicate of this bug. ***

Revision history for this message
Donny Kurnia (donnykurnia) wrote :

Thank you so much Neil. Your version work nice in my Karmic. Great job :)

Revision history for this message
Kutale (k-konola) wrote :

Wasn't able to install the libevent package from Neil's repository. Despite that, Wine seems to work perfectly with Spotify and SbLive on Karmic. Big thanks.

Revision history for this message
Mikael B (mikaelbje) wrote :

Neil's PPA solved my issues too.

Revision history for this message
Jonte (johan-niklasson) wrote :

I followed the instructions, got the new package.
Uninstalled old Wine, installed the new Wine1.2.
Went into the winecfg, changed audio from ALSA to Pulse.
Fired up Spotify and the sound was even worse than before.
More stuttering and also a complete silence after the first song finished.
I don't know if I missed something, but now I'm back to the less choppy ALSA sound.
It's bad enough to make me wanna fire up Win$loth...:(

Revision history for this message
Ernst (ernst-blaauw) wrote :

What do all guys here experience if the hardware emulation in winecfg is set
to 'full' with ALSA? I have very good results atm with that setup. (I don't
use the pulse package.)

On Tue, Dec 8, 2009 at 14:01, Jonte <email address hidden> wrote:

> I followed the instructions, got the new package.
> Uninstalled old Wine, installed the new Wine1.2.
> Went into the winecfg, changed audio from ALSA to Pulse.
> Fired up Spotify and the sound was even worse than before.
> More stuttering and also a complete silence after the first song finished.
> I don't know if I missed something, but now I'm back to the less choppy
> ALSA sound.
> It's bad enough to make me wanna fire up Win$loth...:(
>
> --
> Occasional sound drops in Wine via PulseAudio
> https://bugs.launchpad.net/bugs/371897
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Locke (locke-db) wrote :

Using Ventrilo with wine 1.1.34 (and prior) the mic hook would fail after 20-45 minutes or so, cascading through Pulse to anything involving the mic, and only after using Ventrilo. Mic seems to behave correctly using native linux apps, indefinitely. Only after a restart would I get mic functionality back.

Thinking this was an alsa issue, I did the only thing I figured could help, upgrading to alsa 1.0.21, with no effect.

I attempted compiling wine from git with the winepulse patches applied. After running, I don't get pulse, nor winecfg. Apparently I failed somewhere during this. :)

I am now using Neil's Wine+WinePulse package (wine 1.1.31 with winepulse 0.33) from his PPA, but with Pulse enabled in winecfg, then going to Ventrilo's settings to test the mic, I am greeted with a "No mixers are available" dialog. Passing that, the mic won't function at all in Ventrilo, though it does in non-wine apps.

PulseAudio *IS* a mixer, isn't it? I'm unsure of where the problem is coming from.

Any ideas? Thanks in advance.

Revision history for this message
Locke (locke-db) wrote :

The wording in the first paragraph of my previous post may be misleading. Let me try to clarify:

The mic will function as expected, indefinitely, when using native linux apps. After a short time of using Ventrilo, the mic stops working, and no apps (native or not) are able to use it until after I restart.

Revision history for this message
Barnickal (nickjdbarr) wrote :

The Pulseaudio enabled Wine has fixed the issue I has that I was only getting sound from one application at a time after/while using Spotify under Wine.

Revision history for this message
Locke (locke-db) wrote :

I've determined my particular issue is caused by PulseAudio itself. Restarting the pulse service temporarily fixes the problem for me.

Revision history for this message
Zack Evans (zevans23) wrote :

Ernst (and anyone else NOT using Neil's workaround)

I have tried "Full" and "Emulation" on 44.1 and 48kHz and I have choppy audio in Spotify right from the start in all these combinations.

Standard Karmic version of wine 1.1.31-0ubuntu3
Standard Karmic version of pulseaudio 0.9.19-0ubuntu4

I remember reading something about power management in pulseaudio giving problems in karmic; I'll investigate that and post back if I get anywhere. I didn't try Spotify under jaunty so can't compare, sorry.

Several other apps crackle occasionally for me now but didn't under jaunty; but Spotify is unlistenable.

Revision history for this message
Zack Evans (zevans23) wrote :

Power management change in /etc/modprobe.d/alsa-base.conf doesn't help.

Changing pulseaudio to ffmpeg DOES help but still not quite listenable.

Uninstalled Pulseaudio totally and still got some stuttering so there's an ALSA problem *also* I think. Suspect this is an Intel HDA thing.

BUT it really is only Spotify that crackles badly... system sounds, Amarok, YouTube, iPlayer all fine.

Revision history for this message
Endre Stølsvik (stolsvik) wrote :

I just wanted to chip in with an observation: I have Ubuntu Karmic. I open the System->Preferences->Sound, and then switch to the Applications tab. There I can see which applications that send sound - probably which applications have a "pulse session" or whatever. There's one line, and a volume control, per such session.

When I run with the Niel-patch, and thus pulseaudio native, this states "Wine [spotify.exe]", and appears nice and normal (for comparison, for the Flash plugin, it states "ALSA plug-in [npviewer.bin]").

When I switch over to ALSA sound on Wine, I instead get a line with "ALSA plug-in [wine-preloader]" (I use PlayOnLinux, hence the preloader I assume). That is all nice and good.

However, and here's the observation: When playing music - and having that awful stuttering, basically it feels like the song uses about twice the time to play, being chopped up into small tens-of-milliseconds fragments that are played with some silence in between - I can see this line stutter in the same speed/phase/whatever you'd like to call it, as the audio. It seems like it hooks on, plays some 10 ms of sound, then hooks off (the line disappears), and then comes back on, repeat ad pukem. If I pause the playback, the line stays on.

Revision history for this message
Oddy (mats-nilsson) wrote :

Hi guys!

Switching to only OSS as driver in Wine worked out just fine for me.. Now Spotify runs really smoothly even though I have a real slow laptop.. Celeron 1.3 Ghz with 256 MB RAM.... I also runs Ubuntu 9.10 :)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:0.9.22~0.9.21+341-g62bf-0ubuntu1

---------------
pulseaudio (1:0.9.22~0.9.21+341-g62bf-0ubuntu1) lucid; urgency=low

  * New snapshot based on stable-queue git branch (testing requested
    specifically by upstream)
    - LP: #164745, #173212, #201391, #204536, #207796, #210016, #221038,
    - LP: #226342, #230408, #236423, #237443, #250059, #269585, #274304,
    - LP: #274577, #275474, #277532, #277566, #277932, #278025, #280534,
    - LP: #283049, #286816, #287036, #292732, #298011, #298301, #300290,
    - LP: #302038, #311497, #311853, #324062, #339448, #344057, #348979,
    - LP: #350829, #356206, #367379, #367544, #369822, #371897, #374846,
    - LP: #375570, #381801, #399515, #402950, #403786, #408169, #409322,
    - LP: #409723, #410326, #410446, #417695, #417976, #419271, #421072,
    - LP: #422774, #423979, #424655, #425028, #427016, #431072, #432660,
    - LP: #437640, #437996, #442191, #443306, #443389, #446719, #449762,
    - LP: #455417, #461532, #464652, #483191, #497537, #503780
  * debian/patches/:
    + add: 0099-change-configure-git-version-tag.patch: Match released
           upstream 0.9.21 for shlibs and LIBPULSE_VERSION_INFO
    - drop: 0004-set-tsched0.patch (no longer relevant)
            0050-revert-pacmd-poll-argv.patch (no longer relevant)
            0056-dont-bail-on-sound-class-modem.patch (merged)
            0056-ignore-sound-class-modem.patch (merged)
            0058-Backport-4c793.patch (merged)
            0059-Backport-978d3.patch (merged)
            0060-fix-implicit-func-decl-cpu-arm.patch (merged)
            0061-Backport-c5fdb.patch (merged)
            0070-dont-bail-on-sound-class-modem-devs.patch (merged)
    + refresh: 0001-change-resample-and-buffering.patch
               0090-disable-flat-volumes.patch
               0091-dont-load-cork-music-on-phone.patch
               0057-load-module-x11-bell.patch
 -- Daniel T Chen <email address hidden> Thu, 14 Jan 2010 20:33:05 -0500

Changed in pulseaudio (Ubuntu):
status: New → Fix Released
Revision history for this message
Endre Stølsvik (stolsvik) wrote :

How can I find out how this was fixed - what was the problem?

Revision history for this message
Endre Stølsvik (stolsvik) wrote :

Is this fixed for others? Because it simply ain't for me. I still have to use the Niel-path. Using ALSA as output for Wine still stutters exactly as it did before.

Revision history for this message
Andris Sprūds (aspruds) wrote :

I'd like to confirm what Entre said - it does not seem to be fixed as of now (Feb 09, 2010) with brand new Karmic install and all updates applied.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

It says in the "Fix Released" message that it was fixed in the development version of Ubuntu, lucid, not karmic. It would be good to test whether the problem went away there.

Revision history for this message
Endre Stølsvik (stolsvik) wrote :

So one is seriously going to let it stay like that for six months, even with a known cause and a known fix?! I find that no less than truly amazing. I am probably a whiner, but it is BS like these small things RIGHT HERE that gives all of Linux a continuous bad name.

Not to mention the AMAZING bug with the "GDK_NATIVE_WINDOWS=true" to get Flash in any browser and Eclipse and Azureus and WTF to work. It is just insane.

Revision history for this message
Eric Astor (eric-astor) wrote :

If you'll just be patient - remember that most of us DON'T get paid to work on this, and are doing it to improve on the system that we use too! Besides, much of the delay here is actually an upstream issue; Wine is in the middle of transitioning to a new sound layer, and so won't accept a PulseAudio driver. If they would, we have an already-implemented fix for this issue in the form of the wine-pulse patches as used by Neil in his repository! If you really need this fixed urgently, I suggest you check my PPA, where I keep a package updated with both the latest wine versions and the latest release of the wine-pulse patchset. No promises, but it works for me!

Revision history for this message
Eric Astor (eric-astor) wrote :

Also, I should add - I recently updated to Lucid, and plan to test this problem to see if the fix worked tonight.

Revision history for this message
Endre Stølsvik (stolsvik) wrote :

My point: Why not just stick the Niel patch in and send it out - NOW, or more correctly, 3 months ago? It isn't like you never do a local fix for other issues, right? And it cannot POSSIBLY destabilize the system any more than it already is - as how it is is completely useless for a large base of users.

It would be a temporary *bugfix* until it was fixed upstream - TO MAKE UBUNTU WORK.

The "we don't get paid" argument really isn't that interesting, I must admit.

PS, and completely OT: How many completely different sound systems have Linux/Unix had through the years? And when will this be a kernel thing, like it most probably should be, latency and all considered (now graphics finally is.. so why not sound?)

Revision history for this message
Jack Leigh (leighman) wrote :
Revision history for this message
Endre Stølsvik (stolsvik) wrote :

Thanks for the illuminating link.

However, it does *not* address 6 months of nonworking Wine.

I just cannot fathom it. The Niel patch "Just Makes It Work", but it is not distributed through Ubuntu's update system?

How many users are actually affected by this? I and a few others come here whining - and I believe we represent a sliver a fraction of a percentage of the possibly affected users.

And the fix IS RIGHT DAMN THERE.

I just simply cannot comprehend this utterly *idiotic* decision.

And nerds wonder why Linux doesn't "take off"? I am just SO tired of all the bullshit with Linux. Config files?! I am WAY past the age where I found it cool to hack on some stupid script file hidden some stupid place somewhere in the stupid system to have *Flash* and *Eclipse* actually *work* on my machine.

Revision history for this message
Ernst (ernst-blaauw) wrote :

On Lucid 64-bit, this is not fixed yet.

@Endre: please show some respect to the developers, which donate their spare
time to make this free(!) operating system better. As there are work
arounds, either use such workaround or use another operating system - but
stop blaming the people who put their energy into this project. Your
comments do not motivate them at all.

2010/2/10 Endre Stølsvik <email address hidden>

> Thanks for the illuminating link.
>
> However, it does *not* address 6 months of nonworking Wine.
>
> I just cannot fathom it. The Niel patch "Just Makes It Work", but it is
> not distributed through Ubuntu's update system?
>
> How many users are actually affected by this? I and a few others come
> here whining - and I believe we represent a sliver a fraction of a
> percentage of the possibly affected users.
>
> And the fix IS RIGHT DAMN THERE.
>
> I just simply cannot comprehend this utterly *idiotic* decision.
>
> And nerds wonder why Linux doesn't "take off"? I am just SO tired of all
> the bullshit with Linux. Config files?! I am WAY past the age where I
> found it cool to hack on some stupid script file hidden some stupid
> place somewhere in the stupid system to have *Flash* and *Eclipse*
> actually *work* on my machine.
>
> --
> Occasional sound drops in Wine via PulseAudio
> https://bugs.launchpad.net/bugs/371897
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Eric Astor (eric-astor) wrote :

I should add - though I feel Endre could be phrasing his suggestions more politely, I basically agree with him.

I haven't had the opportunity yet to ask the Ubuntu Wine team why they haven't seen fit to include the winepulse patches into Ubuntu's wine package... There may well be legitimate reasons, but I would very much appreciate an answer as to why these patches aren't being included as a temporary fix until the interaction of Wine with PulseAudio's ALSA input is fixed.

Anyone from the Wine team reading this? Bunch of us out here who would appreciate a response. For my own use, I'm already maintaining the winepulse patchset in a package in my PPA, properly fitted into quilt, and would be glad to help out with maintenance of patches in quilt in general and with maintenance of the winepulse driver specifically, if my help is wanted.

Revision history for this message
Eric Astor (eric-astor) wrote :

Good news, everyone! I'm running Lucid 64-bit right now, and I currently cannot reproduce this bug in situations where it's invariably occurred before.

I have a few PlayOnLinux bottles containing various applications I've had sound trouble with in the past, including KOTOR and Heroes of Might & Magic 3... I ran both briefly using the version of Wine in my PPA switched to use its ALSA driver, through situations that have always provoked this bug before, with no sound problems apparent.

To double-check this, I pulled the source of wine1.2 (1.1.38-0ubuntu1) from the Lucid repository, compiled and installed it as a PlayOnLinux Wine version, and ran KOTOR again, using this version - again, no problems.

Finally, as a last check - I followed up on Ernst's lead, and tried foobar2k. I created a fresh wine prefix, installed foobar, and played around with some music. Even streaming from a network drive, I had no sound problems whatsoever. I was also able to verify that PulseAudio was receiving input through its ALSA plugin, not through any other program. No trouble mixing multiple streams, either - I started up an instance of Rhythmbox, and it played in parallel without trouble.

Ernst, could you tell me what you were using when you had sound cutting out on Lucid 64-bit? I'd like to see if I can duplicate the issue.

Revision history for this message
Christopher Armstrong (radix) wrote :

Eric, could you possibly test that Ventrilo (a free Windows Voip program) works with the new wine sound stack on Lucid? Given that it makes use of the microphone, it's something I'm concerned about.

Revision history for this message
Eric Astor (eric-astor) wrote :

I'll be glad to test Ventrilo - good idea, I hadn't thought of a good microphone test app yet. I'll just need to figure out where I put my microphone first! I'll post once I've checked.

Revision history for this message
In , Ema-oriani (ema-oriani) wrote :

(In reply to comment #189)
> (In reply to comment #188)
> > You're saying that Wine _only_ needs to/should _only_ support what's "common"
> > and popular.
>
> No.

Hi,

sorry to ask, but what are the main reasons why Wine devs don't want to include this patch in the main tree?
I don't want to start any flame but here is a bit unclear between the huge amount of (very) detailed answers and is not easy to udnerstand the real reasons why.
Is it because:
*) patch code is of bad quality
*) patch is buggy
*) patch doesn't conform coding standard
*) patch is incomplete
*) pulse is present only in Linux and not on other architectures
*) current wine devs/mantainers don't want to mantain this piece of code even if it's well written and works?
Really, what are the reasons?

Thanks again,

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

(In reply to comment #191)
> sorry to ask, but what are the main reasons why Wine devs don't want to include
> this patch in the main tree?
> Really, what are the reasons?
>

"The most dangerous enemy of a better solution is an existing codebase that is just good enough."

winealsa.drv currently exists and has an long usage history. PulseAudio has an alsa plugin so that things are just supposed to work without effort. In practice this can be setupt to work quite well (except on 64-bit where there can be version-mismatch issues between older 32-bit-compat and newer 64-bit-system pulse libs.)

That said, mplayer, xine, libao, vlc, SDL, gstreamer, and virtualbox all have both pulseaudio and alsa backends despite the alsa-pulse layer.

In the end it comes down to wine developers don't like having so many audio backends in the tree, and so don't want another committed to it.

Revision history for this message
Ernst (ernst-blaauw) wrote :

The only audio program in Wine whoch I use is foobar (v1.0). I have
emulation set to full. Most of the time, playing is fine, but there are two
issues:
- sometimes I hear a crack in the sound
- sometimes, the sound stops and I have to restart foobar
Both issues do not occur very often, but they happen (I did not test v.
1.1.38 yet).

I compiled a PulseAudio version myself, and now, I never have a problem (On
Karmic, the sound (winePA) would also stop sometimes but it seems Lucid or
the updated patches of WinePA have solved this issue).

On Thu, Feb 11, 2010 at 00:43, Eric Astor <email address hidden> wrote:

> Good news, everyone! I'm running Lucid 64-bit right now, and I currently
> cannot reproduce this bug in situations where it's invariably occurred
> before.
>
> I have a few PlayOnLinux bottles containing various applications I've
> had sound trouble with in the past, including KOTOR and Heroes of Might
> & Magic 3... I ran both briefly using the version of Wine in my PPA
> switched to use its ALSA driver, through situations that have always
> provoked this bug before, with no sound problems apparent.
>
> To double-check this, I pulled the source of wine1.2 (1.1.38-0ubuntu1)
> from the Lucid repository, compiled and installed it as a PlayOnLinux
> Wine version, and ran KOTOR again, using this version - again, no
> problems.
>
> Finally, as a last check - I followed up on Ernst's lead, and tried
> foobar2k. I created a fresh wine prefix, installed foobar, and played
> around with some music. Even streaming from a network drive, I had no
> sound problems whatsoever. I was also able to verify that PulseAudio was
> receiving input through its ALSA plugin, not through any other program.
> No trouble mixing multiple streams, either - I started up an instance of
> Rhythmbox, and it played in parallel without trouble.
>
> Ernst, could you tell me what you were using when you had sound cutting
> out on Lucid 64-bit? I'd like to see if I can duplicate the issue.
>
> --
> Occasional sound drops in Wine via PulseAudio
> https://bugs.launchpad.net/bugs/371897
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
In , Sorceror (shacklein) wrote :

If I have followed the discussion correctly ...

(In reply to comment #191)
> I don't want to start any flame but here is a bit unclear between the huge
> amount of (very) detailed answers and is not easy to udnerstand the real
> reasons why.
> Is it because:
> *) patch code is of bad quality
The patch does not meet AJ's quality standards, and no one seems to want to fix this.

> *) patch is buggy
Not as far as I know.

> *) patch doesn't conform coding standard
See above.

> *) patch is incomplete
Yes, I believe so.

> *) pulse is present only in Linux and not on other architectures
No. pulse is cross-platform.

> *) current wine devs/mantainers don't want to mantain this piece of code even
> if it's well written and works?
If it's well written and works, then there would be little objection to this as required maintenance would be low. So far, no one has put their hand up to 1) fix the code standard, 2) prove that winepulse is 100% necessary and 3) maintain a fixed and proven version of the module long-term.

(In reply to comment #192)
> In the end it comes down to wine developers don't like having so many audio
> backends in the tree, and so don't want another committed to it.

No. What it comes down to is no one has proven programatically that winealsa can't be made to work with pulse's ALSA emulation.

Revision history for this message
In , Neil Wilson (neil-aldur) wrote :

(In reply to comment #193)

> No. What it comes down to is no one has proven programatically that winealsa
> can't be made to work with pulse's ALSA emulation.

Rather than kicking off the mud slinging again, how are we doing at
getting the Open AL support into Wine that was discussed late last
year?

That then makes the point moot.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

(In reply to comment #194)
> (In reply to comment #193)
>
> > No. What it comes down to is no one has proven programatically that winealsa
> > can't be made to work with pulse's ALSA emulation.
>
> Rather than kicking off the mud slinging again, how are we doing at
> getting the Open AL support into Wine that was discussed late last
> year?
>
> That then makes the point moot.

OpenAL is in the git head as far as I know. Windows applications using OpenAL are now "first class citizens" if you will, with their buffers going straight to hardware if the native libraries support it. There is an open-source DSound wrapper on top of OpenAL written in C++ which could be of interest, but I've not gotten it to compile yet.

Revision history for this message
In , Ema-oriani (ema-oriani) wrote :

(In reply to comment #195)
> OpenAL is in the git head as far as I know. Windows applications using OpenAL
> are now "first class citizens" if you will, with their buffers going straight
> to hardware if the native libraries support it. There is an open-source DSound
> wrapper on top of OpenAL written in C++ which could be of interest, but I've
> not gotten it to compile yet.

Great, could you point me to the OpenAL driver?

If someone would write the pulseaudio driver patch according to the wine coding standards (where are them?) and complete the missing bits (which functionality is exactly missing/do we need more optimization?) would you accept it in main tree, am I correct?

What is the point of having:
WINE->PULSE->ALSA
instead of
WINE->ALSA->PULSE->ALSA
?
It's pretty clear to me, one less redirection and functions call etc etc...
Again, clearly WINE->ALSA could be better, but as seen as PULSE is basically the de-facto standard (and now -gasp- works) why not support it?

What about OpenAL? would it be like
WINE->OpenAL->PULSE->ALSA
or something else?

Cheers,

Ps. Just to clarify, I have been using wine in the past 3+ years to play WoW.
When in Ubuntu 8.10 (or 8.04 I don't remember exactly), pulseaudio came in, I was losing 30% FPS because bad optimization so I wasn't exactly a fan of it. But now, it seems to work, and because of that I guess it's better to support it straight in wine.

Revision history for this message
In , thgreasi (thgreasi) wrote :

+1 to Ema
(basically I wouldn't`t have to +1 good posts, if the vote system was actually taken into account)

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #196)
> If someone would write the pulseaudio driver patch according to the wine coding
> standards (where are them?) and complete the missing bits (which functionality
> is exactly missing/do we need more optimization?) would you accept it in main
> tree, am I correct?

I can't speak for AJ, who is the only person who can commit to the wine upstream git tree, but I'd say there is a good chance of that.

> What is the point of having:
> WINE->PULSE->ALSA
> instead of
> WINE->ALSA->PULSE->ALSA
> ?

I counter with the same logic:
What's the point of having WINE->PULSE->ALSA instead of WINE->ALSA? Remove pulse from the equation (and use dmix where required) and you have a better working solution.

Of course, pulse is cross-platform, so works on Solaris, *BSD, etc., where ALSA is not available, but OSS is. So you could then have WINE->OSS4 instead of WINE->PULSE->OSS.

> It's pretty clear to me, one less redirection and functions call etc etc...
> Again, clearly WINE->ALSA could be better, but as seen as PULSE is basically
> the de-facto standard (and now -gasp- works) why not support it?

No, pulse is not a de-facto standard. It's not installed by default by the majority of distros. ALSA is the de-facto standard for sound in Linux; OSS is still available in the kernel tree, as well as by ALSA emulation, although the best OSS-based solution would be to compile OSS4 which is not in the kernel due to license disparity.

> What about OpenAL? would it be like
> WINE->OpenAL->PULSE->ALSA
> or something else?

> Ps. Just to clarify, I have been using wine in the past 3+ years to play WoW.
> When in Ubuntu 8.10 (or 8.04 I don't remember exactly), pulseaudio came in, I
> was losing 30% FPS because bad optimization so I wasn't exactly a fan of it.
> But now, it seems to work, and because of that I guess it's better to support
> it straight in wine.

No, that's not a good reason. Your performance has most likely improved due to improvements in winealsa to make it work better with pulse. For more reliable results, pulseaudio can be removed completely and safely, even on Ubuntu.

Revision history for this message
In , Aigars Mahinovs (aigarius) wrote :

> > What is the point of having:
> > WINE->PULSE->ALSA
> > instead of
> > WINE->ALSA->PULSE->ALSA
> > ?
>
> I counter with the same logic:
> What's the point of having WINE->PULSE->ALSA instead of WINE->ALSA? Remove
> pulse from the equation (and use dmix where required) and you have a better
> working solution.

Might be, but PulseAudio is preconfigured in a majority of distributions and dmix is not. And dmix is not a better solution, because you can not easily adjust relative sound level from multiple programs with dmix. And you can not move a program to another sound card without restarting the program or stopping playback. Which in turn makes it nearly impossible easily configure dmix to support dynamically plugged in USB headsets for an average user. And such headsets are very popular now to reduce the interference noise from the built-in soundcards.

> > It's pretty clear to me, one less redirection and functions call etc etc...
> > Again, clearly WINE->ALSA could be better, but as seen as PULSE is basically
> > the de-facto standard (and now -gasp- works) why not support it?
>
> No, pulse is not a de-facto standard. It's not installed by default by the
> majority of distros.

Fedora, Ubuntu, Mandriva, Linux Mint, and openSUSE at this point. I believe that easily makes it a majority by any count. And it has been here for nearly 2 years.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #199)
> > > What is the point of having:
> > > WINE->PULSE->ALSA
> > > instead of
> > > WINE->ALSA->PULSE->ALSA
> > > ?
> >
> > I counter with the same logic:
> > What's the point of having WINE->PULSE->ALSA instead of WINE->ALSA? Remove
> > pulse from the equation (and use dmix where required) and you have a better
> > working solution.
>
> Might be, but PulseAudio is preconfigured in a majority of distributions and
> dmix is not. And dmix is not a better solution, because you can not easily
> adjust relative sound level from multiple programs with dmix. And you can not
> move a program to another sound card without restarting the program or stopping
> playback. Which in turn makes it nearly impossible easily configure dmix to
> support dynamically plugged in USB headsets for an average user. And such
> headsets are very popular now to reduce the interference noise from the
> built-in soundcards.

dmix is a "better solution" because it works. pulseaudio has extra features, but it's problems like this that make it unsuitable for the average user.

As for the USB headsets, you're right about dmix. So the current solution is either configure the headset (with dmix) before you start playing, or use pulseaudio which is known to not work as well (even with modern Wine), or learn how to configure JACK.

> Fedora, Ubuntu, Mandriva, Linux Mint, and openSUSE at this point. I believe
> that easily makes it a majority by any count. And it has been here for nearly 2
> years.

That's nowhere near the majority. distrowatch.com has plenty more. esd has been around for longer, ALSA's modern API has been around for longer still, and OSS before that. OSS is the de-facto standard for unix-like sound systems, and ALSA for Linux.

Revision history for this message
In , Aigars Mahinovs (aigarius) wrote :

(In reply to comment #200)
> dmix is a "better solution" because it works. pulseaudio has extra features,
> but it's problems like this that make it unsuitable for the average user.

PulseAudio works as well perfectly fine for a wide range of users. It works perfectly fine with all the fine applications that support it. Naturally it does not work as good with Wine and that is exactly that this BUG is here. This bug in Wine of not supporting PulseAudio.

> > Fedora, Ubuntu, Mandriva, Linux Mint, and openSUSE at this point. I believe
> > that easily makes it a majority by any count. And it has been here for nearly 2
> > years.
>
> That's nowhere near the majority. distrowatch.com has plenty more.

Please don't be silly. Yes, there are thousands of Linux distros. But: 1) by the number of users the ones I named constitute an overwhelming majority of desktop users, 2) I've done the research before: over 90% of all Linux distros are derivative distros from either Debian/Ubuntu or Fedora. With over 60% falling in Debian/Ubuntu camp. And those have pulseaudio. So, as I said before - by any metric, PulseAudio is there by default in the overwhelming majority of desktop Linux distributions today.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

All, it is not useful to debate the topic of "whether pulseaudio?" or "what is
the best audio subsystem?" Those are not the topic of this bug report. Please
refrain. Whether native or through alsa-pulse is on topic.

(In reply to comment #193)
> (In reply to comment #191)
> > Is it because:
> > *) patch code is of bad quality
> The patch does not meet AJ's quality standards, and no one seems to want to fix
> this.
As the original author, I am willing to fix this. Last attempt at a code review
was not by AJ and was on an old version.

> > *) patch doesn't conform coding standard
> See above.
More useful feedback is needed, but it's quite clean. Naming and indentation is
consistent. I should revisit pulse.c on a rainy weekend though.

> > *) patch is incomplete
Supports WaveOut, WaveIn and Dsound playback and capture. All testsuite tests
pass.

> > *) current wine devs/mantainers don't want to mantain this piece of code even
> > if it's well written and works?
> If it's well written and works, then there would be little objection to this as
> required maintenance would be low. So far, no one has put their hand up to 1)
> fix the code standard, 2) prove that winepulse is 100% necessary and 3)
> maintain a fixed and proven version of the module long-term.
I am hesitant to put my hand up again because it's still scorched. I have been
maintaining this patch out-of-tree for over a year now at
http://art.ified.ca/?page_id=40 . I regularly receive email feedback on it and
provide support.

> (In reply to comment #192)
> > In the end it comes down to wine developers don't like having so many audio
> > backends in the tree, and so don't want another committed to it.
>
> No. What it comes down to is no one has proven programatically that winealsa
> can't be made to work with pulse's ALSA emulation.
Well, it can be coaxed into working by modifying buffer settings, and does work
to a minimum extent, but it's not exactly ideal.

Revision history for this message
In , Sorceror (shacklein) wrote :
Download full text (4.7 KiB)

(In reply to comment #201)
> (In reply to comment #200)
> > dmix is a "better solution" because it works. pulseaudio has extra features,
> > but it's problems like this that make it unsuitable for the average user.
>
> PulseAudio works as well perfectly fine for a wide range of users. It works
> perfectly fine with all the fine applications that support it. Naturally it
> does not work as good with Wine and that is exactly that this BUG is here. This
> bug in Wine of not supporting PulseAudio.

You could equally that it's pulse not supporting Wine, and that the bug is pulse's issue. As it stands, there's a gaggle of alternatives to pulse, some of which still around and in use today. And for the most part, winealsa/wineoss/wineesd work OK with modern ine and pulse. The absolute need for a separate winepulse has not been programatically demonstrated; the best argument is that "everybody (or a lot of people) use it".

> > > Fedora, Ubuntu, Mandriva, Linux Mint, and openSUSE at this point. I believe
> > > that easily makes it a majority by any count. And it has been here for nearly 2
> > > years.
> >
> > That's nowhere near the majority. distrowatch.com has plenty more.
>
> Please don't be silly.

Please don't be inconsistent. Is it a matter of distros or "regular desktop users"?

> 2) I've done the research before: over 90% of all Linux distros
> are derivative distros from either Debian/Ubuntu or Fedora. With over 60%
> falling in Debian/Ubuntu camp. And those have pulseaudio.

You can't bundle Debian in with Ubuntu. Debian does not install, nor recommend, pulseaudio by default.

(In reply to comment #202)
> All, it is not useful to debate the topic of "whether pulseaudio?" or "what is
> the best audio subsystem?" Those are not the topic of this bug report. Please
> refrain. Whether native or through alsa-pulse is on topic.

I will continue to object to peoples demands that "Wine must support pulseaudio" (or more specifically this particular patch set) based on the ad populum fallacy. Seriously, there are better reasons for pulse to be supported than this. I have no objection to pulseaudio being supported *correctly*.

> (In reply to comment #193)
> > (In reply to comment #191)
> > > Is it because:
> > > *) patch code is of bad quality
> > The patch does not meet AJ's quality standards, and no one seems to want to fix
> > this.
> As the original author, I am willing to fix this. Last attempt at a code review
> was not by AJ and was on an old version.

Please do. I suggest consulting wine-devel about what further work needs to be done.

> > > *) patch doesn't conform coding standard
> > See above.
> More useful feedback is needed, but it's quite clean. Naming and indentation is
> consistent. I should revisit pulse.c on a rainy weekend though.

With "see above" here, I meant to refer to the more general quality standard rejection. I'm sure your coding style is consistent and acceptable.

> > > *) patch is incomplete
> Supports WaveOut, WaveIn and Dsound playback and capture. All testsuite tests
> pass.

How do you support DirectMusic and other MIDI methods? (This is mostly for my personal interests.)

> > > *) current wine devs/mantainers don'...

Read more...

Revision history for this message
In , Removed by request (removed1836289) wrote :

Hey look, once again this has turned into the good old "PulseAudio sucks and distros don't ship it anyway" argument.

Ben, please stop spamming my inbox, and the inbox of 45 other people, with irrelevant discussions. If you guys want to talk about this, there's IRC/forums.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #204)
> Hey look, once again this has turned into the good old "PulseAudio sucks and
> distros don't ship it anyway" argument.
>
> Ben, please stop spamming my inbox, and the inbox of 45 other people, with
> irrelevant discussions. If you guys want to talk about this, there's
> IRC/forums.

As soon as people stop posting the good old "PulseAudio works awesome and there's this patch that makes it work more awesome in Wine so put it in upstream Wine already" argument/demand.

Note that my arguments aren't intended to say that pulseaudio should not be supported at all. They are intended to highlight the reasons why pulse is not the high priority for Wine devs that people demand it should be.

Revision history for this message
StephanBeal (sgbeal) wrote :

Re. #19: i've just installed your wine1.2 after finding it while searching for a solution for drop-outs in the 2 or 3 games i play in wine. i ran winecfg and switched to pulse audio. So far, so good :). It was dropping out a couple times an hour before.

Thanks a million for the package!

Revision history for this message
Scott Ritchie (scottritchie) wrote :

My personal testing of the winepulse packages shows no reliable improvement. The problem is intermittent.

On standard (ALSA) Wine, I occasionally get horribly skipping and crackling sound in Karmic. This didn't happen in Jaunty. This is usually prevented by running killall -9 pulseaudio before running the program with Wine, however sometimes it resurfaces a few hours later if I leave the program running long enough (especially when other sound events happen, like an IM message).

On Wine-Pulse I see the same behavior - sometimes it works without killing pulseaudio first, othertimes I get the same crackling.

This is the same as the testing before Karmic release, which is why the Karmic version didn't have wine-pulse. Since it's a regression from Jaunty, I'm reasonably sure that wine's sound driver isn't the actual problem here, but rather pulseaudio itself. For what it's worth, I haven't yet replicated the issue on Lucid, however breakages in graphics drivers there have prevented me from doing deeper testing.

Revision history for this message
In , Ema-oriani (ema-oriani) wrote :

Guys,

from what I've read there is the will to:
*) Art to submit the latest patches and to undergo a review process
*) wine maintainers to review the code and possibly accept it

You're all right guys, let's stop the nonsense. Let's stop arguing about the fact that WINE->ALSE is better than WINE->PULSE->ALSA, but the latter is better than WINE->ALSA->PULSE->ALSA.
We all know this.
I'm no wine dev expert but I've read the latest patch revision and apparently it doesn't seem poorly written.
Nevertheless I believe in GPL, Open Source and the power of collaboration.

Art is a great guy, clearly the first revision of his patch needed some polish.
Now apparently both parties are willing to meet in the middle.
I bet that with both Ben's expertise and Art's experience a very good patch will come out.

Let's "make it happen"?

Cheers guys!

Revision history for this message
In , Serious (cs071007) wrote :

(In reply to comment #203)
> The absolute need
> for a separate winepulse has not been programatically demonstrated; the best
> argument is that "everybody (or a lot of people) use it".
I can give you an example: when I start wine (with alsa) my other audio streams get killed, so I have to stop/resume the playback or even restart the app (depending on implementation) just because wine literally doesn't want to incorporate a - for me - perfectly working patch. and that is simply put just annoying.

@code quality debate:
If the patch doesn't conform to coding standards or whichever nature they might be then please tell us what's wrong with it so we can fix it, not simply "your code sucks". for a change try working together with people.

Revision history for this message
In , Rotbart van Dainig (rotbart-van-dainig) wrote :

(In reply to comment #203)
> Seriously, there are better reasons for pulse to be supported
> than this.

Could you please state them?

> I have no objection to pulseaudio being supported *correctly*.

Could you please define what means "correctly" to you, too?

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #207)
> (In reply to comment #203)
> > The absolute need
> > for a separate winepulse has not been programatically demonstrated; the best
> > argument is that "everybody (or a lot of people) use it".
> I can give you an example: when I start wine (with alsa) my other audio streams
> get killed, so I have to stop/resume the playback or even restart the app
> (depending on implementation) just because wine literally doesn't want to
> incorporate a - for me - perfectly working patch. and that is simply put just
> annoying.

That's not a programmatic demonstration.

> @code quality debate:
> If the patch doesn't conform to coding standards or whichever nature they might
> be then please tell us what's wrong with it so we can fix it, not simply "your
> code sucks". for a change try working together with people.

This has been discussed on wine-devel. This is not the correct place to specifically critique patches.

Revision history for this message
In , Aigars Mahinovs (aigarius) wrote :

(In reply to comment #203)
> You could equally that it's pulse not supporting Wine, and that the bug is
> pulse's issue.

No. Pulse is down stack from Wine. Wine does not support outputing to Pulse. There is no point in even arguing that.

> The absolute need
> for a separate winepulse has not been programatically demonstrated

The need for Wine-pulse has been demonstrated much more than the need for Wine itself. By your logic Wine should not exist - there are better implementations out there and they are still used. And if you install Windows in Virtualbox it will also work.

Your argumentation is absurd and is based on personal opinion only and yet you demand you opposition to provide dissertations to prove to you our point.

The rejection of PulsAudio Wine driver has not been technically proven nor has the code quality has been 'programatically demonstrated' to be unsacceptable for inclusion. Prove to use that including this code would make Wine worse!

> Please don't be inconsistent. Is it a matter of distros or "regular desktop
> users"?

Of course it is a matter of desktop users of desktop distributions! Have you forgotten what Wine is actually for??? Running desktop applications ringing a bell?

( I do appologise in advance for feeding the troll )

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #210)
> (In reply to comment #203)
> > You could equally that it's pulse not supporting Wine, and that the bug is
> > pulse's issue.
>
> No. Pulse is down stack from Wine. Wine does not support outputing to Pulse.
> There is no point in even arguing that.

But Pulse could, in theory, be improved to work better with Wine. This was discussed between Wine devs and Pulse devs long ago, and resulted in Pulse telling Wine that "you're doing it wrong".

> > The absolute need
> > for a separate winepulse has not been programatically demonstrated
>
> The need for Wine-pulse has been demonstrated much more than the need for Wine
> itself. By your logic Wine should not exist - there are better implementations
> out there and they are still used. And if you install Windows in Virtualbox it
> will also work.

What other implementation of win32 for *unix-based systems* are there? Do they work better than Wine? Pulse is a cross-platform audio solution, so is OSS (however OSS support is limited on Linux due to licensing issues, so ALSA is generally preferred). Wine is an implementation of win32 (and some win64) that is specifically designed for unix-like environments. You have to at least stay close to the paradigm for comparisons like this.

> Your argumentation is absurd and is based on personal opinion only and yet you
> demand you opposition to provide dissertations to prove to you our point.

No, my argument is based on technical objections, the details of which do not belong on Wine's bugzilla.

> The rejection of PulsAudio Wine driver has not been technically proven nor has
> the code quality has been 'programatically demonstrated' to be unsacceptable
> for inclusion. Prove to use that including this code would make Wine worse!

Code quality does not get programmatically demonstrated. The argument is that there is no evidence that winealsa cannot be improved sufficiently to work well with Pulse. Until such evidence is presented, a separate winepulse driver is unlikely to be considered.

> > Please don't be inconsistent. Is it a matter of distros or "regular desktop
> > users"?
>
> Of course it is a matter of desktop users of desktop distributions! Have you
> forgotten what Wine is actually for??? Running desktop applications ringing a
> bell?

Wine was originally intended as a tool for porting win32 apps to unix-likes. Should we abandon libwine apps just because most people use Wine to run native win32 apps?

> ( I do appologise in advance for feeding the troll )

I am only voicing arguments that, afaik, are the current state of affairs since the last pulse discussion on wine-devel. I'd personally like to see progress in supporting pulse, as long as it's done in the right way. It might not be very clear what the right way is (winealsa/wineoss/winesd improvements, which would probably involve abstracting the common driver code into a separate module, or separate winepulse driver), but what is clear is that the current patch does not meet the required standards. I don't set those standards.

Revision history for this message
In , Elmano (elmano) wrote :

(In reply to comment #211)
> The argument is that there is no evidence that winealsa cannot be improved
> sufficiently to work well with Pulse. Until such evidence is presented, a
> separate winepulse driver is unlikely to be considered.
This argument is about as much bs as possible.
1) noting seems to have moved forward in this direction although I remember various changelogs claiming better support for alsa-pulse in the changelog. So either it would be really hard to fix or the wine-alsa code is just too ugly to look at so nobody dares to touch it.
2) if your argumentation is true, why is there an wine-alsa in the first place? alsa also has a wrapper for OSS. has anybody ever "programmatically proven" that this is not compatible?
3) there is a perfectly working solution (for me) with a maintainer and everything. what more can an open-source project wish for?

> Wine was originally intended as a tool for porting win32 apps to unix-likes.
> Should we abandon libwine apps just because most people use Wine to run native
> win32 apps?
nobody said that, what's your point?

Revision history for this message
In , Serious (cs071007) wrote :

(In reply to comment #211)
> [...] It might not be very
> clear what the right way is (winealsa/wineoss/winesd improvements, which would
> probably involve abstracting the common driver code into a separate module, or
> separate winepulse driver), [...]
I would like to see that on the official Tasklist for Wine 1.2 :)

PS: sry for the account confusion, I tried disabling my old one (which I had forgotten about) today but didn't succeed -> forgot to log back to the new one afterwards ^^

Revision history for this message
In , Rotbart van Dainig (rotbart-van-dainig) wrote :

(In reply to comment #211)
> No, my argument is based on technical objections, the details of which do not
> belong on Wine's bugzilla.

Links to where those details were elaborated for the _current_ state of both PulseAudio and winepulse will do just fine, thanks.

> The argument is that there is no evidence that winealsa cannot be
> improved sufficiently to work well with Pulse.
> Until such evidence is presented, a separate winepulse driver is
> unlikely to be considered.

It's impossible to prove non-existence. That's the most basic logical fallacy.

(In reply to comment #203)
> I will continue to object to peoples demands that "Wine must support
> pulseaudio" (or more specifically this particular patch set) based on the ad
> populum fallacy.

When it comes to Use Cases, there is no ad populum fallacy like you try to claim.

(In reply to comment #203)
> I have no objection to pulseaudio being supported *correctly*.
(In reply to comment #211)
> I'd personally like to see progress in supporting pulse, as long as
> it's done in the right way. It might not be very clear what the right way
> is but what is clear is that the current patch does not meet the required
> standards.

Links welcome.

(In reply to comment #211)
> winesd

ESD is dead. It has been deprecated by PulseAudio. Stop beating a dead horse.
The backwards compatibility of PulseAudio to ESD is not the longterm solution.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #212)
> (In reply to comment #211)
> > The argument is that there is no evidence that winealsa cannot be improved
> > sufficiently to work well with Pulse. Until such evidence is presented, a
> > separate winepulse driver is unlikely to be considered.
> This argument is about as much bs as possible.
> 1) noting seems to have moved forward in this direction although I remember
> various changelogs claiming better support for alsa-pulse in the changelog. So
> either it would be really hard to fix or the wine-alsa code is just too ugly to
> look at so nobody dares to touch it.

"Nothing seems to have moved forward except those things that have." winealsa has already been improved to work better with pulse.

> 2) if your argumentation is true, why is there an wine-alsa in the first place?
> alsa also has a wrapper for OSS. has anybody ever "programmatically proven"
> that this is not compatible?

Yes, it has. ALSA's OSS emulation doesn't have OSS4 features, and does not work with dmix, so software mixing while using ALSA's OSS is impossible.

> 3) there is a perfectly working solution (for me) with a maintainer and
> everything. what more can an open-source project wish for?

I've asked the maintainer to consult the wine-devel about what needs to be done to get his patch merged upstream. What more can a pulseaudio proponent wish for?

(In reply to comment #214)
> (In reply to comment #211)
> > The argument is that there is no evidence that winealsa cannot be
> > improved sufficiently to work well with Pulse.
> > Until such evidence is presented, a separate winepulse driver is
> > unlikely to be considered.
>
> It's impossible to prove non-existence. That's the most basic logical fallacy.

Except that there is evidence that winealsa can be improved to work better with winepulse. As soon as someone demonstrates the technical reasons why a separate winepulse is needed (and why you can't do the same things with an improved winealsa), this objection will disappear. So far, the best I've seen is "winealsa is allowed to use stuff pulse's ALSA layer doesn't support", but no indication of whether it actually needs to or not.

> (In reply to comment #203)
> > I will continue to object to peoples demands that "Wine must support
> > pulseaudio" (or more specifically this particular patch set) based on the ad
> > populum fallacy.
>
> When it comes to Use Cases, there is no ad populum fallacy like you try to
> claim.

Except that it's perfectly possible for the use case of "get Wine to work with pulseaudio" to be done without requiring a separate winepulse. It's not for the average user to decide what drivers Wine includes upstream. It's not for me to decide either.

> (In reply to comment #211)
> > winesd
>
> ESD is dead. It has been deprecated by PulseAudio. Stop beating a dead horse.
> The backwards compatibility of PulseAudio to ESD is not the longterm solution.

It should be examined as a short-term solution for users.

Revision history for this message
In , Rotbart van Dainig (rotbart-van-dainig) wrote :

(In reply to comment #215)
> winealsa has already been improved to work better with pulse.

No, that was tried, but it still doesn't work any better than it did before. (stutter, dropout, latencies)

> ALSA's OSS emulation doesn't have OSS4 features, and does not work
> with dmix, so software mixing while using ALSA's OSS is impossible.

You are confusing the kernel version of OSS emulation with alsa-oss - the whole point of the latter is that it works with dmix.

> What more can a pulseaudio proponent wish for?

A bit more of help & goodwill would be nice. Oh, and of course no "us against them"-labeling people "proponent". That would be great, too.

> (In reply to comment #214)
> > (In reply to comment #211)
> > > The argument is that there is no evidence that winealsa cannot be
> > > improved sufficiently to work well with Pulse.
> > > Until such evidence is presented, a separate winepulse driver is
> > > unlikely to be considered.
> >
> > It's impossible to prove non-existence. That's the most basic logical fallacy.
>
> Except that there is evidence [...]

You specifically asked for a proof of non-existence, see above.

> [...] that winealsa can be improved to work better with
> winepulse.

The only thing that there is evidence up until now (by fixes that _should_ improve winealsa compatibility with PulseAudio, but didn't) is that improving winealsa to work with Pulseaudio (not winepulse) isn't that easily possible.

> As soon as someone demonstrates the technical reasons why a separate
> winepulse is needed (and why you can't do the same things with an improved
> winealsa) [...]

Let's try it with a fun fact first: winealsa tried for over two years now - and didn't manage.

Now, here's the technical reason: A native sink is better than a compatibility sink.

> Except that it's perfectly possible for the use case of "get Wine to work with
> pulseaudio" to be done without requiring a separate winepulse.

"Everything is possible" is trivial, too:
That didn't happen for two years now. Perhaps it will happen, perhaps it won't.

The only thing that is certain is that winealsa (or wineesd) doesn't work _right now_ and winepulse does.

> It should be examined as a short-term solution for users.

It has been tried and found lacking. (heavy latencies)
And, of course, wineesd itself has no future as a native sink, so it's the wrong point to invest time into.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #216)
> (In reply to comment #215)
> > winealsa has already been improved to work better with pulse.
>
> No, that was tried, but it still doesn't work any better than it did before.
> (stutter, dropout, latencies)

This does not correlate with my experiences doing user support in #winehq. There was certainly marked improvement.

> > ALSA's OSS emulation doesn't have OSS4 features, and does not work
> > with dmix, so software mixing while using ALSA's OSS is impossible.
>
> You are confusing the kernel version of OSS emulation with alsa-oss - the whole
> point of the latter is that it works with dmix.

No, I'm not. And alsa-oss is unstable enough to warrant an independent winealsa driver.

> > What more can a pulseaudio proponent wish for?
>
> A bit more of help & goodwill would be nice. Oh, and of course no "us against
> them"-labeling people "proponent". That would be great, too.

The ball is not currently in my court.

> > As soon as someone demonstrates the technical reasons why a separate
> > winepulse is needed (and why you can't do the same things with an improved
> > winealsa) [...]
>
> Let's try it with a fun fact first: winealsa tried for over two years now - and
> didn't manage.

No. There have not been two years worth of attempts at getting winealsa to work better with pulse. The pulse-related patches to winealsa have gone in much more recently.

> Now, here's the technical reason: A native sink is better than a compatibility
> sink.

I would thank you not to put words in my mouth, and do not attempt to turn this thread into a technical discussion on the merits (or lack of) of pulseaudio.

> The only thing that is certain is that winealsa (or wineesd) doesn't work
> _right now_ and winepulse does.

This is not a certainty. From what I gather, it's app-dependent. And I'm still waiting on an answer to how MIDI is handled.

Revision history for this message
In , Serious (cs071007) wrote :

(In reply to comment #217)
> And I'm still waiting on an answer to how MIDI is handled.
counterquestion: how many apps in the Top-10 lists (http://appdb.winehq.org/) use it? To my knowledge the count is exactly 0 and those are the apps that wine is mostly used for. I agree that there are some apps that use the MIDI interfaces, but: nobody said that wine-alsa should be removed so people who really need midi can still use wine-alsa.
Also (a little off-toppic now ;)) aren't there software midi synthesizers that wine could link against so the audio backend doesn't need to provide MIDI playback support? or does that have a bad impact on performance (talking about "normal" use cases here, not like FruityLoops with tons of different channels)?

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #218)
> (In reply to comment #217)
> > And I'm still waiting on an answer to how MIDI is handled.
> counterquestion: how many apps in the Top-10 lists (http://appdb.winehq.org/)
> use it? To my knowledge the count is exactly 0 and those are the apps that wine
> is mostly used for. I agree that there are some apps that use the MIDI
> interfaces, but: nobody said that wine-alsa should be removed so people who
> really need midi can still use wine-alsa.

The counter-argument is not valid. MIDI must be handled, and in the correct cross-platform way suitable for pulse, in order for the driver to be seriously considered. It's a subset of feature-completeness.

> Also (a little off-toppic now ;)) aren't there software midi synthesizers that
> wine could link against so the audio backend doesn't need to provide MIDI
> playback support? or does that have a bad impact on performance (talking about
> "normal" use cases here, not like FruityLoops with tons of different channels)?

Yes, but the Wine audio driver still needs to support a connection to a (virtual or real) MIDI device. Otherwise, how will apps be able to talk to the software MIDI synthesiser?

Revision history for this message
In , Sven-wine (sven-wine) wrote :

Please stop this. Every discussion about Pulseaudio is useless. Please read this:

http://yokozar.org/blog/archives/178

OpenAL is what wine will use, meaning that there is no use for any additional drivers, especially a pulseaudio driver. OpenAL will replace all the drivers, and it will work together with pulseaudio. Maarten Lankhorst is already working on the OpenAL driver, and it will be here at some point in the near future.

So please stop spamming about whether or not wine should support a pulseaudio driver, because there there is absolutely no point in this. Someone is already working on a solution that is far superior to anything you'd come up with in this bug report.

Also note that I'm not a wine developer, but just some guy who tries to save you guys the time it would cost to spam everyone's inbox.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #220)
> OpenAL is what wine will use, meaning that there is no use for any additional
> drivers, especially a pulseaudio driver. OpenAL will replace all the drivers,
> and it will work together with pulseaudio. Maarten Lankhorst is already working
> on the OpenAL driver, and it will be here at some point in the near future.

Then, to be fair, this bug should be CLOSED INVALID (that's not emphasis; that's bugzilla status).

Revision history for this message
In , Rotbart van Dainig (rotbart-van-dainig) wrote :

(In reply to comment #217)
> This does not correlate with my experiences doing user support in #winehq.

You are arguing with subjective experience?

And your experiences don't correlate with neither mine, my experiences of distro-level bug trackers or the ones of either the people here nor the maintainer.

> There was certainly marked improvement.

Maybe. Maybe not. Was it flawless? Because winepulse is.

> The ball is not currently in my court.

Just remember for when it is.

> There have not been two years worth of attempts at getting winealsa to work
> better with pulse.

That would be just as sad, but unfortunatly, it seems to be true: And that kind of history makes all the claims that "soon" winealsa / the new sound framework will work with Pulseaudio look like empty promises - because that's what people were told all the time.

(In reply to comment #220)
> So please stop spamming about whether or not wine should support a pulseaudio
> driver, because there there is absolutely no point in this. Someone is already
> working on a solution that is far superior to anything you'd come up with in
> this bug report.

See above: That what everyone was told for at least a year now: The great big rewrite will come and eliminate all problems. We'll believe it when it happens, and, until then, we'd like to have working sound, thounk you very much.

Of course, if said rewrite comes, dropping all the old driver code for OpenAL, then all claims that it would be too much hassle to port the old drivers are moot, too.

> The pulse-related patches to winealsa have gone in much more
> recently.

While winepulse existed and worked for at least one year.

> > Now, here's the technical reason: A native sink is better than a compatibility
> > sink.
>
> I would thank you not to put words in my mouth [...]

I don't need to. As others pointed out, too, the technical poit (even if it's hard to swallow):

WINE->PULSE->ALSA >> WINE->ALSA->PULSE->ALSA

> [...] and do not attempt to turn this
thread into a technical discussion on the merits (or lack of) of pulseaudio.

That one, you did all by yourself.

> This is not a certainty. From what I gather, it's app-dependent.

Then it _is_ a certainty that for some apps and games, winealsa will suck and winepulse will work.

Revision history for this message
In , Rotbart van Dainig (rotbart-van-dainig) wrote :

(In reply to comment #221)
> Then, to be fair, this bug should be CLOSED INVALID

..when the fix-it-all shiny-new-code is working, indeed.

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

To fan the flames a little bit more:
how does ALSA's pulse plugin work for you ?

For me, it seems to work just fine (WaveOut/DS) and I'm getting
MIDI sound through timidity then.
Even pulseaudio upstream agrees that alsa is
necessary for MIDI.

However, I wonder about that DirectMusic bit
- it doesn't seem to work at all, that is apps
don't produce any sound. Does it need an external
app too ? Unless it's supported by the means of
installing native DirectX - that would be quite dissatisfying.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #224)
> For me, it seems to work just fine (WaveOut/DS) and I'm getting
> MIDI sound through timidity then.
> Even pulseaudio upstream agrees that alsa is
> necessary for MIDI.

The problem with that is ALSA is not cross-platform like Pulse is.

> However, I wonder about that DirectMusic bit
> - it doesn't seem to work at all, that is apps
> don't produce any sound. Does it need an external
> app too ? Unless it's supported by the means of
> installing native DirectX - that would be quite dissatisfying.

If I understand correctly, Art's patch is winmm-only, and doesn't implement DirectMusic.

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

Actually I was wondering how you got it working,
cause simply taking a few dlls and setting WINEDLLOVERIDES
doesn't work.

OK, so that part *is* a support question, but Google returns
only results about DirectX install.

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

(In reply to comment #221)
> (In reply to comment #220)
> > OpenAL is what wine will use, meaning that there is no use for any additional
> > drivers, especially a pulseaudio driver. OpenAL will replace all the drivers,
> > and it will work together with pulseaudio. Maarten Lankhorst is already working
> > on the OpenAL driver, and it will be here at some point in the near future.
>
> Then, to be fair, this bug should be CLOSED INVALID (that's not emphasis;
> that's bugzilla status).

Second that motion.

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :
Download full text (4.2 KiB)

(In reply to comment #220)
> Please stop this. Every discussion about Pulseaudio is useless. Please read
> this: ... description of the wonderful feature with OpenAL follows...
>
> So please stop spamming about whether or not wine should support a pulseaudio
> driver, because there there is absolutely no point in this. Someone is already
> working on a solution that is far superior to anything you'd come up with in
> this bug report.

That is not true for the obvious reasons even a non-programmer can understand.
Here are some "pictures" of the path that the audio data have to travel on a PulseAudio-enabled system when using different Wine subdrivers:

winealsa:
[App]->[Wine]->[Pulse compatibility layer for ALSA]->[Pulse]->[Sound Backend, most probably ALSA or OSS kernel driver]

wineopenal:
1st variant: [App]->[Wine]->[OpenAL-soft]->[OpenAL PulseAudio backend]->[Pulse]->[SB]
2nd variant: [App]->[Wine]->[OpenAL-soft]->[OpenAL ALSA backend]->[Pulse ALSA compat]->[Pulse]->[SB]

winepulse:
[App]->[Wine]->[Pulse]->[SB]

IMHO, it is obvious that the winepulse path is the shortest one with the least overhead. Without any doubts in case we turn off the PulseAudio completely the path will be even shorter, but it will hardly break the sound-related applications on a system that was tuned to use PulseAudio as it's primary sound backend. User will be either forced to reconfigure his/her system to utilize the ALSA/dmix instead of PulseAudio or to get by with a non-fully-functional sound subsystem.

Me personally don't like the PulseAudio at all as it seems to do more harm to the my style of using soundcard than the advantages it promises to give (but sometimes fails). But that is just because I use semi-pro soundcard in conjunction with the Jack and -rt kernel to complete the tasks I need in Ardour and a like. But when it comes to an ordinary "home use" of a modern linux distro like Ubintu/Mint or Fedora it seems to me that PulseAudio had established quite well nowdays to be usable by non-professional users.

And IMO it is a good reason for Wine to support PulseAudio natively.
Telling that it might be perfectly possible to rewrite winealsa driver to work well in conjunction with PulseAudio seems to me as a nonsense: even in case it is possible (it must be proven separately because it is not an evident fact) it will limit winealsa driver to a some subset of the API that libalsa offers. And that means that in such case winealsa driver will loose some possible ways it might behave if it were targeted to a normal (non-pulse-emulated) ALSA devices. Less possible ways means that there will be less tricks available for use to optimizations. And that means that winealsa driver that is capable of seamless usage of PulseAudio-emulated ALSA devices can not be optimized to the same extent as it is possible for the non-compatible-with-Pulse winealsa.

This is exact the reason why the native PulseAudio support is requred for Wine. Having two separate drivers for two separate sound subsystems with each one optimized to its best for the sound subsystem it is targeted to is obviously better than having one general-purpose drives that 'fits all at once' but is by its nat...

Read more...

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #228)
> winealsa:
> [App]->[Wine]->[Pulse compatibility layer for ALSA]->[Pulse]->[Sound Backend,
> most probably ALSA or OSS kernel driver]
>
> wineopenal:
> 1st variant: [App]->[Wine]->[OpenAL-soft]->[OpenAL PulseAudio
> backend]->[Pulse]->[SB]
> 2nd variant: [App]->[Wine]->[OpenAL-soft]->[OpenAL ALSA backend]->[Pulse ALSA
> compat]->[Pulse]->[SB]
>
> winepulse:
> [App]->[Wine]->[Pulse]->[SB]
>
> IMHO, it is obvious that the winepulse path is the shortest one with the least
> overhead.

Invalid argument.

winealsa:
[App]->[Wine]->[SB]

wineoss:
[App]->[Wine]->[SB]

> Without any doubts in case we turn off the PulseAudio completely the
> path will be even shorter, but it will hardly break the sound-related
> applications on a system that was tuned to use PulseAudio as it's primary sound
> backend.

pulse is not a backend. Your own diagrams invalidate your point.

> User will be either forced to reconfigure his/her system to utilize
> the ALSA/dmix

... which takes next-to-no effort.

> instead of PulseAudio or to get by with a non-fully-functional
> sound subsystem.

... except it's not fully-functional, and OpenAL would actually help that.

> Telling that it might be perfectly possible to rewrite winealsa driver to work
> well in conjunction with PulseAudio seems to me as a nonsense: even in case it
> is possible (it must be proven separately because it is not an evident fact) it
> will limit winealsa driver to a some subset of the API that libalsa offers.

The question is, will doing this cause winealsa to break? So far, no one has demonstrated this either way.

> that means that in such case winealsa driver will loose some possible ways it
> might behave if it were targeted to a normal (non-pulse-emulated) ALSA devices.

Yes, but what hasn't been proven is that Wine actually *needs* to do those things.

> usage of PulseAudio-emulated ALSA devices can not be optimized to the same
> extent as it is possible for the non-compatible-with-Pulse winealsa.

That is equally true of winepulse.

> So, please stop lying to people that winepulse is not required.

Please don't try to start another flamewar.

> only _real_ reason I can see why not to include the winepulse in the generic
> wine source are the maintenance problems. All the other reasons that were
> stated in the comments upwards seems to be more a political one.

Code quality may be political, but it made Wine what it is today. Without code quality, Wine would be a dying project like Cedega or ReactOS.

> Why not to change the wine in a way that
> it would be easily possible to compile and add sound subdrivers to the existing
> wine installation?

This has been discussed as a possibility to improve existing sound drivers (making them more maintainable) as well as adding new drivers (winepulse or wineopenal). If this happens, then a new winepulse driver may be examined more seriously as a long-term solution. The reason why it hasn't been done is that it's a *lot* of work to do so, and so far no one is willing to do it.

Revision history for this message
In , Vitaliy-bugzilla (vitaliy-bugzilla) wrote :

(In reply to comment #228)
> wineopenal:
> 1st variant: [App]->[Wine]->[OpenAL-soft]->[OpenAL PulseAudio
> backend]->[Pulse]->[SB]
> 2nd variant: [App]->[Wine]->[OpenAL-soft]->[OpenAL ALSA backend]->[Pulse ALSA
> compat]->[Pulse]->[SB]
If you remove everything with "pulse" above you'll get much better picture. Don't add something that should not have been existed in the first place. Don't forget that OpenAL can perfectly work with ALSA directly. BTW where is ALSA/OSS there in your "pictures"?

Even better, there are native OpenAL drivers on some platform that talk directly to sound hardware.

> So, please stop lying to people that winepulse is not required.
It's not a lie, it's reality - Wine worked, continues to work, and will work perfectly without PA, using already existing OSS and ALSA sound backends. And in the future using OpenAL as the multi-platform standardized backend.

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :
Download full text (4.5 KiB)

> Invalid argument.
>
> winealsa:
> [App]->[Wine]->[SB]
>
> wineoss:
> [App]->[Wine]->[SB]
>

You are either trolling or wrong.
Sound paths you specify are for "pure ALSA" system, not for the "PulseAudio-enabled" system.

> > Without any doubts in case we turn off the PulseAudio completely the
> > path will be even shorter, but it will hardly break the sound-related
> > applications on a system that was tuned to use PulseAudio as it's primary sound
> > backend.
>
> pulse is not a backend. Your own diagrams invalidate your point.
>

Pulse is a backend. Prove that is it not. And - to be correct - provide your definition of a term "backend", please, as I suppose we're talking about a different things when use a word "backend".

> > User will be either forced to reconfigure his/her system to utilize
> > the ALSA/dmix
> ... which takes next-to-no effort.

... in case it is pure-ALSA system without PulseAudio. Have you ever used an PulseAudio-enabled system where ALSA hw-devices are often locked by PulseAudio making dmix break (that is one of the reasons I don't use PulseAudio on my "linux sound processing workstation")?

> > instead of PulseAudio or to get by with a non-fully-functional
> > sound subsystem.
> ... except it's not fully-functional, and OpenAL would actually help that.

OpenAL is a good thing to implement driver for, but unfortunately it is nothing more than another software sound library nowdays when it comes to linux world. Native hardware-accelerated OpenAL drivers are there for Windows and MacOS X, but there are nothing of this kind for Linux. Actually, I hadn't heard about any contributions to the Linux port of OpenAL from the Creative, and it looks like very unlikely for us to get native linux OpenAL-enabled sound drivers directly from major sound cards vendor :-(.

> > will limit winealsa driver to a some subset of the API that libalsa offers.
> The question is, will doing this cause winealsa to break? So far, no one has
> demonstrated this either way.

What do you mean by a "break"? Will the (possible) loss of performance be a "break"? Nevertheless - I repeat it again - a general-purpose "one-fits-all" driver will always be more generic than specialized ones, and it will not include target-specific optimizations in it (unless some additional execution branches will be introduced in it, i.e. a sort of subdrivers - and that is not far from implementing a separate target-specific driver).

> > ... winealsa driver will loose some possible ways it might behave if
> > it were targeted to a normal (non-pulse-emulated) ALSA devices.
> Yes, but what hasn't been proven is that Wine actually *needs* to do those
> things.

Surely not. The opposite hadn't been proven as well.

> > usage of PulseAudio-emulated ALSA devices can not be optimized to the same
> > extent as it is possible for the non-compatible-with-Pulse winealsa.
> That is equally true of winepulse.

Equally true... for what? winepulse has nothing to do with ALSA, it should use native PulseAudio API and it should be optimized for this. winealsa should use libalsa native API and should be optimized for that. That are the obvious facts.

> > So, please stop lying to pe...

Read more...

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :

(In reply to comment #230)
> Don't add something that should not have been existed in the first place. Don't
> forget that OpenAL can perfectly work with ALSA directly. BTW where is ALSA/OSS
> there in your "pictures"?

Nowhere as this "pictures" are for PulseAudio-enabled system, not for a normal and ordinary ALSA/OSS-native one. PulseAudio isn't tied to an ALSA/OSS, a sound producing backend may be a VPN-connected windows machine on the other side of the Earth.

> Even better, there are native OpenAL drivers on some platform that talk
> directly to sound hardware.
>
Unfortunately not on linux :-(. It would be great to have native hardware-accelerated OpenAL drivers for Creative sound cards on linux, but it looks like there are very low chances for this to happen. So a.t.m. openal on linux is totally a software solution that uses other sound systems as output backend (sound servers like pulse, "native" sound card interfaces like OSS or ALSA, e.t.c.).

> > So, please stop lying to people that winepulse is not required.
> It's not a lie, it's reality - Wine worked, continues to work, and will work
> perfectly without PA, using already existing OSS and ALSA sound backends.

winepulse existence would help a lot addressing problems that arises when using winealsa on Pulse-enabled systems. That is also a dull reality. Wine works perfectly with native ALSA+dmix or native OSS, but there are a lot of issues when using it in conjunction with Pulse. Sad but true.

> And in the future using OpenAL as the multi-platform standardized backend.

OpenAL is an offtopic really for this bug, but having wineopenal and using sound transition path like Wine->OpenAL->Pulse->SB is a good solution, but using a path like Wine->Pulse->SB might be better (but I still prefer for myself paths like Wine->ALSA/OSS, or Wine->OpenAL-hardware-accelerated, in case it would be available for linux). The only advantage that OpenAL can give when using as a bridge between Wine and Pulse/ESD/any-other-sound-server is the 3d-sound support "out of the box". That is worth having really, though.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #231)
> Pulse is a backend. Prove that is it not.

pulse is a middleware that depends on some other functional backend to work.

> Native hardware-accelerated OpenAL drivers are there for Windows and MacOS X,
> but there are nothing of this kind for Linux.

Creative does supply OpenAL acceleration for a limited range of driver/card combinations. However, pulse cannot be hardware accelerated either, so I fail to see your point.

> > The question is, will doing this cause winealsa to break? So far, no one has
> > demonstrated this either way.
>
> What do you mean by a "break"? Will the (possible) loss of performance be a
> "break"?

There is no evidence that a loss of performance will certainly occur. If someone can explain in detail the reasons why Wine needs to use non-pulse-safe ALSA API, then that would settle this aspect of discussion (though it belongs on wine-devel, not here).

> > > So, please stop lying to people that winepulse is not required.
> > Please don't try to start another flamewar.
>
> There's no need to start a new one - the older is still burning.

The only hope to progress is to end the flamewar.

> The quality of a code is a subjective thing.

AJ rules supreme.

(In reply to comment #232)
> PulseAudio isn't tied to an ALSA/OSS

... which is part of my concern about how MIDI/DirectMusic is handled by the proposed winepulse driver.

> So a.t.m. openal on
> linux is totally a software solution that uses other sound systems as output
> backend

Pulse is the same, except that it's *always* software.

> > And in the future using OpenAL as the multi-platform standardized backend.
>
> OpenAL is an offtopic really for this bug

... except that it was mentioned that wineopenal will all but replace the other drivers (in particular, the semi-dead, poorly maintained ones like wineesd, winearts and winejack), and there was a suggestion that winepulse will not be needed if wineopenal is implemented.

The rest of this is not really on-topic though:
> The only advantage that OpenAL can give when
> using as a bridge between Wine and Pulse/ESD/any-other-sound-server is the
> 3d-sound support "out of the box". That is worth having really, though.

I'm not sure if Wine is aware of any multi-channel stuff at the moment, but there are other advantages to OpenAL.
1) It's cross-platform, and works with a wide variety of sound backends
2) It's just a library and not not a sound daemon (and thus depends on the backend supporting software or hardware mixing as appropriate). It doesn't in itself need an external program to run.
3) It allows OpenAL apps in wine to have a direct passthrough to the host-native OpenAL libraries. I believe this is already implemented in Wine.

Revision history for this message
In , Vitaliy-bugzilla (vitaliy-bugzilla) wrote :

(In reply to comment #232)
> > Even better, there are native OpenAL drivers on some platform that talk
> > directly to sound hardware.
> Unfortunately not on linux :-(.
You forgetting that Wine runs on multiple O/S, not just Linux. How many platform does PA runs on?

> winepulse existence would help a lot addressing problems that arises when using
> winealsa on Pulse-enabled systems.
No, it "solves" artificial problems that PA introduced to those systems in the first place.

> That is also a dull reality. Wine works perfectly with native ALSA+dmix or
> native OSS
So what more do you need?

> but there are a lot of issues when using it in conjunction with Pulse.
They are not issues they are bugs in PA. And I've yet to see PA fixing any them.

> > And in the future using OpenAL as the multi-platform standardized backend.
> OpenAL is an offtopic really for this bug
Oh yes, it does. You've being told that instead of adding "yet another dysfunctional sound driver" Wine making a transition to _one_ and _only one_ sound driver. And no it's not a pulseaudio.

Revision history for this message
In , Bryan Reese (bryan-mreese) wrote :

I'm removing my CC from this bug. I'll wait until something is published to Slashdot saying that Wine works with sound again. At this point, it is useless to me without patches and I don't find that acceptable.

This is not a technical discussion on how to solve anything and nothing productive will come from this. Those in charge have made a decision, it appears. I disagree with it and will consider Wine again when the issue is resolved.

Revision history for this message
In , William Lightning (kassah) wrote :

+1 Comment #235 From Bryan

Everyone's solution is "disable PulseAudio". My solution is to disable wine sound. The sounds from all my systems being piped through one headset is more important than some "Cha-Ching" sound from Quicken.

I hope this is eventually worked out, but I am no longer interested in sitting through the flames till a solution comes out.

With that, good bye and good luck.

Revision history for this message
In , Rotbart van Dainig (rotbart-van-dainig) wrote :

(In reply to comment #229)
> Please don't try to start another flamewar.

(In reply to comment #233)
> The only hope to progress is to end the flamewar.

Then stop trolling:

(In reply to comment #229)
> ... which takes next-to-no effort.

Telling people to change subsystems just to get one application working is pointless. Especially if "you" are that one application.

It takes more knowledge than an "average user" has, and takes more work than an "experienced user" is willing to invest.
So while the "experienced user" might patch wine, the "average user" will just use Windows. That's ok, those are valid alternatives to using vanilla wine.

> Yes, but what hasn't been proven is that Wine actually *needs* to do those
> things.

That's pointless, too.

(In reply to comment #233)
> Pulse is the same, except that it's *always* software.

And hardware sound is dead. Onboard sound made it die, Microsoft buried it with DirectSound in Vista. Stop beating a dead horse.

> [...] and there was a suggestion that winepulse will not be
> needed if wineopenal is implemented.

It's "if" now, not even "when"?

(In reply to comment #234)
> So what more do you need?

Working Sound when using Wine with PulseAudio. Like the bug title says. Stop trolling.

Revision history for this message
In , Tabirioc (tabirioc) wrote :

I would simply like to point out that you have wasted much more time and energy arguing about this than would be required to make the necessary changes and integrate WinePulse properly into Wine.

Revision history for this message
Eric Astor (eric-astor) wrote :

I'm hearing some very conflicting reports here, to tell the truth... It's good to be hearing from a set of people for whom the winepulse patchset hasn't fixed the problem. It's odd, though, that we're seeing such different results. I'm starting to wonder if there might be multiple underlying issues here.

As I've reported, I'm currently running Lucid x86-64, and was previously running Karmic x86-64. I was previously able to duplicate sound-stuttering issues in various games, when running Wine through the ALSA interface of PulseAudio under Karmic, using Hardware Acceleration: Full at all times. Running Lucid essentially out of the box, using the default wine1.2 package (1.1.38-0ubuntu1) and an unchanged PulseAudio, I see no such problems, and cannot duplicate problems in any of the games that previously showed them, or in foobar2k. I haven't yet had the chance to test Ventrilo as previously requested.

Ernst, I'm confused that you say that you haven't tested with Wine 1.1.38 yet, since it's currently the main Wine package in the Lucid repositories, and has been for at least a week... Have you upgraded to Lucid, or no? I was seeing persistent problems under Karmic, and no longer see any under Lucid, including in foobar2k - absent further data, I've been assuming that the new version of PulseAudio in Lucid has fixed the issue for me.

Scott, thanks very much for responding to this - I appreciate it. This is a stupid question - but when you tested the winepulse packages, you did remember to switch the option in winecfg to select the PulseAudio driver, rather than the ALSA driver? I only ask because the behavior you're talking about sounds awfully like my own testing results while running through the ALSA driver in a winepulse-updated Wine - and winepulse adds a new driver, and doesn't fix the old one at all. I'm certain you do realize this, but everyone slips up occasionally, so I have to ask.

I do agree that PulseAudio appears to have played the major role in this bug, particularly since it should have been the only relevant component updated when I moved to Lucid... besides, I've found many records of PulseAudio behaving in slightly odd ways through the ALSA input, causing persistent problems.

Revision history for this message
Eric Astor (eric-astor) wrote :

I will also point out that whatever the problem being reported here, it seems unlikely to be a regression from Jaunty - given that the initial bug here was filed by Neil while running Jaunty.

Revision history for this message
Neil Wilson (neil-aldur) wrote :

I've got stuttering with the vanilla ALSA driver running Spotify.
However in the Lucid release it seems to correct itself without
restarting the application. It can take a few seconds to sort itself
out, and in one instance it continued until the end of the song. I'm
also getting the odd pop and click which are Pulseaudio underruns.

This is on a Acer Aspire One Netbook with a USB M-Audio Transit on the
digital interface.

On 16 February 2010 19:01, Eric Astor <email address hidden> wrote:

> As I've reported, I'm currently running Lucid x86-64, and was previously
> running Karmic x86-64. I was previously able to duplicate sound-
> stuttering issues in various games, when running Wine through the ALSA
> interface of PulseAudio under Karmic, using Hardware Acceleration: Full
> at all times. Running Lucid essentially out of the box, using the
> default wine1.2 package (1.1.38-0ubuntu1) and an unchanged PulseAudio, I
> see no such problems, and cannot duplicate problems in any of the games
> that previously showed them, or in foobar2k. I haven't yet had the
> chance to test Ventrilo as previously requested.

--
Neil Wilson

Revision history for this message
Ernst (ernst-blaauw) wrote :

I do not have experiences with vanilla wine 1.1.38, as I compiled 1.1.38
myself (with winepulse) before the vanilla 1.1.38 release hit the repo's. As
my own package has a higer version number, the update system did not replace
the repo version with my own. I will test this hopefully tomorrow. (As the
audio problems are not occuring often, I should run foobar2k the whole day
to be sure the problem is fixed.)
You'll hear back from me.

On Tue, Feb 16, 2010 at 20:01, Eric Astor <email address hidden> wrote:

> I'm hearing some very conflicting reports here, to tell the truth...
> It's good to be hearing from a set of people for whom the winepulse
> patchset hasn't fixed the problem. It's odd, though, that we're seeing
> such different results. I'm starting to wonder if there might be
> multiple underlying issues here.
>
> As I've reported, I'm currently running Lucid x86-64, and was previously
> running Karmic x86-64. I was previously able to duplicate sound-
> stuttering issues in various games, when running Wine through the ALSA
> interface of PulseAudio under Karmic, using Hardware Acceleration: Full
> at all times. Running Lucid essentially out of the box, using the
> default wine1.2 package (1.1.38-0ubuntu1) and an unchanged PulseAudio, I
> see no such problems, and cannot duplicate problems in any of the games
> that previously showed them, or in foobar2k. I haven't yet had the
> chance to test Ventrilo as previously requested.
>
> Ernst, I'm confused that you say that you haven't tested with Wine
> 1.1.38 yet, since it's currently the main Wine package in the Lucid
> repositories, and has been for at least a week... Have you upgraded to
> Lucid, or no? I was seeing persistent problems under Karmic, and no
> longer see any under Lucid, including in foobar2k - absent further data,
> I've been assuming that the new version of PulseAudio in Lucid has fixed
> the issue for me.
>
> Scott, thanks very much for responding to this - I appreciate it. This
> is a stupid question - but when you tested the winepulse packages, you
> did remember to switch the option in winecfg to select the PulseAudio
> driver, rather than the ALSA driver? I only ask because the behavior
> you're talking about sounds awfully like my own testing results while
> running through the ALSA driver in a winepulse-updated Wine - and
> winepulse adds a new driver, and doesn't fix the old one at all. I'm
> certain you do realize this, but everyone slips up occasionally, so I
> have to ask.
>
> I do agree that PulseAudio appears to have played the major role in this
> bug, particularly since it should have been the only relevant component
> updated when I moved to Lucid... besides, I've found many records of
> PulseAudio behaving in slightly odd ways through the ALSA input, causing
> persistent problems.
>
> --
> Occasional sound drops in Wine via PulseAudio
> https://bugs.launchpad.net/bugs/371897
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #237)
> Telling people to change subsystems just to get one application working is
> pointless. Especially if "you" are that one application.

It is the reality of it, though. It's also the reason why arts and esd died. wineopenal would fix that, but you reject that idea.

> It takes more knowledge than an "average user" has

"sudo aptitude purge pulseaudio" or equivalent is not difficult. There's a lot of trickier Wine configuration that is required to get apps working that is well outside what an "average user" can be expected to know.

> > Yes, but what hasn't been proven is that Wine actually *needs* to do those
> > things.
>
> That's pointless, too.

No, it's the most pertinent point regarding the necessity of winepulse.

> > [...] and there was a suggestion that winepulse will not be
> > needed if wineopenal is implemented.
>
> It's "if" now, not even "when"?

Since an OpenAL plugin will allow Wine to work with pulse, as soon as serious work starts on wineopenal begins then this bug can be CLOSED INVALID.

Or, alternatively, when/if wineopenal gets merged upstream,

> Stop trolling.

Oh really, now?:
(In reply to comment #237)
> And hardware sound is dead.

Yeah, how about you practice what you preach.

You know, neither of us is introducing any new information or arguments here. I suggest you re-read all the older comments.

Revision history for this message
In , Timo A. Hummel (privat-timohummel) wrote :

I (and others) were asking for PulseAudio, not OpenAL or other tricks. If you believe that OpenAL with Pulse should go inside WINE, open another feature request.

There are many, mostly individual, reasons why we want PulseAudio in WINE as it has been done with the existing patch.

If you don't agree, do NOT - I repeat - do NOT try to convince us of OpenAL or something else - this bug is FOR PulseAudio, not AGAINST.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #240)
> If you don't agree, do NOT - I repeat - do NOT try to convince us of OpenAL or
> something else - this bug is FOR PulseAudio, not AGAINST.

Wine will be able to support pulse via wineopenal. *If* that proves to be unsatsifactory, then other solutions need to be examined.

Either way, nothing is likely to get into upstream sources without an overhaul of the audio driver architecture.

Revision history for this message
In , Johan Walles (walles) wrote :

(In reply to comment #239)
>> [Removing Pulseaudio] takes more knowledge than an "average user" has
>>
>"sudo aptitude purge pulseaudio" or equivalent is not difficult. There's a lot
>of trickier Wine configuration that is required to get apps working that is
>well outside what an "average user" can be expected to know.

On Ubuntu systems that removes ubuntu-desktop as well, leading to no end of future upgrade problems.

So that piece of advice would break lots of people's systems. Integrating the pulseaudio patches in Wine wouldn't.

Revision history for this message
In , Aigars Mahinovs (aigarius) wrote :

(In reply to comment #241)
> (In reply to comment #240)
> > If you don't agree, do NOT - I repeat - do NOT try to convince us of OpenAL or
> > something else - this bug is FOR PulseAudio, not AGAINST.
>
> Wine will be able to support pulse via wineopenal.

Really? Prove it. With working code.

Until you do you are nothing but a troll and all discussions of enhancing winealsa or for writing wineopenal are off-topic for this bug report.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #242)
> On Ubuntu systems that removes ubuntu-desktop as well, leading to no end of
> future upgrade problems.

All that would need to be done is remove pulseaudio again after an upgrade reinstalls ubuntu-desktop.

(In reply to comment #243)
> (In reply to comment #241)
> > Wine will be able to support pulse via wineopenal.
>
> Really? Prove it. With working code.

I hear people are working on it.

http://wiki.archlinux.org/index.php/PulseAudio#OpenAL << indicates that OpenAL has a pulse driver.
http://kcat.strangesoft.net/openal.html << is another implementation of OpenAL that has a pulse driver, and prefers it by default.

> Until you do you are nothing but a troll and all discussions of enhancing
> winealsa or for writing wineopenal are off-topic for this bug report.

If the idea that "Wine should support PulseAudio" can be satisfactorally implemented by improvements to winealsa or implementation of wineopenal, then they are valid solutions. As of yet, they have not been proven to be either satisfactory or unsatisfactory.

Revision history for this message
In , Winehq-org (winehq-org) wrote :

(In reply to comment #244)
> All that would need to be done is remove pulseaudio again after an upgrade
> reinstalls ubuntu-desktop.

Unless I'm mistaken, upgrades won't re-install that package if it's removed (there's probably no other package dependent on it as it's the meta for the whole Ubuntu desktop environment).

Quite the opposite of it being re-installed: what will likely happen is that you won't get any new packages that are added as a standard part of the desktop in the new version... because they're only installed due to ubuntu-desktop's dependency on them. So, if the maintainers do something like change the standard network manager - you'll mysteriously still be using the old one after your dist-upgrade.

But I digress...

I use Kubuntu, without pulse. I would still like to see it supported for the people that need it in order to more easily manage their audio setup.

Until wine works on a system with pulse installed (and we can get rid of the "REMOVE PULSEAUDIO" thread stickied at the top of the forums), I think this bug is valid and needs to be addressed in *some* way (I won't pretend to know if the best solution is OpenAl or winepulse).

Revision history for this message
In , Austin English (austinenglish) wrote :

(In reply to comment #245)
> Until wine works on a system with pulse installed (and we can get rid of the
> "REMOVE PULSEAUDIO" thread stickied at the top of the forums), I think this bug
> is valid and needs to be addressed in *some* way (I won't pretend to know if
> the best solution is OpenAl or winepulse).

There are currently two ways, remove pulseaudio from your system, or manually patch Wine with the winepulse driver patch.

Discussing Ubuntu upgrade policy has nothing to do with Wine. Please take it off bugzilla.

Revision history for this message
In , Rotbart van Dainig (rotbart-van-dainig) wrote :

(In reply to comment #239)
> It is the reality of it, though.

That doesn't make it less pointless.

(In reply to comment #239)
> It's also the reason why arts and esd died.

Not really - both were superseded by Phonon and PulseAudio... after quite some time. Of course, wine continues to drag the corpses of winearts and wineesd around, refusing to let go, too.

(In reply to comment #239)
> wineopenal would fix that, but you reject that idea.

I don't reject the idea, I reject the fact that until this happens, wine on systemes with PulseAudio has broken sound:
If wine throws away all of the sound drivers anyway later up the road, there is no point in not merging winepulse now, use it as a stop-gap solution, then ditch it with all the rest.

> "sudo aptitude purge pulseaudio" or equivalent is not difficult.

Which just breaks sound for most of the system and leaves the user to reconfigure one part, then install different packages for sinks for most apps. Easy, rrright.

> No, it's the most pertinent point regarding the necessity of winepulse.

No. It is pointless to ask for the proof of need of a solution to a use case, when it's the only one currently working.

> Since an OpenAL plugin will allow Wine to work with pulse, as soon as serious
> work starts on wineopenal begins then this bug can be CLOSED INVALID.
>
> Or, alternatively, when/if wineopenal gets merged upstream,

..and is working on PulseAudio, indeed.

> (In reply to comment #237)
> > And hardware sound is dead.
>
> Yeah [...]

Thank you for at least agreeing with me on that one. If not now - when you go shopping for a new system, at the very least.

Revision history for this message
In , Serious (cs071007) wrote :

I'm taking myself off the cc list ... only flaming going on here anyway.

Revision history for this message
In , enb (elitenoobboy) wrote :

I don't see what the big deal is with not including a pulse patch. Do the wine devs have something against pulse? It is not hard to include a patch for pulse compatibility. OpenAL is not here now, but the pulse patch is.

If whatever patch posted here is not good enough, then the one I've been using is at:
http://art.ified.ca/?page_id=40
and it works fine.

If the majority of your user base uses something and it is trivial to support such a thing, then it makes a lotta sense to support it!

Revision history for this message
In , Fabio Capela (fabio-capela) wrote :

My point of view is quite simple: I want wine to work with audio without resorting to uninstalling (or even suspending) PulseAudio. I don't care how it's done, if it's by integrating the Pulse driver, by improving either the Alsa or OSS driver so using them in a Pulse-enabled system is as good as using Art Taylor's patch, or by doing an OpenAL driver; I just care that an answer is found, it's done sooner rather than later, and the user experience is at least as good as using Art Taylor's patch.

Last time I tested, the application I use (World of Warcraft) had non-usable audio with both Alsa and OSS drivers. The only way I could get it to work correctly without Art Taylor's patch was by killing Pulse, which I don't think it's an acceptable solution, as I then lose all audio from the rest of my system.
(I can't test it right now as I'm still recovering from a HD crash, but my last test was 1 or 2 months ago, I don't believe much changed since then).

As an user I would be willing to do small system-wide tweaks (as long as they don't break anything else), or large wine-specific tweaks (which is similar to what I'm doing, by currently maintaining my own tree with patches to three different bugs the developers seem not willing to either acknowledge or fix), but large system-wide changes (like changing the whole sound sub-system and dealing with all configuration changes needed) are well beyond what should be expected of a user. Besides, I do like the extra features Pulse brings, such as per application volume control.

Every other non-abandoned, sound-using application I've ever used works either out of the box or with the padsp utility; wine is the only application I currently can't get to play well with Pulse without resorting to a patch.

Revision history for this message
In , Alexandre Julliard (julliard) wrote :

Can you guys please stop this already? This is not Slashdot, it's a bug tracking system.

Yes, Wine needs to work with PulseAudio, we know that, we are not complete idiots. It's being worked on. If it's not going fast enough for you, pitch in and help. If you have questions take them to wine-devel.

If any further messages are posted to this bug I'm going to close it, and revoke bugzilla privileges for the offenders. Enough is enough.

Revision history for this message
In , Emmanuel Andry (eandry) wrote :

In order to have this ticket closed, because obviously this winepulse patch won't go into main tree, would be to use an already patched distro.

Mandriva : I've included the patch since the Mandriva 2009.1 (as far I can remember)
Fedora : they have patch included.

I don't know for the other distros, but if they don't have it, please guys open a ticket in their bug tracker.
Maybe it would be easier to convince wine packages maintainers...

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #252)
> In order to have this ticket closed, because obviously this winepulse patch
> won't go into main tree, would be to use an already patched distro.

It's not obvious. There is no ideological issue with winepulse, but work on both winepulse and Wine's audio driver architecture has to be done before it is considered to be included upstream.

> I don't know for the other distros, but if they don't have it, please guys open
> a ticket in their bug tracker.

It should be noted that any bugs on Wine's bugzilla where winepulse is used will be considered INVALID until winepulse is included in upstream sources.

> Maybe it would be easier to convince wine packages maintainers...

It won't, because the objections are technical, not ideological.

Revision history for this message
In , magilus (magilus) wrote :

best way to go is to change wine's alsa backend to work with pulseaudio IMO, this is also the way that is suggested by PA devs.
that lack of support is not a satisfiable situation as most mainstreams distros are using puleaudio now and they have to patch upstream wine because it doesnt support something that is being used in popular linux distros for more than 2 years now.

just look at the creation date of the ticket, granted that wine is free software, but this is a incomprehensible situation for lots of wine users (besides of warcraft 3 BNET support having gotten worse over time)

Revision history for this message
Ernst (ernst-blaauw) wrote :

I did use foobar some time with the vanilla 1.1.38 (without PA patch). I did not encounter problems with driver set to 'full' (I did not test 'emulation'). Thus, I guess for me the PA patch is not needed. I will remove myself from the 'affected' list of this bug.

Revision history for this message
Radu Cristescu (radu.c) wrote :

I think this information may be useful: I'm running Karmic's stock Wine with the ESounD driver just fine (i.e. PulseAudio's ESounD emulation rather than wine-pulse drivers). I had the same ALSA issue as others, I also tried Wine 1.2 + Wine-Pulse from PPA, but I'm back to 1.0.1 because 1.2 doesn't play ball with the window manager in Karmic.

Related bugs: #437749, #488981

Revision history for this message
Neil Wilson (neil-aldur) wrote :

For anybody who has been waiting...

I've uploaded a Winepulse patched verson for Lucid
(1.1.39-0ubuntu1+winepulse0.35) into my ppa.

You can get it by adding

ppa:neil-aldur/ppa

to your Lucid software sources and upgrading.

Revision history for this message
Kristoffer Lundén (kristoffer-lunden) wrote :

Hello Neil, installed that package in Lucid (updated all the way as of today) and no pulseaudio driver appears and it still doesn't work any better. This is on a 64-bit system. Any ideas, should I need to do some other steps? Thanks!

Revision history for this message
Neil Wilson (neil-aldur) wrote :

Yes, I need to investigate that. I had the same problem.

2010/3/16 Kristoffer Lundén <email address hidden>:
> Hello Neil, installed that package in Lucid (updated all the way as of
> today) and no pulseaudio driver appears and it still doesn't work any
> better. This is on a 64-bit system. Any ideas, should I need to do some
> other steps? Thanks!
>
> --
> Occasional sound drops in Wine via PulseAudio
> https://bugs.launchpad.net/bugs/371897
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Neil Wilson

Revision history for this message
audunmb (bergwitz) wrote :

I installed the PPA on 9.10, trying to fix some issues. It fixed the issue of garbled sound in Spotify, but the workaround of
using OSS driver did that as well. I was hoping the PPA version would make PulseAudio actually work with Wine, as it doesn't. Wine doesn't register as a an application playing sound in PulseAudio. In addition, if I play music from Spotify I can't get sound from any other application (like Firefox) or vice versa.

With the PPA I also got a new problem. When using Spotify, the sound is muted after each song. that's odd!

Revision history for this message
Neil Wilson (neil-aldur) wrote :

You need to run winecfg to select the driver then it will show up in
pulseaudio as an application. Sounds like you are bypassing something
at the moment.

On 17 March 2010 14:57, audunmb <email address hidden> wrote:
> I installed the PPA on 9.10, trying to fix some issues. It fixed the issue of garbled sound in Spotify, but the workaround of
> using OSS driver did that as well. I was hoping the PPA version would make PulseAudio actually work with Wine, as it doesn't. Wine doesn't register as a an application playing sound in PulseAudio. In addition, if I play music from Spotify I can't get sound from any other application (like Firefox) or vice versa.

--
Neil Wilson

Revision history for this message
Neil Wilson (neil-aldur) wrote :

The vanilla version of wine with pulseaudio via the ALSA plugin seems much, much better in the latest Lucid betas. If you can can you test out and report back any sound problems to this bug.

Revision history for this message
Mikael Hjelm (j-m-hjelm) wrote :

On a clean install Lucid (beta2) spotify does not work with alsa sound.
Plays 2-3 songs and then dies.
Test audio in wineconfig is not crystal clear either.
Will try other drivers to see if that helps.

Revision history for this message
Mikael Hjelm (j-m-hjelm) wrote :

With OSS the playback is without hiccups.

Revision history for this message
Andris Sprūds (aspruds) wrote :

I tested Lucid Beta with all updates as of 21 April, 2010. I agree with Mikael that the sound dies after a couple of songs and works OK if OSS is selected as playback.

Revision history for this message
pioruns (pioruns) wrote :

Confirmed to me, Ubuntu Karmic Koala AMD64
Wersja: 1.1.31-0ubuntu3+winepulse0.33~ppa1

I'm listening Banshee. I'm tryng to run World of Warcraft by Wine. It run succesfully, but without sound. After that i must close Banshee, close World of Warcraft, kill pulseaudio and launch it again, to have music on Banshee and sound in Wine application in the same time.

Revision history for this message
Richard_Cocks (richard-cocks) wrote :

Since upgrading to Lucid this problem is fixed for me. I can now play sound in wine with alsa and it mixes now with the rest of my sound and no longer crashes when I go to youtube with spotify playing. Thanks

Revision history for this message
Endre Stølsvik (stolsvik) wrote :

Just updated to Lucid. Got ALSA to work, but suddenly the sound stops. Using Spotify. Typically happens if I drag the "time location slider" in a song around a bit - all of a sudden it doesn't start playing again, and the time location slider has stopped. Nothing helps (as in choosing another tune, pause, play, drag slider), except rebooting the application.

Choosing OSS, things seems to be stable, only that Spotify (Wine) then apparently bogarts the entire sound system - as PulseAudio now lists no hardware devices available, and no sound from e.g. Flash.

The Neil-patch doesn't work now. That is, it PulseAudio comes as an alternative in the Wine configurator. Only that when clicking the "Test Sound" button, it seems to play, but nothing comes out of the speakers. Also, when clicking the Test Sound button, in the Sound Preferences, Applications tab, I briefly see "WINE [winecfg.exe]" show up. Also, when running Spotify, "WINE [spotify.exe]" shows in the Sound Preferences, Applications tab, but no sound, and also the time location slider does not move.

I find the "Low" priority a bit .. low. Sound from Wine does not work, apparently for many of us. Now there are no proper workarounds either - until Neil fixes his patch! :-)

Revision history for this message
Jack Leigh (leighman) wrote :

Same situation as Andre.
Although just renaming .pulse seems to have so far tentatively worked for Spotify in ALSA

Revision history for this message
Jack Leigh (leighman) wrote :

*Endre, sorry

Revision history for this message
Endre Stølsvik (stolsvik) wrote :

Small correction: When using the Wine PulseAudio driver from the Neil patch, the "Test Sound" *does* work (sound comes out of the speakers). The rest seems exact - in particular, sound from Spotify does not work, and the time location slider doesn't move.

(only that sometimes while playing around with this, I can't get Alsa to work either - I've several times had only a half second or so from some tune actually play, before the sound sticks (no sound and time location slider not moving). Killing PulseAudio and pretty much everything slightly sound related seems to fix this, where I'm back to the "play a bunch of tunes, then stick" mode).

Revision history for this message
Syver Enstad (syver-enstad) wrote :

Just upgraded to lucid, just intermittent sound in wine applications afterwards. Switched to Neils pulseaudio patches and switched to pulseaudio with winecfg. Ah... Never had better sound in wine before.

Revision history for this message
In , Andypiper (andypiper) wrote :

So here's my issue, which I'm sure is related.

I primarily use Wine for running Spotify and a couple of other apps (on Ubuntu 10.04)

If I set the Wine audio driver to OSS, Spotify works.
If I set it to ALSA, Spotify always crashes when I attempt to play a track.

So now I want to use my Nokia Bluetooth noise-cancelling BH-905 headphones. I can pair them with the machine and set the A2DP profile in PulseAudio prefs. I can play music via Rhythmbox natively. But, I can't hear anything through Wine apps, presumably because they are not properly interacting with PulseAudio?

In between, I'm fiddling around in winecfg to try different audio backends, and restarting apps... it's annoying. I shouldn't have to keep doing that.

Most of these other audio playback methods are being abandoned in favour of PA on e.g. Fedora and Ubuntu so it really does seem crazy that this has been open for ~3 years and there's still an argument. I can see that in 2007/8 the future of PA may have been in doubt but right now it seems like it's the primary way of doing things, so it would be great if Wine integrated properly with it.

Revision history for this message
In , Evengard (evengard) wrote :

Spotify? You are lucky, I would like an invite ))
Tri to run it by this way:
padsp wine yourprogram.exe
And set in winecfg the OSS driver. It works pretty good for me on Arch and latest wine from AUR...

Revision history for this message
In , Andypiper (andypiper) wrote :

(In reply to comment #256)
> Spotify? You are lucky, I would like an invite ))
> Tri to run it by this way:
> padsp wine yourprogram.exe
> And set in winecfg the OSS driver. It works pretty good for me on Arch and
> latest wine from AUR...

I'm saying that Spotify does work fine for me with the OSS driver talking to PulseAudio... but I can't get it to send audio to my Bluetooth headset, which PulseAudio does fine with native apps like Rhythmbox... wine/Spotify crash if I use the ALSA driver.

Revision history for this message
In , Evengard (evengard) wrote :

First, thank you alot for your spotify invite!
Next - padsp is a program which redirects all your OSS sound of the specified program in Pulse Audio. So:
Close all your wine programs, do a wineserver -k. then go to winecfg - sound settings, set OSS as default audio driver. close it. then go to a console, and run 'padsp wine "C:\Program Files\Spotify\spotify.exe"' (without the single quotes, in one line, don't forget the padsp thing!)
By using this way you won't be using OSS, but rather a PulseAudio emulation of OSS.
You can check that the sound is going through pulseaudio with pavucontrol. If it doesn't show here - you have probably a problem with your system. Maybe you have just forgotten to install padsp?...

Revision history for this message
In , Andypiper (andypiper) wrote :

(In reply to comment #258)
> Close all your wine programs, do a wineserver -k. then go to winecfg - sound
> settings, set OSS as default audio driver. close it. then go to a console, and
> run 'padsp wine "C:\Program Files\Spotify\spotify.exe"' (without the single
> quotes, in one line, don't forget the padsp thing!)
> By using this way you won't be using OSS, but rather a PulseAudio emulation of
> OSS.

Ah! great thank you!!! now working with Bluetooth headset.

It is still a bit messy to set up but hey, it's working. Much appreciated.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #257)
> (In reply to comment #256)

> I'm saying that Spotify does work fine for me with the OSS driver talking to
> PulseAudio... but I can't get it to send audio to my Bluetooth headset, which
> PulseAudio does fine with native apps like Rhythmbox... wine/Spotify crash if I
> use the ALSA driver.

how can you configure wine to use bluetooth device as alsa drive ?

since wine did not add bluetooh device to available driver by default

did winecfg allow you to select your bluetooth device ?

pcm.Headset {
  type bluetooth
  profile "voice"
}

Revision history for this message
In , Andypiper (andypiper) wrote :

(In reply to comment #260)
> how can you configure wine to use bluetooth device as alsa drive ?
>
> since wine did not add bluetooh device to available driver by default
>
> did winecfg allow you to select your bluetooth device ?
>
> pcm.Headset {
> type bluetooth
> profile "voice"
> }

No, Bluetooth configuration has nothing at all to do with wine. You set PulseAudio to use your Bluetooth headset via pavucontrol->Configuration. Then you use winecfg to use the OSS driver, and run the wine application you want to pipe through Bluetooth using "padsp wine <appname>" which redirects audio to PulseAudio.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #261)
> (In reply to comment #260)
> > how can you configure wine to use bluetooth device as alsa drive ?
> >
> > since wine did not add bluetooh device to available driver by default
> >
> > did winecfg allow you to select your bluetooth device ?
> >
> > pcm.Headset {
> > type bluetooth
> > profile "voice"
> > }
>
> No, Bluetooth configuration has nothing at all to do with wine. You set
> PulseAudio to use your Bluetooth headset via pavucontrol->Configuration. Then
> you use winecfg to use the OSS driver, and run the wine application you want to
> pipe through Bluetooth using "padsp wine <appname>" which redirects audio to
> PulseAudio.

This mean the bug is in alsa-pulse plugin if you said "If I set it to ALSA, Spotify always crashes when I attempt to play a track."

you have to provide a wine debug log and the full pulseaudio server log to find out why alsa-plugin did not work

pulseaudio -k;pulseaudio -vvvv

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #250)
> My point of view is quite simple: I want wine to work with audio without
> resorting to uninstalling (or even suspending) PulseAudio. I don't care how
> it's done, if it's by integrating the Pulse driver, by improving either the
> Alsa or OSS driver so using them in a Pulse-enabled system is as good as using
> Art Taylor's patch, or by doing an OpenAL driver; I just care that an answer is
> found, it's done sooner rather than later, and the user experience is at least
> as good as using Art Taylor's patch.
>

The answer is quite simple , use a hardware mixing sound card

In windows ,those sound card perform much better than those non hardware mixing sound card

You cannot expect alsa or oss can make those non hardware mixing sound card in par with those hardware mixing sound cards

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #263)
> (In reply to comment #250)
> > My point of view is quite simple: I want wine to work with audio without
> > resorting to uninstalling (or even suspending) PulseAudio. I don't care how
> > it's done, if it's by integrating the Pulse driver, by improving either the
> > Alsa or OSS driver so using them in a Pulse-enabled system is as good as using
> > Art Taylor's patch, or by doing an OpenAL driver; I just care that an answer is
> > found, it's done sooner rather than later, and the user experience is at least
> > as good as using Art Taylor's patch.
> >
>
> The answer is quite simple , use a hardware mixing sound card

Not an acceptable option for laptop users.

> You cannot expect alsa or oss can make those non hardware mixing sound card in
> par with those hardware mixing sound cards

Nor can you reasonably expect pulse to perform as well as ALSA, but that's another story.

For what it's worth, I've heard pulse performs tolerably if audio Hardware Acceleration is set to Emulation in winecfg, or if padsp and OSS driver are used.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #264)
>
> > The answer is quite simple , use a hardware mixing sound card
>
> Not an acceptable option for laptop users.
>
> > You cannot expect alsa or oss can make those non hardware mixing sound card in
> > par with those hardware mixing sound cards
>
> Nor can you reasonably expect pulse to perform as well as ALSA, but that's
> another story.
>
> For what it's worth, I've heard pulse performs tolerably if audio Hardware
> Acceleration is set to Emulation in winecfg, or if padsp and OSS driver are
> used.

cannot answer this question until they post the pulseaudio crash log with bluetooth.

at lease alsa-pulse plugin is not tolerable as "padsp" in this case

i.e. the pulse device of alsa-pulse plugin did not enumerate a compatible alsa hw device ( get underrun more easier than the real hardware

In theory, the pulse device should compared with dmix since they support software mixing

Revision history for this message
Y.Z. (y-zinch) wrote :

Use foobar2k alot (alas there is no adequate alternative for linux, imo). In Lucid everything seems works ok except that eventually sound disappears and i have to restart foobar. Not 100% sure but i think it happens when some other program tries to play sound in same time.

Tired solution described in comment #9 here (playing through OSS) and so far it works fine. Over 24 hours since i started foobar last time and sounds is still here :)

Revision history for this message
In , Aigars Mahinovs (aigarius) wrote :

The most up-to-date Ubuntu PPA with PulseAudio patches is now https://launchpad.net/~c-korn/+archive/ppa

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #266)
> The most up-to-date Ubuntu PPA with PulseAudio patches is now
> https://launchpad.net/~c-korn/+archive/ppa

it seem winepulse had removed the support of dsound in 0.27

Version 0.27 (15/06/2009)
    * Removal of specific dsound support as while it was low-latency, it was broken.

Changed in wine:
importance: Unknown → Wishlist
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Download full text (3.3 KiB)

Seems that there are two bugs people are reporting here: the stuttering and the total loss of sound from wine. I don't get the stuttering but I do get the complete stops. I have been investigating for a while now and this one has got me beat. I do have this random collection of things I discovered though:

Right after a reboot sound from wine works OK for several hours at least.

When the sound stops in a wine app, restarting the app will make sound work again, but only for a very short time, which decreases each time the app is restarted until eventually sound will only work for a few seconds before a restart is needed.

Restarting pulseaudio makes the sound work again for a few days/hours.

The problem happens with both ALSA emulation and esound emulation by pulseaudio. I have not tried with winepulse.

I've never seen it happen with direct ALSA access (disabling pulseaudio) - but I have not really tested for long enough to be sure it NEVER happens.

If multiple programs are running in Wine, they don't all necessarily stop making sound at the same time.

The bug doesn't just affect Windows programs running in Wine: it also affects Windows programs running inside Virtualbox. It is not necessary to restart Virtualbox to fix the sound output, restarting just the affected program is enough. This part is really weird, and might be unrelated. Virtualbox uses ALSA emulation through pulse.

Pulseaudio does not output any error messages when the bug happens, and neither does wine, even with maximum tracing.

I added a lot of debugging code to winealsa.drv.so and it was not particularly helpful. It appears that the sound sink just ... stops... like it has been paused somehow, but it is still marked as "playing". The buffer gets filled up and never empties, so wine just waits forever for more space to appear in it. No underrun/overrun condition is apparently triggered, although they do sometimes happen at other times and are handled correctly.

Once the problem happens for the first time I can reproduce it at will by opening the wine sound prefs and spamming the "test sound" button. Sound freezes and the the whole dialog locks up after about 10-20 clicks. After restarting pulse or rebooting the computer, this method of reproducing the bug does not work any more until the next time the bug happens "randomly."

I have a simple test program that can also reproduce the bug, based on the code from the control panel. It calls the Win32 function PlaySound() on a loop. It will hang after about 10-20 loops. Again, this method of reproduction only works after the problem has already happened "randomly" and stops working after restarting pulse.

I have a quad core CPU, and I tried disabling 3 of the cores. When I did this, my test program would hang on the first loop, every time (until I restarted pulse).

The problem seems to happen only if I have my USB external hard drive connected to my computer. My soundcard is an on board hda_intel and shares two IRQs with the USB controllers. I normally have the drive plugged in all the time. I had it unplugged for 5 days and had no sound problems. When I plugged it in, sound problems started again within 2 hours. My work...

Read more...

Jack Leigh (leighman)
Changed in pulseaudio (Ubuntu):
status: Fix Released → New
Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

Added Baldur's Gate as an affected game because the various sounds in the menus (clicking, dragging items around, etc.) get cut off pretty badly in Wine 1.2 and 1.3 when using Wine's default ALSA output with Ubuntu 10.04 and 10.10 (which officially uses PulseAudio with an ALSA wrapper I think).

Revision history for this message
In , Daniel Tschernatsch (daniel311) wrote :

Here (Ubuntu 10.10 64bit), "The Elder Scrolls - Oblivion" is also affected by this bug. Without WinePulse, there is no possibility to get sound in the game's menu and when loading a previously saved game. Strangely sound works with ALSA, when a new game is started, but this is not sufficient.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #265)
> In theory, the pulse device should compared with dmix since they support
> software mixing

dmix is a standard feature of ALSA and is used by winealsa.drv when necessary.

(In reply to comment #267)
> it seem winepulse had removed the support of dsound in 0.27
>
>
> Version 0.27 (15/06/2009)
> * Removal of specific dsound support as while it was low-latency, it was
> broken.

So the argument for inclusion of winepulse just took a big hit. Has anyone asked the maintainer why the broken dsound was removed in stead of, I don't know, FIXED?

(In reply to comment #268)
> Added Baldur's Gate as an affected game
(In reply to comment #269)
> Here (Ubuntu 10.10 64bit), "The Elder Scrolls - Oblivion" is also affected by
> this bug.

I don't think we're interested in what games - or even how many - are affected by this bug. The problem is known; the current "solution" (winepulse) is not considered favourably. Other workarounds (padsp, "Emulation" mode for Hardware Acceleration in ALSA module) work variably. The most RELIABLE option at the moment for users is to remove or disable pulseaudio and switch to winealsa.

Revision history for this message
In , Aigars Mahinovs (aigarius) wrote :

Removing or disabling PulseAudio has never been a 'solution'. At best it is a workaround akin to chopping off a hand because of a broken finger.

While ALSA driver has improved over the 3 years that this bug has been open, it is a disgrace that this contribution has not been included, adopted and improved upon by Wine core developers along with the direct ALSA option.

Or maybe you could tell us again after how many years will the new OpenAL sound system for Wine be ready? Maybe in another 2-3 years?

And during this time the best recommendation from the Wine project to people wanting to actually hear some sound from their Windows applications on modern Linux desktops will be to completely gut the audio system of a modern Linux desktop and return back in time to 2006, when ALSA was tolerable. Really?

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

> I don't think we're interested in what games - or even how many - are affected
> by this bug. The problem is known; the current "solution" (winepulse) is not
> considered favourably. Other workarounds (padsp, "Emulation" mode for Hardware
> Acceleration in ALSA module) work variably. The most RELIABLE option at the
> moment for users is to remove or disable pulseaudio and switch to winealsa.
Unfortunately, while it may be the most *reliable* option, hobbling one's OS installation (by mucking with pulseaudio) in order to increase compatibility with a single application (Wine) is nowhere near an *ideal* solution.

I am confident that the shortcomings of winepulse could and would be quickly overcome if it were actually brought into the official Wine codebase. This has supposedly been blocked from happening for years now because of some magical OpenAL-based audio back-end for Wine that has not yet materialized.

I find it completely baffling that end users are being denied additional user-friendly options (winepulse) in the official codebase due to the existence of even less ideal solutions (hobbling pulseaudio installation/operation) combined with a nonexistent and unproven idea for another solution (OpenAL back-end). This goes doubly when considering that Wine currently has first-class support for 5 (FIVE!) other Linux audio APIs.

Even as-is, winepulse is a HUGE improvement for me over Wine's ALSA back-end on Ubuntu for games like Baldur's Gate, where the beginnings of a lot of the sound effects were getting horribly cut off.

Revision history for this message
In , Msn-gaiatools (msn-gaiatools) wrote :

> This goes doubly when considering that Wine currently has
> first-class support for 5 (FIVE!) other Linux audio APIs.

First-class support for five other audio backends, 4 of which that no one uses anymore, anyway. Except the one or two audio professionals out there doing their work on a Linux machine with Wine... I don't know who would do that.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #269)
> Here (Ubuntu 10.10 64bit), "The Elder Scrolls - Oblivion" is also affected by
> this bug. Without WinePulse, there is no possibility to get sound in the game's
> menu and when loading a previously saved game. Strangely sound works with ALSA,
> when a new game is started, but this is not sufficient.

since pulseaudio cannot be removed in ubuntu 10.10 anymore, winealsa is using pulse device instead of dmix/dsnoop.

may be there is some impact on wine using pulse plugin when PA no longer reported underrun

http://git.alsa-project.org/?p=alsa-plugins.git;a=commit;h=c20d516e229620129ee20175d8fee8511cc3a4bd

may be this game also need multiple waveoutopen similar to lemmix bug#22880

bug#19523

can you open bug and provide wine log with WINEDEBUG=+wave when you using winealsa ?

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #264)
> (In reply to comment #263)
> >
> > The answer is quite simple , use a hardware mixing sound card
>
> Not an acceptable option for laptop users.
>
> > You cannot expect alsa or oss can make those non hardware mixing sound card in
> > par with those hardware mixing sound cards
>
> Nor can you reasonably expect pulse to perform as well as ALSA, but that's
> another story.
>
> For what it's worth, I've heard pulse performs tolerably if audio Hardware
> Acceleration is set to Emulation in winecfg, or if padsp and OSS driver are
> used.

This is because OSS 's fragment size is power of two and this match with the PCI/PCIe brust size 64/128 bytes

But winealsa is try to use a buffer time of 0.5 second but the alsa driver return a buffer time which is not exactly 0.5 seconds

you can use "lspci -vvvv" to find out the MaxPlayload of your HD Audio controller

lspci -vvvv

00:xx.0 Audio device: Intel Corporation 82xxxH (ICHx Family) HD Audio Controller (rev xx)

..

  DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
   ExtTag- RBE- FLReset-
...

 Kernel driver in use: HDA Intel
 Kernel modules: snd-hda-intel

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :

Colleagues, come on! There's no point in writing here blaming wine devs - their position had been made clear years ago and it looks like there are no signs of the possible changes in the near feature.

Fact is that wine devs team simply don't like pulse and that's it. Instead of following the way to be more compatible with mainstream linux distros they prefer to turn the world upside down and disagree to call Fedora, Mandriva, Ubuntu and all other distros using Pulse out there "the mainstream".

Trying to argue with them leads to the threats that "this bug will be closed as INVALID, end of discussion".

So take it simple: they don't like pulse, they don't use pulse, they have no intentions to support pulse in Wine. They simply refuse to do it, and that's it.

The only way one may take to get proper support of pulse in wine is to do it himself out of the official wine tree. It would be more productive to spend the energy on maintenance of the winepulse patch instead of writing here trying to persuade wine devs that their software should run on the linux desktops well.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #274)
> since pulseaudio cannot be removed in ubuntu 10.10 anymore, winealsa is using
> pulse device instead of dmix/dsnoop.

In that case, Wine cannot officially provide support for Ubuntu users, especially in light of the apparent removal of dsound support from winepulse.

(In reply to comment #276)
> Colleagues, come on! There's no point in writing here blaming wine devs - their
> position had been made clear years ago and it looks like there are no signs of
> the possible changes in the near feature.

True. This is mostly because no one is willing to do the work needed to make pulse Wine-friendly (or vice versa) in terms of upstream inclusion.

> Fact is that wine devs team simply don't like pulse and that's it.

For technical reasons; not petty as you imply.

> Instead of
> following the way to be more compatible with mainstream linux distros they
> prefer to turn the world upside down and disagree to call Fedora, Mandriva,
> Ubuntu and all other distros using Pulse out there "the mainstream".

Like it or not, pulse uses ALSA as a backend on ALL of those systems. pulseaudiod actually needs libalsa, not just the ALSA kernel drivers, to function (or the equivalent in OSS or whatever other system is being used). Given that there are distros that do not ship pulse by default but require ALSA instead, ALSA is therefore MORE mainstream than pulse, not to mention more feature-complete for low latency applications, and also - most importantly - better supported by existing software, including but not limited to Wine.

> Trying to argue with them leads to the threats that "this bug will be closed as
> INVALID, end of discussion".

No; trying to argue like that leads people to point out that the only people pushing for winepulse to be included upstream are those who do not understand the technical issues involved.

> So take it simple: they don't like pulse, they don't use pulse, they have no
> intentions to support pulse in Wine. They simply refuse to do it, and that's
> it.

I don't like jack, or esd, or arts, or OSS (at least, not prior to OSS4), and I do not use any of them except for ALSA emulation of OSS. Would I refuse to write an application that did not support any of those at all? Possibly, in the cases of esd and arts, but, definitely not in the case of OSS and maybe jack, depending on the application's purpose. In fact, if it was simple enough, I'd implement a pulse module myself. The fact of the matter is it's not simple or it would have been done years ago.

> The only way one may take to get proper support of pulse in wine is to do it
> himself out of the official wine tree.

This is not "proper support". Bug reports when out-of-tree patches are in play are by definition INVALID, as are AppDB reports.

> It would be more productive to spend the
> energy on maintenance of the winepulse patch instead of writing here trying to
> persuade wine devs that their software should run on the linux desktops well.

Wine runs fine on desktops. It's not Gnome or KDE or whatever's fault that distros have been shipping with a system that is incompatible with Wine.

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

(In reply to comment #277)
> (In reply to comment #274)
> > since pulseaudio cannot be removed in ubuntu 10.10 anymore, winealsa is using
> > pulse device instead of dmix/dsnoop.
>
> In that case, Wine cannot officially provide support for Ubuntu users,
> especially in light of the apparent removal of dsound support from winepulse.

Ubuntu and Fedora are the two most widely-used Linux distros, and this is the 4th-highest voted bug in the Wine tracker. Way to put your head in the sand!

> > So take it simple: they don't like pulse, they don't use pulse, they have no
> > intentions to support pulse in Wine. They simply refuse to do it, and that's
> > it.
>
> I don't like jack, or esd, or arts, or OSS (at least, not prior to OSS4), and I
> do not use any of them except for ALSA emulation of OSS. Would I refuse to
> write an application that did not support any of those at all? Possibly, in the
> cases of esd and arts, but, definitely not in the case of OSS and maybe jack,
> depending on the application's purpose. In fact, if it was simple enough, I'd
> implement a pulse module myself. The fact of the matter is it's not simple or
> it would have been done years ago.

I don't care what you like or don't like, I care that Wine does not work properly unless I hobble my OS install or hack Wine - despite the fact that I'm using the latest official release of the most popular Linux distro.

> > The only way one may take to get proper support of pulse in wine is to do it
> > himself out of the official wine tree.
>
> This is not "proper support". Bug reports when out-of-tree patches are in play
> are by definition INVALID, as are AppDB reports.

I'm not sure what you're on about there. He was complaining that it's the only avenue open for getting a version of Wine with a true pulse back-end.

> > It would be more productive to spend the
> > energy on maintenance of the winepulse patch instead of writing here trying to
> > persuade wine devs that their software should run on the linux desktops well.
>
> Wine runs fine on desktops. It's not Gnome or KDE or whatever's fault that
> distros have been shipping with a system that is incompatible with Wine.

You're right; it's Wine's fault for deciding not to give first-class sound support to the majority of end users, whether by working more closely with the pulseaudio team, or by taking winepulse under their wing, or by making the new OpenAL back-end a higher or more visible priority.

I'm telling you point-blank that stock Wine does not work properly on stock Ubuntu, and that's a problem no matter how you spin it. I'm sorry if you can't see that, but many other users care about it even if you don't.

Revision history for this message
In , WanderingVillager (ovek) wrote :
Download full text (3.3 KiB)

> The fact of the matter is it's not simple or it would have been done years ago.

...which, in fact, it was.

Listen, Ben Klein, that's enough. I was a respected Wine developer years ago. *I* once tweaked all these audio drivers to have decent performance, where they didn't before. *I* once wrote code to make wineoss and winealsa dsound-capable, where they once weren't so hot. Even now, I would be able to whip up a pulse driver in a jiffy, except it has already been done, and I have better things to do. So, hear me: there are *no* unresolved technical reasons for not being a winepulse driver in Wine. It's all politics.

Now, I understand the political arguments. I understand the code maintenance concerns, the design issues, the feeling that the current audio subsystem has become an abomination. I understand that and I even agree. It's perfectly understandable to me that they don't want to make the monster grow further by adding yet another driver to the legacy design, and would rather rewrite the subsystem first, in order to get a more streamlined and maintainable design for the future. I don't have a problem with that. I understand why they'd be happier to stick with pulse's alsa emulation, if it would just work. Why they'd rather force someone to bang that alsa emulation into working if necessary, rather than prolong the pain of maintaining the current subsystem.

Alexandre Julliard has, indeed, employed such measures in the past - i.e., sometimes he'd rather force people to rewrite parts of Wine before allowing them to add features on top of those parts, if he thinks those parts are flawed in some way. In such cases, the technical merits of the new feature isn't the reason for his rejection - it's just his way of getting people to do more work for Wine. Before a Wine contributor can scratch his/her own itch, Alexandre might make sure he/she scratches someone else's related itch first - or at least doesn't cover that other itch up so much that it'll never be scratched.

I won't push for the inclusion of winepulse in its current incarnation. However, I *do* have a general problem with people who aren't telling the truth. The reasons for not including winepulse are *not* technical, they are code policy decisions (and probably fairly good decisions, at least from certain perspectives, but nevertheless undeniably political). So, stop spreading lies, stop acting like you know what's going on, and stop berating users that are seeing right through you. What these users want is perfectly reasonable, and even if there may be good political reasons not to give them that quite yet, they don't deserve being flamed by someone parroting obsolete arguments that were only half-true even when they were new. I think they have a right to actually know what's going on.

There's no technical reason for winepulse's non-inclusion. It's all about a line in the sand. A piece of less forward-thinking engineering within Wine itself, that Wine developers don't want to see grow more arms. I'll even take some of the blame for propagating that design myself, back when I could have done something about it and perhaps should, but didn't, and instead probably just made it ...

Read more...

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :

Ben Klein, you're trolling and lying and you've been trolling and lying in this thread almost since the times this bug had been submitted to bugzilla. I'm not going to waste time discussing it with you here (this is bugzilla and not a forum or a chat) and I wouldn't recommend anyone here to waste time on it too.

Your position is clear, position of wine devs is clear: "official Wine tree would not include pulseaudio subdriver". Wine userbase don't need your technical and whatsoever reasons why had this decision been made. They had been faced to a fact and now are on their own to deal with this. This is what my previous comment was about and I repeat it again: people, don't waste your time posting comments here, it won't help. The only result you would get is another portion of lies and we-won't-do-it-s.

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

(In reply to comment #279)
> do. So, hear me: there are *no* unresolved technical reasons for not being a
> winepulse driver in Wine. It's all politics.

Thanks for the rational post.

I decided to email Scott Ritchie yesterday to see if he knew anything about the status of the OpenAL-based replacement back-end, as I haven't seen any information on it for almost a year. Here's his response in case anyone is interested:

"It's kind of hard to say actually. Maarten is the one doing the work,
but he couldn't come to wineconf at the last minute. Julliard has some
doubts about OpenAL mainly because some of the tests are still failing
after the partial implementation, but I'm not sure if that's a permanent
thing."

I think I may also have found a repo where Maarten is checking in changes for the OpenAL/mmdevapi work: http://repo.or.cz/w/wine/multimedia.git/shortlog/refs/heads/mmdevapi

Revision history for this message
In , Theycallhimart (theycallhimart) wrote :

I've been refraining, but here we go with more bug-spam.

(In reply to comment #277)
> In that case, Wine cannot officially provide support for Ubuntu users,
> especially in light of the apparent removal of dsound support from winepulse.

Just wanted to say that that is false. Dsound is supported by the winepulse patch, just not by a faked dsound primary buffer but by emulation in dsound.dll, as it is for every other backend other than wineoss and winealsa.

I originally wrote, currently maintain and provide support for winepulse.drv, an out of tree patch to wine for a winmm.dll "low-level" backend to pulseaudio. Fedora and Gentoo both optionally ship it, and there is a package in AUR for arch with winepulse. For a Ubunutu there are a few community PPA's around.

My read on the state of audio in wine is that winmm.drv (which implements the windows multimedia extensions originally from win16) will cease to be the base which drivers are written for once mmdevapi support in wine is complete. Thus, why bother including new winmm backends when you can patch the ones you have to still work until the next-generation support is finished. Especially backends written by comp-sci undergraduates ;-)

Revision history for this message
In , Walldorf2000 (walldorf2000) wrote :

Yes it is about politics. But the world is changing over the years. Politics should react on changing facts.

There are several major changes which should make Wine (aka Alexandre) rethink.

1) It is now clear that PulseAudio is not just one more audio system but it is the mainstream audio system in LINUX.

Is it mixing, using of bluetooth or whatsoever. Users simply want to plug in their device and it should work. When I hear music and a telephone call comes in the music should be muted etc. There simply is no alternative available which could serve all the required use cases better.

All major Apps do now support PulseAudio at least good enough. Is it Skype or Flash or whatsoever. With one exception: Wine

PulseAudio is still not one for all, e.g. for low latency you should fall back to JACK, but it fulfills the 99% usage. Professional audio users and hard core system geeks might not want to use PulseAudio. But for those it is acceptable to change or build their system the way they need it. By the way, JACK and PulseAudion did solve their interoperability issues, thus there is no need to deinstall PulseAudio when you need to use JACK.

It is ridiculous to ask ordinary mainstream users to rebuild the hart of their system to use Wine with proper sound.

And it is ridiculous to wait for some magical fix of PulseAudio Alsa. This was discussed and this will never happen. It is technical nonsense.

2) Wine is officially on release 1.0 and higher. Thus it is not a construction site for some freaks but a mainstream tool. Functionality is the key. As long total cost of development is in a acceptable relation it is more important than long term design issues. When Wine waits for the big bang for the audio sub systems, functionality will suffer for several more years.

On the other hand there is working code, ready to use, proven in real life with a dev willing to maintain.

Revision history for this message
In , Sorceror (shacklein) wrote :
Download full text (9.8 KiB)

(In reply to comment #278)
> > In that case, Wine cannot officially provide support for Ubuntu users,
> > especially in light of the apparent removal of dsound support from winepulse.
>
> Ubuntu and Fedora are the two most widely-used Linux distros, and this is the
> 4th-highest voted bug in the Wine tracker. Way to put your head in the sand!

This is a simple declaration of the current state. If pulse CANNOT be removed from Ubuntu then AppDB and bugzilla posts from Ubuntu users CANNOT be considered valid, (unless there is a very clear and definite non-audio related problem).

> I don't care what you like or don't like, I care that Wine does not work
> properly unless I hobble my OS install or hack Wine - despite the fact that I'm
> using the latest official release of the most popular Linux distro.

So you don't care what I like but you care enough about what you THINK the developers "dislike" enough to complain - no, bitch - about it?

> > > The only way one may take to get proper support of pulse in wine is ...
> > > out of the official wine tree.
> >
> > This is not "proper support". Bug reports when out-of-tree patches are in play
> > are by definition INVALID, as are AppDB reports.
>
> I'm not sure what you're on about there.

Then read it again. It's all there in plain English. WineHQ does not and cannot provide any support for out-of-tree patches, therefore this is not "proper support" but, at best, "functionality". It is not "proper" by ANY definition.

> You're right; it's Wine's fault for deciding not to give first-class sound
> support to the majority of end users,

Once again with the recrimination of Wine devs. What about the distros' who decided to make it difficult or near-impossible to remove pulse? Are they not to blame for effectively dropping any support to or from Wine develops?

> whether by working more closely with the
> pulseaudio team, or by taking winepulse under their wing, or by making the new
> OpenAL back-end a higher or more visible priority.

The first two have been tried and failed; the latter has already happened, relatively speaking.

(In reply to comment #280)
> Ben Klein, you're trolling and lying and you've been trolling and lying in this
> thread almost since the times this bug had been submitted to bugzilla.

Normally this would not warrant a response. However, I have to endure near-flame attacks like:
(In reply to comment #278)
> I'm telling you point-blank that stock Wine does not work properly on stock
> Ubuntu, and that's a problem no matter how you spin it. I'm sorry if you can't
> see that, but many other users care about it even if you don't.

This is NOT about what I care about, nor is it about what the users care about. It is about the technical pros and cons for implementing/accepting a winepulse driver, or alternatively making winealsa and wineoss more pulse-friendly, or alternatively implementing a solid wineopenal.drv. See below.

> Your position is clear, position of wine devs is clear: "official Wine tree
> would not include pulseaudio subdriver". Wine userbase don't need your
> technical and whatsoever reasons why had this decision been made.

This is bugzilla. The technical reasons ...

Read more...

Revision history for this message
In , Ema-oriani (ema-oriani) wrote :

I think it's fair to say (and undeniable I would add) that now the main audio system on the majority of Linux desktops is PulseAudio (then it generally relies on ALSA, but the main interface is pulse).

So, 'when' will we have a pulseaudio driver in the menu to be chosen?

Cheers,
Ema! :-)

Revision history for this message
Ben Shadwick (benshadwick) wrote :

Over the course of this year I've been occasionally using Wine 1. 2 and 1.3 on Ubuntu 10.04 x64 and 10.10 x64 on my Dell XPS M1730 laptop. I've always started out using the default PulseAudio setup in Ubuntu and the Alsa output in Wine, but this results in almost all menu sounds in Baldur's Gate having their first half second or so cut off. This does not happen when I use a Wine 1.2 or 1.3 version with the winepulse patch built in that is then configured to use the PulseAudio output.

Also, pasuspender doesn't work for me. It causes games in Wine to freeze when they'd normally start making their first sound. Killing pulse when set to not autorespawn does work, but then I lose the ability to change volume via the volume buttons on my laptop and Gnome and other apps tend to seize up when failing to connect to pulse in order to produce sounds.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #277)
> (In reply to comment #274)
> > since pulseaudio cannot be removed in ubuntu 10.10 anymore, winealsa is using
> > pulse device instead of dmix/dsnoop.
>
> In that case, Wine cannot officially provide support for Ubuntu users,
> especially in light of the apparent removal of dsound support from winepulse.
>
>

This is the best enviornment for wine since all alsa applications are using default device and no oss application when they removed oss emulation

Just need system preference to add an option to redirect all sound to a null sink or to snd-dummy.

wine application can have exclusive access of the real alsa sound card "front:0" or "surround51:0"

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #285)
> I think it's fair to say (and undeniable I would add) that now the main audio
> system on the majority of Linux desktops is PulseAudio (then it generally
> relies on ALSA, but the main interface is pulse).
>
> So, 'when' will we have a pulseaudio driver in the menu to be chosen?
>
> Cheers,
> Ema! :-)

I think that it's undeniable that the main graphical/widget system on the majority of Linux desktops is GTK (though it relies on X11, but the "main" interface is GTK). So when will we have a GTK video driver included in Wine?
</irony>

Simple facts: ALSA is the sound system most widely installed on Linux unless you count ALSA's arguably dodgy OSS emulation. (OSS is the sound system most widely available on Unix-like systems.) If you want to know how this works, first work out how many legs the average human has.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #144)
> Probably the largest problem for audio in WINE is the WaveOut/WaveIn API's.
> Currently the WaveOut and WaveIn API's are the base for the other audio api's
> in WINE (except openAL.) The audio api, designed probably in the early 90s for
> PCs of the day seems to have been the first implemented in wine, and all audio
> api's fall-back to it (except openAL and DSound on OSS and ALSA in special
> occasions.) Probably the biggest pro-native-pulseaudio reason is the waveout
> functions. Through libalsa pulse, calls such as waveOutReset() and
> waveOutResume() require a reconnection to pulseaudio each call. Using a native
> pulseaudio driver we can write audio data into pulseaudio and do the pause,
> resume and reset calls without penalty.
>
>

But alsa-pulse plugin also support snd_pcm_pause()

http://git.alsa-project.org/?p=alsa-plugins.git;a=commit;h=d9a839d51255c939f394f770b249c8a4a9600122

do you mean that when winealsa use "pulse" plugin , waveOutReset() and waveOutResume() using snd_pcm_drop() and snd_pcm_prepare() require a reconnection to PA server ?

This seem explain why chips challenges (16-bits application) fail after about 10 minutes of gameplay when using pulse

http://bugs.winehq.org/show_bug.cgi?id=25633

Revision history for this message
In , Aigars Mahinovs (aigarius) wrote :

Just a quick note - the ALSA driver is buggy again. It had worked good for some time, but no it again is stuttering and stops working after approximately 10 minutes. We really need pulse drivers in.

P.S. Ben, yes it is *much* better and more user friendly to use approriate GNOME and KDE interfaces as appropriate instead of inventing your own low level things on X. The best free software projects (Firefox, OOO, ...) integrate with Gnome and KDE and use, for example their Print dialogs, file open/save dialogs, colors and icons, ... That is the best practise among free software. Wine is an archaic relic from 1990s in this regard, unfortunately.

Revision history for this message
In , Stefan Dösinger (stefandoesinger) wrote :

> P.S. Ben, yes it is *much* better and more user friendly to use approriate
> GNOME and KDE interfaces as appropriate instead of inventing your own low level
> things on X. The best free software projects (Firefox, OOO, ...) integrate with
> Gnome and KDE and use, for example their Print dialogs, file open/save dialogs,
> colors and icons, ... That is the best practise among free software. Wine is an
> archaic relic from 1990s in this regard, unfortunately.
Before anyone creates a bug that we should use gtk or kde for buttons, print dialogs and the like: Not really possible because windows apps can query elements from the print dialogs, change it(e.g. draw their own stuff on it, change button layouts, etc). It's not really possible to give the app a gdi32 handle for a button on a KDE print dialog. Similar things apply to plain controls. In fact, a long long time ago Wine used TCL/TK for common controls, and hit a roadblock with that soon. Hence the use of plain Xlib and our own controls.

Of course work on theming and a theming bridge from the current desktop's theme to a windows theme is always welcome.

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

Ben Klein: Please stop sputtering nonsense like that. The simple fact is that most Linux end-users are now using PulseAudio, and Wine doesn't work properly with it at all.

Killing Pulse to allow Wine to have direct Alsa access is simply not acceptable either; it is beyond what is appropriate to expect from the average end-user, and it also cuts off the ability to control volume via keyboard or laptop built-in controls while in a full-screen Wine game.

There's no need to defend this sorry state of things either, as the Wine developers themselves are working (slowly) to obsolete the current situation with a new audio back-end.

In the meantime, WinePulse is the currently-available solution that offers a superior end-user experience.

Stefan: Actually it would be better to move away from X11 to something cross-platform like SDL or Qt, as the X11 dependency causes all sorts of silly problems on Mac.

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

First of all, both sides should stop *pure* trolling,
cause that's just what that theming "discussion" is (at least in this bug).

Some of the people should also stop their "ad personam" trips, even if the other side is clearly wrong.

I'm still on ac'97, though this time it's a via variation (I've been downgraded a bit lately) and pulseaudio still more or less works for me with pure alsa, so I'm interested a bit, where the real problem lies (in hda kernel module ?).

Oh, and I'm still interested in an answer to comment 226.

Revision history for this message
In , luke16 (luke16-gmail) wrote :

(In reply to comment #292)
> First of all, both sides should stop *pure* trolling,
> cause that's just what that theming "discussion" is (at least in this bug).
>

From an outside observer's view who doesn't care one way or the other, it would seem like ben klein is the troll. It doesn't really matter to me whether this longstanding bug is fixed or not, but spouting off stuff like alsa is more prevalent than pulseaudio as fact and then not backing it up with any sources is trolling plain and simple. There are sources however that say that ubuntu and fedora, both using pulse audio, have over a 50% market share. After a quick google, the website statowl says that ubuntu alone has just under 50%.

http://www.statowl.com/operating_system_market_share_by_os_version.php?1=1&timeframe=last_6&interval=month&chart_id=4&fltr_br=&fltr_os=&fltr_se=&fltr_cn=&limit[]=linux

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

The main problem I see here is that some of the people still see pulseaudio as a sound *mixer*, while that stopped being its main focus awhile ago.
Now, its main job is being audio stream manager and that's why removing it is quite crippling in some of the cases.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #291)
>
> Killing Pulse to allow Wine to have direct Alsa access is simply not acceptable
> either; it is beyond what is appropriate to expect from the average end-user,
> and it also cuts off the ability to control volume via keyboard or laptop
> built-in controls while in a full-screen Wine game.

My suggestion is not killing pulse, just redirect all sound to PA and let PA to send the audio to null sink or set snd-dummy as default sink so that wine can have exclusive excess

if those average end-user can use script using "amixer" which is equvialent to "amixer -D default" or "amixer -D pulse" to control volume via keyboard, he should also able to to rewrite the script to use "amixer -c0" to control volume

The lap-top built-in controls (button or volume knob) still use alsa api

it is rather a bug that PA cannot redirect all sound to the default sink

http://0pointer.de/blog/projects/pulse-glitch-free.html

"The PulseAudio sound server has been rewritten to use timer-based audio scheduling instead of the traditional interrupt-driven approach."

The objective is lower the power consumption by reducing the number of wakeup for those laptop, netbook for a longer battery usable time without recharging.

"We minimize the overall number of interrupts, down to what the latency requirements of the connected clients allow us. i.e. we save power, don't show up in powertop anymore for normal music playback."

"We maximize drop-out safetyy, because we buffer up to 2s in the usual cases"

this is why it cannot support using those softsynth with those midi input device to play realtime music and playing interactive game

"We become much less dependant on what the sound hardware provides us with. We can configure wakeup times that are independant from the fragment settings that the hardware actually supports."

"We can provide almost any latency a client might request, dynamically without reconfiguration, without discontinuities in audio."

you will need PA to provide an option to tune the parameter from low power consumption mode to gamer mode for desktop to play those interactive game, otherwise the average end-users are still unable to tune the parameters in deamon.conf in order to play any application which require low latency

Revision history for this message
In , Sorceror (shacklein) wrote :
Download full text (4.9 KiB)

(In reply to comment #289)
> Just a quick note - the ALSA driver is buggy again. It had worked good for some
> time, but no it again is stuttering and stops working after approximately 10
> minutes. We really need pulse drivers in.

This is not the place to complain that winealsa is buggy. If it hasn't already been reported, report a new bug.

(In reply to comment #291)
> Ben Klein: Please stop sputtering nonsense like that. The simple fact is that
> most Linux end-users are now using PulseAudio, and Wine doesn't work properly
> with it at all.

Like it or not, this is NOT a valid reason for including winepulse. The audio subsystem in Wine is being restructured to cut down on copied code and maintenance issues with the existing drivers. Once that has been accomplished, new audio drivers can (at least in theory) be trivially included.

(In reply to comment #294)
> The main problem I see here is that some of the people still see pulseaudio as
> a sound *mixer*, while that stopped being its main focus awhile ago.
> Now, its main job is being audio stream manager and that's why removing it is
> quite crippling in some of the cases.

Pulse being a "stream manager" is also the reason why using it with Wine is generally "crippling". Wine is not designed to cope with the sorts of things pulse does (namely, it expects lower latency and more control), and pulse is not designed to copy with the sorts of things Wine wants to do.

> P.S. Ben, yes it is *much* better and more user friendly to use approriate
> GNOME and KDE interfaces as appropriate instead of inventing your own low level
> things on X.

There is an argument that it is more user-friendly, but only if GTK, QT and KDE are equally supported. However, it is most certainly NOT appropriate for Wine to use GNOME/GTK, KDE or QT over the current X11 implementation. Wine needs to be able to control specific positions and behaviours of controls, and report back to win32 apps, in ways that GTK/QT etc. cannot be configured for trivially. If you have ever tried to design a win32 GUI, you would understand this. Wine devs would need to create their own widgets for GTK/QT/whatever system is switched to; so why not do that with X11 directly?

> The best free software projects (Firefox, OOO, ...) integrate with
> Gnome and KDE and use, for example their Print dialogs, file open/save dialogs,
> colors and icons, ... That is the best practise among free software. Wine is an
> archaic relic from 1990s in this regard, unfortunately.

There is arguably work to be done in desktop integration, but using a second-order graphics/widgets library is NOT the way to go about it.

(In reply to comment #291)
> There's no need to defend this sorry state of things either,

Yes there is, as the current sorry state is being attacked by people who don't care that, as you say:
> the Wine
> developers themselves are working (slowly) to obsolete the current situation
> with a new audio back-end.

> In the meantime, WinePulse is the currently-available solution that offers a
> superior end-user experience.

Tough. It cannot be included in Wine as the audio subsystem is going through an overhaul. As a result, it cannot be supported ...

Read more...

Revision history for this message
In , Aigars Mahinovs (aigarius) wrote :

(In reply to comment #296)
> You want sources? kernel.org has them. Pulseaudio does not provide kernel audio
> drivers, nor does it interface directly with those drivers (by userspace libs).
> It must therefore use a backend, and on Linux systems ALSA is by far the
> dominant backend (driver and libasound/alsalib/whatever included). The only
> other serious contender for audio backend on Linux is OSS4, but that cannot be
> included in kernel upstream for licensing issues. And as pulse is OPTIONAL
> software (just as Wine, Xorg, GNU tools etc. are) and is not installed on EVERY
> Linux system, ALSA is irrefutably more common than Pulseaudio.

Ok. You have convinced us that it would not be good to remove ALSA drivers from Wine. Which has absolutely nothing to do with the current bug.

> > In the meantime, WinePulse is the currently-available solution that offers a
> > superior end-user experience.
>
> Tough. It cannot be included in Wine as the audio subsystem is going through an
> overhaul.

Says who? You are just arrogantly stating that as a matter of fact, hoping that it would make it a fact. It is not. It is just your private opinion not based in anything else. It is not even based on any argumentation. You are just stating that pulse can not be included because wine will not accept it, despite all facts and despite any and all argument that might have been raised.

Congratulations on killing free software as much as you can. I hope they pay you well at M$.

'Tough.' is not an acceptable answer. It was not acceptable a year ago and it even less acceptable now. If you can not get the new sound system working in a year, what chances are that you will ever make it work? Especially when you are so hostile to all your potential and actual contributors?

Revision history for this message
In , Rafał Mużyło (galtgendo) wrote :

If you're talking about midi generation, then perhaps it's true,
timidity playback works just fine though.

Frankly, I'm getting a feeling that some of the devs think, that wine is only run on pro-audio setups (all that stuff about jack and latency). IIRC average setups can't really deal with that anyway. They simply live with a bit of latency, though usually it's not that much to be really noticeable.

And just what should "PA cannot redirect all sound to the default sink" ?
Last time I checked, by a simple alsa.conf pulse can be made default alsa device.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #297)
> Ok. You have convinced us that it would not be good to remove ALSA drivers from
> Wine. Which has absolutely nothing to do with the current bug.

I am simply demonstrating that Pulse is NOT the most common sound system available on Linux systems, making that argument false as well as invalid.

> > > In the meantime, WinePulse is the currently-available solution that offers a
> > > superior end-user experience.
> >
> > Tough. It cannot be included in Wine as the audio subsystem is going through an
> > overhaul.
>
> Says who?

Says Art Taylor in comment 282. You may recognise Art as the guy maintaining the out-of-tree winepulse.

> 'Tough.' is not an acceptable answer.

It may not be acceptable but it is unfortunately true given the current state of Wine.

> It was not acceptable a year ago and it even less acceptable now.

I dispute that it is LESS acceptable now. If anything, it is MORE acceptable, as progress is being made in restructuring the sound subsystem. You'll just have to wait until that is finished.

> If you can not get the new sound system working in a
> year, what chances are that you will ever make it work?

If you can not get Wine "working" in 18 years, what chances are that you will ever make it work? There are still a lot of programs, win16, win32 and win64 alike, that do not run at all, or run very poorly in Wine.

> Especially when you are
> so hostile to all your potential and actual contributors?

This is nothing but flaming.
1) Alexandre Julliard is the one developer whose opinion is final, and I am simply repeating what I understand is his current feeling on winepulse.
2) Actual contributors to Wine are respected on their individual merits, and it's been a long time since any major contributors (Stefan Dösinger aside) have commented on this bug.
3) Potential contributors to Wine must meet with AJ's approval: if their code is not up to scratch in terms of coding standards, quality, etc., then the patches must be fixed in these respects before being included in Wine.

The pulse driver presents an issue where the EXISTING code in Wine is ugly and needs reworking, and afaik winepulse is no worse than what's already there; but the current consensus is that the code will be reworked before ANY new drivers (and possibly large bugfixes) will be included.

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :

(In reply to comment #297)
> Says who? You are just arrogantly stating that as a matter of fact, hoping that
> it would make it a fact. It is not. It is just your private opinion not based
> in anything else. It is not even based on any argumentation. You are just
> stating that pulse can not be included because wine will not accept it, despite
> all facts and despite any and all argument that might have been raised.

It is well known who is that "who" when it comes to key decisions about Wine core, code structure, future development direction, e.t.c. And, thanks God, this respected person is not Ben Klein.

Still, despite Ben Klein sometimes acts like a troll the fact that Wine audio subsystem is undergoing "A Big Rewrite" is absolutely fair reason not to include any new subdriver into official Wine tree as this would only increase the mess by adding unmaintainable pieces of code that would be obsoleted extremely soon due to sound subsystem rewrite.

Unfortunately there's a problem with this "rewrite". It had been announced more than a year ago that very soon there would be new super-sexy sound driver introduced to Wine based on OpenAL and that this driver would finally bring peace to the entire world. There were postings to this bug report telling that this OpenAL driver would bring (almost) all other drivers obsolete (as OpenAL is available almost on every platform out there) and that finally PulseAudio user would come to a happiness by using Wine over OpenAL over PulseAudio. A lot of time had passed since that tales had been announced but looks like there are no any signs promising that this magical OpenAL backend would finally appear in the near feature.

P.S. I hope I'm wrong with my view of the situation with the OpenAL backend and it would finally find a way into Wine codebase.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #300)
> Unfortunately there's a problem with this "rewrite". It had been announced more
> than a year ago that very soon there would be new super-sexy sound driver
> introduced to Wine based on OpenAL

This is NOT the rewrite being undertaken. The winmm driver architecture is being replaced with mmdevapi.

> P.S. I hope I'm wrong with my view of the situation with the OpenAL backend and
> it would finally find a way into Wine codebase.

It is my understanding that the OpenAL driver is on the backburner until the audio subsystem is restructured.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #228)

>
> That is not true for the obvious reasons even a non-programmer can understand.
> Here are some "pictures" of the path that the audio data have to travel on a
> PulseAudio-enabled system when using different Wine subdrivers:
>
> winealsa:
> [App]->[Wine]->[Pulse compatibility layer for ALSA]->[Pulse]->[Sound Backend,
> most probably ALSA or OSS kernel driver]
>
> wineopenal:
> 1st variant: [App]->[Wine]->[OpenAL-soft]->[OpenAL PulseAudio
> backend]->[Pulse]->[SB]
> 2nd variant: [App]->[Wine]->[OpenAL-soft]->[OpenAL ALSA backend]->[Pulse ALSA
> compat]->[Pulse]->[SB]
>
> winepulse:
> [App]->[Wine]->[Pulse]->[SB]
>

the correct topology is

[winealsa]:
[App] -> [Wine] -> [winealsa] -> [Alsa driver] -> [Sound card]

wineopenal:
[App] -> [Wine] -> [openal-soft] -> [Alsa driver] -> [Sound card]

winepulse:
[Appl] -> [Wine] -> [winepulse] -> [PA server] -> [Alsa driver] -> [Sound card]

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :

(In reply to comment #302)
> the correct topology is ...

This is offtopic for this bug report. So, lets postpone detailed discusion until wineopenal would became available and we - possible - would be filling bugs against wineopenal not working well on the PulseAudio-enabled systems.

As for topology, you had forgot that on the PulseAudio-enabled systems with "non-hardware-openal" audiocards kernel audio driver is ALSA, and alsa sound card device would be exclusivelly locked by PA. Find a minute and take a look into openal-soft configuration on recent linux PA-enabled distros. Most of them configure openal-soft to use PA as output device, either implicitly through buggy PA alsa emulation or explicitly using openal-soft PA output driver (so-called pulseaudio backend).

P.S. Again, this is offtopic for this bug report so I hope we wouldn't dive into detailed discussion - it's pointless in regard to this bug. Feel free to write directly to my e-mail in case you want to discuss this problem in more details.

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

Well that's it; I've had enough of Mr. Klein's trolling, and it's clear that the people whose knowledge and opinions are actually relevant to the state and direction of Wine development with respect to this issue are clearly not actively interested in this bug thread.

I'm going to take a break from this pointless discussion and content myself with actually being able to use Wine on Ubuntu via Winepulse until such time as the Wine developers actually manage to fix the problem (if that ever manages to happen, of course).

Good day.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #304)
> Well that's it; I've had enough of Mr. Klein's trolling,

Stating the facts as they stand is not trolling.

> and it's clear that
> the people whose knowledge and opinions are actually relevant to the state and
> direction of Wine development with respect to this issue are clearly not
> actively interested in this bug thread.

Do you know WHY that is? It's because 90% of the comments on this thread are people saying "Pulse is used by Ubuntu and Fedora. We NEED a pulse driver." Never mind the technical details of what's actually going on at the moment with the sound subsystem (i.e., the change from winmm to mmdevapi); new commenters people keep using the ad populum fallacy. And it REALLY annoys me when they do.

> I'm going to take a break from this pointless discussion and content myself
> with actually being able to use Wine on Ubuntu via Winepulse

Feel free, but don't expect any help when things go wrong. winepulse is still an out-of-tree patch and will not be supported by WineHQ.

Revision history for this message
In , Maarten Lankhorst (mlankhorst) wrote :

Ok just my 2¢, not having read many of the posts here because of the length of the bug report..

Technically the winepulse driver is just the winealsa driver which is just the wineoss driver which is crappy.. A cleaner driver wouldn't take many lines, and isn't actually hard to implement. look at winemmaudio.drv

In either case I've been asked to work on fixing things, and to me it's clear that our current way of doing things just result into a various amount of copy paste drivers, of which some are in worser decay than others, and a few that haven't even been compiled since years (solaris driver). Yet those things still need to be maintained. To clean up that mess, with having different code paths for directsound, winmm and mmdevapi the best way is to just follow what windows does, and make winmm and dsound forward to mmdevapi. This will mean the winmm drivers and dsound drivers will be obsolete. The devil is in the details right now. Right now I'm trying to make winmm work on top of mmdevapi, which makes a lot of the discussion irrelevant, alsa will likely stick around a bit longer, because the midi api was not ported, and I'm not sure how much that has changed in windows.

The only question is will openal be good enough? I'm getting signs it won't be, and in that case we may need to throw out our mmdevapi code and fix that. Either way winepulse.drv won't get in.

Last, what does winepulse add that winealsa doesn't? If it's just a matter of taking the code and replacing alsa calls with pulse calls without fundamentally making a better driver, then our winealsa.drv should be good enough. If there are any bugs in our winealsa.drv that are a result of incorrect api calls, file a bug report for it. If the problem is in alsa's pulse plugin, fix it there and file a bug for it. However as it stands winepulse won't enter the wine tree, but that doesn't mean pulseaudio is not supported. It is supported, but only through winealsa, If you have concrete bugs in our winealsa code, write a bug report and cc me on it, just having a winepulse driver because it's a native driver won't convince me to accept it..

I really wish to leave it at that. Wine does support pulseaudio, it just has no native pulse driver. Any bugs in our winealsa that im aware of will be looked at.

~Maarten

Revision history for this message
In , luke16 (luke16-gmail) wrote :

(In reply to comment #305)
> (In reply to comment #304)
> > Well that's it; I've had enough of Mr. Klein's trolling,
>
> Stating the facts as they stand is not trolling.
>

This is true, but the way you present these facts leads many to believe that you are trolling. Most linux distros these days use PA, and with ubuntu, uninstalling it is not really an option anymore. With this in mind, if wine has incompatibilities with PA, it is in the best interest of wine use the fix that already exists via the winepulse patch for the time being; as regardless of whether or not pulse provides kernel audio drivers as opposed to alsa, the bug still exists and is still a problem.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #307)
> With this in mind, if wine has
> incompatibilities with PA, it is in the best interest of wine use the fix that
> already exists via the winepulse patch for the time being

No, it is not, as Maarten has explained.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #202)

>
> > > *) patch is incomplete
> Supports WaveOut, WaveIn and Dsound playback and capture. All testsuite tests
> pass.
>

The current status is only support waveout ,wavein, dsound via wine specific wave_directsound

winepulse does not support midi , mixer

>> Or hardware-accelerated ALSA, which is disabled by pulse.
>Most audio hardware has no hardware accelerated mixing, which makes it
>difficult to implement hardware-accelerated mixing.

If pulseaudio take up the role of Kmixer in linux , winepulse should provide hardware secondary buffers like the Kmixer in windows

If you can select Full Acceleration using onboard HDA in XP and dxdiag play sound with software and hardware buffers provided by Kmixer

why onboard HDA cannot use Full Acceleration (i.e. hardware secondary buffers) with winepulse

There are differences between aplay , wine , dmix ,pulseaudio

the normal ALSA application set buffer size as stop threshold , the sound card stop playing/recording when xrun (underrun/overrun) occur.

both wine and pulseaudio server set boundary as stop threhold similar to dmix , this disable the automatic stop at xrun (i.e. dmix , wine and PA server are able to recover xrun by snd_pcm_forward() or playing silence ) since they cannot control when will the other application send the audio data

Base on past few years experience, the alsa developer already allow dmix to confugured a suitable buffer size and period size for normal use of those PCI sound card

But pa server and wine seem still experimenting to find the optimum buffer size / period size ( buffer time/period time)

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to comment #309)
> winepulse does not support midi , mixer

MIDI will need to be supported SOMEHOW.

> If pulseaudio take up the role of Kmixer in linux , winepulse should provide
> hardware secondary buffers like the Kmixer in windows
...
> why onboard HDA cannot use Full Acceleration (i.e. hardware secondary buffers)
> with winepulse

winepulse CANNOT provide hardware acceleration in any way because pulse is a software-only mixer that locks out all applications from direct hardware access (as well as dmix).

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #289)
> Just a quick note - the ALSA driver is buggy again. It had worked good for some
> time, but no it again is stuttering and stops working after approximately 10
> minutes. We really need pulse drivers in.
>

But chip challenge work perfectly with "plug:dmix:0" and timidity

The problem is due to "pulse" plugin , which is written by PA developers , does not follow "Handshake between application and library"

http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html#pcm_handshake

There are no easy way for the average user to fall back to use ALSA 's default device in /usr/share/alsa/cards/HDA-Intel.conf after PA override

http://source.winehq.org/git/wine.git/?a=commit;h=0fe3a59b46a44b6d2d54a1afe1c4198c53d6c68c

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

http://www.winehq.org/pipermail/wine-patches/2005-March/016439.html

winamp is able to use dsound to select other sound card other than the default playback device

http://www.intel.com/support/motherboards/desktop/sb/cs-020642.htm#multistream

For some wine user, they may know how to use .asoundrc and wine registry key to select their prefered device since winecfg does not allow use to select sound card for playback or record even when winealsa support multiple sound cards

.asoundrc

pcm.wine {
    type
    asym
    playback.pcm "plug:front:0"
    capture.pcm "plughw:0,0"
}

http://wiki.winehq.org/UsefulRegistryKeys

AutoScanCards="N"
DeviceCount="1"
DevicePCM1="wine"
DeviceCTL1="hw:0"
UseDirectHW="N"

since wine is still using vxd model, I agree that it is wrong to allow multiple waveopens in winealsa ,

but when winecoreaudio , wineesd and winepulse support multiple waveoutopen like wdm model , I think wine developer should reconsider adding multiple waveoutopen for those alsa device which allow wine to open more than one time

or provide some option to stop the autostart of primary buffer of dsound in winealsa to allow those alsa's hardware/softeare mixing device to use the secondary hardware bffers

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #310)

>
> > If pulseaudio take up the role of Kmixer in linux , winepulse should provide
> > hardware secondary buffers like the Kmixer in windows
> ...
> > why onboard HDA cannot use Full Acceleration (i.e. hardware secondary buffers)
> > with winepulse
>
> winepulse CANNOT provide hardware acceleration in any way because pulse is a
> software-only mixer that locks out all applications from direct hardware access
> (as well as dmix).

DSCAPS_CONTINUOUSRATE The device supports all sample rates between the dwMinSecondarySampleRate and dwMaxSecondarySampleRate member values. Typically, this means that the actual output rate will be within +/- 10 hertz (Hz) of the requested frequency.

DSCAPS_SECONDARY16BIT The device supports hardware-mixed secondary sound buffers with 16-bit samples.
DSCAPS_SECONDARY8BIT The device supports hardware-mixed secondary buffers with 8-bit samples.
DSCAPS_SECONDARYMONO The device supports hardware-mixed monophonic secondary buffers.
DSCAPS_SECONDARYSTEREO The device supports hardware-mixed stereo secondary buffers

this mean winealsa.drv is incorrect to use those flags when it disable the alsa-lib resampling

    *flags = DSCAPS_CERTIFIED | DSCAPS_CONTINUOUSRATE;
    *flags |= DSCAPS_SECONDARYMONO | DSCAPS_SECONDARYSTEREO;
    *flags |= DSCAPS_SECONDARY8BIT | DSCAPS_SECONDARY16BIT;

since only wineoss.drv with ossv4 have hardware mixing buffers which define PCM_CAP_MULT

#define DSP_CAP_MULTI PCM_CAP_MULTI

#ifdef DSP_CAP_MULTI /* not every oss has this */
        /* check for hardware secondary buffer support (multi open) */
        if ((arg & DSP_CAP_MULTI) &&
            (ossdev->out_caps.dwSupport & WAVECAPS_DIRECTSOUND)) {
            TRACE("hardware secondary buffer support available\n");

            ossdev->ds_caps.dwMaxHwMixingAllBuffers = 16;
            ossdev->ds_caps.dwMaxHwMixingStaticBuffers = 0;
            ossdev->ds_caps.dwMaxHwMixingStreamingBuffers = 16;

            ossdev->ds_caps.dwFreeHwMixingAllBuffers = 16;
            ossdev->ds_caps.dwFreeHwMixingStaticBuffers = 0;
            ossdev->ds_caps.dwFreeHwMixingStreamingBuffers = 16;
        }
#endif

This is equivalent to those 16 or more playback subdevices in alsa

Revision history for this message
In , Md Imam Hossain (imamdxl8805) wrote :

if I use [padsp wine app] and select OSS in winecfg then it works for all games.

But I just found that if I change default pcm and ctl device in WINE to cards.pcm.default via regedit and select ALSA in winecfg then it is also working no problem.

I am guessing that Ubuntu "default" ALSA device is reserved for Pulse Audio, so any apps try to use "default" ALSA device will not work. For that reason we need to use "cards.pcm.default" ALSA device for the apps that is trying to use "default" ALSA device.

Please confirm.

Thank you

Revision history for this message
In , Susan Cragin (susancragin) wrote :

I'm no expert, but here's what I know.
In ubuntu, the standard way to not have pulseaudio is to disable it among the start menu options, and then edit
/etc/pulse/client.conf
so that "autospawn" is uncommented and changed to "no."

Wine uses the default soundcard, so changing the default soundcard should use a little script in the user's file called .asoundrc

which should have as its text something that points to whatever soundcard you want to use. The following is a sample script that points away from the onboard card (which is 0) and to the installed pc card, which is technically card #1, at least on my machine.

pcm.!default {
    type hw
    card 1
}
ctl.!default {
    type hw
    card 1
}

I realize that this is all useless for someone still trying to make pulseaudio work with wine, even using pasdp.

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

(In reply to comment #314)
> I'm no expert, but here's what I know.
> In ubuntu, the standard way to not have pulseaudio is to disable it among the
> start menu options, and then edit
> /etc/pulse/client.conf
> so that "autospawn" is uncommented and changed to "no."
>
> Wine uses the default soundcard, so changing the default soundcard should use a
> little script in the user's file called .asoundrc
>
> which should have as its text something that points to whatever soundcard you
> want to use. The following is a sample script that points away from the onboard
> card (which is 0) and to the installed pc card, which is technically card #1,
> at least on my machine.
>
> pcm.!default {
> type hw
> card 1
> }
> ctl.!default {
> type hw
> card 1
> }
>
> I realize that this is all useless for someone still trying to make pulseaudio
> work with wine, even using pasdp.

I appreciate the info, but I fear that discussion of end-user workarounds may serve only to derail discussion of a real fix unless the Wine developers really have no intention of working this issue.

It should also be mentioned that this workaround has also already been discussed here. In fact, I recently commented that it causes me to lose the ability to adjust Wine's volume in Ubuntu via the volume buttons on both my laptop and my USB keyboard :(

Revision history for this message
In , Msn-gaiatools (msn-gaiatools) wrote :

> I appreciate the info, but I fear that discussion of end-user workarounds may serve only to derail discussion of a real fix unless the Wine developers really have no intention of working this issue.

As long as users struggle with the Wine+PulseAudio combination, users will inevitably come here and complain. I'm not saying this is desirable, nor the right thing to do, but it's unavoidable.

Revision history for this message
In , Dan Kegel (dank) wrote :

Wine's sound support is being overhauled; see e.g.
http://www.winehq.org/pipermail/wine-cvs/2011-April/077118.html
It is not unlikely that support for PulseAudio will improve as a result.

Revision history for this message
In , Hirager (marek-pasnikowski) wrote :

Now, when the sound system in wine is overhauled, what is the status of "official" pulseaudio support in wine? I did a bit searching and can't find any information on when such driver will be added, if made. The current ALSA driver seems to work fine with emulation, but I have read many times that after the change of sound architecture in wine the PA driver will be added.
I don't want to hurry things up, I am just curious what is the estimated time of arrival of this feature.

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :

(In reply to comment #318)
> ... I have read many times that after the
> change of sound architecture in wine the PA driver will be added.

Em, I might be wrong, but I can't recall the claims that the PA driver would be added after sound system rewrite. AFAIRK, the claims were that after the sound subsystem rewrite Wine would use OpenAL for the sound output, and it would be OpenAL side to support actual output backend, should it be hw-accelerated AL drivers, openal-soft via ALSA or openal-soft PulseAudio backend. Still, I might be wrong.

Revision history for this message
In , Hirager (marek-pasnikowski) wrote :

(In reply to comment #319)
> (In reply to comment #318)
> > ... I have read many times that after the
> > change of sound architecture in wine the PA driver will be added.
>
> Em, I might be wrong, but I can't recall the claims that the PA driver would be
> added after sound system rewrite.

Forgive me. What I meant to use was "driver -might- be added". And I forgot the agreement on OpenAL. Anyway, the question still is accurate. What is the ETA for this final piece of PA support?

Revision history for this message
In , Stefan Dösinger (stefandoesinger) wrote :

OpenAL turned out to be no good for our purposes, so we went back to the model of writing multiple backends in Wine itself. The transition to a mmdevapi-based driver model is mostly complete, if I am not mistaken only dsound needs to be reimplemented on top of mmdevapi - winmm is already done.

Maarten Lankhorst has a mostly working PA driver in his git repo. However it handles only mmdevapi and not dsound, so it's no good until dsound is moved over to mmdevapi as well. Besides I think most people prefer to talk to PA via Alsa. Andrew Eikum is has been working on the annoying bug that caused random sound loss and a bugfix for this problem was committed to the PA and alsa-pulse(part of alsa-plugins) git trees.

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :

(In reply to comment #321)
> OpenAL turned out to be no good for our purposes, so we went back to the model
> of writing multiple backends in Wine itself...

Stefan, thanks for clarification and the status update. It's a very good news to hear that PA support would eventually find its way into Wine, although I still prefer not to use PA at all on my workstation - it's still a lot of pain jumping over the show-stopping bugs here and there (for ex., multiple sound distortion bug in SSE/MMX optimized volume scaler when using multichannel output setups).

Revision history for this message
In , markusj (markusj) wrote :

Sadly, this is at moment NOT the case.
wine's sound-performance degraded the last few updates and with 1.3.26-0ubuntu1~ppa1~maverick1, it's broken completely. (Using up-to-date Ubuntu 10.10 with wine from the official PPA)
Even winecfg's "Test Sound"-Button does not work, it leads to following commandline output:

ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field handle_underrun
ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field handle_underrun
ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field handle_underrun
ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field handle_underrun
ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field handle_underrun
err:winmm:WINMM_OpenDevice Activate failed: 80004005
ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field handle_underrun
err:winmm:WINMM_OpenDevice Activate failed: 80004005

Still waiting for the day at which those damn political discussions stop and all refocus on making things work better instead of intentional keeping broken parts broken.
I'm tired of pointless political battles preventing me to use my computer the way i would like it to do.

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

Thanks for the update, Stefan. I dug some links out of the repos in case anyone is interested:

Looks like a winepulse driver was added to Maarten's unstable audio changes fork of the Wine source ( http://repo.or.cz/w/wine/multimedia.git/commit/ee9bf8dfd43ce818d4f5ac48b08bde5e3031f945 ). Subsequent commits show continued work on the winepulse driver. This is exciting news, but I think it may be a while before we see these become official (I think this branch may be part of the long-term effort to implement the mmdevapi stuff).

In the official Wine source, however, I do see an ALSA underrun fix for Pulse users from Andrew Eikum ( http://repo.or.cz/w/wine.git/commit/9ad60d1d143809c6ae477eb53e75c3dc93736e0e ). It is mentioned in the release notes for Wine 1.3.26 ( http://www.winehq.org/announce/1.3.26 ), so that build might work better for some people.

Revision history for this message
In , Marius B. Kotsbak (mariusko) wrote :

Which application do you use? If it is Spotify, you should try the native Linux client application they provide.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
markusj (markusj) wrote :

Marius Kotsbak (mariusko) wrote on 2011-08-08:
> Which application do you use? If it is Spotify, you should try the native Linux client application they provide.
Was this adressed to me? I am using Foobar2000, but even the winecfg-built-in audio-test does not work, so this problem is obviously related to "wine vs. pulseaudio" and not to Foobar

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

markusj: This looks possibly related to some changes by Andrew Eikum in 1.3.26 that were meant to help users run Wine on PulseAudio, but clearly something is backfiring on you. I've sent him an email with a link to your comment #423 on Ubuntu bug #371897.

Revision history for this message
Andrew Eikum (aeikum) wrote :

This Bugzilla cross-integration thing really confuses me (Comments to Wine bugzilla appear here _first_???), so I'm just going to post replies here since I understand how that works.

> Still waiting for the day at which those damn political
> discussions stop and all refocus on making things
> work better instead of intentional keeping broken parts
> broken.
> I'm tired of pointless political battles preventing me
> to use my computer the way i would like it to do.

There's nothing political going on here. Audio drivers take a good amount of work to write, and every time we need to make a change to the drivers, that change needs to be replicated across all of the drivers. We already have three audio drivers in Wine. Adding another is a significant increase in maintenance work, not to mention more complication for users and when reporting bugs, so we're avoiding it as much as possible. PulseAudio supports ALSA programs through the alsa-plugins Pulse PCM device, so we use the ALSA driver in Wine to support PulseAudio. If something doesn't work in that chain, it's a bug. No politics, just real life.

The issue you're seeing there is caused by your old alsa-plugins version. The 10.10 package list[1] shows that alsa-plugins is at version 1.0.23 on your OS. This version doesn't support the "handle_underrun" option[2]. However, the ALSA developers bafflingly decided that unknown configuration options should result in device failure. So, you have no sound when we set that option.

That leaves us in an ugly situation. If we choose not to give the handle_underrun option if it's unsupported by your alsa-plugins version, then your audio will break anyway after a few minutes due to a PulseAudio bug[3]. If we leave the option in, then your audio just outright won't work, as you see here. So really the only solution is for you to upgrade your alsa-plugins version (and, obviously, its dependencies) to at least 1.0.24, which is the minimum version that supports handle_underrun. In reality, that probably means moving on from 10.10.

[1] http://packages.ubuntu.com/maverick/libasound2-plugins
[2] http://git.alsa-project.org/alsa-plugins.git
[3] https://bugs.launchpad.net/ubuntu/+source/alsa-plugins/+bug/805940

Revision history for this message
markusj (markusj) wrote :

Andrew Eikum (aeikum) wrote #433:
> This Bugzilla cross-integration thing really confuses me (Comments to Wine bugzilla appear here _first_???), so I'm just going to post replies here since I understand how that works.
It's a bit weird and it haven't found a description about this out-of-order-bugtracking ...

Thanks for your statement, think i will downgrade wine until i switched over to 11.(04|10) (hopefully this kernel power regressions get fixed soon).
Maybe a PPA should offer an older wine version for those people which like to have some working audio output with Ubuntu 10.10

Revision history for this message
Volodymyr Buell (vbuell) wrote :

Selectively upgraded alsa/pulseaudio/linux kernet to versions from natty (alsa 1.0.24.2, pulseaudio 0.9.22-24-g67d18, Linux 2.6.38-10-generic). No differences. Still getting:

ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field handle_underrun
err:winmm:WINMM_OpenDevice Activate failed: 80004005

Revision history for this message
Andrew Eikum (aeikum) wrote :

Vladimir: Did you upgrade alsa-plugins? I think the package is called "libasound2-plugins" in Ubuntu.

Revision history for this message
Volodymyr Buell (vbuell) wrote :

Andrew: Yes. libasound2-plugins version is 1.0.24-0ubuntu2.

Revision history for this message
Andrew Eikum (aeikum) wrote :

Vladimir: That seems wrong, I think the packager screwed up. Tag v1.0.24 has the "Unknown field" line occur on line pcm_pulse.c:1019[1]. However, v1.0.24~3 has it on line pcm_pulse.c:1008[2]. So it appears someone packaged v1.0.24~3 as if it were 1.0.24. Where did you find the package?

[1] http://git.alsa-project.org/alsa-plugins.git?p=alsa-plugins.git;a=blob;f=pulse/pcm_pulse.c;h=2df0a80f01243dad58765af3db553ed5f3e3b26e;hb=06ca71522f1dc48b8503d945da81fdbcbab0aafa#l1019

[2] http://git.alsa-project.org/alsa-plugins.git?p=alsa-plugins.git;a=blob;f=pulse/pcm_pulse.c;h=b322898e0255aebf5dc6e94e1f19d45fcdb41bb2;hb=1675414eca06dcfc20899adf104ace05acfe26a0#l1008

Revision history for this message
Volodymyr Buell (vbuell) wrote :

Andrew: It's from generic natty repository. I've just added ("deb http://archive.ubuntu.com/ubuntu natty main restricted", etc) to the sources.list and upgraded all needed packages.

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :

Good day 2ALL,

As far as I know Andrew Eikum had recently finished dsound re-implementation over mmdevapi. So looks like it's time to request for status update on this bug. Stefan, Andrew, what are the plans for the future regarding Wine interactions with PulseAudio? Would it be separate mmdevapi backend like one that was "mostly working" from Maarten Lankhorst's git or should end-user stick with mmdevapi alsa backend and rely on pulseaudio alsa-plugin to do the job? Thanks in advance for clarifications.

P.S. And it may be just the right time to finally close this bug? Wine's audio subsystem had undergone total rework and it might be reasonable to file a new bug about "mmdevapi should have pulseaudio backend" in case that is really needed to get sound properly working in PA-enabled environment.

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

(In reply to comment #324)
We should avoid discussing closure of this bug until we can verify that the new implementation has been included in a released build and that it no longer suffers from the issues reported here.

Revision history for this message
In , Andrew Eikum (aeikum) wrote :

(In reply to comment #324)
> As far as I know Andrew Eikum had recently finished dsound re-implementation
> over mmdevapi. So looks like it's time to request for status update on this
> bug. Stefan, Andrew, what are the plans for the future regarding Wine
> interactions with PulseAudio? Would it be separate mmdevapi backend like one
> that was "mostly working" from Maarten Lankhorst's git or should end-user stick
> with mmdevapi alsa backend and rely on pulseaudio alsa-plugin to do the job?
> Thanks in advance for clarifications.

Yes, PulseAudio is supported through its ALSA compatibility plugin. It's possible that a PulseAudio driver might happen at some point, but there's no plans for one at the moment.
There's some more information here: <http://wiki.winehq.org/Sound>

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

(In reply to comment #326)
> Yes, PulseAudio is supported through its ALSA compatibility plugin. It's
> possible that a PulseAudio driver might happen at some point, but there's no
> plans for one at the moment.
> There's some more information here: <http://wiki.winehq.org/Sound>
Thanks Andrew, but this makes it sound like none of the Wine compatibility issues with PulseAudio have been addressed on Wine's end via the mmdevapi rewrite. Is this true?

A link from your link suggests that a PulseAudio alsa-plugin fix may be in Ubuntu 11.10 that addresses buffer underrun issues. This is a good thing, but does mean that those stuck on other Ubuntu versions (or non-Ubuntu distros using older PulseAudio versions) may still have issues with Wine + pulseaudio.

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

> A link from your link suggests that a PulseAudio alsa-plugin fix may be in
> Ubuntu 11.10 that addresses buffer underrun issues. This is a good thing, but
> does mean that those stuck on other Ubuntu versions (or non-Ubuntu distros
> using older PulseAudio versions) may still have issues with Wine + pulseaudio.

I'm interested to an answer to the above question as well...
For the record, I'm on Debian Sid and I'm still experiencing sound issues with wine + pusleaudio, which makes most games hard to enjoy (or to play at all, in some cases).

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :

(In reply to comment #327)
> does mean that those stuck on other Ubuntu versions (or non-Ubuntu distros
> using older PulseAudio versions) may still have issues...

Truth is that those stuck on older version of buggy software would continue to hit those old bugs in that software. For example multichannel speakers configuration is a total mess under 10.04 LTS PulseAudio. The only way to fix it keeping PA installed is to manually build latest dev snapshot of PA - Ubuntu maintainers seem to have no interest in backporting fixes onto "long term support" stable version. They are content with the fixed for this bug landed into latest "regular" Ubuntu version. And so on.

Returning back to Wine, it shouldn't took long for you to look into wine git logs and conclude that there were some compatibility patches for proper interaction with PA's alsa-plugin. You should still use the latest PA and alsa-plugins with a lot of bugfixes though to have mentioned patches work.

Thus, answering to your initial question: there were some PA compatibility fixes addressed during Wine's sound subsystem rewrite but you should always stick to latest versions of all components of "modern linux desktop sound subsystem" to have most old bug fixed (and new introduced).

P.S. Me personally would prefer to have separate mmdevapi backend for PulseAudio as it would be more backwards-compatible than sticking with PA's alsa-plugin emu. Still the final decision is to be made by Wine's devteam.

Revision history for this message
In , Gilboa Davara (gilboad) wrote :

Short question:
Is PA 1.0 a hard requirement for getting stable sound under wine/alsa/PA combo?
There's a heated discussion over the Fedora development mailing list about whether PA 1.0 should be introduced as a last-minute-post-beta upgrade mostly in an effort to restore sound under Wine.

- Gilboa

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :

(In reply to comment #330)
> Short question:
> Is PA 1.0 a hard requirement for getting stable sound under wine/alsa/PA combo?

Quick answer: my tests shows that the hard requirement is to have recent enough alsa-plugins (at least v.1.0.24). Actually there had been a lot of PA-related fixes to alsa-plugins since 1.0.24 (last one landed to alsa-plugins git 12 days ago) and tests I tried at home showed great improvements in overall sound stability under Wine+PA+ALSA in case I build alsa-plugins from current git HEAD.

As for PA version - everything around versions 0.9.x seemed to smell like "public alpha-test of crappy and extremely buggy software". Almost every version I had tested so far had a lot of bugs, including ones unrelated to interoperability with Wine (latency issues, incorrect manipulations with soundcard hw mixer, "rattling", sound distortions, incompatibilities with other apps, e.t.c.). Latest PA version I had tested so far was 0.9.23 and I can state that it might be considered "almost bug-free for general use" in case coupled with latest ALSA and alsa-plugins from current git. Don't know it they had fixed or broke something in 1.0 release and I personally wouldn't be happy to have almost untested piece of software to be included in F16 at a last minute. It'd be better to post in into rawhide or into testing and have volunteers test it before letting it into public. This discussion is an offtop here so I shut up :-).

Revision history for this message
In , Gilboa Davara (gilboad) wrote :

(In reply to comment #331)
> it before letting it into public. This discussion is an offtop here so I shut
> up :-).

Thanks for the information, never the less :)

- Gilboa

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

(In reply to comment #329)
> Thus, answering to your initial question: there were some PA compatibility
> fixes addressed during Wine's sound subsystem rewrite but you should always
> stick to latest versions of all components of "modern linux desktop sound
> subsystem" to have most old bug fixed (and new introduced).

I usually agree with the 'stick to latest versions' thing, but I believe one thing should be noted here:
http://www.alsa-project.org/main/index.php/Main_Page_News
The official ALSA releases have been kind of rare lately (1 during 2010, and the latest being 2011-01-31), so the only way to keep it updated is to actually compile it, which can be a problem for those users who don't have a clue on how to do it; just think at those who try Linux (mostly Ubuntu) and then find out their games/programs aren't working as they expected under Wine (and believe me, I've seen way too many of those)...
I don't want to sound harsh, but unless there's a better way to keep alsa-plugins updated (at least to a version that does make the sound work), PA shouldn't be considered 'supported through alsa'

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

(In reply to comment #333)
> I usually agree with the 'stick to latest versions' thing, but I believe one
> thing should be noted here:
> http://www.alsa-project.org/main/index.php/Main_Page_News
> The official ALSA releases have been kind of rare lately (1 during 2010, and
> the latest being 2011-01-31), so the only way to keep it updated is to actually
> compile it, which can be a problem for those users who don't have a clue on how
> to do it; just think at those who try Linux (mostly Ubuntu) and then find out
> their games/programs aren't working as they expected under Wine (and believe
> me, I've seen way too many of those)...
> I don't want to sound harsh, but unless there's a better way to keep
> alsa-plugins updated (at least to a version that does make the sound work), PA
> shouldn't be considered 'supported through alsa'
That sounds backwards from my understanding of how things work, at least on Ubuntu. I thought that PulseAudio is in charge of everything by default, and when an app (like Wine) thinks it's using ALSA in this setup, it's actually using a wrapper provided by PulseAudio that translates ALSA calls to PulseAudio calls?

Revision history for this message
In , Dimesio (dimesio) wrote :

FWIW, feedback on the forum is that this is fixed. http://forum.winehq.org/viewtopic.php?t=13719

If the minimum version of alsa-plugins needed is 1.0.24 (comment 331) and that's been out since January 2011 (comment 333), then IMO, most users can be expected to already have what's needed.

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

Then I guess it's either one of these 3:
1. Debian (and some others) use broken version of alsa-plugins
2. Ubuntu uses some custom patches (henche the 1.0.24-0ubuntuX version number)
3. I've turned selectively deaf :)

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :

(In reply to comment #335)
> FWIW, feedback on the forum is that this is fixed.
Which one of "this" is supposed to be fixed?

> If the minimum version of alsa-plugins needed is 1.0.24 (comment 331)...
Read my comment once again: absolute minimum is 1.0.24 as with earlier versions you wouldn't get any sound at all from Wine+ALSA+PA combo (or it would hang very quickly, see bugs #28282 and #28066).

Typical error message for too old alsa-plugins version is something like:
ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field handle_underrun

Since the release of the alsa-plugins v.1.0.24 there were a lot of other PA-related fixes commited into git so one wishing to get best of it have to download, compile and install git HEAD version of alsa-plugins. Actually it should be done by distro package maintainers as alsa-plugins release cycle seems to be too slow to deliver fixes timely to the users who need them.

(In reply to comment #334)
> I thought that PulseAudio is in charge of everything by default, and
> when an app (like Wine) thinks it's using ALSA in this setup, it's actually
> using a wrapper provided by PulseAudio that translates ALSA calls to PulseAudio
> calls?

It's actually a bit mixed. Apps are expected to use ALSA through a thing called "alsalib" (a.k.a. "libalsa"). This thing supports a concept of "plugins" (which are called - you guess - alsa plugins). Good examples of plugin are dmix and plug which are well-known to anyone who had ever been hand-configuring ALSA using asoundrc. Another example of alsa-plugin is a "pulse" plugin which is also provided by ALSA dev-team. This plugin acts as forward mechanism towards PA. Most of the problems with PA usually were caused by bugs in PA itself. On the other hands some bugs were caused by deficiency in pulse alsa-plugin. Yeah, I know that "The Big Picture of the Sound Subsystem" is a bit complicated in ALSA+PA enabled world :-).

Revision history for this message
In , PDJB (philbradley) wrote :

I've recently had to uninstall pulseaudio (ubuntu 11.10, 64 bit, inc. patches from oneiric-proposed and oneiric-backports) because it was randomly causing Rosetta Stone 3.4.7 (run through Wine) to be unable to play audio (making progress through the program impossible), requiring a restart of pulseaudio and then the program in order to get underway again. Wine 1.3.35.

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

Yes, that is a common problem. It happens with most games if you run them for enough time, 1 hour into Left 4 Dead 2 and the audio dies (just for wine of course, other programs aren't affected at all), the only way to get it back is to restart both pulse. By the way, restarting pulse means that you have to restart any programs using audio output (and some of them crash in doing so, see rhythmbox) or they'll go mute, making the whole thing even more annoying.
It looks like nobody will fix this anytime soon, just look for how long they've been ignoring this issue. The only answers you'll get will be either "whine at your distro's mainteiners and make them update alsa-plugins to the latest git" (and it still won't solve this problem) or "remove pulsaudio and go back to alsa" (because who needs pulse? On a totally unrelated topic, switch to Netscape, no need for new fancy browsers or new web standards)... Yet pulseaudio is "officially supported through alsa".
So yeah, never thought I'd say this, but if you need audio output you should really consider a dual boot system with Linux and Windows, Wine simply won't work as for now.
PROVE ME WRONG AND FIXE AUDIO ISSUES WITH PULSE PLEASE.

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :

(In reply to comment #339)
> The only answers you'll get will be either "whine at
> your distro's mainteiners and make them update alsa-plugins to the latest git"
> (and it still won't solve this problem) ...

Fire up bugs please in case you've got problem after compiling and installing latest alsa-plugins from git. Whining is a cool thing but the only way to get bugs fixed is to fire up bugs and do anything you can to sort them out.

> or "remove pulsaudio and go back to alsa" (because who needs pulse?
> On a totally unrelated topic, switch to Netscape, no need for new
> fancy browsers or new web standards)...

You don't know what you're talking about. PA is a buggy thing, alsa pulse plugin is also a buggy thing, and even default ALSA's dmix+plug setup is a buggy thing. Wanna details? Monitor wine-bugs list for messages by Andrew Eikum and Jörg Höhle - they are working really hard to workaround all the bugs in ALSA+dmix+PA+Wine that had been reported so far.

> So yeah, never thought I'd say this, but if you need audio output you should
> really consider a dual boot system with Linux and Windows, Wine simply won't
> work as for now.
> PROVE ME WRONG AND FIXE AUDIO ISSUES WITH PULSE PLEASE.

In case you wanna be 100% sure about compatibility - dual booting is a good choice. If you can handle some problems - Wine isn't a bag choice either.

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

(In reply to comment #340)
> Fire up bugs please in case you've got problem after compiling and installing
> latest alsa-plugins from git. Whining is a cool thing but the only way to get
> bugs fixed is to fire up bugs and do anything you can to sort them out.
Sorry for the little rage in my last post, but so far it's been the only way to get a decent reply from someone.

> You don't know what you're talking about. PA is a buggy thing, alsa pulse
> plugin is also a buggy thing, and even default ALSA's dmix+plug setup is a
> buggy thing. Wanna details? Monitor wine-bugs list for messages by Andrew Eikum
> and Jörg Höhle - they are working really hard to workaround all the bugs in
> ALSA+dmix+PA+Wine that had been reported so far.
I am (unluckly) well aware how buggy PA is. Point is, just look at the comments of this bug report. Look at the answers we've been given, or even better, check the wiki's sound page, or how many bugs have been filed for this kind of issue, or take a look at the forum's sticky posts about sound issues. Once there was even a lot of talk about a pulse driver after the new audio interface'd have been completed, then silence. Now I'd just like to know Wine's developers' official position about this issue, since so far I've only seen the kind of answers that I've reported in my above post, and the sound's been like this for... Mmmmh... I don't remember exactly, 6 months? I'd like to know what to expect from the future, be it "we are working to make audio work better with pulse through alsa", "we are working on a pulse driver" or "screw pulse, it won't be supported anymore", because that "pulse is supported through alsa, but you may aswell disable it since it doesn't work" thing is getting pretty old. Really, I appreciate the dev's work on such a big and complicated project as Wine is, but some news about this old (yet persistent) issue could help

> In case you wanna be 100% sure about compatibility - dual booting is a good
> choice. If you can handle some problems - Wine isn't a bag choice either.
Honestly, I can handle random crashes, loss of data, occasional lag, graphical issues (I remember the old times when most games wouldn't even start with Wine), but they all get fixed sooner or later... This issue, on the other hand, has been carried around for quite a while..

Revision history for this message
In , PDJB (philbradley) wrote :

(In reply to comment #338)
> I've recently had to uninstall pulseaudio (ubuntu 11.10, 64 bit, inc. patches
> from oneiric-proposed and oneiric-backports) because it was randomly causing
> Rosetta Stone 3.4.7 (run through Wine) to be unable to play audio (making
> progress through the program impossible), requiring a restart of pulseaudio and
> then the program in order to get underway again. Wine 1.3.35.

I wanted to post a heartfelt thank to the contributors that put a load of sound system fixes into 1.3.36 - no problems anymore (so far) running pulseaudio and rosetta stone alongside one another

Revision history for this message
In , Austin English (austinenglish) wrote :

Moving milestone to 1.6.

Revision history for this message
In , Austin English (austinenglish) wrote :

My mistake, 1.6 criteria are not set yet, so these need to stay in 1.4.

Sorry for the noise.

Revision history for this message
In , ill (illumilore) wrote :

It looks like from here: http://comments.gmane.org/gmane.comp.emulators.wine.patches/103536
that the patch that makes a pulseaudio driver is coming back sooner rather than later. There is also a 1.4rc5 source of wine that will build with a pulseaudio driver here: http://repo.or.cz/w/wine/multimedia.git

I have tested it with civ5 and no problems so far.

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :
Download full text (3.9 KiB)

(In reply to comment #341)
> I am (unluckly) well aware how buggy PA is. Point is, just look at the comments
> of this bug report. Look at the answers we've been given ...
> ...
> Really, I appreciate the dev's work on such a big and complicated project as
> Wine is, but some news about this old (yet persistent) issue could help
>

Sorry for delaying my answer for such a long time, but I have been having some medical issues last months preventing me from using computers.

Fact is that I'm not a Wine developer, so I can't provide you with an "official position on point". Still, I've been monitoring Wine's Bugzilla and wine-development list for a pretty long period of time so I can share with you my conclusions on the topic I had made through observations. Here they are:

a) We all know a sad fact that not all people officially working on bugzilla maintenance are always polite and unbiased. On the contrary, most of the times you should expect a bit of rudeness and/or tension trying to get your bug not "CLOSED WONTFIX", a patch accepted into the Wine tree, e.t.c. Personally I don't like this much but it is the way it is and it works more or less, keeping in mind the amount of bug reports devs get posted with every day.

b) Audio subsystem rewrite we've been originally told about had been done, but not in the way it had been originally thought of. AFAIRK, initial intent was to get rid of all the old drivers, implement the only one instead, thus decreasing the maintenance burden from having to support N drivers into having to support 1 driver. It had been thought that OpenAL would serve as a viable backend, but in the end it turned out not to be a case. Instead Wine's audio subsystem had been rewriten so sound render path went through mmdevapi interface, and there had been three mmdevapi driver backends implemented for it: ALSA, OSS and CoreAudio. As far as I had read on bugzilla, mmdevapi maintainers are not against having separate PA mmdev driver in general, but as their time is limited they want to fix most of the outstanding show-stopper bugs in existing mmdevapi drivers first, and only then considering something like separate PA mmdevapi driver.

c) So, taking into account what I had written in (b) - current short term support policy for PA seems to be "Wine should work decently enough with alsa-pulse plugin, in case you have fresh-enough version of libalsa, alsa-plugins and PA installed", and possible long-term policy might include something like separate PA driver which would provide some additional benefits when used over ALSA->alsa-pulse render patch.

> Honestly, I can handle random crashes, loss of data, occasional lag, graphical
> issues (I remember the old times when most games wouldn't even start with
> Wine), but they all get fixed sooner or later... This issue, on the other hand,
> has been carried around for quite a while..

Well, it's not an "in-fixable" issue, actually. With older Wine versions you may wish to stick with out-of-tree patch that adds PA driver to the now obsolete winmm drivers architecture. If you want to use latest-n-greatest Wine releases (1.4+) - be sure to also use latest-n-greatest PA and alsa-plugins relea...

Read more...

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

(In reply to comment #345)
> It looks like from here:
> http://comments.gmane.org/gmane.comp.emulators.wine.patches/103536
> that the patch that makes a pulseaudio driver is coming back sooner rather than
> later. There is also a 1.4rc5 source of wine that will build with a pulseaudio
> driver here: http://repo.or.cz/w/wine/multimedia.git
>
> I have tested it with civ5 and no problems so far.

Apparently Wine has again rejected a winepulse patch after Maarten Lankhorst put a bunch of work into improving it in his wine/multimedia.git repo (http://repo.or.cz/w/wine/multimedia.git).

A discussion thread has been started about it on the Ubuntu forums: http://ubuntuforums.org/showthread.php?t=1960599

I'm actually a bit confused about the current state of things, as Art Taylor declared his earlier versions of the winepulse patch to be obsolete due to Wine's mmdevapi implementation, but then Maarten pulled it into his wine/multimedia.git repo and did a bunch more work on it.

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :

(In reply to comment #347)
> Apparently Wine has again rejected a winepulse patch after Maarten Lankhorst
> put a bunch of work into improving it in his wine/multimedia.git repo
> (http://repo.or.cz/w/wine/multimedia.git).

Would you please provide some ground for your statement about rejection of the patch?

As far as I can see from wine-devel mailing list log, Maarten had been - and most probably is still - working on this patch for quite a long time. Last time he tried to send it to wine-patches, which was "try 12", had only been ten days ago. The patch is listed at http://source.winehq.org/patches/ page and is at "New" state - which is not "Rejected" obviously. AFAIRK Alexandre was out on vacation during that period of time, and that is a viable reason why hadn't been any conclusion made about this patch. Another thing to note is that there were no feedback about "try 12" version of patch on the wine-devel list. I wouldn't be surprised if this patch would be ignored unless there would be some positive feedback received from other sound subsystem developers (Andrew, Joerg). Needless to say that accepting a large chunk of the code at once into Wine tree isn't a thing that commonly happens. My expectations are that - likely - this patch would finally find its way into Wine, but it won't happen "right here and now".

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

(In reply to comment #348)
> (In reply to comment #347)
> > Apparently Wine has again rejected a winepulse patch after Maarten Lankhorst
> > put a bunch of work into improving it in his wine/multimedia.git repo
> > (http://repo.or.cz/w/wine/multimedia.git).
>
> Would you please provide some ground for your statement about rejection of the
> patch?

Alexey,

I only know what I read at the two links that I posted. I have asked for more information on the Ubuntu forum thread, but have not yet received a reply.

I believe the forum post may have been made by Maarten himself (but I am not 100% certain), and it was certainly Maarten who recently added the following comment to his v16 version of the winepulse patch:

-----
+ /* Give one visible warning per session
+ * Sadly wine has chosen not to accept the winepulse patch, so support ourselves
+ */
+ if (!warn_once && (warn_once = CreateEventA(0, 0, 0, "__winepulse_warn_event")) && GetLastError() != ERROR_ALREADY_EXISTS) {
+ FIXME_(winediag)("Winepulse is not officially supported by the wine project\n");
+ FIXME_(winediag)("For sound related feedback and support, please visit http://ubuntuforums.org/showthread.php?t=1960599\n");
+ } else {
+ WARN_(winediag)("Winepulse is not officially supported by the wine project\n");
+ WARN_(winediag)("For sound related feedback and support, please visit http://ubuntuforums.org/showthread.php?t=1960599\n");
+ }
-----

Here is the commit in which that comment was added: http://repo.or.cz/w/wine/multimedia.git/commit/8cb901e61446bd469f89de936133d2918fedbfd1

Revision history for this message
In , Alexey Loukianov (lexa2) wrote :

(In reply to comment #349)
> .. and it was certainly Maarten who recently added the following
> comment to his v16 version of the winepulse patch:
>

Argh, bad luck then :-(. Hope it isn't a final resolution for this path, as PA, being a plague of a modern linux desktop, seems to be one of the things that Wine would have to cope with.

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

(In reply to comment #350)
> Argh, bad luck then :-(. Hope it isn't a final resolution for this path, as PA,
> being a plague of a modern linux desktop, seems to be one of the things that
> Wine would have to cope with.

Indeed, and I have argued the same in this discussion. Unfortunately for us end-users, the Wine leadership seems to think that denying the prevalence of Pulseaudio is the best solution.

Revision history for this message
In , Andrew Eikum (aeikum) wrote :

(In reply to comment #351)
> the Wine leadership seems to think that denying the prevalence of
> Pulseaudio is the best solution.

Nope. This stuff is hard and requires careful development and testing to create as few regressions as possible. We really wanted the ALSA->PulseAudio path to work, and we tried very hard to make it work for everybody. Trust me, we know about the prevalence of PulseAudio: we spent months trying to work around bugs in alsa-plugins, and the ALSA driver is full of hacks as a result.

Unfortunately, it turns out that alsa-plugins isn't robust enough for Wine's purposes. Because of the complexity of this problem and the large increase in work required to maintain yet another driver, we take the process of adding a new driver very seriously.

It has become clear that we need a PulseAudio driver, and one will get in eventually. Please continue to be patient as we work towards a solution that is acceptable for Wine. I promise there is active work being done on this.

Revision history for this message
In , Gilboa Davara (gilboad) wrote :

(In reply to comment #352)
> Please continue to be patient as we work towards a solution that is
> acceptable for Wine. I promise there is active work being done on this.

Thanks for the update.

- Gilboa

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

(In reply to comment #352)
> (In reply to comment #351)
> It has become clear that we need a PulseAudio driver, and one will get in
> eventually. Please continue to be patient as we work towards a solution that is
> acceptable for Wine. I promise there is active work being done on this.
Thanks Andrew. You might want to tell Maarten that, however, as he seems to be under the impression that hope is lost and that the only way to keep his work from being wasted is to take it directly to the community.

Revision history for this message
In , Austin English (austinenglish) wrote :

(In reply to comment #354)
> (In reply to comment #352)
> > (In reply to comment #351)
> > It has become clear that we need a PulseAudio driver, and one will get in
> > eventually. Please continue to be patient as we work towards a solution that is
> > acceptable for Wine. I promise there is active work being done on this.
> Thanks Andrew. You might want to tell Maarten that, however, as he seems to be
> under the impression that hope is lost and that the only way to keep his work
> from being wasted is to take it directly to the community.

Maarten is aware, the issue was discussed in more depth on IRC.

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

(In reply to comment #355)
> (In reply to comment #354)
> > (In reply to comment #352)
> > > (In reply to comment #351)
> > > It has become clear that we need a PulseAudio driver, and one will get in
> > > eventually. Please continue to be patient as we work towards a solution that is
> > > acceptable for Wine. I promise there is active work being done on this.
> > Thanks Andrew. You might want to tell Maarten that, however, as he seems to be
> > under the impression that hope is lost and that the only way to keep his work
> > from being wasted is to take it directly to the community.
>
> Maarten is aware, the issue was discussed in more depth on IRC.

According to Maarten, you are mistaken: apparently the latest version of his patch has been rejected out of hand with no consideration whatsoever. I find this news to be rather concerning, as is the fact that nobody seems to be on the same page about the situation.

Revision history for this message
In , Kamal Mostafa (kamalmostafa) wrote :

I'm reporting that Maarten's PulseAudio patch as installed from https://launchpad.net/~ubuntu-wine/+archive/ppa cures my Guild Wars audio problem.

[ Ubuntu 11.10 or 12.04 amd64, Wine 1.4 or 1.5, Creative Labs SupremeFX X-Fi ]

Without Maarten's patch my Guild Wars audio stops abruptly (and stays off) after a few seconds to a few minutes. With Maarten's patch, Guild Wars audio through PulseAudio works just fine.

Revision history for this message
In , Gilboa Davara (gilboad) wrote :

I can confirm that Maarten's patch is working as advertised.

- Gilboa

Revision history for this message
In , Cheako+winehq (cheako+winehq) wrote :

I was looking over the winealsa driver and it has code for PA. A winealsa driver that's more in touch with hw drivers would be appreciated. I'm not saying I know there would be a huge effect, I'm just saying having hacks for a specific ALSA driver was a bad idea in the first place and should have been rejected. It goes against how ALSA was supposed to be used and I'm sure it causes problems of it's own.

My I ask that the current alsa driver be copied to alsa-old when/if the pulse driver is included, leaving the alsa driver ready to be pruned and optimized for the new world order.

I'd also like to see the winealsa driver actually pasuspend on it's own! I've been looking for the trick to discovering if this sink makes used of pulse and I see code in winealsa that does something close to this and the code to perform this action is already in this bug.

The rational behind this is that it let's wine's configuration system configure this, I.E. on prefix for apps that use ALSA hw and another for apps that use pulse. As an alternative wrapper scripts would have to be managed and used and this is not ideal.

Revision history for this message
In , Removed by request (removed1836289) wrote :

*** Bug 30640 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dimesio (dimesio) wrote :

*** Bug 30779 has been marked as a duplicate of this bug. ***

Revision history for this message
In , puchuu (aladjev-andrew) wrote :

please just merge Maarten's patch to master. users want to play skyrim with pulseaudio!

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

I'd like to report as well that Maarten's patch used by Ubuntu Wine Team on launchpad actually fixes every sound issue I was experiencing, and it actually allows me not to worry about restarting pulse and wine every 30 minutes or so... And I'm somehow getting better overall performances too

Revision history for this message
In , DisDis (igor-demyanov) wrote :

I confirm. "Ubuntu Wine Team" deb package works great.

Revision history for this message
In , Cephryx (cephryx) wrote :

Confirmed. Dota2 stopped crashing after installing wine 1.5.5-0ubuntu1~ppa1~precise1+pulse17 from the "Ubuntu Wine Team"'s PPA, instead of using wine1.4. This is actually awesome!

Revision history for this message
In , Lt73 (lt73) wrote :

(In reply to comment #364)
> I confirm. "Ubuntu Wine Team" deb package works great.

Agreed. This works great on Gentoo with wine-1.5.6. I was able to have wine Rhythmbox and Mumbler all go through wine and mix properly.

winedevs, why was this patch rejected?

Revision history for this message
In , Removed by request (removed1836289) wrote :

(In reply to comment #362)

Andrew Aeikum has been working on getting Maarten's patch merged. Latest version is here:

http://source.winehq.org/patches/data/87234

Revision history for this message
In , puchuu (aladjev-andrew) wrote :

(In reply to comment #367)
> (In reply to comment #362)
>
> Andrew Aeikum has been working on getting Maarten's patch merged. Latest
> version is here:
>
> http://source.winehq.org/patches/data/87234

thanks! this works perfect. Do you know will wine team merge this patch into master in future?

Revision history for this message
In , Dan Kegel (dank) wrote :

Probably, since they have Andrew working on it, but there's no way to tell when it will be ready to go in.

Revision history for this message
In , Alexandre Rostovtsev (tetromino) wrote :

Apparently http://source.winehq.org/patches/data/87234 is now considered to be obsolete; http://repo.or.cz/w/wine/multimedia.git should be used instead.

> Date: Sat, 13 Oct 2012 00:46:08 +0200
> Subject: update wine pulse patch please
> From: Maarten Lankhorst <email address hidden>
> To: <email address hidden>
>
> I saw your ebuild still making mention of aeikum's ancient pulse patch, written
> in response to my original, unupdated patch, it's not the correct one and lacks
> proper pulseaudio support (technical problems).
>
> Please consider pulling http://repo.or.cz/w/wine/multimedia.git and leaving out
> all commits after 'valgrind prevent crash hack', the rtkit ones specify audio
> thread priority better, dsound has some love to make it work better against
> pulse, and winmm is changed to fall back to alsa midi if pulseaudio is used.
>
> The git tree usually gets updated on the same day or the day after a release,
> but only if the patch series fails to apply. :-)

Revision history for this message
In , Hverbeet (hverbeet) wrote :

(In reply to comment #370)
> Apparently http://source.winehq.org/patches/data/87234 is now considered to be
> obsolete; http://repo.or.cz/w/wine/multimedia.git should be used instead.
>
Well, neither of those will result in a build of Wine that can be supported by us. That's a distribution's own responsibility of course, up to a point, but please do take that into account when applying custom patches. When patches aren't in upstream Wine there's usually a good reason, certainly beyond what people sometimes perceive as "Wine hates PA".

As for the mail you received, Maarten Lankhorst has made it fairly clear that he doesn't agree with the way the Wine development process works. That's his good right, but at this point he isn't really associated with the Wine project anymore, at the very least not in the role of audio maintainer. In the mail you received he's speaking as the author of http://repo.or.cz/w/wine/multimedia.git, not on behalf of the Wine project.

Revision history for this message
In , Alexandre Rostovtsev (tetromino) wrote :

(In reply to comment #371)
> Well, neither of those will result in a build of Wine that can be supported by
> us. That's a distribution's own responsibility of course, up to a point, but
> please do take that into account when applying custom patches.

Fair enough - but source-based distributions have some flexibility here because they can give users a choice about what goes into the build. Gentoo's wine package, for example, enables the unofficial pulseaudio support for those users who have the pulseaudio USE flag enabled.

Revision history for this message
In , Dainius 'GreatEmerald' Masiliūnas (pastas4) wrote :

So, what is the progress on this from the official Wine side? Is it still being worked on, as mentioned in Comment 369?

Revision history for this message
In , Maarten Lankhorst (mlankhorst) wrote :

I've tried to stay clear of political discussions, sigh..

The main reason it was not accepted was that julliard chose not to even review my patches, so how am I supposed to get it merged in mainline then?

I'm willing to rework the dsound patches to a cleaner state, and resend both them and winepulse though if wine devs are finally willing to review it instead of letting it rot in the patch list until it falls off. The main reason it's out of tree is that wine never chose to accept it in the first place.

The only 'review' I got was from Dmitry Timoshkov, see:
"> Date: Thu, 28 Apr 2011 09:45:18 +0200"
"You forgot to fix the date, 1 Apr would be more appropriate I'd guess."

http://www.winehq.org/pipermail/wine-devel/2012-February/094459.html

Revision history for this message
In , Hverbeet (hverbeet) wrote :

(In reply to comment #373)
> So, what is the progress on this from the official Wine side? Is it still being
> worked on, as mentioned in Comment 369?
Afaik Andrew is still working on this, but he has other work to take care of as well.

(In reply to comment #374)
> I've tried to stay clear of political discussions, sigh..
I'm not sure why you're trying to start one here then.

> The main reason it was not accepted was that julliard chose not to even review
> my patches, so how am I supposed to get it merged in mainline then?
You've made it clear you're not willing to work within the current Wine development process. I don't think it's unreasonable for us to avoid wasting time reviewing your patches in that case.

> The only 'review' I got was from Dmitry Timoshkov, see:
> "> Date: Thu, 28 Apr 2011 09:45:18 +0200"
> "You forgot to fix the date, 1 Apr would be more appropriate I'd guess."
>
> http://www.winehq.org/pipermail/wine-devel/2012-February/094459.html
That certainly wasn't the only comment you got, but regardless. The relevant context there was of course that you submitted a huge patch about a week before Wine 1.4 was released, when we were deep in code freeze. Of course nobody is going to take you seriously then.

Revision history for this message
In , Removed by request (removed1836289) wrote :

(In reply to comment #375)
Not to go into politics, but code freeze or not this comment is still inappropriate, and sounds more like "Not a chance in hell this will ever see the light of day" than "What are you thinking, submitting this now".

Regardless of the official position of Wine as a project, there are Wine developers who are simply against pulse and this is reflected in the attitude displayed towards the efforts put into the winepulse driver.

Take it like this: If pulse frustrates you, think how frustrating it must be to write a driver for it.

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

Many people who tried Maarten's winepulse can testify how well it works. Even if there'd been some misunderstandings in the past, he put much effort in his work, in an area where upstream wine's progress was non existent. Face it, "supporting" pulse via alsa-plugins is just not viable, it didn't work well in the past and it surely isn't working well now, winepulse is surely a better, fully functional alternative. Also, "use alsa instead of pulse" is just a way to avoid the issue which has been carried on for too long ( look when this all started: "2007-11-18 12:47:22 CST" ), most distros now ship with pulseaudio and sometimes getting alsa to work instead of it can be too difficult for a newbie user ( asound.conf, anyone? ).
Many things have been said in the past, but now wine 1.4 is out, there is no code freeze... Can't you give eachother another chance and try to work together, now that there aren't any real reasons not to review winepulse? Stubborness, on any side, doesn't get wine good pulse support...

Revision history for this message
In , Alexander Schmidt (voidcastr) wrote :

IMO, given the facts that

- a huge part of wine's users intend to run windows applications comprising audio output with it (particularly games)

and

- PA-focused distros like Ubuntu and its derivates have an enormous market share, attracting an increasing number of users to the linux world,

supporting PA should definitely not be considered a matter of personal preferences or taste (Thereby I do not assume or imply that anybody does so).

Granted, PA is not the best sound server out there and the trouble it brings probably even outruns the benefits. Nevertheless it is being incorporated into a wide spectrum of distros, i.e. employed by a vast user base... and AFAIK there are no indications that this might change in the near future. So this is not just a temporary fashion but rather a part of the contemporary reality of wine use cases.

If I understand wine's goals correctly, they incude striving for the best possible out-of-the-box experience for most of its users. Given that this is the case, this goal is endangered by not adding PA support at least in the long term. Though, once more, I do not imply anyone blocking efforts in this context -- this is purely hypothetical.

So, as long as it does not break anything else, adding a *clean* and *structured* implementation of a PA driver to wine does no harm -- will it? However and doublessly, established wine development paradigms MUST be maintained in doing so. Anything else would be fatal in the context of such a huge project, in which the methods and practices of the leading devs have indeed turned out to be very successful.

But this is just my personal opinion... I hope it's helpful to anybody, providing food for thought.

At least I'm quite sure about this: There are many users out there thinking something like "my audio is not working properly when running my windows apps with wine -> linux is crap"... They'd be glad if you guys could somehow reconcile. :)

Or, to put it a little more direct and to pick up what Maurizio said above, stubbornness -- on any side -- has never gotten anyone anywhere. Especially not among apparently able developers.

Revision history for this message
In , beroal (beroal) wrote :

Is there any chance of publishing audio driver interface? Then Maarten Lankhorst can work independently of the Wine team.

Revision history for this message
In , Maarten Lankhorst (mlankhorst) wrote :

(In reply to comment #374)
>> The main reason it was not accepted was that julliard chose not to even review
>> my patches, so how am I supposed to get it merged in mainline then?
> You've made it clear you're not willing to work within the current Wine
> development process. I don't think it's unreasonable for us to avoid wasting
> time reviewing your patches in that case.
Please don't let facts get in the way.
http://www.winehq.org/pipermail/wine-patches/2012-March/111968.html
"I no longer expect it for v1.4, but hopefully post 1.4 it will be included"

> The only 'review' I got was from Dmitry Timoshkov, see:
> "> Date: Thu, 28 Apr 2011 09:45:18 +0200"
> "You forgot to fix the date, 1 Apr would be more appropriate I'd guess."
>
> http://www.winehq.org/pipermail/wine-devel/2012-February/094459.html
That certainly wasn't the only comment you got, but regardless. The relevant
context there was of course that you submitted a huge patch about a week before
Wine 1.4 was released, when we were deep in code freeze. Of course nobody is
going to take you seriously then.

See above.

Revision history for this message
In , Hverbeet (hverbeet) wrote :

(In reply to comment #380)
> (In reply to comment #374)
> >> The main reason it was not accepted was that julliard chose not to even review
> >> my patches, so how am I supposed to get it merged in mainline then?
> > You've made it clear you're not willing to work within the current Wine
> > development process. I don't think it's unreasonable for us to avoid wasting
> > time reviewing your patches in that case.
> Please don't let facts get in the way.
> http://www.winehq.org/pipermail/wine-patches/2012-March/111968.html
> "I no longer expect it for v1.4, but hopefully post 1.4 it will be included"
>
That's a different mail than the one Dmitry responded to.

Anyway, I'm not interested in discussing the how and why of the situation further with you, it's pointless. If you want to think the reason your patches got rejected is because the Wine project is full of unreasonable people that's fine, for all I care. I just want to make a couple of things clear for everyone else:
  - http://repo.or.cz/w/wine/multimedia.git is unlikely to ever be included in upstream Wine.
  - You're not speaking on behalf of the Wine project when you're asking distributions to include http://repo.or.cz/w/wine/multimedia.git in their Wine package.
  - Andrew is still working on a PulseAudio driver, it will get there eventually. Doing things right takes time and effort.

Revision history for this message
In , Maarten Lankhorst (mlankhorst) wrote :
Download full text (6.3 KiB)

Oh fine, have the whole story as far as I know it.

And before I start, I have nothing against any person named in here, just think the process of accepting patches could see some improvement. This is from my point of view, and from memory, so it may not actually have happened as I claim it to be, since I don't have a perfect memory, and I'm biased.

If I had to guess, this all goes back to winegstreamer in 2010, I was working on that and had the core code ready where gstreamer plugins could be used as a replacement for certain codecs wine was missing. The code itself was not perfect of course, but that was not the real reason for its rejection. I needed some code from dlls/quartz to make it work, but it was impossible to share code between since there had to be common code. Unfortunately without much more than terse feedback, I didn't know how to work on it and Aric Stewart was working on that instead. I said before he started working on it that the winegstreamer code was nearly ready, but the work on strmbase (common code) took a lot of effort. So in 1 way I was right, but the work on the common code caused a lot of delay, so in another way I was completely wrong. As you can see from git log dlls/winegstreamer, there have been a few fixes and some development to implement qos (frame dropping), but that was to be expected as more people started using it. The code is probably more complicated than it had to be, since I tried to act like the

Andrew Eikum was assigned to work on replacing the sound system for mmdevapi from the old openal based one which I was responsible for, and didn't turn out to be a good match for mmdevapi. Yes this was completely my fault, but I did think at the time, and still do, that openal-soft is really nice to have to replace our crappy dsound implementation with. Fortunately it's still possible, since the author of openal-soft added an extension so that we can use openal-soft to mix sound, but use our own sound system for playing the mixed sound. But I degress.

While the switching of audio stacks to mmdevapi was still in progress, I tried to do some work to convert dsound to mmdevapi too. But can't remember why it was not accepted, somewhere around april 2011. Around this time I also started to work on the winepulse mmdevapi driver, which was originally meant so I would have sound in the 2 games I played at the time, but not with enough quality to be used further. I always intended to get it done right since I already knew that winealsa + alsa-pulse would never work right for pulseaudio. I then took a break from wine, still sometimes sending patches but I didn't keep the git tree mentioned synced with my local tree, and I mostly used wine as a user, not as a dev.

Somewhere in januari or februari 2012 I noticed that there was interest in pulseaudio support again, and that wine finally accepted that winepulse just had to happen. So I did what I always intended to do, and cleaned up my winepulse patch. The
final version I submitted was nothing like the earlier versions, I completely reworked the capturing to be packet based like the mmdevapi tests indicate, and rendering I used the pulseaudio callbacks, so that whe...

Read more...

Revision history for this message
In , Andrew Eikum (aeikum) wrote :

Maarten, you have to understand that your reputation with the project is not very good right now. You didn't do anything to improve it by sending huge patches during code freeze and submitting a git-pull request when you know that isn't how Wine code submission works. No one is interested in reviewing a 3 kLOC patch from someone with a bad reputation.

This is why I asked you on IRC to work on improving your reputation first. As I've said, I'm happy to review reasonable-sized patches and ask that they be committed. You have to show that you're willing to work with the project, even the parts of it that you don't like, to have the trust level required for being responsible for important parts of the code.

(In reply to comment #382)
> I'm willing to resubmit the whole patch series of multimedia.git.

This is the problem. It takes a lot of trust to accept huge, difficult-to-review patch series. Start small and simple (I think you said you have dsound improvements?) and build up from there.

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

I know I'm just a user and I probably don't understand much of wine's developement, but Maarten put a lot of effort into a patch that fixes an issue ( or a serious lacking, up to you ) that wine'd had for 5 years now, shouldn't that be enough to prove himself to the devs' team? At least take a look at his work, everybody who tested it can say how well it works, and it's surely better than the other pulse patch around. Heck, it even makes games run smoother now that alsa/pa don't hog the cpus anymore.
Even if you still don't trust him, or if he committed some errors in the past, you have to face the actual situation: years ago pulseaudio was considered ( by some ) to be the future of sound management for linux, writing a driver for it was pretty much a gamble, especially since wine already had a ton of other drivers that could work with pa. Right now though, pa is the default on many distros, including the most popular ones, and it's actually been like that for a couple of years. How much longer will this have to carry on? Wine's support for pa should be a must right now, sticking with alsa is just not viable anymore ( you don't believe me? Check how many distros ship a patched wine with pa support ), and waiting for Maarten to "prove himself worthy" by doing unrelated work will just push back this necessary feature for how much? Months? Years? Even worse, the other pa patch could be included in wine before that, the one with many sound issues and that still causes cpu spikes, and that'd just make harder ( if not impossible, or "not worth it" ) to include the only working pa support we have right now.
Seriously, at least take a look at his work and give some technical reasons why you don't want to include it in upstream wine, else it'll keep looking like you just don't care about pa for personal reasons, as I ( and probably other people ) think. It's really time to catch up with the present.

Revision history for this message
In , Dainius 'GreatEmerald' Masiliūnas (pastas4) wrote :

As a user, I also agree that the patch should be reviewed. I have yet to see a valid reason for not reviewing the patch - it having been submitted while in code freeze has no relevance to the code itself, and while the size of the patch might mean that it will take a while to review, it is still better to do that sooner rather than later. It does not look like the patch is going to get smaller any time soon.

Of course, if there is something that Maarten can do to make the process easier - like splitting the patch into modular pieces - I would imagine it would be appreciated.

Revision history for this message
In , Pulseaudio (pulseaudio) wrote :

It's alright, it will happen eventually. The wine devs have gone through the denial phase (Pulse is "not capable", it's not shipped by default on "most distributions", "ALSA compatibility is a better solution" somehow). They're just finished the anger phase (completely badgering Maarten and his work). Now they're finally in the bargaining phase ("build some reputation again and maybe we can talk") where we can start making some progress.

It's a shame that the only basis the wine devs have to reject the patch any longer is based on "reputation issues" rather than actual technical arguments. There may have been some in the past, and now there isn't anymore so they're still struggling to find reasons to reject the patch in order to preserve the reality they've built for themselves over the entire 1,794 days during which this bug has been open. It's normal -- it's simply a defence mechanism; they don't want their own reality to crumble down, so they rationalize away their reasoning, which deep down they know to be flawed, but they convince themselves that it's not.

They'll get over it eventually, it will just take some more time. Until then, we as users should just keep using patched Wine releases and patiently wait for them to come out of their comfy artificial shell.

Now, one of three things is going to happen: Either they will simply ignore this post despite knowing it to be true, either they'll cherry-pick one or two statements and provide non-technical arguments as to why they don't stand (and somehow, refuting that subset of the post invalidates the entire post), or maybe (just maybe!) they'll see things for what they really are and actually start working *with* Maarten (and, by extensions, most users of Wine) instead of *against* Maarten.

I wish Maarten the best of luck in his work and his interactions with the Wine devs. I also want to express my appreciation towards his work, without which Wine would simply not be usable at all for me.

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

Yet another user chiming in here (how many will it take?):

I see no mention here of technical objections to Maarten's work; in fact, it sounds as if the Wine development team turned their noses up at it without even looking it over. So Maarten committed a faux-pas by submitting his patch at a bad time; is this ***really*** such a harsh crime that you are doing right by the end-users in punitively ostracizing him? Seriously?

This all looks like more of the same silly bureaucratic/political posturing to me that we've been seeing here all along, which is a huge disservice to us end-users who are still waiting for this major 5-year-old issue to be properly resolved. You should be ashamed of yourselves for acting so self-righteous, both at the expense of us end-users and as an insult to the greater spirit of collaborative open-source software development.

My advice is to have Andrew stop wasting time reinventing the wheel, and at least review Maarten's work and collaborate with him to work through any issues prior to merging. We all know that Maarten has a very mature patch that is already being field-tested by hundreds (at least) of end-users, and he has been very eager for and responsive to feedback. We're not being fooled into thinking that Maarten or his work should be shunned.

Revision history for this message
In , Dan Kegel (dank) wrote :

This is not a user forum. User comments in here aren't especially helpful.

Revision history for this message
In , Aigars Mahinovs (aigarius) wrote :

While as a fellow developer I understand the point of core Wine developers of not accepting large and complex patches who, by previous experience, is unlikely to be there to maintain it in the future, thus putting the maintenance burden of this new code on the very same core Wine devs, ...

... at the same time considering the time frame of the bug, importance of the bug to a large fraction of Wine users and the fact that the solution is already well tested and used by most users of distribution packages, IMHO core developers should bite the bullet and try to review this code on its technical merits and have one of the core devs take over the responsibility for the patch, its further development and inclusion into core.

Continuing to keep this out-of-tree is guaranteed to keep the annoyance going for all parties involved.

Revision history for this message
In , Emerson Prado (emerson-prado-eng) wrote :

Aside from political stuff, I guess we all agree we need traction in this feature.
If I got it correctly, Maarten has a fully functional patch, but it can't be reviewed because of its size and non-technical reasons already enough discussed. Also, Andrew seems to be working on the same thing, but apart from Maarten, having unnecessary additional work.

So there are two steps needed:
1.Small, punctual patches from Maarten, which can be reviewed one at a time, be accepted and improve both Pulse support state and Maarten reputation. Maarten said he already worked in splitting the patch before, so there's already a way to go.
2.Willingness from Wine devs to review Maarten patches. Andrew already said that's OK, so no issue.

Is that road possible? Is there help needed?

Revision history for this message
In , Maarten Lankhorst (mlankhorst) wrote :

@comment #283

We shall see about that willingness..

I posted some patches on mailing list to knock some sense into the dsound mixer, pending moderation, and I have 3 more patches locally when those get accepted, one to make DSOUND_ReopenDevice never fail halfway any more no matter the error and save a copy in mixing to non-float, another to fix DSOUND_WaveQueue, and another to remove device->state.

In my local tree (patched with rtkit and winepulse) I could run dsound with 1 ms total queue latency, and there were not enough underruns to fail the interactive dsound tests. Of course there were still some, but I didn't disable my cpu's higher C-states, plus the latency itself is so ridiculously low that it's really only meant for testing.

@comment #289

No, I've been actively maintaining it in ubuntu-wine ppa, updating it every 2 weeks, and fixing bugs when people report them.

Revision history for this message
tom (tasker) wrote :

Set

default-fragments = 8
default-fragment-size-msec = 5

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

So, it's been a month since the last update about this... How are things going? Will winepulse make it into upstream? Has there been an actual collaboration between Maarten and the devs?
Also, just for the record: http://www.phoronix.com/scan.php?page=news_item&px=MTIxOTg
By the way, I think this should be changed to major, since the lack of sound in most (if not all) applications should be probably considered a "major loss of functionality for a wide range of applications"

Revision history for this message
In , Austin English (austinenglish) wrote :

(In reply to comment #392)
> So, it's been a month since the last update about this... How are things going?
> Will winepulse make it into upstream? Has there been an actual collaboration
> between Maarten and the devs?

Patches have been sent, people posted reviews/comments. E.g.,:
http://www.winehq.org/pipermail/wine-devel/2012-October/097482.html
http://www.winehq.org/pipermail/wine-devel/2012-October/097485.html
http://www.winehq.org/pipermail/wine-devel/2012-October/097486.html
http://www.winehq.org/pipermail/wine-devel/2012-October/097487.html
http://www.winehq.org/pipermail/wine-devel/2012-October/097602.html
etc. (check http://www.winehq.org/pipermail/wine-devel/2012-October/ and look for dsound).

One of the patches was resent yesterday:
http://www.winehq.org/pipermail/wine-patches/2012-November/119914.html

> Also, just for the record:
> http://www.phoronix.com/scan.php?page=news_item&px=MTIxOTg
> By the way, I think this should be changed to major, since the lack of sound in
> most (if not all) applications should be probably considered a "major loss of
> functionality for a wide range of applications"

Check the first comment, it's a feature request => enhancement.

Pulseaudio is supposed to be compatible with ALSA, which Wine already supports, and sound does work for a lot of use cases.*

*Note: This is not meant to restart the debate about Pulseaudio/Wine/etc. I'm explaining why, as a bugzilla admin, I'm not marking it major.

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

(In reply to comment #393)
> Patches have been sent, people posted reviews/comments. E.g.,:
Thanks a lot for the info!

(In reply to comment #393)
> Check the first comment, it's a feature request => enhancement.
>
> Pulseaudio is supposed to be compatible with ALSA, which Wine already supports,
> and sound does work for a lot of use cases.*
>
> *Note: This is not meant to restart the debate about Pulseaudio/Wine/etc. I'm
> explaining why, as a bugzilla admin, I'm not marking it major.
Sounds fair, but since it's been 5 years since that post, I thought it was worth asking :p

Revision history for this message
In , Phoenix-g (phoenix-g) wrote :

Is there any progress on pulseaudio support?

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

I was waiting to ask this as well... Since wine 1.6 is out now, will winepulse be one of 1.8's goals? I haven't seen many references to this on the mailing list either lately

Revision history for this message
In , Austin English (austinenglish) wrote :

(In reply to comment #396)
> I was waiting to ask this as well... Since wine 1.6 is out now, will winepulse
> be one of 1.8's goals? I haven't seen many references to this on the mailing
> list either lately

The patch was last sent before the code freeze, back in May:
http://www.winehq.org/pipermail/wine-patches/2013-May/124406.html

it hasn't been sent since the code freeze ended.

Changed in wine (Ubuntu):
assignee: nobody → Maarten Lankhorst (mlankhorst)
status: Triaged → Fix Released
Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

Just a friendly reminder, but after another 4 months of waiting, how is this being handled? Is pulseaudio support still considered trivial/unneeded, although it's mandatory on some systems (eg. those on which a good/easy way to control audio streams is needed)?

I'd also like to add that using the wine-multimedia git repository (the one with the pulseaudio driver) I'm not experiencing this gstreamer related bug: http://bugs.winehq.org/show_bug.cgi?id=30557

Revision history for this message
Scott Ritchie (scottritchie) wrote :

I'm not sure this should be a pulseaudio bug in launchpad anymore.

Changed in pulseaudio (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Ben Shadwick (benshadwick) wrote :

I guess if it's been satisfactorily addressed on the Wine side, then it should be okay.

Revision history for this message
In , kotoroshinoto (mgooch) wrote :

Predictions made by <email address hidden> (Martin Jürgens ) on "2007-11-18 13:13:06 CST" are basically already true today. Many distros have switched to using pulse audio as their default-shipped audio system, and many things have audio issues on these distros when run in wine, DESPITE the distros patching in winepulse support (that outside devs had to create because wine devs couldn't be bothered).

The reality of the situation is that pulse is not completely back-compatible to alsa,and this creates problems that could potentially be avoided by wine. It might be pulseaudio's fault, but defining where blame lies isn't important, a functional application that doesn't require extensive user intervention IS. You guys really ought to get on top of this sooner rather than later.

Revision history for this message
In , Dimesio (dimesio) wrote :

(In reply to Michael Gooch from comment #399)

> audio issues on these distros when run in wine, DESPITE the distros
> patching in winepulse support (
>

Doesn't that just prove that a winepulse driver is NOT the answer to the audio problems some users still have?

Revision history for this message
In , kotoroshinoto (mgooch) wrote :

(In reply to Rosanne DiMesio from comment #400)
> (In reply to Michael Gooch from comment #399)
>
> > audio issues on these distros when run in wine, DESPITE the distros
> > patching in winepulse support (
> >
>
> Doesn't that just prove that a winepulse driver is NOT the answer to the
> audio problems some users still have?

It certainly proves that having a solution cooked up by the distro package managers isn't a proper solution.

However, asking users to disable winepulse and go through considerable configuration to avoid the audio stutter isn't really a solution either, its a hack around a problem that hasn't been solved. It also stands a very good chance of causing issues in non-wine apps if the OS or other apps expect pulse to still be configured according to release-specs and develop accordingly.

If the compatibility were wine-native instead of hacked in, theres a chance the wine devs' way of doing it would be far more efficient and better coded for the way wine works as they have a better knowledge of the wine backend than the distro package managers do.

Wine should just work, out of the box, without breaking in unexpected ways that force users to dredge the internet looking for configuration options to fix their system around this bug. If this were just a small number of relatively obscure distros i'd understand the thinking, but the major distros have made this switch, and wine now has to make a choice in how they're going to adapt to it. So far, they haven't adapted at all.

If you want to try to influence the various distros to dump pulse I'd support that idea, but chances are they're not going to.

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

(In reply to Rosanne DiMesio from comment #400)
> (In reply to Michael Gooch from comment #399)
>
> > audio issues on these distros when run in wine, DESPITE the distros
> > patching in winepulse support (
> >
>
> Doesn't that just prove that a winepulse driver is NOT the answer to the
> audio problems some users still have?

Following this logic, Wine is not the answer to run programs not natively ported on Linux, and it should've been dropped years ago.
This doesn't have to be perceived as criticism towards Wine of course, since it has improved greatly since it actually required a lot of work to make simple programs work on it. In fact, Wine is a good example of how something buggy can become more and more stable when people keep working on it... Wonder what would've have happened if the majority of its developers would've just said "screw developing Wine, just dual boot Windows" and dropped coding Wine.

Like it or not, Pulseaudio is a reality now (it has actually been such for quite a few years), and it is time to actually deal with it. Also, I'd like to note that alsa's support for pulse has always been buggy, and has made little to none improvement in the last years, at least not where it matters or enough to let wine provide a working, continuous and appreciable sound output. I understand it takes less effort to say "blame alsa-plugins, not us" than maintaining a proper pulse driver, but you actually already have some people who'd do that for you.

Also, please, stop pretending that at this point Pulseaudio can be dropped in favor of alsa. Doing that implies the loss of a good deal of features which may actually be essential to some users, and it is also quite foolish to suggest user to do so. What's the point of Wine becoming more stable and needing less and less tweaks to make programs run on it, when users would still have to do a good deal of tuning to force alsa into their systems (as long as it is still possible)?

Winepusle is buggy, yes, but it offers far better support to audio output than wine's alsa driver is doing right now. It's not perfect, indeed, but at least it offers FUNCTIONAL audio output. To be fair, I can't see how the issues that the current alsa driver is causing (from stuttering audio to the complete lack of it, passing through random and loud ear-unfriendly noises) isn't seen as a major (if not critical) bug, causing a good loos of functionality.

What's the point right now to keep winepulse out of Wine? It isn't doing worse than winealsa is, it'll make some people stop complaining, it'll save time for several packagers... And it wouldn't even mean the removal of winealsa, for those who don't want Pulseaudio on their system.

Please, just hear the users who have posted on this bug report since 2007: at first it was just a feature request, but as years passed it become something more, something necessary due to the evolution course of most Linux distros.

Revision history for this message
In , Ben Shadwick (benshadwick) wrote :

While I agree, there's sadly no point in arguing. The Wine devs are so irrationally close-minded about this issue that they even resorted to semi-personal attacks against people attempting to provide winepulse audio drivers and citing of silly procedural issues as an excuse to avoid having to incorporate fixes.

It's always sad and frustrating to see open source projects be so insensitive to the concerns of end-users, but when people go so far as to contribute actual code changes and still be rejected out of hand, there's just nothing to be done.

Situations like this are what cause a lot of projects to fork, which is the worst way for things to work themselves out because it causes the community to split their efforts.

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to Ben Shadwick from comment #403)
> The Wine devs are so irrationally close-minded about this issue

OK, stop there before this descends into a flame-war.

> citing of silly procedural issues as an excuse to avoid having
> to incorporate fixes.

Those "procedural issues" relate to code quality and cooperative functionality with other modules. Winepulse is not up to scratch.

> It's always sad and frustrating to see open source projects be so
> insensitive to the concerns of end-users, but when people go so far as to
> contribute actual code changes and still be rejected out of hand, there's
> just nothing to be done.

I've been out of the loop for a while, but last time I was actively commenting on this bug Wine devs were planning an architectural change in the way audio drivers work. Even before that, they were hesitant to include ANY new audio drivers because the existing framework employs a lot of code duplication.

> Situations like this are what cause a lot of projects to fork, which is the
> worst way for things to work themselves out because it causes the community
> to split their efforts.

The only people to have successfully forked Wine are Codeweavers (Crossover Office et al) and that's only because they work closely with Wine devs. It's a huge project. Every bugfix is like a pharmaceutical drug: it may fix a problem, but will almost certainly have unforseen side-effects.

One of my major objections to the existing Winepulse code is that it seems to completely ignore MIDI support. Even without the other hurdles to inclusion, an audio driver simply would not be considered if it will completely break applications that ask for MIDI.

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

(In reply to Ben Klein from comment #404)
> One of my major objections to the existing Winepulse code is that it seems
> to completely ignore MIDI support. Even without the other hurdles to
> inclusion, an audio driver simply would not be considered if it will
> completely break applications that ask for MIDI.

Although that is a major flaw on winepulse's part, it is something that can be implemented (especially if more people can would work on it upstream), and the same goes for any other other feature. The current winealsa, on the other end, has to rely on a (bugged and not reliable, as it has proven itself) third party plugin to provide any audio output on most current distros, and it can't really be tweaked according to wine devs' desires.

That doesn't count at all? Or is someone actively working on a better solution to this 8 years old problem?

Revision history for this message
In , Austin English (austinenglish) wrote :

Bugzilla is not for discussion, as has been pointed out, e.g., http://bugs.winehq.org/show_bug.cgi?id=10495#c251.

Please take the discussion somewhere else.

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

(In reply to Austin English from comment #406)
> Bugzilla is not for discussion, as has been pointed out, e.g.,
> http://bugs.winehq.org/show_bug.cgi?id=10495#c251.
>
> Please take the discussion somewhere else.

To avoid further discussion in this bug report, which seems to come back to life every so often, could you (Wine's staff) set up a place where it can be held, and where devs would actually give us (wine users) some kind of information about this issue? Mailing lists aren't so easy to follow when one doesn't have the time to dig through it all (I may be wrong, but the newest information regarding winepulse on wine-devel is months old), and having someone rationally explaining why winepulse is being kept away from upstream (in a non-wiki form, where users could actually ask questions and explain their perplexities and needs, and where they'd be able to hear actual devs explaining the technical difficulties, with a real interaction between the two) would prevent this bug report being flooded, AND it could also help to improve the general opinion of Wine devs (which some claimed to be narrow minded and refusing winepulse by personal believes/grudges rather than technical reasons).

Simple answers (eg. "we're working on it", "talk about it somewhere else", "read wine-devel") won't really prevent this discussion to spawn again in the future, isn't it better to face this problem now, after 8 years? I know users don't really have the right to make any demand to developers, but so far we've been ignored, threatened to being suspended from being able to post bug reports, and mocked (as it has been said in the forums sometimes, "install alsa or disable sounds" and such, which is plain mockery as some people actually need pulse for a reason or another), I believe we deserve some clear answers after all that.

So please, I beg you, set up a place where devs and users can, even for limited time, have a constructive chat about this issue, so that everyone can have an idea of what is actually gonna happen in the future regarding an upstream pulse driver.

Revision history for this message
In , Dimesio (dimesio) wrote :

For the record, no one's been advised to remove PulseAudio for years, not since the audio rewrite in 2011. The Sound wiki page explicitly advises against removing it, and that page is where I refer users to if the problem is not something obvious (e.g., user is missing 32 bit alsa-plugins). I have certainly never "mocked" anyone for using PulseAudio: I happen to use it myself.

Revision history for this message
In , Felipe Contreras (felipec) wrote :

(In reply to Ben Klein from comment #404)
> (In reply to Ben Shadwick from comment #403)
> > The Wine devs are so irrationally close-minded about this issue
>
> OK, stop there before this descends into a flame-war.

Stop what? To me this seems to be an accurate description of the actual issue we are facing here.

Ignoring the real issue is not going to get us anywhere.

> > citing of silly procedural issues as an excuse to avoid having
> > to incorporate fixes.
>
> Those "procedural issues" relate to code quality and cooperative
> functionality with other modules. Winepulse is not up to scratch.

I haven't been very involved in the Wine community, but I do recall another bug report about dwrite breaking Steam because it wasn't yet working correctly. Not only was the dwrite code in the source tree, it was enabled by default (it shouldn't be).

If incomplete code known to break important applications is part of source tree, why isn't wine pulse there?

You say there are some "issues" with it. Sure, I can believe there are issues, however, code doesn't have to be perfect in order to be merged.

Most code is merged after all the obvious issues found in code review are addressed, sometimes with known issues and TODO's. Eventually one by one the issues are addressed.

Not merging the code because it's not "perfect" is irrational, and that's a fact.

Revision history for this message
In , ruediix@gmail.com (ruedii) wrote :

I agree about putting up a status page somewhere. The wiki would work nicely.

This way we can have a link to the code for the driver and direct indicators of what needs to be improved.

Also, I don't want to start another flame war, but I'm thinking the driver MIGHT be ready to have a tag in the bug database. This might be a good policy for all unofficial branches.

Specifically, they should change the request that any bug that is verified to be caused by the PulseAudio driver (i.e. it goes away when mapping through ALSA). That way we know EXACTLY how much work needs to be done.

Revision history for this message
In , Andrew Eikum (aeikum) wrote :

Created attachment 48661
mmdevapi: More accurately track device position

Hi folks,

I have a significant patch to the ALSA driver which I hope will improve audio playback for PulseAudio users, especially users with audio that stops playing or is choppy. Before I push this for inclusion in Wine, I was hoping to get some feedback from users still having issues using Wine with PulseAudio.

The patch is attached to this comment. It will apply to wine-git (d6a59f755eff), it will not apply to Wine 1.7.19. Please build unmodified Wine with this patch and let me know if this results in any changes to your audio situation. Please confirm in winecfg that you are using the winealsa driver before testing.

Specifically I'm interested to know:

What problems did you have before when using the ALSA driver? Are there any noticeable changes as a result of applying this patch? Do any problems remain?

What type of audio hardware do you have (e.g. a USB headset, built-in audio)? If possible, what make/model is it? "aplay -L" may give you a hint.

Please post your test results here, or email me directly if you prefer.

Revision history for this message
In , Susan Cragin (susancragin) wrote :

> Please post your test results here, or email me directly if you prefer.

Andrew, Hello.
I compiled biarch wine using your patch, and I am very pleased with it.
Background.
I use wine to run Dragon NaturallySpeaking.
NatSpeak is a resource hog and works best with Lubuntu and a low-latency kernel, which I have. But I had installed pulseaudio just to get wine sound working.
NatSpeak needs to be installed in a 32-bit wine prefix because it is a 32-bit program with "handles" to make it run on 64-bit systems.
Test.
You patch installed problem-free.
I tried running NatSpeak with my current wineprefix. It worked and then it didn't... I'm not sure what the problem was. So I created a new wine prefix and re-installed NatSpeak.
Success.
Winecfg showed me "default" and my two sound cards, including my Sennheiser PC363D headset. I have .asoundconfrc set to call up Card 1, so the default setting called up my headset. Hooray. Selecting the Sennheiser option in winecfg did NOT work. Boo.
So then I tested it.
Great sound. Great accuracy.
Checked alsamixer. The settings showed it was being accessed and had set the volume in the microphone.
Then, I opened a browser and tried a youtube video at the same time as NatSpeak on wine. Both worked simultaneously.

Revision history for this message
In , Susan Cragin (susancragin) wrote :

My above post is confusing in one regard. I was able to get Youtube music on my linux Firefox, and NatSpeak on my wine, simultaneously.
I did one more test.
I set pulseaudio autospawn to No, killed pulseaudio, and started Natspeak wine. Natspeak worked great.
Andrew, you may wish to ask the developer listserv if this patch should be included in the regular code.

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

(In reply to Susan Cragin from comment #413)
> My above post is confusing in one regard. I was able to get Youtube music on
> my linux Firefox, and NatSpeak on my wine, simultaneously.
> I did one more test.
> I set pulseaudio autospawn to No, killed pulseaudio, and started Natspeak
> wine. Natspeak worked great.
> Andrew, you may wish to ask the developer listserv if this patch should be
> included in the regular code.

Mh... Sorry, do you mean that you had to kill pulseaudio to get a good audio output, or that the patch works well with and without PA?

Revision history for this message
In , Susan Cragin (susancragin) wrote :

> Mh... Sorry, do you mean that you had to kill pulseaudio to get a good audio
> output, or that the patch works well with and without PA?

On NatSpeak running in wine, I did not have to kill pulseaudio to get good audio. My understanding is (from looking at winecfg settings) that wine used alsa. And I think Linux/Firefox/YouTube used pulseaudio. I was using the same headset to dictate into Natspeak/wine and listen to YouTube/Linux.

So the patch works well with and without. I am always looking for ways to make NatSpeak work faster and better because it's the only program I really care about, so I was happy to kill pulseaudio (and every other non-essential service).
I'm a bit of a nut in that regard.

Susan

Revision history for this message
In , Susan Cragin (susancragin) wrote :

> I set pulseaudio autospawn to No, killed pulseaudio, and started Natspeak
> wine. Natspeak worked great.

Actually, this is wrong. I hadn't uncommented the autospawn setting and pulseaudio was still running. Whoops.

Revision history for this message
In , Dawid Gan (deveee) wrote :

Wine developers on all places seem to say that winepulse is not needed and that alsa plugin works fine. No, it doesn't work properly. I have a problem with crackling sounds since I started to use pulseaudio (since Ubuntu 13.04 to 14.10 currently). And it's not a problem with distributions modifications as you suggest in this note: https://forum.winehq.org/viewtopic.php?f=8&t=16895. Exactly the same I have with non-modified manually compiled version. These modifications only show that problem exists.

Any other native pulseaudio application in my system doesn't have such issues. Also winepulse works properly.

I "fixed" my problem with crackling sounds by using following environment variable:
PULSE_LATENCY_MSEC=60
I don't know if standard latency is higher or not, but it works fine for me. And it doesn't affect whole system, but only single application.

Revision history for this message
In , Cheako+winehq (cheako+winehq) wrote :

From what I understand the main blocking reason for this commit is because the following works as a solution:

/etc/init.d/pulseaudio stop

-- Facepalm --

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

We should all acknowledge that they're not gonna add pulseaudio support, due to reasons that lack any technical relevance (whatever you say, "use a plugin for alsa" makes any argument used along a *joke*). After all, this project belongs to AJ & his crew, so we really can't do anything to force a change or a feature request.

The best thing to do about it right now is to either use Maarten Lankhorst's git repository and build wine ourselves ( http://repo.or.cz/w/wine/multimedia.git ) or, for ubuntu/debian users to use this repository: https://launchpad.net/~ubuntu-wine/+archive/ubuntu/ppa .

It's sad, but it's been like this since 2007, and the best answer so far has been "try this patch to our alsa driver!"... I doubt anyone actually checks this bug report anymore (if any dev ever did), we'll just have to live with it, and be grateful that the Wine project is actually here, or we wouldn't be able to run Windows programs on Linux at all. Audio-wise the project is stuck in 2007 but and everyone that have any relevance with its governance is fine like this, so... Just use patches to get PA support, updating this bug report has been quite useless for 5 years now.

Revision history for this message
In , ruediix@gmail.com (ruedii) wrote :

I agree with the sentiment that maybe the wine developers just need to make the wine alsa output play nicer with pulseaudio, and probably modernize it a bit.

Another option is to use a multimedia abstraction library for this and some other items (raster/vector rendering, OpenGL instance creation, input etc) to help better handle all OS-specific issues. SDL would work nicely for this.

If an abstraction layer was wanted solely for use in audio, OpenAL would probably work nicely.

Revision history for this message
In , Stefaj (stefaj) wrote :

Chris Robinson, the author of the main OpenAL implementation on Linux (openal-soft) has tried to handle Wine's audio purely with OpenAL, but ran into problems. I don't remember the details, but there are some things OpenAL does not handle, like MIDI.

Please, if you have problems with PulseAudio, post the following info: Which Application are you trying to run, which sound device do you use (lspci or lsusb info), which PulseAudio version you use and the module name of the sound driver (e.g. snd-hda-intel.ko, snd-usb-audio.ko).

PA is working fine for me with all Wine apps, *except* on my snd-usb-audio.ko-driven USB dongle. For the USB dongle setting default-fragments = 4 and default-fragment-size-msec in /etc/pulse/daemon.conf fixed the problem. Andrew Eikum says that PA is trying to read 50ms from a 10ms buffer Wine provides (Not sure if I remember the numbers right), which naturally causes trouble.

Revision history for this message
In , Cheako+winehq (cheako+winehq) wrote :

SDL would work great, if wine was an emulator.

I can't see how adding in another layer of abstraction would help. From what I understand the SDL portion(backend selection) is implemented as built-in dlls.

Switching to SDL now causes problems with current configuration. This bug is open because a single backend for every app was never going to work.

Currently I've apps that need the PA driver and apps that need alsa to PA and apps that need alsa with no PA. It's true that all apps would likely work without PA, but as my system uses SPDIF i'm dependent on PA for software mixing.... and for the last time dmix and SPDIF are mutually exclusive as dmix requires parts of a DAC that exist only on the other end of the optical cable(if they exist at all).

No one backend is closer to being a good fit than any of the others. For all use cases having a good selection of backends is essential.

If you can time travel a working wine version from the future that would be nice, but until you can offer a "does work in all cases", wine is broken for some cases and won't be fixed... By patching the alsa backend to support PA.

Though a patch for a native PA backend does exist and this solution is available for more than a few years, instead of a few years from now.

Revision history for this message
In , Dawid Gan (deveee) wrote :

@Stefan
Crackling sounds occurs in every game which I played under Wine. Of course not always. For example: Sims 3, Luxor 1, 2, 3, 4, Croc 2, Fifa 12, Bejeweled 2. I noticed that actually sounds are still playing, but much faster than they should.

lspci says:
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)

Current packages versions:
pulseaudio 4.0
libasound2 1.0.28

Pulseaudio works for me with PULSE_LATENCY_MSEC=60 environment variable (I hope it's not a case). But never worked properly with default settings.

Revision history for this message
In , Andrew Eikum (aeikum) wrote :

(In reply to Deve from comment #423)
> @Stefan
> Crackling sounds occurs in every game which I played under Wine. Of course
> not always. For example: Sims 3, Luxor 1, 2, 3, 4, Croc 2, Fifa 12,
> Bejeweled 2. I noticed that actually sounds are still playing, but much
> faster than they should.
>
> lspci says:
> 00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family
> High Definition Audio Controller (rev 04)
>
> Current packages versions:
> pulseaudio 4.0
> libasound2 1.0.28
>
> Pulseaudio works for me with PULSE_LATENCY_MSEC=60 environment variable (I
> hope it's not a case). But never worked properly with default settings.

Have you tried the patch I uploaded here back in May?

https://bugs.winehq.org/attachment.cgi?id=48661

I believe it vastly improves audio for PulseAudio users that are not using USB devices. I'd be interested to know if it helps you.

I'm becoming convinced that the PA-ALSA plugin can't provide reliable playback when USB devices are used. There was a discussion about this back in October:

http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-October/022043.html

The ALSA API just doesn't provide a way to update client applications that the buffer metrics have changed after the device was created. This occurs for USB devices with PulseAudio. USB devices used to work in PA, but their latency configuration was updated around PA 4 or 5, which caused bugs for applications that can't handle high latencies, like many Windows applications running in Wine:

https://bugs.freedesktop.org/show_bug.cgi?id=66962

I plan to send the above patch to improve winealsa. I had been hoping to include a fix for USB-over-PA devices in the patch, which is why I haven't sent it yet. As I showed above, I'm not convinced it's possible to support this. The limiting factor is my time, I'm afraid. I need to test the patch, over lots of test cases (a dozen applications on each of non-USB, USB, PA non-USB, PA USB) and come to a decision on USB-over-Pulse.

Revision history for this message
In , Maurizio Stefano Oliveri (6tsukiyami9) wrote :

I guess most people know it by now, but I've finally had some time to try it out myself, so...

https://github.com/wine-compholio/wine-staging/wiki/Installation

Wonder how long it'll take for pulse related patches to get into upstream Wine (if they ever will), but so far this is the closest thing to a solution to our common problem. Quite sad if you ask me, but that's the world we live in ^^

Revision history for this message
In , Chris Y. (emailofchris) wrote :

I use a Behringer Xenyx302 USB sound mixer as my sound device, which works great with Pulseaudio but not with Wine. I mainly use wine-staging now thanks to the built-in PulseAudio driver. I'd love to see this adopted into Wine.

Changed in wine:
status: Confirmed → Unknown
Revision history for this message
In , Austin English (austinenglish) wrote :
Revision history for this message
In , Sebastian Lackner (slackner) wrote :

Closing this bug was probably a bit rushed, to quote Andrews comment on wine-devel:

"""After those five, there are three more patches to implement missing
critical interfaces (volume, session, and marshalling)."""

I would assume the current state is not fully functional enough to actually use it.

Changed in wine:
status: Unknown → Fix Released
Revision history for this message
In , Dawid Gan (deveee) wrote :

Thanks a lot!

Revision history for this message
In , Sorceror (shacklein) wrote :

(In reply to Sebastian Lackner from comment #428)
> Closing this bug was probably a bit rushed, to quote Andrews comment on
> wine-devel:
>
> """After those five, there are three more patches to implement missing
> critical interfaces (volume, session, and marshalling)."""
>
> I would assume the current state is not fully functional enough to actually
> use it.

Should wait to see if those additional patches are added. If they're not, then create new bugs for implementing those interfaces. This thread is already insanely long, and the primary issue (proper PulseAudio support) is now fixed upstream.

Revision history for this message
In , Alexandre Julliard (julliard) wrote :

Closing bugs fixed in 1.7.55.

Revision history for this message
In , Gilboa Davara (gilboad) wrote :

Many thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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