]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
sof-bytcht-rt5640: reuse legacy settings
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Mon, 13 Apr 2020 15:00:16 +0000 (10:00 -0500)
committerJaroslav Kysela <perex@perex.cz>
Thu, 28 May 2020 07:45:16 +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/bytcr-rt5640/HiFi.conf

index e71eb2266110ed49b7c1191ed4bccdb386047be5..89795cb01cdbb9438268634c030e0d9f305d71b9 100644 (file)
@@ -2,14 +2,28 @@
 
 
 SectionVerb {
-       EnableSequence [
-               <platforms/bytcr/PlatformEnableSeq.conf>
-               <codecs/rt5640/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/rt5640/EnableSeq.conf>
+                       ]
+
+                       DisableSequence [
+                               <platforms/bytcr/PlatformDisableSeq.conf>
+                       ]
+               }
+               False {
+                       EnableSequence [
+                               <codecs/rt5640/EnableSeq.conf>
+                       ]
+               }
+       }
 }
 
 If.0 {