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

Always get ALSA "Debug" written to display #144

Open
angaz opened this issue Dec 27, 2016 · 5 comments · May be fixed by #284
Open

Always get ALSA "Debug" written to display #144

angaz opened this issue Dec 27, 2016 · 5 comments · May be fixed by #284
Milestone

Comments

@angaz
Copy link

angaz commented Dec 27, 2016

I'm not sure if this is a bug with soundio or my setup, but on Ubuntu 16.10, I always get this output to the terminal:

ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:979:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dmix.c:979:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dmix.c:979:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream

Could someone please advise how to get rid of this?
The problem persists in the sio_ programs included with libsoundio. The program still runs as expected without any problems, just this output is annoying.

Thanks

@andrewrk
Copy link
Owner

I'm quite annoyed that the ALSA library writes garbage output to stdio. I'm guessing that this output is printed when libsoundio probes ALSA devices to see what their capabilities are. Sadly the ALSA library does not provide a mechansim for disabling log output. If I missed it, and you find such an API, please let me know.

@angaz
Copy link
Author

angaz commented Dec 27, 2016

It is indeed ALSA printing to stderr during probing. I noticed it was stderr when I was piping to cat -e and the error messages didn't get the $ at the ends of the lines. I did look through the ALSA API and have't found anything yet. I will inform you if I do find a way to clean up the output.

@gamax92
Copy link

gamax92 commented Dec 30, 2016

IIRC you can use snd_lib_error_set_handler to change the behaviour of ALSA lib error messages
The default handler of snd_lib_error_default is to print messages to stderr so just give it a function that does something else

@andrewrk
Copy link
Owner

Nice find. I'll do that.

@andrewrk andrewrk added this to the 2.0.0 milestone Dec 31, 2016
@alichraghi
Copy link

alichraghi commented Jul 6, 2022

JACK does the same. just like ALSA it can be disabled with jack_set_error_function

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
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

...

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