All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>,
	Charles Keepax <ckeepax@opensource.cirrus.com>,
	Mark Brown <broonie@kernel.org>, Sasha Levin <sashal@kernel.org>,
	david.rhodes@cirrus.com, rf@opensource.cirrus.com,
	linux-sound@vger.kernel.org, patches@opensource.cirrus.com
Subject: [PATCH AUTOSEL 6.18-6.1] ASoC: cs35l45: Corrects ASP_TX5 DAPM widget channel
Date: Mon,  2 Feb 2026 16:46:04 -0500	[thread overview]
Message-ID: <20260202214643.212290-9-sashal@kernel.org> (raw)
In-Reply-To: <20260202214643.212290-1-sashal@kernel.org>

From: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>

[ Upstream commit 6dd0fdc908c02318c28ec2c0979661846ee0a9f7 ]

ASP_TX5 was incorrectly mapped to a channel value of 3 corrects,
the channel value of 4.

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
Link: https://patch.msgid.link/20260115192523.1335742-2-rriveram@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

## Analysis of ASoC: cs35l45 DAPM Widget Channel Fix

### 1. COMMIT MESSAGE ANALYSIS

The commit message is straightforward: it corrects the ASP_TX5 DAPM
widget channel value from 3 to 4. The message explicitly states this is
a correction of an incorrect mapping. Key observations:
- Uses the word "Corrects" indicating this is a bug fix
- Has a "Reviewed-by:" tag from Charles Keepax (Cirrus Logic engineer)
- No Fixes: tag or Cc: stable tag (expected for commits under review)

### 2. CODE CHANGE ANALYSIS

The change is a single-character fix:
```c
- SND_SOC_DAPM_AIF_OUT("ASP_TX5", NULL, 3, CS35L45_ASP_ENABLES1,
  CS35L45_ASP_TX5_EN_SHIFT, 0),
+ SND_SOC_DAPM_AIF_OUT("ASP_TX5", NULL, 4, CS35L45_ASP_ENABLES1,
CS35L45_ASP_TX5_EN_SHIFT, 0),
```

Looking at the context, the third parameter in `SND_SOC_DAPM_AIF_OUT`
represents the channel number. The pattern in the code is clear:
- ASP_TX1: channel 0
- ASP_TX2: channel 1
- ASP_TX3: channel 2
- ASP_TX4: channel 3
- ASP_TX5: was 3 (duplicate!), should be 4

This is an obvious copy-paste error where ASP_TX5 was accidentally given
the same channel number (3) as ASP_TX4. Each TX widget should have a
unique, sequential channel number.

### 3. CLASSIFICATION

**Bug Fix**: This is clearly fixing an incorrect configuration value,
not adding a feature. The channel parameter is used by the ALSA/ASoC
framework to route audio data correctly. Having two TX widgets with the
same channel number would cause incorrect audio routing behavior.

**Type of Bug**: Data/configuration corruption - audio data intended for
channel 5 would be misrouted.

### 4. SCOPE AND RISK ASSESSMENT

- **Lines changed**: 1 line
- **Files changed**: 1 file (sound/soc/codecs/cs35l45.c)
- **Complexity**: Trivially simple - changing a single integer constant
- **Risk**: Extremely low - this is correcting an obviously wrong value
  to an obviously correct value
- **Subsystem**: ASoC codec driver for Cirrus Logic CS35L45 (audio
  amplifier IC)

The fix cannot introduce any new bugs because:
1. It's correcting a clearly wrong value (duplicate channel number)
2. The correct value (4) follows the obvious sequential pattern
3. No logic changes, just a constant correction

### 5. USER IMPACT

The CS35L45 is an audio amplifier commonly used in:
- Laptops
- Smartphones
- Tablets
- Other mobile/embedded devices

Users with CS35L45 hardware who use ASP_TX5 would experience:
- Incorrect audio routing
- Audio data corruption or loss on channel 5
- Potentially broken audio capture/monitoring functionality

While this may not affect all users of the driver (only those using all
5 TX channels), those who do use TX5 would definitely hit this bug.

### 6. STABILITY INDICATORS

- **Reviewed-by**: Charles Keepax (Cirrus Logic kernel engineer) -
  indicates the fix was reviewed by a domain expert
- **Maintainer sign-off**: Mark Brown (ASoC maintainer) accepted the
  patch
- The fix is trivially correct by inspection

### 7. DEPENDENCY CHECK

- No dependencies on other commits
- The cs35l45 driver exists in stable kernels
- The fix applies to the same code structure that has existed since the
  driver was introduced

### 8. STABLE KERNEL CRITERIA EVALUATION

| Criterion | Assessment |
|-----------|------------|
| Obviously correct | ✅ Yes - sequential channel numbering is obvious |
| Fixes a real bug | ✅ Yes - duplicate channel causes audio routing
issues |
| Important issue | ✅ Moderate - affects audio functionality for
affected users |
| Small and contained | ✅ Yes - 1 line change |
| No new features | ✅ Correct - just fixes misconfiguration |
| No new APIs | ✅ Correct |

### CONCLUSION

This is an ideal stable backport candidate:
1. **Trivially simple**: Single character change (3 → 4)
2. **Obviously correct**: The sequential pattern makes the error and fix
   self-evident
3. **Real bug**: Duplicate channel numbers cause actual audio routing
   problems
4. **Zero risk**: Cannot introduce regressions - it's correcting an
   obvious typo
5. **Well-reviewed**: Has review from Cirrus Logic engineer and ASoC
   maintainer
6. **Self-contained**: No dependencies, applies cleanly

The fix is small, surgical, and meets all stable kernel criteria.

**YES**

 sound/soc/codecs/cs35l45.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cs35l45.c b/sound/soc/codecs/cs35l45.c
index d4dcdf37bb709..9b1eff4e9bb71 100644
--- a/sound/soc/codecs/cs35l45.c
+++ b/sound/soc/codecs/cs35l45.c
@@ -455,7 +455,7 @@ static const struct snd_soc_dapm_widget cs35l45_dapm_widgets[] = {
 	SND_SOC_DAPM_AIF_OUT("ASP_TX2", NULL, 1, CS35L45_ASP_ENABLES1, CS35L45_ASP_TX2_EN_SHIFT, 0),
 	SND_SOC_DAPM_AIF_OUT("ASP_TX3", NULL, 2, CS35L45_ASP_ENABLES1, CS35L45_ASP_TX3_EN_SHIFT, 0),
 	SND_SOC_DAPM_AIF_OUT("ASP_TX4", NULL, 3, CS35L45_ASP_ENABLES1, CS35L45_ASP_TX4_EN_SHIFT, 0),
-	SND_SOC_DAPM_AIF_OUT("ASP_TX5", NULL, 3, CS35L45_ASP_ENABLES1, CS35L45_ASP_TX5_EN_SHIFT, 0),
+	SND_SOC_DAPM_AIF_OUT("ASP_TX5", NULL, 4, CS35L45_ASP_ENABLES1, CS35L45_ASP_TX5_EN_SHIFT, 0),
 
 	SND_SOC_DAPM_MUX("ASP_TX1 Source", SND_SOC_NOPM, 0, 0, &cs35l45_asp_muxes[0]),
 	SND_SOC_DAPM_MUX("ASP_TX2 Source", SND_SOC_NOPM, 0, 0, &cs35l45_asp_muxes[1]),
-- 
2.51.0


  parent reply	other threads:[~2026-02-02 21:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02 21:45 [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek - fixed speaker no sound Sasha Levin
2026-02-02 21:45 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Fix headset mic for TongFang X6AR55xU Sasha Levin
2026-02-02 21:45 ` [PATCH AUTOSEL 6.18] io_uring/rw: free potentially allocated iovec on cache put failure Sasha Levin
2026-02-02 21:45 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: ALC269 fixup for Lenovo Yoga Book 9i 13IRU8 audio Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18] ALSA: usb-audio: Add delay quirk for MOONDROP Moonriver2 Ti Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18-6.1] ASoC: amd: yc: Add ASUS ExpertBook PM1503CDA to quirks list Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18-5.10] gpio: sprd: Change sprd_gpio lock to raw_spin_lock Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18-6.6] spi: hisi-kunpeng: Fixed the wrong debugfs node name in hisi_spi debugfs initialization Sasha Levin
2026-02-02 21:46 ` Sasha Levin [this message]
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18-5.10] scsi: target: iscsi: Fix use-after-free in iscsit_dec_conn_usage_count() Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add quirk for Inspur S14-G1 Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18] btrfs: fix Wmaybe-uninitialized warning in replay_one_buffer() Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18-5.10] scsi: target: iscsi: Fix use-after-free in iscsit_dec_session_usage_count() Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18] Revert "drm/amd/display: pause the workload setting in dm" Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18] btrfs: sync read disk super and set block size Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18-5.10] wifi: mac80211: don't increment crypto_tx_tailroom_needed_cnt twice Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18] spi: intel-pci: Add support for Nova Lake SPI serial flash Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18-6.12] btrfs: reject new transactions if the fs is fully read-only Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18] riscv: Use 64-bit variable for output in __get_user_asm Sasha Levin
2026-02-02 21:46   ` Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18-6.6] regmap: maple: free entry on mas_store_gfp() failure Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18-6.6] wifi: mac80211: correctly check if CSA is active Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18-5.10] romfs: check sb_set_blocksize() return value Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18-5.10] wifi: cfg80211: Fix bitrate calculation overflow for HE rates Sasha Levin
2026-02-02 21:46 ` [PATCH AUTOSEL 6.18] tracing: Avoid possible signed 64-bit truncation 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=20260202214643.212290-9-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=david.rhodes@cirrus.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=patches@opensource.cirrus.com \
    --cc=rf@opensource.cirrus.com \
    --cc=rriveram@opensource.cirrus.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 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.