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

index 26d6a56d63740bac7fd2b81a4ce9d4ceb5e9d6d0..e87ebe31ac2b0989bc7c0b96bb83a142ac727f46 100644 (file)
@@ -5,14 +5,27 @@ SectionVerb {
                TQ "HiFi"
        }
 
-       EnableSequence [
-               <platforms/bytcr/PlatformEnableSeq.conf>
-               <codecs/nau8824/EnableSeq.conf>
-       ]
+       If.Controls {
+               Condition {
+                       Type ControlExists
+                       Control "name='media0_in Gain 0 Switch'"
+               }
+               True {
+                       EnableSequence [
+                               <platforms/bytcr/PlatformEnableSeq.conf>
+                               <codecs/nau8824/EnableSeq.conf>
+                       ]
 
-       DisableSequence [
-               <platforms/bytcr/PlatformDisableSeq.conf>
-       ]
+                       DisableSequence [
+                               <platforms/bytcr/PlatformDisableSeq.conf>
+                       ]
+               }
+               False {
+                       EnableSequence [
+                               <codecs/nau8824/EnableSeq.conf>
+                       ]
+               }
+       }
 }
 
 <codecs/nau8824/MonoSpeaker.conf>
index fd8b741cf326f9fb2cfb7cded337f08e81e39741..6ed4e4f0da946c39ddaf8ef45b67767aae809f29 100644 (file)
@@ -1,15 +1,29 @@
-
 SectionVerb {
-       EnableSequence [
-               <platforms/bytcr/PlatformEnableSeq.conf>
-               <codecs/nau8824/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/nau8824/EnableSeq.conf>
+                       ]
+
+                       DisableSequence [
+                               <platforms/bytcr/PlatformDisableSeq.conf>
+                       ]
+               }
+               False {
+                       EnableSequence [
+                               <codecs/nau8824/EnableSeq.conf>
+                       ]
+               }
+       }
 }
 
+
 <codecs/nau8824/Speaker.conf>
 <codecs/nau8824/HeadPhones.conf>