]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
sof-soundwire: rt715 - use the hw volume control
authorJaroslav Kysela <perex@perex.cz>
Tue, 18 May 2021 17:01:58 +0000 (19:01 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 18 May 2021 17:22:39 +0000 (19:22 +0200)
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/67
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/sof-soundwire/rt715.conf

index 7b8ca594aa4384bdc0c979990718479956211a4f..3b191bddaa74dd73335979c016ca43833a7a0ef5 100644 (file)
@@ -1,20 +1,30 @@
 # Use case Configuration for sof-soundwire card
 
+If.hwctl {
+       Condition {
+               Type ControlExists
+               Control "name='Capture Volume'"
+       }
+       True.Define.rt715ctl "Capture"
+       False.Define.rt715ctl "PGA5.0 5 Master Capture"
+}
+
 SectionDevice."Mic" {
        Comment "SoundWire microphones"
 
        EnableSequence [
-               cset "name='PGA5.0 5 Master Capture Switch' 1"
+               cset "name='${var:rt715ctl} Switch' 1"
        ]
 
        DisableSequence [
-               cset "name='PGA5.0 5 Master Capture Switch' 0"
+               cset "name='${var:rt715ctl} Switch' 0"
        ]
 
        Value {
-             CapturePriority 100
-             CapturePCM "hw:${CardId},4"
-             CaptureSwitch "PGA5.0 5 Master Capture Switch"
-             CaptureVolume "PGA5.0 5 Master Capture Volume"
+               CapturePriority 100
+               CapturePCM "hw:${CardId},4"
+               CaptureSwitch "${var:rt715ctl} Switch"
+               CaptureVolume "${var:rt715ctl} Volume"
+               CaptureMixerElem "${var:rt715ctl}"
        }
 }