]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: direct profile - allow to override the card name
authorJaroslav Kysela <perex@perex.cz>
Sun, 12 Jun 2022 16:59:44 +0000 (18:59 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sun, 12 Jun 2022 17:01:48 +0000 (19:01 +0200)
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/160
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/Behringer/Flow8-Recording.conf
ucm2/USB-Audio/Behringer/Flow8-Streaming.conf
ucm2/common/direct.conf

index 0786d2f91eaf25f82fb1d55e4f67f6a015dc793e..173901ac29d826af9a46ebe4510f4378ab483794 100644 (file)
@@ -5,6 +5,7 @@ SectionUseCase."Recording" {
        File "/USB-Audio/Behringer/Flow8-Recording-Hifi.conf"
 }
 
+Define.DirectCardName "Flow8 Recording"
 Define.DirectPlaybackChannels 4
 Define.DirectCaptureChannels 10
 
index 6a1f4cc54d85cceb4f8ea8ca84697fc6b0b02944..d8152f8ed3f735d9c286db65719d32d986fad020 100644 (file)
@@ -5,6 +5,7 @@ SectionUseCase."Streaming" {
        File "/USB-Audio/Behringer/Flow8-Streaming-Hifi.conf"
 }
 
+Define.DirectCardName "Flow8 Streaming"
 Define.DirectPlaybackChannels 4
 Define.DirectCaptureChannels 2
 
index ec705209b7b6d29aeec8bcc6309885fb29d25cff..f69cbc9016aeb1589413e77f03d8a83a59a1c6c1 100644 (file)
@@ -1,4 +1,12 @@
+If.direct {
+       Condition {
+               Type String
+               Empty "${var:DirectCardName}"
+       }
+       True.Define.DirectCardName "${CardName}"
+}
+
 SectionUseCase."Direct" {
-       Comment "Direct ${CardName}"
+       Comment "Direct ${var:DirectCardName}"
        File "/common/direct-verb.conf"
 }