]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
USB-Audio: add GoXLR configuration
authorJaroslav Kysela <perex@perex.cz>
Thu, 18 Nov 2021 15:29:07 +0000 (16:29 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 22 Nov 2021 08:12:37 +0000 (09:12 +0100)
This hardware has multichannel output and input, but it's expected
to work in separate stereo groups.

Use dsnoop/dshare alsa-lib plugins to split the multichannel stream to
stereo devices.

Fixes: https://github.com/alsa-project/alsa-ucm-conf/issues/121
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/GoXLR/GoXLR-HiFi.conf [new file with mode: 0644]
ucm2/USB-Audio/GoXLR/GoXLR.conf [new file with mode: 0644]
ucm2/USB-Audio/USB-Audio.conf

diff --git a/ucm2/USB-Audio/GoXLR/GoXLR-HiFi.conf b/ucm2/USB-Audio/GoXLR/GoXLR-HiFi.conf
new file mode 100644 (file)
index 0000000..c29d7af
--- /dev/null
@@ -0,0 +1,199 @@
+LibraryConfig.pcm.Config {
+
+       pcm.goxlr_stereo_out {
+               @args [ CARD CHN0 CHN1 ]
+               @args {
+                       CARD.type string
+                       CHN0.type integer
+                       CHN1.type integer
+               }
+               type dshare
+               ipc_key 5678493
+               ipc_perm 0600
+               slave {
+                       pcm {
+                               type hw
+                               card $CARD
+                               device 0
+                       }
+                       channels 10
+               }
+               bindings.0 $CHN0
+               bindings.1 $CHN1
+       }
+
+       pcm.goxlr_stereo_in {
+               @args [ CARD CHN0 CHN1 ]
+               @args {
+                       CARD.type string
+                       CHN0.type integer
+                       CHN1.type integer
+               }
+               type dsnoop
+               ipc_key 5678593
+               ipc_perm 0600
+               slave {
+                       pcm {
+                               type hw
+                               card $CARD
+                               device 0
+                       }
+                       channels 23
+               }
+               bindings.0 $CHN0
+               bindings.1 $CHN1
+       }
+
+       pcm.goxlr_system {
+               @args [ CARD ]
+               @args.CARD.type string
+               type empty
+               slave.pcm {
+                       @func concat
+                       strings [ "goxlr_stereo_out:" $CARD ",0,1" ]
+               }
+       }
+
+       pcm.goxlr_game {
+               @args [ CARD ]
+               @args.CARD.type string
+               type empty
+               slave.pcm {
+                       @func concat
+                       strings [ "goxlr_stereo_out:" $CARD ",2,3" ]
+               }
+       }
+
+       pcm.goxlr_chat {
+               @args [ CARD ]
+               @args.CARD.type string
+               type empty
+               slave.pcm {
+                       @func concat
+                       strings [ "goxlr_stereo_out:" $CARD ",4,5" ]
+               }
+       }
+
+       pcm.goxlr_music {
+               @args [ CARD ]
+               @args.CARD.type string
+               type empty
+               slave.pcm {
+                       @func concat
+                       strings [ "goxlr_stereo_out:" $CARD ",6,7" ]
+               }
+       }
+
+       pcm.goxlr_sample {
+               @args [ CARD ]
+               @args.CARD.type string
+               type empty
+               slave.pcm {
+                       @func concat
+                       strings [ "goxlr_stereo_out:" $CARD ",8,9" ]
+               }
+       }
+
+       pcm.goxlr_mix {
+               @args [ CARD ]
+               @args.CARD.type string
+               type empty
+               slave.pcm {
+                       @func concat
+                       strings [ "goxlr_stereo_in:" $CARD ",0,1" ]
+               }
+       }
+
+       pcm.goxlr_chatmic {
+               @args [ CARD ]
+               @args.CARD.type string
+               type empty
+               slave.pcm {
+                       @func concat
+                       strings [ "goxlr_stereo_in:" $CARD ",2,3" ]
+               }
+       }
+
+       pcm.goxlr_sample_input {
+               @args [ CARD ]
+               @args.CARD.type string
+               type empty
+               slave.pcm {
+                       @func concat
+                       strings [ "goxlr_stereo_in:" $CARD ",16,17" ]
+               }
+       }
+
+}
+
+SectionDevice."Speaker" {
+       Comment "System"
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "goxlr_system:${CardId}"
+       }
+}
+
+SectionDevice."Line1" {
+       Comment "Game"
+
+       Value {
+               PlaybackPriority 300
+               PlaybackPCM "goxlr_game:${CardId}"
+       }
+}
+
+SectionDevice."Line2" {
+       Comment "Music"
+
+       Value {
+               PlaybackPriority 400
+               PlaybackPCM "goxlr_music:${CardId}"
+       }
+}
+
+SectionDevice."Headphones" {
+       Comment "Chat"
+
+       Value {
+               PlaybackPriority 200
+               PlaybackPCM "goxlr_chat:${CardId}"
+       }
+}
+
+SectionDevice."Line3" {
+       Comment "Sample"
+
+       Value {
+               PlaybackPriority 500
+               PlaybackPCM "goxlr_sample:${CardId}"
+       }
+}
+
+SectionDevice."Line4" {
+       Comment "Broadcast Stream Mix"
+
+       Value {
+               CapturePriority 200
+               CapturePCM "goxlr_mix:${CardId}"
+       }
+}
+
+SectionDevice."Headset" {
+       Comment "Chat Mic"
+
+       Value {
+               CapturePriority 100
+               CapturePCM "goxlr_chatmic:${CardId}"
+       }
+}
+
+SectionDevice."Line5" {
+       Comment "Sample"
+
+       Value {
+               CapturePriority 300
+               CapturePCM "goxlr_sample_input:${CardId}"
+       }
+}
diff --git a/ucm2/USB-Audio/GoXLR/GoXLR.conf b/ucm2/USB-Audio/GoXLR/GoXLR.conf
new file mode 100644 (file)
index 0000000..700aaf8
--- /dev/null
@@ -0,0 +1,5 @@
+Comment "GoXLR USB-Audio"
+SectionUseCase."HiFi" {
+       Comment "Default Alsa Profile"
+       File "GoXLR/GoXLR-HiFi.conf"
+}
index a9385a37a8a5dab7b9354ab8c174de055056b59e..9f8d26ccdb85a8cf7973ba17f9bb4686ee7648d0 100644 (file)
@@ -1,4 +1,4 @@
-Syntax 3
+Syntax 4
 
 Define.ProfileName ""
 
@@ -29,6 +29,15 @@ If.dell-desktop-rear {
        True.Define.ProfileName "Dell/Desktop-Rear"
 }
 
+If.goxlr {
+       Condition {
+               Type RegexMatch
+               String "${CardComponents}"
+               Regex "USB1220:8fe[04]"
+       }
+       True.Define.ProfileName "GoXLR/GoXLR"
+}
+
 If.inc {
        Condition {
                Type String