diff mbox series

[alsa-ucm-conf,2/3] chtnau8824: Add a SST define/variable

Message ID 20201216153838.34945-2-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show
Series [alsa-ucm-conf,1/3] chtnau8824: Move DAC Channel Source selection to Speaker/Headphones EnableSeq | expand

Commit Message

Hans de Goede Dec. 16, 2020, 3:38 p.m. UTC
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>
---
 ucm2/chtnau8824/HiFi.conf | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/ucm2/chtnau8824/HiFi.conf b/ucm2/chtnau8824/HiFi.conf
index 105f360..b36588f 100644
--- a/ucm2/chtnau8824/HiFi.conf
+++ b/ucm2/chtnau8824/HiFi.conf
@@ -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"