From 0e4d22ff854c04d287d3f89122cb927c9b35800d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 15 Oct 2026 02:34:53 +0200 Subject: [PATCH] USB-Audio: Steinberg UR44: support the non-class-compliant mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit With its [CC MODE] switch off, the UR44 enumerates as 0499:150e and has six playback channels instead of four: DAW Mix 1, DAW Mix 2 and an FX Bus that feeds the built-in REV-X reverb (the channel order was checked with the device's own meters). Match that id, split the playback PCM from 4 or 6 channels, and add an "FX Bus" device when the FX Bus exists. The Direct use case is defined inside the condition, as UCM evaluates Macro before If blocks. Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/882 Signed-off-by: Petr Mrázek Signed-off-by: Jaroslav Kysela --- ucm2/USB-Audio/Steinberg/UR44-HiFi.conf | 73 ++++++++++++++++++++----- ucm2/USB-Audio/Steinberg/UR44.conf | 19 ++++++- ucm2/USB-Audio/USB-Audio.conf | 3 +- 3 files changed, 79 insertions(+), 16 deletions(-) diff --git a/ucm2/USB-Audio/Steinberg/UR44-HiFi.conf b/ucm2/USB-Audio/Steinberg/UR44-HiFi.conf index 5c1fd7e..c505c3e 100644 --- a/ucm2/USB-Audio/Steinberg/UR44-HiFi.conf +++ b/ucm2/USB-Audio/Steinberg/UR44-HiFi.conf @@ -1,18 +1,37 @@ Include.pcm_split.File "/common/pcm/split.conf" -Macro [ - { - SplitPCM { - Name "steinberg_ur44_stereo_out" - Direction Playback - Channels 2 - HWChannels 4 - HWChannelPos0 FL - HWChannelPos1 FR - HWChannelPos2 FL - HWChannelPos3 FR - } +# Playback: DAW Mix 1 and Mix 2, and with the [CC MODE] switch off also the FX Bus +If.out { + Condition { + Type String + String1 "${var:DirectPlaybackChannels}" + String2 "6" } + True.Macro.out.SplitPCM { + Name "steinberg_ur44_stereo_out" + Direction Playback + Channels 2 + HWChannels 6 + HWChannelPos0 FL + HWChannelPos1 FR + HWChannelPos2 FL + HWChannelPos3 FR + HWChannelPos4 FL + HWChannelPos5 FR + } + False.Macro.out.SplitPCM { + Name "steinberg_ur44_stereo_out" + Direction Playback + Channels 2 + HWChannels 4 + HWChannelPos0 FL + HWChannelPos1 FR + HWChannelPos2 FL + HWChannelPos3 FR + } +} + +Macro [ { SplitPCM { Name "steinberg_ur44_stereo_in" @@ -52,7 +71,7 @@ SectionDevice."Line 1" { Macro.pcm_split.SplitPCMDevice { Name "steinberg_ur44_stereo_out" Direction Playback - HWChannels 4 + HWChannels "${var:DirectPlaybackChannels}" Channels 2 Channel0 0 Channel1 1 @@ -70,7 +89,7 @@ SectionDevice."Line 2" { Macro.pcm_split.SplitPCMDevice { Name "steinberg_ur44_stereo_out" Direction Playback - HWChannels 4 + HWChannels "${var:DirectPlaybackChannels}" Channels 2 Channel0 2 Channel1 3 @@ -79,6 +98,32 @@ SectionDevice."Line 2" { } } +# With the [CC MODE] switch off: the FX Bus, a stereo input of the REV-X reverb +If.fxbus { + Condition { + Type String + String1 "${var:DirectPlaybackChannels}" + String2 "6" + } + True.SectionDevice."Line 13" { + Comment "FX Bus" + + Value { + PlaybackPriority 50 + } + Macro.pcm_split.SplitPCMDevice { + Name "steinberg_ur44_stereo_out" + Direction Playback + HWChannels 6 + Channels 2 + Channel0 4 + Channel1 5 + ChannelPos0 FL + ChannelPos1 FR + } + } +} + SectionDevice."Line 3" { Comment "Front 1" diff --git a/ucm2/USB-Audio/Steinberg/UR44.conf b/ucm2/USB-Audio/Steinberg/UR44.conf index 7d1e408..406b402 100644 --- a/ucm2/USB-Audio/Steinberg/UR44.conf +++ b/ucm2/USB-Audio/Steinberg/UR44.conf @@ -1,5 +1,19 @@ Comment "Steinberg UR44 USB-Audio" +# Class Compliant mode: DAW 1/2 (Mix 1) and DAW 3/4 (Mix 2). With its [CC MODE] switch off the device has another +# USB id (0499:150e) and two more playback channels: the FX Bus, a stereo input of the REV-X reverb. +Define.DirectPlaybackChannels 4 +Define.DirectCaptureChannels 6 + +If.fxbus { + Condition { + Type RegexMatch + String "${CardComponents}" + Regex "USB0499:150e" + } + True.Define.DirectPlaybackChannels 6 +} + SectionUseCase."HiFi" { Comment "Default" File "/USB-Audio/Steinberg/UR44-HiFi.conf" @@ -7,4 +21,7 @@ SectionUseCase."HiFi" { Include.dhw.File "/common/directm.conf" -Macro.0.DirectUseCase { Id="Direct" PlaybackChannels=4 CaptureChannels=6 } +If.direct { + Condition { Type AlwaysTrue } + True.Macro.0.DirectUseCase { Id="Direct" PlaybackChannels="${var:DirectPlaybackChannels}" CaptureChannels="${var:DirectCaptureChannels}" } +} diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf index a724879..f0ed57d 100644 --- a/ucm2/USB-Audio/USB-Audio.conf +++ b/ucm2/USB-Audio/USB-Audio.conf @@ -143,7 +143,8 @@ Macro.steinberg-ur22c.StringMatch "Id='0499:172f' Profile='Steinberg/UR22C'" Macro.steinberg-ur22mkii.StringMatch "Id='0499:170f' Profile='Steinberg/UR22mkII'" Macro.steinberg-ur24c.StringMatch "Id='0499:174d' Profile='Steinberg/UR24C'" Macro.steinberg-ur44c.StringMatch "Id='0499:1730' Profile='Steinberg/UR44C'" -Macro.steinberg-ur44.RegexMatch "Id='0499:17((00)|(04))' Profile='Steinberg/UR44'" +# 0499:1704 Steinberg UR44 in Class Compliant mode, 0499:150e with its [CC MODE] switch off +Macro.steinberg-ur44.RegexMatch "Id='0499:((17((00)|(04)))|(150e))' Profile='Steinberg/UR44'" Macro.sony-inzone-h9-h7.StringMatch "Id='054c:0e53' Profile='Sony/Inzone-H9-H7'" # 054c:0ce6 Sony Corp. DualSense wireless controller (PS5) -- 2.52.0