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

index b329ea4ed399c13f4af5381435d86f2e1c38f135..1ac4931e011ea64fb534cf5c41fd450f61919ff2 100644 (file)
@@ -1,13 +1,32 @@
 SectionVerb {
-       EnableSequence [
-               <platforms/bytcr/PlatformEnableSeq.conf>
-               <codecs/cx2072x/EnableSeq.conf>
-       ]
 
-       DisableSequence [
-               <codecs/cx2072x/DisableSeq.conf>
-               <platforms/bytcr/PlatformDisableSeq.conf>
-       ]
+       If.Controls {
+               Condition {
+                       Type ControlExists
+                       Control "name='media0_in Gain 0 Switch'"
+               }
+               True {
+                       EnableSequence [
+                               <platforms/bytcr/PlatformEnableSeq.conf>
+                               <codecs/cx2072x/EnableSeq.conf>
+                       ]
+
+                       DisableSequence [
+                               <codecs/cx2072x/DisableSeq.conf>
+                               <platforms/bytcr/PlatformDisableSeq.conf>
+                       ]
+               }
+               False {
+                       EnableSequence [
+                               <codecs/cx2072x/EnableSeq.conf>
+                       ]
+
+                       DisableSequence [
+                               <codecs/cx2072x/DisableSeq.conf>
+                       ]
+
+               }
+       }
 }
 
 <codecs/cx2072x/Speaker.conf>