From: Jaroslav Kysela Date: Mon, 20 Feb 2023 14:36:53 +0000 (+0100) Subject: sof-soundwire: Initialize PGA switch controls in the BootSequence X-Git-Tag: v1.2.9~24 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=507a439988b680770e4e4d8a9214dc7e44aa1652;p=alsa-ucm-conf.git sof-soundwire: Initialize PGA switch controls in the BootSequence A bug in the driver / firmware may cause that the paths are active for the first boot, but if the sound card state is saved and restored later (e.g. next boot), the paths may be deactivated. BugLink: https://github.com/thesofproject/linux/issues/4196 Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf index c6c9115..786ba63 100644 --- a/ucm2/sof-soundwire/sof-soundwire.conf +++ b/ucm2/sof-soundwire/sof-soundwire.conf @@ -69,7 +69,26 @@ If.mic_init_rt715 { Haystack "${var:MicCodec1}" } True.BootSequence [ - cset "name='PGA5.0 5 Master Capture Switch' 1" sysw "-/class/sound/ctl-led/mic/card${CardNumber}/detach:PGA5.0 5 Master Capture Switch" ] } + +If.pga_init_pga2 { + Condition { + Type ControlExists + Control "name='PGA2.0 2 Master Capture Switch'" + } + True.BootSequence [ + cset "name='PGA2.0 2 Master Capture Switch' 1" + ] +} + +If.pga_init_pga5 { + Condition { + Type ControlExists + Control "name='PGA5.0 5 Master Capture Switch'" + } + True.BootSequence [ + cset "name='PGA5.0 5 Master Capture Switch' 1" + ] +}