OSDN Git Service

chtnau8824: Add a SST define/variable
authorHans de Goede <hdegoede@redhat.com>
Wed, 16 Dec 2020 15:38:37 +0000 (16:38 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sun, 17 Jan 2021 16:47:04 +0000 (17:47 +0100)
Add a SST define which gets set to "yes" when using the SST driver
and to "" when not using the SST driver;

And decide if platforms/bytcr/PlatformEnableSeq.conf should be included
or not based on this.

This is a preparation patch for adding SOF support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/chtnau8824/HiFi.conf

index 105f360..b36588f 100644 (file)
@@ -1,5 +1,16 @@
 Define.Speaker "Speaker"
 Define.Mic "InternalMic"
+Define.SST "yes"
+
+If.Controls {
+       Condition {
+               Type ControlExists
+               Control "name='media0_in Gain 0 Switch'"
+       }
+       False {
+               Define.SST ""
+       }
+}
 
 If.cfg-mspk {
        Condition {
@@ -33,12 +44,12 @@ SectionVerb {
 
        Include.e.File "/codecs/nau8824/EnableSeq.conf"
 
-       If.Controls {
+       If.SST {
                Condition {
-                       Type ControlExists
-                       Control "name='media0_in Gain 0 Switch'"
+                       Type String
+                       Empty "${var:SST}"
                }
-               True {
+               False {
                        Include.pe {
                                File "/platforms/bytcr/PlatformEnableSeq.conf"
                                Before.EnableSequence "0"