[Bug 29841] New: static/distortion when playing sound via alsa pulseaudio
http://bugs.winehq.org/show_bug.cgi?id=29841 Bug #: 29841 Summary: static/distortion when playing sound via alsa pulseaudio Product: Wine Version: 1.4-rc2 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winealsa.drv AssignedTo: wine-bugs(a)winehq.org ReportedBy: error(a)ioerror.us CC: aeikum(a)codeweavers.com Classification: Unclassified Regression SHA1: 54b24f39260a3780bdf97d810a69647d7357cb62 Created attachment 38760 --> http://bugs.winehq.org/attachment.cgi?id=38760 alsa-info.txt from the alsa-info command Wine programs play static instead of expected sounds, or sound is heavily distorted, when ALSA plays back through pulseaudio. Steps to Reproduce: 1. Start with empty wine prefix. 2. In the wine-git build directory, run: ./wine programs/winecfg/winecfg.exe.so 3. Click the Audio tab in winecfg. 4. Click the Test Sound button. Expected Results: A sound containing three tones is audible. Actual Results: Static is played. Additional Information: Using winecfg "Test Sound" gives white noise. When playing World of Warcraft or other games, some sounds are almost recognizable through the static/distortion. git bisect gives the bad commit as 54b24f39260a3780bdf97d810a69647d7357cb62. Fedora 16 x86_64 Linux underground.local 3.2.2-1.fc16.x86_64 #1 SMP Thu Jan 26 03:21:58 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux # rpm -q wine-alsa alsa-plugins-pulseaudio wine-alsa-1.3.37-1.fc16.i686 # (The problem was reproduced in wine-git master) alsa-plugins-pulseaudio-1.0.24-3.fc16.x86_64 alsa-plugins-pulseaudio-1.0.24-3.fc16.i686 Attached alsa-info.txt has further hardware information. Attached trace.txt has output from the command: env WINEDEBUG=+tid,+mmdevapi,+winmm,+driver,+midi,+dsound,+dmusic,+mci,+oss,+alsa,+coreaudio ./wine programs/winecfg/winecfg.exe.so -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29841 --- Comment #1 from Michael Hampton <error(a)ioerror.us> 2012-02-09 00:06:16 CST --- Created attachment 38761 --> http://bugs.winehq.org/attachment.cgi?id=38761 env WINEDEBUG=+tid,+mmdevapi,+winmm,+driver,+midi,+dsound,+dmusic,+mci,+oss,+alsa,+coreaudio ./wine programs/winecfg/winecfg.exe.so -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29841 --- Comment #2 from Michael Hampton <error(a)ioerror.us> 2012-02-09 00:19:08 CST --- Oops! I forgot one thing. The reason I think this is a Wine issue is that the aplay command works correctly. aplay -Dpulse /usr/share/sounds/KDE_Startup_new.wav plays perfectly, free of distortion. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29841 --- Comment #3 from Andrew Eikum <aeikum(a)codeweavers.com> 2012-02-09 08:26:16 CST --- Hi Michael, can you try: aplay -Ddefault /usr/share/sounds/KDE_Startup_new.wav and see if you get similar distortion? Wine is using the "default" device, when your aplay example is using the "pulse" device, so I'm curious to know if that's what's causing the problem. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29841 --- Comment #4 from Michael Hampton <error(a)ioerror.us> 2012-02-09 08:28:40 CST --- Hi Andrew, aplay -Ddefault also plays perfectly. As does wine when I go back to anything prior to your patch. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29841 --- Comment #5 from Andrew Eikum <aeikum(a)codeweavers.com> 2012-02-09 08:40:57 CST --- Okay, thanks. By the way, what version of PulseAudio are you using? Would you mind gathering another log with the same channels and also ",+timestamp"? My analysis so far is "I don't know." The ALSA device is reporting loads of underruns, despite us feeding it data. Possibly our timer to write data to ALSA is coming late (hence +timestamp). Possibly you're running into a PulseAudio or alsa-plugins bug. If you're comfortable hacking code, you could try forcing winealsa.drv to use the "pulse" device by changing in <dlls/winealsa.drv/mmdevdrv.c>: -static const char defname[] = "default"; +static const char defname[] = "pulse"; and rebuilding winealsa.drv. That might give you joy. (This is a known issue; Wine needs better device selection code.) My reasoning here is this line from your log: 002e:trace:alsa:AUDDRV_GetAudioEndpoint Opening PCM device "default" with handle_underrun: 0 Coupled with the many underruns ("state 4", "avail: -32"). Given a pulse-backed device, I would expect "handle_underrun: 1", which might improve things. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29841 --- Comment #6 from Andrew Eikum <aeikum(a)codeweavers.com> 2012-02-09 08:46:23 CST --- (In reply to comment #5)
Coupled with the many underruns ("state 4", "avail: -32"). Given a pulse-backed device, I would expect "handle_underrun: 1", which might improve things.
I'm sorry, I misunderstood the code. The "0" is the return status (success), not the value of handle_underrun. Knowing this, I wouldn't expect the "default->pulse" change to make a difference. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29841 Michael Hampton <error(a)ioerror.us> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38761|0 |1 is obsolete| | --- Comment #7 from Michael Hampton <error(a)ioerror.us> 2012-02-09 09:20:53 CST --- Created attachment 38766 --> http://bugs.winehq.org/attachment.cgi?id=38766 env WINEDEBUG=+tid,+mmdevapi,+winmm,+driver,+midi,+dsound,+dmusic,+mci,+oss,+alsa,+coreaudio,+timestamp ./wine programs/winecfg/winecfg.exe.so Here's the output with +timestamp added, running git master, with the default changed to "pulse" as you requested. I still get static when clicking Test Sound. The time when I clicked Test Sound is 9.109 in the log. The version of pulseaudio is: pulseaudio-0.9.23-1.fc16.x86_64 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29841 --- Comment #8 from Michael Hampton <error(a)ioerror.us> 2012-02-09 09:28:29 CST --- Reading through the ALSA 1.0.25 notes I see something about: pulse - only underrun if no more data has been written I'm going to try updating ALSA later and see if this fixes the issue. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29841 --- Comment #9 from Andrew Eikum <aeikum(a)codeweavers.com> 2012-02-09 09:33:39 CST --- It may also be worth upgrading PulseAudio to 1.0 or later, if you can. The PA and alsa-plugins people are encountering and fixing their own bugs, and those changes haven't made it out to most distros yet (alsa-plugins 1.0.25 is only two weeks old, and PA 1.0 only a couple of months). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29841 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29841 Michael Hampton <error(a)ioerror.us> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #10 from Michael Hampton <error(a)ioerror.us> 2012-02-09 14:23:17 CST --- Updating to pulseaudio 1.1 (from Fedora 17/rawhide) fixed the issue. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29841 Jerome Leclanche <adys.wh(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adys.wh(a)gmail.com --- Comment #11 from Jerome Leclanche <adys.wh(a)gmail.com> 2012-02-24 06:01:10 CST --- Closing -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29841 Jerome Leclanche <adys.wh(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #12 from Jerome Leclanche <adys.wh(a)gmail.com> 2012-02-24 06:01:17 CST --- Closing -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org