]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
broxton-rt298: adapt to ucm2
authorJaroslav Kysela <perex@perex.cz>
Sun, 10 Nov 2019 19:28:23 +0000 (20:28 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 11 Nov 2019 11:50:58 +0000 (12:50 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm/broxton-rt298/Hdmi1.conf [deleted file]
ucm/broxton-rt298/Hdmi2.conf [deleted file]
ucm2/broxton-rt298/Hdmi1.conf [new file with mode: 0644]
ucm2/broxton-rt298/Hdmi2.conf [new file with mode: 0644]
ucm2/broxton-rt298/HiFi.conf [moved from ucm/broxton-rt298/HiFi.conf with 70% similarity]
ucm2/broxton-rt298/broxton-rt298.conf [moved from ucm/broxton-rt298/broxton-rt298.conf with 92% similarity]

diff --git a/ucm/broxton-rt298/Hdmi1.conf b/ucm/broxton-rt298/Hdmi1.conf
deleted file mode 100644 (file)
index 48514f4..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# Usecase for device HDMI1/Display Port stereo playback on Intel SKYLAKE/KABYLAKE platforms
-# For Audio in I2S mode
-
-SectionDevice."Hdmi1" {
-        Comment "HDMI/Display Port 1 Stereo"
-
-        EnableSequence [
-                exec "echo Hdmi1 EnableSequnece"
-        ]
-
-        DisableSequence [
-                exec "echo Hdmi1 DisableSequnece"
-        ]
-
-        Value {
-                PlaybackPCM "hw:broxtonrt298,4"
-                PlaybackChannels "2"
-                PlaybackPriority "3"
-                JackControl "HDMI/DP, pcm=4 Jack"
-        }
-}
-
diff --git a/ucm/broxton-rt298/Hdmi2.conf b/ucm/broxton-rt298/Hdmi2.conf
deleted file mode 100644 (file)
index 764f8b9..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# Usecase for device HDMI2/Display Port stereo playback on Intel Broxton platforms
-# For Audio in I2S mode
-
-SectionDevice."Hdmi2" {
-        Comment "HDMI/Display Port 2 Stereo"
-
-        Value {
-                PlaybackPCM "hw:broxtonrt298,5"
-                PlaybackChannels "2"
-                PlaybackPriority "4"
-                JackControl "HDMI/DP, pcm=5 Jack"
-        }
-}
-
diff --git a/ucm2/broxton-rt298/Hdmi1.conf b/ucm2/broxton-rt298/Hdmi1.conf
new file mode 100644 (file)
index 0000000..ede176b
--- /dev/null
@@ -0,0 +1,23 @@
+# Usecase for device HDMI1/Display Port stereo playback on Intel SKYLAKE/KABYLAKE platforms
+# For Audio in I2S mode
+
+SectionDevice."Hdmi1" {
+        Comment "HDMI/Display Port 1 Stereo"
+
+        Value {
+                PlaybackPCM "hw:${CardId},4"
+                PlaybackPriority "3"
+               If.1 {
+                       Condition {
+                               Type ControlExists
+                               Control "iface=CARD,name='HDMI/DP,pcm=4 Jack'"
+                       }
+                       True {
+                               JackControl "HDMI/DP,pcm=4 Jack"
+                       }
+                       False {
+                               JackControl "HDMI/DP, pcm=4 Jack"
+                       }
+               }
+        }
+}
diff --git a/ucm2/broxton-rt298/Hdmi2.conf b/ucm2/broxton-rt298/Hdmi2.conf
new file mode 100644 (file)
index 0000000..9718bae
--- /dev/null
@@ -0,0 +1,23 @@
+# Usecase for device HDMI1/Display Port stereo playback on Intel SKYLAKE/KABYLAKE platforms
+# For Audio in I2S mode
+
+SectionDevice."Hdmi2" {
+        Comment "HDMI/Display Port 2 Stereo"
+
+        Value {
+               PlaybackPCM "hw:${CardId},5"
+               PlaybackPriority "4"
+               If.1 {
+                       Condition {
+                               Type 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 70%
rename from ucm/broxton-rt298/HiFi.conf
rename to ucm2/broxton-rt298/HiFi.conf
index 2e2d6fec0cc68126f7485d878acd6c687c9628ce..630d5e1eb175da05e6d7f67bce6bd345f0c65505 100644 (file)
@@ -4,22 +4,17 @@
 SectionVerb {
 
        EnableSequence [
-               cdev "hw:broxtonrt298"
                cset "name='media0_out mo dmic01_hifi_in mi Switch' 1"
        ]
 
-       DisableSequence [
-               cdev "hw:broxtonrt298"
-       ]
-
        Value {
                TQ "HiFi"
-               CapturePCM "hw:broxtonrt298,1"
-               PlaybackPCM "hw:broxtonrt298,0"
+               CapturePCM "hw:${CardId},1"
+               PlaybackPCM "hw:${CardId},0"
        }
 }
 
-SectionDevice."dmiccap" {
+SectionDevice."DigitalMic" {
        Comment "DMIC Stereo"
 
        ConflictingDevice [
@@ -27,9 +22,6 @@ SectionDevice."dmiccap" {
        ]
 
        EnableSequence [
-
-               cdev "hw:broxtonrt298"
-               exec "echo broxtonrt298 dmiccap called"
                cset "name='media0_out mo dmic01_hifi_in mi Switch' 1"
                cset "name='media0_out mo codec0_in mi Switch' 0"
                cset "name='Mic Jack Switch' 0"
@@ -37,16 +29,11 @@ SectionDevice."dmiccap" {
        ]
 
        DisableSequence [
-               cdev "hw:broxtonrt298"
                cset "name='media0_out mo codec0_in mi Switch' 1"
                cset "name='media0_out mo dmic01_hifi_in mi Switch' 0"
                cset "name='Mic Jack Switch' 1"
                cset "name='ADC 0 Mux' 0"
        ]
-       Value {
-               CaptureChannels "2"
-               CapturePriority "2"
-       }
 }
 
 SectionDevice."Headphones" {
@@ -55,21 +42,15 @@ SectionDevice."Headphones" {
        ConflictingDevice [
                "Speaker"
        ]
+
        EnableSequence [
-               cdev "hw:broxtonrt298"
-               exec "echo broxtonrt298 Headphone called"
                cset "name='HPO L Switch' 1"
                cset "name='HPO R Switch' 1"
                cset "name='Headphone Jack Switch' 1"
                cset "name='Speaker Playback Switch' 0,0"
        ]
 
-       DisableSequence [
-               cdev "hw:broxtonrt298"
-       ]
        Value {
-               PlaybackChannels "2"
-               PlaybackPriority "1"
                JackControl "Headphone Jack"
                JackHWMute "Speaker"
        }
@@ -81,9 +62,8 @@ SectionDevice."Speaker" {
        ConflictingDevice [
                "Headphones"
        ]
+
        EnableSequence [
-               cdev "hw:broxtonrt298"
-               exec "echo broxtonrt298 speaker called"
                cset "name='SPO Switch' 1"
                cset "name='Speaker Playback Switch' 1,1"
                cset "name='Speaker Switch' 1"
@@ -91,11 +71,7 @@ SectionDevice."Speaker" {
                cset "name='HPO R Switch' 0"
        ]
 
-       DisableSequence [
-       ]
        Value {
-               PlaybackChannels "2"
-               PlaybackPriority "1"
                JackHWMute "Headphones"
        }
 }
@@ -104,11 +80,10 @@ SectionDevice."Headset" {
        Comment "Headset Mic"
 
        ConflictingDevice [
-               "dmiccap"
+               "DigitalMic"
        ]
+
        EnableSequence [
-               cdev "hw:broxtonrt298"
-               exec "echo broxtonrt298 Headset called"
                cset "name='media0_out mo codec0_in mi Switch' 1"
                cset "name='ADC0 Capture Volume' 105,105"
                cset "name='ADC 0 Mux' 0"
@@ -117,13 +92,11 @@ SectionDevice."Headset" {
        ]
 
        DisableSequence [
-               cdev "hw:broxtonrt298"
                cset "name='media0_out mo dmic01_hifi_in mi Switch' 1"
                cset "name='media0_out mo codec0_in mi Switch' 0"
        ]
+
        Value {
-               CaptureChannels "2"
-               CapturePriority "2"
                JackControl "Mic Jack"
        }
 }
similarity index 92%
rename from ucm/broxton-rt298/broxton-rt298.conf
rename to ucm2/broxton-rt298/broxton-rt298.conf
index 15c958e8dcad6efd492a0a6d87c871d9c0539dec..8752e915854a7ac2a77d77c748e771415e4014c1 100644 (file)
@@ -1,6 +1,8 @@
 # UCM for Intel Broxton platforms
 # For Audio in I2S mode
 
+Syntax 2
+
 SectionUseCase."HiFi" {
        File "HiFi.conf"
        Comment "Play and record HiFi quality Music"
@@ -17,15 +19,13 @@ SectionUseCase."Hdmi2" {
 }
 
 ValueDefaults {
-       PlaybackCTL "hw:broxtonrt298"
-       CaptureCTL "hw:broxtonrt298"
+       PlaybackChannels "2"
+       PlaybackPriority "1"
        CaptureChannels "2"
        CapturePriority "2"
 }
 
 SectionDefaults [
-       cdev "hw:broxtonrt298"
-       exec "echo broxtonrt298 CONF Defaults"
        cset "name='Headphone Jack Switch' 1"
        cset "name='Speaker Switch' 1"
        cset "name='Speaker Playback Switch' 0,0"