From 8eed6728ff4597c28c945ba65cc7715fd528b126 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 18 May 2021 19:01:58 +0200 Subject: [PATCH] sof-soundwire: rt715 - use the hw volume control Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/67 Signed-off-by: Jaroslav Kysela --- ucm2/sof-soundwire/rt715.conf | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) 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}" } } -- 2.47.1