Issue created by @RossBencina
[Trac: Originally assigned to none]
Ralph Irving submits:
Since the snd_lib_error_set_handler(AlsaErrorHandler) call was commented
out in r1543 of trunk/src/hostapi/alsa/pa_linux_alsa.c The ALSA
implementation now prints all ALSA lib messages to stderr, which is the
default if an error handler is not defined.
Before this change all error messages from the library were hidden, now
there is a flurry of messages when enumerating devices which don't exist.
The FindDeviceName function does this with the predefinedNames structure
at line 991 in r1605 of src/hostapi/alsa/pa_linux_alsa.c
Here is an example of the messages now displayed since this change if
the current sound device doesn't support the "feature" listed in the
predefined names.
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Device enumeration is just one example of these ALSA lib messages output
but all messages from ALSA are displayed on the console now.
Perhaps the original thought that the error handler wasn't providing any
useful benefit was incorrect as mentioned in this comment in the r1543
diff;
+/** Uncommented because AlsaErrorHandler is unused for anything good yet.
I get regular inquires from users of squeezeslave worried that something
is broken since this change, when in fact the messages can be ignored.
I think that perhaps the AlsaErrorHandler needs to be reinstalled with the
additional changes described in the commit to avoid the seg fault of
course, as this helps hide the ALSA layer from PA.
Issue created by @RossBencina
[Trac: Originally assigned to none]
Ralph Irving submits:
Since the snd_lib_error_set_handler(AlsaErrorHandler) call was commented
out in r1543 of trunk/src/hostapi/alsa/pa_linux_alsa.c The ALSA
implementation now prints all ALSA lib messages to stderr, which is the
default if an error handler is not defined.
Before this change all error messages from the library were hidden, now
there is a flurry of messages when enumerating devices which don't exist.
The FindDeviceName function does this with the predefinedNames structure
at line 991 in r1605 of src/hostapi/alsa/pa_linux_alsa.c
Here is an example of the messages now displayed since this change if
the current sound device doesn't support the "feature" listed in the
predefined names.
Device enumeration is just one example of these ALSA lib messages output
but all messages from ALSA are displayed on the console now.
Perhaps the original thought that the error handler wasn't providing any
useful benefit was incorrect as mentioned in this comment in the r1543
diff;
+/** Uncommented because AlsaErrorHandler is unused for anything good yet.
I get regular inquires from users of squeezeslave worried that something
is broken since this change, when in fact the messages can be ignored.
I think that perhaps the AlsaErrorHandler needs to be reinstalled with the
additional changes described in the commit to avoid the seg fault of
course, as this helps hide the ALSA layer from PA.