From 570ea6c455d1fe82c597e4ef9d5edbf07d6723dd Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 14 May 2020 19:54:04 +0200 Subject: [PATCH] alsactl: allow to compile alsactl without UCM support Signed-off-by: Jaroslav Kysela --- alsactl/alsactl.c | 2 ++ alsactl/init_ucm.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/alsactl/alsactl.c b/alsactl/alsactl.c index 1971d4e..6a0a395 100644 --- a/alsactl/alsactl.c +++ b/alsactl/alsactl.c @@ -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" }, diff --git a/alsactl/init_ucm.c b/alsactl/init_ucm.c index 9c05300..f6a43c5 100644 --- a/alsactl/init_ucm.c +++ b/alsactl/init_ucm.c @@ -19,8 +19,12 @@ * */ +#include "aconfig.h" #include #include "alsactl.h" + +#ifdef HAVE_ALSA_USE_CASE_H + #include /* @@ -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