From: Jaroslav Kysela Date: Thu, 18 Nov 2021 15:29:07 +0000 (+0100) Subject: USB-Audio: add GoXLR configuration X-Git-Tag: v1.2.6~33 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=97beee6ded9e3dddfb56580eee360088fbfa8595;p=alsa-ucm-conf.git USB-Audio: add GoXLR configuration 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 --- diff --git a/ucm2/USB-Audio/GoXLR/GoXLR-HiFi.conf b/ucm2/USB-Audio/GoXLR/GoXLR-HiFi.conf new file mode 100644 index 0000000..c29d7af --- /dev/null +++ b/ucm2/USB-Audio/GoXLR/GoXLR-HiFi.conf @@ -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 index 0000000..700aaf8 --- /dev/null +++ b/ucm2/USB-Audio/GoXLR/GoXLR.conf @@ -0,0 +1,5 @@ +Comment "GoXLR USB-Audio" +SectionUseCase."HiFi" { + Comment "Default Alsa Profile" + File "GoXLR/GoXLR-HiFi.conf" +} diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf index a9385a3..9f8d26c 100644 --- a/ucm2/USB-Audio/USB-Audio.conf +++ b/ucm2/USB-Audio/USB-Audio.conf @@ -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