From: Jaroslav Kysela Date: Sat, 25 Jun 2022 06:24:56 +0000 (+0200) Subject: UMC204HD: Add PCM control autodetection X-Git-Tag: v1.2.7.2~12 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=3833f1961da58d30da9ac281cade789582c50180;p=alsa-ucm-conf.git UMC204HD: Add PCM control autodetection The USB driver has two variants for the PCM control names: UMC204HD 192k Output Playback Switch / Volume and PCM Playback Switch / Volume BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/177 Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/USB-Audio/Behringer/UMC204HD-HiFi.conf b/ucm2/USB-Audio/Behringer/UMC204HD-HiFi.conf index 1fa10c6..ae0f477 100644 --- a/ucm2/USB-Audio/Behringer/UMC204HD-HiFi.conf +++ b/ucm2/USB-Audio/Behringer/UMC204HD-HiFi.conf @@ -25,13 +25,23 @@ Macro [ } ] +Define.PCMCTLName "PCM Playback" + +If.pcm_controls { + Condition { + Type ControlExists + Control "name='UMC204HD 192k Output Playback Switch'" + } + True.Define.PCMCTLName "UMC204HD 192k Output Playback" +} + Include.ctl_remap.File "/common/ctl/remap.conf" Macro [ { CtlRemapStereoVolSw { Dst "Line A Playback" - Src "UMC204HD 192k Output Playback" + Src "${var:PCMCTLName}" Index0 0 Index1 1 } @@ -39,7 +49,7 @@ Macro [ { CtlRemapStereoVolSw { Dst "Line B Playback" - Src "UMC204HD 192k Output Playback" + Src "${var:PCMCTLName}" Index0 2 Index1 3 }