Repository navigation
Conversation
|
Independent confirmation of the impact and the proposed fix. We encountered repeated voice-session termination in a Linux application using CPAL's ALSA backend through the PulseAudio ALSA plugin. The native error was We independently arrived at the identical one-line correction in this PR and tested the actual We also installed a privately rebuilt plugin with this change. The user reports no further interruptions in the current observation period; longer real-world validation is ongoing. Our historical ALSA logs do not expose the underlying PulseAudio return code, so we cannot attribute every past EIO to this branch. The positive comparison appears to have been introduced in c2456f2 (2008-09-03), when the wait-for-timing loop was added. Before that, the function already returned EIO on any latency-query error, so this dates the faulty comparison rather than establishing the first occurrence of the symptom. This has a substantial user-visible impact in applications that treat the error as fatal. Please consider prioritizing review of this fix. Thank you for preparing it. |
|
Tested this exact patch locally. The reproducer failed with EIO in 3/3 unpatched runs and succeeded in 3/3 patched runs. My case is - |
|
@i-garrison @poettering |
|
I can confirm that checking for negative value of error constant is valid fix indeed! @perexg could you please merge this? Thank you! |
|
I tried the change on my WSL2 setup. The installed plugin had the positive-16 comparison; silent snd_pcm_avail_delay probe failed three times with the installed plugin, then passed three out of three using a copy with the comparison changed to negative 16. With that copy in asoundrc, playback and capture opened. The first Codex slash voice still failed at OpenDevices/25; later it worked. I can't explain that first failure, but wanted to add another WSL2 repro. |
|
Is @perexg the only one with merging rights? |
|
Apologize, busy with other things. The signed-off-by / commit author e-mail is anonymous. |
|
Sorry, wrong push. The bd8eaa1 was not applied. |
There is an issue with `pulse_delay()` which calls `pa_stream_get_latency()`. PulseAudio documents that this function returns `-PA_ERR_NODATA` when timing information is not available yet. The ALSA Pulse plugin compares the result against positive `PA_ERR_NODATA`; it therefore treats that temporary condition as an unrelated failure and returns `-EIO`. Change `PA_ERR_NODATA` to `-PA_ERR_NODATA` in the comparison to not miss that branch. Fixes alsa-project#65. Signed-off-by: argothiel <argothiel_alsa@interia.pl>
cef4685 to
022c569
Compare
|
@perexg No worries, I just wanted to make sure if we have the right person! 😊 The e-mail sign-off address has been corrected. |
There is an issue with
pulse_delay()which callspa_stream_get_latency(). PulseAudio documents that this function returns-PA_ERR_NODATAwhen timing information is not available yet. The ALSA Pulse plugin compares the result against positivePA_ERR_NODATA; it therefore treats that temporary condition as an unrelated failure and returns-EIO.Change
PA_ERR_NODATAto-PA_ERR_NODATAin the comparison to not miss that branch.Fixes #65.