aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--src/mixer/alsa_mixer_plugin.c5
2 files changed, 7 insertions, 0 deletions
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;