]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
USB-Audio: Steinberg UR22C - fix capture channels for older firmware
authorJaroslav Kysela <perex@perex.cz>
Thu, 24 Apr 2025 11:21:10 +0000 (13:21 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sun, 7 Dec 2025 09:42:37 +0000 (10:42 +0100)
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 <perex@perex.cz>
ucm2/USB-Audio/Steinberg/UR22C-HiFi.conf
ucm2/USB-Audio/Steinberg/UR22C.conf

index 79ba681899f0f779a3d745d5846fc7e1438d6fe3..35d4c4541d52e0d1d1bc9d7dea02dc4cacd9c3f2 100644 (file)
@@ -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
index f38b7449b1adbac5fceef250c37f0069c4fcfeb3..08e41002eb38fb8786eb04a48a662fc9864a59c0 100644 (file)
@@ -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"