From 5680686fe00332256bea08c1957d07c74a1f9757 Mon Sep 17 00:00:00 2001
From: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
Date: Thu, 22 Aug 2013 15:07:46 -0400
Subject: [PATCH] alsa: log error message if snd_ctl_pcm_info fails

---
 daemon/src/audio/alsa/alsalayer.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/daemon/src/audio/alsa/alsalayer.cpp b/daemon/src/audio/alsa/alsalayer.cpp
index 4fb286fd73..11319d0a17 100644
--- a/daemon/src/audio/alsa/alsalayer.cpp
+++ b/daemon/src/audio/alsa/alsalayer.cpp
@@ -602,8 +602,9 @@ AlsaLayer::getAudioDeviceIndexMap(bool getCapture) const
                 snd_pcm_info_set_device(pcminfo , 0);
                 snd_pcm_info_set_stream(pcminfo, getCapture ? SND_PCM_STREAM_CAPTURE : SND_PCM_STREAM_PLAYBACK);
 
-                if (snd_ctl_pcm_info(handle ,pcminfo) < 0) {
-                    DEBUG(" Cannot get info");
+                int err;
+                if ((err = snd_ctl_pcm_info(handle ,pcminfo)) < 0) {
+                    WARN("Cannot get info: %s", snd_strerror(err));
                 } else {
                     DEBUG("card %i : %s [%s]",
                           numCard,
-- 
GitLab