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

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