From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Maciej Strozek <mstrozek@opensource.cirrus.com>,
Charles Keepax <ckeepax@opensource.cirrus.com>,
Mark Brown <broonie@kernel.org>, Sasha Levin <sashal@kernel.org>,
lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH AUTOSEL 7.0-6.19] ASoC: sdw_utils: Add CS42L43B codec info
Date: Mon, 20 Apr 2026 09:18:22 -0400 [thread overview]
Message-ID: <20260420132314.1023554-108-sashal@kernel.org> (raw)
In-Reply-To: <20260420132314.1023554-1-sashal@kernel.org>
From: Maciej Strozek <mstrozek@opensource.cirrus.com>
[ Upstream commit 3e314fde2304b328929c471a70906bc5968f9dcf ]
Add codec_info for a new variant of CS42L43. It can resue existing info
but needs a new part_id.
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260306152829.3130530-2-mstrozek@opensource.cirrus.com
Tested-by: Charles Keepax <ckeepax@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:
Now I have a complete picture. Let me compile the full analysis.
---
## PHASE 1: COMMIT MESSAGE FORENSICS
**Step 1.1: Subject Line**
Record: [ASoC: sdw_utils] [Add] [CS42L43B codec info entry to
codec_info_list]
**Step 1.2: Tags**
- Signed-off-by: Maciej Strozek (Cirrus Logic engineer, author)
- Reviewed-by: Charles Keepax (Cirrus Logic, subsystem expert)
- Tested-by: Charles Keepax (verified the fix works)
- Link: patch.msgid.link for original submission
- Signed-off-by: Mark Brown (ASoC maintainer, applied the patch)
Record: Reviewed AND tested by Charles Keepax (Cirrus Logic), applied by
ASoC maintainer Mark Brown. No Fixes tag (expected). No syzbot.
**Step 1.3: Body Text**
The message says: "Add codec_info for a new variant of CS42L43. It can
reuse existing info but needs a new part_id." This is adding a device ID
(part_id = 0x2A3B) for a hardware variant of the existing CS42L43 codec.
Record: New hardware variant CS42L43B needs a new part_id entry. Reuses
existing callbacks and configuration.
**Step 1.4: Hidden Bug Fix Detection**
At face value this is a device ID addition, not a "hidden" bug fix.
However, as I'll show in Phase 6, the ACPI match tables referencing
CS42L43B are already in v7.0, making this missing entry cause audio
probe failure on affected systems.
Record: This is a device ID addition that also fixes a functional gap
(ACPI tables present but codec_info missing).
---
## PHASE 2: DIFF ANALYSIS
**Step 2.1: Inventory**
- Files changed: `sound/soc/sdw_utils/soc_sdw_utils.c`
- Lines added: ~54 lines (all data, no code logic)
- Lines removed: 0
- Functions modified: None; the change is within the `codec_info_list[]`
static array initializer
- Scope: single-file, purely additive data entry
Record: 1 file, +54 lines of struct data, 0 removed, purely data.
**Step 2.2: Code Flow Change**
The diff adds a new `codec_info_list[]` entry with `.part_id = 0x2A3B`
between the existing CS42L43 entry (0x4243) and the CS42L45 entry
(0x4245). The new entry is structurally identical to the CS42L43 entry —
same name_prefix, same sidecar functions, same 4 DAIs with same
callbacks, same quirks. The only difference is `.part_id = 0x2A3B`.
Record: Before: no entry for 0x2A3B; After: new entry identical to
0x4243 but with part_id 0x2A3B.
**Step 2.3: Bug Mechanism**
This is category (h) — Hardware workaround / Device ID addition. The new
`part_id = 0x2A3B` is the SoundWire equivalent of a PCI/USB device ID,
enabling the CS42L43B hardware variant to be matched by
`asoc_sdw_find_codec_info_part()`.
Record: Device ID addition (new part_id for SoundWire codec variant).
**Step 2.4: Fix Quality**
- The data is an exact copy of the existing 0x4243 entry with only
part_id changed
- All referenced callbacks (`asoc_sdw_cs42l43_hs_rtd_init`,
`asoc_sdw_cs42l43_spk_init`, etc.) already exist
- No new code logic, no new functions, no API changes
- Regression risk: essentially zero (only affects systems with CS42L43B
hardware)
Record: Trivially correct, minimal regression risk. Pure data addition.
---
## PHASE 3: GIT HISTORY
**Step 3.1: Blame**
The existing CS42L43 entry (0x4243) was introduced in commit
`e377c94773171e` by Vijendar Mukunda on 2024-08-01, when the
codec_info_list was moved from Intel SOF to common sdw_utils. This file
has been in the tree since v6.12.
Record: File created v6.12 (2024-08-01). CS42L43 entry (0x4243) has been
stable since then.
**Step 3.2: No Fixes tag** — expected, N/A.
**Step 3.3: File History**
Recent changes to this file are mostly additions of new codec entries
and minor fixes. The file is actively maintained as new codecs and
variants are added.
Record: Active file with frequent codec_info additions. No conflicts
expected.
**Step 3.4: Author Context**
Maciej Strozek is a Cirrus Logic engineer, a regular contributor to the
CS42L43/CS42L45 codec subsystem. He has ~10 recent commits in the sound
subsystem.
Record: Author is domain expert at Cirrus Logic, the vendor of this
codec.
**Step 3.5: Dependencies**
The critical dependency is the ACPI match entries for CS42L43B. These
exist in:
- `sound/soc/amd/acp/amd-acp70-acpi-match.c` (commit `ddd9bf2212ab8`,
2026-01-27) — **already in v7.0**
- `sound/soc/amd/acp/amd-acp63-acpi-match.c` (commit `fd13fc700e3e2`,
2026-02-24) — **already in v7.0**
Both ACPI match tables reference `0x00003101FA2A3B01ull` which encodes
part_id 0x2A3B. These are already in the stable tree. Without this
codec_info entry, the ACPI match succeeds but the codec configuration
lookup fails.
Record: Dependencies are MET — ACPI match tables for cs42l43b already in
v7.0.
---
## PHASE 4: MAILING LIST
**Step 4.1-4.5:**
b4 dig could not find the commit (likely the Message-ID format didn't
match expectations). Lore was protected by anti-scraping. However, the
commit itself documents the review chain: Reviewed-by and Tested-by from
Charles Keepax, applied by Mark Brown. This is the standard ASoC review
process.
Record: Could not fetch lore discussion due to anti-scraping protection.
The commit tags show proper review process.
---
## PHASE 5: CODE SEMANTIC ANALYSIS
**Step 5.1: Key Functions**
No functions are modified. The change is in the static
`codec_info_list[]` array.
**Step 5.2: Callers of `asoc_sdw_find_codec_info_part()`**
This function is called at two critical points:
- Line 1366: `asoc_sdw_count_sdw_endpoints()` — if it returns NULL,
returns `-EINVAL`, causing the entire endpoint counting to fail
- Line 1526: the DAI link creation path — if it returns NULL, returns
`-EINVAL`, causing the machine driver probe to fail
Record: Without a matching codec_info entry, the machine driver probe
fails with -EINVAL. Audio is completely non-functional on affected
systems.
**Step 5.3-5.5:** N/A — no new code logic to trace.
---
## PHASE 6: STABLE TREE ANALYSIS
**Step 6.1: Buggy Code in Stable Trees**
The `codec_info_list[]` array exists in v7.0 (file created in v6.12).
The ACPI match tables for cs42l43b are already in v7.0 (`ddd9bf2212ab8`
and `fd13fc700e3e2` both verified as ancestors of v7.0). This means v7.0
stable already has systems defined that use CS42L43B hardware, but the
codec_info entry for part_id 0x2A3B is MISSING.
Record: The gap exists in v7.0 — ACPI tables reference CS42L43B but
codec_info_list lacks the entry.
**Step 6.2: Backport Complications**
The patch is purely additive data into a well-defined array. It should
apply cleanly.
Record: Clean apply expected.
**Step 6.3:** No prior fix for this issue.
---
## PHASE 7: SUBSYSTEM CONTEXT
**Step 7.1:** ASoC / SoundWire machine driver support — IMPORTANT
subsystem. Audio is a core user-facing feature.
**Step 7.2:** Actively maintained with frequent additions.
---
## PHASE 8: IMPACT AND RISK ASSESSMENT
**Step 8.1: Who is Affected**
Users with AMD ACP63 or ACP70 platforms that have CS42L43B audio codec
hardware. These are real laptop configurations defined in the ACPI match
tables already in v7.0.
**Step 8.2: Trigger Conditions**
Boot any system with CS42L43B hardware → audio subsystem probes → ACPI
match succeeds → codec_info lookup fails → `-EINVAL` → no audio. This is
100% reproducible on affected hardware.
**Step 8.3: Failure Mode**
Machine driver probe failure (returns -EINVAL). Complete audio loss on
affected systems. Severity: **HIGH** — audio is a fundamental feature.
**Step 8.4: Risk-Benefit**
- Benefit: HIGH — enables audio on affected hardware; fixes complete
functional failure
- Risk: VERY LOW — purely additive data, identical to existing proven
entry, only part_id differs
- Ratio: Strongly favorable
---
## PHASE 9: FINAL SYNTHESIS
**Evidence FOR backporting:**
- Device ID addition to existing driver (explicit stable exception)
- ACPI match tables referencing this hardware are ALREADY in v7.0
- Without this, audio probe fails with -EINVAL on affected systems
- Purely data — no new code paths, no new logic
- Exact copy of existing, proven CS42L43 entry with only part_id changed
- Reviewed AND tested by Cirrus Logic domain expert
- Applied by ASoC maintainer Mark Brown
- Zero regression risk (only affects cs42l43b hardware)
**Evidence AGAINST backporting:**
- No explicit Fixes: tag or Cc: stable (expected for autosel candidates)
- 54 lines rather than single-line ID addition (but all data, no code)
- Commit message doesn't describe a "bug" — describes hardware
enablement
**Stable Rules Checklist:**
1. Obviously correct and tested? **YES** — exact copy of existing entry,
tested by reviewer
2. Fixes a real bug? **YES** — audio probe failure on hardware already
matched by ACPI tables in v7.0
3. Important? **YES** — complete audio loss
4. Small and contained? **YES** — 54 lines of data in one file
5. No new features or APIs? **YES** — just a device ID
6. Can apply to stable? **YES** — clean apply expected
**Exception Category:** Device ID addition to existing driver.
---
## Verification
- [Phase 1] Parsed tags: Reviewed-by + Tested-by from Charles Keepax
(Cirrus), applied by Mark Brown (ASoC maintainer)
- [Phase 2] Diff analysis: +54 lines, all struct data, new
`codec_info_list[]` entry with `.part_id = 0x2A3B`, identical to
existing 0x4243 entry
- [Phase 3] git blame: CS42L43 entry (0x4243) introduced in
e377c94773171e (v6.12, 2024-08-01), present in v7.0
- [Phase 3] git merge-base: ddd9bf2212ab8 (ACP70 cs42l43b ACPI match) IS
ancestor of v7.0 — confirmed
- [Phase 3] git merge-base: fd13fc700e3e2 (ACP63 cs42l43b ACPI match) IS
ancestor of v7.0 — confirmed
- [Phase 4] b4 dig failed to find match; lore anti-scraping blocked web
fetch
- [Phase 5] Verified call sites: `asoc_sdw_find_codec_info_part()`
returns NULL for unknown part_id → callers return -EINVAL → probe
failure
- [Phase 5] Read lines 1366-1368 and 1526-1528: confirmed NULL → -EINVAL
return path
- [Phase 6] ACPI match tables reference `0x00003101FA2A3B01ull` (part_id
0x2A3B) already in v7.0
- [Phase 6] codec_info_list lacks 0x2A3B entry in v7.0 — confirmed via
grep
- [Phase 8] Failure mode: probe returns -EINVAL → complete audio loss on
cs42l43b systems, severity HIGH
The ACPI match tables already in v7.0 promise CS42L43B support, but
without this codec_info entry, the machine driver probe fails. This is a
device ID addition that fixes complete audio failure on affected AMD
laptop platforms.
**YES**
sound/soc/sdw_utils/soc_sdw_utils.c | 54 +++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c
index 0e67d9f34cba3..4f9089b2a9f84 100644
--- a/sound/soc/sdw_utils/soc_sdw_utils.c
+++ b/sound/soc/sdw_utils/soc_sdw_utils.c
@@ -723,6 +723,60 @@ struct asoc_sdw_codec_info codec_info_list[] = {
},
.dai_num = 4,
},
+ {
+ .part_id = 0x2A3B,
+ .name_prefix = "cs42l43",
+ .count_sidecar = asoc_sdw_bridge_cs35l56_count_sidecar,
+ .add_sidecar = asoc_sdw_bridge_cs35l56_add_sidecar,
+ .dais = {
+ {
+ .direction = {true, false},
+ .codec_name = "cs42l43-codec",
+ .dai_name = "cs42l43-dp5",
+ .dai_type = SOC_SDW_DAI_TYPE_JACK,
+ .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
+ .rtd_init = asoc_sdw_cs42l43_hs_rtd_init,
+ .controls = generic_jack_controls,
+ .num_controls = ARRAY_SIZE(generic_jack_controls),
+ .widgets = generic_jack_widgets,
+ .num_widgets = ARRAY_SIZE(generic_jack_widgets),
+ },
+ {
+ .direction = {false, true},
+ .codec_name = "cs42l43-codec",
+ .dai_name = "cs42l43-dp1",
+ .dai_type = SOC_SDW_DAI_TYPE_MIC,
+ .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID},
+ .rtd_init = asoc_sdw_cs42l43_dmic_rtd_init,
+ .widgets = generic_dmic_widgets,
+ .num_widgets = ARRAY_SIZE(generic_dmic_widgets),
+ .quirk = SOC_SDW_CODEC_MIC,
+ .quirk_exclude = true,
+ },
+ {
+ .direction = {false, true},
+ .codec_name = "cs42l43-codec",
+ .dai_name = "cs42l43-dp2",
+ .dai_type = SOC_SDW_DAI_TYPE_JACK,
+ .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_JACK_IN_DAI_ID},
+ },
+ {
+ .direction = {true, false},
+ .codec_name = "cs42l43-codec",
+ .dai_name = "cs42l43-dp6",
+ .dai_type = SOC_SDW_DAI_TYPE_AMP,
+ .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
+ .init = asoc_sdw_cs42l43_spk_init,
+ .rtd_init = asoc_sdw_cs42l43_spk_rtd_init,
+ .controls = generic_spk_controls,
+ .num_controls = ARRAY_SIZE(generic_spk_controls),
+ .widgets = generic_spk_widgets,
+ .num_widgets = ARRAY_SIZE(generic_spk_widgets),
+ .quirk = SOC_SDW_CODEC_SPKR | SOC_SDW_SIDECAR_AMPS,
+ },
+ },
+ .dai_num = 4,
+ },
{
.part_id = 0x4245,
.name_prefix = "cs42l45",
--
2.53.0
next prev parent reply other threads:[~2026-04-20 13:26 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 13:16 [PATCH AUTOSEL 7.0-5.10] ASoC: tas2552: Allow audio enable GPIO to sleep Sasha Levin
2026-04-20 13:16 ` [PATCH AUTOSEL 7.0-5.10] ASoC: Intel: bytcr_rt5651: Fix MCLK leak on platform_clock_control error Sasha Levin
2026-04-20 13:17 ` [PATCH AUTOSEL 7.0-6.18] ALSA: usb-audio: Add iface reset and delay quirk for HUAWEI USB-C HEADSET Sasha Levin
2026-04-20 13:17 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14IMH9 Sasha Levin
2026-04-20 13:17 ` [PATCH AUTOSEL 7.0-5.10] ALSA: aoa/tas: Fix OF node leak on probe failure Sasha Levin
2026-04-20 13:17 ` [PATCH AUTOSEL 7.0-5.10] ASoC: ti: davinci-mcasp: Add system suspend/resume support Sasha Levin
2026-04-20 13:17 ` [PATCH AUTOSEL 6.18] ALSA: asihpi: avoid write overflow check warning Sasha Levin
2026-04-20 13:17 ` [PATCH AUTOSEL 7.0-5.10] ASoC: rt5640: Handle 0Hz sysclk during stream shutdown Sasha Levin
2026-04-20 13:17 ` [PATCH AUTOSEL 7.0-5.10] ALSA: compress: Refuse to update timestamps for unconfigured streams Sasha Levin
2026-04-20 13:17 ` [PATCH AUTOSEL 7.0-5.10] ASoC: Intel: cht_bsw_rt5672: Fix MCLK leak on platform_clock_control error Sasha Levin
2026-04-20 13:17 ` [PATCH AUTOSEL 7.0-5.10] ASoC: codecs: wcd-clsh: Always update buck/flyback on transitions on transitions Sasha Levin
2026-04-20 13:18 ` [PATCH AUTOSEL 6.18] ALSA:usb:qcom: add AUXILIARY_BUS to Kconfig dependencies Sasha Levin
2026-04-20 13:18 ` [PATCH AUTOSEL 6.18] ASoC: SDCA: Fix overwritten var within for loop Sasha Levin
2026-04-20 13:18 ` Sasha Levin [this message]
2026-04-20 13:18 ` [PATCH AUTOSEL 7.0-6.1] ASoC: mxs-sgtl5000: disable MCLK on error paths of mxs_sgtl5000_probe() Sasha Levin
2026-04-20 13:18 ` [PATCH AUTOSEL 6.18] ASoC: amd: acp: update DMI quirk and add ACP DMIC for Lenovo platforms Sasha Levin
2026-04-20 13:19 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add HP ENVY Laptop 13-ba0xxx quirk Sasha Levin
2026-04-20 13:19 ` [PATCH AUTOSEL 6.18] ALSA: usb-audio: Fix quirk flags for NeuralDSP Quad Cortex Sasha Levin
2026-04-20 13:19 ` [PATCH AUTOSEL 6.18] ASoC: amd: yc: Add DMI quirk for ASUS EXPERTBOOK BM1403CDA Sasha Levin
2026-04-20 13:19 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add quirk for Lenovo Yoga Slim 7 14AKP10 Sasha Levin
2026-04-20 13:19 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14IAH10 Sasha Levin
2026-04-20 13:19 ` [PATCH AUTOSEL 6.18] ASoC: stm32_sai: fix incorrect BCLK polarity for DSP_A/B, LEFT_J Sasha Levin
2026-04-20 13:20 ` [PATCH AUTOSEL 6.18] ASoC: amd: yc: Add DMI quirk for Thin A15 B7VF Sasha Levin
2026-04-20 13:20 ` [PATCH AUTOSEL 7.0-6.19] ALSA: hda/realtek: Add support for HP Laptops Sasha Levin
2026-04-20 13:20 ` [PATCH AUTOSEL 7.0-6.12] ALSA: hda/realtek: Add quirk for Acer PT316-51S headset mic Sasha Levin
2026-04-20 13:20 ` [PATCH AUTOSEL 7.0-6.18] ALSA: usb-audio: add Studio 1824 support Sasha Levin
2026-04-20 13:20 ` [PATCH AUTOSEL 7.0-6.1] ASoC: amd: yc: Add MSI Vector A16 HX A8WHG to quirk table Sasha Levin
2026-04-20 13:20 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add quirk for Samsung Book2 Pro 360 (NP950QED) Sasha Levin
2026-04-20 13:20 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 15-eg0xxx Sasha Levin
2026-04-20 13:20 ` [PATCH AUTOSEL 6.18] ASoC: SOF: topology: reject invalid vendor array size in token parser Sasha Levin
2026-04-20 13:21 ` [PATCH AUTOSEL 7.0-6.12] ALSA: pcm: Use pcm_lib_apply_appl_ptr() in x32 sync_ptr Sasha Levin
2026-04-20 13:21 ` [PATCH AUTOSEL 6.18] ASoC: soc-core: call missing INIT_LIST_HEAD() for card_aux_list Sasha Levin
2026-04-20 13:21 ` [PATCH AUTOSEL 7.0-5.10] ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control error Sasha Levin
2026-04-20 13:21 ` [PATCH AUTOSEL 7.0-6.6] ALSA: hda/realtek: Add quirk for HP Spectre x360 14-ea Sasha Levin
2026-04-20 13:22 ` [PATCH AUTOSEL 7.0-6.18] ALSA: usb-audio: Add quirk flags for Feaulle Rainbow Sasha Levin
2026-04-20 13:22 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: add HP Laptop 15-fd0xxx mute LED quirk Sasha Levin
2026-04-20 13:22 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add quirk for ASUS ROG Flow Z13-KJP GZ302EAC 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=20260420132314.1023554-108-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mstrozek@opensource.cirrus.com \
--cc=patches@lists.linux.dev \
--cc=perex@perex.cz \
--cc=stable@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox