From: Eiseiche <108142668+Eiseiche@users.noreply.github.com> Date: Tue, 12 Jul 2022 14:11:31 +0000 (+0000) Subject: USB-Audio: Add Behringer UMC202HD configuration X-Git-Tag: v1.2.8~30 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=87ebfe57e3a371e79969ebac67aeff6fa1483a61;p=alsa-ucm-conf.git USB-Audio: Add Behringer UMC202HD configuration Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/188 From: Eiseiche <108142668+Eiseiche@users.noreply.github.com> Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/USB-Audio/Behringer/UMC202HD-HiFi.conf b/ucm2/USB-Audio/Behringer/UMC202HD-HiFi.conf new file mode 100644 index 0000000..1b4f118 --- /dev/null +++ b/ucm2/USB-Audio/Behringer/UMC202HD-HiFi.conf @@ -0,0 +1,88 @@ +Include.pcm_split.File "/common/pcm/split.conf" + +Macro [ + { + SplitPCM { + Name "umc202hd_mono_in" + Direction Capture + Channels 1 + HWChannels 2 + HWChannelPos0 MONO + HWChannelPos1 MONO + } + } +] + +Define.PCMMixerName "PCM" + +If.pcm_controls { + Condition { + Type ControlExists + Control "name='UMC202HD 192k Output Playback Switch'" + } + True.Define.PCMMixerName "UMC202HD 192k Output" +} + +Include.ctl_remap.File "/common/ctl/remap.conf" + +Macro [ + { + CtlRemapMonoVolSw { + Dst "Input 1 Capture" + Src "Mic Capture" + Index 0 + } + } + { + CtlRemapMonoVolSw { + Dst "Input 2 Capture" + Src "Mic Capture" + Index 1 + } + } +] + +SectionDevice."Line1" { + Comment "Line A" + Value { + PlaybackPriority 200 + PlaybackPCM "hw:${CardId}" + PlaybackMixerElem "${var:PCMMixerName}" + } +} + +SectionDevice."Mic1" { + Comment "Input 1" + + Value { + CapturePriority 200 + CaptureMixer "default:${CardId}" + CaptureMixerElem "Input 1" + } + Macro.pcm_split.SplitPCMDevice { + Name "umc202hd_mono_in" + Direction Capture + HWChannels 2 + Channels 1 + Channel0 0 + ChannelPos0 MONO + } +} + +SectionDevice."Mic2" { + Comment "Input 2" + + Value { + CapturePriority 100 + CaptureMixer "default:${CardId}" + CaptureMixerElem "Input 2" + } + Macro.pcm_split.SplitPCMDevice { + Name "umc202hd_mono_in" + Direction Capture + HWChannels 2 + Channels 1 + Channel0 1 + ChannelPos0 MONO + } +} diff --git a/ucm2/USB-Audio/Behringer/UMC202HD.conf b/ucm2/USB-Audio/Behringer/UMC202HD.conf new file mode 100644 index 0000000..5f5e5f5 --- /dev/null +++ b/ucm2/USB-Audio/Behringer/UMC202HD.conf @@ -0,0 +1,11 @@ +Comment "Behringer UMC202HD" + +SectionUseCase."HiFi" { + Comment "Default" + File "/USB-Audio/Behringer/UMC202HD-HiFi.conf" +} + +Define.DirectPlaybackChannels 2 +Define.DirectCaptureChannels 2 + +Include.dhw.File "/common/direct.conf" diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf index 673ebdb..d92fc75 100644 --- a/ucm2/USB-Audio/USB-Audio.conf +++ b/ucm2/USB-Audio/USB-Audio.conf @@ -131,6 +131,18 @@ If.focusrite-scarlett-2i4-gen2 { } } +If.behringer-umc202hd { + Condition { + Type String + Haystack "${CardComponents}" + Needle "USB1397:0507" + } + True.Define { + ProfileName "Behringer/UMC202HD" + MixerRemap yes + } +} + If.behringer-umc204hd { Condition { Type String