]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
bytcht-es8316: adapt to ucm2
authorJaroslav Kysela <perex@perex.cz>
Wed, 20 Nov 2019 18:32:56 +0000 (19:32 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 21 Nov 2019 13:57:59 +0000 (14:57 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
21 files changed:
ucm/bytcht-es8316-mono-spk-in1-mic/HiFi.conf [deleted file]
ucm/bytcht-es8316-mono-spk-in1-mic/bytcht-es8316-mono-spk-in1-mic.conf [deleted file]
ucm/bytcht-es8316-mono-spk-in2-mic/HiFi.conf [deleted file]
ucm/bytcht-es8316-mono-spk-in2-mic/bytcht-es8316-mono-spk-in2-mic.conf [deleted file]
ucm/bytcht-es8316-stereo-spk-in1-mic/HiFi.conf [deleted file]
ucm/bytcht-es8316-stereo-spk-in1-mic/bytcht-es8316-stereo-spk-in1-mic.conf [deleted file]
ucm/bytcht-es8316-stereo-spk-in2-mic/HiFi.conf [deleted file]
ucm/bytcht-es8316-stereo-spk-in2-mic/bytcht-es8316-stereo-spk-in2-mic.conf [deleted file]
ucm/bytcht-es8316/HiFi.conf [deleted file]
ucm2/bytcht-es8316/HiFi-Components.conf [new file with mode: 0644]
ucm2/bytcht-es8316/HiFi-LongName.conf [new file with mode: 0644]
ucm2/bytcht-es8316/HiFi.conf [new file with mode: 0644]
ucm2/bytcht-es8316/bytcht-es8316.conf [moved from ucm/bytcht-es8316/bytcht-es8316.conf with 64% similarity]
ucm2/codecs/es8316/EnableSeq.conf [moved from ucm/codecs/es8316/EnableSeq.conf with 100% similarity]
ucm2/codecs/es8316/HeadPhones.conf [moved from ucm/codecs/es8316/HeadPhones.conf with 86% similarity]
ucm2/codecs/es8316/IN1-HeadsetMic.conf [moved from ucm/codecs/es8316/IN1-HeadsetMic.conf with 88% similarity]
ucm2/codecs/es8316/IN1-InternalMic.conf [moved from ucm/codecs/es8316/IN1-InternalMic.conf with 87% similarity]
ucm2/codecs/es8316/IN2-HeadsetMic.conf [moved from ucm/codecs/es8316/IN2-HeadsetMic.conf with 88% similarity]
ucm2/codecs/es8316/IN2-InternalMic.conf [moved from ucm/codecs/es8316/IN2-InternalMic.conf with 87% similarity]
ucm2/codecs/es8316/MonoSpeaker.conf [moved from ucm/codecs/es8316/MonoSpeaker.conf with 95% similarity]
ucm2/codecs/es8316/Speaker.conf [moved from ucm/codecs/es8316/Speaker.conf with 83% similarity]

diff --git a/ucm/bytcht-es8316-mono-spk-in1-mic/HiFi.conf b/ucm/bytcht-es8316-mono-spk-in1-mic/HiFi.conf
deleted file mode 100644 (file)
index 9789949..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-SectionVerb {
-       EnableSequence [
-               cdev "hw:bytchtes8316"
-               <platforms/bytcr/PlatformEnableSeq.conf>
-               <codecs/es8316/EnableSeq.conf>
-       ]
-
-       DisableSequence [
-               cdev "hw:bytchtes8316"
-               <platforms/bytcr/PlatformDisableSeq.conf>
-       ]
-
-       Value {
-               PlaybackPCM "hw:bytchtes8316"
-               CapturePCM "hw:bytchtes8316"
-       }
-}
-
-<codecs/es8316/MonoSpeaker.conf>
-<codecs/es8316/HeadPhones.conf>
-
-<codecs/es8316/IN1-InternalMic.conf>
-<codecs/es8316/IN2-HeadsetMic.conf>
diff --git a/ucm/bytcht-es8316-mono-spk-in1-mic/bytcht-es8316-mono-spk-in1-mic.conf b/ucm/bytcht-es8316-mono-spk-in1-mic/bytcht-es8316-mono-spk-in1-mic.conf
deleted file mode 100644 (file)
index 26d82ea..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-SectionUseCase."HiFi" {
-       File "../bytcht-es8316-mono-spk-in1-mic/HiFi.conf"
-       Comment "Play HiFi quality Music"
-}
-
-SectionDefaults [
-       cdev "hw:bytchtes8316"
-]
diff --git a/ucm/bytcht-es8316-mono-spk-in2-mic/HiFi.conf b/ucm/bytcht-es8316-mono-spk-in2-mic/HiFi.conf
deleted file mode 100644 (file)
index 2821eb5..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-SectionVerb {
-       EnableSequence [
-               cdev "hw:bytchtes8316"
-               <platforms/bytcr/PlatformEnableSeq.conf>
-               <codecs/es8316/EnableSeq.conf>
-       ]
-
-       DisableSequence [
-               cdev "hw:bytchtes8316"
-               <platforms/bytcr/PlatformDisableSeq.conf>
-       ]
-
-       Value {
-               PlaybackPCM "hw:bytchtes8316"
-               CapturePCM "hw:bytchtes8316"
-       }
-}
-
-<codecs/es8316/MonoSpeaker.conf>
-<codecs/es8316/HeadPhones.conf>
-
-<codecs/es8316/IN1-HeadsetMic.conf>
-<codecs/es8316/IN2-InternalMic.conf>
diff --git a/ucm/bytcht-es8316-mono-spk-in2-mic/bytcht-es8316-mono-spk-in2-mic.conf b/ucm/bytcht-es8316-mono-spk-in2-mic/bytcht-es8316-mono-spk-in2-mic.conf
deleted file mode 100644 (file)
index b9885c2..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-SectionUseCase."HiFi" {
-       File "../bytcht-es8316-mono-spk-in2-mic/HiFi.conf"
-       Comment "Play HiFi quality Music"
-}
-
-SectionDefaults [
-       cdev "hw:bytchtes8316"
-]
diff --git a/ucm/bytcht-es8316-stereo-spk-in1-mic/HiFi.conf b/ucm/bytcht-es8316-stereo-spk-in1-mic/HiFi.conf
deleted file mode 100644 (file)
index 9f1801c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-SectionVerb {
-       EnableSequence [
-               cdev "hw:bytchtes8316"
-               <platforms/bytcr/PlatformEnableSeq.conf>
-               <codecs/es8316/EnableSeq.conf>
-       ]
-
-       DisableSequence [
-               cdev "hw:bytchtes8316"
-               <platforms/bytcr/PlatformDisableSeq.conf>
-       ]
-
-       Value {
-               PlaybackPCM "hw:bytchtes8316"
-               CapturePCM "hw:bytchtes8316"
-       }
-}
-
-<codecs/es8316/Speaker.conf>
-<codecs/es8316/HeadPhones.conf>
-
-<codecs/es8316/IN1-InternalMic.conf>
-<codecs/es8316/IN2-HeadsetMic.conf>
diff --git a/ucm/bytcht-es8316-stereo-spk-in1-mic/bytcht-es8316-stereo-spk-in1-mic.conf b/ucm/bytcht-es8316-stereo-spk-in1-mic/bytcht-es8316-stereo-spk-in1-mic.conf
deleted file mode 100644 (file)
index 9bd3266..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-SectionUseCase."HiFi" {
-       File "../bytcht-es8316-stereo-spk-in1-mic/HiFi.conf"
-       Comment "Play HiFi quality Music"
-}
-
-SectionDefaults [
-       cdev "hw:bytchtes8316"
-]
diff --git a/ucm/bytcht-es8316-stereo-spk-in2-mic/HiFi.conf b/ucm/bytcht-es8316-stereo-spk-in2-mic/HiFi.conf
deleted file mode 100644 (file)
index 00d4b7f..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-SectionVerb {
-       EnableSequence [
-               cdev "hw:bytchtes8316"
-               <platforms/bytcr/PlatformEnableSeq.conf>
-               <codecs/es8316/EnableSeq.conf>
-       ]
-
-       DisableSequence [
-               cdev "hw:bytchtes8316"
-               <platforms/bytcr/PlatformDisableSeq.conf>
-       ]
-
-       Value {
-               PlaybackPCM "hw:bytchtes8316"
-               CapturePCM "hw:bytchtes8316"
-       }
-}
-
-<codecs/es8316/Speaker.conf>
-<codecs/es8316/HeadPhones.conf>
-
-<codecs/es8316/IN1-HeadsetMic.conf>
-<codecs/es8316/IN2-InternalMic.conf>
diff --git a/ucm/bytcht-es8316-stereo-spk-in2-mic/bytcht-es8316-stereo-spk-in2-mic.conf b/ucm/bytcht-es8316-stereo-spk-in2-mic/bytcht-es8316-stereo-spk-in2-mic.conf
deleted file mode 100644 (file)
index a94f0f7..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-SectionUseCase."HiFi" {
-       File "../bytcht-es8316-stereo-spk-in2-mic/HiFi.conf"
-       Comment "Play HiFi quality Music"
-}
-
-SectionDefaults [
-       cdev "hw:bytchtes8316"
-]
diff --git a/ucm/bytcht-es8316/HiFi.conf b/ucm/bytcht-es8316/HiFi.conf
deleted file mode 100644 (file)
index 7af3daa..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-SectionVerb {
-       EnableSequence [
-               cdev "hw:bytchtes8316"
-               <platforms/bytcr/PlatformEnableSeq.conf>
-               <codecs/es8316/EnableSeq.conf>
-       ]
-
-       DisableSequence [
-               cdev "hw:bytchtes8316"
-               <platforms/bytcr/PlatformDisableSeq.conf>
-       ]
-
-       Value {
-               PlaybackPCM "hw:bytchtes8316"
-               CapturePCM "hw:bytchtes8316"
-       }
-}
-
-<codecs/es8316/Speaker.conf>
-<codecs/es8316/MonoSpeaker.conf>
-<codecs/es8316/HeadPhones.conf>
-
-<codecs/es8316/IN1-InternalMic.conf>
-<codecs/es8316/IN2-InternalMic.conf>
-<codecs/es8316/IN1-HeadsetMic.conf>
-<codecs/es8316/IN2-HeadsetMic.conf>
diff --git a/ucm2/bytcht-es8316/HiFi-Components.conf b/ucm2/bytcht-es8316/HiFi-Components.conf
new file mode 100644 (file)
index 0000000..314d355
--- /dev/null
@@ -0,0 +1,45 @@
+If.spk {
+       Condition {
+               Type String
+               Haystack "${CardComponents}"
+               Needle "cfg-spk:2"
+       }
+       True {
+               <codecs/es8316/Speaker.conf>
+       }
+}
+
+If.mono {
+       Condition {
+               Type String
+               Haystack "${CardComponents}"
+               Needle "cfg-spk:1"
+       }
+       True {
+               <codecs/es8316/MonoSpeaker.conf>
+       }
+}
+
+If.in1 {
+       Condition {
+               Type String
+               Haystack "${CardComponents}"
+               Needle "cfg-mic:in1"
+       }
+       True {
+               <codecs/es8316/IN1-InternalMic.conf>
+               <codecs/es8316/IN2-HeadsetMic.conf>
+       }
+}
+
+If.in2 {
+       Condition {
+               Type String
+               Haystack "${CardComponents}"
+               Needle "cfg-mic:in2"
+       }
+       True {
+               <codecs/es8316/IN1-HeadsetMic.conf>
+               <codecs/es8316/IN2-InternalMic.conf>
+       }
+}
diff --git a/ucm2/bytcht-es8316/HiFi-LongName.conf b/ucm2/bytcht-es8316/HiFi-LongName.conf
new file mode 100644 (file)
index 0000000..ea7d1c3
--- /dev/null
@@ -0,0 +1,45 @@
+If.spk {
+       Condition {
+               Type String
+               Haystack "${CardLongName}"
+               Needle "-stereo-spk"
+       }
+       True {
+               <codecs/es8316/Speaker.conf>
+       }
+}
+
+If.mono {
+       Condition {
+               Type String
+               Haystack "${CardLongName}"
+               Needle "-mono-spk"
+       }
+       True {
+               <codecs/es8316/MonoSpeaker.conf>
+       }
+}
+
+If.in1 {
+       Condition {
+               Type String
+               Haystack "${CardLongName}"
+               Needle "-in1-mic"
+       }
+       True {
+               <codecs/es8316/IN1-InternalMic.conf>
+               <codecs/es8316/IN2-HeadsetMic.conf>
+       }
+}
+
+If.in2 {
+       Condition {
+               Type String
+               Haystack "${CardLongName}"
+               Needle "-in2-mic"
+       }
+       True {
+               <codecs/es8316/IN1-HeadsetMic.conf>
+               <codecs/es8316/IN2-InternalMic.conf>
+       }
+}
diff --git a/ucm2/bytcht-es8316/HiFi.conf b/ucm2/bytcht-es8316/HiFi.conf
new file mode 100644 (file)
index 0000000..768f010
--- /dev/null
@@ -0,0 +1,29 @@
+SectionVerb {
+       EnableSequence [
+               <platforms/bytcr/PlatformEnableSeq.conf>
+               <codecs/es8316/EnableSeq.conf>
+       ]
+
+       DisableSequence [
+               <platforms/bytcr/PlatformDisableSeq.conf>
+       ]
+
+       Value {
+               PlaybackPCM "hw:${CardId}"
+               CapturePCM "hw:${CardId}"
+       }
+}
+
+If.0 {
+       Condition {
+               Type String
+               Haystack "${CardComponents}"
+               Needle "cfg-spk:"
+       }
+       True {
+               <bytcht-es8316/HiFi-Components.conf>
+       }
+       False {
+               <bytcht-es8316/HiFi-LongName.conf>
+       }
+}
similarity index 64%
rename from ucm/bytcht-es8316/bytcht-es8316.conf
rename to ucm2/bytcht-es8316/bytcht-es8316.conf
index e77e29774c55a7551cdfeac5f6c6ff376514e526..d7a0518169fccf20840d6d569df2539fa9f926d4 100644 (file)
@@ -1,8 +1,6 @@
+Syntax 2
+
 SectionUseCase."HiFi" {
        File "HiFi.conf"
        Comment "Play HiFi quality Music"
 }
-
-SectionDefaults [
-       cdev "hw:bytchtes8316"
-]
similarity index 86%
rename from ucm/codecs/es8316/HeadPhones.conf
rename to ucm2/codecs/es8316/HeadPhones.conf
index ff13ef1b0696e08a2ab7db8d1e44c37d844295f9..3f3e591d3a93cfd2bf7d0ba62faa2eaceda10d11 100644 (file)
@@ -7,12 +7,10 @@ SectionDevice."Headphones" {
        ]
 
        EnableSequence [
-               cdev "hw:bytchtes8316"
                cset "name='Headphone Switch' on"
        ]
 
        DisableSequence [
-               cdev "hw:bytchtes8316"
                cset "name='Headphone Switch' off"
        ]
 
similarity index 88%
rename from ucm/codecs/es8316/IN1-HeadsetMic.conf
rename to ucm2/codecs/es8316/IN1-HeadsetMic.conf
index 050164685fd08d1d2ff1c12398bf07567635c513..997a50bac5bf37f159dea8aaa7a4f39c6fb9b972 100644 (file)
@@ -8,13 +8,11 @@ SectionDevice."HeadsetMic-IN1" {
        ]
 
        EnableSequence [
-               cdev "hw:bytchtes8316"
                cset "name='Differential Mux' lin1-rin1"
                cset "name='Headset Mic Switch' on"
        ]
 
        DisableSequence [
-               cdev "hw:bytchtes8316"
                cset "name='Headset Mic Switch' off"
        ]
 
similarity index 87%
rename from ucm/codecs/es8316/IN1-InternalMic.conf
rename to ucm2/codecs/es8316/IN1-InternalMic.conf
index 5386fda711f0d121b6d7222df6edc3c2ce4100d4..70a77b9287d047dc710aea650eb72e7e3e24ef75 100644 (file)
@@ -8,13 +8,11 @@ SectionDevice."InternalMic-IN1" {
        ]
 
        EnableSequence [
-               cdev "hw:bytchtes8316"
                cset "name='Differential Mux' lin1-rin1"
                cset "name='Internal Mic Switch' on"
        ]
 
        DisableSequence [
-               cdev "hw:bytchtes8316"
                cset "name='Internal Mic Switch' off"
        ]
 
similarity index 88%
rename from ucm/codecs/es8316/IN2-HeadsetMic.conf
rename to ucm2/codecs/es8316/IN2-HeadsetMic.conf
index 229e7e7b85241af395cd0a863e33867eb908e82c..1ab122110796b9c414ff6d98332bef5a38c32224 100644 (file)
@@ -8,13 +8,11 @@ SectionDevice."HeadsetMic-IN2" {
        ]
 
        EnableSequence [
-               cdev "hw:bytchtes8316"
                cset "name='Differential Mux' lin2-rin2"
                cset "name='Headset Mic Switch' on"
        ]
 
        DisableSequence [
-               cdev "hw:bytchtes8316"
                cset "name='Headset Mic Switch' off"
        ]
 
similarity index 87%
rename from ucm/codecs/es8316/IN2-InternalMic.conf
rename to ucm2/codecs/es8316/IN2-InternalMic.conf
index 59892fdcbea65a8abed05ac21cbd3a5ba353fd7e..7809f8a4775a75e7e94a133bb74aff3f8348a43b 100644 (file)
@@ -8,13 +8,11 @@ SectionDevice."InternalMic-IN2" {
        ]
 
        EnableSequence [
-               cdev "hw:bytchtes8316"
                cset "name='Differential Mux' lin2-rin2"
                cset "name='Internal Mic Switch' on"
        ]
 
        DisableSequence [
-               cdev "hw:bytchtes8316"
                cset "name='Internal Mic Switch' off"
        ]
 
similarity index 95%
rename from ucm/codecs/es8316/MonoSpeaker.conf
rename to ucm2/codecs/es8316/MonoSpeaker.conf
index b1a95a5bcc041c60bb0ebaf0d8df1bd387b962e3..704556a8f9c842353a0ce0453f88d6dc24301a4c 100644 (file)
@@ -7,8 +7,6 @@ SectionDevice."MonoSpeaker" {
        ]
 
        EnableSequence [
-               cdev "hw:bytchtes8316"
-
                # BYT/CHT devices with an ES8316 codec use a single speaker
                # connected between the headhpone LOUT and ROUT pins, expecting
                # the output to be in a mono differential mode. Presumably this
@@ -27,7 +25,6 @@ SectionDevice."MonoSpeaker" {
        ]
 
        DisableSequence [
-               cdev "hw:bytchtes8316"
                cset "name='Speaker Switch' off"
                # DAC settings back to normal for stereo headphones output
                cset "name='Playback Polarity' 0"
similarity index 83%
rename from ucm/codecs/es8316/Speaker.conf
rename to ucm2/codecs/es8316/Speaker.conf
index f0894c74417662eff269d0c0372329b431ec2063..0e77746fd4742e84509be6dddeac7bfc5bd3ea55 100644 (file)
@@ -7,12 +7,10 @@ SectionDevice."Speaker" {
        ]
 
        EnableSequence [
-               cdev "hw:bytchtes8316"
                cset "name='Speaker Switch' on"
        ]
 
        DisableSequence [
-               cdev "hw:bytchtes8316"
                cset "name='Speaker Switch' off"
        ]