From f7575957c6966590b71b231e95a015fcc280e548 Mon Sep 17 00:00:00 2001 From: Christoffer Sandberg Date: Tue, 16 Apr 2024 14:59:56 +0200 Subject: [PATCH] ucm2: HDA: Use Master volume control for dual speakers This patch extends the existing 'activate Bass Speaker' case with additional configuration - Use Master mixer for volume control - Configure Speaker Volume and Bass Speaker volume to max since Master volume regulation is used This fixes a case where only the first speaker volume is changed using the system volume control. Signed-off-by: Christoffer Sandberg --- ucm2/HDA/HiFi-analog.conf | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ucm2/HDA/HiFi-analog.conf b/ucm2/HDA/HiFi-analog.conf index 3c96f5d7..1136411f 100644 --- a/ucm2/HDA/HiFi-analog.conf +++ b/ucm2/HDA/HiFi-analog.conf @@ -146,12 +146,19 @@ If.spk { EnableSequence [ cset "name='Speaker Playback Switch' on" cset "name='Bass Speaker Playback Switch' on" + cset "name='Speaker Playback Volume' 100%" + cset "name='Bass Speaker Playback Volume' 100%" ] DisableSequence [ cset "name='Speaker Playback Switch' off" cset "name='Bass Speaker Playback Switch' off" ] + Value { + PlaybackMixerElem "Master" + PlaybackVolume "Master Playback Volume" + PlaybackSwitch "Master Playback Switch" + } } False { EnableSequence [ @@ -161,16 +168,18 @@ If.spk { DisableSequence [ cset "name='Speaker Playback Switch' off" ] + Value { + PlaybackMixerElem "Speaker" + PlaybackVolume "Speaker Playback Volume" + PlaybackSwitch "Speaker Playback Switch" + } } } Value { PlaybackPriority 100 PlaybackPCM "hw:${CardId}" - PlaybackMixerElem "Speaker" PlaybackMasterElem "Master" - PlaybackVolume "Speaker Playback Volume" - PlaybackSwitch "Speaker Playback Switch" } } }