All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Binding <sbinding@opensource.cirrus.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: <alsa-devel@alsa-project.org>, <linux-sound@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>,
	"Stefan Binding" <sbinding@opensource.cirrus.com>
Subject: [PATCH v2 4/7] ALSA: hda: cs35l41: Update DSP1RX5/6 Sources for DSP config
Date: Thu, 11 Apr 2024 12:08:10 +0100	[thread overview]
Message-ID: <20240411110813.330483-5-sbinding@opensource.cirrus.com> (raw)
In-Reply-To: <20240411110813.330483-1-sbinding@opensource.cirrus.com>

Currently, all PC systems are set to use VBSTMON for DSP1RX5_SRC,
however, this is required only for external boost systems.
Internal boost systems require VPMON instead of VBSTMON to be the
input to DSP1RX5_SRC.
All systems require DSP1RX6_SRC to be set to VBSTMON.
Also fix incorrect comment for DACPCM1_SRC to use DSP1TX1.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
---
 sound/pci/hda/cs35l41_hda.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
index 1a5e970734ef..9f23fb07fb9e 100644
--- a/sound/pci/hda/cs35l41_hda.c
+++ b/sound/pci/hda/cs35l41_hda.c
@@ -102,7 +102,7 @@ static const struct reg_sequence cs35l41_hda_config_dsp[] = {
 	{ CS35L41_SP_HIZ_CTRL,		0x00000003 }, // Hi-Z unused/disabled
 	{ CS35L41_SP_TX_WL,		0x00000018 }, // 24 cycles/slot
 	{ CS35L41_SP_RX_WL,		0x00000018 }, // 24 cycles/slot
-	{ CS35L41_DAC_PCM1_SRC,		0x00000032 }, // DACPCM1_SRC = ERR_VOL
+	{ CS35L41_DAC_PCM1_SRC,		0x00000032 }, // DACPCM1_SRC = DSP1TX1
 	{ CS35L41_ASP_TX1_SRC,		0x00000018 }, // ASPTX1 SRC = VMON
 	{ CS35L41_ASP_TX2_SRC,		0x00000019 }, // ASPTX2 SRC = IMON
 	{ CS35L41_ASP_TX3_SRC,		0x00000028 }, // ASPTX3 SRC = VPMON
@@ -111,7 +111,7 @@ static const struct reg_sequence cs35l41_hda_config_dsp[] = {
 	{ CS35L41_DSP1_RX2_SRC,		0x00000008 }, // DSP1RX2 SRC = ASPRX1
 	{ CS35L41_DSP1_RX3_SRC,         0x00000018 }, // DSP1RX3 SRC = VMON
 	{ CS35L41_DSP1_RX4_SRC,         0x00000019 }, // DSP1RX4 SRC = IMON
-	{ CS35L41_DSP1_RX5_SRC,         0x00000029 }, // DSP1RX5 SRC = VBSTMON
+	{ CS35L41_DSP1_RX6_SRC,         0x00000029 }, // DSP1RX6 SRC = VBSTMON
 };
 
 static const struct reg_sequence cs35l41_hda_unmute[] = {
@@ -693,6 +693,10 @@ static void cs35l41_hda_play_start(struct device *dev)
 	if (cs35l41->cs_dsp.running) {
 		regmap_multi_reg_write(reg, cs35l41_hda_config_dsp,
 				       ARRAY_SIZE(cs35l41_hda_config_dsp));
+		if (cs35l41->hw_cfg.bst_type == CS35L41_INT_BOOST)
+			regmap_write(reg, CS35L41_DSP1_RX5_SRC, CS35L41_INPUT_SRC_VPMON);
+		else
+			regmap_write(reg, CS35L41_DSP1_RX5_SRC, CS35L41_INPUT_SRC_VBSTMON);
 		regmap_update_bits(reg, CS35L41_PWR_CTRL2,
 				   CS35L41_VMON_EN_MASK | CS35L41_IMON_EN_MASK,
 				   1 << CS35L41_VMON_EN_SHIFT | 1 << CS35L41_IMON_EN_SHIFT);
-- 
2.34.1


  parent reply	other threads:[~2024-04-11 11:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11 11:08 [PATCH v2 0/7] Add features, fixes and laptops for CS35L41 HDA Stefan Binding
2024-04-11 11:08 ` [PATCH v2 1/7] ALSA: hda: cs35l41: Set the max PCM Gain using tuning setting Stefan Binding
2024-04-11 11:08 ` [PATCH v2 2/7] ALSA: hda: cs35l41: Support HP Omen models without _DSD Stefan Binding
2024-04-11 11:08 ` [PATCH v2 3/7] ALSA: hda/realtek: Add quirks for HP Omen models using CS35L41 Stefan Binding
2024-04-11 11:08 ` Stefan Binding [this message]
2024-04-11 11:08 ` [PATCH v2 5/7] ALSA: hda: cs35l41: Use shared cs-amp-lib to apply calibration Stefan Binding
2024-04-11 11:08 ` [PATCH v2 6/7] ALSA: hda: cs35l41: Remove redundant argument to cs35l41_request_firmware_file() Stefan Binding
2024-04-11 11:08 ` [PATCH v2 7/7] ALSA: hda: cs35l41: Remove Speaker ID for Lenovo Legion slim 7 16ARHA7 Stefan Binding
2024-04-18  6:43 ` [PATCH v2 0/7] Add features, fixes and laptops for CS35L41 HDA Takashi Iwai

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=20240411110813.330483-5-sbinding@opensource.cirrus.com \
    --to=sbinding@opensource.cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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.