Archive-only list for patches
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Shuming Fan <shumingf@realtek.com>,
	Mark Brown <broonie@kernel.org>, Sasha Levin <sashal@kernel.org>,
	oder_chiou@realtek.com
Subject: [PATCH AUTOSEL 6.16] ASoC: rt721: fix FU33 Boost Volume control not working
Date: Tue, 19 Aug 2025 13:35:15 -0400	[thread overview]
Message-ID: <20250819173521.1079913-5-sashal@kernel.org> (raw)
In-Reply-To: <20250819173521.1079913-1-sashal@kernel.org>

From: Shuming Fan <shumingf@realtek.com>

[ Upstream commit 633e391d45bda3fc848d26bee6bbe57ef2935713 ]

This patch fixed FU33 Boost Volume control not working.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20250808055706.1110766-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

**YES**

This commit should be backported to stable kernel trees. Here's my
extensive analysis:

## Analysis of the Commit

### 1. Nature of the Fix
The commit fixes a broken user-facing audio control - "FU33 Boost Volume
control not working". This is a clear functional bug where a volume
control that should work is non-functional. The fix adds a single
register write during the jack preset initialization:

```c
rt_sdca_index_write(rt721->mbq_regmap, RT721_BOOST_CTRL,
    RT721_BST_4CH_TOP_GATING_CTRL1, 0x002a);
```

### 2. Impact on Users
- **User-visible bug**: The FU33 Boost Volume control is exposed to
  userspace through ALSA controls (as seen in line 712:
  `SOC_DOUBLE_R_EXT_TLV("FU33 Boost Volume",`). When this control
  doesn't work, users cannot adjust the boost gain for their microphone
  input, affecting audio recording quality.
- **Affects real hardware**: The RT721 is a real audio codec used in
  actual devices, meaning this bug affects real users.

### 3. Fix Characteristics
- **Minimal and contained**: The fix adds exactly 2 lines of code (one
  register write + one new #define)
- **Low risk**: The change only writes to a specific boost control
  register during initialization, following the same pattern as other
  register writes in the function
- **No architectural changes**: This is a simple hardware configuration
  fix, not a design change
- **Subsystem-confined**: The change is entirely within the RT721 codec
  driver

### 4. Related Context
Looking at the git history, there was a recent related fix
(`ff21a6ec0f27` - "fix boost gain calculation error") that specifically
addressed FU33 Boost Volume calculations. This current commit appears to
be completing that fix by ensuring the hardware is properly configured
to enable the boost functionality.

### 5. Code Safety
- The new register write follows the established pattern in
  `rt721_sdca_jack_preset()`
- It's placed logically with other control register configurations
- The register address (`RT721_BST_4CH_TOP_GATING_CTRL1`) and value
  (`0x002a`) appear to be enabling/configuring gating control for the
  boost circuit

### 6. Stable Tree Criteria Met
✓ **Fixes a real bug** - Non-functional volume control
✓ **Minimal change** - 2 lines added
✓ **No new features** - Only fixes existing functionality
✓ **Low regression risk** - Single register write in initialization
✓ **Hardware enablement** - Makes existing hardware work correctly
✓ **Clear user impact** - Broken audio control affects recording quality

The commit message could be more descriptive, but the fix itself is
exactly the type that should be backported to stable - it restores
broken functionality with minimal risk.

 sound/soc/codecs/rt721-sdca.c | 2 ++
 sound/soc/codecs/rt721-sdca.h | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/sound/soc/codecs/rt721-sdca.c b/sound/soc/codecs/rt721-sdca.c
index ba080957e933..98d8ebc6607f 100644
--- a/sound/soc/codecs/rt721-sdca.c
+++ b/sound/soc/codecs/rt721-sdca.c
@@ -278,6 +278,8 @@ static void rt721_sdca_jack_preset(struct rt721_sdca_priv *rt721)
 		RT721_ENT_FLOAT_CTL1, 0x4040);
 	rt_sdca_index_write(rt721->mbq_regmap, RT721_HDA_SDCA_FLOAT,
 		RT721_ENT_FLOAT_CTL4, 0x1201);
+	rt_sdca_index_write(rt721->mbq_regmap, RT721_BOOST_CTRL,
+		RT721_BST_4CH_TOP_GATING_CTRL1, 0x002a);
 	regmap_write(rt721->regmap, 0x2f58, 0x07);
 }
 
diff --git a/sound/soc/codecs/rt721-sdca.h b/sound/soc/codecs/rt721-sdca.h
index 0a82c107b19a..71fac9cd8739 100644
--- a/sound/soc/codecs/rt721-sdca.h
+++ b/sound/soc/codecs/rt721-sdca.h
@@ -56,6 +56,7 @@ struct rt721_sdca_dmic_kctrl_priv {
 #define RT721_CBJ_CTRL				0x0a
 #define RT721_CAP_PORT_CTRL			0x0c
 #define RT721_CLASD_AMP_CTRL			0x0d
+#define RT721_BOOST_CTRL			0x0f
 #define RT721_VENDOR_REG			0x20
 #define RT721_RC_CALIB_CTRL			0x40
 #define RT721_VENDOR_EQ_L			0x53
@@ -93,6 +94,9 @@ struct rt721_sdca_dmic_kctrl_priv {
 /* Index (NID:0dh) */
 #define RT721_CLASD_AMP_2CH_CAL			0x14
 
+/* Index (NID:0fh) */
+#define RT721_BST_4CH_TOP_GATING_CTRL1		0x05
+
 /* Index (NID:20h) */
 #define RT721_JD_PRODUCT_NUM			0x00
 #define RT721_ANALOG_BIAS_CTL3			0x04
-- 
2.50.1


  parent reply	other threads:[~2025-08-19 17:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-19 17:35 [PATCH AUTOSEL 6.16] io_uring/io-wq: add check free worker before create new worker Sasha Levin
2025-08-19 17:35 ` [PATCH AUTOSEL 6.16] erofs: Fallback to normal access if DAX is not supported on extra device Sasha Levin
2025-08-19 17:35 ` [PATCH AUTOSEL 6.16-5.4] scsi: core: sysfs: Correct sysfs attributes access rights Sasha Levin
2025-08-19 17:35 ` [PATCH AUTOSEL 6.16-6.1] smb: client: fix race with concurrent opens in unlink(2) Sasha Levin
2025-08-19 17:35 ` Sasha Levin [this message]
2025-08-19 17:35 ` [PATCH AUTOSEL 6.16] ASoC: rt1320: fix random cycle mute issue Sasha Levin
2025-08-19 17:35 ` [PATCH AUTOSEL 6.16-6.1] smb: client: fix race with concurrent opens in rename(2) Sasha Levin
2025-08-19 17:35 ` [PATCH AUTOSEL 6.16-6.6] erofs: fix atomic context detection when !CONFIG_DEBUG_LOCK_ALLOC Sasha Levin
2025-08-19 17:35 ` [PATCH AUTOSEL 6.16-5.15] ASoC: codecs: tx-macro: correct tx_macro_component_drv name Sasha Levin

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=20250819173521.1079913-5-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=broonie@kernel.org \
    --cc=oder_chiou@realtek.com \
    --cc=patches@lists.linux.dev \
    --cc=shumingf@realtek.com \
    --cc=stable@vger.kernel.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