http://bugs.winehq.org/show_bug.cgi?id=28040
--- Comment #4 from Jörg Höhle hoehle@users.sourceforge.net 2011-08-10 13:25:27 CDT --- Created an attachment (id=35909) --> (http://bugs.winehq.org/attachment.cgi?id=35909) patch to default to normal open when handle_underrun fails
On systems where PA is "installed but disabled," I expect that the ALSA config tree won't have "pcm.<device>.type=pulse", which the workaround checks for.
This assumption is erroneous. By disabled I meant nothing more than "pactl exit" (with auto-restart disabled). make_handle_underrun_config still finds the pulse device and reconfigures it. It is only at pcm_open time that the configuration is refused.
trace:alsa:AUDDRV_GetAudioEndpoint "default" 0x138c98 0 0x33f944 ALSA lib pcm_pulse.c:855:(_snd_pcm_pulse_open) Unknown field handle_underrun trace:alsa:AUDDRV_GetAudioEndpoint Opening PCM device "default" with handle_underrun: -22
Without fallback, open fails even when PA is not active. This is not acceptable.
My patch adds that fallback. The FIXME_ONCE functionality is based on the consideration that if handle_underrun is rejected once by Pulse, it'll always be. Better not spam the console with every invocation of PlaySound.
If you wish, one could add if(err == -EINVAL){ + ERR("Please upgrade PulseAudio & alsa-utils to at least 1.0.25\n"); handle_underrun = 0;