]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
USB-Audio: Steinberg UR22C, UR24C: apply the firmware channel count to Direct
authorPetr Mrázek <peterix@gmail.com>
Thu, 15 Oct 2026 01:08:55 +0000 (03:08 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 16 Nov 2026 10:16:20 +0000 (11:16 +0100)
The firmware condition sets DirectCaptureChannels to 2 for firmware
versions 01xx/02xx, but the Direct use case is created by a top-level
Macro, which UCM evaluates before If blocks. So the Direct use case
kept 4 capture channels on that firmware, while the HiFi use case
(loaded later) got 2.

Define the Direct use case inside the condition instead. With newer
firmware the result is unchanged.

Not tested on a UR22C or UR24C. It follows the same pattern as the
UR44 change in #882, which was tested on the device, and was checked
with alsaucm by evaluating both profiles on a UR44 whose bcdDevice
(0212) matches the firmware condition.

Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/883
Signed-off-by: Petr Mrázek <peterix@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/Steinberg/UR22C.conf
ucm2/USB-Audio/Steinberg/UR24C.conf

index 990c8ca6a15c77524f741f2f2d92b96c982f8842..b23c67156fbb32df6d84087771d9a58d71f6b786 100644 (file)
@@ -19,4 +19,7 @@ SectionUseCase."HiFi" {
 
 Include.dhw.File "/common/directm.conf"
 
-Macro.0.DirectUseCase { Id="Direct" PlaybackChannels="${var:DirectPlaybackChannels}" CaptureChannels="${var:DirectCaptureChannels}" }
+If.direct {
+       Condition { Type AlwaysTrue }
+       True.Macro.0.DirectUseCase { Id="Direct" PlaybackChannels="${var:DirectPlaybackChannels}" CaptureChannels="${var:DirectCaptureChannels}" }
+}
index becb69c9a86392eeff3173bee48ca4608ab98c13..b9f84e940ec50f6c9d0645901afe3dc0ffd9854c 100644 (file)
@@ -19,4 +19,7 @@ SectionUseCase."HiFi" {
 
 Include.dhw.File "/common/directm.conf"
 
-Macro.0.DirectUseCase { Id="Direct" PlaybackChannels="${var:DirectPlaybackChannels}" CaptureChannels="${var:DirectCaptureChannels}" }
+If.direct {
+       Condition { Type AlwaysTrue }
+       True.Macro.0.DirectUseCase { Id="Direct" PlaybackChannels="${var:DirectPlaybackChannels}" CaptureChannels="${var:DirectCaptureChannels}" }
+}