]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
Add profile for Behringer UMC204HD
authorbrndd <burneddi@gmail.com>
Sun, 12 Dec 2021 07:19:06 +0000 (09:19 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 10 May 2022 15:01:14 +0000 (17:01 +0200)
Link: https://github.com/alsa-project/alsa-ucm-conf/pull/128
Signed-off-by: Peter Wedder <burneddi@gmail.com>
ucm2/USB-Audio/Behringer/UMC204HD-HiFi.conf [new file with mode: 0644]
ucm2/USB-Audio/Behringer/UMC204HD.conf [new file with mode: 0644]
ucm2/USB-Audio/USB-Audio.conf

diff --git a/ucm2/USB-Audio/Behringer/UMC204HD-HiFi.conf b/ucm2/USB-Audio/Behringer/UMC204HD-HiFi.conf
new file mode 100644 (file)
index 0000000..6e6354d
--- /dev/null
@@ -0,0 +1,168 @@
+LibraryConfig.pcm.Config {
+       pcm.umc204hd_stereo_out {
+               @args [ CARD CHN0 CHN1 ]
+               @args {
+                       CARD.type string
+                       CHN0.type integer
+                       CHN1.type integer
+               }
+               type dshare
+               ipc_key 572442
+               slave {
+                       pcm {
+                               type hw
+                               card $CARD
+                               device 0
+                       }
+                       channels 4
+               }
+               bindings.0 $CHN0
+               bindings.1 $CHN1
+       }
+
+       pcm.umc204hd_mono_in {
+               @args [ CARD CHN0 ]
+               @args {
+                       CARD.type string
+                       CHN0.type integer
+               }
+               type dsnoop
+               ipc_key 572542
+               slave {
+                       pcm {
+                               type hw
+                               card $CARD
+                               device 0
+                       }
+                       channels 2
+               }
+               bindings.0 $CHN0
+       }
+
+       pcm.umc204hd_line1 {
+               @args [ CARD ]
+               @args.CARD.type string
+               type empty
+               slave.pcm {
+                       @func concat
+                       strings [ "umc204hd_stereo_out:" $CARD ",0,1" ]
+               }
+       }
+
+       pcm.umc204hd_line2 {
+               @args [ CARD ]
+               @args.CARD.type string
+               type empty
+               slave.pcm {
+                       @func concat
+                       strings [ "umc204hd_stereo_out:" $CARD ",2,3" ]
+               }
+       }
+
+       pcm.umc204hd_mic1 {
+               @args [ CARD ]
+               @args.CARD.type string
+               type empty
+               slave.pcm {
+                       @func concat
+                       strings [ "umc204hd_mono_in:" $CARD ",0" ]
+               }
+       }
+
+       pcm.umc204hd_mic2 {
+               @args [ CARD ]
+               @args.CARD.type string
+               type empty
+               slave.pcm {
+                       @func concat
+                       strings [ "umc204hd_mono_in:" $CARD ",1" ]
+               }
+       }
+
+       ctl.umc204hd {
+               @args [ CARD ]
+               @args.CARD.type string
+               type remap
+               child {
+                       type hw
+                       card $CARD
+               }
+               map {
+                       "name='Line A Playback Volume'"."name='UMC204HD 192k Output Playback Volume'" {
+                               vindex.0 0
+                               vindex.1 1
+                       }
+                       "name='Line A Playback Switch'"."name='UMC204HD 192k Output Playback Switch'" {
+                               vindex.0 0
+                               vindex.1 1
+                       }
+                       "name='Line B Playback Volume'"."name='UMC204HD 192k Output Playback Volume'" {
+                               vindex.0 2
+                               vindex.1 3
+                       }
+                       "name='Line B Playback Switch'"."name='UMC204HD 192k Output Playback Switch'" {
+                               vindex.0 2
+                               vindex.1 3
+                       }
+                       "name='Input 1 Capture Volume'"."name='Mic Capture Volume'" {
+                               vindex.0 0
+                       }
+                       "name='Input 1 Capture Switch'"."name='Mic Capture Switch'" {
+                               vindex.0 0
+                       }
+                       "name='Input 2 Capture Volume'"."name='Mic Capture Volume'" {
+                               vindex.0 1
+                       }
+                       "name='Input 2 Capture Switch'"."Name='Mic Capture Switch'" {
+                               vindex.0 1
+                       }
+               }
+       }
+}
+
+SectionDevice."Line1" {
+       Comment "Line A"
+       Value {
+               PlaybackPriority 200
+               PlaybackChannels 2
+               PlaybackPCM "umc204hd_line1:${CardId}"
+               PlaybackMixer "umc204hd:${CardId}"
+               PlaybackMixerElem "Line A"
+       }
+}
+
+SectionDevice."Line2" {
+       Comment "Line B"
+
+       Value {
+               PlaybackPriority 100
+               PlaybackChannels 2
+               PlaybackPCM "umc204hd_line2:${CardId}"
+               PlaybackMixer "umc204hd:${CardId}"
+               PlaybackMixerElem "Line B"
+       }
+}
+
+SectionDevice."Mic1" {
+       Comment "Input 1"
+
+       Value {
+               CapturePriority 200
+               CaptureChannels 1
+               CapturePCM "umc204hd_mic1:${CardId}"
+               CaptureMixer "umc204hd:${CardId}"
+               CaptureMixerElem "Input 1"
+       }
+}
+
+SectionDevice."Mic2" {
+       Comment "Input 2"
+
+       Value {
+               CapturePriority 100
+               CaptureChannels 1
+               CapturePCM "umc204hd_mic2:${CardId}"
+               CaptureMixer "umc204hd:${CardId}"
+               CaptureMixerElem "Input 2"
+       }
+}
diff --git a/ucm2/USB-Audio/Behringer/UMC204HD.conf b/ucm2/USB-Audio/Behringer/UMC204HD.conf
new file mode 100644 (file)
index 0000000..5721935
--- /dev/null
@@ -0,0 +1,5 @@
+Comment "Behringer UMC204HD"
+SectionUseCase."HiFi" {
+       Comment "Default"
+       File "/USB-Audio/Behringer/UMC204HD-HiFi.conf"
+}
index d9d740ecf575505865eddbec5ff1bd429e7a3821..a3cb9ce6f93d0b56d4b047c93138caa7d0712be9 100644 (file)
@@ -91,6 +91,15 @@ If.lenovo-p620-main {
        True.Define.ProfileName "Lenovo/ThinkStation-P620-Main"
 }
 
+If.behringer-umc204hd {
+       Condition {
+               Type String
+               Haystack "${CardComponents}"
+               Needle "USB1397:0508"
+       }
+       True.Define.ProfileName "Behringer/UMC204HD"
+}
+
 If.inc {
        Condition {
                Type String