]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
sof-soundwire: Initialize PGA switch controls in the BootSequence
authorJaroslav Kysela <perex@perex.cz>
Mon, 20 Feb 2023 14:36:53 +0000 (15:36 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 20 Feb 2023 14:36:53 +0000 (15:36 +0100)
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 <perex@perex.cz>
ucm2/sof-soundwire/sof-soundwire.conf

index c6c9115061633cb2e639ac619fb0ba39b133c66c..786ba63a0922bebfe678f4085269f25210103cd6 100644 (file)
@@ -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"
+       ]
+}