alsactl: allow to compile alsactl without UCM support

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2020-05-14 19:54:04 +02:00
parent 0adca4cac7
commit 570ea6c455
2 changed files with 15 additions and 0 deletions

View 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" },

View file

@ -19,8 +19,12 @@
*
*/
#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