From d397ce68dc003870810338b27a374579c3e1dc47 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 1 Oct 2013 16:29:54 +0200 Subject: [PATCH 1/3] prepare 0.17.6 --- NEWS | 2 ++ configure.ac | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f7c45514b..1b74287fc 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +ver 0.17.6 (not yet released) + ver 0.17.5 (2013/08/04) * protocol: - fix "playlistadd" with URI diff --git a/configure.ac b/configure.ac index fa2ec19ac..d9fd30115 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ(2.60) -AC_INIT(mpd, 0.17.5, musicpd-dev-team@lists.sourceforge.net) +AC_INIT(mpd, 0.17.6, musicpd-dev-team@lists.sourceforge.net) VERSION_MAJOR=0 VERSION_MINOR=17 From 72ef38d4a73c13b2278ac90e76df4247a633579d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 1 Oct 2013 16:30:20 +0200 Subject: [PATCH 2/3] mixer/alsa: log snd_mixer_handle_events() errors --- src/mixer/alsa_mixer_plugin.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mixer/alsa_mixer_plugin.c b/src/mixer/alsa_mixer_plugin.c index 22e4e22bd..cecf44db9 100644 --- a/src/mixer/alsa_mixer_plugin.c +++ b/src/mixer/alsa_mixer_plugin.c @@ -178,7 +178,12 @@ alsa_mixer_source_dispatch(GSource *_source, { struct alsa_mixer_source *source = (struct alsa_mixer_source *)_source; - snd_mixer_handle_events(source->mixer); + int err = snd_mixer_handle_events(source->mixer); + if (err < 0) { + g_warning("snd_mixer_handle_events() failed: %s", + snd_strerror(err)); + } + return true; } From 9a1076256deef8bf806942eb72eabdbfdf74ddb3 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 1 Oct 2013 16:33:07 +0200 Subject: [PATCH 3/3] mixer/alsa: handle ENODEV Fixes busy loop when USB sound device gets unplugged (Mantis bug #3824). --- NEWS | 2 ++ src/mixer/alsa_mixer_plugin.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 1b74287fc..d59b6ae7f 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.17.6 (not yet released) +* mixer: + - alsa: fix busy loop when USB sound device gets unplugged ver 0.17.5 (2013/08/04) * protocol: diff --git a/src/mixer/alsa_mixer_plugin.c b/src/mixer/alsa_mixer_plugin.c index cecf44db9..0c8625cc1 100644 --- a/src/mixer/alsa_mixer_plugin.c +++ b/src/mixer/alsa_mixer_plugin.c @@ -182,6 +182,11 @@ alsa_mixer_source_dispatch(GSource *_source, if (err < 0) { g_warning("snd_mixer_handle_events() failed: %s", snd_strerror(err)); + + if (err == -ENODEV) + /* the sound device was unplugged; disable + this GSource */ + return false; } return true;