From 4e18483c922a6782610aa9878a5f49f9d94953cd Mon Sep 17 00:00:00 2001 From: Michal Ratajsky Date: Thu, 10 Dec 2015 00:18:03 +0100 Subject: alsa: Remove an invalid warning --- backends/alsa/alsa-backend.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/backends/alsa/alsa-backend.c b/backends/alsa/alsa-backend.c index 8c4913a..b778cf1 100644 --- a/backends/alsa/alsa-backend.c +++ b/backends/alsa/alsa-backend.c @@ -314,14 +314,16 @@ read_device (AlsaBackend *alsa, const gchar *card) const gchar *id; gint ret; - /* The device may be already known, remove it if it's known and fails - * to be read, this happens for example when PulseAudio is killed */ + /* + * The device may be already known. + * + * Make sure it is removed from the list of devices if it fails to be + * read. This commonly happens with the "default" device, which is not + * reassigned by ALSA when the sound card is removed or the sound mixer + * quits. + */ ret = snd_ctl_open (&ctl, card, 0); if (ret < 0) { - g_warning ("Failed to open ALSA control for %s: %s", - card, - snd_strerror (ret)); - remove_device_by_name (alsa, card); return FALSE; } -- cgit v1.2.1