]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
skylake-rt286: adapt to ucm2
authorJaroslav Kysela <perex@perex.cz>
Mon, 11 Nov 2019 11:45:17 +0000 (12:45 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 11 Nov 2019 11:51:47 +0000 (12:51 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/skylake-rt286/Hdmi1.conf [moved from ucm/skylake-rt286/Hdmi1.conf with 52% similarity]
ucm2/skylake-rt286/Hdmi2.conf [moved from ucm/skylake-rt286/Hdmi2.conf with 50% similarity]
ucm2/skylake-rt286/HiFi.conf [moved from ucm/skylake-rt286/HiFi.conf with 100% similarity]
ucm2/skylake-rt286/skylake-rt286.conf [moved from ucm/skylake-rt286/skylake-rt286.conf with 98% similarity]

similarity index 52%
rename from ucm/skylake-rt286/Hdmi1.conf
rename to ucm2/skylake-rt286/Hdmi1.conf
index 0e00fc844301addf114f98fa8c246d043ab0b584..975fd39896ee8e06267010057cb857b41fd69be8 100644 (file)
@@ -4,17 +4,21 @@
 SectionDevice."Hdmi1" {
         Comment "HDMI/Display Port 1 Stereo"
 
-        EnableSequence [
-        ]
-
-        DisableSequence [
-        ]
-
         Value {
-                PlaybackPCM "hw:skylakert286,4"
+                PlaybackPCM "hw:${CardId},4"
                 PlaybackChannels "2"
                 PlaybackPriority "3"
-                JackControl "HDMI/DP, pcm=4 Jack"
-        }
+               If.1 {
+                       Condition {
+                               ControlExists
+                               Control "iface=CARD,name='HDMI/DP,pcm=4 Jack'"
+                       }
+                       True {
+                               JackControl "HDMI/DP,pcm=4 Jack"
+                       }
+                       False {
+                               JackControl "HDMI/DP, pcm=4 Jack"
+                       }
+               }
+       }
 }
-
similarity index 50%
rename from ucm/skylake-rt286/Hdmi2.conf
rename to ucm2/skylake-rt286/Hdmi2.conf
index 89b31aa4b8f93762401c8c6866ae2ea451988a93..d6ca62f72be6c80498a8d36ca5d6a78fc34f221c 100644 (file)
@@ -4,17 +4,21 @@
 SectionDevice."Hdmi2" {
         Comment "HDMI/Display Port 2 Stereo"
 
-        EnableSequence [
-        ]
-
-        DisableSequence [
-        ]
-
         Value {
-                PlaybackPCM "hw:skylakert286,5"
+                PlaybackPCM "hw:${CardId},5"
                 PlaybackChannels "2"
                 PlaybackPriority "4"
-                JackControl "HDMI/DP, pcm=5 Jack"
+               If.1 {
+                       Condition {
+                               ControlExists
+                               Control "iface=CARD,name='HDMI/DP,pcm=5 Jack'"
+                       }
+                       True {
+                               JackControl "HDMI/DP,pcm=5 Jack"
+                       }
+                       False {
+                               JackControl "HDMI/DP, pcm=5 Jack"
+                       }
+               }
         }
 }
-
similarity index 98%
rename from ucm/skylake-rt286/skylake-rt286.conf
rename to ucm2/skylake-rt286/skylake-rt286.conf
index f4b156d9e64a985bb0493835e22d262537a53084..f07defb7031bc4c76c07eeb4d81f8f63dd174ca9 100644 (file)
@@ -1,6 +1,8 @@
 # UCM for Intel SKYLAKE/KABYLAKE platforms
 # For Audio in I2S mode
 
+Syntax 2
+
 SectionUseCase."HiFi" {
        File "HiFi.conf"
        Comment "Play and record HiFi quality Music"
@@ -24,7 +26,6 @@ ValueDefaults {
 }
 
 SectionDefaults [
-       cdev "hw:skylakert286"
        cset "name='Headphone Jack Switch' 1"
        cset "name='Speaker Switch' 1"
        cset "name='Speaker Playback Switch' 0,0"