Factor out rt5645 variants Speaker+Headphones shared UCM enable sequences
authorRussell Parker <russell.parker7@gmail.com>
Sun, 6 Jan 2019 03:47:13 +0000 (19:47 -0800)
committerJaroslav Kysela <perex@perex.cz>
Mon, 7 Jan 2019 10:27:01 +0000 (11:27 +0100)
Move common enable sequences for rt5645 variants and rt5650
UCM configurations into a shared component. The corresponding
disable sequences are only two lines each and do not seem worth
creating components for.

Signed-off-by: Russell Parker <russell.parker7@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf
src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf
src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf
src/conf/ucm/chtrt5645/HiFi.conf
src/conf/ucm/chtrt5650/HiFi.conf
src/conf/ucm/codecs/rt5645/HeadphonesEnableSeq.conf [new file with mode: 0644]
src/conf/ucm/codecs/rt5645/Makefile.am
src/conf/ucm/codecs/rt5645/SpeakerEnableSeq.conf [new file with mode: 0644]

index 46084b3..0f09d29 100644 (file)
@@ -43,12 +43,7 @@ SectionDevice."Speaker" {
        EnableSequence [
                cdev "hw:chtrt5645"
 
-               cset "name='Headphone Switch' off"
-               cset "name='Headphone Channel Switch' off"
-
-               cset "name='Ext Spk Switch' on"
-               cset "name='Speaker Channel Switch' on"
-               cset "name='Speaker Playback Volume' 31"
+               <codecs/rt5645/SpeakerEnableSeq.conf>
        ]
 
        DisableSequence [
@@ -75,13 +70,7 @@ SectionDevice."Headphones" {
        EnableSequence [
                cdev "hw:chtrt5645"
 
-               cset "name='Ext Spk Switch' off"
-               cset "name='Speaker Channel Switch' off"
-
-               cset "name='Headphone Switch' on"
-               cset "name='Headphone Channel Switch' on"
-               # 25/39 higher values cause crackling on some boards
-               cset "name='Headphone Playback Volume' 25"
+               <codecs/rt5645/HeadphonesEnableSeq.conf>
        ]
 
        DisableSequence [
index 4896a2a..31e06e0 100644 (file)
@@ -43,12 +43,7 @@ SectionDevice."Speaker" {
        EnableSequence [
                cdev "hw:chtrt5645"
 
-               cset "name='Headphone Switch' off"
-               cset "name='Headphone Channel Switch' off"
-
-               cset "name='Ext Spk Switch' on"
-               cset "name='Speaker Channel Switch' on"
-               cset "name='Speaker Playback Volume' 31"
+               <codecs/rt5645/SpeakerEnableSeq.conf>
        ]
 
        DisableSequence [
@@ -75,13 +70,7 @@ SectionDevice."Headphones" {
        EnableSequence [
                cdev "hw:chtrt5645"
 
-               cset "name='Ext Spk Switch' off"
-               cset "name='Speaker Channel Switch' off"
-
-               cset "name='Headphone Switch' on"
-               cset "name='Headphone Channel Switch' on"
-               # 25/39 higher values cause crackling on some boards
-               cset "name='Headphone Playback Volume' 25"
+               <codecs/rt5645/HeadphonesEnableSeq.conf>
        ]
 
        DisableSequence [
index d7d8dfb..36dcca3 100644 (file)
@@ -47,12 +47,7 @@ SectionDevice."Speaker" {
                cset "name='Stereo DAC MIXL DAC R1 Switch' 1"
                cset "name='Stereo DAC MIXR DAC R1 Switch' 0"
 
-               cset "name='Headphone Switch' off"
-               cset "name='Headphone Channel Switch' off"
-
-               cset "name='Ext Spk Switch' on"
-               cset "name='Speaker Channel Switch' on"
-               cset "name='Speaker Playback Volume' 31"
+               <codecs/rt5645/SpeakerEnableSeq.conf>
        ]
 
        DisableSequence [
@@ -83,13 +78,7 @@ SectionDevice."Headphones" {
                cset "name='Stereo DAC MIXL DAC R1 Switch' 0"
                cset "name='Stereo DAC MIXR DAC R1 Switch' 1"
 
-               cset "name='Ext Spk Switch' off"
-               cset "name='Speaker Channel Switch' off"
-
-               cset "name='Headphone Switch' on"
-               cset "name='Headphone Channel Switch' on"
-               # 25/39 higher values cause crackling on some boards
-               cset "name='Headphone Playback Volume' 25"
+               <codecs/rt5645/HeadphonesEnableSeq.conf>
        ]
 
        DisableSequence [
index b803cb2..7d4f0c4 100644 (file)
@@ -43,12 +43,7 @@ SectionDevice."Speaker" {
        EnableSequence [
                cdev "hw:chtrt5645"
 
-               cset "name='Headphone Switch' off"
-               cset "name='Headphone Channel Switch' off"
-
-               cset "name='Ext Spk Switch' on"
-               cset "name='Speaker Channel Switch' on"
-               cset "name='Speaker Playback Volume' 31"
+               <codecs/rt5645/SpeakerEnableSeq.conf>
        ]
 
        DisableSequence [
@@ -75,13 +70,7 @@ SectionDevice."Headphones" {
        EnableSequence [
                cdev "hw:chtrt5645"
 
-               cset "name='Ext Spk Switch' off"
-               cset "name='Speaker Channel Switch' off"
-
-               cset "name='Headphone Switch' on"
-               cset "name='Headphone Channel Switch' on"
-               # 25/39 higher values cause crackling on some boards
-               cset "name='Headphone Playback Volume' 25"
+               <codecs/rt5645/HeadphonesEnableSeq.conf>
        ]
 
        DisableSequence [
index a638da5..ad13851 100644 (file)
@@ -43,12 +43,7 @@ SectionDevice."Speaker" {
        EnableSequence [
                cdev "hw:chtrt5650"
 
-               cset "name='Headphone Switch' off"
-               cset "name='Headphone Channel Switch' off"
-
-               cset "name='Ext Spk Switch' on"
-               cset "name='Speaker Channel Switch' on"
-               cset "name='Speaker Playback Volume' 31"
+               <codecs/rt5645/SpeakerEnableSeq.conf>
        ]
 
        DisableSequence [
@@ -75,12 +70,7 @@ SectionDevice."Headphones" {
        EnableSequence [
                cdev "hw:chtrt5650"
 
-               cset "name='Ext Spk Switch' off"
-               cset "name='Speaker Channel Switch' off"
-
-               cset "name='Headphone Switch' on"
-               cset "name='Headphone Channel Switch' on"
-               cset "name='Headphone Playback Volume' 31"
+               <codecs/rt5645/HeadphonesEnableSeq.conf>
        ]
 
        DisableSequence [
diff --git a/src/conf/ucm/codecs/rt5645/HeadphonesEnableSeq.conf b/src/conf/ucm/codecs/rt5645/HeadphonesEnableSeq.conf
new file mode 100644 (file)
index 0000000..6c231da
--- /dev/null
@@ -0,0 +1,7 @@
+cset "name='Ext Spk Switch' off"
+cset "name='Speaker Channel Switch' off"
+
+cset "name='Headphone Switch' on"
+cset "name='Headphone Channel Switch' on"
+# 25/39 higher values cause crackling on some boards
+cset "name='Headphone Playback Volume' 25"
index 29ce95c..86d3fc8 100644 (file)
@@ -1,4 +1,5 @@
 alsaconfigdir = @ALSA_CONFIG_DIR@
 ucmdir = $(alsaconfigdir)/ucm/codecs/rt5645
-ucm_DATA = DisableSeq.conf EnableSeq.conf
+ucm_DATA = DisableSeq.conf EnableSeq.conf HeadphonesEnableSeq.conf \
+                  SpeakerEnableSeq.conf
 EXTRA_DIST = $(ucm_DATA)
diff --git a/src/conf/ucm/codecs/rt5645/SpeakerEnableSeq.conf b/src/conf/ucm/codecs/rt5645/SpeakerEnableSeq.conf
new file mode 100644 (file)
index 0000000..2cc62fc
--- /dev/null
@@ -0,0 +1,6 @@
+cset "name='Headphone Switch' off"
+cset "name='Headphone Channel Switch' off"
+
+cset "name='Ext Spk Switch' on"
+cset "name='Speaker Channel Switch' on"
+cset "name='Speaker Playback Volume' 31"