Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apulse does not work with alsa ioplug #108

Open
dspdaemon opened this issue Feb 21, 2020 · 1 comment
Open

Apulse does not work with alsa ioplug #108

dspdaemon opened this issue Feb 21, 2020 · 1 comment

Comments

@dspdaemon
Copy link

Sometimes snd_pcm_hw_params_any() can return +1 when it succeeds. On my system io plugins return 1 and hw devices return 0 and both are successful returns. That probably means
only a negative return is an error. The included patch fixes the issue,
apulse-stream.c.diff.gz

i-rinat added a commit that referenced this issue Mar 2, 2020
Most ALSA API functions that return status, declare return value as
either 0 or negative error code. However some functions like
snd_pcm_hw_params_any() return just int. In most cases it's the same 0 or
negative, but as was found in #108, it may return positive values too.

ALSA lib internally uses "< 0" for return value checking.
@i-rinat
Copy link
Owner

i-rinat commented Mar 2, 2020

Yeah, turns out snd_pcm_hw_params_any() may return positive values too.

I looked into ALSA library code, and they almost everywhere only treat negative values as errors. So in f9c02f4 I'm changing all != 0 for error codes from ALSA to < 0 too. That patch includes yours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants