Closed AliceLR closed 1 year ago
Does snd_pcm_drop
instead of snd_pcm_drain
help?
Also: is the pulseaudio driver affected? If it is, does pa_stream_flush
help instead of pa_stream_drain
?
Does
snd_pcm_drop
instead ofsnd_pcm_drain
help?
The only place snd_pcm_drain
is used is in the driver flush
function, which is only called on exit, so no, I don't think it would help. I did try inserting snd_pcm_drain
and then snd_pcm_drop
before the snd_pcm_prepare
in play
and the bug still occurs.
I haven't tried pulseaudio yet...
Ah, I was confused by that upstream bug - your issue is during playback and not exit.
Maybe worth reporting upstream (and maybe also to RedHat bugzilla.)
Also: is the pulseaudio driver affected? If it is, does
pa_stream_flush
help instead ofpa_stream_drain
?
Yes, though it seems to occur less often than with ALSA. Replacing that function also doesn't help.
Yeah... so this happens even linking against PipeWire directly with one of their tutorial programs. https://docs.pipewire.org/tutorial4_8c-example.html
Potentially relevant upstream issue: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1301
edit: I just commented to that issue for now. I don't have anything with PipeWire aside from virtual machine guests right now, but I'll get something set up to confirm it's not a general issue with xmp and PipeWire...
Looks like this isn't our bug and there was a workaround posted at https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1301
Should we close this, or is there really something we can do here?
@AliceLR: PING?
Closing, because there exists a workaround and not our bug.
In Fedora 35 with PipeWire 0.3.43, xmp will occassionally hang in the ALSA driver's
play
function during playback. This bug can persist between closing xmp and restarting it. I think this is an upstream bug in PipeWire's ALSA bindings, because they've had nearly identical issues in the past and I've encountered similar problems with software using SDL2 audio.The hang occurs in a
poll()
call internal tosnd_pcm_writei
, which expanded here tosnd_pcm_ioplug_writei
, identical to the fixed issue linked above:A native PipeWire driver might be a workaround, but I don't have one fully working yet.