hc
2024-08-12 233ab1bd4c5697f5cdec94e60206e8c6ac609b4c
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#
# This is the toplevel file included from the alsa-lib.
#
# It allows to add extra lookups for the old kernels or so.
#
# You may specify the directory (relative to the toplevel) and
# the master configuration file which defines the verbs.
#
 
#
# Syntax version is reset for the master configuration file.
#
 
Syntax 3
 
Define.V1 ""        # non-empty string to enable ucm v1 paths
Define.V2Module yes    # empty string to disable
Define.V2Name yes    # empty string to disable
 
If.driver {
   Condition {
       Type String
       Empty "${CardNumber}"
   }
   True {
       #
       # The probed path for no-hw-card:
       #
       #   ucm2/${OpenName}/${OpenName}.conf
       #
       UseCasePath {
           legacy {
               Directory "${OpenName}"
               File "${OpenName}.conf"
           }
       }
   }
   False {
 
       #
       # The probed path when hw-card is found:
       #
       #   ucm2/${KernelModule}/${KernelModule}.conf
       #   ucm2/${CardDriver}/${CardLongName}.conf
       #   ucm2/${CardDriver}/${CardDriver}.conf
       #
 
       If.V2Module {
           Condition {
               Type String
               Empty "${var:V2Module}"
           }
           False {
               Define.KernelModulePath "class/sound/card${CardNumber}/device/driver"
               Define.KernelModule "${sys:$KernelModulePath}"
               UseCasePath.module {
                   Directory "module"
                   File "${var:KernelModule}.conf"
               }
           }
       }
       If.V2Name {
           Condition {
               Type String
               Empty "${var:V2Name}"
           }
           False.UseCasePath {
               longname {
                   Directory "${CardDriver}"
                   File "${CardLongName}.conf"
               }
               driver {
                   Directory "${CardDriver}"
                   File "${CardDriver}.conf"
               }
           }
       }
   }
}
 
If.V1 {
   Condition {
       Type String
       Empty "${var:V1}"
   }
   False.If.v1_driver {
       Condition {
           Type String
           Empty "${CardNumber}"
       }
       True {
           #
           # The probed path for no-hw-card:
           #
           #   ucm/${OpenName}/${OpenName}.conf
           #
           UseCasePath.v1_legacy {
               Version 1
               Directory "${OpenName}"
               File "${OpenName}.conf"
           }
       }
       False {
           #
           # The ucm v1 probed path when hw-card is found:
           #
           #   ucm/${CardLongName}/${CardLongName}.conf
           #   ucm/${CardName}/${CardName}.conf or \
           #            ucm/${OpenName}/${OpenName}.conf
           #
           UseCasePath.v1_longname {
               Version 1
               Directory "${CardLongName}"
               File "${CardLongName}.conf"
           }
           If.v1_hw {
               Condition {
                   Type String
                   Haystack "${OpenName}"
                   Needle "hw:"
               }
               True.UseCasePath.v1_cardnamme {
                   Version 1
                   Directory "${CardName}"
                   File "${CardName}.conf"
               }
               False.UseCasePath.v1_openname {
                   Version 1
                   Directory "${OpenName}"
                   File "${OpenName}.conf"
               }
           }
       }
   }
}