]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
Behringer UMC204HD - change the default mixer profile
authorJaroslav Kysela <perex@perex.cz>
Wed, 4 May 2022 09:36:38 +0000 (11:36 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 10 May 2022 15:01:15 +0000 (17:01 +0200)
Link: https://github.com/alsa-project/alsa-ucm-conf/pull/128
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/Behringer/UMC204HD-HiFi.conf
ucm2/USB-Audio/USB-Audio.conf

index 6e6354d43ac1bf517ba263035302c22ac1e8f973..2f0b3257b54a842b3f65810bcf3b7e3ab6ace5e7 100644 (file)
@@ -79,43 +79,34 @@ LibraryConfig.pcm.Config {
                }
        }
 
-       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
-                       }
+       ctl.default.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
                }
        }
 }
@@ -126,7 +117,7 @@ SectionDevice."Line1" {
                PlaybackPriority 200
                PlaybackChannels 2
                PlaybackPCM "umc204hd_line1:${CardId}"
-               PlaybackMixer "umc204hd:${CardId}"
+               PlaybackMixer "default:${CardId}"
                PlaybackMixerElem "Line A"
        }
 }
@@ -138,7 +129,7 @@ SectionDevice."Line2" {
                PlaybackPriority 100
                PlaybackChannels 2
                PlaybackPCM "umc204hd_line2:${CardId}"
-               PlaybackMixer "umc204hd:${CardId}"
+               PlaybackMixer "default:${CardId}"
                PlaybackMixerElem "Line B"
        }
 }
@@ -150,7 +141,7 @@ SectionDevice."Mic1" {
                CapturePriority 200
                CaptureChannels 1
                CapturePCM "umc204hd_mic1:${CardId}"
-               CaptureMixer "umc204hd:${CardId}"
+               CaptureMixer "default:${CardId}"
                CaptureMixerElem "Input 1"
        }
 }
@@ -162,7 +153,7 @@ SectionDevice."Mic2" {
                CapturePriority 100
                CaptureChannels 1
                CapturePCM "umc204hd_mic2:${CardId}"
-               CaptureMixer "umc204hd:${CardId}"
+               CaptureMixer "default:${CardId}"
                CaptureMixerElem "Input 2"
        }
 }
index a3cb9ce6f93d0b56d4b047c93138caa7d0712be9..c40187fd43adc206557002dbf0895a8ce93ccad6 100644 (file)
@@ -1,6 +1,7 @@
 Syntax 4
 
 Define.ProfileName ""
+Define.MixerRemap ""
 
 If.linked {
        Condition {
@@ -97,7 +98,21 @@ If.behringer-umc204hd {
                Haystack "${CardComponents}"
                Needle "USB1397:0508"
        }
-       True.Define.ProfileName "Behringer/UMC204HD"
+       True.Define {
+               ProfileName "Behringer/UMC204HD"
+               MixerRemap yes
+       }
+}
+
+If.mixremap {
+       Condition {
+               Type String
+               Empty "${var:MixerRemap}"
+       }
+       False {
+               Include.card-init.File "/lib/card-init.conf"
+               Include.ctl-remap.File "/lib/ctl-remap.conf"
+       }
 }
 
 If.inc {