]> git.alsa-project.org Git - alsa-ucm-conf.git/commit
USB-Audio/Focusrite: fix 18i20 gen1/gen2 digital capture input mapping
authorKim McCann <amplogik@gmail.com>
Sun, 28 Jun 2026 17:13:27 +0000 (10:13 -0700)
committerJaroslav Kysela <perex@perex.cz>
Fri, 9 Oct 2026 08:35:56 +0000 (10:35 +0200)
commit86287badcea19e9067fdb8ee7586682e2c65560e
tree4bbde7b9a2eb1a16bfc4832c879db23865caf697
parentcf2cd11b8a9c4646ac347288026212d6722b4982
USB-Audio/Focusrite: fix 18i20 gen1/gen2 digital capture input mapping

The 1st/2nd-gen Scarlett 18i20 expose 18 USB capture channels, laid out
as Analog 1-8 (ch 0-7), S/PDIF 1-2 (ch 8-9), ADAT 1-8 (ch 10-17). The
3rd/4th gen insert two extra channels at 8-9, shifting S/PDIF to 10-11
and ADAT to 12-19. The HiFi.conf only ever encoded the 20-channel layout
for the digital inputs.

A recent fix worked around the resulting out-of-range error on gen1/gen2
by shrinking the ADAT input to 6 channels (12-17), but that is incorrect:
gen1/gen2 still have all 8 ADAT inputs (they sit at 10-17), and their
S/PDIF inputs are at 8-9, not 10-11. The previous version therefore
dropped ADAT 7-8 and mislabelled ADAT 1-2 as S/PDIF.

Make the digital-input channel indices generation-aware via new
SpdifInCh*/AdatInCh* variables (default = 20-ch layout, overridden in the
gen1/gen2 blocks). Both layouts have 8 ADAT channels, so the conditional
channel-count split collapses back into a single Direct 2 device.

Verified on 1st-gen hardware (USB 1235:800c): the capture routing
(Input Source NN Capture Route) reports Analog 1-8 / S/PDIF 1-2 / ADAT
1-8 on channels 0-17, and the profile now parses without UCM errors.

Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/798
Signed-off-by: Kim McCann <amplogik@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/Focusrite/Scarlett-18i20-HiFi.conf
ucm2/USB-Audio/Focusrite/Scarlett-18i20.conf