From 56359fa2b706f0bb7f190e36dd0bf812dcaa0510 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 23 May 2022 18:19:56 +0200 Subject: [PATCH] ucm2: USB-Audio/Steinberg/UR44: use SplitPCM macro Signed-off-by: Jaroslav Kysela --- ucm2/USB-Audio/Steinberg/UR44-HiFi.conf | 264 ++++++++++-------------- 1 file changed, 112 insertions(+), 152 deletions(-) diff --git a/ucm2/USB-Audio/Steinberg/UR44-HiFi.conf b/ucm2/USB-Audio/Steinberg/UR44-HiFi.conf index 6d6b453..2f826b4 100644 --- a/ucm2/USB-Audio/Steinberg/UR44-HiFi.conf +++ b/ucm2/USB-Audio/Steinberg/UR44-HiFi.conf @@ -1,202 +1,162 @@ -LibraryConfig.pcm.Config { - - pcm.steinberg_ur44_mono_in { - @args [ CARD CHAN ] - @args { - CARD.type string - CHAN.type integer - } - type dsnoop - ipc_key 582201 - slave { - pcm { - type hw - card $CARD - device 0 - } - channels 6 - } - bindings.0 $CHAN - } - - pcm.steinberg_ur44_stereo_out { - @args [ CARD CHN0 CHN1 ] - @args { - CARD.type string - CHN0.type integer - CHN1.type integer - } - type dshare - ipc_key 582101 - slave { - pcm { - type hw - card $CARD - device 0 - } - channels 4 +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 } - bindings.0 $CHN0 - bindings.1 $CHN1 } - - pcm.steinberg_ur44_input1 { - @args [ CARD ] - @args.CARD.type string - type empty - slave.pcm { - @func concat - strings [ "steinberg_ur44_mono_in:" $CARD ",0" ] - } - } - - pcm.steinberg_ur44_input2 { - @args [ CARD ] - @args.CARD.type string - type empty - slave.pcm { - @func concat - strings [ "steinberg_ur44_mono_in:" $CARD ",1" ] + { + SplitPCM { + Name "steinberg_ur44_mono_in" + Direction Playback + Channels 1 + HWChannels 6 + HWChannelPos0 MONO + HWChannelPos1 MONO + HWChannelPos2 MONO + HWChannelPos3 MONO + HWChannelPos4 MONO + HWChannelPos5 MONO } } +] - pcm.steinberg_ur44_input3 { - @args [ CARD ] - @args.CARD.type string - type empty - slave.pcm { - @func concat - strings [ "steinberg_ur44_mono_in:" $CARD ",2" ] - } - } +SectionDevice."Line1" { + Comment "Line Outputs 1 and 2" - pcm.steinberg_ur44_input4 { - @args [ CARD ] - @args.CARD.type string - type empty - slave.pcm { - @func concat - strings [ "steinberg_ur44_mono_in:" $CARD ",3" ] - } + Value { + PlaybackPriority 200 } - - pcm.steinberg_ur44_input5 { - @args [ CARD ] - @args.CARD.type string - type empty - slave.pcm { - @func concat - strings [ "steinberg_ur44_mono_in:" $CARD ",4" ] - } + Macro.pcm_split.SplitPCMDevice { + Name "steinberg_ur44_stereo_out" + Direction Playback + HWChannels 4 + Channels 2 + Channel0 0 + Channel1 1 + ChannelPos0 FL + ChannelPos0 FR } +} - pcm.steinberg_ur44_input6 { - @args [ CARD ] - @args.CARD.type string - type empty - slave.pcm { - @func concat - strings [ "steinberg_ur44_mono_in:" $CARD ",5" ] - } - } +SectionDevice."Line2" { + Comment "Line Outputs 3 and 4" - pcm.steinberg_ur44_stereo1 { - @args [ CARD ] - @args.CARD.type string - type empty - slave.pcm { - @func concat - strings [ "steinberg_ur44_stereo_out:" $CARD ",0,1" ] - } + Value { + PlaybackPriority 100 } - - pcm.steinberg_ur44_stereo2 { - @args [ CARD ] - @args.CARD.type string - type empty - slave.pcm { - @func concat - strings [ "steinberg_ur44_stereo_out:" $CARD ",2,3" ] - } + Macro.pcm_split.SplitPCMDevice { + Name "steinberg_ur44_stereo_out" + Direction Playback + HWChannels 4 + Channels 2 + Channel0 0 + Channel1 1 + ChannelPos0 FL + ChannelPos0 FR } } -SectionDevice."Input1" { - Comment "Input 1" +SectionDevice."Line3" { + Comment "Mono Input 1" Value { - CaptureChannels 1 CapturePriority 600 - CapturePCM "steinberg_ur44_input1:${CardId}" + } + Macro.pcm_split.SplitPCMDevice { + Name "steinberg_ur44_mono_in" + Direction Capture + HWChannels 6 + Channels 1 + Channel0 0 + ChannelPos0 MONO } } -SectionDevice."Input2" { - Comment "Input 2" +SectionDevice."Line4" { + Comment "Mono Input 2" Value { - CaptureChannels 1 CapturePriority 500 - CapturePCM "steinberg_ur44_input2:${CardId}" + } + Macro.pcm_split.SplitPCMDevice { + Name "steinberg_ur44_mono_in" + Direction Capture + HWChannels 6 + Channels 1 + Channel0 1 + ChannelPos0 MONO } } -SectionDevice."Input3" { - Comment "Input 3" +SectionDevice."Line5" { + Comment "Mono Input 3" Value { - CaptureChannels 1 CapturePriority 400 - CapturePCM "steinberg_ur44_input3:${CardId}" + } + Macro.pcm_split.SplitPCMDevice { + Name "steinberg_ur44_mono_in" + Direction Capture + HWChannels 6 + Channels 1 + Channel0 2 + ChannelPos0 MONO } } -SectionDevice."Input4" { - Comment "Input 4" +SectionDevice."Line6" { + Comment "Mono Input 4" Value { - CaptureChannels 1 CapturePriority 300 - CapturePCM "steinberg_ur44_input4:${CardId}" + } + Macro.pcm_split.SplitPCMDevice { + Name "steinberg_ur44_mono_in" + Direction Capture + HWChannels 6 + Channels 1 + Channel0 3 + ChannelPos0 MONO } } -SectionDevice."Input5" { - Comment "Input 5" +SectionDevice."Line7" { + Comment "Mono Input 5" Value { - CaptureChannels 1 CapturePriority 200 - CapturePCM "steinberg_ur44_input5:${CardId}" } -} - -SectionDevice."Input6" { - Comment "Input 6" - - Value { - CaptureChannels 1 - CapturePriority 100 - CapturePCM "steinberg_ur44_input6:${CardId}" + Macro.pcm_split.SplitPCMDevice { + Name "steinberg_ur44_mono_in" + Direction Capture + HWChannels 6 + Channels 1 + Channel0 4 + ChannelPos0 MONO } } -SectionDevice."Stereo 1" { - Comment "Line Outputs 1 and 2" +SectionDevice."Line8" { + Comment "Mono Input 6" Value { - PlaybackChannels 2 - PlaybackPriority 200 - PlaybackPCM "steinberg_ur44_stereo1:${CardId}" + CapturePriority 100 } -} - -SectionDevice."Stereo 2" { - Comment "Line Outputs 3 and 4" - - Value { - PlaybackChannels 2 - PlaybackPriority 100 - PlaybackPCM "steinberg_ur44_stereo2:${CardId}" + Macro.pcm_split.SplitPCMDevice { + Name "steinberg_ur44_mono_in" + Direction Capture + HWChannels 6 + Channels 1 + Channel0 5 + ChannelPos0 MONO } } -- 2.47.1