1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
From c8871d039815024fb1aba7a10942815bdb062d4d Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sun, 27 Jun 2021 01:17:55 -0700
Subject: [PATCH] Fix build with --disable-ucm
A recent change introduced a dependency on ucm to several of the
other components, but this was not made conditional on whether
BUILD_UCM is enabled.
Signed-off-by: Michael Forney <mforney@mforney.org>
---
src/control/control.c | 5 ++++-
src/pcm/pcm.c | 5 ++++-
src/rawmidi/rawmidi.c | 5 ++++-
src/seq/seq.c | 5 ++++-
src/timer/timer.c | 5 ++++-
5 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/src/control/control.c b/src/control/control.c
index 4c2ae7f5..29eff715 100644
--- a/src/control/control.c
+++ b/src/control/control.c
@@ -1611,11 +1611,14 @@ int snd_ctl_open(snd_ctl_t **ctlp, const char *name, int mode)
int err;
assert(ctlp && name);
+#ifdef BUILD_UCM
if (_snd_is_ucm_device(name)) {
name = uc_mgr_alibcfg_by_device(&top, name);
if (name == NULL)
return -ENODEV;
- } else {
+ } else
+#endif
+ {
err = snd_config_update_ref(&top);
if (err < 0)
return err;
diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
index 18b1246e..23b27697 100644
--- a/src/pcm/pcm.c
+++ b/src/pcm/pcm.c
@@ -2747,11 +2747,14 @@ int snd_pcm_open(snd_pcm_t **pcmp, const char *name,
int err;
assert(pcmp && name);
+#ifdef BUILD_UCM
if (_snd_is_ucm_device(name)) {
name = uc_mgr_alibcfg_by_device(&top, name);
if (name == NULL)
return -ENODEV;
- } else {
+ } else
+#endif
+ {
err = snd_config_update_ref(&top);
if (err < 0)
return err;
diff --git a/src/rawmidi/rawmidi.c b/src/rawmidi/rawmidi.c
index c4b45fa2..bb09e58d 100644
--- a/src/rawmidi/rawmidi.c
+++ b/src/rawmidi/rawmidi.c
@@ -316,11 +316,14 @@ int snd_rawmidi_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
int err;
assert((inputp || outputp) && name);
+#ifdef BUILD_UCM
if (_snd_is_ucm_device(name)) {
name = uc_mgr_alibcfg_by_device(&top, name);
if (name == NULL)
return -ENODEV;
- } else {
+ } else
+#endif
+ {
err = snd_config_update_ref(&top);
if (err < 0)
return err;
diff --git a/src/seq/seq.c b/src/seq/seq.c
index 5eac4848..71b2624f 100644
--- a/src/seq/seq.c
+++ b/src/seq/seq.c
@@ -978,11 +978,14 @@ int snd_seq_open(snd_seq_t **seqp, const char *name,
int err;
assert(seqp && name);
+#if BUILD_UCM
if (_snd_is_ucm_device(name)) {
name = uc_mgr_alibcfg_by_device(&top, name);
if (name == NULL)
return -ENODEV;
- } else {
+ } else
+#endif
+ {
err = snd_config_update_ref(&top);
if (err < 0)
return err;
diff --git a/src/timer/timer.c b/src/timer/timer.c
index a139356b..1922981a 100644
--- a/src/timer/timer.c
+++ b/src/timer/timer.c
@@ -205,11 +205,14 @@ int snd_timer_open(snd_timer_t **timer, const char *name, int mode)
int err;
assert(timer && name);
+#ifdef BUILD_UCM
if (_snd_is_ucm_device(name)) {
name = uc_mgr_alibcfg_by_device(&top, name);
if (name == NULL)
return -ENODEV;
- } else {
+ } else
+#endif
+ {
err = snd_config_update_ref(&top);
if (err < 0)
return err;
--
2.44.0
|