]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsactl: allow to compile alsactl without UCM support
authorJaroslav Kysela <perex@perex.cz>
Thu, 14 May 2020 17:54:04 +0000 (19:54 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 14 May 2020 17:54:04 +0000 (19:54 +0200)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsactl/alsactl.c
alsactl/init_ucm.c

index 1971d4e53fdfa0a2f73b126a331cfbab5d481619..6a0a395c3d4f9d3aedf2067d36c55a7186652bb0 100644 (file)
@@ -96,7 +96,9 @@ static struct arg args[] = {
 { 's', "syslog", "use syslog for messages" },
 { INTARG | 'n', "nice", "set the process priority (see 'man nice')" },
 { 'c', "sched-idle", "set the process scheduling policy to idle (SCHED_IDLE)" },
+#ifdef HAVE_ALSA_USE_CASE_H
 { 'D', "ucm-defaults", "execute also the UCM 'defaults' section" },
+#endif
 { HEADER, NULL, "Available commands:" },
 { CARDCMD, "store", "save current driver setup for one or each soundcards" },
 { EMPCMD, NULL, "  to configuration file" },
index 9c05300e4d2c5c3f21c0e9e4b009a106a125c0bc..f6a43c59f57b76f13ed813d5f7e27933125c291c 100644 (file)
  *
  */
 
+#include "aconfig.h"
 #include <stddef.h>
 #include "alsactl.h"
+
+#ifdef HAVE_ALSA_USE_CASE_H
+
 #include <alsa/use-case.h>
 
 /*
@@ -48,3 +52,12 @@ _error:
        snd_use_case_mgr_close(uc_mgr);
        return err;
 }
+
+#else
+
+int init_ucm(int flags, int cardno)
+{
+       return 0;
+}
+
+#endif