]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
USB-Audio: Add Behringer UMC202HD configuration
authorEiseiche <108142668+Eiseiche@users.noreply.github.com>
Tue, 12 Jul 2022 14:11:31 +0000 (14:11 +0000)
committerJaroslav Kysela <perex@perex.cz>
Mon, 29 Aug 2022 15:33:28 +0000 (17:33 +0200)
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/188
From: Eiseiche <108142668+Eiseiche@users.noreply.github.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/Behringer/UMC202HD-HiFi.conf [new file with mode: 0644]
ucm2/USB-Audio/Behringer/UMC202HD.conf [new file with mode: 0644]
ucm2/USB-Audio/USB-Audio.conf

diff --git a/ucm2/USB-Audio/Behringer/UMC202HD-HiFi.conf b/ucm2/USB-Audio/Behringer/UMC202HD-HiFi.conf
new file mode 100644 (file)
index 0000000..1b4f118
--- /dev/null
@@ -0,0 +1,88 @@
+Include.pcm_split.File "/common/pcm/split.conf"
+
+Macro [
+       {
+               SplitPCM {
+                       Name "umc202hd_mono_in"
+                       Direction Capture
+                       Channels 1
+                       HWChannels 2
+                       HWChannelPos0 MONO
+                       HWChannelPos1 MONO
+               }
+       }
+]
+
+Define.PCMMixerName "PCM"
+
+If.pcm_controls {
+       Condition {
+               Type ControlExists
+               Control "name='UMC202HD 192k Output Playback Switch'"
+       }
+       True.Define.PCMMixerName "UMC202HD 192k Output"
+}
+
+Include.ctl_remap.File "/common/ctl/remap.conf"
+
+Macro [
+       {
+               CtlRemapMonoVolSw {
+                       Dst "Input 1 Capture"
+                       Src "Mic Capture"
+                       Index 0
+               }
+       }
+       {
+               CtlRemapMonoVolSw {
+                       Dst "Input 2 Capture"
+                       Src "Mic Capture"
+                       Index 1
+               }
+       }
+]
+
+SectionDevice."Line1" {
+       Comment "Line A"
+       Value {
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId}"
+               PlaybackMixerElem "${var:PCMMixerName}"
+       }
+}
+
+SectionDevice."Mic1" {
+       Comment "Input 1"
+
+       Value {
+               CapturePriority 200
+               CaptureMixer "default:${CardId}"
+               CaptureMixerElem "Input 1"
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "umc202hd_mono_in"
+               Direction Capture
+               HWChannels 2
+               Channels 1
+               Channel0 0
+               ChannelPos0 MONO
+       }
+}
+
+SectionDevice."Mic2" {
+       Comment "Input 2"
+
+       Value {
+               CapturePriority 100
+               CaptureMixer "default:${CardId}"
+               CaptureMixerElem "Input 2"
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "umc202hd_mono_in"
+               Direction Capture
+               HWChannels 2
+               Channels 1
+               Channel0 1
+               ChannelPos0 MONO
+       }
+}
diff --git a/ucm2/USB-Audio/Behringer/UMC202HD.conf b/ucm2/USB-Audio/Behringer/UMC202HD.conf
new file mode 100644 (file)
index 0000000..5f5e5f5
--- /dev/null
@@ -0,0 +1,11 @@
+Comment "Behringer UMC202HD"
+
+SectionUseCase."HiFi" {
+       Comment "Default"
+       File "/USB-Audio/Behringer/UMC202HD-HiFi.conf"
+}
+
+Define.DirectPlaybackChannels 2
+Define.DirectCaptureChannels 2
+
+Include.dhw.File "/common/direct.conf"
index 673ebdb367a4bebee55bd6779d6826d8eacd60b0..d92fc75c5ce99807fe2b8cea22b04d34b1494858 100644 (file)
@@ -131,6 +131,18 @@ If.focusrite-scarlett-2i4-gen2 {
        }
 }
 
+If.behringer-umc202hd {
+       Condition {
+               Type String
+               Haystack "${CardComponents}"
+               Needle "USB1397:0507"
+       }
+       True.Define {
+               ProfileName "Behringer/UMC202HD"
+               MixerRemap yes
+       }
+}
+
 If.behringer-umc204hd {
        Condition {
                Type String