public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: russell.parker7@gmail.com
To: patch@alsa-project.org
Cc: alsa-devel@alsa-project.org, Russell Parker <russell.parker7@gmail.com>
Subject: [PATCH ucm/conf: 3/5] Factor out rt5645 variants Speaker+Headphones shared UCM enable sequences
Date: Sat,  5 Jan 2019 19:47:13 -0800	[thread overview]
Message-ID: <20190106034715.21045-4-russell.parker7@gmail.com> (raw)
In-Reply-To: <20190106034715.21045-1-russell.parker7@gmail.com>

From: Russell Parker <russell.parker7@gmail.com>

Move common enable sequences for rt5645 variants and rt5650
UCM configuratons 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>

diff --git a/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf
index 46508766..9616be27 100644
--- a/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf
+++ b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf
@@ -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-common/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-common/HeadphonesEnableSeq.conf>
 	]
 
 	DisableSequence [
diff --git a/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf
index c16cceac..eda1272a 100644
--- a/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf
+++ b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf
@@ -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-common/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-common/HeadphonesEnableSeq.conf>
 	]
 
 	DisableSequence [
diff --git a/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf b/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf
index 45cc5186..0e868e26 100644
--- a/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf
+++ b/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf
@@ -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-common/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-common/HeadphonesEnableSeq.conf>
 	]
 
 	DisableSequence [
diff --git a/src/conf/ucm/chtrt5645/HiFi.conf b/src/conf/ucm/chtrt5645/HiFi.conf
index bc4801d8..1bb9830d 100644
--- a/src/conf/ucm/chtrt5645/HiFi.conf
+++ b/src/conf/ucm/chtrt5645/HiFi.conf
@@ -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-common/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-common/HeadphonesEnableSeq.conf>
 	]
 
 	DisableSequence [
diff --git a/src/conf/ucm/chtrt5650/HiFi.conf b/src/conf/ucm/chtrt5650/HiFi.conf
index 7142dece..c8bd397a 100644
--- a/src/conf/ucm/chtrt5650/HiFi.conf
+++ b/src/conf/ucm/chtrt5650/HiFi.conf
@@ -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-common/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-common/HeadphonesEnableSeq.conf>
 	]
 
 	DisableSequence [
diff --git a/src/conf/ucm/codecs/rt5645-common/HeadphonesEnableSeq.conf b/src/conf/ucm/codecs/rt5645-common/HeadphonesEnableSeq.conf
new file mode 100644
index 00000000..6c231da7
--- /dev/null
+++ b/src/conf/ucm/codecs/rt5645-common/HeadphonesEnableSeq.conf
@@ -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"
diff --git a/src/conf/ucm/codecs/rt5645-common/Makefile.am b/src/conf/ucm/codecs/rt5645-common/Makefile.am
index f351fa37..7eff2e72 100644
--- a/src/conf/ucm/codecs/rt5645-common/Makefile.am
+++ b/src/conf/ucm/codecs/rt5645-common/Makefile.am
@@ -1,4 +1,5 @@
 alsaconfigdir = @ALSA_CONFIG_DIR@
 ucmdir = $(alsaconfigdir)/ucm/codecs/rt5645-common
-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-common/SpeakerEnableSeq.conf b/src/conf/ucm/codecs/rt5645-common/SpeakerEnableSeq.conf
new file mode 100644
index 00000000..2cc62fc5
--- /dev/null
+++ b/src/conf/ucm/codecs/rt5645-common/SpeakerEnableSeq.conf
@@ -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"
-- 
2.20.1

  parent reply	other threads:[~2019-01-06  3:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-06  3:47 [PATCH ucm/conf: 0/5] Factor out rt5645 + rt5650 shared UCM sequences russell.parker7
2019-01-06  3:47 ` [PATCH ucm/conf: 1/5] Update chtrt5645 ucm variants to use bytcr/PlatformEnableSeq.conf component russell.parker7
2019-01-06  3:47 ` [PATCH ucm/conf: 2/5] Create shared {En, Dis}ableSeq.conf components for rt5645 variants russell.parker7
2019-01-06  3:47 ` russell.parker7 [this message]
2019-01-06  3:47 ` [PATCH ucm/conf: 4/5] Factor out rt5645 variants Headset+Digital Mic UCM shared {en, dis}able sequences russell.parker7
2019-01-06  3:47 ` [PATCH ucm/conf: 5/5] Create device comoponent for rt5645 Internal Analog Mic UCM russell.parker7
2019-01-07 10:32 ` [PATCH ucm/conf: 0/5] Factor out rt5645 + rt5650 shared UCM sequences Jaroslav Kysela
2019-01-07 15:42   ` Russell Parker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190106034715.21045-4-russell.parker7@gmail.com \
    --to=russell.parker7@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=patch@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox