All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Jaroslav Kysela <perex@perex.cz>
Cc: Hans de Goede <hdegoede@redhat.com>,
	alsa-devel@alsa-project.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Bard Liao <bard.liao@intel.com>
Subject: [PATCH alsa-ucm-conf 2/8] codecs/rt5640: Cleanup: Initially disable all inputs and outputs
Date: Fri, 26 Feb 2021 16:40:19 +0100	[thread overview]
Message-ID: <20210226154025.84828-3-hdegoede@redhat.com> (raw)
In-Reply-To: <20210226154025.84828-1-hdegoede@redhat.com>

Cleanup: no functional changes intended.

Disable all inputs and outputs from the main EnableSequence.

This allows removing some weirdness from the individual input/output
EnableSequences where they were turning controls for other inputs/outputs
then themselves off.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 ucm2/codecs/rt5640/EnableSeq.conf       | 21 +++++++++++++++++++++
 ucm2/codecs/rt5640/HeadPhones.conf      |  1 -
 ucm2/codecs/rt5640/IN1-InternalMic.conf |  2 --
 ucm2/codecs/rt5640/IN3-InternalMic.conf |  2 --
 ucm2/codecs/rt5640/MonoSpeaker.conf     |  1 -
 ucm2/codecs/rt5640/Speaker.conf         |  1 -
 6 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/ucm2/codecs/rt5640/EnableSeq.conf b/ucm2/codecs/rt5640/EnableSeq.conf
index 4754df7..5dc7092 100644
--- a/ucm2/codecs/rt5640/EnableSeq.conf
+++ b/ucm2/codecs/rt5640/EnableSeq.conf
@@ -48,6 +48,27 @@ EnableSequence [
 	cset "name='IN2 Boost' 1"
 	cset "name='IN3 Boost' 8"
 
+	# Start with all controls which are used by the individual
+	# input/output Enable/DisableSequences off
+
+	cset "name='RECMIXL BST1 Switch' off"
+	cset "name='RECMIXR BST1 Switch' off"
+	cset "name='RECMIXL BST2 Switch' off"
+	cset "name='RECMIXR BST2 Switch' off"
+	cset "name='RECMIXL BST3 Switch' off"
+	cset "name='RECMIXR BST3 Switch' off"
+
+	cset "name='Stereo ADC MIXL ADC1 Switch' off"
+	cset "name='Stereo ADC MIXR ADC1 Switch' off"
+	cset "name='Stereo ADC MIXL ADC2 Switch' off"
+	cset "name='Stereo ADC MIXR ADC2 Switch' off"
+	cset "name='Mono ADC MIXL ADC1 Switch' off"
+	cset "name='Mono ADC MIXR ADC1 Switch' off"
+	cset "name='Mono ADC MIXL ADC2 Switch' off"
+	cset "name='Mono ADC MIXR ADC2 Switch' off"
+
+	cset "name='Speaker Switch' off"
+	cset "name='Headphone Switch' off"
 	cset "name='Internal Mic Switch' off"
 	cset "name='Headset Mic Switch' off"
 ]
diff --git a/ucm2/codecs/rt5640/HeadPhones.conf b/ucm2/codecs/rt5640/HeadPhones.conf
index a9e4d20..1f4316d 100644
--- a/ucm2/codecs/rt5640/HeadPhones.conf
+++ b/ucm2/codecs/rt5640/HeadPhones.conf
@@ -17,7 +17,6 @@ SectionDevice."Headphones" {
  		cset "name='HPO MIX HPVOL Switch'  on"
  		cset "name='Headphone Switch'  on"
 		cset "name='HP Channel Switch' on"
- 		cset "name='Speaker Switch' off"
 		cset "name='HP L Playback Switch' on"
 		cset "name='HP R Playback Switch' on"
 		cset "name='HP Playback Volume' 29"
diff --git a/ucm2/codecs/rt5640/IN1-InternalMic.conf b/ucm2/codecs/rt5640/IN1-InternalMic.conf
index 260df90..d7c419e 100644
--- a/ucm2/codecs/rt5640/IN1-InternalMic.conf
+++ b/ucm2/codecs/rt5640/IN1-InternalMic.conf
@@ -10,8 +10,6 @@ SectionDevice."Mic" {
 
 		cset "name='RECMIXL BST1 Switch' on"
 		cset "name='RECMIXR BST1 Switch' on"
-		cset "name='RECMIXL BST3 Switch' off"
-		cset "name='RECMIXR BST3 Switch' off"
 
 		cset "name='Stereo ADC MIXL ADC1 Switch' on"
 		cset "name='Stereo ADC MIXR ADC1 Switch' on"
diff --git a/ucm2/codecs/rt5640/IN3-InternalMic.conf b/ucm2/codecs/rt5640/IN3-InternalMic.conf
index ebd2b9c..3e330e6 100644
--- a/ucm2/codecs/rt5640/IN3-InternalMic.conf
+++ b/ucm2/codecs/rt5640/IN3-InternalMic.conf
@@ -8,8 +8,6 @@ SectionDevice."Mic" {
 	EnableSequence [
 		cset "name='Internal Mic Switch' on"
 
-		cset "name='RECMIXL BST1 Switch' off"
-		cset "name='RECMIXR BST1 Switch' off"
 		cset "name='RECMIXL BST3 Switch' on"
 		cset "name='RECMIXR BST3 Switch' on"
 
diff --git a/ucm2/codecs/rt5640/MonoSpeaker.conf b/ucm2/codecs/rt5640/MonoSpeaker.conf
index 23cf34c..5035c8d 100644
--- a/ucm2/codecs/rt5640/MonoSpeaker.conf
+++ b/ucm2/codecs/rt5640/MonoSpeaker.conf
@@ -14,7 +14,6 @@ SectionDevice."Speaker" {
 		cset "name='SPOL MIX SPKVOL R Switch' on"
 		cset "name='Speaker Switch' on"
 		cset "name='Speaker Channel Switch' on"
-		cset "name='Headphone Switch' off"
 		cset "name='Speaker L Playback Switch' on"
 		cset "name='Speaker R Playback Switch' on"
 		cset "name='Speaker Playback Volume' 35"
diff --git a/ucm2/codecs/rt5640/Speaker.conf b/ucm2/codecs/rt5640/Speaker.conf
index 422cfdf..fd74994 100644
--- a/ucm2/codecs/rt5640/Speaker.conf
+++ b/ucm2/codecs/rt5640/Speaker.conf
@@ -14,7 +14,6 @@ SectionDevice."Speaker" {
 		cset "name='SPOL MIX SPKVOL R Switch' off"
 		cset "name='Speaker Switch' on"
 		cset "name='Speaker Channel Switch' on"
-		cset "name='Headphone Switch' off"
 		cset "name='Speaker L Playback Switch' on"
 		cset "name='Speaker R Playback Switch' on"
 		cset "name='Speaker Playback Volume' 35"
-- 
2.30.1


  parent reply	other threads:[~2021-02-26 15:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-26 15:40 [PATCH alsa-ucm-conf 0/8] codecs/rt5640: Cleanup + HW volume control support Hans de Goede
2021-02-26 15:40 ` [PATCH alsa-ucm-conf 1/8] codecs/rt5640: Cleanup: unify Stereo / Mono ADC handling Hans de Goede
2021-02-26 15:40 ` Hans de Goede [this message]
2021-02-26 15:40 ` [PATCH alsa-ucm-conf 3/8] codecs/rt5640: Cleanup: Move 'SPK MIX' setup to main EnableSequene Hans de Goede
2021-02-26 15:40 ` [PATCH alsa-ucm-conf 4/8] codecs/rt5640: Drop bogus 'DIG MIXL DAC L2 Switch' setting Hans de Goede
2021-02-26 15:40 ` [PATCH alsa-ucm-conf 5/8] codecs/rt5640: Unify capture volume for AIF1 and AIF2 recording paths Hans de Goede
2021-02-26 15:40 ` [PATCH alsa-ucm-conf 6/8] codecs/rt5640: Add hardware volume-control support Hans de Goede
2021-02-26 15:40 ` [PATCH alsa-ucm-conf 7/8] codecs/rt5640: Use the new "aif:%d" part of the components string Hans de Goede
2021-02-26 15:40 ` [PATCH alsa-ucm-conf 8/8] codecs/rt5640: Specify Playback/CaptureMasterElem for HW volume-control Hans de Goede

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=20210226154025.84828-3-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bard.liao@intel.com \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.