On Fri, 2015-11-06 at 12:37 +0100, David Henningsson wrote: > We encountered an alsa plugin a while ago (not sure if the source > can be shared) which had mixer controls, but no descriptors to > poll for changes. > > Quit early to avoid latter assertion failures. > > BugLink: https://bugs.launchpad.net/bugs/1092377 > Signed-off-by: David Henningsson <[email protected]> > --- > > An oldie that's been hanging around in the Ubuntu tree for years now. > I think it makes sense for upstream; will push in one week if no one > complains. > > src/modules/alsa/alsa-mixer.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c > index 486da83..fdfee02 100644 > --- a/src/modules/alsa/alsa-mixer.c > +++ b/src/modules/alsa/alsa-mixer.c > @@ -329,6 +329,10 @@ static void defer_cb(pa_mainloop_api *a, pa_defer_event > *e, void *userdata) { > pa_log("snd_mixer_poll_descriptors_count() failed: %s", > pa_alsa_strerror(n)); > return; > } > + else if (n == 0) { > + pa_log_warn("Mixer has no poll descriptors. Please control mixer > from PulseAudio only."); > + return; > + } > num_fds = (unsigned) n; > > if (num_fds != fdl->num_fds) {
This should be done in pa_alsa_set_mixer_rtpoll() too. Otherwise looks good. -- Tanu _______________________________________________ pulseaudio-discuss mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
