OSDN Git Service

broxton-rt298: corrections, cleanups
authorJaroslav Kysela <perex@perex.cz>
Thu, 23 Jan 2020 13:13:10 +0000 (14:13 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 5 Feb 2020 02:16:02 +0000 (03:16 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/broxton-rt298/Hdmi.conf [new file with mode: 0644]
ucm2/broxton-rt298/Hdmi1.conf [deleted file]
ucm2/broxton-rt298/Hdmi2.conf [deleted file]
ucm2/broxton-rt298/HiFi.conf
ucm2/broxton-rt298/broxton-rt298.conf

diff --git a/ucm2/broxton-rt298/Hdmi.conf b/ucm2/broxton-rt298/Hdmi.conf
new file mode 100644 (file)
index 0000000..fc64fe7
--- /dev/null
@@ -0,0 +1,43 @@
+# Usecase for device HDMI1/Display Port stereo playback on Intel SKYLAKE/KABYLAKE platforms
+
+SectionDevice."HDMI1" {
+       Comment "HDMI/Display Port 1 Stereo"
+
+       Value {
+               PlaybackPCM "hw:${CardId},4"
+               PlaybackPriority 500
+               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"
+                       }
+               }
+       }
+}
+
+SectionDevice."HDMI2" {
+       Comment "HDMI/Display Port 2 Stereo"
+
+       Value {
+               PlaybackPCM "hw:${CardId},5"
+               PlaybackPriority 600
+               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"
+                       }
+               }
+       }
+}
diff --git a/ucm2/broxton-rt298/Hdmi1.conf b/ucm2/broxton-rt298/Hdmi1.conf
deleted file mode 100644 (file)
index ede176b..0000000
+++ /dev/null
@@ -1,23 +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"
-
-        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
deleted file mode 100644 (file)
index 9718bae..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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"
-                       }
-               }
-        }
-}
index 630d5e1..6f5b9a5 100644 (file)
@@ -9,31 +9,29 @@ SectionVerb {
 
        Value {
                TQ "HiFi"
-               CapturePCM "hw:${CardId},1"
-               PlaybackPCM "hw:${CardId},0"
        }
 }
 
-SectionDevice."DigitalMic" {
-       Comment "DMIC Stereo"
+SectionDevice."Speaker" {
+       Comment "Speaker"
 
        ConflictingDevice [
-               "Headset"
+               "Headphones"
        ]
 
        EnableSequence [
-               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"
-
+               cset "name='SPO Switch' 1"
+               cset "name='Speaker Playback Switch' 1,1"
+               cset "name='Speaker Switch' 1"
+               cset "name='HPO L Switch' 0"
+               cset "name='HPO R Switch' 0"
        ]
 
-       DisableSequence [
-               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 {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               JackHWMute "Headphones"
+       }
 }
 
 SectionDevice."Headphones" {
@@ -51,36 +49,45 @@ SectionDevice."Headphones" {
        ]
 
        Value {
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId}"
                JackControl "Headphone Jack"
                JackHWMute "Speaker"
        }
 }
 
-SectionDevice."Speaker" {
-       Comment "Speaker"
+SectionDevice."Mic" {
+       Comment "Digital Microphone"
 
        ConflictingDevice [
-               "Headphones"
+               "Headset"
        ]
 
        EnableSequence [
-               cset "name='SPO Switch' 1"
-               cset "name='Speaker Playback Switch' 1,1"
-               cset "name='Speaker Switch' 1"
-               cset "name='HPO L Switch' 0"
-               cset "name='HPO R Switch' 0"
+               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"
+
+       ]
+
+       DisableSequence [
+               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 {
-               JackHWMute "Headphones"
+               CapturePriority 100
+               CapturePCM "hw:${CardId},1"
        }
 }
 
 SectionDevice."Headset" {
-       Comment "Headset Mic"
+       Comment "Headset Microphone"
 
        ConflictingDevice [
-               "DigitalMic"
+               "Mic"
        ]
 
        EnableSequence [
@@ -97,6 +104,10 @@ SectionDevice."Headset" {
        ]
 
        Value {
+               CapturePriority 200
+               CapturePCM "hw:${CardId},1"
                JackControl "Mic Jack"
        }
 }
+
+<broxton-rt298/Hdmi.conf>
index 8752e91..1332dc5 100644 (file)
@@ -8,21 +8,11 @@ SectionUseCase."HiFi" {
        Comment "Play and record HiFi quality Music"
 }
 
-SectionUseCase."Hdmi1" {
-        File "Hdmi1.conf"
-        Comment "Play on Hdmi/DP 1"
-}
-
-SectionUseCase."Hdmi2" {
-        File "Hdmi2.conf"
-        Comment "Play on Hdmi/DP 2"
-}
-
 ValueDefaults {
-       PlaybackChannels "2"
-       PlaybackPriority "1"
-       CaptureChannels "2"
-       CapturePriority "2"
+       PlaybackChannels 2
+       PlaybackPriority 1
+       CaptureChannels 2
+       CapturePriority 2
 }
 
 SectionDefaults [