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

Use sndio as first preference in PortAudio, enable PortAudio for spotifyd #23838

Merged
merged 2 commits into from
Jul 28, 2020

Conversation

ericonr
Copy link
Member

@ericonr ericonr commented Jul 26, 2020

If sndio isn't available, spotifyd, using the portaudio backend, falls back to ALSA cleanly. However, in the previous version, with sndio enabled, the portaudio backend simply didn't output anything. Therefore, I believe my change to the patch makes sense.

Enabling portaudio for spotifyd makes sense because it allows one to use sndio without requiring alsa-sndio.

@Johnnynator and @abenson

@Johnnynator
Copy link
Member

with this portaudio patch audio does not work on non sndio systems

PortAudio Test: output sine wave. SR = 44100, BufSize = 64
ALSA lib pcm_dsnoop.c:642:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1090:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:1090:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
couldn't open play stream: No such file or directory
An error occured while using the portaudio stream
Error number: -9999
Error message: Unanticipated host error

It seems the portaudio patches does not really test if sndio exists, only when creating a stream. Currently investigating how the fallback stuff in portaudio is supposed to work.

@ericonr
Copy link
Member Author

ericonr commented Jul 26, 2020

I get nearly the same error messages, but it seems to fallback to ALSA. I tested spotifyd with only the portaudio backend, and if I disable the sndiod service, it occupies the ALSA device. I get most of those error messages in both cases, though. And also a weird looking one when exiting: stream drop error: PortAudio not initialized.

The changes to sndio.patch were:

- Put the sndio backend as the first one that PortAudio tries to
connect;
- Add return for cases when sndio isn't available so PortAudio can
fallback to other systems.
This option is on by default.
@Johnnynator Johnnynator merged commit 541d6e5 into void-linux:master Jul 28, 2020
@ericonr ericonr deleted the sndio branch August 9, 2020 01:11
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants