]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
sof-bytcht-es8316: reuse legacy settings
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Mon, 13 Apr 2020 15:22:10 +0000 (10:22 -0500)
committerJaroslav Kysela <perex@perex.cz>
Thu, 28 May 2020 07:45:31 +0000 (09:45 +0200)
Just test if controls for the legacy driver are available

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/bytcht-es8316/HiFi.conf

index af053d09421c76f80cc9a8a5a5f03c4bab4d1f2e..2143d7920c3826bf919440a8b27fac130e58c4fe 100644 (file)
@@ -1,12 +1,26 @@
 SectionVerb {
-       EnableSequence [
-               <platforms/bytcr/PlatformEnableSeq.conf>
-               <codecs/es8316/EnableSeq.conf>
-       ]
 
-       DisableSequence [
-               <platforms/bytcr/PlatformDisableSeq.conf>
-       ]
+       If.Controls {
+               Condition {
+                       Type ControlExists
+                       Control "name='media0_in Gain 0 Switch'"
+               }
+               True {
+                       EnableSequence [
+                               <platforms/bytcr/PlatformEnableSeq.conf>
+                               <codecs/es8316/EnableSeq.conf>
+                       ]
+
+                       DisableSequence [
+                               <platforms/bytcr/PlatformDisableSeq.conf>
+                       ]
+               }
+               False {
+                       EnableSequence [
+                               <codecs/es8316/EnableSeq.conf>
+                       ]
+               }
+       }
 }
 
 If.0 {