]> git.alsa-project.org Git - alsa-ucm-conf.git/blob - ucm2/ucm.conf
fb1a0bef69ca1a632502835defccf0cb310d687c
[alsa-ucm-conf.git] / ucm2 / ucm.conf
1 #
2 # This is the toplevel file included from the alsa-lib.
3 #
4 # It allows to add extra lookups for the old kernels or so.
5 #
6 # You may specify the directory (relative to the toplevel) and
7 # the master configuration file which defines the verbs.
8 #
9
10 #
11 # Syntax version is reset for the master configuration file.
12 #
13
14 Syntax 4
15
16 Define.V1 ""            # non-empty string to enable ucm v1 paths
17 Define.V2ConfD yes      # empty string to disable
18 Define.V2Module ""      # non-empty string to enable module name lookups (obsolete)
19 Define.V2Name ""        # non-empty string to enable driver & card name lookups (obsolete)
20
21 Include.libgen.File "/lib/generic.conf"  # private alsa-lib configuration
22
23 If.driver {
24         Condition {
25                 Type String
26                 Empty "${CardNumber}"
27         }
28         True {
29                 #
30                 # The probed path for no-hw-card:
31                 #
32                 #   ucm2/conf.virt.d/${OpenName}.conf
33                 #   ucm2/${OpenName}/${OpenName}.conf
34                 #
35                 UseCasePath {
36                         virt {
37                                 Directory "conf.virt.d"
38                                 File "${OpenName}.conf"
39                         }
40                         legacy {
41                                 Directory "${OpenName}"
42                                 File "${OpenName}.conf"
43                         }
44                 }
45         }
46         False {
47
48                 #
49                 # The probed path when hw-card is found:
50                 #
51                 #   ucm2/conf.d/[${CardDriver}|${KernelDriver}]/${CardLongName}.conf
52                 #   ucm2/conf.d/[${CardDriver}|${KernelDriver}]/[${CardDriver}|${KernelDriver}].conf
53                 #   ucm2/${KernelModule}/${KernelModule}.conf (obsolete)
54                 #   ucm2/${CardDriver}/${CardLongName}.conf (obsolete)
55                 #   ucm2/${CardDriver}/${CardDriver}.conf (obsolete)
56                 #
57
58                 If.V2ConfD {
59                         Condition {
60                                 Type String
61                                 Empty "${var:V2ConfD}"
62                         }
63                         False {
64                                 Define.Driver "${CardDriver}"
65                                 If.nodrv {
66                                         Condition {
67                                                 Type String
68                                                 Empty "${var:Driver}"
69                                         }
70                                         True.Define {
71                                                 KernelDriverPath "class/sound/card${CardNumber}/device/driver"
72                                                 Driver "${sys:$KernelDriverPath}"
73                                         }
74                                 }
75                                 UseCasePath.confd1 {
76                                         Directory "conf.d/${var:Driver}"
77                                         File "${CardLongName}.conf"
78                                 }
79                                 UseCasePath.confd2 {
80                                         Directory "conf.d/${var:Driver}"
81                                         File "${var:Driver}.conf"
82                                 }
83                         }
84                 }
85                 If.V2Module {
86                         Condition {
87                                 Type String
88                                 Empty "${var:V2Module}"
89                         }
90                         False {
91                                 Define.KernelModulePath "class/sound/card${CardNumber}/device/driver/module"
92                                 Define.KernelModule "$${sys:$KernelModulePath}"
93                                 UseCasePath.module {
94                                         Directory "module"
95                                         File "${var:KernelModule}.conf"
96                                 }
97                         }
98                 }
99                 If.V2Name {
100                         Condition {
101                                 Type String
102                                 Empty "${var:V2Name}"
103                         }
104                         False.UseCasePath {
105                                 longname {
106                                         Directory "${CardDriver}"
107                                         File "${CardLongName}.conf"
108                                 }
109                                 driver {
110                                         Directory "${CardDriver}"
111                                         File "${CardDriver}.conf"
112                                 }
113                         }
114                 }
115         }
116 }
117
118 If.V1 {
119         Condition {
120                 Type String
121                 Empty "${var:V1}"
122         }
123         False.If.v1_driver {
124                 Condition {
125                         Type String
126                         Empty "${CardNumber}"
127                 }
128                 True {
129                         #
130                         # The probed path for no-hw-card:
131                         #
132                         #   ucm/${OpenName}/${OpenName}.conf
133                         #
134                         UseCasePath.v1_legacy {
135                                 Version 1
136                                 Directory "${OpenName}"
137                                 File "${OpenName}.conf"
138                         }
139                 }
140                 False {
141                         #
142                         # The ucm v1 probed path when hw-card is found:
143                         #
144                         #   ucm/${CardLongName}/${CardLongName}.conf
145                         #   ucm/${CardName}/${CardName}.conf or \
146                         #                       ucm/${OpenName}/${OpenName}.conf
147                         #
148                         UseCasePath.v1_longname {
149                                 Version 1
150                                 Directory "${CardLongName}"
151                                 File "${CardLongName}.conf"
152                         }
153                         If.v1_hw {
154                                 Condition {
155                                         Type String
156                                         Haystack "${OpenName}"
157                                         Needle "hw:"
158                                 }
159                                 True.UseCasePath.v1_cardnamme {
160                                         Version 1
161                                         Directory "${CardName}"
162                                         File "${CardName}.conf"
163                                 }
164                                 False.UseCasePath.v1_openname {
165                                         Version 1
166                                         Directory "${OpenName}"
167                                         File "${OpenName}.conf"
168                                 }
169                         }
170                 }
171         }
172 }