OSDN Git Service

sof-hda-dsp: make the boot init optional for all controls
authorJaroslav Kysela <perex@perex.cz>
Wed, 24 Jun 2020 08:39:42 +0000 (10:39 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 24 Jun 2020 08:39:51 +0000 (10:39 +0200)
Also don't initialize "Auto-Mute Mode" in the HiFi verb.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/sof-hda-dsp/HiFi.conf
ucm2/sof-hda-dsp/sof-hda-dsp.conf

index 1279488..5c03da1 100644 (file)
@@ -1,17 +1,7 @@
 # Use case Configuration for sof-hda-dsp
 
 SectionVerb {
-       If.automute {
-               Condition {
-                       Type ControlExists
-                       Control "name='Auto-Mute Mode'"
-               }
-               True {
-                       EnableSequence [
-                               cset "name='Auto-Mute Mode' 'Disabled'"
-                       ]
-               }
-       }
+       Value.TQ "HiFi"
 }
 
 SectionDevice."Headphones" {
index 24d0359..c8069a6 100644 (file)
@@ -7,21 +7,52 @@ SectionUseCase."HiFi" {
 
 # the kcontrols initial values, which will be set by `alsactl init`
 
-BootSequence [
-       cset "name='Master Playback Volume' 80"
-       cset "name='Headphone Playback Volume' 80"
-       cset "name='Speaker Playback Volume' 80"
-       cset "name='Auto-Mute Mode' off"
-]
+If.amute {
+       Condition {
+               Type ControlExists
+               Control "name='Auto-Mute Mode'"
+       }
+       True.BootSequence [
+               cset "name='Auto-Mute Mode' off"
+       ]
+}
+
+If.master {
+       Condition {
+               Type ControlExists
+               Control "name='Master Playback Volume'"
+       }
+       True.BootSequence [
+               cset "name='Master Playback Volume' 60%"
+       ]
+}
+
+If.speaker {
+       Condition {
+               Type ControlExists
+               Control "name='Speaker Playback Volume'"
+       }
+       True.BootSequence [
+               cset "name='Speaker Playback Volume' 60%"
+       ]
+}
+
+If.headphone {
+       Condition {
+               Type ControlExists
+               Control "name='Headphone Playback Volume'"
+       }
+       True.BootSequence [
+               cset "name='Headphone Playback Volume' 60%"
+       ]
+}
 
 If.Dmic0 {
        Condition {
                Type ControlExists
                Control "name='Dmic0 Capture Volume'"
        }
-       True {
-               BootSequence [
-                       cset "name='Dmic0 Capture Volume' 70"
-               ]
-       }
+       True.BootSequence [
+               cset "name='Dmic0 Capture Volume' 70%"
+       ]
 }