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: 5/5] Create device comoponent for rt5645 Internal Analog Mic UCM
Date: Sat,  5 Jan 2019 19:47:15 -0800	[thread overview]
Message-ID: <20190106034715.21045-6-russell.parker7@gmail.com> (raw)
In-Reply-To: <20190106034715.21045-1-russell.parker7@gmail.com>

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

Since the Internal Analog Microphone device configuration is
identical for the rt5645 and rt5645 mono speaker UCMs, move
the entire definition to a component.

Signed-off-by: Russell Parker <russell.parker7@gmail.com>

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 489390d5..8497fa66 100644
--- a/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf
+++ b/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf
@@ -89,49 +89,7 @@ SectionDevice."Headphones" {
 	]
 }
 
-SectionDevice."Mic".0 {
-	Comment "Internal Analog Microphone"
-
-	Value {
-		CaptureChannels "2"
-		CapturePriority "150"
-	}
-
-	EnableSequence [
-		cdev "hw:chtrt5645"
-
-		cset "name='Int Analog Mic Switch' on"
-
-		cset "name='Sto1 ADC MIXL ADC1 Switch' on"
-		cset "name='Sto1 ADC MIXR ADC1 Switch' on"
-		cset "name='Sto1 ADC MIXL ADC2 Switch' off"
-		cset "name='Sto1 ADC MIXR ADC2 Switch' off"
-
-		cset "name='Mono ADC MIXL ADC1 Switch' on"
-		cset "name='Mono ADC MIXR ADC1 Switch' on"
-		cset "name='Mono ADC MIXL ADC2 Switch' off"
-		cset "name='Mono ADC MIXR ADC2 Switch' off"
-
-		cset "name='RECMIXL BST2 Switch' on"
-		cset "name='RECMIXR BST2 Switch' on"
-
-	]
-
-	DisableSequence [
-		cdev "hw:chtrt5645"
-
-		cset "name='Sto1 ADC MIXL ADC1 Switch' off"
-		cset "name='Sto1 ADC MIXR ADC1 Switch' off"
-		cset "name='Mono ADC MIXL ADC1 Switch' off"
-		cset "name='Mono ADC MIXR ADC1 Switch' off"
-
-		cset "name='RECMIXL BST2 Switch' off"
-		cset "name='RECMIXR BST2 Switch' off"
-
-		cset "name='Int Analog Mic Switch' off"
-	]
-}
-
+<codecs/rt5645-common/AnalogMic.conf>
 
 SectionDevice."HSMic".0 {
 	Comment "Headset Microphone"
diff --git a/src/conf/ucm/chtrt5645/HiFi.conf b/src/conf/ucm/chtrt5645/HiFi.conf
index ac5f60e2..b98ae66f 100644
--- a/src/conf/ucm/chtrt5645/HiFi.conf
+++ b/src/conf/ucm/chtrt5645/HiFi.conf
@@ -81,48 +81,7 @@ SectionDevice."Headphones" {
 	]
 }
 
-SectionDevice."Mic".0 {
-	Comment "Internal Analog Microphone"
-
-	Value {
-		CaptureChannels "2"
-		CapturePriority "150"
-	}
-
-	EnableSequence [
-		cdev "hw:chtrt5645"
-
-		cset "name='Int Analog Mic Switch' on"
-
-		cset "name='Sto1 ADC MIXL ADC1 Switch' on"
-		cset "name='Sto1 ADC MIXR ADC1 Switch' on"
-		cset "name='Sto1 ADC MIXL ADC2 Switch' off"
-		cset "name='Sto1 ADC MIXR ADC2 Switch' off"
-
-		cset "name='Mono ADC MIXL ADC1 Switch' on"
-		cset "name='Mono ADC MIXR ADC1 Switch' on"
-		cset "name='Mono ADC MIXL ADC2 Switch' off"
-		cset "name='Mono ADC MIXR ADC2 Switch' off"
-
-		cset "name='RECMIXL BST2 Switch' on"
-		cset "name='RECMIXR BST2 Switch' on"
-
-	]
-
-	DisableSequence [
-		cdev "hw:chtrt5645"
-
-		cset "name='Sto1 ADC MIXL ADC1 Switch' off"
-		cset "name='Sto1 ADC MIXR ADC1 Switch' off"
-		cset "name='Mono ADC MIXL ADC1 Switch' off"
-		cset "name='Mono ADC MIXR ADC1 Switch' off"
-
-		cset "name='RECMIXL BST2 Switch' off"
-		cset "name='RECMIXR BST2 Switch' off"
-
-		cset "name='Int Analog Mic Switch' off"
-	]
-}
+<codecs/rt5645-common/AnalogMic.conf>
 
 SectionDevice."HSMic".0 {
 	Comment "Headset Microphone"
diff --git a/src/conf/ucm/codecs/rt5645-common/AnalogMic.conf b/src/conf/ucm/codecs/rt5645-common/AnalogMic.conf
new file mode 100644
index 00000000..cbcefa7a
--- /dev/null
+++ b/src/conf/ucm/codecs/rt5645-common/AnalogMic.conf
@@ -0,0 +1,41 @@
+SectionDevice."Mic".0 {
+	Comment "Internal Analog Microphone"
+
+	Value {
+		CaptureChannels "2"
+		CapturePriority "150"
+	}
+
+	EnableSequence [
+		cdev "hw:chtrt5645"
+
+		cset "name='Int Analog Mic Switch' on"
+
+		cset "name='Sto1 ADC MIXL ADC1 Switch' on"
+		cset "name='Sto1 ADC MIXR ADC1 Switch' on"
+		cset "name='Sto1 ADC MIXL ADC2 Switch' off"
+		cset "name='Sto1 ADC MIXR ADC2 Switch' off"
+
+		cset "name='Mono ADC MIXL ADC1 Switch' on"
+		cset "name='Mono ADC MIXR ADC1 Switch' on"
+		cset "name='Mono ADC MIXL ADC2 Switch' off"
+		cset "name='Mono ADC MIXR ADC2 Switch' off"
+
+		cset "name='RECMIXL BST2 Switch' on"
+		cset "name='RECMIXR BST2 Switch' on"
+	]
+
+	DisableSequence [
+		cdev "hw:chtrt5645"
+
+		cset "name='Sto1 ADC MIXL ADC1 Switch' off"
+		cset "name='Sto1 ADC MIXR ADC1 Switch' off"
+		cset "name='Mono ADC MIXL ADC1 Switch' off"
+		cset "name='Mono ADC MIXR ADC1 Switch' off"
+
+		cset "name='RECMIXL BST2 Switch' off"
+		cset "name='RECMIXR BST2 Switch' off"
+
+		cset "name='Int Analog Mic Switch' off"
+	]
+}
diff --git a/src/conf/ucm/codecs/rt5645-common/Makefile.am b/src/conf/ucm/codecs/rt5645-common/Makefile.am
index 06403d9b..75924b40 100644
--- a/src/conf/ucm/codecs/rt5645-common/Makefile.am
+++ b/src/conf/ucm/codecs/rt5645-common/Makefile.am
@@ -3,5 +3,5 @@ ucmdir = $(alsaconfigdir)/ucm/codecs/rt5645-common
 ucm_DATA = DisableSeq.conf EnableSeq.conf HeadphonesEnableSeq.conf \
 		   SpeakerEnableSeq.conf DigitalMicDisableSeq.conf \
 		   DigitalMicEnableSeq.conf HSMicDisableSeq.conf \
-		   HSMicEnableSeq.conf
+		   HSMicEnableSeq.conf AnalogMic.conf
 EXTRA_DIST = $(ucm_DATA)
-- 
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 ` [PATCH ucm/conf: 3/5] Factor out rt5645 variants Speaker+Headphones shared UCM enable sequences russell.parker7
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 ` russell.parker7 [this message]
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-6-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