aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2018-06-07 17:44:23 +0200
committerThierry Bultel <thierry.bultel@iot.bzh>2018-06-07 17:44:23 +0200
commit6e76663f37a91641bae1bad05512968cdbe53f10 (patch)
tree7562aad56d62995f035ccae56a95d6d288f43813
parentc84aff5a6d89e291293b28ca718701d43e24e358 (diff)
Added log for card lookup diagnostic
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
-rw-r--r--conf.d/project/lua.d/smixer-test-usb_2ch.lua (renamed from conf.d/project/lua.d/smixer-test-simple.lua)0
-rw-r--r--plugins/alsa/alsa-core-ctl.c2
-rw-r--r--plugins/alsa/alsa-utils-bypath.c7
3 files changed, 7 insertions, 2 deletions
diff --git a/conf.d/project/lua.d/smixer-test-simple.lua b/conf.d/project/lua.d/smixer-test-usb_2ch.lua
index 99893c1..99893c1 100644
--- a/conf.d/project/lua.d/smixer-test-simple.lua
+++ b/conf.d/project/lua.d/smixer-test-usb_2ch.lua
diff --git a/plugins/alsa/alsa-core-ctl.c b/plugins/alsa/alsa-core-ctl.c
index 0ef11e1..bdf6bf5 100644
--- a/plugins/alsa/alsa-core-ctl.c
+++ b/plugins/alsa/alsa-core-ctl.c
@@ -269,6 +269,8 @@ PUBLIC snd_ctl_card_info_t *AlsaCtlGetInfo(SoftMixerT *mixer, const char *cardid
int error;
snd_ctl_t *ctl;
+ AFB_ApiNotice(mixer->api, "Looking for card '%s'", cardid);
+
if ((error = snd_ctl_open(&ctl, cardid, SND_CTL_READONLY)) < 0) {
cardid = "Not Defined";
goto OnErrorExit;
diff --git a/plugins/alsa/alsa-utils-bypath.c b/plugins/alsa/alsa-utils-bypath.c
index 30e528f..f950129 100644
--- a/plugins/alsa/alsa-utils-bypath.c
+++ b/plugins/alsa/alsa-utils-bypath.c
@@ -97,8 +97,11 @@ PUBLIC snd_ctl_t *AlsaByPathOpenCtl(SoftMixerT *mixer, const char *uid, AlsaSndC
// get card info from /dev/snd/xxx if not use hw:x,x,x
snd_ctl_card_info_t *cardInfo = NULL;
- if (dev->cid.devpath) cardInfo = AlsaByPathInfo(mixer, dev->cid.devpath);
- else if (dev->cid.cardid) cardInfo = AlsaCtlGetInfo(mixer, dev->cid.cardid);
+
+ if (dev->cid.devpath)
+ cardInfo = AlsaByPathInfo(mixer, dev->cid.devpath);
+ else if (dev->cid.cardid)
+ cardInfo = AlsaCtlGetInfo(mixer, dev->cid.cardid);
if (!cardInfo) {
AFB_ApiError(mixer->api, "AlsaByPathOpenCtl: uid=%s fail to find sndcard by path=%s id=%s", uid, dev->cid.devpath, dev->cid.cardid);