diff options
author | Michal Ratajsky <[email protected]> | 2015-12-10 00:18:03 +0100 |
---|---|---|
committer | Michal Ratajsky <[email protected]> | 2015-12-10 00:18:03 +0100 |
commit | 4e18483c922a6782610aa9878a5f49f9d94953cd (patch) | |
tree | 1d462a0658c47a1ec189936145f87203fea8964e /backends/alsa | |
parent | fd7bf59716421c96a7f7c2c6f3ae60636ef24d3d (diff) | |
download | libmatemixer-4e18483c922a6782610aa9878a5f49f9d94953cd.tar.bz2 libmatemixer-4e18483c922a6782610aa9878a5f49f9d94953cd.tar.xz |
alsa: Remove an invalid warning
Diffstat (limited to 'backends/alsa')
-rw-r--r-- | backends/alsa/alsa-backend.c | 14 |
1 files 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; } |