mixer/alsa: handle ENODEV
Fixes busy loop when USB sound device gets unplugged (Mantis bug #3824).
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user