USB-Audio: Scarlett 18i20 fix ADAT capture channel count for Gen 1/2
The Scarlett 18i20 Gen 1 (0x800c) and Gen 2 (0x8201) have 18 capture
channels, but the ADAT Optical Input device ("Direct 2") unconditionally
maps 8 channels (indices 12-19). Channel indices 18 and 19 exceed the
available capture channels, causing WirePlumber/PipeWire to reject the
UCM profile:
spa.alsa: Error in ALSA UCM profile for _ucm0003.hw:USB,0 (Direct2):
CaptureChannel6=18 >= CaptureChannels=18
Conditionally size the ADAT capture device based on DirectCaptureChannels:
- Gen 1/2 (18 channels): 6-channel ADAT (indices 12-17)
- Gen 3+ (20+ channels): 8-channel ADAT (indices 12-19)
Tested on a Scarlett 18i20 Gen 2 (USB1235:8201) running PipeWire 1.4
with WirePlumber on CachyOS.
Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/731 Signed-off-by: Derek Keith <derek@codeurge.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>