Pulse audo in 1.3.25+

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

So I used to use the winepulse patch for wine. (Yes I like pulse). But
since 1.3.25+ uses mmdevapi for audio, that patch no longer works. That
author points to a wine multimedia git, however, after installing that I
have no more sound in any wine application, and the winecfg test audio says
audio failed. How do I get this new sound server working in wine?


--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

Sorry I clicked send too early. SO I've dropped back to 1.3.24 for now with
the pulse patch. I may try this again in a month or two to see if the sound
has come along farther for those of us who dont' want to uninstall pulse and
install alsa.

On Fri, Aug 19, 2011 at 10:37 AM, MacNean Tyrrell <[email protected]> wrote:
So I tried the multimedia wine git, the openal-soft git, and the
alsa-plugin patch for pulse. I got sound in WoW.exe but not in Steam Games
(steam has sound but when it launches a game I don't have sound anymore).


On Fri, Aug 19, 2011 at 8:08 AM, MacNean Tyrrell <[email protected]>wrote:
So I used to use the winepulse patch for wine. (Yes I like pulse). But
since 1.3.25+ uses mmdevapi for audio, that patch no longer works. That
author points to a wine multimedia git, however, after installing that I
have no more sound in any wine application, and the winecfg test audio says
audio failed. How do I get this new sound server working in wine?


--
Sincerely,

MacNean C. Tyrrell

--
Sincerely,

MacNean C. Tyrrell

--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

So I tried the multimedia wine git, the openal-soft git, and the alsa-plugin
patch for pulse. I got sound in WoW.exe but not in Steam Games (steam has
sound but when it launches a game I don't have sound anymore).

On Fri, Aug 19, 2011 at 8:08 AM, MacNean Tyrrell <[email protected]> wrote:
So I used to use the winepulse patch for wine. (Yes I like pulse). But
since 1.3.25+ uses mmdevapi for audio, that patch no longer works. That
author points to a wine multimedia git, however, after installing that I
have no more sound in any wine application, and the winecfg test audio says
audio failed. How do I get this new sound server working in wine?


--
Sincerely,

MacNean C. Tyrrell

--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

winepulse patch we do not provide support for.

Please try alsa with hardware acceleration set to emulation.

Installing the winepulse patch breaks things.
uzytkownik
Level 1
Level 1
Posts: 5
Joined: Sun May 25, 2008 8:01 am

Post by uzytkownik »

oiaohm wrote:winepulse patch we do not provide support for.

Please try alsa with hardware acceleration set to emulation.

Installing the winepulse patch breaks things.
What do you mean by "hardware acceleration set to emulation"? Is such asoundrc not sufficient (it works for gst-launch-0.10 audiotestsrc ! alsasink but not wine):

Code: Select all

pcm.dsp0 {
	type	pulse
}

pcm.dsp {
	type	pulse
}

pcm.!default {
	type	pulse
}

ctl.!default {
	type    pulse
}

pcm.pulse {
	type pulse
}

ctl.pulse {
	type pulse
}

ctl.mixer0 {
	type	pulse
}
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

Please try alsa with hardware acceleration set to emulation.
This is referring to winecfg audio settings.

Wine alsa interface has two options full and emulation. Set on the winecfg audio tab.

Yes lot of pulseaudio hell is coming from the fact people are not changing that from default of full
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Post by jorl17 »

oiaohm wrote:
Please try alsa with hardware acceleration set to emulation.
This is referring to winecfg audio settings.

Wine alsa interface has two options full and emulation. Set on the winecfg audio tab.

Yes lot of pulseaudio hell is coming from the fact people are not changing that from default of full
Out of curiosity, as I've seen you talk about this with much knowledge in another thread, how does "Emulation" affect the sound quality? Thanks.
uzytkownik
Level 1
Level 1
Posts: 5
Joined: Sun May 25, 2008 8:01 am

Post by uzytkownik »

oiaohm wrote:
Please try alsa with hardware acceleration set to emulation.
This is referring to winecfg audio settings.

Wine alsa interface has two options full and emulation. Set on the winecfg audio tab.

Yes lot of pulseaudio hell is coming from the fact people are not changing that from default of full
The same results in both cases - no audio.
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

jorl17 emulated mode sound quality as such no difference as long as it does not break up.

But there is a performance difference. More dependance on CPU for processing in emulated than full. Full uses a few extra options in alsa to improve odds perfect audio under load.

Basically emulation is running without a safety net.

uzytkownik is wine putting any messages out on terminal also make sure alsaplay or otherwise equal native alsa using program can make sound.
uzytkownik
Level 1
Level 1
Posts: 5
Joined: Sun May 25, 2008 8:01 am

Post by uzytkownik »

oiaohm wrote:jorl17 emulated mode sound quality as such no difference as long as it does not break up.

But there is a performance difference. More dependance on CPU for processing in emulated than full. Full uses a few extra options in alsa to improve odds perfect audio under load.

Basically emulation is running without a safety net.

uzytkownik is wine putting any messages out on terminal also make sure alsaplay or otherwise equal native alsa using program can make sound.

Code: Select all

ALSA lib pcm_pulse.c:995:(_snd_pcm_pulse_open) Unknown field handle_underrun
ALSA lib pcm_pulse.c:995:(_snd_pcm_pulse_open) Unknown field handle_underrun
ALSA lib pcm_pulse.c:995:(_snd_pcm_pulse_open) Unknown field handle_underrun
ALSA lib pcm_pulse.c:995:(_snd_pcm_pulse_open) Unknown field handle_underrun
ALSA lib pcm_pulse.c:995:(_snd_pcm_pulse_open) Unknown field handle_underrun
err:winmm:WINMM_OpenDevice Activate failed: 80004005
ALSA lib pcm_pulse.c:995:(_snd_pcm_pulse_open) Unknown field handle_underrun
err:winmm:WINMM_OpenDevice Activate failed: 80004005
aplay is working.
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

uzytkownik I did miss a step.

winecfg audio set hardware to emulation.

Next ok exit winecfg run wineserver -k to shut wine fully down. then re run and test.

"ALSA lib pcm_pulse.c:995:(_snd_pcm_pulse_open) Unknown field handle_underrun" This is something you should not be seeing.

This is like you Alsa pulse is not built right. There should be a underrun handler otherwise its not up to grade to run wine. Since underruns naturally happen all the time. Basically there should be a underrun error not Unknown field handle_underrun.

dmix does in fact provide a underrun handler.

Wine does particularly request alsa support for underrun correction.

Note I run without pulse audio
"ALSA lib ../../../src/pcm/pcm.c:7316:(snd_pcm_recover) underrun occurred"
is basically status normal. Audio should come out with under runs

Basically uzytkownik there is something major-ally wrong in your audio stack and this is why wine is not putting out sound.

Now if this is incompetence in the pulseaudio side they need their tails kicked.
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

On Sat, Aug 20, 2011 at 4:44 AM, oiaohm <[email protected]> wrote:
winepulse patch we do not provide support for.

Please try alsa with hardware acceleration set to emulation.

Installing the winepulse patch breaks things.




Yes I know winepulse isn't supported. My point was that winepulse doesn't
work in 1.3.25+ because of the mmdevapi (or however it's spelled) rewrite.
Which is fine. I'm looking how to get sound through pulse with wine in
1.3.25+ versions now. I saw there was a multimedia-git, but I can't get
sound out of it at all. Was hoping someone could offer some help with that
git so I could keep up on newer wines while also getting sound from pulse.
(aplay plays wav files fine. I've selected alsa/pulse/removed the Driver
Audio in regedit, I've changed Emulation to Full and back for all 3, still
no sound in Wine applications).


and here is console output:

ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field
handle_underrun
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 32 channels,
pretending there's only 2 channels
fixme:alsa:AudioClient_GetMixFormat Don't know what to do with 32 channels,
pretending there's only 2 channels


--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field
handle_underrun
This is why. output streem will have failed to open because of that.

So its the "multimedia-git" where this is coming from. People developer branches for testing out future forms has some nasty requirements. Like the git version of pulseaudio as well. That supports the handle_under-run feature.

Emulation is the required state to use pulseaudio if you have a working version of it.

MacNean Tyrrell basically nice sweet spot wine has to ask for that feature since windows applications believe it perfectly fine to under run a audio buffer.

Why is wine requesting the feature. It stops wine from crashing the complete pulseaudio server due to it not handling underruns.

Yes its better to be pulseaudio incompadible until it underrun in it get more common.
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

On Wed, Aug 31, 2011 at 8:54 AM, oiaohm <[email protected]> wrote:
ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field
handle_underrun
This is why. output streem will have failed to open because of that.

So its the "multimedia-git" where this is coming from. People developer
branches for testing out future forms has some nasty requirements. Like the
git version of pulseaudio as well. That supports the handle_under-run
feature.

Emulation is the required state to use pulseaudio if you have a working
version of it.

MacNean Tyrrell basically nice sweet spot wine has to ask for that feature
since windows applications believe it perfectly fine to under run a audio
buffer.
Why is wine requesting the feature. It stops wine from crashing the
complete pulseaudio server due to it not handling underruns.

Yes its better to be pulseaudio incompadible until it underrun in it get
more common.





I dont' think I'm understanding you well. I have set it to emulation, does
1.3.27 non multimedia git work with no sound lag? 1 reason I love the
wine-pulse patch for previous wines was no sound lag at all, anytime I chose
alsa/emulation I got sound lag. I haven't tested alsa in a long time on
regular wine. Maybe I'll compile a fresh 1.3.27 and test it.

So are you saying future versions of wine/pulseaudio will allow them to work
hand in hand without patches/emulation/etc?


--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

On Wed, Aug 31, 2011 at 2:29 PM, MacNean Tyrrell <[email protected]> wrote:

On Wed, Aug 31, 2011 at 8:54 AM, oiaohm <[email protected]> wrote:
ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field
handle_underrun
This is why. output streem will have failed to open because of that.

So its the "multimedia-git" where this is coming from. People developer
branches for testing out future forms has some nasty requirements. Like the
git version of pulseaudio as well. That supports the handle_under-run
feature.

Emulation is the required state to use pulseaudio if you have a working
version of it.

MacNean Tyrrell basically nice sweet spot wine has to ask for that feature
since windows applications believe it perfectly fine to under run a audio
buffer.
Why is wine requesting the feature. It stops wine from crashing the
complete pulseaudio server due to it not handling underruns.

Yes its better to be pulseaudio incompadible until it underrun in it get
more common.





I dont' think I'm understanding you well. I have set it to emulation,
does 1.3.27 non multimedia git work with no sound lag? 1 reason I love the
wine-pulse patch for previous wines was no sound lag at all, anytime I chose
alsa/emulation I got sound lag. I haven't tested alsa in a long time on
regular wine. Maybe I'll compile a fresh 1.3.27 and test it.

So are you saying future versions of wine/pulseaudio will allow them to
work hand in hand without patches/emulation/etc?

Well that's a refreshing sight. Vanilla 1.3.27 sound works for me with
Alsa/Full (if I set emulation like you recommend I get no sound). I like
keeping up on the wine releases, so this is good. No sound lag anymore for
me (don't know if that's because of the mmdevapi rewrite or if pulse is just
handling the alsa plugin better now). And my mouse patch still works, so
onto 1.3.27 for me. Weird not having pulse for wine (and seeing the
application names, just alsa-plugin) but glad the newer ones are working.
--
Sincerely,

MacNean C. Tyrrell

--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

On Wed, Aug 31, 2011 at 4:21 PM, MacNean Tyrrell <[email protected]> wrote:

On Wed, Aug 31, 2011 at 2:29 PM, MacNean Tyrrell <[email protected]>wrote:

On Wed, Aug 31, 2011 at 8:54 AM, oiaohm <[email protected]>wrote:
This is why. output streem will have failed to open because of that.

So its the "multimedia-git" where this is coming from. People developer
branches for testing out future forms has some nasty requirements. Like the
git version of pulseaudio as well. That supports the handle_under-run
feature.

Emulation is the required state to use pulseaudio if you have a working
version of it.

MacNean Tyrrell basically nice sweet spot wine has to ask for that
feature since windows applications believe it perfectly fine to under run a
audio buffer.
Why is wine requesting the feature. It stops wine from crashing the
complete pulseaudio server due to it not handling underruns.

Yes its better to be pulseaudio incompadible until it underrun in it get
more common.





I dont' think I'm understanding you well. I have set it to emulation,
does 1.3.27 non multimedia git work with no sound lag? 1 reason I love the
wine-pulse patch for previous wines was no sound lag at all, anytime I chose
alsa/emulation I got sound lag. I haven't tested alsa in a long time on
regular wine. Maybe I'll compile a fresh 1.3.27 and test it.

So are you saying future versions of wine/pulseaudio will allow them to
work hand in hand without patches/emulation/etc?

Well that's a refreshing sight. Vanilla 1.3.27 sound works for me with
Alsa/Full (if I set emulation like you recommend I get no sound). I like
keeping up on the wine releases, so this is good. No sound lag anymore for
me (don't know if that's because of the mmdevapi rewrite or if pulse is just
handling the alsa plugin better now). And my mouse patch still works, so
onto 1.3.27 for me. Weird not having pulse for wine (and seeing the
application names, just alsa-plugin) but glad the newer ones are working.
Eh spoke to soon. Sound works, but if I tab our, or play for awhile and a
random load occurs, the sound can just stop for some reason. Haven't found
rhyme or reason to it, but annoying, dropping back to .24+wine-pulse for
now, will test it more in later wine updates.
--
Sincerely,

MacNean C. Tyrrell

--
Sincerely,

MacNean C. Tyrrell

--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

MacNean Tyrrell You might be walking into a trap.

Setting emulation in winecfg does not happen instanty.

wineserver -k is require after winecfg to get the new audio state loaded.

Yes I have had people be caught that after a reboot they are in emulation then change to full have it work and think the setting was full when it worked.

Its a evil binary lock that can get you.
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

On Thu, Sep 1, 2011 at 11:02 AM, oiaohm <[email protected]> wrote:
MacNean Tyrrell You might be walking into a trap.

Setting emulation in winecfg does not happen instanty.

wineserver -k is require after winecfg to get the new audio state loaded.

Yes I have had people be caught that after a reboot they are in emulation
then change to full have it work and think the setting was full when it
worked.

Its a evil binary lock that can get you.



Yes Ok I see what your saying. However, still running emulation set, I
loose sound after tabbing, after a few minutes, sometimes sound won't even
play when the game/application starts. Under sound
preferences->applications, it does load a Alsa-Plugin[wine-preloader] for
each application/game that wants sound, but no sound coming out of the
headphones/speakers, either right away, after tabbing, or after a few
minutes.



--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

MacNean Tyrrell problem we have here is it sometimes not wine.

Sometimes is pulseaudio it self alsa emulation failing.

few minutes death is a common one from pulseaudio alsa interface and pulse server being different versions.

Since I don't normally use pulseaudio version of pulse and making sure you pulse install is correctly matched up would be the next wise things to check.

ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field If this is appearing on console still you version of pulse is not wine compadible. Ie too old.
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

On Fri, Sep 2, 2011 at 9:45 AM, oiaohm <[email protected]> wrote:
MacNean Tyrrell problem we have here is it sometimes not wine.

Sometimes is pulseaudio it self alsa emulation failing.

few minutes death is a common one from pulseaudio alsa interface and pulse
server being different versions.

Since I don't normally use pulseaudio version of pulse and making sure you
pulse install is correctly matched up would be the next wise things to
check.

ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field If this is
appearing on console still you version of pulse is not wine compadible. Ie
too old.




I'm still on 10.10 Ubuntu, and it is still showing up, so I need pulse from
like 11.04?



--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

MacNean Tyrrell don't know ubuntu versioning. Pulse versions in those might enable someone to answer if it contains that feature or not.
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

On Fri, Sep 2, 2011 at 8:28 PM, oiaohm <[email protected]> wrote:
MacNean Tyrrell don't know ubuntu versioning. Pulse versions in those
might enable someone to answer if it contains that feature or not.





Yea I upgraded to 11.04 which had a slightly newer version of pulse. No
more of that error. However, only had about 40 minutes to test, sound was
rocking, but then at the last minute sound failed again. No error that i
saw in console, but playing with stream and games launched from stream
sometimes hard to get console output correctly.

Um that's with FULL not emulation, (unless wine auto chooses emulation, it
was set to FULL from before and on reboot just to make suer), I had sound
with Full like I said for about 40 minutes fine, but then it failed. I'll
try testing more tomorrow.



--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

There is a particular reason for setting emulation. MacNean Tyrrell

To prevent wine from calling real-time features of alsa. That pulseaudio simply does not support. Full tells wine to use every feature alsa offers.

This is why I am saying emulation if emulation mode does not work then we have something to worry about.

If full fails could be simply using features pulseaudio does not support very well at wrong times leading to sound failure. So we don't bother debugging full on anything bar standard alsa.
MacNean Tyrrell

Pulse audo in 1.3.25+

Post by MacNean Tyrrell »

On Sat, Sep 3, 2011 at 2:48 AM, oiaohm <[email protected]> wrote:
There is a particular reason for setting emulation. MacNean Tyrrell

To prevent wine from calling real-time features of alsa. That pulseaudio
simply does not support. Full tells wine to use every feature alsa offers.

This is why I am saying emulation if emulation mode does not work then we
have something to worry about.

If full fails could be simply using features pulseaudio does not support
very well at wrong times leading to sound failure. So we don't bother
debugging full on anything bar standard alsa.



OK, more testing with emulation set, still lost sound after about 30
minutes, here is error from console when it occured:

err:alsa:wine_snd_pcm_recover underrun occurred
err:alsa:wine_snd_pcm_recover underrun occurred
err:alsa:wine_snd_pcm_recover underrun occurred
err:alsa:wine_snd_pcm_recover underrun occurred
err:alsa:wine_snd_pcm_recover underrun occurred
err:alsa:wine_snd_pcm_recover underrun occurred
err:alsa:wine_snd_pcm_recover underrun occurred
err:d3d:device_resource_released Buffer 0x2ea93b70 is still in use by
stateblock 0x1ba608 as index buffer.




--
Sincerely,

MacNean C. Tyrrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... hment.html>
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

err:alsa:wine_snd_pcm_recover underrun occurred

Yep confirmation of a pulseaudio shot gun if running in full. Since at or near the fail a underrun happens. This is enough to crash or cause pulseaudio to stop putting out audio on everything.
Reason why seeing this.
"ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field
handle_underrun"
Tells us that pulseaudio will not recover from a underrun event and the err above confirms the exist of that problem. Is basically a o that is why full is not working moment.

"err:d3d:device_resource_released Buffer 0x2ea93b70 is still in use by
stateblock 0x1ba608 as index buffer. " That is a strange error.

Next item really requires running with pasuspender with wine set emulation. Ok wine is going to hog the audio doing this due to no mixer in most cases. But this does remove pulseaudio from mix.

If wine is still failing in pasuspender mode with wine set emulation then its 100 percent a bug in wine alsa with the programs you are using. pasuspender mode cannot have full either because you most likely not have a mixer. So is a wine bug report.

If it works with pasuspender something from pulseaudio is messing with us. So it is a bug report to pulseaudio due to there alsa emulation being faulty for some reason.

Yes I had to get you using emulation before I could ask you todo the next test. Full in pasuspender mode also fails in bad ways due to missing mixer.

Also some programs just switching on emulation make the problem with pulseaudio disappear.
Locked