From: Jaroslav Kysela Date: Thu, 24 Apr 2025 11:21:10 +0000 (+0200) Subject: USB-Audio: Steinberg UR22C - fix capture channels for older firmware X-Git-Tag: v1.2.15~2 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=2ecc938e1fc2ecacfe5d871d5d9ae8e22df77b1a;p=alsa-ucm-conf.git USB-Audio: Steinberg UR22C - fix capture channels for older firmware It seems that firmware version 3.20 added 4 capture channels while previous firmware has only 2 capture channels. Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/554 Fixes: https://github.com/alsa-project/alsa-ucm-conf/issues/547 Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/USB-Audio/Steinberg/UR22C-HiFi.conf b/ucm2/USB-Audio/Steinberg/UR22C-HiFi.conf index 79ba681..35d4c45 100644 --- a/ucm2/USB-Audio/Steinberg/UR22C-HiFi.conf +++ b/ucm2/USB-Audio/Steinberg/UR22C-HiFi.conf @@ -6,7 +6,7 @@ Macro [ Name "steinberg_ur22c_mono_in" Direction Capture Channels 1 - HWChannels 4 + HWChannels "${var:DirectCaptureChannels}" HWChannelPos0 MONO HWChannelPos1 MONO } @@ -31,7 +31,7 @@ SectionDevice."Line 2" { Macro.pcm_split.SplitPCMDevice { Name "steinberg_ur22c_mono_in" Direction Capture - HWChannels 4 + HWChannels "${var:DirectCaptureChannels}" Channels 1 Channel0 0 ChannelPos0 MONO @@ -47,7 +47,7 @@ SectionDevice."Line 3" { Macro.pcm_split.SplitPCMDevice { Name "steinberg_ur22c_mono_in" Direction Capture - HWChannels 4 + HWChannels "${var:DirectCaptureChannels}" Channels 1 Channel0 1 ChannelPos0 MONO diff --git a/ucm2/USB-Audio/Steinberg/UR22C.conf b/ucm2/USB-Audio/Steinberg/UR22C.conf index f38b744..08e4100 100644 --- a/ucm2/USB-Audio/Steinberg/UR22C.conf +++ b/ucm2/USB-Audio/Steinberg/UR22C.conf @@ -1,11 +1,20 @@ Comment "Steinberg UR22C USB-Audio" +Define.DirectPlaybackChannels 2 +Define.DirectCaptureChannels 4 + +If.fw { + Condition { + Type RegexMatch + String "${sys-card:device/../bcdDevice}" + Match "0[12]??" + } + True.Define.DirectCaptureChannels 2 +} + SectionUseCase."HiFi" { Comment "HiFi" File "/USB-Audio/Steinberg/UR22C-HiFi.conf" } -Define.DirectPlaybackChannels 2 -Define.DirectCaptureChannels 2 - Include.dhw.File "/common/direct.conf"