http://bugs.winehq.org/show_bug.cgi?id=28056
Summary: [regression] problems with sound under FreeBSD since 1.3.25 Product: Wine Version: 1.3.26 Platform: x86 OS/Version: FreeBSD Status: UNCONFIRMED Severity: minor Priority: P2 Component: winmm&mci AssignedTo: wine-bugs@winehq.org ReportedBy: amasterov@gmail.com
Created an attachment (id=35926) --> (http://bugs.winehq.org/attachment.cgi?id=35926) WINEDEBUG=winmm wine Morrowind.exe output
Hello!
After upgrading to wine 1.3.25 under FreeBSD 8.2-RELEASE there is no sound in StarCraft and Morrowind in main game i.e. initial sound plays normally but after loading saved game there is no sound at all. I found the same problem under this games: Starcraft Morrowind Dune 2000
There is error message on console: err:winmm:WOD_PushData GetBuffer failed: 88890007
Some games like Warcraft III works OK.
Downgrade to wine-1.3.24 solves this problem. I use wine under FreeBSD compiled from ports. Sound configuration: OSS Driver Hardware Acceleration: Emulation Default Sample Rate: 44100 Default Bits per Sample: 16
Here is attached gzipped output of execution WINEDEBUG=winmm wine Morrowind.exe
I'll post every additional info if it's required.
http://bugs.winehq.org/show_bug.cgi?id=28056
amasterov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |amasterov@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=28056
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression CC|amasterov@gmail.com | Component|winmm&mci |-unknown Version|1.3.26 |1.3.25 Summary|[regression] problems with |Зroblems with sound under |sound under FreeBSD since |FreeBSD |1.3.25 |
http://bugs.winehq.org/show_bug.cgi?id=28056
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Зroblems with sound under |Problems with sound under |FreeBSD |FreeBSD
http://bugs.winehq.org/show_bug.cgi?id=28056
amasterov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #35926|0 |1 is obsolete| |
--- Comment #1 from amasterov@gmail.com 2011-08-11 09:03:27 CDT --- Created an attachment (id=35927) --> (http://bugs.winehq.org/attachment.cgi?id=35927) WINEDEBUG=+winmm,+dsound,+oss,+wave wine Morrowind
Full log (WINEDEBUG=+winmm,+dsound,+oss,+wave wine Morrowind)
http://bugs.winehq.org/show_bug.cgi?id=28056
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com
http://bugs.winehq.org/show_bug.cgi?id=28056
Vladimir Pushkar vladimir.pushkar@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |vladimir.pushkar@gmail.com
--- Comment #2 from Vladimir Pushkar vladimir.pushkar@gmail.com 2011-08-23 02:29:54 CDT --- Same problem with Counter-Strike 1.6 under wine 1.3.25 and 1.3.26.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #3 from amasterov@gmail.com 2011-08-28 00:45:40 CDT --- wine-1.3.27 has this problem.
http://bugs.winehq.org/show_bug.cgi?id=28056
amasterov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #4 from amasterov@gmail.com 2011-08-28 07:38:28 CDT --- *** This bug has been confirmed by popular vote. ***
http://bugs.winehq.org/show_bug.cgi?id=28056
Bruni earns.61@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |earns.61@gmail.com
--- Comment #5 from Bruni earns.61@gmail.com 2011-09-06 15:38:45 CDT --- @amasterov @Vladimir Pushkar Is this any good for you? http://wiki.opennet.ru/%D0%A0%D0%B5%D0%B3%D1%80%D0%B5%D1%81%D1%81%D0%B8%D0%B...
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #6 from Jörg Höhle hoehle@users.sourceforge.net 2011-09-12 01:27:20 CDT --- Created an attachment (id=36333) --> (http://bugs.winehq.org/attachment.cgi?id=36333) Unlock ReleaseBuffer after error
I don't know what caused the initial error: warn:oss:AudioRenderClient_ReleaseBuffer write failed: 35 (Resource temporarily unavailable) err:winmm:WOD_PushData ReleaseBuffer failed: 80004005 E_FAIL
but all subsequent ones indicate an issue with Wine err:winmm:WOD_PushData GetBuffer failed: 88890007 OUT_OF_ORDER There's always trouble when the destructor/finalizer fails. Is the resource freed or not? MSDN doesn't tell.
The question is, how should Wine or the app react upon the initial error. Is Wine doing something wrong, causing the error? Is audio not reliable? Was it disconnected? I know little about how mmdevapi behaves when a device is unplugged beyond http://msdn.microsoft.com/en-us/library/dd316605(v=vs.85).aspx
Is audio generally working perfectly on your machine? perfectly in Wine? Does the error occur with this app only?
Please try out this patch and report whether the error is persistent or is really solely temporary.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #7 from amasterov@gmail.com 2011-09-13 09:01:45 CDT --- Hello Jörg!
Thanks a lot for attention to this problem! I've recompiled wine 1.3.28 with your patch. Morrowind worked with sound (without this patch there was no sound after initial screen). But after few moments there was interrupts in sound and soon there was no sound at all. I can not hear any sound problem with native applications. And wine versions prior to 1.3.25 worked without any visible (i.e. audible) problems.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #8 from amasterov@gmail.com 2011-09-13 09:11:20 CDT --- Created an attachment (id=36361) --> (http://bugs.winehq.org/attachment.cgi?id=36361) WINEDEBUG=+winmm,+dsound,+oss,+wave wine Morrowind (after patch)
Here is log running Morrowind after patch.
http://bugs.winehq.org/show_bug.cgi?id=28056
Jörg Höhle hoehle@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hoehle@users.sourceforge.ne | |t
--- Comment #9 from Jörg Höhle hoehle@users.sourceforge.net 2011-09-18 02:10:16 CDT --- So there are three issues:
A. The unique occurrence of warn:oss:AudioRenderClient_ReleaseBuffer write failed 35 (Resource temporarily unavailable) which occurs once only in your logfile. Here Wine ought to do a better job at knowing when it's allowed to send data to the device and avoid this error, i.e. understand why this error happens -- I don't know.
B. How GetBuffer & ReleaseBuffer should react to an error.
C. Losing sound after some time. The only cases of this known to be are the PulseAudio underrun issue and bug #28284. a) Your system is FreeBSD with OSS4, but does it nevertheless use Pulseaudio? b) Can you revert the commit in bug #28284 and hear any change?
Did your log file cover the time when sound was lost? Please include +tid next time you produce an audio log file.
The present bug should be about A. C is either a duplicate or needs a new entry.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #10 from Mateusz Stachowski mateusz.stachowski@wp.pl 2011-09-18 04:34:55 CDT --- Created an attachment (id=36446) --> (http://bugs.winehq.org/attachment.cgi?id=36446) WINEDEBUG=+winmm,+driver,+oss,+tid wine-git Hard Reset Demo
Hi Jörg,
I have the same bug but I'm not on FreeBSD. I'm using Ubuntu 11.04 32-bit and Open Sound System in it's newest version (which is OSS-v4.2-build2005 released 5 weeks ago). I've removed from my system ALSA and PulseAudio so those aren't interfering here. I'm also pretty sure that FreeBSD doesn't use PulseAudio because it doesn't cooperate with OSSv4 (and developers of PA won't fix that).
I've attached wine.log from game (Hard Reset Demo) that hangs upon starting on the developer logo (Flying Wild Hog). When I start it there is no sound. Disabling vmix (software mixer of OSSv4) via ossxmix and then starting demo gives me sound but the game still hangs (and in gnome-system-monitor I see CPU usage above 100%). It is so the only application that gives me that error. There are others that have no sound at all until I disable the vmix. This includes the following games:
Portal 2 (on 1.3.27 and 1.3.28) The Witcher 2: Assassins of Kings (this game works only on 1.3.23) Deus Ex: Human Revolution (on 1.3.27 I didn't test 1.3.28) Shatter Who's That Flying
I also tried running Hard Reset Demo on 1.3.17 and on that version sound works right from the start (even with vmix enabled). I know that it was before the introduction of MMDevAPI and the re-writing of the legacy sound APIs on top of MMDevAPI. With Wine 1.3.17 Hard Reset is unplayable because mouse doesn't work and most of the textures isn't rendered. It needs the "AlwaysOffScreen"="enabled" to render properly and it's been introduced with Wine 1.3.27.
I have posted a thread about that on WineHQ Forums:
http://forum.winehq.org/viewtopic.php?p=66851#66851
http://bugs.winehq.org/show_bug.cgi?id=28056
Mateusz Stachowski mateusz.stachowski@wp.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mateusz.stachowski@wp.pl
--- Comment #11 from Mateusz Stachowski mateusz.stachowski@wp.pl 2011-09-18 05:08:31 CDT --- I have tested now Morrowind and it is working with Wine 1.3.28 but until I disable the vmix there is no sound.
The output in terminal with vmix enabled prints the error message: err:winmm:WOD_PushData GetBuffer failed: 88890007
With vmix disabled in ossxmix GUI (you have to make sure that no other application is using sound device) I get that message: 0021:trace:winmm:WOD_PushData (0xc000)
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #12 from Mateusz Stachowski mateusz.stachowski@wp.pl 2011-09-18 16:03:06 CDT --- Created an attachment (id=36455) --> (http://bugs.winehq.org/attachment.cgi?id=36455) WINEDEBUG=+winmm,+driver,+oss,+tid wine-git Hard Reset (after patch)
I have build Wine 1.3.28 with your patch but Hard Reset Demo still hangs on the same thing. I get sound with it but it is continous only for moment then there are massive interrupts and finally silence.
I also recently tested Spelunky and with 1.3.28 I don't get sound no matter if vmix is enabled or disabled. Terminal output spits that same error message: err:winmm:WOD_PushData GetBuffer failed: 88890007
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #13 from Jörg Höhle hoehle@users.sourceforge.net 2011-09-21 02:57:46 CDT --- Mateusz, thanks for the info on PA/OSS4/vmix. what makes you believe it's the same bug? What do you call "the same bug"? - the error message warn:oss:AudioRenderClient_ReleaseBuffer write failed: 35 (Resource temporarily unavailable) - Using the same app as the OP (Morrowind, also Starcraft/Dune 2000)? - ...?
Quite to the contrary, I believe you've got material for 1-4 distinct bug reports. - If you have an app in Wine that works only without vmix, please file a bug (if there's none on the subject). - if sound is dying after some time, please ..., that's issue C. - App that hangs at start (does it hang with sound disabled?), please ... (Hard Reset Demo) - App that has no sound at all (Spelunky), please ...
Your after patch wine log shows: 026:err:oss:AudioRenderClient_ReleaseBuffer write failed: 11 (Zasoby chwilowo niedostępne) - EAGAIN which happens as the buffer is filled up. Later the app hangs in: 0021:err:ntdll:RtlpWaitForCriticalSection section 0x6905cbd8 "wined3d_main.c: wined3d_cs" wait timed out in thread 0021, blocked by 0020, retrying (60 sec) which is obviously another bug (gfx).
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #14 from Jörg Höhle hoehle@users.sourceforge.net 2011-09-21 03:08:44 CDT --- Regarding the main issue A=Resource temporarily unavailable, which is EAGAIN, not EBUSY, I found one bug: OSS, like ALSA, returns EAGAIN when the buffer is full. It does not return 0 (bytes written). (EAGAIN happens with ALSA despite using NONBLOCKING mode. OSS does not use NONBLOCKING).
Therefore wineoss.drv/mmdevdrv.c needs an oss_write_best_effort function much like the current alsa_write_best_effort.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #15 from Jörg Höhle hoehle@users.sourceforge.net 2011-09-21 03:50:02 CDT --- Created an attachment (id=36486) --> (http://bugs.winehq.org/attachment.cgi?id=36486) EAGAIN is normal as the buffer fills up.
Please try this patch. Note that I don't have OSS4 so it's untested. It's incompatible with my former error handling patch but you shouldn't need it because the "resource temporarily unavailable" error should go away. Still I need to merge both patches (and decide what error to return in that case).
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #16 from Mateusz Stachowski mateusz.stachowski@wp.pl 2011-09-21 13:42:19 CDT --- Created an attachment (id=36494) --> (http://bugs.winehq.org/attachment.cgi?id=36494) WINEDEBUG=+winmm,+driver,+oss,+tid wine-git Hard Reset (EAGAIN patch)
Hello Jörg,
Thank you for answering. I think that you are right and I have a different kind of bug but neverthless it's probably related with Wine OSS sound driver. I thought that it is the same because of this error message:
err:winmm:WOD_PushData GetBuffer failed: 88890007
The OP also did get that in terminal.
I don't know about the gfx bug:
0021:err:ntdll:RtlpWaitForCriticalSection section 0x6905cbd8 "wined3d_main.c: wined3d_cs" wait timed out in thread 0021, blocked by 0020, retrying (60 sec)
It seems strange that it occurs. In the WineHQ forum post about my problems I have one user reporting that the game (Hard Reset Demo) is playable on Wine 1.3.28 with "AlwaysOffScreen"="enabled" set in the registry. I could also found video gameplay of it running on Linux.
Anyway I compiled 1.3.28 with your new patch (EAGAIN is normal as the buffer fills up) and it still hangs in the same moment.
I've also reverted the patch mentioned in bug #28284 with this command (not sure that is how it should be done):
git checkout c7d0c093e5bc29da6163d2ef66542562ae7bafc2
Although checking files it looked liked it worked. It didn't resolved problems with sound or the hanging of Hard Reset.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #17 from Jörg Höhle hoehle@users.sourceforge.net 2011-09-21 17:04:10 CDT --- Mateusz, It' true that there's still: err:winmm:WOD_PushData GetBuffer failed: 88890007 in your latest log. However that occurs long after the D3D deadlock. So the trivial explanation is that sound goes berserk in that app as a consequence of the app hanging. If you look at: warn:oss:AudioRenderClient_ReleaseBuffer write failed: 4 (Przerwane wywołanie systemowe) that's probably caused by you hitting ^C to stop the hanging app. As I said, that's another bug report. When I wrote "please file a bug", I mean a *new, other* bug reports, if nothing similar exists. That discussion does not belong here in 28056.
git checkout doesn't revert a patch. You want git revert -n abcdef
As for the original warn:oss:AudioRenderClient_ReleaseBuffer write failed: 35 (Resource temporarily unavailable) in Morrowind (or StarCraft), I'd like somebody to confirm (or deny) that this is prevented by the EAGAIN patch, so that the present bug can be marked fixed after my patch(es) gets into git.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #18 from Jörg Höhle hoehle@users.sourceforge.net 2011-09-21 20:01:02 CDT --- Mateusz, you'll be interested in audio bug #28464. So far you haven't responded whether Hard Reset hangs with sound disabled.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #19 from amasterov@gmail.com 2011-09-23 11:45:44 CDT --- Created attachment 36525 --> http://bugs.winehq.org/attachment.cgi?id=36525 WINEDEBUG=+winmm,+driver,+oss,+tid wine Morrowind (EAGAIN patch)
It's log running Morrowind under wine-1.3.28 with EAGAIN Patch. This run sound died soon after running game. Other runs sound was OK few minutes and then died too. This log covers loss of sound.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #20 from Jörg Höhle hoehle@users.sourceforge.net 2011-09-23 14:27:46 CDT --- Amasterov, 1.3.29 was released today and I'm looking forward to hearing from your findings about it with and without attachment #36519 to bug #28284, comment #13 which I consider the most relevant one among my queue of audio patches (perhaps together with the WHDR_DONE patch from bug #28464, comment #4).
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #21 from Jörg Höhle hoehle@users.sourceforge.net 2011-09-23 15:49:39 CDT --- I'd be interested in output on OSS systems of my mmdevapi render test attached to bug #27937. Please attach not only the terminal log, but enhanced output obtained via WINETEST_INTERACTIVE=1 WINETEST_DEBUG=5 make render.ok
On ALSA systems, audio loss after some time is - either the PulseAudio bug, or - in case of underrun, ALSA snd_pcm_write succeeds but nothing is heard until the underrun gap has been filled by lots of written samples. Several known remaining bugs in Wine are making underruns likely, thus causing loss of sound. I need to know whether OSS exhibits the same behaviour.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #22 from amasterov@gmail.com 2011-09-24 12:36:37 CDT --- Jörg, I've compiled wine-1.3.29 with and without http://bugs.winehq.org/attachment.cgi?id=36519&action=edit Result is the same: normal sound several minutes (random time) and degradation of sound after this. After recompiling wine with WHDR_DONE patch I've got no sound at all in any wine application.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #23 from amasterov@gmail.com 2011-09-24 12:42:00 CDT ---
I'd be interested in output on OSS systems of my mmdevapi render test attached
to bug #27937.
In this bug I discovered only one attachment with render.c patch. Should I run wintest.exe? Is wine must be recompiled with render.c patch to run this test? Can you give me step-by-step instruction?
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #24 from Jörg Höhle hoehle@users.sourceforge.net 2011-09-24 14:47:21 CDT --- Indeed you need to recompile[*] git apply mmdevapi-test-render.patch make cd dlls/mmdevapi/tests/ WINETEST_INTERACTIVE=1 WINETEST_DEBUG=5 wine mmdevapi_test.exe.so render
[*] Alternatively, you (or anybody else) submit the patch to testbot.winehq.org which compiles it for you in both 32 ad 64 bit forms, then you download the resulting mmdevapi_test[64].exe. WINETEST_INTERACTIVE=1 WINETEST_DEBUG=5 wine mmdevapi_test.exe render
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #25 from Mateusz Stachowski mateusz.stachowski@wp.pl 2011-09-24 15:37:55 CDT --- Created attachment 36532 --> http://bugs.winehq.org/attachment.cgi?id=36532 mmdevapi tests on Ubuntu 11.04 with OSSv4
Hello Jörg,
I've compiled wine-1.3.27 with patch mmdevapi/tests/render.c diff from bug #27937. Then I have opened terminal in dlls/mmdevapi/tests/ directory and run the test as described in your comment. I have attached logs for vmix enabled and disabled (without any applications in background).
I also wanted to tell you that with release of wine-1.3.29 I'm finally getting sound from Defense Grid: The Awakning. Although only if I disable the vmix and still there are some clicks (nothing significant).
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #26 from amasterov@gmail.com 2011-09-24 21:51:22 CDT --- Created attachment 36539 --> http://bugs.winehq.org/attachment.cgi?id=36539 WINETEST_INTERACTIVE=1 WINETEST_DEBUG=5 wine mmdevapi_test.exe.so render
Here is result running WINETEST_INTERACTIVE=1 WINETEST_DEBUG=5 wine mmdevapi_test.exe.so render with render.c patch from bug #27937 wine-1.3.29
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #27 from Bruni earns.61@gmail.com 2011-09-25 09:06:20 CDT --- (In reply to comment #16)
I've also reverted the patch mentioned in bug #28284 with this command (not sure that is how it should be done):
git checkout c7d0c093e5bc29da6163d2ef66542562ae7bafc2
@Mateusz Stachowski
That's wrong. If you want to get Git in the state just before the commit c7d0c093e5bc29da6163d2ef66542562ae7bafc2, you have to issue the command
git checkout c7d0c093e5bc29da6163d2ef66542562ae7bafc2 && git reset --hard HEAD^
This does just what you need without reverting that commit. The first command sets your Git tree on that commit, which becomes detached HEAD, while the second one rolls Git tree to the commit preceding HEAD.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #28 from Jörg Höhle hoehle@users.sourceforge.net 2011-09-26 09:05:48 CDT --- Alex>After recompiling wine with WHDR_DONE patch I've got no sound Alex>at all in any wine application. Sorry, the WHDR_DONE patch is incomplete without my waveOutReset patch: http://www.winehq.org/pipermail/wine-patches/2011-September/107249.html Please try again with wine-1.3.29 and + prefill patch from bug #28284, comment #13 + waveOutReset returns all buffers + WHDR_DONE patch from bug #28464, comment #4 WHDR_DONE must be made to work (even though it may not help your app).
Mateusz and Alex, thank you both for the logs, an analysis will follow.
Bruni: that can be simplified again to (note trailing ^) git checkout c7d0c093e5bc29da6163d2ef66542562ae7bafc2^ I can't recommend git reset --hard to beginers, except from the one form: git reset --hard HEAD Anyway, how to use git should be looked up in http://wiki.winehq.org/GitWine
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #29 from Jörg Höhle hoehle@users.sourceforge.net 2011-09-26 13:06:33 CDT --- Here's my analysis of the logs. The result is not pretty.
+ Position deltas are related to deltas in time.
- What Wine computes as stream latency looks more like what ALSA returns as snd_pcm_delay, e.g. how much time it will take for the next written sample (inl. buffering) to hit the speaker. Indeed it's based on DSP_GETODELAY, which should be used by GetPosition, not GetStreamLatency.
- Each iteration takes too much time, 256ms instead of slightly more than 100ms. Either that or the HighPerformanceTimer is not trustworthy.
- Mateusz' Ubuntu OSS system seems to suffer particularly badly from that, typically taking 550ms per iteration. Meanwhile "GetBuffer large (22500)" at every iteration signals that so many frames really get drained in that period (so the HP timer is probably right).
What this means is that apps will spend a significant amount of time waiting, leaving less time for other things. That might explain: err:ntdll:RtlpWaitForCriticalSection section 0x12ba8c "?" wait timed out in thread 002c, blocked by 0009, retrying (60 sec) Cause: certainly blocking mode, http://www.winehq.org/pipermail/wine-devel/2011-September/092519.html
- Matteusz' without vmix uses 192000Hz as default frequency. Obviously the card supports that but IMHO that doesn't make sense in the context of Wine. The code too simply uses audioinfo max_rate.
- Incorrect underrun handling. Even after 1s sleep, 500ms worth of samples was not drained entirely. Or perhaps remaining samples less than some fragment size are left unplayed? Perhaps that's an aretefact of the ugly workaround in GetCurrentPadding?
Why do Alex and Mateusz get very different logs? I suspect that due to the bugs, differences in OSS buffer and fragment sizes have tremendous impact. They shouldn't.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #30 from Jörg Höhle hoehle@users.sourceforge.net 2011-09-26 16:19:15 CDT --- Created attachment 36574 --> http://bugs.winehq.org/attachment.cgi?id=36574 Use O_NONBLOCK with OSS renderer
Maarten Lankhorst recommends using OSS in blocking mode (which requires calling GET_OSPACE prior to write), but for testing, setting O_NONBLOCK is a one-liner.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #31 from Jörg Höhle hoehle@users.sourceforge.net 2011-09-27 14:44:00 CDT --- I propose to either - repurpose this issue as "blocking writes in OSS cause hangs" and classify as major, then mark fixed once blocking is fixed, or - refocus on the initial issue "broken sound in Morrowind + Starcraft", which according to comment #22 has turned into "loss of sound after some time", which is likely an underrun issue, but the details are shadowed by the blocking writes.
The other issues from comment #29 might be turned into distinct bug reports. For instance, incorrect GetPosition (not based on GET_ODELAY) is shared with the ALSA driver.
Alex, Mateusz, did you try out the NONBLOCK hack? Did you try out the 2 waveOutReset + WHDR_DONE patches together?
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #32 from Alex Masterov amasterov@gmail.com 2011-09-28 11:54:04 CDT --- Jörg, I've recompiled wine-1.3.29 with WHDR_DONE, waveOutReset & prefill (bug #28284, comment #13) patches. Sound in Morrowind worked OK 15 minutes without any sound degradation! I can not get sound corruption with your patches. It's great! Thanks! I'll try to test other apps when I'll have more time. Should I post wine debug logs (running without problem) here?
http://bugs.winehq.org/show_bug.cgi?id=28056
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |c7d0c093e5bc29da6163d2ef665 | |42562ae7bafc2
http://bugs.winehq.org/show_bug.cgi?id=28056
Mateusz Stachowski mateusz.stachowski@wp.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #36446|0 |1 is obsolete| | Attachment #36455|0 |1 is obsolete| | Attachment #36494|0 |1 is obsolete| |
--- Comment #33 from Mateusz Stachowski mateusz.stachowski@wp.pl 2011-10-03 15:26:49 CDT --- Created attachment 36697 --> http://bugs.winehq.org/attachment.cgi?id=36697 Tests of the Jörg Höhle patches
Hello Jörg,
I'm sorry for not responding to your previous comments. I have tested wine-1.3.29 with your patches on many games. You can find the results in the attachment.
You are wondering why logs of mine and Alex (in the comment #29) are very different it's probably, because FreeBSD uses a modified version of Open Sound System it's called newpcm:
Users of FreeBSD and other BSD's can install OSSv4 from ports:
http://www.freshports.org/audio/oss/
http://traebarlow.wordpress.com/2011/01/26/pcbsd-8-1-oss4/ (how to install OSSv4)
There is also another thing different in our tests Alex compiled wine-1.3.29 and I used 1.3.27 (render patch was for that version).
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #34 from Jörg Höhle hoehle@users.sourceforge.net 2011-10-04 09:44:45 CDT --- Alex, no logs are needed when all is well. The WHDR_DONE patch is in git now, it was the last of my patches[*], Morrowind works according to comment #32 with my patches, so I'm tempted to suggest that this bug be marked fixed
-- unless we change it to MAJOR + 1.4 release target and keep it open until OSS does not use blocking writes any more, as I suggested in comment #31.
Mateusz, I'll have a look at your logs. Nevertheless I believe that remaining issues with OSS should go to distinct entries or are possibly duplicates of other entries (e.g. some forms of stuttering with DSound affect OSS/ALSA/CoreAudio all alike, not specific to OSS).
[*] the "open OSS with NONBLOCK" was not a patch, but an experimental hack for you to try.
http://bugs.winehq.org/show_bug.cgi?id=28056
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1|c7d0c093e5bc29da6163d2ef665 | |42562ae7bafc2 |
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #35 from Andrew Eikum aeikum@codeweavers.com 2011-10-06 10:08:25 CDT --- Created attachment 36739 --> http://bugs.winehq.org/attachment.cgi?id=36739 wineoss.drv: Only write as much data as will fit into the OSS buffer
Here's a patch that uses GETOSPACE to determine how much space is available in the OSS buffer and limits its writes to be no larger than the available space. This should prevent the need for O_NONBLOCK. I think all of Jorg's patches are in, so to test this patch you should only need current Wine Git with only this patch applied. If you are testing a dsound application, you might also find this patch from Bug 28517 helpful (it will be in Wine Git shortly) http://bugs.winehq.org/attachment.cgi?id=36712.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #36 from Andrew Eikum aeikum@codeweavers.com 2011-10-06 14:22:10 CDT --- Created attachment 36748 --> http://bugs.winehq.org/attachment.cgi?id=36748 wineoss.drv: Trim the sub-device part of the device path
Another patch that I find useful on my FreeBSD 8.2 VM. Should help clean up device enumeration on this OS.
http://bugs.winehq.org/show_bug.cgi?id=28056
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.4.0
--- Comment #37 from Austin English austinenglish@gmail.com 2011-10-09 15:21:53 CDT --- Sound bug => 1.4 milestone.
http://bugs.winehq.org/show_bug.cgi?id=28056
Alex Masterov amasterov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #38 from Alex Masterov amasterov@gmail.com 2011-10-14 08:41:16 CDT --- I can not reproduce this problem in wine 1.3.30. It seems the bug was fixed.
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #39 from Alex Masterov amasterov@gmail.com 2011-10-14 12:10:56 CDT --- BTW, in wine-1.3.30 "Test Sound" in winecfg produces error on my system, but real applications work correctly. I've recompiled wine with patches from attachment 36748 and attachment 36739 (thanks to Andrew Eikum!) and this problem gone (i.e. Test Sound works correctly with this patches). Should I create new bug report or this patches will be in git anyway?
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #40 from Andrew Eikum aeikum@codeweavers.com 2011-10-17 08:38:18 CDT --- (In reply to comment #39)
BTW, in wine-1.3.30 "Test Sound" in winecfg produces error on my system, but real applications work correctly. I've recompiled wine with patches from attachment 36748 [details] and attachment 36739 [details] (thanks to Andrew Eikum!) and this problem gone (i.e. Test Sound works correctly with this patches). Should I create new bug report or this patches will be in git anyway?
You probably already saw this, but the patches are in git as 8d133f54c25833a259d8d6ee9e185177d7f38f53 and 1ed42313a91dab5c0ceb98a0735db97d6cff060f, so the winecfg problem should be fixed in the next release. Thanks for reporting and testing!
http://bugs.winehq.org/show_bug.cgi?id=28056
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #41 from Alexandre Julliard julliard@winehq.org 2011-10-21 13:49:29 CDT --- Closing bugs fixed in 1.3.31.
http://bugs.winehq.org/show_bug.cgi?id=28056
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |1ed42313a91dab5c0ceb98a0735 | |db97d6cff060f CC| |adys.wh@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=28056
--- Comment #42 from Jörg Höhle hoehle@users.sourceforge.net 2012-01-21 07:43:38 CST --- OSS4 users are invited to subscribe to bug #29585 where wineoss improvements are discussed. In particular, it would help if somebody would post the logs of my extended mmdevapi/tests/render.c currently found on testbot, not in git, both with and without vmix.
WINEDEBUG=+oss,+timestamp,+tid ../../../tools/runtest -v -P wine -M mmdevapi.dll -T ../../.. -p mmdevapi_test.exe.so render.c >> /tmp/render.log or from an exe: WINETEST_DEBUG=2 WINETEST_PLATFORM=wine wine mmdevapi_test.exe render >> /tmp/render.log
Logs from my extended capture tests are welcome too.
http://bugs.winehq.org/show_bug.cgi?id=28056
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|regression |
https://bugs.winehq.org/show_bug.cgi?id=28056
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Component|-unknown |wineoss.drv