From: Jaroslav Kysela Date: Tue, 18 May 2021 17:01:58 +0000 (+0200) Subject: sof-soundwire: rt715 - use the hw volume control X-Git-Tag: v1.2.5~13 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=8eed6728ff4597c28c945ba65cc7715fd528b126;p=alsa-ucm-conf.git sof-soundwire: rt715 - use the hw volume control Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/67 Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/sof-soundwire/rt715.conf b/ucm2/sof-soundwire/rt715.conf index 7b8ca59..3b191bd 100644 --- a/ucm2/sof-soundwire/rt715.conf +++ b/ucm2/sof-soundwire/rt715.conf @@ -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}" } }