http://bugs.winehq.org/show_bug.cgi?id=22034
Summary: EXIT_ON_ERROR should use ERR instead of WARN in winealsa.drv Product: Wine Version: 1.1.40 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: blocker Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: superquad.vortex2@gmail.com
In winealsa.drv , WARN() should not be used in EXIT_ON_ERROR() since those functions in waveout.c and wavein.c are all fatal errors
(e.g. snd_pcm_hw_params_set_period_time() may return error on when using "hw" device for some alsa driver by modifying registry "ALSA Driver" "UseDirectHW" to "Y" for those hardware mixing sound cards)
wine is unable to report those error message for those alsa drivers
#define EXIT_ON_ERROR(f,e,txt) do \ { \ int err; \ if ( (err = (f) ) < 0) \ { \ WARN(txt ": %s\n", snd_strerror(err)); \ + ERR(txt ": %s\n", snd_strerror(err)); \ retcode=e; \ goto errexit; \ } \ } while(0)
http://bugs.winehq.org/show_bug.cgi?id=22034
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|blocker |trivial
--- Comment #1 from Dmitry Timoshkov dmitry@codeweavers.com 2010-03-13 23:36:26 --- http://bugs.winehq.org/page.cgi?id=fields.html#bug_severity
Feel free to send patch to wine-patches.
http://bugs.winehq.org/show_bug.cgi?id=22034
--- Comment #2 from Raymond superquad.vortex2@gmail.com 2010-03-31 03:08:12 ---
WINEDEBUG=+alsa ./wine winecfg fixme:wave:ALSA_ComputeCaps Device has a minimum of 2 channels trace:alsa:ALSA_supportedFormat (0x143890) warn:alsa:ALSA_supportedFormat only WAVE_FORMAT_PCM and WAVE_FORMAT_EXTENSIBLE supported trace:alsa:ALSA_supportedFormat (0x32f158) err:wave:wodOpen unable to set buffer time: Invalid argument
http://bugs.winehq.org/show_bug.cgi?id=22034
--- Comment #3 from Raymond superquad.vortex2@gmail.com 2010-07-15 18:06:09 --- (In reply to comment #1)
http://bugs.winehq.org/page.cgi?id=fields.html#bug_severity
Feel free to send patch to wine-patches.
After perform some testing, change WARN to ERR in waveout , wavein are still too late since this is a fatal error, the driver is actually unusable when snd_pcm_hw_params() fail
i.e. wine should not add this alsa device to playback device list and capture device list during compute_device_cap
http://bugs.winehq.org/show_bug.cgi?id=22034
--- Comment #4 from Raymond superquad.vortex2@gmail.com 2010-12-05 19:54:56 CST --- The other problem is winealsa.drv hard coded to support KSDATAFORMAT_SUBTYPE_IEEE_FLOAT in ALSA_supportedFormat
ALSA_ComputeCaps() does not check whether the device support SND_PCM_FORMAT_FLOAT_LE when wine allow user to modify registry to use "hw" device which most of them does not support SND_PCM_FORMAT_FLOAT_LE
} else if ((wwo->format.Format.wFormatTag == WAVE_FORMAT_EXTENSIBLE) && IsEqualGUID(&wwo->format.SubFormat, &KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)){ format = (wwo->format.Format.wBitsPerSample == 32) ? SND_PCM_FORMAT_FLOAT_LE : -1; } else { ERR("invalid format: %0x04x\n", wwo->format.Format.wFormatTag); retcode = WAVERR_BADFORMAT; goto errexit; }
if ((err = snd_pcm_hw_params_set_format(pcm, hw_params, format)) < 0) { WARN("unable to set required format: %s\n", snd_pcm_format_name(format)); EXIT_ON_ERROR( snd_pcm_hw_params_set_format(pcm, hw_params, format), WAVERR_BADFORMAT, "unable to set required format" ); }
http://bugs.winehq.org/show_bug.cgi?id=22034
Maarten Lankhorst m.b.lankhorst@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |m.b.lankhorst@gmail.com
--- Comment #5 from Maarten Lankhorst m.b.lankhorst@gmail.com 2010-12-14 06:55:53 CST --- I disagree with the patch, just make snd_pcm_hw_params_set_period_time non-fatal, in waveout/in.c ;)
http://bugs.winehq.org/show_bug.cgi?id=22034
--- Comment #6 from Raymond superquad.vortex2@gmail.com 2010-12-14 07:30:31 CST --- if wine want to support KSDATAFORMAT_SUBTYPE_IEEE_FLOAT and ( 4 or 6 channels )
it must explicitly test the alsa device during ALSA_ComputeCaps() and use this info to determine whether device support SND_PCM_FORMAT_FLOAT_LE instead of hardcode them in ALSA_supportformat() since wine allow user to specify to use "hw" by using directhw=Y in registry
especially ALSA require the application to use "surround40" and "surround51" for 4 an 6 channels
http://bugs.winehq.org/show_bug.cgi?id=22034
--- Comment #7 from Raymond superquad.vortex2@gmail.com 2010-12-14 18:16:21 CST --- (In reply to comment #5)
I disagree with the patch, just make snd_pcm_hw_params_set_period_time non-fatal, in waveout/in.c ;)
No, the aim of the patch is to make snd_pcm_hw_param() fail since this is fatal error
http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=a2ae3341a7...
http://bugs.winehq.org/show_bug.cgi?id=22034
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |winealsa.drv
http://bugs.winehq.org/show_bug.cgi?id=22034
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |aeikum@codeweavers.com Resolution| |FIXED
--- Comment #8 from Andrew Eikum aeikum@codeweavers.com 2012-11-05 07:17:10 CST --- Old bug, not relevant to the new drivers.
http://bugs.winehq.org/show_bug.cgi?id=22034
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org 2012-11-09 12:59:57 CST --- Closing bugs fixed in 1.5.17.