Skip to content

Commit 3dd356e

Browse files
committed
USB-Audio: Scarlett 18i20 gen4 - improve channel detection
Use bcdDevice number (using sysfs) to detect the right channel count. Information is taken from the pull request comments bellow. Link: alsa-project#660 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
1 parent 286507e commit 3dd356e

1 file changed

Lines changed: 26 additions & 4 deletions

File tree

ucm2/USB-Audio/Focusrite/Scarlett-18i20.conf

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# The 18i20 provides 20 playback and 18 or 20 capture channels each:
1+
# Channel mapping
22
#
33
# +----+---------------+-----------------+
44
# | Ch | Inputs | Outputs |
@@ -100,9 +100,31 @@ If.gen4 {
100100
String "${CardComponents}"
101101
Regex "USB1235:821d"
102102
}
103-
True.Define {
104-
Generation "4th"
105-
DirectCaptureChannels 20
103+
True {
104+
Define {
105+
Generation "4th"
106+
DirectPlaybackChannels 26
107+
DirectCaptureChannels 26
108+
bcdDevice "${sys-card:device/../bcdDevice}"
109+
}
110+
If.fwp {
111+
# bcdNumbers 0900-097a
112+
Condition {
113+
Type RegexMatch
114+
String "${var:bcdDevice}"
115+
Match "(09[0-6].|097[0-9a])"
116+
}
117+
True.Define.DirectPlaybackChannels 24
118+
}
119+
If.fwc {
120+
# bcdNumbers 0000-08ff, 0900-097a
121+
Condition {
122+
Type RegexMatch
123+
String "${var:bcdDevice}"
124+
Match "(0[0-8]..|09[0-6].|097[0-9a])"
125+
}
126+
True.Define.DirectCaptureChannels 20
127+
}
106128
}
107129
}
108130

0 commit comments

Comments
 (0)