* [PATCH AUTOSEL 6.18] ALSA: usb-audio: Add MIN_MUTE quirk for Creative Sound Blaster Play! 3
[not found] <20261019135441.1420968-1-sashal@kernel.org>
@ 2026-10-19 13:45 ` Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Fix speakers on ASUS ROG Zephyrus G14 GA403UM Sasha Levin
` (60 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:45 UTC (permalink / raw)
To: patches, stable
Cc: Chad Talbott, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Chad Talbott <chad.talbott@gmail.com>
[ Upstream commit 352cef030f9036a658e6eb03d6bb85fa19c7c103 ]
The Creative Sound Blaster Play! 3 (041e:324d) exposes a Feature Unit
volume control with a range of -44.00 dB .. 0.00 dB over raw values
0..88, but raw value 0 is in fact a hard mute rather than -44.00 dB.
Tested on hardware.
Signed-off-by: Chad Talbott <chad.talbott@gmail.com>
Link: https://patch.msgid.link/20260819003237.452807-1-chad.talbott@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a hardware quirk for an existing USB-audio device. The local
tree is **6.12.111** (`p-6.12-3-gc504cf0baa3d8`). The MIN_MUTE machinery
is already here; only the device ID is missing.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: `[ALSA: usb-audio:] [Add] [MIN_MUTE quirk for Creative Sound
Blaster Play! 3 (041e:324d)]`
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Signed-off-by: Chad Talbott <chad.talbott@gmail.com>` (author)
- `Link: https://patch.msgid.link/20260819003237.452807-1-
chad.talbott@gmail.com`
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` (ALSA maintainer applied
it)
- No `Fixes:`, no `Reported-by:`, no `Cc: stable` (absence is expected)
- Ignore any pipeline `Signed-off-by: Sasha Levin` / `[Upstream commit
...]` markers
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- Bug: Play! 3 reports Feature Unit volume as -44.00 dB .. 0.00 dB over
raw 0..88, but raw 0 is a **hard mute**, not -44 dB.
- Symptom: userspace (PulseAudio/PipeWire) treats the bottom of the
slider as a quiet but audible level. Volume mapping is wrong; audio
stays silent until the slider is raised well above 0.
- Version info: none in the message. The device is existing USB audio
hardware, not a new kernel-era device.
- Root cause: device firmware lies about the meaning of the minimum
volume value. The kernel must advertise `DB_MINMAX_MUTE` via TLV.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not hidden. This is an explicit hardware quirk. Same class as
the C-Media min-mute fix (`0f174b3525a43`, 2017, originally `Cc:
stable`) and later MIN_MUTE device-ID additions already in this tree.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/usb/quirks.c` only (`+2` lines)
- Function/table: `quirk_flags_table[]`
- Scope: single-file, two-line table entry
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- Before: `041e:324d` has no quirk-flag match. Probe still binds the
generic USB-audio driver.
- After: `snd_usb_init_quirk_flags()` sets
`QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE` (mainline name) /
`QUIRK_FLAG_MIXER_MIN_MUTE` (this tree).
- Path: mixer Feature Unit setup, playback volume TLV. Not an error
path.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record:
- Category: **hardware workaround** (quirk table entry)
- Mechanism: `snd_usb_mixer_fu_apply_quirk()` sees the flag and, for
controls whose name contains `"Playback"`, sets `cval->min_mute = 1`.
`snd_usb_mixer_vol_tlv()` then reports `SNDRV_CTL_TLVT_DB_MINMAX_MUTE`
instead of a plain dB min/max.
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- Obviously correct: one VID:PID added next to other Creative `0x041e`
entries, using an existing flag.
- Minimal: no API, no data-structure, no locking changes.
- Regression risk: very low; the flag is scoped to this ID and only
changes TLV metadata for playback volume. Other devices are untouched.
- Backport note: this tree uses `QUIRK_FLAG_MIXER_MIN_MUTE`, not
`QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE`. Same effect: the local handler
already limits the flag to Playback controls.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record: Insertion is between existing Creative entries:
- `DEVICE_FLG(0x041e, 0x3000, /* Creative SB Extigy */)` —
`3c69dc9134130d` (Takashi Iwai, 2021)
- `DEVICE_FLG(0x041e, 0x4080, /* Creative Live Cam VF0610 */)` —
`4d4dee0aefec36` (Takashi Iwai, 2021)
The table and adjacent IDs have been stable for years. The Play! 3 ID is
simply missing.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Not applicable. The “bug” is device firmware
behavior, not a kernel regression.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: Related commits already in this tree:
- `c2564438d30a8` — “move mixer_quirks' min_mute into common quirk”
(upstream `2c3ca8cc55a3`)
- `2368ce440dfbc` — “Add mute TLV for playback volumes on more devices”
(same pattern: extra `QUIRK_FLAG_MIXER_MIN_MUTE` IDs)
- `0f174b3525a43` — original C-Media min-mute (2017, `Cc: stable`)
Standalone device-ID addition, not part of a series.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: No other `Chad Talbott` / `chad.talbott` commits under
`sound/usb/` in this tree. One-off hardware report, applied by the ALSA
maintainer.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: Prerequisite is the MIN_MUTE flag. Confirmed present: `git
merge-base --is-ancestor c2564438d30a8 HEAD` succeeds.
`QUIRK_FLAG_MIXER_MIN_MUTE` is defined in `sound/usb/usbaudio.h` as `(1U
<< 24)`. Can apply standalone after renaming the flag.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 mbox` on msgid `20260819003237.452807-1-chad.talbott@gmail.com`
saved `/tmp/sbplay3` (2 messages).
- Original submission: 18 Aug 2026, To: Takashi Iwai, Jaroslav Kysela;
Cc: linux-sound, linux-kernel. Single patch, not a series.
- Reply from Takashi Iwai (`87cxvenu39.wl-tiwai@suse.de`, 19 Aug 2026):
**“Applied now. Thanks.”** No NAK, no requested revisions, no stable
discussion.
- `b4 dig -c` was not usable: the commit is not in this checkout.
- Direct lore WebFetch returned HTTP 403; the mbox from `b4` is the
source of truth.
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record: Recipients were the ALSA maintainers and linux-sound. Maintainer
applied v1 as-is.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No bugzilla/syzbot link. Evidence is the author’s “Tested on
hardware” and the concrete VID:PID plus measured dB range.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone `[PATCH]`, not `X/Y`. Thread has only the patch and
the apply ack.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org/stable WebFetch returned 403. No stable-list
discussion found via `git log --grep` on `sound/usb/`. No evidence this
was rejected for stable.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS**
Record: No function body changed. Data consumed by
`snd_usb_init_quirk_flags()` and `snd_usb_mixer_fu_apply_quirk()`.
**Step 5.2: TRACE CALLERS**
Record:
- `snd_usb_init_quirk_flags()` called from `sound/usb/card.c:666` during
USB-audio probe.
- `snd_usb_mixer_fu_apply_quirk()` called from `sound/usb/mixer.c:1818`
while building Feature Unit controls.
- `snd_usb_mixer_vol_tlv()` is the TLV callback userspace reads.
**Step 5.3: TRACE CALLEES**
Record: The new row only sets `chip->quirk_flags`. Later, `min_mute`
changes TLV type to `SNDRV_CTL_TLVT_DB_MINMAX_MUTE`
(`include/uapi/sound/tlv.h`).
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Plug in Play! 3 → USB-audio probe → mixer create → userspace
reads volume TLV. Reachable from normal device use, not a rare config.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same `QUIRK_FLAG_MIXER_MIN_MUTE` already used for Conexant,
C-Media, Realtek, OnePlus, HECATE, HONOR, etc. in this tree’s
`quirk_flags_table`. This is another instance of a known, already-
backported pattern.
Semcode MCP tools: not available; used grep/read.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: Yes. USB-audio mixer + MIN_MUTE flag exist. `041e:324d` is
**not** in `sound/usb/quirks.c` (or elsewhere under `sound/usb/`). The
device will enumerate as generic USB audio with the wrong mute TLV. Bug
introduced by hardware, not by a post-6.12 kernel change.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: Expected difficulty: **minor** (one-token rename).
- Insertion context `0x041e, 0x3000` then `0x041e, 0x4080` is present at
`quirks.c:2154-2157`.
- `QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE` is **not** defined here.
- Use `QUIRK_FLAG_MIXER_MIN_MUTE` instead; local
`snd_usb_mixer_fu_apply_quirk()` already gates on `"Playback"`.
- Nearby mainline-only entries (`0x040b:0x0897`, `0x045e:0x070f`) are
not required.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: MIN_MUTE infrastructure and other device IDs are here. No Play!
3 entry. No alternate fix for `041e:324d`.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: `sound/usb/` ALSA USB-audio. **IMPORTANT** for USB
DACs/headsets; not core mm/fs. Play! 3 is a real consumer USB DAC.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Actively maintained; this 6.12 tree already carries later USB-
audio quirk backports (JBL FIXED_RATE, AB13X reset, DSD IDs, extra
MIN_MUTE IDs). Quirk-table additions are routine here.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: Driver-specific: owners of Creative Sound Blaster Play! 3
(`041e:324d`). Zero effect on other hardware.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Every time the device is used with a dB-aware mixer
(PulseAudio/PipeWire). Not a race. Unprivileged users hit it via the
volume slider. Very likely for this hardware.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: Incorrect volume/mute mapping: silence at “low” volume, min
position not treated as mute. Not a panic or corruption. **MEDIUM**
functionally, but it is the standard USB-audio min-mute hardware bug.
Original 2017 fix was stable-bound; later MIN_MUTE ID lists are already
in 6.12.y.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- Benefit: high for Play! 3 users (usable volume curve).
- Risk: very low (2 lines, ID-matched, TLV only).
- Ratio: strongly favors backport with the flag-name tweak.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Classic USB-audio hardware quirk (stable exception category).
- Real, tested-on-hardware volume/mute lie from the device.
- Two-line table add; no new APIs.
- MIN_MUTE flag and handler already in this 6.12.111 tree.
- Same pattern already backported (`c2564438d30a8`, `2368ce440dfbc`).
- ALSA maintainer applied v1 with no concerns.
- Insertion point exists next to other Creative IDs.
AGAINST:
- Original patch uses `QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE` (needs rename
to `QUIRK_FLAG_MIXER_MIN_MUTE`).
- Not a crash/UAF/security issue.
- Affects one consumer DAC.
UNRESOLVED:
- Could not query lore.kernel.org/stable (HTTP 403). No indication of a
prior reject.
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — hardware-tested; maintainer
applied.
2. Fixes a real bug that affects users? **PASS** — wrong mute/volume
mapping on a real DAC.
3. Important issue? **PASS** under the hardware-quirk exception (not a
crash).
4. Small and contained? **PASS** — +2 lines, one file.
5. No new features or APIs? **PASS** — existing quirk flag, new device
ID only.
6. Can apply to the local tree? **PASS** with trivial backport
(`MIXER_PLAYBACK_MIN_MUTE` → `MIXER_MIN_MUTE`).
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Hardware quirk/workaround** (USB-audio mixer min-mute),
equivalent in spirit to USB/PCI quirk table additions.
**Step 9.4: MAKE YOUR DECISION**
Backport. The local tree already has the quirk flag; this only adds the
Play! 3 ID. Rename the flag during apply.
------------------------------------------------
What problem it solves, and why it matters here
------------------------------------------------
Play! 3 reports -44 dB at raw 0, but raw 0 is mute. Without the TLV mute
bit, PulseAudio/PipeWire keep the device “silent until ~30% volume.”
That is the same class of bug already documented in this tree’s MIN_MUTE
commit (PipeWire MR / Arch wiki). 6.12 users with this DAC still hit it.
Risk vs benefit: two-line, ID-scoped TLV change vs broken volume on a
supported USB-audio device. Benefit wins.
Concerns: mechanical apply of the mainline diff will not compile until
the flag is renamed. That is a one-token stable backport, not a missing-
prerequisite situation.
Verification:
- [Phase 1] Parsed tags: author SOB, Link msgid, Takashi Iwai SOB; no
Fixes/Reported-by/Cc:stable
- [Phase 1] Body: 041e:324d, -44 dB vs hard mute at raw 0, tested on
hardware
- [Phase 2] Diff: +2 lines in `sound/usb/quirks.c` `quirk_flags_table[]`
- [Phase 2] Handler in this tree: `mixer_quirks.c:4504-4506` sets
`cval->min_mute` for Playback when `QUIRK_FLAG_MIXER_MIN_MUTE` is set
- [Phase 2] TLV: `mixer.c:555-556` uses `SNDRV_CTL_TLVT_DB_MINMAX_MUTE`
- [Phase 3] Blame: Creative neighbors from 2021 (`3c69dc9134130d`,
`4d4dee0aefec36`)
- [Phase 3] `git merge-base --is-ancestor c2564438d30a8 HEAD`: MIN_MUTE
infra **is** in this tree
- [Phase 3] `2368ce440dfbc` already added more MIN_MUTE IDs to this tree
- [Phase 3] No `Fixes:` tag (N/A)
- [Phase 3] `git log --author='Chad Talbott' -- sound/usb/`: no other
commits
- [Phase 4] `b4 mbox` msgid
`20260819003237.452807-1-chad.talbott@gmail.com`: 2-message thread;
Iwai “Applied now”
- [Phase 4] lore WebFetch 403; stable-list search 403
- [Phase 5] Callers: `snd_usb_init_quirk_flags` from `card.c:666`;
`snd_usb_mixer_fu_apply_quirk` from `mixer.c:1818`
- [Phase 5] semcode unavailable
- [Phase 6] `git describe HEAD` → `p-6.12-3-gc504cf0baa3d8`; `make
kernelversion` → 6.12.111
- [Phase 6] `0x324d` absent; `QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE`
absent; `QUIRK_FLAG_MIXER_MIN_MUTE` present; sandwich context present
- [Phase 8] Failure mode: wrong volume/mute TLV on one USB DAC; not a
kernel oops
- UNVERIFIED: full lore.kernel.org HTML thread (403); whether a later
mainline commit renamed MIN_MUTE → PLAYBACK_MIN_MUTE (flag absent
here; local Playback filter makes the names equivalent)
**YES**
sound/usb/quirks.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index b08e07324f830..8dcba375bd4a3 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -2152,6 +2152,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_MIC_RES_16),
DEVICE_FLG(0x041e, 0x3000, /* Creative SB Extigy */
QUIRK_FLAG_IGNORE_CTL_ERROR),
+ DEVICE_FLG(0x041e, 0x324d, /* Creative Sound Blaster Play! 3 */
+ QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE),
DEVICE_FLG(0x041e, 0x4080, /* Creative Live Cam VF0610 */
QUIRK_FLAG_GET_SAMPLE_RATE),
DEVICE_FLG(0x045e, 0x083c, /* MS USB Link headset */
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Fix speakers on ASUS ROG Zephyrus G14 GA403UM
[not found] <20261019135441.1420968-1-sashal@kernel.org>
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18] ALSA: usb-audio: Add MIN_MUTE quirk for Creative Sound Blaster Play! 3 Sasha Levin
@ 2026-10-19 13:45 ` Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add quirk for Lenovo IdeaPad Slim 3 15ABR8 Sasha Levin
` (59 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:45 UTC (permalink / raw)
To: patches, stable
Cc: Garrett Blackmon, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Garrett Blackmon <garrett@blackmon.dev>
[ Upstream commit 140fe610af607fd70da95c447943fc2690855519 ]
The GA403UM (SSID 1043:1044) uses the same ALC285 codec + dual CS35L56
I2C amplifier topology as the GA403U and GA403W variants, which already
have quirk entries (1043:1b13, 1043:1024). Without the quirk, the
woofers sit on a separate DAC from the tweeters, so the hardware volume
control only scales part of the speaker system and the headset
microphone pins are not configured.
Apply the existing ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC fixup to the
GA403UM as well.
Signed-off-by: Garrett Blackmon <garrett@blackmon.dev>
Link: https://patch.msgid.link/20260807150708.33785-1-garrett@blackmon.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a one-line PCI SSID quirk for an existing Realtek fixup. The
local tree is **6.12.111** (`pending-6.12`, `p-6.12-3-g710455e2077bb`).
The GA403U fixup chain is already here; SSID `1043:1044` is not.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: `[ALSA: hda/realtek] [Fix] speakers on ASUS ROG Zephyrus G14
GA403UM`
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Signed-off-by: Garrett Blackmon <garrett@blackmon.dev>` (author)
- `Link:
https://patch.msgid.link/20260807150708.33785-1-garrett@blackmon.dev`
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` (ALSA maintainer)
- No `Fixes:` tag (expected)
- No `Cc: stable` (expected; not a negative)
- No `Reported-by:` / `Tested-by:` / `Reviewed-by:` / `Acked-by:`
- Ignore pipeline `Signed-off-by: Sasha Levin` if present; it is not on
the mainline commit `140fe610af607`
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** GA403UM (SSID `1043:1044`) has ALC285 + dual CS35L56 I2C
amps, same topology as GA403U (`1043:1b13`) and GA403W (`1043:1024`).
- **Symptom:** Without the quirk, woofers are on a different DAC from
tweeters, so hardware volume only scales part of the speaker system;
headset-mic pins are not configured.
- **Root cause:** Missing `SND_PCI_QUIRK` entry; the machine never gets
`ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC`.
- **Version info:** None in the message. Commit date is 2026-08-07
(after v6.12, 2024-11-17).
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not hidden. It is an explicit hardware-quirk fix for broken
speakers/headset mic.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- Mainline file: `sound/hda/codecs/realtek/alc269.c` (`+1` / `-0`)
- Function/table: `alc269_fixup_tbl[]`
- Scope: single-file, one-line PCI quirk addition
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- **Before:** SSID `1043:1044` does not match; generic auto-parse leaves
bass speaker NID `0x17` on a separate DAC and does not set headset-mic
pins `0x19`/`0x1b`.
- **After:** That SSID selects `ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC`,
which:
1. Sets pins `{0x19, 0x03a11050}` and `{0x1b, 0x03a11c30}`
2. Chains to `ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1`
(`alc285_fixup_speaker2_to_dac1` forces NID `0x17` onto
DAC1/`0x02`)
3. Chains to `ALC285_FIXUP_ASUS_GA403U` (inv-dmic only if codec is not
ALC285, for SSID reuse)
- Path: HDA probe / `patch_alc269()`, not an error path.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: **Hardware workaround (PCI SSID quirk).** Missing table entry
for a shipped laptop SKU. Not UAF/race/leak.
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- Obviously correct: reuse of an existing, already-shipped fixup.
- Minimal: one `SND_PCI_QUIRK` line.
- Regression risk: very low; the entry matches only `vendor 0x1043, SSID
0x1044`. `0x1044` is unused in this tree’s Realtek quirk table.
- SSID-reuse note: `alc285_fixup_asus_ga403u` already guards non-ALC285
hardware that reused `0x1b13`. This new ID is a distinct SSID, not
that reuse case.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- Insertion sits between existing ASUS entries `0x103f` (TX300, 2013)
and `0x1054` (G614, 2025 backport).
- Buggy “code” is absence of `1043:1044`, not a later regression in
shared logic.
- The fixup being applied was introduced by `0672b017324b1` (“Fixes for
Asus GU605M and GA403U sound”, 2024-04-18) and is in this tree.
- Earlier `c33f0d4fcfe07` (2024-03-30) added CS35L56 laptop quirks and
the GA403U SSID-reuse comment; also in this tree.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. The functional prerequisite is `0672b017324b1`,
present here (`git merge-base --is-ancestor` → yes).
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record:
- Related in this tree: `c33f0d4fcfe07`, `0672b017324b1`.
- Sibling mainline quirk `cbd46cbc5470f` (GA403W `1043:1024`, 2026-01)
is **not** in this tree. It is a parallel SKU entry, not a
prerequisite for `1043:1044`.
- Candidate `140fe610af607` is **not** an ancestor of HEAD.
- This 6.12 tree already backports many similar one-line Realtek quirks
(recent log is almost entirely `Add quirk for …`).
- Standalone: one table line; no series (`patch X/Y`).
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Garrett Blackmon has this single Realtek commit on
`origin/master`. Takashi Iwai applied it the same day. Author is a
hardware user, not the subsystem maintainer; maintainer acked by
applying.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record:
- Needs `ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC` and
`alc285_fixup_speaker2_to_dac1` — both exist in
`sound/pci/hda/patch_realtek.c`.
- Needs CS35L56 HDA I2C sidecar — `sound/pci/hda/cs35l56_hda_i2c.c` is
present.
- Does **not** need the GA403W `0x1024` entry.
- Cannot apply the mainline diff as-is: mainline file is
`sound/hda/codecs/realtek/alc269.c` (split ~2025-07). This tree still
has `sound/pci/hda/patch_realtek.c`. Backport is the same one line at
the same SSID sort position (after `0x103f`, before `0x1054`).
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c 140fe610af607` →
https://patch.msgid.link/20260807150708.33785-1-garrett@blackmon.dev
- `b4 dig -a`: **v1 only** (2026-08-07), no later revisions.
- Thread: author submission + Takashi Iwai “Applied to for-next branch
now. Thanks.”
- No NAK, no stable nomination in-thread, no risk discussion.
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): To/Cc `tiwai@suse.com`, `perex@perex.cz`, `linux-
sound@vger.kernel.org`. ALSA maintainers were on the patch; Iwai applied
it.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No bugzilla/syzbot link. The commit itself is the user report
(author is fixing their GA403UM). Severity from the text: partial
speaker volume + unconfigured headset mic.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone v1. Related sibling is GA403W `cbd46cbc5470f` (not
required). No follow-up on `origin/master` that changes `1043:1044`.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org/stable search returned HTTP 403. **UNVERIFIED**
whether it was discussed on stable@. Not used for the verdict.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF**
Record: No function body change. Adds one entry to `alc269_fixup_tbl[]`.
Consumed fixups: `ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC` →
`alc285_fixup_speaker2_to_dac1` → `alc285_fixup_asus_ga403u`.
**Step 5.2: TRACE CALLERS**
Record:
- `patch_alc269()` calls `snd_hda_pick_fixup(..., alc269_fixup_tbl,
alc269_fixups)` at probe (`sound/pci/hda/patch_realtek.c`).
- `patch_alc269` covers the ALC269 family, including ALC285
(`0x10ec0285`).
- Trigger: HD-audio codec probe on this laptop, not interrupt/hot path.
**Step 5.3: TRACE CALLEES**
Record: `snd_hda_pick_fixup` matches PCI SSID, then pin overrides +
`snd_hda_override_conn_list(codec, 0x17, …)` so bass/woofer shares DAC1
with the main speakers.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: PCI/HDA enumeration → Realtek codec probe → `patch_alc269` →
quirk table. Reachable on every boot of a GA403UM. Not a syscall attack
path; it is the normal audio device path.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same fixup already used for `0x1043, 0x1b13` (“ASUS
U41SV/GA403U”). This commit extends that pattern to another SKU. This
tree regularly takes the same class of one-line quirk.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: Yes, as a missing SSID.
- Tree: 6.12.111 / `pending-6.12`.
- File: `sound/pci/hda/patch_realtek.c`.
- Fixup IDs and implementations are present (lines ~7529, ~6831,
~10586–10618).
- `0x1b13` is present (line 11257). `0x1044` is **not**.
- Candidate `140fe610af607` is not an ancestor of HEAD.
- Hardware is a 2026 G14 SKU; 6.12 is LTS, so users can run this kernel
on that laptop.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: Raw mainline patch does not apply (file was split to
`sound/hda/codecs/realtek/alc269.c` after 6.12). Functional backport is
trivial: insert the same `SND_PCI_QUIRK` between `0x103f` and `0x1054`
in `patch_realtek.c` (lines 11185–11186). No data-structure or API gap.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: GA403U fixup yes; this SSID no. No alternate GA403UM fix. `git
grep 0x1044` in `patch_realtek.c` is empty.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: `sound/pci/hda` Realtek HD-audio. **IMPORTANT** (laptop audio),
not core mm/fs. Maintainers: Takashi Iwai, Jaroslav Kysela
(`MAINTAINERS` SOUND). Config: `SND_HDA_CODEC_REALTEK`.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Very active quirk table; recent 6.12 backports are mostly
device-specific `SND_PCI_QUIRK` additions. Mature pattern, low novelty.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: Driver/platform-specific: ASUS ROG Zephyrus G14 GA403UM, SSID
`1043:1044`, ALC285 + CS35L56. No effect on other machines.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Every boot / any speaker volume or headset-mic use on that
model. Unprivileged user using audio. Not a race.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record:
- Failure: woofers do not follow master volume (split DAC); headset mic
pins unconfigured.
- **Severity: MEDIUM–HIGH** for that hardware (laptop audio effectively
broken), not a kernel oops. This is the class of “device doesn’t work
correctly without a quirk.”
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- **Benefit:** High for GA403UM owners on 6.12.y (working speakers +
headset pins).
- **Risk:** Very low (one SSID line, existing fixup, SSID unused).
- **Ratio:** Strongly favors backport. Matches the documented hardware-
quirk exception.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real user-visible bug: incomplete speaker volume and unconfigured
headset mic.
- One-line `SND_PCI_QUIRK` using a fixup already in 6.12.
- Prerequisite `0672b017324b1` is in this tree; CS35L56 HDA I2C is in
this tree.
- ALSA maintainer applied v1 the same day; no NAK.
- Classic stable exception: PCI ID / hardware quirk for an existing
driver.
- This tree already carries the same fixup for GA403U (`0x1b13`).
- Insertion point exists; `0x1044` is free.
AGAINST:
- Mainline patch path differs (`alc269.c` vs `patch_realtek.c`); needs a
one-line backport, not a raw apply.
- No `Reported-by` besides the author; no syzbot/CVE.
- Not a crash/security bug.
- Sibling `0x1024` (GA403W) is absent — irrelevant; that SKU is
independent.
UNRESOLVED:
- Stable@ lore search (HTTP 403).
- WebFetch of lore also 403; thread recovered via `b4 dig -m`.
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — reuse of in-tree fixup;
maintainer applied.
2. Fixes a real bug that affects users? **PASS** — broken volume/headset
on GA403UM.
3. Important issue? **PASS** — hardware-quirk exception; audio broken on
that laptop, not a panic.
4. Small and contained? **PASS** — 1 line.
5. No new features or APIs? **PASS** — existing quirk ID only.
6. Can apply to the local tree? **PASS** with trivial path adjustment
(`patch_realtek.c`, same context).
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Hardware quirk / PCI SSID addition to an existing driver.**
Automatic YES class.
**Step 9.4: MAKE YOUR DECISION**
The missing SSID is present as a gap in this 6.12 tree, the target fixup
chain is complete, and the change cannot affect any other device.
Backport it.
------------------------------------------------
What the commit solves for this tree
------------------------------------------------
On GA403UM, Linux never applies the GA403U speaker/mic fixup. Master
volume then moves only tweeters (woofers stay on another DAC), and
headset-mic pins stay wrong. Adding `SND_PCI_QUIRK(0x1043, 0x1044, "ASUS
GA403UM", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC)` to `alc269_fixup_tbl`
in `sound/pci/hda/patch_realtek.c` is the whole fix.
Risk vs benefit: benefit is working audio on that LTS laptop; risk is a
single unused-SSID match. File-split means the mainline diff needs a
one-line rewrite, which is normal for Realtek quirks on 6.12.
Verification:
- [Phase 1] Parsed tags on `140fe610af607`: SOB Blackmon, Link msgid,
SOB Iwai; no Fixes/stable/Reported-by
- [Phase 2] Diff: +1 line `SND_PCI_QUIRK(0x1043, 0x1044, …
ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC)`
- [Phase 3] `git describe HEAD` / `make kernelversion`:
`p-6.12-3-g710455e2077bb`, 6.12.111, branch `pending-6.12`
- [Phase 3] `git merge-base --is-ancestor 140fe610af607 HEAD` → not in
tree
- [Phase 3] `git merge-base --is-ancestor 0672b017324b1 HEAD` → yes
(GA403U fixup)
- [Phase 3] `git merge-base --is-ancestor cbd46cbc5470f HEAD` → no
(GA403W 0x1024; not required)
- [Phase 3] Confirmed fixup chain and `0x1b13` in
`sound/pci/hda/patch_realtek.c`; `0x1044` absent
- [Phase 4] `b4 dig -c 140fe610af607` / `-a` / `-w` / `-m`: v1 only;
Iwai applied; To linux-sound + maintainers
- [Phase 4] UNVERIFIED: lore.kernel.org WebFetch and stable@ search
(HTTP 403)
- [Phase 5] `patch_alc269()` → `snd_hda_pick_fixup(...,
alc269_fixup_tbl, …)` at codec probe
- [Phase 5] `alc285_fixup_speaker2_to_dac1` overrides NID 0x17 to DAC
0x02
- [Phase 6] Insertion context `0x103f` then `0x1054` present at lines
11185–11186
- [Phase 6] `cs35l56_hda_i2c.c` present
- [Phase 8] Failure mode: partial speaker volume + unconfigured headset
mic on one laptop SSID
- UNVERIFIED: whether this SSID was already requested on stable@
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 8fdfe1bbe7aff..05e7fcc2f67e6 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -7094,6 +7094,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x1034, "ASUS GU605C", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
+ SND_PCI_QUIRK(0x1043, 0x1044, "ASUS GA403UM", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC),
SND_PCI_QUIRK(0x1043, 0x1054, "ASUS G614FH/FM/FP", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
SND_PCI_QUIRK(0x1043, 0x106f, "ASUS VivoBook X515UA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add quirk for Lenovo IdeaPad Slim 3 15ABR8
[not found] <20261019135441.1420968-1-sashal@kernel.org>
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18] ALSA: usb-audio: Add MIN_MUTE quirk for Creative Sound Blaster Play! 3 Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Fix speakers on ASUS ROG Zephyrus G14 GA403UM Sasha Levin
@ 2026-10-19 13:45 ` Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/conexant: Add mute LED quirk for HP ProBook 440 G5 Sasha Levin
` (58 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:45 UTC (permalink / raw)
To: patches, stable
Cc: Zhang Heng, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Zhang Heng <zhangheng@kylinos.cn>
[ Upstream commit be79a45e2ec289eb9fad519e8f5a3d4fc3789dd0 ]
The internal microphone on Lenovo IdeaPad Slim 3 15ABR8 (subsystem
17aa:3862) exhibits severe distortion at default gain levels. The
Capture Volume is fixed at 63 (max) and cannot be lowered without
explicit userspace intervention. The existing fixup
ALC269_FIXUP_LIMIT_INT_MIC_BOOST limits the gain range and resolves
the issue.
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221891
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Link: https://patch.msgid.link/20260824123752.525173-1-zhangheng@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a one-line Realtek HDA hardware quirk for a specific Lenovo
laptop. The local tree is **6.12.111** (`pending-6.12`). The Realtek
quirk table and `ALC269_FIXUP_LIMIT_INT_MIC_BOOST` already exist here;
SSID `17aa:3862` does not.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
- Record: **[ALSA/hda/realtek] [Add] [quirk for Lenovo IdeaPad Slim 3
15ABR8]**
- Subsystem prefix: `ALSA: hda/realtek`
- Action verb: **Add** (hardware quirk table entry, not a new feature)
- Claimed intent: map PCI subsystem `17aa:3862` to an existing internal-
mic boost limit fixup
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
- Record:
- `Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221891` — user-
filed kernel.org bug
- `Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>` — author
- `Link: https://patch.msgid.link/20260824123752.525173-1-
zhangheng@kylinos.cn` — original submission msgid
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` — ALSA HDA maintainer
applied it
- No `Fixes:`, no `Cc: stable`, no `Reported-by`, no `Tested-by`, no
`Reviewed-by` (absence of `Fixes:`/`Cc: stable` is expected for this
review)
- Notable: maintainer SOB plus a `Closes:` bugzilla link
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
- Record:
- **Bug:** Internal mic on IdeaPad Slim 3 15ABR8 (`17aa:3862`) has
severe distortion at default gain
- **Symptom:** Capture Volume stuck at 63 (max); cannot be lowered
without explicit userspace intervention; captured audio is badly
distorted
- **Root cause (author):** default amp/boost range is too high for
this hardware
- **Fix:** reuse existing `ALC269_FIXUP_LIMIT_INT_MIC_BOOST`
- **Version info:** none in the message; laptop is a 2023 AMD IdeaPad,
so 6.12 users are in the affected population
**Step 1.4: DETECT HIDDEN BUG FIXES**
- Record: Not a hidden fix. It is an explicit hardware quirk. The “Add”
verb is the standard form for `SND_PCI_QUIRK` table entries that make
existing hardware usable.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
- Record:
- File in the commit: `sound/hda/codecs/realtek/alc269.c` (**+1 /
−0**)
- Function/table: `alc269_fixup_tbl[]`
- Scope: **single-file surgical** — one `SND_PCI_QUIRK` line
- Local tree equivalent file: `sound/pci/hda/patch_realtek.c` (HDA
codecs were not yet split out of `sound/pci/hda/` in 6.12)
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
- Record: **Before** — SSID `17aa:3862` matches no quirk; probe uses
generic auto-config; internal mic boost stays at the default wide
range, Capture Volume sits at max, audio is distorted.
**After** — `snd_hda_pick_fixup()` matches
`ALC269_FIXUP_LIMIT_INT_MIC_BOOST`. At `HDA_FIXUP_ACT_PROBE`,
`alc269_fixup_limit_int_mic_boost()` walks auto-config inputs, and for
internal mic pins overrides amp caps to 0 offset, 1 step, step size
`0x2f` (boost limited to 0 or 1). Only the probe path for this SSID is
affected.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
- Record: **[Hardware workaround / audio codec quirk]**
- Mechanism: Realtek codec exposes boost steps 2 and 3 that are too
noisy on this chassis. The existing helper comments: “The mic boosts
on level 2 and 3 are too noisy on the internal mic input. Therefore
limit the boost to 0 or 1.”
- The new line only *selects* that already-present helper for one PCI
subsystem ID.
**Step 2.4: ASSESS THE FIX QUALITY**
- Record: Obviously correct and minimal. Same pattern already used for
ThinkPad T480, Positivo ARN50/N14AP7, several Asus/VAIO machines, etc.
- Regression risk: **very low**. Match is vendor+device SSID
`17aa:3862` only. `ALC269_FIXUP_LIMIT_INT_MIC_BOOST` also chains to
`ALC269_FIXUP_THINKPAD_ACPI`, but `hda_fixup_thinkpad_acpi()`
returns immediately unless ACPI IDs `LEN0068`/`LEN0268`/`IBM0068`
exist, so LED binding does not run on an IdeaPad.
`alc_fixup_no_shutup()` still runs (reduces click noise); that same
chain is already used by other non-ThinkPad LIMIT_INT_MIC_BOOST
quirks in this tree.
- No public API, no new fixup enum, no new module parameter.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
- Record: There is no “buggy line” in the table; the bug is a
**missing** entry. Neighboring rows in this tree:
- `0x3855` Legion 7 16ITHG6 — `1e24881d8b2a7c` (2022)
- `0x3865` Lenovo 13X — `25f46354dca912` (2024)
- Insertion sits in a long-stable Lenovo SSID block. The helper
`alc269_fixup_limit_int_mic_boost()` was introduced in
`3e0d611b2045b` (2013-04-22, “Limit internal mic boost for a few
Asus machines”) and has been in-tree for years.
**Step 3.2: FOLLOW THE FIXES: TAG**
- Record: No `Fixes:` tag. Not applicable. The “bug” is hardware that
never had a quirk, not a regression from a prior commit.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
- Record: Recent `patch_realtek.c` history is almost entirely other
`SND_PCI_QUIRK` additions (HP mute LED, Legion, Yoga, etc.). Same-
fixup examples already in this 6.12 tree:
- `85981dfd6b0a0` Limit mic boost on T480 (`Cc: stable`)
- `86a433862912f` Limit mic boost on N14AP7 (`Cc: stable`)
- `d44418f5024f6` Limit mic boost on Positivo ARN50 (already
backported here as `[ Upstream commit 76b0a22d4cf7... ]`)
- Standalone. Not patch X/Y.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
- Record: Zhang Heng has other sound quirks in this tree (ASUS UM6702RC,
Inspur S14-G1, Samsung 750XBE, AMD YC DMI quirks). Regular hardware-
quirk contributor, not the subsystem maintainer. Maintainer Takashi
Iwai applied it.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
- Record: None. Depends only on `SND_PCI_QUIRK`,
`ALC269_FIXUP_LIMIT_INT_MIC_BOOST`, and `alc269_fixup_tbl[]`, all
present in 6.12. Can apply standalone with a path remap (`alc269.c` →
`patch_realtek.c`).
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
- Record: `b4 dig -c` could not be used: this SHA is not in the local
tree. Recovered via msgid
`20260824123752.525173-1-zhangheng@kylinos.cn`.
- Submission: https://lists.openwall.net/linux-kernel/2026/08/24/1126
(also lkml.iu.edu/2608.3/00949.html)
- Single-patch v1 only; diff is the same one-line quirk as committed
- To: `tiwai@suse.de`; Cc: `linux-sound`, `linux-kernel`
- Maintainer reply (Takashi Iwai, 2026-08-25): **“Applied now.
Thanks.”** (lkml.iu.edu/2608.3/02564.html)
- No NAK, no requested respin, no stable discussion in the thread
- Lore.kernel.org itself returned Anubis/403 to automated fetch
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
- Record: Sent directly to Takashi Iwai (ALSA HDA maintainer) and linux-
sound. Maintainer applied v1 as-is. No other reviewer comments found.
**Step 4.3: SEARCH FOR THE BUG REPORT**
- Record: Bugzilla 221891 was 403/Anubis; full comments **UNVERIFIED**.
The `Closes:` tag plus the commit body (SSID, Capture Volume 63,
distortion) are the verified description.
- Related real-world report: Ask Ubuntu “Audio issues on Lenovo
Ideapad Slim 3 **16ABR8** — microphone distortion” (sibling ABR8
chassis, same symptom class). That report is 16ABR8, not
15ABR8/`17aa:3862`, so it does **not** prove this SSID, only that
the product family has this class of mic problem.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
- Record: Standalone 1/1. No series. No extra Realtek patches required.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
- Record: lore.kernel.org/stable search blocked (Anubis). No evidence in
this tree that this SSID was already requested or rejected. Identical
LIMIT_INT_MIC_BOOST quirks have been accepted into this 6.12 tree
before.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF**
- Record: No function body changed. New table entry in
`alc269_fixup_tbl[]`. Runtime functions involved:
`snd_hda_pick_fixup()` → `alc269_fixup_limit_int_mic_boost()` (and
chained `alc_fixup_thinkpad_acpi()`).
**Step 5.2: TRACE CALLERS**
- Record: `alc269_fixup_tbl` is passed from the ALC269-family probe
path:
```12583:12584:sound/pci/hda/patch_realtek.c
snd_hda_pick_fixup(codec, alc269_fixup_models,
alc269_fixup_tbl, alc269_fixups);
```
That runs during codec probe (device enumeration / module load), not a
syscall hot path. Reachable on every boot for machines with a Realtek
ALC269-family HDA codec.
**Step 5.3: TRACE CALLEES**
- Record: `alc269_fixup_limit_int_mic_boost()` uses
`snd_hda_codec_get_pincfg()`, `snd_hda_get_input_pin_attr()`,
`snd_hda_override_amp_caps()`. Probe-time mixer cap override only; no
allocation, no new locks.
**Step 5.4: FOLLOW THE CALL CHAIN**
- Record: Userspace does not need a special trigger. Opening the capture
device at default volume is enough. Unprivileged users of this laptop
hit it (PulseAudio/PipeWire default capture). High user visibility,
hardware-specific.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
- Record: Many `SND_PCI_QUIRK(..., ALC269_FIXUP_LIMIT_INT_MIC_BOOST)`
entries already in this file (ThinkPads
`0x2215`/`0x225d`/`0x5013`/`0x5026`/`0x5109`, Asus
`0x106d`/`0x115d`/`0x1c23`, Positivo, VAIO). This is a systematic,
well-worn workaround, not a one-off invention.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
- Record: **Yes, as a missing quirk.** Local tree:
`p-6.12-3-gc504cf0baa3d8`, `VERSION=6 PATCHLEVEL=12 SUBLEVEL=111`.
- `sound/hda/codecs/realtek/` does **not** exist (split is post-6.12).
- `sound/pci/hda/patch_realtek.c` **does** exist; `alc269_fixup_tbl[]`
at line 10675; LIMIT_INT_MIC_BOOST at 8711–8716 and function at
6661–6691.
- `git grep 0x3862 -- sound/pci/hda/` : **no match**. Between 0x3855
and 0x3865 there is a hole exactly where the new line goes (lines
11565–11566).
- Bug “introduced”: never fixed here; hardware existed well before
v6.12 (released 2024-11-17).
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
- Record: **Minor path remap, otherwise clean.** Neighboring context in
this tree is identical to the mainline hunk (`0x3855` Legion then
`0x3865` Lenovo 13X). Need to apply to `sound/pci/hda/patch_realtek.c`
instead of `sound/hda/codecs/realtek/alc269.c`. No conflicting SSID,
no missing helper.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
- Record: No `IdeaPad Slim 3 15ABR8` and no `17aa:3862` in
`sound/pci/hda/`. Sibling IdeaPad Slim 9i 14ITL5 is a different
SSID/fixup. No earlier version of this fix.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
- Record: **[sound/pci/hda Realtek codec] [IMPORTANT]** — not core
mm/vfs, but the default laptop audio stack.
`CONFIG_SND_HDA_CODEC_REALTEK` is a standard distro config.
Criticality is hardware-specific, not peripheral/staging.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
- Record: Very active: recent history is a stream of model quirks.
Mature table, mature helper (2013). Quirk additions are the normal
stable-friendly change in this file.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
- Record: **driver-specific / hardware-specific** — only PCI SSID
`17aa:3862` (Lenovo IdeaPad Slim 3 15ABR8). Everyone else unchanged.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
- Record: Trigger is default capture on this laptop (every
VoIP/recording session). Common for owners of this model. Unprivileged
users can trigger it. Not a race.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
- Record: **[Internal mic unusable / severe distortion] [MEDIUM
functionally; HIGH for that hardware]**
- Not panic, UAF, or data corruption
- Internal microphone is effectively broken at default settings;
userspace volume workarounds are the only current escape
- This is the documented audio-codec quirk class, routinely taken into
stable
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
- Record:
- **Benefit:** High for 15ABR8 owners on 6.12; mic works without mixer
hacks
- **Risk:** Very low — 1 line, SSID-gated, helper used for a decade,
same pattern already backported here
- **Ratio:** strongly in favor of backport
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real hardware bug with a kernel.org bugzilla `Closes:` (221891)
- Severe mic distortion; capture stuck at max gain
- Classic `SND_PCI_QUIRK` exception (explicitly stable-appropriate)
- 1 line, existing fixup from 2013
- Helper and table present in 6.12; SSID absent
- Maintainer (Takashi Iwai) applied v1 with no objections
- Identical LIMIT_INT_MIC_BOOST quirks already in this 6.12 tree (T480,
N14AP7, Positivo ARN50)
AGAINST:
- Not a crash/security/deadlock (strict reading of “important issue”)
- Mainline path differs (`alc269.c` vs `patch_realtek.c`) — trivial
remap
- Full bugzilla text could not be fetched (403)
- `b4 dig` could not run without a local SHA
UNRESOLVED:
- Full bugzilla 221891 comments
- Whether any other chassis silently shares SSID `17aa:3862` (no in-tree
collision)
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — one SSID line to a long-used
helper; maintainer applied; same pattern proven in this tree
2. Fixes a real bug that affects users? **PASS** — unusable/distorted
internal mic; bugzilla + concrete SSID
3. Important issue? **PASS via hardware-quirk exception** — not a kernel
oops, but a device-breaking audio defect of the class stable already
takes (`SND_PCI_QUIRK` in `patch_realtek.c`)
4. Small and contained? **PASS** — +1 line
5. No new features or APIs? **PASS** — table entry only
6. Can apply to the local tree? **PASS** — remap path to
`sound/pci/hda/patch_realtek.c`; context around 0x3855/0x3865 matches
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
- Record: **AUDIO CODEC QUIRK / hardware workaround** — `SND_PCI_QUIRK`
in the Realtek HDA table. This is an automatic YES category.
**Step 9.4: MAKE YOUR DECISION**
Backport. The bug exists on 6.12 for this laptop, the fix is the
standard one-line quirk, and the only adjustment is the post-6.12
filename change.
------------------------------------------------
What the commit solves and why it matters here
------------------------------------------------
On IdeaPad Slim 3 15ABR8 the Realtek internal mic boost range is too
high, so Capture Volume sits at 63 and recordings are badly distorted.
6.12 already has `alc269_fixup_limit_int_mic_boost()`; it just never
binds it to `17aa:3862`. Adding that binding restores usable capture for
that model without touching any other machine.
Risk vs benefit: one SSID-gated line vs a broken laptop microphone.
Benefit dominates. Backport applies to `patch_realtek.c` between the
existing `0x3855` and `0x3865` rows.
------------------------------------------------
Verification
------------------------------------------------
- [Phase 1] Parsed tags: `Closes: bugzilla 221891`, msgid link, SOB
Zhang Heng + Takashi Iwai; no Fixes/Cc-stable
- [Phase 2] Diff: +1 `SND_PCI_QUIRK(0x17aa, 0x3862, ...,
ALC269_FIXUP_LIMIT_INT_MIC_BOOST)` in `alc269_fixup_tbl`
- [Phase 2] Read `alc269_fixup_limit_int_mic_boost()` at
`patch_realtek.c:6661-6691` — probe-time amp-cap override for internal
mic pins
- [Phase 2] Read `ALC269_FIXUP_LIMIT_INT_MIC_BOOST` at 8711-8716 —
chains to THINKPAD_ACPI
- [Phase 2] Read `hda_fixup_thinkpad_acpi()` / `is_thinkpad()` in
`thinkpad_helper.c` — LED path skipped without ThinkPad ACPI IDs
- [Phase 3] `git log -S ALC269_FIXUP_LIMIT_INT_MIC_BOOST --
sound/pci/hda/patch_realtek.c`: introduced `3e0d611b2045b` (2013)
- [Phase 3] Similar quirks already in this tree: T480 `85981dfd6b0a0`,
N14AP7 `86a433862912f`, Positivo ARN50 `d44418f5024f6`
- [Phase 3] `git log --grep='IdeaPad Slim 3 15ABR8' -- sound/pci/hda/`:
empty
- [Phase 4] Openwall + IU LKML: v1 patch identical to commit; Takashi
“Applied now. Thanks.”
- [Phase 4] lore.kernel.org and bugzilla HTML/REST: 403 Anubis — full
bugzilla body UNVERIFIED
- [Phase 4] `b4 dig -c`: not run; commit SHA not in this checkout
- [Phase 5] Caller: `snd_hda_pick_fixup(..., alc269_fixup_tbl, ...)` at
probe (`patch_realtek.c:12583`)
- [Phase 6] `git describe HEAD` → `p-6.12-3-gc504cf0baa3d8`; `make
kernelversion` → 6.12.111
- [Phase 6] `sound/hda/codecs/realtek` missing;
`sound/pci/hda/patch_realtek.c` present
- [Phase 6] `git grep 0x3862 -- sound/pci/hda/`: no hits; hole between
0x3855 and 0x3865 at lines 11565-11566
- [Phase 8] Failure mode: distorted/unusable internal mic, SSID-
specific; severity medium globally, high for that laptop
- UNVERIFIED: full text of bugzilla 221891; whether any other product
silently uses SSID 17aa:3862
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 8196235c31d2b..bc87062f86da7 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -7515,6 +7515,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
SND_PCI_QUIRK(0x17aa, 0x3855, "Legion 7 16ITHG6", ALC287_FIXUP_LEGION_16ITHG6),
+ SND_PCI_QUIRK(0x17aa, 0x3862, "Lenovo IdeaPad Slim 3 15ABR8", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
SND_PCI_QUIRK(0x17aa, 0x3865, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x17aa, 0x3866, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.10] ALSA: hda/conexant: Add mute LED quirk for HP ProBook 440 G5
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (2 preceding siblings ...)
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add quirk for Lenovo IdeaPad Slim 3 15ABR8 Sasha Levin
@ 2026-10-19 13:45 ` Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add mute LED support for HP Pavilion 15-eh2xxx Sasha Levin
` (57 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:45 UTC (permalink / raw)
To: patches, stable
Cc: Dmytro Moroziuk, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Dmytro Moroziuk <dmorozyk1@gmail.com>
[ Upstream commit 191fe151eb85ff6cb24189fc88c970745497c057 ]
The HP ProBook 440 G5 requires the CXT_FIXUP_MUTE_LED_GPIO quirk to
properly toggle the physical mute and mic-mute LEDs via the CX8200 codec.
Without this quirk, the LEDs remain permanently dark.
Signed-off-by: Dmytro Moroziuk <dmorozyk1@gmail.com>
Link: https://patch.msgid.link/20260812121856.30353-1-dmorozyk1@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a one-line Conexant mute-LED quirk for HP ProBook 440 G5 (PCI
SSID `0x103c:0x837b`). The local tree is **6.12.111** (`pending-6.12`);
the driver and sibling G4/G5 quirks are already here.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: [ALSA: hda/conexant] [Add] [mute LED quirk for HP ProBook 440
G5]
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- Signed-off-by: Dmytro Moroziuk \<dmorozyk1@gmail.com\> (author)
- Link:
https://patch.msgid.link/20260812121856.30353-1-dmorozyk1@gmail.com
- Signed-off-by: Takashi Iwai \<tiwai@suse.de\> (ALSA maintainer)
- No Fixes:, Reported-by:, Tested-by:, Reviewed-by:, Acked-by:, or Cc:
stable (absence is expected for this review)
- Ignore any pipeline-added Sasha Levin SOB / Upstream commit markers
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- Bug: HP ProBook 440 G5 mute and mic-mute LEDs stay off because the
CX8200 codec is not wired to `CXT_FIXUP_MUTE_LED_GPIO`.
- Symptom: physical mute/mic-mute LEDs remain permanently dark.
- Root cause: missing `SND_PCI_QUIRK` for SSID `0x103c:0x837b`.
- No stack traces, no kernel version range, no crash.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not a hidden fix. It is an explicit hardware quirk / device-
table addition.
===============================================================
PHASE 2: DIFF ANALYSIS
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- Upstream file: `sound/hda/codecs/conexant.c` (+1 / −0)
- Function/table: `cxt5066_fixups[]`
- Scope: single-file, one-line table insert
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- Before: SSID `0x103c:0x837b` matches no quirk; GPIO mute-LED setup is
skipped.
- After: match applies `CXT_FIXUP_MUTE_LED_GPIO` →
`cxt_fixup_mute_led_gpio()` at `HDA_FIXUP_ACT_PRE_PROBE` →
`cxt_setup_mute_led(codec, 0x01, 0x02)`.
- Path: codec probe / initialization only; no error-path or hot-path
change.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: [Hardware workaround / codec quirk]
- Mechanism: missing PCI SSID in the existing Conexant quirk table.
- Fix: add one `SND_PCI_QUIRK` using the same `CXT_FIXUP_MUTE_LED_GPIO`
already used by ProBook 440 G4 (`0x822e`), 455 G5 (`0x836e`), 470 G5
(`0x837f`), 450 G4 (`0x8231`).
**Step 2.4: ASSESS THE FIX QUALITY**
Record: Obviously correct; surgical; no API/locking/refcount change.
Regression risk is limited to that SSID. `0x837b` is unused in this
tree’s quirk table.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record: The new line did not exist here. Adjacent entries:
- `0x836e` HP ProBook 455 G5 — present since at least Takashi Iwai 2021
(`2e6a731296be9d`)
- `0x837f` HP ProBook 470 G5 — same
- `0x822e` HP ProBook 440 G4 — `ba92b11428797` (Kai-Heng Feng, 2017),
originally `Cc: stable # v4.12+`
`CXT_FIXUP_MUTE_LED_GPIO` itself dates to `5cd5b1bdfb013` (HP ZBook 15u
G3, 2017).
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No Fixes: tag. The “bug” is a missing table entry, not a
regression from a specific commit.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: Same-file mute-LED quirks already in this tree include 440 G4,
450 G4 (`1cce98bf41390`, backported here with `Cc: stable`), 455 G5, 470
G5, 645 G4. Standalone, not a series.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: No prior Dmytro Moroziuk commits on `sound/pci/hda/` in this
tree. ALSA maintainer Takashi Iwai applied it the same day.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: Needs `CXT_FIXUP_MUTE_LED_GPIO` / `cxt_fixup_mute_led_gpio()` /
`cxt5066_fixups[]` — all present. Standalone. Path remapped from
`sound/hda/codecs/conexant.c` (post-6.12 move) to
`sound/pci/hda/patch_conexant.c`.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c 191fe151eb85f` →
https://patch.msgid.link/20260812121856.30353-1-dmorozyk1@gmail.com
- Single v1 series; no v2/v3
- Thread: author submission + Takashi Iwai: “Thanks, applied to for-next
branch now.”
- No NAK, no requested changes, no reviewer Cc: stable (common for one-
line quirks)
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): To/Cc perex@perex.cz, tiwai@suse.com, linux-
sound@vger.kernel.org. Right list and both ALSA maintainers.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No bugzilla/syzbot link. User-visible hardware issue stated in
the commit; accepted by the subsystem maintainer.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone one-patch series. Later `origin/master` conexant
commits (headset plugin, SN6140 S3) do not touch `0x837b`.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: No stable@ discussion found for this model/ID. Sibling quirks
historically went to stable with explicit Cc.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF**
Record: Table `cxt5066_fixups[]`; applied fixup
`cxt_fixup_mute_led_gpio()`.
**Step 5.2: TRACE CALLERS**
Record: `patch_conexant_auto()` → `snd_hda_pick_fixup(...,
cxt5066_fixups, ...)` for codec IDs including default and CX8200
(`HDA_CODEC_ENTRY(0x14f12008, "CX8200", patch_conexant_auto)` at line
1305). Lookup is PCI subsystem vendor/device.
**Step 5.3: TRACE CALLEES**
Record: `cxt_fixup_mute_led_gpio` → `cxt_setup_mute_led(codec, 0x01,
0x02)` → `snd_hda_gen_add_mute_led_cdev` /
`snd_hda_gen_add_micmute_led_cdev`. Existing, stable helpers.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Codec probe on matching HP laptop. Userspace mute/mic-mute then
drives GPIO LEDs. Reachable on that hardware; not a generic syscall
crash path.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same one-line pattern used for several HP ProBook G4/G5 Conexant
machines; 450 G4 already backported into this 6.12 tree.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record:
- Tree: `p-6.12-3-gc504cf0baa3d8`, `make kernelversion` = 6.12.111
- `git merge-base --is-ancestor 191fe151eb85f HEAD` → not present
- File here: `sound/pci/hda/patch_conexant.c` (no
`sound/hda/codecs/conexant.c`)
- `cxt5066_fixups[]` exists; `0x837b` / “HP ProBook 440 G5” absent
- CX8200 codec entry exists
- Bug is long-standing missing hardware enablement, not a post-6.12
regression
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: Path remap required. Context matches. `git apply --check` after
remapping to `sound/pci/hda/patch_conexant.c`: “Hunk #1 succeeded at
1105 (offset -2 lines).” Clean apply with trivial path change.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: No 440 G5 / `0x837b` entry. Related G4/G5 mute-LED quirks are
already present.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: [sound/pci/hda Conexant codec] [IMPORTANT for laptop audio;
quirk is machine-specific]
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Mature table; regular quirk additions. Recent local commits
include other pin/quirk updates. Typical LTS candidate.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: Driver-specific / platform-specific: HP ProBook 440 G5 (SSID
0x103c:0x837b) with CX8200, `CONFIG_SND_HDA_CODEC_CONEXANT`.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Every boot on that laptop. Mute/mic-mute keys do not light LEDs.
Unprivileged users see dead LEDs; not a privilege issue.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: Mute/mic-mute LEDs stay dark. Severity LOW as crash/corruption,
but a real hardware bug that stable rules call out as a quirk.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- Benefit: restores LED behavior on a shipping HP ProBook still used on
6.12 LTS; matches sibling models already in this tree.
- Risk: one table line, SSID-gated, existing fixup. Very low.
- Ratio: strongly favors backport.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Explicit hardware quirk / PCI ID addition (stable-rules exception)
- Fixes user-visible broken mute/mic-mute LEDs on HP ProBook 440 G5
- One line, existing `CXT_FIXUP_MUTE_LED_GPIO`
- Same pattern as 440 G4 / 450 G4 / 455 G5 / 470 G5 already in this tree
- 450 G4 equivalent already backported here with Cc: stable
- Applied by ALSA maintainer; no NAK
- Applies here with only a path remap
- `Documentation/process/stable-kernel-rules.rst`: “fix a real bug … or
just add a device ID” and “hardware quirk”
AGAINST:
- Not a crash, UAF, or security issue
- No Fixes:/Cc: stable (not a negative for this pipeline)
- Author is not a regular conexant contributor (mitigated by maintainer
apply)
UNRESOLVED:
- Independently verifying the reporter’s hardware beyond SSID +
maintainer accept: not possible from git/lore
- lore.kernel.org WebFetch returned 403; thread recovered via `b4 dig
-m`
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? PASS — one-line table entry, maintainer
applied
2. Fixes a real bug that affects users? PASS — LEDs stay dark on that
laptop
3. Important issue? PASS as hardware quirk / device ID (not crash-level)
4. Small and contained? PASS — +1 line
5. No new features or APIs? PASS — existing fixup, new SSID only
6. Can apply to the local tree? PASS — context present; remap
`sound/hda/codecs/conexant.c` → `sound/pci/hda/patch_conexant.c`
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: Hardware quirk / codec quirk table entry (also a device-ID-style
addition to an existing driver).
**Step 9.4: MAKE YOUR DECISION**
This belongs in 6.12.y. The driver, fixup, and neighboring ProBook G5
IDs are already here; only this SSID is missing. Risk is negligible.
------------------------------------------------
What the commit solves and why it matters
------------------------------------------------
Without the quirk, CX8200 GPIO mute/mic-mute LEDs on HP ProBook 440 G5
never toggle. That is a real hardware bug for owners of this 2018-era
ProBook on LTS. The fix is the same one-line SSID mapping already used
on 440 G4 and other G5 ProBooks.
Risk vs benefit: benefit is working LEDs on one laptop model; risk is
confined to SSID `0x103c:0x837b`. Backport needs only the file-path
rename from the later HDA codec shuffle.
Verification:
- [Phase 1] Parsed tags: author SOB, Link msgid, Takashi Iwai SOB; no
Fixes/Reported-by/Cc: stable
- [Phase 2] Diff: +1 `SND_PCI_QUIRK(0x103c, 0x837b, "HP ProBook 440 G5",
CXT_FIXUP_MUTE_LED_GPIO)` in `cxt5066_fixups[]`
- [Phase 2] Local `cxt_fixup_mute_led_gpio()` at
`sound/pci/hda/patch_conexant.c:789` calls `cxt_setup_mute_led(codec,
0x01, 0x02)`
- [Phase 3] `git blame -L 1098,1115`: sibling G4/G5 quirks present; 440
G4 is `ba92b11428797` with original Cc: stable
- [Phase 3] `git show 1cce98bf41390`: 450 G4 mute-LED quirk already in
this 6.12 tree from upstream
- [Phase 3] `git log --author="Dmytro Moroziuk"` on `sound/pci/hda/`: no
prior commits
- [Phase 4] `b4 dig -c 191fe151eb85f`: lore match; v1 only; recipients
perex/tiwai/linux-sound
- [Phase 4] mbox: Iwai “Thanks, applied to for-next branch now.”; no NAK
- [Phase 4] WebFetch lore URLs: 403; thread recovered via b4
- [Phase 4] WebSearch stable@: no discussion of this model
- [Phase 5] CX8200 `HDA_CODEC_ENTRY(0x14f12008, "CX8200",
patch_conexant_auto)` present; `snd_hda_pick_fixup` matches PCI SSID
- [Phase 6] `git describe HEAD` → `p-6.12-3-gc504cf0baa3d8`; `make
kernelversion` → 6.12.111
- [Phase 6] `git merge-base --is-ancestor 191fe151eb85f HEAD` → not in
tree
- [Phase 6] grep `0x837b` / `HP ProBook 440 G5` in conexant: no match
- [Phase 6] remapped `git apply --check`: hunk succeeded at 1105 (offset
-2)
- [Phase 6] `git log origin/master` after the commit: later conexant
changes do not touch `0x837b`
- [Phase 7/8] Failure mode: dark mute/mic-mute LEDs on one HP model;
quirk exception applies
- UNVERIFIED: physical confirmation of reporter’s 440 G5/CX8200 beyond
commit + maintainer apply
- UNVERIFIED: lore.kernel.org HTML fetch (403); b4 mbox used instead
**YES**
sound/hda/codecs/conexant.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/conexant.c b/sound/hda/codecs/conexant.c
index ef40f1cb1158e..862fcbe74e4f0 100644
--- a/sound/hda/codecs/conexant.c
+++ b/sound/hda/codecs/conexant.c
@@ -1115,6 +1115,7 @@ static const struct hda_quirk cxt5066_fixups[] = {
SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x103c, 0x82b4, "HP ProDesk 600 G3", CXT_FIXUP_HP_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x103c, 0x836e, "HP ProBook 455 G5", CXT_FIXUP_MUTE_LED_GPIO),
+ SND_PCI_QUIRK(0x103c, 0x837b, "HP ProBook 440 G5", CXT_FIXUP_MUTE_LED_GPIO),
SND_PCI_QUIRK(0x103c, 0x837f, "HP ProBook 470 G5", CXT_FIXUP_MUTE_LED_GPIO),
SND_PCI_QUIRK(0x103c, 0x83b2, "HP EliteBook 840 G5", CXT_FIXUP_HP_DOCK),
SND_PCI_QUIRK(0x103c, 0x83b3, "HP EliteBook 830 G5", CXT_FIXUP_HP_DOCK),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add mute LED support for HP Pavilion 15-eh2xxx
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (3 preceding siblings ...)
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/conexant: Add mute LED quirk for HP ProBook 440 G5 Sasha Levin
@ 2026-10-19 13:45 ` Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18] ALSA: hda/conexant: Add pin config quirk for Huawei Matebook Sasha Levin
` (56 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:45 UTC (permalink / raw)
To: patches, stable
Cc: Luca Castaldini, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Luca Castaldini <luca.castaldini96@gmail.com>
[ Upstream commit daf55a381dca9bda12cc8c3a47605698f2d560e9 ]
Add the subsystem ID 103c:8a0e to the ALC287 HP GPIO LED quirk
table so the mute LED follows the speaker mute state.
Tested on HP Pavilion Laptop 15-eh2xxx with ALC287 codec.
The mute LED now follows the speaker mute state.
Signed-off-by: Luca Castaldini <luca.castaldini96@gmail.com>
Link: https://patch.msgid.link/20260805122907.52302-1-luca.castaldini96@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
I have enough to decide: this is a one-line HP mute-LED quirk, the
`ALC287_FIXUP_HP_GPIO_LED` helper already exists in 5.10, and this tree
already takes the same class of Realtek ID additions.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: [ALSA: hda/realtek] [Add] [mute LED support for HP Pavilion
15-eh2xxx by adding PCI subsystem ID 103c:8a0e to an existing GPIO LED
quirk table]
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- Fixes: none (expected for this review pipeline)
- Reported-by: none
- Tested-by: none as a tag; the body states the author tested it on the
target laptop
- Reviewed-by: none
- Acked-by: none
- Link: https://patch.msgid.link/20260805122907.52302-1-
luca.castaldini96@gmail.com
- Cc: stable@vger.kernel.org: absent (expected; not a negative signal)
- Signed-off-by: Luca Castaldini <luca.castaldini96@gmail.com> (author)
- Signed-off-by: Takashi Iwai <tiwai@suse.de> (ALSA maintainer; applied
the patch)
- Ignore any Sasha Levin SOB if present in candidate packaging
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- Bug description: HP Pavilion Laptop 15-eh2xxx (ALC287) mute LED does
not follow speaker mute because subsystem ID 103c:8a0e is missing from
the ALC287 HP GPIO LED quirk table.
- Symptom/failure mode: mute LED stays out of sync with speaker mute
(LED does not work as users expect). Audio playback itself is not
described as broken.
- Version information: none in the message. Hardware is a 2021–2022
Pavilion (linux-hardware.org year 2021; retail listings 2022).
- Root cause: missing SND_PCI_QUIRK entry; the existing
ALC287_FIXUP_HP_GPIO_LED fixup already implements GPIO mute LED
control.
Step 1.4: DETECT HIDDEN BUG FIXES
Record: Not a hidden bug fix. It is an explicit hardware quirk / device-
ID addition. The subject says "Add" rather than "fix", but this is the
documented stable exception for audio codec quirks (SND_PCI_QUIRK for a
specific laptop).
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- Files: sound/hda/codecs/realtek/alc269.c (+1 / -0)
- Function/table: alc269_fixup_tbl[] (static const struct hda_quirk /
snd_pci_quirk)
- Scope: single-file, one-line surgical quirk addition
- Added line: SND_PCI_QUIRK(0x103c, 0x8a0e, "HP Pavilion Laptop
15-eh2xxx", ALC287_FIXUP_HP_GPIO_LED)
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record:
- Before: codec probe for PCI SSID 103c:8a0e does not match a quirk, so
GPIO mute LED is not hooked to speaker mute.
- After: snd_hda_pick_fixup() matches 0x103c/0x8a0e and applies
ALC287_FIXUP_HP_GPIO_LED, which calls alc287_fixup_hp_gpio_led() →
alc_fixup_hp_gpio_led(..., mute_mask=0x10, micmute_mask=0), wiring
GPIO bit 4 (0x10) as the mute LED.
- Path affected: HDA codec probe / LED classdev registration for this
one SSID only.
Step 2.3: IDENTIFY THE BUG MECHANISM
Record:
- Bug category: hardware workaround / audio codec quirk (SND_PCI_QUIRK)
- Mechanism: laptop mute LED is GPIO-driven; without the quirk the LED
is not bound to mute state. The fix only adds the SSID to the existing
table. No new fixup function.
Step 2.4: ASSESS THE FIX QUALITY
Record:
- Obviously correct: one ID, existing enum, existing function. Same
pattern as many quirks already in this tree (e.g. 0x87cb/0x87cc
Pavilion 15-eg0xxx).
- Minimal: one line, no unrelated changes, no API change.
- Regression risk: very low. Only machines with SSID 103c:8a0e are
affected. Wrong GPIO would misdrive that laptop's LED, but the author
tested ALC287 on this model and nearby Pavilion 14-ec1xxx (0x8a0f)
uses the same fixup in mainline.
- Red flags: none (no new APIs, no locking, no refcount, no series
dependency).
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record:
- This tree does not have alc269.c; equivalent table is
sound/pci/hda/patch_realtek.c.
- ALC287_FIXUP_HP_GPIO_LED and alc287_fixup_hp_gpio_led() were
introduced by a0ccbc5319d57 ("ALSA: hda/realtek - Add supported mute
Led for HP", Kailang Yang, 2020-11-06). That commit is an ancestor of
HEAD.
- First table users of that fixup in this tree: 0x87f4/0x87f5 (same
commit), later 0x87c8 (3e1bcaebe8b10, 2020-12), 0x87cc (d7e11de23f197,
2025-07), 0x87cb (471db5addec8c, 2026-03).
- 0x8a0e is not present in this checkout.
Step 3.2: FOLLOW THE FIXES: TAG
Record: No Fixes: tag. The "bug" is a missing quirk for hardware that
shipped after 5.10's original release, not a regression from a specific
earlier commit.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record:
- Recent patch_realtek.c history on this branch includes many mute-LED
ID additions (4a660d1dc6a0f 14s-dr1xxx, 471db5addec8c 15-eg0xxx,
d391901abfc67 15s-eq1xxx, etc.).
- Neighbor ID 0x8a0f ("HP Pavilion 14-ec1xxx") is in the candidate hunk
context but is not in this 5.10 table.
- Related mainline commit 068641bc9dc3d adds 15-eh1xxx with a different
codec/fixup (ALC245 / ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT). Not a
prerequisite; different board (88D1 vs 8A0E). Not in this tree.
- Standalone: not patch X/Y.
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record: git log --author='Luca Castaldini' on this tree's sound/pci/hda/
returned no commits. First-time contributor for this ID. Maintainer
Takashi Iwai applied it the same day.
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record:
- Required symbols exist here: ALC287_FIXUP_HP_GPIO_LED enum,
alc287_fixup_hp_gpio_led(), alc_fixup_hp_gpio_led(), alc269_fixup_tbl,
snd_hda_pick_fixup() in alc269 probe.
- No new functions or structs.
- Path differs (mainline split Realtek into
sound/hda/codecs/realtek/alc269.c; 5.10 still uses
sound/pci/hda/patch_realtek.c). Standalone conceptually; apply needs a
path/context tweak, not extra commits.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- Commit on all-next: daf55a381dca9bda12cc8c3a47605698f2d560e9 (not an
ancestor of this HEAD).
- b4 dig -c daf55a381dca9: lore.kernel.org patch-id search errored;
author/subject match succeeded.
- Lore/msgid: https://patch.msgid.link/20260805122907.52302-1-
luca.castaldini96@gmail.com
- Mirrors: https://lkml.iu.edu/hypermail/linux/kernel/2608.0/08604.html
(patch), .../09065.html (Iwai reply)
- b4 dig -a: single v1 series, 2026-08-05. No v2/v3.
- Reviewer: Takashi Iwai applied to for-next the same day: "Applied to
for-next branch now. Thanks." No NAK, no stable discussion, no risk
flags.
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record: b4 dig -w recipients: Luca Castaldini, tiwai@suse.com,
perex@perex.cz, linux-sound@vger.kernel.org, linux-
kernel@vger.kernel.org. Correct ALSA maintainers and lists. Applied by
Takashi Iwai.
Step 4.3: SEARCH FOR THE BUG REPORT
Record:
- No bugzilla or syzbot link.
- Author tested on HP Pavilion Laptop 15-eh2xxx with ALC287.
- linux-hardware.org probe 0510a78cfe confirms Pavilion Laptop
15-eh2xxx, motherboard 8A0E, PCI SSID 103c:8a0e, Ryzen HD Audio
(snd_hda_intel), year ~2021, Ubuntu 22.04 / kernel 6.5 in that probe.
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Standalone v1. Related but independent: 15-eh1xxx quirk
(068641bc9dc3d) uses ALC245, not this fixup. 14-ec1xxx (0x8a0f) is the
table neighbor in mainline; not required here.
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: lore.kernel.org/stable fetch returned 403. Web search did not
find a stable-list thread for 15-eh2xxx / 8a0e. UNVERIFIED that nobody
requested or rejected it on stable@; no evidence of a NAK.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: No function body edited. Table alc269_fixup_tbl[]. Runtime
target: ALC287_FIXUP_HP_GPIO_LED → alc287_fixup_hp_gpio_led() →
alc_fixup_hp_gpio_led().
Step 5.2: TRACE CALLERS
Record:
- alc269_fixup_tbl is passed to snd_hda_pick_fixup() from the
ALC269-family probe in patch_realtek.c (around line 10471).
- alc287_fixup_hp_gpio_led is only referenced as that fixup's .v.func.
- Context: HDA codec probe (device enumeration), not IRQ/hot path.
Userspace mute then drives the LED via the registered mute LED cdev.
Step 5.3: TRACE CALLEES
Record (this tree, alc_fixup_hp_gpio_led at 4431–4449):
- alc_fixup_gpio(codec, action, mute_mask | micmute_mask)
- On PRE_PROBE, if mute_mask: set spec->gpio_mute_led_mask and
snd_hda_gen_add_mute_led_cdev(codec, gpio_mute_led_set)
- ALC287 variant uses mute_mask 0x10, micmute_mask 0
Step 5.4: FOLLOW THE CALL CHAIN
Record: PCI HDA probe → Realtek ALC269/ALC287 patch →
snd_hda_pick_fixup(SSID) → GPIO LED hook. Reachable on this laptop
whenever the HDA codec probes. Unprivileged users can toggle mute; they
cannot widen the quirk to other SSIDs.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Same ALC287_FIXUP_HP_GPIO_LED already used here for 0x87c8,
0x87cb, 0x87cc, 0x87f4, 0x87f5. This tree has a long history of HP mute-
LED ID additions. Systematic, established pattern.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record:
- Local tree: pending-5.10, git describe p-5.10-2-g5aaf1e4e5aa4d, make
kernelversion 5.10.270.
- Missing ID 103c:8a0e: confirmed (no 0x8a0e, no 15-eh2xxx, no 0x8a* HP
entries at all).
- Fixup and driver: present. Without the ID, 5.10 will not enable the
mute LED on this laptop.
- Introduced: missing-ID class; hardware ~2021–2022. 5.10 still ships
this driver and already backports later Pavilion LED quirks.
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record: Expected difficulty: minor conflicts / path remap, not rework.
- Mainline file sound/hda/codecs/realtek/alc269.c does not exist; use
sound/pci/hda/patch_realtek.c.
- Hunk context (0x8a05/0x8a06/0x8a0f) is absent. Insert one
SND_PCI_QUIRK among the 0x103c HP entries (table currently jumps
0x89aa → 0x8e1d).
- No structural conflict with ALC287_FIXUP_HP_GPIO_LED.
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: 0x8a0e not present. No 15-eh2xxx/15-eh1xxx quirk. Similar
Pavilion 15-eg0xxx IDs (0x87cb/0x87cc) already backported. This ID is
new.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: [sound/pci/hda Realtek codec / ALSA HDA] [IMPORTANT for laptop
audio; this change is laptop-specific, not core MM/net]
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: Mature, still active on this 5.10 branch. Recent mute-LED quirks
continue to land (2025–2026). MAINTAINERS: SOUND — Jaroslav Kysela,
Takashi Iwai.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: Driver-specific / platform-specific: only HP Pavilion 15-eh2xxx
(PCI SSID 103c:8a0e). 5.10 users of that laptop (Debian 11-class LTS,
appliances, custom 5.10 images) benefit. Everyone else unchanged.
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: Trigger is codec probe on that SSID, then mute/unmute. Common
for owners of that model. Unprivileged users can toggle mute; not a
security trigger.
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record: Mute LED does not track speaker mute. Not panic/UAF/corruption.
Severity LOW–MEDIUM functionally, but this is the documented hardware-
quirk exception (broken LED on a real laptop).
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record:
- Benefit: mute LED works on this Pavilion series; matches many quirks
already accepted on this branch.
- Risk: very low (one SSID, existing fixup, author-tested, maintainer-
applied).
- Ratio: high benefit for those users vs negligible regression risk.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR backporting:
- Explicit stable exception: audio codec SND_PCI_QUIRK / hardware quirk
for an existing driver.
- One-line addition; ALC287_FIXUP_HP_GPIO_LED already in 5.10 since
a0ccbc5319d57 (v5.10 era, Cc: stable originally).
- Real hardware, author-tested; SSID 103c:8a0e confirmed on linux-
hardware.org.
- Applied by ALSA maintainer; no NAK.
- This 5.10 tree already backports the same class of HP mute-LED IDs.
AGAINST:
- Not a crash, UAF, or data-corruption fix (LED-only).
- Mainline path differs; hunk context IDs missing (trivial remap).
- Laptop postdates original 5.10 (2021–2022); still relevant because
this LTS keeps taking such quirks.
- First-time author; mitigated by maintainer apply + identical existing
fixup.
UNRESOLVED:
- lore.kernel.org/stable search 403; no confirmed stable-list thread.
- Could not confirm from this checkout whether every 15-eh2xxx SKU uses
GPIO 0x10; author test and 14-ec1xxx using the same fixup support that
choice.
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? PASS — one ID, existing fixup, author
tested, maintainer applied.
2. Fixes a real bug that affects users? PASS — mute LED does not follow
mute on this laptop.
3. Important issue? PASS under the hardware-quirk exception (not a
panic). Severity: broken LED on a specific model.
4. Small and contained? PASS — +1 line.
5. No new features or APIs? PASS — enables existing GPIO LED fixup for
one SSID; no new userspace API.
6. Can apply to the local tree? PASS — equivalent table and fixup exist
in patch_realtek.c; needs path/context adjustment only.
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: Hardware quirk / audio codec SND_PCI_QUIRK for an existing
Realtek HDA driver. This is the category the rules call out as
appropriate for stable.
Step 9.4: MAKE YOUR DECISION
This should be backported to this 5.10.270 tree. It is a one-line PCI
quirk onto a fixup that already exists here, it fixes real mute-LED
behavior on HP Pavilion 15-eh2xxx, and it matches quirks this branch
already carries. Apply it in sound/pci/hda/patch_realtek.c's
alc269_fixup_tbl[] as:
SND_PCI_QUIRK(0x103c, 0x8a0e, "HP Pavilion Laptop 15-eh2xxx",
ALC287_FIXUP_HP_GPIO_LED),
placed among the other 0x103c HP entries (for example after 0x89aa,
before 0x8e1d).
Verification:
- [Phase 1] Parsed tags: Link msgid
20260805122907.52302-1-luca.castaldini96@gmail.com; SOB Luca
Castaldini + Takashi Iwai; no Fixes/Reported-by/Cc:stable
- [Phase 1] Body: missing 103c:8a0e; mute LED should follow speaker
mute; tested on Pavilion 15-eh2xxx ALC287
- [Phase 2] Diff: +1 SND_PCI_QUIRK in alc269_fixup_tbl;
ALC287_FIXUP_HP_GPIO_LED
- [Phase 3] git describe HEAD: p-5.10-2-g5aaf1e4e5aa4d; make
kernelversion 5.10.270; branch pending-5.10
- [Phase 3] glob: no alc269.c; equivalent sound/pci/hda/patch_realtek.c
- [Phase 3] git merge-base --is-ancestor a0ccbc5319d57 HEAD: YES (fixup
introduced 2020-11-06)
- [Phase 3] git merge-base --is-ancestor daf55a381dca9 HEAD: NO (this ID
not in 5.10 yet)
- [Phase 3] grep 0x8a0e / 15-eh2xxx / 0x8a0f: no matches in this tree
- [Phase 3] blame alc287_fixup_hp_gpio_led: a0ccbc5319d57; table already
has 0x87cb/0x87cc/0x87c8/0x87f4/0x87f5
- [Phase 3] git log --author='Luca Castaldini' -- sound/pci/hda/: empty
on this tree
- [Phase 4] b4 dig -c daf55a381dca9: msgid match; v1 only; Iwai applied
same day
- [Phase 4] b4 dig -w: tiwai, perex, linux-sound, linux-kernel
- [Phase 4] lkml.iu.edu 08604/09065: patch + "Applied to for-next"; no
NAK
- [Phase 4] linux-hardware.org probe 0510a78cfe: 103c:8a0e Pavilion
15-eh2xxx, board 8A0E
- [Phase 4] lore.kernel.org WebFetch 403; stable-list discussion
UNVERIFIED
- [Phase 5] alc269_fixup_tbl used at patch_realtek.c:10471 via
snd_hda_pick_fixup; alc_fixup_hp_gpio_led uses mute_mask 0x10
- [Phase 6] Insertion point: after 0x89aa / before 0x8e1d in
alc269_fixup_tbl; path remap required
- [Phase 6] Related 15-eh1xxx 068641bc9dc3d not in this tree and uses a
different fixup; not a dependency
- [Phase 7] SOUND maintainers Takashi Iwai / Jaroslav Kysela; this
branch already lands mute-LED quirks
- [Phase 8] Failure mode: mute LED desync, not crash; quirk exception
applies
- UNVERIFIED: GPIO 0x10 for every 15-eh2xxx SKU beyond the author's
test; no stable@ thread due to 403
The patch is a one-line hardware quirk for an existing Realtek HDA
fixup, it matches stable policy, and it applies to this 5.10 tree with
only a path/context adjustment.
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 4cadbad99537a..68d5e5aa7f62d 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -6881,6 +6881,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x89e7, "HP Elite x2 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8a05, "HP Dragonfly Folio G3 2-in-1", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8a06, "HP Dragonfly Folio G3 2-in-1", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
+ SND_PCI_QUIRK(0x103c, 0x8a0e, "HP Pavilion Laptop 15-eh2xxx", ALC287_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8a0f, "HP Pavilion 14-ec1xxx", ALC287_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8a1b, "HP 255 15.6 inch G9 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x8a1f, "HP Laptop 14s-dr5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18] ALSA: hda/conexant: Add pin config quirk for Huawei Matebook
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (4 preceding siblings ...)
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add mute LED support for HP Pavilion 15-eh2xxx Sasha Levin
@ 2026-10-19 13:45 ` Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add ALC235 support for headset mode Sasha Levin
` (55 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:45 UTC (permalink / raw)
To: patches, stable
Cc: Zhang Heng, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Zhang Heng <zhangheng@kylinos.cn>
[ Upstream commit d152afd1cd7a69c752236b6e825c4e62a74788eb ]
The headphone jack is not detected on this Huawei Matebook (Conexant
SN6140 codec). The BIOS incorrectly marks Pin 0x18 as [N/A], causing
the driver to report hp_outs=0 and no "Headphones" output appears.
Override the pin configuration for NID 0x18 to set it as a headphone
jack, which restores proper detection and audio routing.
Link: https://github.com/thesofproject/sof/issues/10687
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260807125857.678297-4-zhangheng@kylinos.cn
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
Local tree is **6.12.111** (`pending-6.12`). This is a Conexant SN6140
pin-config quirk for one Huawei PCI/codec SSID; the driver and SN6140
support are already here.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: `[ALSA hda/conexant] [Add] pin config quirk for Huawei Matebook`
Subsystem: ALSA HD-audio Conexant codec. Action: add a hardware quirk
(not a feature). Intent: restore headphone jack detection on a specific
laptop whose BIOS marks the jack pin as N/A.
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Link: https://github.com/thesofproject/sof/issues/10687` — user bug
report with codec dump
- `Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>` — author
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` — ALSA maintainer
applied it
- `Link:
https://patch.msgid.link/20260807125857.678297-4-zhangheng@kylinos.cn`
— lore msgid; **patch 4/4** of a series
- No `Fixes:`, `Reported-by:`, `Tested-by:`, `Reviewed-by:`, `Cc:
stable` (absence expected for this review)
- Ignore any pipeline `Signed-off-by: Sasha Levin` / `[Upstream commit
…]`
Notable: GitHub issue is a concrete user report, not syzbot. Maintainer
SOB is a strong quality signal.
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** Huawei Matebook, Conexant SN6140. BIOS marks pin NID 0x18 as
`[N/A]`.
- **Symptom:** driver reports `hp_outs=0`; no "Headphones" sink; sound
stays on internal speakers when a 3.5mm jack is plugged in.
- **Root cause:** wrong pin default so autoconfig never classifies a
headphone output.
- **Fix:** override NID 0x18 to pin config `0x03211020` (headphone
jack).
- **Version info in message:** none. GitHub issue (followed in Phase 4)
used **Debian 13, kernel 6.12.73**.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not a hidden fix. It is an explicit hardware quirk for a broken
BIOS pin config. That is the documented stable exception for codec/PCI
quirks.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File in the commit: `sound/hda/codecs/conexant.c` (+9 / −0)
- Local 6.12 path: `sound/pci/hda/patch_conexant.c` (codecs had not been
moved yet)
- Functions/data: `enum { … }` last entry; `cxt_fixups[]`;
`cxt5066_fixups[]`
- Scope: single-file surgical quirk; three tiny hunks
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
1. Enum: add `CXT_FIXUP_HUAWEI_MATEBOOK_HP` after
`CXT_FIXUP_ACER_SWIFT_HP` (already the last entry in this tree at
line 309).
2. `cxt_fixups[]`: `HDA_FIXUP_PINS` table `{ 0x18, 0x03211020 }`.
3. `cxt5066_fixups[]`: `SND_PCI_QUIRK(0x19e5, 0x3289, …)` inserted after
the Lenovo vendor catch-all and before Lemote `0x1c06`.
Before: SN6140 probe hits `default:` in `patch_conexant_auto()`, picks
`cxt5066_fixups`, no Huawei entry, BIOS pin 0x18 (`0x40f001f0`,
connectivity N/A) is parsed, `hp_outs=0`.
After: SSID `19e5:3289` selects the new fixup.
`snd_hda_apply_fixup(PRE_PROBE)` calls `snd_hda_apply_pincfgs()` and
overrides pin 0x18 before `snd_hda_parse_pin_defcfg()`.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: **Hardware quirk / pin-config workaround (category h).** BIOS
advertises the headphone pin as unconnected. The driver then never
creates a Headphones path or jack-based speaker mute. Override is the
standard HDA fix (`HDA_FIXUP_PINS`), same pattern as Acer Swift SF314
and Lenovo IdeaPad Slim 5 already in this file.
Pin default `0x03211020` = Jack, external left, HP Out, 1/8" stereo,
black, association 2. Matches the GitHub user’s working `hda-jack-
retask` firmware.
**Step 2.4: ASSESS THE FIX QUALITY**
Record: Obviously correct and minimal. Scoped to one SSID.
`SND_PCI_QUIRK_VENDOR(0x17aa, …)` cannot match Huawei `0x19e5`.
Regression risk is limited to machines that share `19e5:3289` and need a
*different* pin 0x18 role — standard quirk risk, same as other SSID
entries. No locking, no API, no extra module parameter.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record: The bug is missing a table entry, not a newly introduced logic
bug. SN6140 IDs exist since `ca348e7fe1ab9` ("add a new hda codec
SN6140") — **ancestor of this HEAD**. Pin parse / `HDA_FIXUP_PINS` is
old (2011-era enum terminator still blamed on Takashi Iwai). Insertion
neighbors: Acer Swift (Feb 2026, already backported here as
`ab6a494abecb8b`), Lemote quirks from 2012.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Expected. Nothing to follow. The “bug” is a
BIOS pin default, not a kernel regression SHA.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record (this tree, `sound/pci/hda/patch_conexant.c`):
- `775911e09ec28` pin config quirk for Lenovo IdeaPad Slim 5 16AKP10
(SN6140)
- `ab6a494abecb8b` Acer Swift headphone pin tweak
- `6e1664116a9609` MECHREVO headset-mic quirk
Same class of backports already landed in 6.12.y.
Standalone vs series: submitted as **4/4**. Patches 1–3 are Realtek
`alc269.c` quirks for unrelated SSIDs. This hunk does not use any of
them.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Zhang Heng has other ALSA quirk work in this tree (Realtek +
Conexant mic-bias). Not the subsystem maintainer. Takashi Iwai applied
the patch. That is the usual path for HDA quirks.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: Needs existing `HDA_FIXUP_PINS`, `cxt_fixups[]`,
`cxt5066_fixups[]`, SN6140 `0x14f11f87`, and `snd_hda_pick_fixup()`. All
present. Does **not** need `CXT_FIXUP_LENOVO_XPAD_ACPI` (mainline
context only). Can apply standalone with a path rename plus one-line
context fuzz on the Lenovo vendor quirk string.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 am` on msgid `20260807125857.678297-4-zhangheng@kylinos.cn`
matched the series:
https://patch.msgid.link/20260807125857.678297-1-zhangheng@kylinos.cn
- Public copies: https://lists.openwall.net/linux-kernel/2026/08/07/1129
and https://lkml.iu.edu/hypermail/linux/kernel/2608.0/13447.html
- Single revision of this series (no v2 of 4/4 in the thread `b4`
analyzed)
- `b4 dig -c` on this SHA was not possible: the commit is not in this
6.12 object graph
- No NAK in the saved series mbox. Applied by Takashi (SOB on the commit
under review)
- Lore HTTP fetch returned 403; used `b4` + openwall/lkml mirrors
instead
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 am` headers): To `tiwai@suse.com`; Cc `linux-
sound@vger.kernel.org`, `linux-kernel@vger.kernel.org`. Correct
maintainer and list. No extra Reviewed-by on the patch itself;
maintainer SOB is the review signal.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record — GitHub thesofproject/sof#10687 (closed):
- Author ciniap, 2026-04-07; **Kernel 6.12.73+deb13-amd64**, Intel Alder
Lake-P Huawei, SOF `sof-hda-generic-2ch.tplg`
- Codec dump: Node 0x18 Pin Default `0x40f001f0: [N/A]`; dmesg
`hp_outs=0`
- User fixed it with firmware pin override `{ 0x18 0x03211020 }` —
**same value as this patch**
- Impact: speakers stay on with headphones; no private listening
- Zhang Heng later commented that the upstream patch was sent
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: 1/4 Acer Nitro Realtek headset mic; 2/4 Acer Gadget E10 speaker
pin; 3/4 ASUS Vivobook Realtek headset mic; 4/4 this Conexant Huawei
pincfg. Independent table rows. 4/4 does not need 1–3.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org/stable search returned 403. No evidence in-tree
that this Huawei SSID was already selected. Similar Conexant pin quirks
**were** already pulled into this 6.12 branch.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS**
Record: No function bodies edited. Data consumed by
`snd_hda_pick_fixup()`, `__snd_hda_apply_fixup()` / `HDA_FIXUP_PINS`,
`snd_hda_apply_pincfgs()`, `patch_conexant_auto()`.
**Step 5.2: TRACE CALLERS**
Record: `patch_conexant_auto()` is the SN6140 probe
(`HDA_CODEC_ENTRY(0x14f11f87, "SN6140", patch_conexant_auto)`). Default
branch uses `cxt5066_fixups`. Probe-time only, not IRQ/hot path.
**Step 5.3: TRACE CALLEES**
Record: `snd_hda_codec_set_pincfg()` per pin; then
`snd_hda_parse_pin_defcfg()` / `snd_hda_gen_parse_auto_config()` build
Headphones and auto-mute.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Userspace-visible on boot of that laptop (codec probe). Original
report is plugging headphones. Unprivileged user can trigger the broken
behavior; the quirk itself is not a syscall attack surface.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same file already has `CXT_FIXUP_ACER_SWIFT_HP` (`{ 0x16,
0x0321403f }`) and Lenovo Slim 5 SN6140 pincfg. Realtek uses
`0x03211020` widely for HP Out. Pattern is established.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: **Yes.** Tree is `v6.12.111` (`pending-6.12`).
- Driver: `sound/pci/hda/patch_conexant.c`
- SN6140: `HDA_CODEC_ENTRY(0x14f11f87, "SN6140", patch_conexant_auto)`
and `is_cx11880_sn6140` for `0x14f11f87`
- No `CXT_FIXUP_HUAWEI_MATEBOOK_HP`, no `0x19e5` in this file
- Reporter’s kernel was **6.12.73** — this series
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: **Minor conflicts, not a rewrite.**
- Path: `sound/hda/codecs/conexant.c` → `sound/pci/hda/patch_conexant.c`
- Enum/fixup table context matches (`CXT_FIXUP_ACER_SWIFT_HP` is last)
- Quirk-table context: 6.12 still has `SND_PCI_QUIRK_VENDOR(0x17aa,
"Thinkpad", CXT_FIXUP_THINKPAD_ACPI)` vs mainline `Thinkpad/Ideapad` +
`CXT_FIXUP_LENOVO_XPAD_ACPI`. Insert still goes before
`SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", …)`.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: No Huawei Matebook Conexant pincfg. Acer Swift / IdeaPad Slim 5
/ MECHREVO are different SSIDs. Not a duplicate.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: `sound/pci/hda` Conexant codec. **IMPORTANT** (common laptop
audio), not core mm/VFS. User-visible breakage for that hardware.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Active enough that 6.12 already received several Conexant quirks
in 2026. Mature table; this is another row, not a redesign.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: Driver-specific / SSID-specific: Huawei machines with PCI or
codec SSID **19e5:3289** and SN6140. `snd_hda_pick_fixup()` matches PCI
SSID first, then codec SSID, so the GitHub codec SSID `0x19e53289` is
covered even on SOF (`ehdaudio0D0`).
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Every boot on that SKU; 100% repro in the bug report when
plugging 3.5mm headphones. Not a race. Unprivileged user hits it by
using the jack.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: Headphones not enumerated; speakers keep playing. Not an
oops/UAF. **MEDIUM** functional/hardware-enablement failure, the class
stable already takes as audio quirks. Privacy impact (cannot mute
speakers via jack) is real.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- Benefit: high for that SKU (headphones/auto-mute restored); reporter
was on 6.12.
- Risk: very low (≈9 lines, one SSID, existing `HDA_FIXUP_PINS`
machinery).
- Ratio: strongly favors backport.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real hardware bug with codec dump and 100% repro
- Reporter on **6.12.73**, this tree’s series
- Same pin value the user already verified via jack retask
- Textbook HDA pin quirk (stable exception)
- ~9 lines, no new API
- SN6140 + quirk tables already in 6.12
- Maintainer SOB (Takashi Iwai)
- Sibling Conexant pin quirks already in this branch
- Independent of series patches 1–3
AGAINST:
- Not a crash/security issue
- Path + one-line context need a trivial backport
- SSID-wide pin override could theoretically mis-configure another board
sharing `19e5:3289` (normal quirk caveat; no such report found)
UNRESOLVED:
- Full lore thread replies (`b4 mbox` failed to write the file); no NAK
found in the series mbox
- Stable list 403; no prior rejection found
- Exact Matebook marketing name beyond SSID `19e5:3289`
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — standard pincfg; user-
validated override; maintainer applied
2. Fixes a real bug that affects users? **PASS** — GitHub #10687, Debian
6.12
3. Important issue? **PASS** as hardware-enablement/quirk (headphones
dead; speakers stay on), not CRITICAL oops
4. Small and contained? **PASS** — 9 lines, one file
5. No new features or APIs? **PASS** — table entry only
6. Can apply to the local tree? **PASS** — content matches; remap path
to `patch_conexant.c`; fuzz the 17aa vendor line
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Hardware quirk/workaround** (HDA pin-config / PCI SSID quirk).
Also the “device ID / quirk table” class used constantly in stable
audio.
**Step 9.4: MAKE YOUR DECISION**
This belongs in this 6.12 tree. The Conexant SN6140 driver is here, the
BIOS bug is here, and the original report is this stable series.
Backport with the usual path adjustment.
Verification:
- [Phase 1] Tags: GitHub sof#10687, msgid 4/4, SOB Zhang Heng + Takashi
Iwai; no Fixes/Cc:stable
- [Phase 1] Body: BIOS pin 0x18 N/A → hp_outs=0; override 0x03211020
- [Phase 2] Diff: +9 lines, enum + `cxt_fixups` + `cxt5066_fixups`;
`HDA_FIXUP_PINS`
- [Phase 3] `git merge-base --is-ancestor ca348e7fe1ab9 HEAD` → SN6140
in tree (exit 0)
- [Phase 3] `git log` on `patch_conexant.c`: Acer Swift, IdeaPad Slim 5,
MECHREVO already backported
- [Phase 3] Series 1–3 are Realtek-only; 4/4 standalone
- [Phase 4] `b4 am` found 4-patch series; openwall/lkml copies of 4/4;
no NAK in series mbox
- [Phase 4] sof#10687: kernel 6.12.73, pin dump 0x40f001f0, working
override 0x03211020
- [Phase 4] lore.kernel.org WebFetch 403; `b4 dig -c` N/A (commit not in
this repo); `b4 mbox` traceback on output path
- [Phase 5] `patch_conexant_auto` default → `cxt5066_fixups`; PRE_PROBE
`snd_hda_apply_pincfgs`
- [Phase 5] `snd_hda_pick_fixup` matches PCI SSID then codec SSID
- [Phase 6] `git describe HEAD` → `p-6.12-3-g710455e2077bb`; Makefile
6.12.111; file `sound/pci/hda/patch_conexant.c`
- [Phase 6] No `0x19e5` / `CXT_FIXUP_HUAWEI` in local conexant driver
- [Phase 6] Enum last entry is `CXT_FIXUP_ACER_SWIFT_HP` (clean insert);
quirk insert before Lemote 0x1c06
- [Phase 8] Failure: missing Headphones + no auto-mute; severity MEDIUM;
SSID-scoped
- UNVERIFIED: complete lore reply set after maintainer apply; whether
any other SKU shares 19e5:3289 with a different pin 0x18 role
The patch is a small, SSID-scoped HDA pin quirk for a real headphone-
detection failure that was reproduced on 6.12. It matches stable’s
hardware-quirk exception and applies here with only a path remap.
**YES**
sound/hda/codecs/conexant.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sound/hda/codecs/conexant.c b/sound/hda/codecs/conexant.c
index 56d6fbdd9b06d..ef40f1cb1158e 100644
--- a/sound/hda/codecs/conexant.c
+++ b/sound/hda/codecs/conexant.c
@@ -298,6 +298,7 @@ enum {
CXT_PINCFG_TOP_SPEAKER,
CXT_FIXUP_HP_A_U,
CXT_FIXUP_ACER_SWIFT_HP,
+ CXT_FIXUP_HUAWEI_MATEBOOK_HP,
};
/* for hda_fixup_thinkpad_acpi() */
@@ -1043,6 +1044,13 @@ static const struct hda_fixup cxt_fixups[] = {
{ }
},
},
+ [CXT_FIXUP_HUAWEI_MATEBOOK_HP] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = (const struct hda_pintbl[]) {
+ { 0x18, 0x03211020 }, /* Headphone */
+ { }
+ },
+ },
};
static const struct hda_quirk cxt5045_fixups[] = {
@@ -1143,6 +1151,7 @@ static const struct hda_quirk cxt5066_fixups[] = {
SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo G50-70", CXT_FIXUP_STEREO_DMIC),
SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC),
SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad/Ideapad", CXT_FIXUP_LENOVO_XPAD_ACPI),
+ SND_PCI_QUIRK(0x19e5, 0x3289, "Huawei Matebook", CXT_FIXUP_HUAWEI_MATEBOOK_HP),
SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", CXT_PINCFG_LEMOTE_A1004),
SND_PCI_QUIRK(0x1c06, 0x2012, "Lemote A1205", CXT_PINCFG_LEMOTE_A1205),
SND_PCI_QUIRK(0x1d05, 0x3012, "MECHREVO Wujie 15X Pro", CXT_FIXUP_HEADSET_MIC),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add ALC235 support for headset mode
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (5 preceding siblings ...)
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18] ALSA: hda/conexant: Add pin config quirk for Huawei Matebook Sasha Levin
@ 2026-10-19 13:45 ` Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-5.10] ASoC: Intel: bytcr_rt5651: Add quirk for Chuwi Hi8 with generic DMI strings Sasha Levin
` (54 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:45 UTC (permalink / raw)
To: patches, stable
Cc: Zeyu Li, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Zeyu Li <13776528859@163.com>
[ Upstream commit 9ee4266827cfb67b9fbb89136ea6a8f3d7809f5c ]
The ALC235 (0x10ec0235) is registered as the ALC255 codec variant in
patch_alc269(), but the headset mode functions were missing a case
for it, so the CTIA/OMTP jack type detection and routing never ran
on this codec. As a result, a plugged-in headset is detected (jack
presence works) but the microphone signal is never routed, leaving
the capture stream permanently silent.
Verified on an ASUS M5451GA laptop (HDA:10ec0235,10431814): with the
ALC255 coef sequence applied, the headset microphone works correctly.
Signed-off-by: Zeyu Li <13776528859@163.com>
Link: https://patch.msgid.link/20260926140336.27896-1-13776528859@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
## Phase 1: Commit message forensics
**Step 1.1 — Subject**
Record: **[ALSA/hda/realtek] [Add] Add ALC235 support for headset mode**
The verb is “Add”, but the body is a missing-ID fix: ALC235 is already
treated as an ALC255 variant, and the headset-mode switches never
included it.
**Step 1.2 — Tags**
Record:
- **Fixes:** none (expected for this review)
- **Reported-by:** none
- **Tested-by:** none (author states hardware verification in the body)
- **Reviewed-by / Acked-by:** none on the commit
- **Link:**
https://patch.msgid.link/20260926140336.27896-1-13776528859@163.com
- **Cc: stable:** none (expected)
- **Signed-off-by:** Zeyu Li (author); Takashi Iwai (ALSA maintainer)
- Pipeline tags ignored: `[Upstream commit ...]`, `Signed-off-by: Sasha
Levin`
**Step 1.3 — Body**
Record:
- **Bug:** ALC235 (`0x10ec0235`) is classified as `ALC269_TYPE_ALC255`
in `patch_alc269()`, but the six headset-mode helpers omit that vendor
ID.
- **Symptom:** combo-jack presence works; headset capture stays silent
because CTIA/OMTP detection and mic routing never run.
- **Root cause:** `switch (codec->core.vendor_id)` falls through with no
match, so `alc_process_coef_fw(codec, coef0255)` is never applied.
- **Verification:** ASUS M5451GA (`HDA:10ec0235,10431814`); ALC255 coef
sequence restores headset mic.
- **Version info:** none in the message. Codec ID has been in-tree since
2014.
**Step 1.4 — Hidden bug fix?**
Record: Not hidden. This is a hardware-routing bug written as “Add
support”. It does not add a driver or API; it fills in a missing vendor-
ID case in existing tables.
## Phase 2: Diff analysis
**Step 2.1 — Inventory**
Record:
- **File:** `sound/hda/codecs/realtek/realtek.c` — **+6 / −0**
- **Functions:** `alc_headset_mode_unplugged`,
`alc_headset_mode_mic_in`, `alc_headset_mode_default`,
`alc_headset_mode_ctia`, `alc_headset_mode_omtp`,
`alc_determine_headset_type`
- **Scope:** single-file, surgical. One `case 0x10ec0235:` added
immediately above each existing `case 0x10ec0255:`.
**Step 2.2 — Flow change**
Record: Before, those switches did nothing for vendor `0x10ec0235`.
After, ALC235 uses the same ALC255 coefficient firmware already used for
`0x10ec0255` (unplug, mic-in, default headphone, CTIA, OMTP, and type-
detect).
Author-reported working values `COEF 0x45=0xd489`, `0x1b=0x0c2b` match
`alc_headset_mode_ctia()`’s `coef0255` exactly.
**Step 2.3 — Bug mechanism**
Record: **Hardware workaround / missing codec ID** in existing headset-
mode tables. Without the case, jack detect still works via generic HP
automute, but combo-jack mic routing never happens.
**Step 2.4 — Fix quality**
Record: Minimal and obviously correct given that `patch_alc269()`
already maps ALC235 → ALC255. Regression risk is low: the new cases only
run when headset-mode hooks are installed (`alc_fixup_headset_mode` /
`alc_probe_headset_mode`). Realtek confirmed compatibility (Phase 4).
Residual incompleteness: `alc255_set_default_jack_type()` still has only
`0x10ec0255`; the author still got a working headset mic without that
extra case.
## Phase 3: Git history
**Step 3.1 — Blame**
Record:
- Headset-mode switches (minus the new case) come from the 6.16-era
Realtek split `aeeb85f26c3bb` (2025-07-11), itself a move of older
`patch_realtek.c` logic.
- ALC235 vendor ID added in `92f974df34601` (2014-06-06, Kailang Yang):
“New vendor ID for ALC233 … compatible with ALC255. It is use for
Lenovo.”
- Variant assignment added in `ea04a1dbf8b1d` (2018-04-25, Kailang Yang,
already sent to stable). Maintainer note then: *“the chip is 10ec:0235
bonding for ALC233b, which is equivalent with ALC255. It's only used
for Lenovo. The chip needs no alc_process_coef_fw() for headset unlike
ALC255.”*
That 2018 note is why the ID was classified as ALC255 but
**intentionally omitted** from headset coef switches. The 2026 report is
an ASUS machine, not Lenovo, and Realtek later said the ALC255 sequence
is compatible.
**Step 3.2 — Fixes tag**
Record: No `Fixes:` tag. The incomplete classification dates to
`ea04a1dbf8b1d` (2018), which is in this tree.
**Step 3.3 — File history**
Record: Recent `realtek.c` / `alc269.c` history is the usual stream of
laptop quirks. No prerequisite refactor is required. Not a `patch X/Y`
series.
**Step 3.4 — Author**
Record: Zeyu Li has no other Realtek commits in this tree. This is a
user-reported hardware fix reviewed by the ALSA maintainer and a Realtek
engineer, not a maintainer-authored cleanup.
**Step 3.5 — Dependencies**
Record: Standalone. It only adds a `case` next to an existing
`0x10ec0255` arm. Those functions and `coef0255` already exist here. No
new helpers.
## Phase 4: Mailing list / external research
**Step 4.1 — Original discussion**
Record:
- Lore/msgid:
https://patch.msgid.link/20260926140336.27896-1-13776528859@163.com
- `b4 dig -c 9ee4266827cfb67b9fbb89136ea6a8f3d7809f5c` matched that
thread.
- Revisions: same patch sent twice (lkml + linux-sound). No v2/v3 code
change.
- Takashi Iwai (28 Sep 2026): *“I'm not sure whether it's 100% safe…
Kailang, could you check it? Can ALC235 be fully compatible in this
manner?”*
- Author follow-up: jack sense and VREF were already correct; capture
stayed silent until ALC255 CTIA coefs were applied.
- **Kailang Yang, Realtek (1 Oct 2026): “Yes, it's compatible.”**
- Takashi then applied the patch. No NAK.
**Step 4.2 — Recipients (`b4 dig -w`)**
Record: Zeyu Li; linux-sound; Takashi Iwai; Jaroslav Kysela. Realtek
(Kailang) was added during review.
**Step 4.3 — Bug report**
Record: Reporter is the author, on a specific ASUS laptop. One machine,
but a concrete silent-mic failure with before/after coefs. No
syzbot/bugzilla.
**Step 4.4 — Series**
Record: Standalone single patch. No sibling commits required.
**Step 4.5 — Stable list**
Record: **UNVERIFIED** — lore.kernel.org/stable returned HTTP 403. No
other evidence it was rejected for stable.
## Phase 5: Code semantic analysis
**Step 5.1 — Functions**
Record: the six headset-mode helpers listed in 2.1. They are called only
from `alc_update_headset_mode()`.
**Step 5.2 — Callers**
Record:
- `alc_update_headset_mode()` ← `alc_update_headset_mode_hook` (capture
mux), `alc_update_headset_jack_cb` (HP jack), `alc_fixup_headset_mode`
INIT, `alc_probe_headset_mode` (installs the hooks).
- Those hooks are installed only when a headset-mode fixup is active
(`ALC255_FIXUP_HEADSET_MODE`, `model=alc255-asus`, etc.).
- This tree has **no** PCI/pin quirk for ASUS `1043:1814`. Existing
ALC235 pin quirks are Lenovo-only and do **not** enable headset mode.
The author’s box therefore needed a headset-mode fixup or `model=` to
hit this path. The commit still fixes every ALC235 device that already
uses that path.
**Step 5.3 — Callees**
Record: `alc_process_coef_fw`, `alc_write_coef_idx`,
`alc_read_coef_idx`, `snd_hda_set_pin_ctl_cache`. Codec coefficient
writes plus pin VREF. No locking/alloc/API changes.
**Step 5.4 — Reachability**
Record: Userspace-reachable: plug a headset and select the headset-mic
input on a machine whose quirk/model enables headset mode. Unprivileged
audio use; not a syscall crash path.
**Step 5.5 — Similar patterns**
Record: Same table already groups sibling IDs
(`0x10ec0230`/`0236`/`0256`, `0x10ec0234`/`0274`/`0294`). Adding `0235`
next to `0255` matches that pattern. The only remaining
`0x10ec0255`-only switch is `alc255_set_default_jack_type()` in
`alc269.c`.
## Phase 6: This tree (6.18.y)
**Step 6.1 — Does the bug exist here?**
Record: **Yes.** Local tree is **6.18.57** (`git describe`:
`v6.18.57-155-gcdf239ca885b2`; Makefile `VERSION=6 PATCHLEVEL=18
SUBLEVEL=57`).
Without this change (parent of the candidate):
- `patch_alc269()` already has `case 0x10ec0235:` → `ALC269_TYPE_ALC255`
- Headset-mode switches have only `case 0x10ec0255:`
- File path is already `sound/hda/codecs/realtek/realtek.c` (split
commit is an ancestor)
The codec has been present since 2014; the ALC255 classification since
2018. This is not post-6.18 hardware enablement of a new driver.
**Step 6.2 — Backport difficulty**
Record: **Clean apply.** Same file, same six switches, same neighboring
`0x10ec0255` cases. No structural conflict.
**Step 6.3 — Related fixes already here?**
Record: No other ALC235 headset-mode fix. No follow-up on `realtek.c`
after this candidate that would supersede it.
## Phase 7: Subsystem context
**Step 7.1**
Record: **ALSA HD-audio / Realtek codec.** Criticality: **IMPORTANT**
(common laptop audio), not core mm/VFS. Realtek HDA is the default codec
path on a large fraction of x86 laptops.
**Step 7.2**
Record: Very active (many recent laptop quirks). That is normal for this
file and is why codec-ID / quirk additions are routinely taken into
stable.
## Phase 8: Impact and risk
**Step 8.1 — Who is affected**
Record: Users of Realtek ALC235 (`CONFIG_SND_HDA_CODEC_REALTEK`) whose
machine enables headset mode (quirk or `model=`). Confirmed hardware:
ASUS M5451GA. Older Lenovo ALC235 boxes use other pin quirks and do not
enter these switches.
**Step 8.2 — Trigger**
Record: Plug a CTIA/OMTP headset and use the headset mic. Common laptop
action. Unprivileged.
**Step 8.3 — Failure mode**
Record: Headset playback/jack detect works; **headset microphone capture
is permanently silent**. Severity: **HIGH** for affected laptops (broken
input device), not a panic/UAF. This is the standard “audio hardware
quirk” class.
**Step 8.4 — Risk vs benefit**
Record:
- **Benefit:** restores headset mic on ALC235 machines that already go
through headset mode; Realtek-confirmed; hardware-tested.
- **Risk:** very low (6 fallthrough cases, existing coef table).
Theoretical risk to old Lenovo ALC233b bonding is mitigated by (a)
those quirks not enabling headset mode, and (b) Kailang’s 2026
“compatible” ack.
- **Ratio:** favorable.
## Phase 9: Synthesis
**Step 9.1 — Evidence**
For:
- Real user-visible bug (silent headset mic) on identified hardware
- 6-line vendor-ID addition to an existing driver table (hardware-quirk
exception)
- Codec already present and classified as ALC255 in this 6.18 tree
- Applies cleanly; no new API; standalone
- Tested by the author; ALSA maintainer applied it after Realtek
confirmation
- Same pattern as other Realtek headset vendor-ID additions that stable
accepts
Against:
- Subject reads like a feature (“Add support”)
- 2018 Realtek note said this bonding originally needed **no** headset
`alc_process_coef_fw()` (Lenovo-only)
- No machine-specific quirk for `1043:1814` in this tree, so the ASUS
laptop may still need `model=alc255-asus` (or a later quirk) for the
new cases to run
- `alc255_set_default_jack_type()` still omits ALC235
Unresolved:
- Stable-list discussion (lore 403)
The “against” items do not outweigh the fix. The 2018 note is superseded
by the same Realtek engineer in 2026. Missing `model=`/quirk is a
separate enablement issue; this commit is still the required routing fix
once headset mode is on. Incomplete default-jack-type setup did not
prevent the reported fix from working.
**Step 9.2 — Stable rules**
1. Obviously correct and tested? **PASS** — fallthrough onto the
existing ALC255 path; hardware + Realtek + maintainer.
2. Real bug affecting users? **PASS** — silent headset capture.
3. Important? **PASS** — broken headset mic on laptop HDA; hardware-
quirk class.
4. Small and contained? **PASS** — +6 lines, one file.
5. No new features/APIs? **PASS** — missing ID in existing tables, not a
new driver.
6. Applies to this 6.18 tree? **PASS** — same file and switches.
**Step 9.3 — Exception**
Record: **Hardware quirk / missing codec ID** in an existing Realtek HDA
driver. This is an allowed stable exception.
**Step 9.4 — Decision**
This tree is 6.18.y. The buggy omission exists here. The patch is the
standard Realtek headset-ID fix, confirmed by Realtek, and is
appropriate for this stable tree.
## What this means for 6.18 users
ALC235 has been registered for years and is already treated as ALC255,
but the headset-mode coefficient path never ran. On machines that use
that path, a plugged headset is detected and the mic stays silent.
Adding `0x10ec0235` beside `0x10ec0255` is a 6-line, already-tested
hardware quirk with no API change and a clean apply on this tree.
## Verification
- [Phase 1] Parsed tags: Link to msgid `20260926140336.27896-1`; SOBs
Zeyu Li + Takashi Iwai; no Fixes/Reported-by/Cc-stable
- [Phase 2] Diff: +6 `case 0x10ec0235:` lines in six headset-mode
functions in `sound/hda/codecs/realtek/realtek.c`
- [Phase 2] `coef0255` in `alc_headset_mode_ctia()` is `WRITE_COEF(0x45,
0xd489)` + `WRITE_COEF(0x1b, 0x0c2b)`, matching the author’s test
- [Phase 3] `git describe HEAD` / `make kernelversion`: **6.18.57**
- [Phase 3] `git show 92f974df34601`: ALC235 ID added 2014 as
ALC233/ALC255-compatible
- [Phase 3] `git show ea04a1dbf8b1d`: 2018 variant assignment + note
that headset coefs were then thought unnecessary
- [Phase 3] Parent of candidate: headset switches have `0x10ec0255`
only; `patch_alc269()` already has `0x10ec0235` → `ALC269_TYPE_ALC255`
- [Phase 3] `git log --author="Zeyu Li"`: only this commit in-tree
- [Phase 4] `b4 dig -c 9ee4266827cfb…`: thread at
patch.msgid.link/20260926140336.27896-1
- [Phase 4] `b4 dig -a`: same patch, no later revision
- [Phase 4] `b4 dig -w`: linux-sound, Takashi Iwai, Jaroslav Kysela
- [Phase 4] mbox: Takashi asked Realtek; Kailang: “Yes, it's
compatible.”; Takashi applied
- [Phase 5] Callers of the six functions are only
`alc_update_headset_mode()`; that is wired only by headset-mode fixups
- [Phase 5] No `1043:1814` / M5451 quirk in `alc269.c`; ASUS pin quirks
match `0x10ec0255` only
- [Phase 6] File and buggy switches exist in this 6.18 checkout; Realtek
split `aeeb85f26c3bb` is an ancestor
- [Phase 6] Expected apply: clean
- [Phase 8] Failure mode: silent headset mic, severity HIGH for affected
laptops
- UNVERIFIED: lore.kernel.org/stable search (HTTP 403)
The patch is a small, tested hardware-quirk fix for a real silent-mic
bug that exists in this 6.18 tree.
**YES**
sound/hda/codecs/realtek/realtek.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sound/hda/codecs/realtek/realtek.c b/sound/hda/codecs/realtek/realtek.c
index ca377a5adadb5..a1529650950d8 100644
--- a/sound/hda/codecs/realtek/realtek.c
+++ b/sound/hda/codecs/realtek/realtek.c
@@ -1305,6 +1305,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
}
switch (codec->core.vendor_id) {
+ case 0x10ec0235:
case 0x10ec0255:
alc_process_coef_fw(codec, coef0255);
break;
@@ -1420,6 +1421,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
};
switch (codec->core.vendor_id) {
+ case 0x10ec0235:
case 0x10ec0255:
alc_write_coef_idx(codec, 0x45, 0xc489);
snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
@@ -1575,6 +1577,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
alc_process_coef_fw(codec, coef0225);
alc_hp_enable_unmute(codec, 75);
break;
+ case 0x10ec0235:
case 0x10ec0255:
alc_process_coef_fw(codec, coef0255);
break;
@@ -1676,6 +1679,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
};
switch (codec->core.vendor_id) {
+ case 0x10ec0235:
case 0x10ec0255:
alc_process_coef_fw(codec, coef0255);
break;
@@ -1793,6 +1797,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
};
switch (codec->core.vendor_id) {
+ case 0x10ec0235:
case 0x10ec0255:
alc_process_coef_fw(codec, coef0255);
break;
@@ -1894,6 +1899,7 @@ static void alc_determine_headset_type(struct hda_codec *codec)
}
switch (codec->core.vendor_id) {
+ case 0x10ec0235:
case 0x10ec0255:
alc_process_coef_fw(codec, coef0255);
msleep(300);
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.10] ASoC: Intel: bytcr_rt5651: Add quirk for Chuwi Hi8 with generic DMI strings
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (6 preceding siblings ...)
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add ALC235 support for headset mode Sasha Levin
@ 2026-10-19 13:45 ` Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-6.12] soundwire: intel_auxdevice: Add cs42l44 to wake_capable_list Sasha Levin
` (53 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:45 UTC (permalink / raw)
To: patches, stable
Cc: Jasper Firth, Mark Brown, Sasha Levin, cezary.rojewski,
liam.r.girdwood, peter.ujfalusi, yung-chuan.liao, kai.vehmanen,
perex, tiwai, linux-sound, linux-kernel
From: Jasper Firth <jasper.m.f@hotmail.com>
[ Upstream commit c5a8fc2abe05cf6db71f57ff0177fddc59861a1a ]
Some Chuwi Hi8 tablets with model number CWI513 ship with a BIOS
(American Megatrends 5.11, dated 05/21/2016) whose DMI sys_vendor and
product_name are both "Default string". The tested unit is labelled
just "Hi8", but its model number is the same as the existing "Chuwi Hi8
Pro (CWI513)" entry, and it needs the same quirks. That entry matches on
sys_vendor "Hampoo" and product_name "X1D3_C806N", so it never applies
to these units.
Without its quirks the internal speaker, whose amplifier has a
differential input wired across LOUT left and right, cancels to a faint
distorted residual for any centred (L == R) content, and the headphone
channels are swapped.
Add an entry matching board_vendor "Hampoo" and board_name "Cherry Trail
CR", plus the BIOS date since those two are too generic on their own.
drivers/platform/x86/touchscreen_dmi.c already matches the Chuwi HiBook
the same way.
The quirks are those of the existing Hi8 Pro entry, except for the
over-current detection scale factor: 1.0 instead of the 0.75 from
BYT_RT5651_DEFAULT_QUIRKS. With 0.75 and a CTIA headset (inline mic and
one button), loud speech into the mic, and headphone playback coupling
onto the mic line, were reported as spurious KEY_PLAYPAUSE presses, one
of them held for a whole 8 second speech window. With 1.0 the same test
gave no spurious events, and 3 real button presses were reported as
exactly 3 press/release pairs.
Tested on a unit with the generic DMI strings, with a module built from
this patch and no quirk module parameter. The quirks were applied via
the new entry, the card components read "cfg-spk:1 cfg-mic:in2
cfg-hp:lrswap", and the following all work: speaker, headphone left/right
order, jack and headset-mic detection, headset button, and the internal
and headset mics.
The problem was diagnosed with the help of an AI coding assistant, which
also drafted this changelog.
Assisted-by: Claude Opus 5.5
Signed-off-by: Jasper Firth <jasper.m.f@hotmail.com>
Link: https://patch.msgid.link/20260925-hi8-quirk-v1-1-ffd00b0447f9@hotmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
I have enough to decide: this is a DMI hardware quirk for a tablet whose
audio is already broken without it, and the surrounding driver code is
present in this 6.18 tree.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: [ASoC/Intel/bytcr_rt5651] [Add] [DMI quirk so Chuwi Hi8 units
with generic BIOS strings get the existing audio workarounds]
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- Assisted-by: Claude Opus 5.5
- Signed-off-by: Jasper Firth \<jasper.m.f@hotmail.com\> (author)
- Link: https://patch.msgid.link/20260925-hi8-quirk-v1-1-
ffd00b0447f9@hotmail.com
- Signed-off-by: Mark Brown \<broonie@kernel.org\> (ASoC maintainer)
- No Fixes: tag (expected)
- No Reported-by / Tested-by / Reviewed-by / Acked-by
- No Cc: stable@vger.kernel.org (expected; not a negative)
- Ignore pipeline-added "[Upstream commit ...]" and Sasha Levin SOB
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- Bug: Some Chuwi Hi8 CWI513 tablets ship AMI BIOS 5.11 dated 05/21/2016
with DMI sys_vendor and product_name both "Default string". The
existing "Chuwi Hi8 Pro (CWI513)" entry matches sys_vendor "Hampoo" +
product_name "X1D3_C806N" and never applies.
- Symptom: internal speaker (differential amp across LOUT L/R) cancels
to a faint distorted residual for centred (L==R) content; headphone
L/R swapped. With default OVCD scale 0.75, loud speech into a CTIA
headset mic produced spurious KEY_PLAYPAUSE events (one held for an 8s
window).
- Root cause: missing DMI match, so DEFAULT_QUIRKS (stereo path, SF
0.75) are used on hardware that needs mono-speaker mix, HP swap, and
OVCD SF 1.0.
- Version info: hardware/BIOS from 2016; no kernel-version restriction
stated.
- Author tested on a real unit without the quirk module parameter; card
components became "cfg-spk:1 cfg-mic:in2 cfg-hp:lrswap"; speaker, HP
order, jack/headset-mic, button, and both mics worked.
Step 1.4: DETECT HIDDEN BUG FIXES
Record: Not a disguised cleanup. It is an explicit hardware-quirk
addition. The "add" verb here is the standard form for DMI/quirk table
entries that fix broken hardware, not a new feature.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- Files: sound/soc/intel/boards/bytcr_rt5651.c only (+17 / -0)
- Functions: none modified; one new `dmi_system_id` entry in
`byt_rt5651_quirk_table[]`
- Scope: single-file surgical table addition
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record:
- Before: `dmi_check_system(byt_rt5651_quirk_table)` in
`snd_byt_rt5651_mc_probe()` never matches these units, so
`byt_rt5651_quirk` stays `BYT_RT5651_DEFAULT_QUIRKS |
BYT_RT5651_IN2_MAP`.
- After: units with board_vendor "Hampoo", board_name "Cherry Trail CR",
and BIOS date "05/21/2016" set:
MCLK_EN | JD1_1 | OVCD_TH_2000UA | OVCD_SF_1P0 | IN2_MAP |
HP_LR_SWAPPED | MONO_SPEAKER
- That is the existing Hi8 Pro quirk set with OVCD scale 1.0 instead of
DEFAULT_QUIRKS' 0.75.
- Path: machine-driver probe / initialization only. Callback
`byt_rt5651_quirk_cb` still just stores `driver_data` and returns 1.
Step 2.3: IDENTIFY THE BUG MECHANISM
Record:
- Category: (h) hardware workaround / DMI quirk table entry
- Mechanism: without MONO_SPEAKER the stereo DAC feeds a differential
mono amp and centred audio cancels (this is the same failure Hans de
Goede documented in `a0d1d867c262f`, "Add mono speaker quirk").
Without HP_LR_SWAPPED, headphone channels are reversed. OVCD_SF_1P0
raises the headset-button over-current scale so coupled mic audio is
not reported as KEY_PLAYPAUSE.
Step 2.4: ASSESS THE FIX QUALITY
Record:
- Obviously correct: additive table entry using the same callback and
flag bits already used by the Hi8 Pro / Vi8 Plus entries.
- Match is deliberately narrowed with BIOS date after the author noted
board_vendor+board_name are too generic; same comment/pattern as Chuwi
HiBook in `drivers/platform/x86/touchscreen_dmi.c`.
- `dmi_check_system()` stops on first callback returning non-zero.
Existing Hi8 Pro entry is earlier in the table, so units with proper
"Hampoo"/"X1D3_C806N" strings keep the old flags.
- Residual risk: another Hampoo "Cherry Trail CR" board with BIOS date
05/21/2016 and the RT5651 machine driver could get mono/HP-swap
incorrectly. BIOS date plus first-match-wins makes that small. No
locking/API/data-structure changes.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record:
- Quirk table exists since Pierre-Louis Bossart, 2016
(`2bd5bd15a51858`).
- Existing "Chuwi Hi8 Pro (CWI513)" match (Hampoo / X1D3_C806N) from
Hans de Goede, 2018 (`55d69c0309acea` / `8f250e7009d71`).
- MONO_SPEAKER + HP_LR_SWAPPED on that entry from 2018
(`a0d1d867c262f4`).
- The buggy situation is long-standing: these generic-DMI units have
never matched. Introduced with the 2016 BIOS, not by a recent kernel
change.
Step 3.2: FOLLOW THE FIXES: TAG
Record: No Fixes: tag. Not applicable. The "bug" is missing DMI
coverage, not a regression from a tagged commit.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record:
- Recent file history is unrelated (DAPM idle_bias, invalid quirk
mapping, DPCM flags, remove() conversion).
- Original Hi8 Pro/Vi8 Plus DMI entries and all flag macros are already
in this tree.
- Standalone; not patch X/Y.
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record: Only this commit by Jasper Firth under
`sound/soc/intel/boards/`. Not a subsystem maintainer. Hans de Goede
(historical author of these Chuwi entries) and Intel ASoC maintainers
were on the original To/Cc. Mark Brown applied it the same day.
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record: No extra commits needed. `BYT_RT5651_MCLK_EN`, `JD1_1`,
`OVCD_TH_2000UA`, `OVCD_SF_1P0`, `IN2_MAP`, `HP_LR_SWAPPED`,
`MONO_SPEAKER`, `byt_rt5651_quirk_cb`, and
`dmi_check_system(byt_rt5651_quirk_table)` all exist in v6.18.57. Can
apply standalone.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- b4 dig -c c5a8fc2abe05cf6db71f57ff0177fddc59861a1a matched https://pat
ch.msgid.link/20260925-hi8-quirk-v1-1-ffd00b0447f9@hotmail.com
- b4 dig -a: v1 only (2026-09-25)
- Thread has two messages: submission and Mark Brown "Applied to
broonie/sound.git for-7.3"
- No NAKs, no requested revisions, no reviewer Cc: stable
- Author note (not in the final commit body): left the existing Hi8 Pro
entry unchanged because they do not have an X1D3_C806N unit; that
model may still see OVCD_SF_0P75 spurious buttons. This patch does not
change that entry.
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record (b4 dig -w): linux-sound, linux-kernel, Mark Brown, Takashi Iwai,
Jaroslav Kysela, Hans de Goede, Pierre-Louis Bossart, Liam Girdwood,
Cezary Rojewski, Bard Liao, Kai Vehmanen, Peter Ujfalusi. Subsystem
maintainer applied it. No extra Reviewed-by.
Step 4.3: SEARCH FOR THE BUG REPORT
Record: No syzbot/bugzilla link. Evidence is the author's hardware test
in the changelog (speaker cancellation, swapped HP, spurious
KEY_PLAYPAUSE, and post-fix verification).
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Single standalone patch, change-id
20260925-hi8-quirk-00ca3a49b32f. No series dependencies.
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: Web search of lore.kernel.org/stable for this subject/file found
no discussion of this quirk. Nobody requested or rejected it for stable
in a thread I could verify.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: No function bodies changed. Data consumed by
`byt_rt5651_quirk_cb()` and `snd_byt_rt5651_mc_probe()`.
Step 5.2: TRACE CALLERS
Record:
- `byt_rt5651_quirk_cb` is only used as `.callback` in this DMI table.
- `dmi_check_system(byt_rt5651_quirk_table)` is called once from
`snd_byt_rt5651_mc_probe()` (line 1024).
- That probe is the platform driver `bytcr_rt5651`
(`MODULE_ALIAS("platform:bytcr_rt5651")`).
- Context: device probe, not IRQ/hot path. Userspace cannot call it
directly; it runs when this Bay Trail / Cherry Trail RT5651 machine
driver binds.
Step 5.3: TRACE CALLEES
Record: Callback only assigns `byt_rt5651_quirk`. Probe later uses those
bits for codec device properties, card `components` (`cfg-spk:1`, `cfg-
hp:lrswap`), long_name, and jack OVCD settings. No new allocations or
locks.
Step 5.4: FOLLOW THE CALL CHAIN
Record: ACPI/platform match → `snd_byt_rt5651_mc_probe` →
`dmi_check_system` → quirk flags → ALSA card registration / UCM profile
selection. Reachable on this tablet at every boot if
`CONFIG_SND_SOC_INTEL_BYTCR_RT5651_MACH` is enabled (recommended in
Kconfig for such devices). Not a syscall-triggered crash path.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Same Hampoo + "Cherry Trail CR" + BIOS-date pattern already used
for Chuwi HiBook in `touchscreen_dmi.c` (BIOS date 05/07/2016, different
from 05/21/2016). Sibling Hi8 Pro / Vi8 Plus audio entries already exist
in this same table. VIOS LTH17 already uses `BYT_RT5651_OVCD_SF_1P0`.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record:
- Local tree: `git describe HEAD` = v6.18.57-155-gcdf239ca885b2; `make
kernelversion` = 6.18.57.
- File and quirk table exist at v6.18.57. Existing Hi8 Pro entry is
present; generic-DMI units still miss it.
- Bug is missing coverage, present for as long as this driver has been
used on these 2016 tablets.
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record: Against v6.18.57 the hunk applied with a 1-line offset (`Hunk #1
succeeded at 409`). Context around the Hi8 Pro entry is identical.
Expected difficulty: clean apply / trivial offset. All flag macros exist
unchanged.
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: `git log v6.18..v6.18.57 --
sound/soc/intel/boards/bytcr_rt5651.c` is empty; 6.18.y has not already
taken a different fix for this. No "generic DMI" match exists without
this entry. Existing Hi8 Pro match does not cover "Default string"
vendor/product.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: [sound/soc/intel/boards – Intel Baytrail/Cherry Trail ASoC
machine driver] [PERIPHERAL / driver-specific, but a supported in-tree
board driver, not staging]
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: Mature. Quirk table dates to 2016–2018; recent commits are small
maintenance. This is a late hardware-coverage add, not a rewrite of new
code.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: Driver-specific / DMI-specific. Only Chuwi Hi8 CWI513-class
units with board_vendor Hampoo, board_name "Cherry Trail CR", BIOS date
05/21/2016, using this RT5651 machine driver. Other users are unchanged
unless they share that exact triple (unverified but constrained).
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: Every probe/boot on matching hardware. No race. Unprivileged
users do not trigger a kernel bug; they just get broken audio / spurious
KEY_PLAYPAUSE until the quirk is applied.
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record:
- Failure: internal speaker effectively unusable for typical centred
content; swapped headphones; false headset-button events.
- Severity: MEDIUM for the affected device (real functional break, not a
panic). Not CRITICAL in the crash/corruption sense, but it is the
class of hardware-quirk issue stable trees routinely take.
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record:
- Benefit: high for owners of this tablet (speaker/headphones/jack
actually work); zero for everyone else if the DMI triple is unique.
- Risk: very low — 17-line table add, existing flags, probe-time only,
first-match preserves the older Hi8 Pro entry.
- Ratio: favorable.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR:
- Real hardware bug: differential mono speaker cancellation, swapped HP,
spurious KEY_PLAYPAUSE
- Author tested on the affected unit; quirks applied without module-
parameter override
- Textbook stable exception: DMI/hardware quirk on an existing driver
- Small (+17), contained, no new API
- All consumed flags and the table hook exist in this 6.18.57 tree
- Applies with a trivial offset
- Same matching strategy already used for Chuwi HiBook
- ASoC maintainer applied v1 the same day; Intel ASoC and Hans de Goede
were CC'd
- Existing more-specific Hi8 Pro entry remains first and still wins for
X1D3_C806N units
AGAINST:
- Niche 2016 tablet, one reporter/tester
- Not a crash, security hole, or data-corruption bug
- Theoretical false match on another Hampoo Cherry Trail CR board with
the same BIOS date
- No Fixes:/Cc: stable; Mark Brown queued it for the 7.3 merge window
rather than as an urgent fix
UNRESOLVED:
- Could not fetch lore.kernel.org HTML (403); thread reconstructed via
b4 dig + Patchew + LKML archive
- Could not prove no other product shares Hampoo + "Cherry Trail CR" +
BIOS 05/21/2016
- No stable-list thread found
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? PASS — additive DMI entry, author
hardware test, maintainer applied
2. Fixes a real bug that affects users? PASS — broken speaker/HP/jack on
a shipping tablet
3. Important issue? PASS under the hardware-quirk exception (device
unusable audio, not a panic)
4. Small and contained? PASS — +17 lines, one table entry
5. No new features or APIs? PASS — existing quirk flags only
6. Can apply to the local tree? PASS — driver + flags present; hunk
applies to v6.18.57
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: Hardware quirk / DMI workaround on an existing driver. This is
an allowed stable exception.
Step 9.4: MAKE YOUR DECISION
This is a small, tested DMI quirk that makes existing Chuwi Hi8 hardware
work on this 6.18 tree. Benefit is real for those units; regression
surface is limited to an already-narrow DMI triple. It should be
backported.
Verification:
- [Phase 1] Parsed subject/tags/body from `git show 80c7d7ab1fe03` /
upstream `c5a8fc2abe05`; no Fixes:/syzbot/Cc: stable; Link to msgid
- [Phase 2] Diff is +17 lines in `byt_rt5651_quirk_table[]` only;
compared flags to `BYT_RT5651_DEFAULT_QUIRKS` (diff is OVCD_SF_1P0 vs
0.75)
- [Phase 2] Confirmed `dmi_check_system()` stops when callback returns
non-zero (`drivers/firmware/dmi_scan.c`)
- [Phase 3] `git blame -L 399,423 v6.18.57 --
sound/soc/intel/boards/bytcr_rt5651.c`: Hi8 Pro entry from 2018 Hans
de Goede
- [Phase 3] `git show a0d1d867c262f`: MONO_SPEAKER exists because stereo
mix on a mono amp garbles centred audio
- [Phase 3] `git log --oneline --author='Jasper Firth' --
sound/soc/intel/boards/`: only this commit
- [Phase 3] Flag macros present in `git show
v6.18.57:sound/soc/intel/boards/bytcr_rt5651.c`
- [Phase 4] `b4 dig -c c5a8fc2abe05...` → lore msgid; `-a` v1 only; `-w`
ASoC/Intel/Hans de Goede CCs; `-m` two-message thread, Mark Brown
applied, no NAK
- [Phase 4] Patchew and LKML copies of the patch and apply mail
- [Phase 4] Stable-list search did not find this subject
- [Phase 5] `dmi_check_system` call at line 1024 of
`snd_byt_rt5651_mc_probe`; platform driver `bytcr_rt5651`
- [Phase 5] HiBook analog in `touchscreen_dmi.c` lines 1197–1204 (Hampoo
+ Cherry Trail CR + BIOS date)
- [Phase 6] `git describe HEAD` v6.18.57-155-gcdf239ca885b2; `make
kernelversion` 6.18.57
- [Phase 6] `git show v6.18.57:...` has Hi8 Pro then Vi8 Plus; patch
dry-run succeeded at line 409 (offset -1)
- [Phase 6] `git log v6.18..v6.18.57 --
sound/soc/intel/boards/bytcr_rt5651.c` empty — no prior alternate fix
- [Phase 8] Failure mode from commit text + MONO_SPEAKER history: broken
speaker/HP/button, not oops
- UNVERIFIED: uniqueness of the DMI triple across all Hampoo Cherry
Trail products; lore.kernel.org HTML (403)
**YES**
sound/soc/intel/boards/bytcr_rt5651.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index ca540a66f22ce..723acb58e248e 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -409,6 +409,23 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
BYT_RT5651_HP_LR_SWAPPED |
BYT_RT5651_MONO_SPEAKER),
},
+ {
+ /* Chuwi Hi8 (CWI513) with a BIOS using generic DMI strings */
+ .callback = byt_rt5651_quirk_cb,
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
+ DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
+ /* Above matches are too generic, add bios-date match */
+ DMI_MATCH(DMI_BIOS_DATE, "05/21/2016"),
+ },
+ .driver_data = (void *)(BYT_RT5651_MCLK_EN |
+ BYT_RT5651_JD1_1 |
+ BYT_RT5651_OVCD_TH_2000UA |
+ BYT_RT5651_OVCD_SF_1P0 |
+ BYT_RT5651_IN2_MAP |
+ BYT_RT5651_HP_LR_SWAPPED |
+ BYT_RT5651_MONO_SPEAKER),
+ },
{
/* Chuwi Vi8 Plus (CWI519) */
.callback = byt_rt5651_quirk_cb,
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.12] soundwire: intel_auxdevice: Add cs42l44 to wake_capable_list
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (7 preceding siblings ...)
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-5.10] ASoC: Intel: bytcr_rt5651: Add quirk for Chuwi Hi8 with generic DMI strings Sasha Levin
@ 2026-10-19 13:45 ` Sasha Levin
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-6.12] ASoC: SOF: Intel: mtl: Power down DSP if it is left enabled in pre_fw_run() Sasha Levin
` (52 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:45 UTC (permalink / raw)
To: patches, stable
Cc: Charles Keepax, Vinod Koul, Sasha Levin, yung-chuan.liao,
linux-sound, linux-kernel
From: Charles Keepax <ckeepax@opensource.cirrus.com>
[ Upstream commit d08e4d9197396ceb906715d976b63aed0c5cc8e5 ]
Add cs42l44 to the wake_capable_list because it can generate
jack events whilst the bus is stopped.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260708122948.1502227-1-ckeepax@opensource.cirrus.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
I have enough to judge this: it is a one-line Intel SoundWire wake quirk
for CS42L44, which this 7.3-rc4 tree already contains.
## Local tree
- `git describe HEAD`: `v7.3-rc4-27-gf0100363d8c37`
- `make kernelversion`: `7.3.0-rc4`
- Makefile: `VERSION=7 PATCHLEVEL=3 SUBLEVEL=0 EXTRAVERSION=-rc4`
- Commit under review: `d08e4d9197396ceb906715d976b63aed0c5cc8e5`
- `git merge-base --is-ancestor d08e4d9197396 HEAD`: yes (merged via
`soundwire-7.3-rc1`; not in `v7.2`)
Verdict is for this 7.3-rc4 checkout only. `intel_auxdevice.c`,
`wake_capable_list`, and `is_wake_capable()` are present here. This is a
host-side ID quirk in an existing Intel SoundWire master driver.
---
## PHASE 1: COMMIT MESSAGE FORENSICS
**Step 1.1: PARSE THE SUBJECT LINE**
Record: `[soundwire/intel_auxdevice] [Add] [put CS42L44 on the Intel
wake-capable quirk list]`
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Fixes:` none (expected)
- `Reported-by:` none
- `Tested-by:` none
- `Reviewed-by:` none on the committed version
- `Acked-by:` none
- `Link:` `https://patch.msgid.link/20260708122948.1502227-1-
ckeepax@opensource.cirrus.com`
- `Cc: stable@vger.kernel.org`: none (expected)
- `Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>`
(Cirrus, chip vendor)
- `Signed-off-by: Vinod Koul <vkoul@kernel.org>` (SoundWire maintainer)
- Ignore any Sasha Levin SOB / `[Upstream commit]` markers (none in the
real commit)
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- Bug: CS42L44 can raise jack events while the SoundWire bus is clock-
stopped, but the Intel master did not treat it as wake-capable.
- Symptom: headset plug/unplug while audio is idle is missed; bus/system
does not wake for jack detect.
- Version info: none in the message. Commit landed for 7.3-rc1.
- Root cause (from this patch plus `e66f91a2d10b9`): ACPI does not
export wake capability; the codec driver’s `wake_capable` flag is too
late (set at probe, after device-number assignment). The Intel master
uses a static mfg/part quirk table.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not disguised cleanup. Explicit hardware-quirk / device-ID
addition.
---
## PHASE 2: DIFF ANALYSIS
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `drivers/soundwire/intel_auxdevice.c` (`+1 / -0`)
- Function: none; one entry in `wake_capable_list[]`
- Scope: single-file surgical ID add
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- Before: `{0x01fa, 0x4244}` was absent, so `is_wake_capable()` returned
false for CS42L44 unless firmware already set
`slave->prop.wake_capable`.
- After: match on Cirrus `mfg_id 0x01fa` + `part_id 0x4244`.
- Path: SoundWire enumeration / device-number allocation
(`intel_get_device_num_ida`, `generic_new_peripheral_assigned`), not
an error path.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record:
- Category: **hardware workaround / device ID in an existing quirk
table**
- Mechanism: Intel Lunar Lake-class wake requires a system-unique SDI
and IDA device numbers in a reserved range. Without the list entry,
CS42L44 is allocated a non-wake number, `program_sdi()` is skipped,
and jack IRQs while the bus is stopped are not handled.
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- Obviously correct: same pattern as CS42L43 (`0x4243`), CS42L45
(`0x4245`), CS42L49 (`0x4249`), CS42L43B (`0x2A30`/`0x2A3B`).
- Minimal: one array line; no API, locking, or structure change.
- Regression risk: very low. Extra list iteration is cheap; the new ID
only matches that part. Wrong SDI assignment would only affect that
exact codec, and the vendor authored the entry.
- Nearby gap (does not make this patch wrong):
`drivers/mfd/cs42l43-sdw.c` still has no `SDW_SLAVE_ENTRY` for
`0x4244`. DT only gained `cirrus,cs42l44` later (`d4c669890ed08`).
This commit is still the correct host-side quirk.
---
## PHASE 3: GIT HISTORY INVESTIGATION
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- Table introduced in `e66f91a2d10b9` (2023-07-31, described as
`v6.5-rc1-6-ge66f91a2d10b9`): “add hybrid IDA-based device_number
allocation”.
- That commit states the quirk table is expected to grow for each new
headset codec because firmware does not provide wake capability.
- Line `0x4244` itself is this commit (`d08e4d9197396`, Charles Keepax,
2026-07-08).
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Not applicable. The “bug” is an incomplete
quirk table, not a regression from a single earlier SHA.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: Same one-line additions: `fe600c8e2dc5d` (cs42l43),
`f87e5575a6bd1` (cs42l45), `b8f2d65fec19f` (cs42l49), `be6d8daaab654`
(cs42l43b), `4b8fc2b17272d` (CS47L47), `4e90368e8680d` (es9356).
Standalone, not `N/M`.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Charles Keepax is a regular Cirrus SoundWire/ASoC contributor
and also authored the CS42L43B and CS42L49 wake-list entries. Vinod Koul
applied it.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: Depends only on `wake_capable_list` / `is_wake_capable()`,
present here since `e66f91a2d10b9`. Applies standalone. No new helper or
struct.
---
## PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c d08e4d9197396`: `https://patch.msgid.link/20260708122948.15
02227-1-ckeepax@opensource.cirrus.com`
- `b4 dig -a`: v1 only; committed version is that v1
- Thread: submit (Keepax) + “Applied, thanks!” (Vinod Koul). No NAK, no
v2, no reviewer risk notes, no `Cc: stable` in-thread.
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): To `vkoul@kernel.org`; Cc Bard Liao, Pierre-Louis
Bossart, linux-sound, linux-kernel, Cirrus patches. Maintainer applied;
no extra Reviewed-by on this revision.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No bugzilla/syzbot. Vendor (Cirrus) patch. Later DT text:
“cs42l44 is a cost optimised variant of cs42l43b” (`d4c669890ed08`).
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone 1/1. Related later: DT compatible only. MFD SoundWire
ID for `0x4244` is still missing in this tree.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org/stable fetch returned 403. Web search found
`[PATCH AUTOSEL 6.19-6.12] ... add cs42l45 codec to wake_capable_list` —
same class of ID was auto-selected for stable. No evidence this CS42L44
patch was rejected for stable.
---
## PHASE 5: CODE SEMANTIC ANALYSIS
**Step 5.1: IDENTIFY KEY FUNCTIONS**
Record: `wake_capable_list[]` data only. Consumers: `is_wake_capable()`,
`intel_get_device_num_ida()`, `intel_put_device_num_ida()`,
`generic_new_peripheral_assigned()`.
**Step 5.2: TRACE CALLERS**
Record:
- `is_wake_capable()` is static; three call sites in this file (lines
135, 269, 283).
- `intel_get/put_device_num_ida` are `sdw_intel_ops.get_device_num` /
`put_device_num`.
- `generic_new_peripheral_assigned` is
`sdw_intel_ops.new_peripheral_assigned`.
- Context: Intel SoundWire enumeration / PM, not syscall-hot or IRQ
handler body.
**Step 5.3: TRACE CALLEES**
Record: `ida_alloc_range` / `ida_free` for wake devices;
`hw_ops->program_sdi()` when wake-capable.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: ACPI Intel SoundWire controller → peripheral enumeration →
device number → optional SDI programming. Reachable on Intel laptops
with this codec when audio clocks stop (idle/runtime PM). Not a
userspace-triggered memory-safety bug; it is a device-operation path.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same Cirrus IDs already in the table (`0x4243`, `0x4245`,
`0x4249`, `0x2A30`, `0x2A3B`). `sdca_class.c` binds
`0x4245`/`0x4249`/`0x4747` but not `0x4244`. `cs42l43-sdw.c` binds
`0x4243` and `0x2A3B` only.
---
## PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: Yes, the Intel quirk table and lookup exist
(`drivers/soundwire/intel_auxdevice.c`). Without this ID, CS42L44 would
not be wake-capable here. `e66f91a2d10b9` is from 2023; the table is
long-lived. This commit is already in 7.3-rc1+, so the ID is present at
HEAD; the evaluation is whether that change belongs in this tree’s
stable stream, not whether 6.x is different.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: Clean apply: insert `{0x01fa, 0x4244}` next to the other Cirrus
entries. No refactor needed on this tree.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: This SHA is already an ancestor of HEAD. Sibling codec IDs are
already in the same table. No alternate CS42L44 wake fix.
---
## PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: `drivers/soundwire/` Intel master (`CONFIG_SOUNDWIRE_INTEL`).
**IMPORTANT** for Intel laptop audio, not core mm/VFS. Peripheral
relative to the whole kernel; standard for headset jack/wake.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Active (regular wake-list IDs, DMI quirks, cadence clock-stop
work). The table mechanism itself has been stable since 2023.
---
## PHASE 8: IMPACT AND RISK ASSESSMENT
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: Intel SoundWire hosts with Cirrus CS42L44 (`mfg 0x01fa`, `part
0x4244`). No effect on other devices.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Jack insert/remove while the SoundWire bus is stopped (runtime
idle / clock stop). Common on laptops. Not a security trigger from
unprivileged syscalls.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: Missed jack / wake events (headset not detected until something
else restarts the bus). **MEDIUM** functional hardware bug; not
oops/corruption. Covered by the hardware-quirk exception.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- Benefit: restores jack-wake on CS42L44, same as sibling Cirrus codecs.
- Risk: very low (one static ID).
- Ratio: strongly favors backport.
---
## PHASE 9: FINAL SYNTHESIS
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- One-line ID in an existing Intel SoundWire quirk table
- Real hardware: CS42L44 is a documented CS42L43B cost-down variant
(Cirrus + DT `cirrus,cs42l44`)
- Without it, jack events while the bus is stopped are dropped (by
design of `e66f91a2d10b9`)
- Same pattern already used for cs42l43/45/49/43b; cs42l45 was AUTOSEL’d
for stable
- Vendor author, SoundWire maintainer applied, v1 accepted
- Applies cleanly; no new API
AGAINST:
- Not a crash/UAF/security fix
- No `Reported-by` from end users
- MFD `cs42l43-sdw.c` still lacks `0x4244`, so codec bind on Intel SDW
is incomplete in this tree
- No in-thread `Cc: stable` (not a negative per rules)
UNRESOLVED:
- lore.kernel.org/stable search HTTP 403
- How many shipping Intel SKUs use CS42L44 (unverified; vendor patch is
the evidence)
The missing MFD ID is a separate gap. This patch only teaches the
**Intel master** to treat the part as wake-capable at enumeration, which
must happen before codec probe. That is exactly what this table is for.
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — one ID, established table,
maintainer applied
2. Fixes a real bug that affects users? **PASS** — missed jack/wake on
CS42L44
3. Important issue? **PASS** via hardware-quirk exception (broken jack
detect while bus stopped)
4. Small and contained? **PASS** — +1 line, one file
5. No new features or APIs? **PASS** — ID in existing quirk list, not a
new driver
6. Can apply to the local tree? **PASS** — `wake_capable_list` exists;
patch is a clean insert
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Hardware quirk / device ID addition to an existing driver**
(`wake_capable_list` in `intel_auxdevice.c`). Prompt: these are YES for
stable.
**Step 9.4: MAKE YOUR DECISION**
This tree has the Intel SoundWire master and the quirk table. Adding
CS42L44 is the same class of change as USB/PCI ID and codec quirks:
small, obviously correct, and required for real hardware. Benefit
outweighs risk.
---
## What the commit solves for this tree
On Intel SoundWire, device numbers for wake-capable codecs must be
assigned at enumeration from a reserved IDA range, and SDI must be
programmed. Firmware does not advertise wake capability, and the codec
driver has not probed yet, so the master uses `wake_capable_list`.
CS42L44 can generate jack IRQs while the bus is clock-stopped; without
`{0x01fa, 0x4244}` those events are lost. That is a real user-visible
headset-detect failure, not a new feature.
Risk is a single static table entry. No locking, alloc, or ABI change.
---
## Verification
- [Phase 1] `git show d08e4d9197396 --format=fuller`: tags as listed;
body is the two-line jack-event rationale
- [Phase 2] Diff: `+{0x01fa, 0x4244}` only in `wake_capable_list`
- [Phase 2] Read `intel_auxdevice.c`: `is_wake_capable()` used at lines
135, 269, 283
- [Phase 3] `git blame -L 53,77 drivers/soundwire/intel_auxdevice.c`:
table from `e66f91a2d10b9`; this ID from `d08e4d9197396`
- [Phase 3] `git show e66f91a2d10b9`: explains why the quirk table
exists and will grow
- [Phase 3] `git merge-base --is-ancestor d08e4d9197396 HEAD`: yes; not
an ancestor of `v7.2`; is in `v7.3-rc1`
- [Phase 3] No `Fixes:`; related one-liners listed above
- [Phase 4] `b4 dig -c/-a/-w/-m`: v1 lore thread; Vinod applied;
recipients include Liao, Bossart, linux-sound
- [Phase 4] WebSearch: AUTOSEL of the cs42l45 equivalent; CS42L44 thread
has no NAK
- [Phase 4] UNVERIFIED: stable@ lore (HTTP 403)
- [Phase 5] Callers confirmed by grep in
`drivers/soundwire/intel_auxdevice.c`
- [Phase 5] `cs42l43-sdw.c` id_table: `0x4243` and `0x2A3B` only — no
`0x4244` (verified)
- [Phase 6] `git describe HEAD` / `make kernelversion`: 7.3.0-rc4; file
and table present
- [Phase 6] `git show d4c669890ed08`: DT `cirrus,cs42l44` = cost-
optimised CS42L43B
- [Phase 8] Failure mode: missed jack/wake, not oops; quirk exception
applies
**YES**
drivers/soundwire/intel_auxdevice.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/soundwire/intel_auxdevice.c b/drivers/soundwire/intel_auxdevice.c
index c0c8ffcecc6bf..347e06ad6edba 100644
--- a/drivers/soundwire/intel_auxdevice.c
+++ b/drivers/soundwire/intel_auxdevice.c
@@ -54,6 +54,7 @@ static struct wake_capable_part wake_capable_list[] = {
{0x01fa, 0x2A30},
{0x01fa, 0x2A3B},
{0x01fa, 0x4243},
+ {0x01fa, 0x4244},
{0x01fa, 0x4245},
{0x025d, 0x5682},
{0x025d, 0x700},
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.12] ASoC: SOF: Intel: mtl: Power down DSP if it is left enabled in pre_fw_run()
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (8 preceding siblings ...)
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-6.12] soundwire: intel_auxdevice: Add cs42l44 to wake_capable_list Sasha Levin
@ 2026-10-19 13:46 ` Sasha Levin
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Limit mic boost on Positivo N15RPE-S Sasha Levin
` (51 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:46 UTC (permalink / raw)
To: patches, stable
Cc: Peter Ujfalusi, Bard Liao, Liam Girdwood, Mark Brown, Sasha Levin,
lgirdwood, daniel.baluta, perex, tiwai, sound-open-firmware,
linux-sound, linux-kernel
From: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
[ Upstream commit 31fd7a0bbfa4b7e8aff11f278e817664c6a5f68b ]
It is expected that the DSP is in power down state when the firmware boot
is attempted.
If the DSP for any reason was left powered up then the DSP boot will
fail since the ROM boot sequence might not be able to run.
Make sure that the DSP is off before proceeding to boot it up.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://patch.msgid.link/20260730122857.5294-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
Local tree is **6.1.188** (`pending-6.1`). The Meteor Lake SOF path this
patch targets is present here, so the question is whether the DSP-left-
on boot failure is worth a backport on this tree.
---
## PHASE 1: COMMIT MESSAGE FORENSICS
**Step 1.1: PARSE THE SUBJECT LINE**
Record: **[ASoC / SOF Intel MTL] [Power down] Ensure DSP is off before
firmware boot in `pre_fw_run()`**
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>`
(author; Intel SOF)
- `Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>` (Intel SOF)
- `Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>` (ASoC/SOF
maintainer)
- `Link: https://patch.msgid.link/20260730122857.5294-3-
peter.ujfalusi@linux.intel.com`
- `Signed-off-by: Mark Brown <broonie@kernel.org>` (ASoC maintainer,
applied)
- No `Fixes:`, no `Reported-by:`, no `Cc: stable` (absence is expected
for this review)
- Ignore any `Signed-off-by: Sasha Levin` / `[Upstream commit ...]`
pipeline markers
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** Firmware boot is assumed to start with the DSP powered down.
If it is already up, the ROM boot sequence cannot run and DSP boot
fails.
- **Symptom:** SOF firmware boot failure → no audio on Meteor Lake.
- **Cover letter (series 0/2, verified via b4):** “We have seen reports
that for some undetermined reasons the DSP was on during system boot
and this caused firmware boot failure as the DSP cannot be booted up -
it was already in booted up state.”
- **Root cause:** DSP subsystem left powered (BIOS leftover, kexec,
failed prior boot, etc.); `pre_fw_run()` only powers up, never powers
down first.
- **Version info:** Applied by Mark Brown to `for-7.3` (next merge
window), not as a current-rc hotfix.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: **Not a disguised cleanup.** Explicit hardware recovery: if CPA
shows the DSP already on, power it down before the normal power-up
sequence. This is a real functional fix.
---
## PHASE 2: DIFF ANALYSIS
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/soc/sof/intel/mtl.c` only
- ~23 lines added, 0 removed
- New: `mtl_dsp_is_enabled()`
- Modified: `mtl_dsp_pre_fw_run()` — extra check at the start
- **Scope:** single-file, surgical
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- **Before:** `mtl_dsp_pre_fw_run()` always sets SPA to power the DSP
subsystem on, waits, then powers the gated DSP domain. No check of
current power state.
- **After:** Read `MTL_HFDSSCS`; if `MTL_HFDSSCS_CPA_MASK` is set, call
existing `mtl_power_down_dsp()`. On failure, `dev_warn` and continue.
Then the existing power-up sequence runs.
- **Path:** firmware boot (`snd_sof_run_firmware()`), probe and resume.
The new code runs only when the DSP is already enabled.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record:
- **Category:** hardware workaround / logic correctness (wrong assumed
power state)
- **Mechanism:** ROM boot needs a cold/off DSP. CPA=1 means the
subsystem is already on; setting SPA again does not run ROM init.
Powering down first restores a clean boot state.
- Same idea as SKL’s existing `hda_dsp_core_is_enabled()` handling in
`hda-loader-skl.c` (already in this tree).
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- **Quality:** Obviously correct. Uses existing `mtl_power_down_dsp()`
and the same CPA bit already used for power-up poll.
- **Minimal:** one helper + one guarded call; normal path unchanged.
- **Regression risk:** Low. Clean suspend already calls
`power_down_dsp()` (`hda_suspend()`), so IMR/resume should still see
CPA=0. The new path only fires on the abnormal “already on” case.
Power-down failure is warn-and-continue, not a hard fail.
---
## PHASE 3: GIT HISTORY INVESTIGATION
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- `mtl_dsp_pre_fw_run()` introduced in `064520e8aeaa2` (“ASoC: SOF:
Intel: Add support for MeteorLake (MTL)”, Bard Liao, 2022-06-15) —
**in this 6.1 tree**.
- `mtl_power_down_dsp()` added in `2090cb9bf5747` (2022-09-23) — **also
in this tree** (`git merge-base --is-ancestor` confirmed).
- Buggy “power up without checking current state” has been here for the
whole 6.1 lifetime of MTL.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Bug is the original MTL `pre_fw_run()` design,
not a later regression.
**Step 3.3: CHECK FILE HISTORY**
Record: Recent local history is MTL bring-up/PM (`064520e8aeaa2`,
`2090cb9bf5747`, `6ae87bab269b3`, timeout/dump tweaks). No existing
“power down if already on” logic. Standalone vs CAVS: this is patch
**2/2**; patch 1/2 is `hda.c` for older CAVS. MTL overrides
`.pre_fw_run` with `mtl_dsp_pre_fw_run`, so **this commit does not
depend on 1/2**.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Peter Ujfalusi is an Intel SOF regular. Reviewers are Intel SOF
(Bard Liao) and Liam Girdwood. High confidence in the hardware
diagnosis.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record:
- Needs `mtl_power_down_dsp()`, `MTL_HFDSSCS`, `MTL_HFDSSCS_CPA_MASK` —
all present.
- Upstream context has later PTL/ACE 2.0 register selection
(`PTL_HFPWRCTL2`, `SOF_INTEL_ACE_2_0`). **Those are context only, not
this change.** 6.1 `pre_fw_run()` is the original MTL-only version.
- In 6.1 `mtl_power_down_dsp()` is `static` and defined **after**
`mtl_dsp_pre_fw_run()` (line 401 vs 240). Upstream later made it a
header prototype. Backport needs a **static forward declaration** (or
a reorder). That is a trivial, mechanical adjustment, not a missing
feature.
---
## PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c 31fd7a0bbfa4` (hash from Mark Brown’s apply mail) matched
patch-id.
- Thread: https://patch.msgid.link/20260730122857.5294-3-
peter.ujfalusi@linux.intel.com
- Cover: `[PATCH 0/2] ASoC: SOF: Intel: hda/mtl: Handle powered on DSP
on boot`
- Full thread saved via `b4 mbox` (4 messages): cover, 1/2 hda, 2/2 mtl,
Mark Brown apply.
- **v1 only** (`b4 dig -a`); no v2/v3.
- **No NAKs.** Applied to `https://git.kernel.org/broonie/sound for-7.3`
as `31fd7a0bbfa4`.
- No reviewer `Cc: stable` in the thread.
**Step 4.2: CHECK WHO REVIEWED**
Record (`b4 dig -w`): To/Cc were Liam Girdwood, Mark Brown, linux-sound,
Kai Vehmanen, Bard Liao, Pierre-Louis Bossart. Right maintainers.
Reviewed-by from Bard Liao and Liam Girdwood.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No public bugzilla/syzbot link. Evidence is the cover letter:
Intel has reports of DSP-on-at-boot causing firmware boot failure.
Severity from reporters: **audio DSP does not boot**. User count:
unspecified (“reports”), not a single anecdotal one-off in the message,
but not named either.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Series is 2 independent platform hooks (hda CAVS vs mtl ACE).
This MTL patch is self-contained. No later follow-up found in the
thread.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org/stable WebFetch returned 403. Web search found
no stable-list discussion of this subject. **UNVERIFIED:** no evidence
it was requested or rejected for stable.
---
## PHASE 5: CODE SEMANTIC ANALYSIS
**Step 5.1: IDENTIFY KEY FUNCTIONS**
Record: `mtl_dsp_is_enabled()` (new), `mtl_dsp_pre_fw_run()` (modified),
`mtl_power_down_dsp()` (callee, unchanged).
**Step 5.2: TRACE CALLERS**
Record:
- `sof_mtl_ops.pre_fw_run = mtl_dsp_pre_fw_run` (`sof_mtl_ops_init`)
- `snd_sof_dsp_pre_fw_run()` → `snd_sof_run_firmware()`
(`sound/soc/sof/loader.c`)
- `snd_sof_run_firmware()` from probe (`sound/soc/sof/core.c`) and
resume (`sound/soc/sof/pm.c`)
**Step 5.3: TRACE CALLEES**
Record: `snd_sof_dsp_read()` (CPA), `mtl_power_down_dsp()` →
`mtl_dsp_core_power_down()` then clear SPA and poll CPA=0. Same sequence
already used on suspend/remove.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Probe of `sof-audio-pci-intel-mtl` (PCI `8086:7e28`) → load
firmware → `pre_fw_run` → ROM boot. **Reachable on every MTL SOF boot**,
not a debug-only path. Unprivileged users do not trigger it directly; it
runs at device probe/resume.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: SKL loader already handles “core already enabled” (`hda-loader-
skl.c`). CAVS sibling is series 1/2. MTL/ACE had a gap this commit
fills.
---
## PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: **Yes.** `sound/soc/sof/intel/mtl.c` `mtl_dsp_pre_fw_run()`
(from ~line 240) powers on with no prior CPA check. Introduced with MTL
in v6.1 (`064520e8aeaa2`). PCI ID and `CONFIG_SND_SOC_SOF_METEORLAKE`
exist. Local `make kernelversion`: **6.1.188**.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: **Minor conflicts, not rework.**
- Upstream hunk context includes later `mtl_enable_interrupts(..., bool
enable)`, `EXPORT_SYMBOL_NS`, PTL `dsppwrctl`/`chip->hw_ip_version` —
**not in 6.1**.
- Logical change still maps 1:1 onto 6.1 `pre_fw_run()`.
- Need a forward declaration of static `mtl_power_down_dsp()`.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: No local commit with this subject or “power down if left
enabled” on `mtl.c`. Not already fixed.
---
## PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: **ASoC SOF Intel Meteor Lake** (`sound/soc/sof/intel/mtl.c`).
**IMPORTANT** for MTL laptops/desktops using SOF (not core mm/net).
Peripheral relative to the whole kernel, but this is the Intel audio DSP
path for that generation.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: MTL was added during 6.1 development and then mostly stable on
this branch (timeouts, dumps, PM ops). Mature for 6.1, not a brand-new
post-branch subsystem.
---
## PHASE 8: IMPACT AND RISK ASSESSMENT
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: **Driver-specific** — `CONFIG_SND_SOC_SOF_METEORLAKE`, PCI
`8086:7e28`. 6.1 LTS users on Meteor Lake (e.g. Debian bookworm-class
kernels on Core Ultra hardware).
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: DSP already powered when `pre_fw_run()` runs (BIOS, kexec,
leftover from a failed boot). Not every boot. Not userspace-triggerable
as a security issue. Intel reports it on **system boot**.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: SOF firmware boot failure → **no audio**. Not a
panic/UAF/corruption. **HIGH for affected hardware** (device does not
work), **MEDIUM** in whole-tree terms.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- **Benefit:** MTL machines that otherwise fail DSP boot get working
audio. Matches the hardware-quirk exception.
- **Risk:** Low — ~20 lines, gated on CPA, uses existing power-down,
warn-and-continue on failure, suspend already powers down so IMR
resume should be unaffected.
- **Ratio:** Favorable for this tree.
---
## PHASE 9: FINAL SYNTHESIS
**Step 9.1: COMPILE THE EVIDENCE**
**FOR:**
- Real, reported firmware-boot failure when DSP is already on
- User-visible: no audio
- Small, obviously correct, Intel-reviewed
- Buggy code and `mtl_power_down_dsp()` both exist in 6.1
- Hardware workaround class (explicitly stable-appropriate)
- Standalone from series 1/2
- Normal boot/resume unchanged
**AGAINST:**
- Not a crash/security/corruption/deadlock
- Trigger is uncommon / “undetermined”
- Applied to for-7.3, not sent as -rc
- Needs a small backport (context + forward declaration)
**UNRESOLVED:**
- Stable list discussion (lore/stable 403)
- Exact BIOS/platforms in the unnamed reports
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — Intel review; uses existing
power-down + CPA
2. Fixes a real bug that affects users? **PASS** — reported DSP-on-at-
boot, firmware boot fail
3. Important issue? **PASS** — audio device fails to initialize
(hardware-workaround class)
4. Small and contained? **PASS** — one file, ~23 lines
5. No new features or APIs? **PASS**
6. Can apply to the local tree? **PASS** — logic applies; minor
context/prototype adaptation
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Hardware quirk/workaround** — force a known-good DSP power
state before ROM boot, analogous to USB/PCI reset-on-init quirks.
**Step 9.4: DECISION**
This is a small recovery for a real MTL SOF boot failure that exists in
6.1. The bug is “DSP already on → firmware never boots,” not a
theoretical cleanup. Risk is low because the new code only runs when CPA
is already set, and that path already exists for suspend/remove. It
should be backported to this tree.
---
### What the commit solves for stable users
On Meteor Lake, SOF expects the DSP subsystem off before ROM boot. If it
is already on, `pre_fw_run()` still only sets SPA; ROM init does not run
and probe/resume fails with no audio. The fix reads CPA and, if set,
calls the existing `mtl_power_down_dsp()` so the following power-up is a
clean boot.
### Stable rules / risk
Meets the rules: real bug, small, no new API, hardware workaround.
Benefit is working audio on affected MTL systems; regression risk is
low.
### Concerns
Literal `git am` will not apply (later PTL/`bool enable` context). A 6.1
backport is the same helper + call, plus a static forward declaration of
`mtl_power_down_dsp()`. Series 1/2 (`hda.c`) is not required for this
MTL change.
---
### Verification
- **[Phase 1]** Parsed tags from the provided message and the b4 mbox:
author Peter Ujfalusi; Reviewed-by Bard Liao, Liam Girdwood; applied
by Mark Brown; no Fixes/Reported-by/Cc: stable
- **[Phase 1]** Cover letter (mbox): Intel reports of DSP-on-at-boot
causing firmware boot failure
- **[Phase 2]** Diff: +23 lines in `mtl.c`; `mtl_dsp_is_enabled()` +
guarded `mtl_power_down_dsp()` in `mtl_dsp_pre_fw_run()`
- **[Phase 3]** `git describe HEAD` / `make kernelversion`: p-6.1-12 /
**6.1.188**
- **[Phase 3]** `git merge-base --is-ancestor 064520e8aeaa2 HEAD`: MTL
support present
- **[Phase 3]** `git merge-base --is-ancestor 2090cb9bf5747 HEAD`:
`mtl_power_down_dsp` present
- **[Phase 3]** `git blame -L 240,284 sound/soc/sof/intel/mtl.c`:
pre_fw_run still original 064520e8aeaa2; no CPA-down check
- **[Phase 3]** Confirmed `MTL_HFDSSCS` / `MTL_HFDSSCS_CPA_MASK` in
`mtl.h`
- **[Phase 3]** Function order: `mtl_dsp_pre_fw_run` @240,
`mtl_power_down_dsp` @401 (forward decl needed)
- **[Phase 4]** `b4 mbox` of 20260730122857.5294-3: cover + 1/2 + 2/2 +
apply; no NAK
- **[Phase 4]** `b4 dig -c 31fd7a0bbfa4`: lore match; v1 only; applied
to for-7.3 as 31fd7a0bbfa4
- **[Phase 4]** `b4 dig -w`: maintainers CC’d
- **[Phase 4]** lore.kernel.org WebFetch: 403
- **[Phase 5]** Callers: `snd_sof_run_firmware` ← probe (`core.c`) and
resume (`pm.c`)
- **[Phase 5]** `hda_suspend()` already calls `chip->power_down_dsp()` —
clean resume should have CPA=0
- **[Phase 5]** SKL already has similar “if core enabled” handling in
`hda-loader-skl.c`
- **[Phase 6]** `pci-mtl.c` PCI ID 8086:7e28;
`CONFIG_SND_SOC_SOF_METEORLAKE` in Kconfig
- **[Phase 6]** MTL overrides `.pre_fw_run`; series 1/2 not a dependency
- **[Phase 8]** Failure: SOF firmware boot fail / no audio, not oops
- **UNVERIFIED:** stable@ discussion (HTTP 403); named
reporters/machines
**YES**
sound/soc/sof/intel/mtl.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/sound/soc/sof/intel/mtl.c b/sound/soc/sof/intel/mtl.c
index 2242c96bfa519..f119e0e0651a2 100644
--- a/sound/soc/sof/intel/mtl.c
+++ b/sound/soc/sof/intel/mtl.c
@@ -236,6 +236,17 @@ int mtl_enable_interrupts(struct snd_sof_dev *sdev, bool enable)
}
EXPORT_SYMBOL_NS(mtl_enable_interrupts, "SND_SOC_SOF_INTEL_MTL");
+static bool mtl_dsp_is_enabled(struct snd_sof_dev *sdev)
+{
+ int val;
+
+ val = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_HFDSSCS);
+ if (val & MTL_HFDSSCS_CPA_MASK)
+ return true;
+
+ return false;
+}
+
/* pre fw run operations */
static int mtl_dsp_pre_fw_run(struct snd_sof_dev *sdev)
{
@@ -249,6 +260,18 @@ static int mtl_dsp_pre_fw_run(struct snd_sof_dev *sdev)
u32 dsppwrsts;
const struct sof_intel_dsp_desc *chip;
+ /* Power down the DSP if it is left enabled to ensure clean boot state */
+ if (mtl_dsp_is_enabled(sdev)) {
+ dev_dbg(sdev->dev, "powering down DSP first\n");
+
+ ret = mtl_power_down_dsp(sdev);
+ if (ret < 0) {
+ dev_warn(sdev->dev,
+ "%s: failed to power down already-enabled DSP\n", __func__);
+ /* Continue anyway to attempt recovery */
+ }
+ }
+
chip = get_chip_info(sdev->pdata);
if (chip->hw_ip_version > SOF_INTEL_ACE_2_0) {
dsppwrctl = PTL_HFPWRCTL2;
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Limit mic boost on Positivo N15RPE-S
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (9 preceding siblings ...)
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-6.12] ASoC: SOF: Intel: mtl: Power down DSP if it is left enabled in pre_fw_run() Sasha Levin
@ 2026-10-19 13:46 ` Sasha Levin
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-5.15] ALSA: hda/realtek: add missing error checks for COEF index reads in alc269 Sasha Levin
` (50 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:46 UTC (permalink / raw)
To: patches, stable
Cc: Edson Juliano Drosdeck, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
[ Upstream commit 253010acfc8ad908446347b30a613032d1517bb5 ]
The internal mic boost on the Positivo N15RPE-S is too high.
Fix this by applying the ALC269_FIXUP_LIMIT_INT_MIC_BOOST fixup to the machine
to limit the gain.
Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
Link: https://patch.msgid.link/20260805154518.19093-1-edson.drosdeck@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
The local tree is **6.12.111** (`pending-6.12`). This is a one-line
Realtek HDA PCI quirk for a laptop whose driver and existing mic-boost
fixup are already in this tree.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: [ALSA hda/realtek] [Limit] [apply existing
ALC269_FIXUP_LIMIT_INT_MIC_BOOST to Positivo N15RPE-S because internal
mic boost is too high]
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- Signed-off-by: Edson Juliano Drosdeck (author)
- Link: https://patch.msgid.link/20260805154518.19093-1-
edson.drosdeck@gmail.com
- Signed-off-by: Takashi Iwai (ALSA maintainer)
- No Fixes:, Reported-by:, Tested-by:, Reviewed-by:, Acked-by:, or Cc:
stable
- Ignore pipeline markers (none present on the upstream commit
`253010acfc8ad`)
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- Bug: internal microphone boost on Positivo N15RPE-S is too high
- Symptom: excessive gain / noisy internal mic (the fixup comment says
levels 2 and 3 are too noisy)
- Failure mode: hardware-specific unusable/noisy capture, not a kernel
crash
- Root cause: this PCI SSID is not in the quirk table, so the existing
boost limiter is not applied
- Version info: none stated
Step 1.4: DETECT HIDDEN BUG FIXES
Record: Not a disguised cleanup. It is an explicit hardware quirk: map
SSID `0x2782:0xa128` to an existing fixup.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- Files: `sound/hda/codecs/realtek/alc269.c` (+1 / -0)
- Function/table: `alc269_fixup_tbl[]`
- Scope: single-file, one-line surgical quirk addition
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record:
- Before: PCI SSID `0x2782:0xa128` has no match; codec uses default
auto-config with full internal-mic boost range
- After: that SSID matches `ALC269_FIXUP_LIMIT_INT_MIC_BOOST`, which at
probe overrides amp caps so internal-mic boost is only steps 0–1
- Path: codec probe (`patch_alc269()` → `snd_hda_pick_fixup(...,
alc269_fixup_tbl, ...)`)
Step 2.3: IDENTIFY THE BUG MECHANISM
Record: [Hardware workaround] Existing
`alc269_fixup_limit_int_mic_boost()` already limits noisy boost levels 2
and 3. This commit only adds the PCI ID so that function runs on this
laptop.
Verified function in this tree
(`sound/pci/hda/patch_realtek.c:6661-6690`):
- Runs only on `HDA_FIXUP_ACT_PROBE`
- Walks auto-config inputs, keeps only `AUTO_PIN_MIC` with
`INPUT_PIN_ATTR_INT`
- Calls `snd_hda_override_amp_caps()` with `NUM_STEPS=1`
Step 2.4: ASSESS THE FIX QUALITY
Record:
- Quality: obviously correct; identical pattern already used for
Positivo ARN50, Positivo N14AP7, VAIO VJFE-CL, several ThinkPads
- Minimal: one `SND_PCI_QUIRK` line, no API/data-structure change
- Regression risk: very low; only SSID `0x2782:0xa128` is affected. The
chosen fixup is chained to `ALC269_FIXUP_THINKPAD_ACPI`, but that is
the same chain used by the other Positivo/VAIO limit-boost entries
already in this tree.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record:
- Insertion point in this tree is after `SND_PCI_QUIRK(0x2782, 0x4900,
"MEDION E15443", ...)` (`98b5ade3a44d8f`, 2024)
- The buggy “missing ID” is not old code; the laptop simply was never
listed
- The fixup itself dates to `3e0d611b2045b` (“ALSA: hda - Limit internal
mic boost for a few Asus machines”, 2013-04-22, contained in
v3.10-rc1) and **is an ancestor of HEAD**
Step 3.2: FOLLOW THE FIXES: TAG
Record: No Fixes: tag. Expected for a new device quirk. Not a negative
signal.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record:
- Related commits already in this tree:
- `d44418f5024f6` ALSA: hda/realtek: Limit mic boost on Positivo ARN50
(same author, same fixup; already backported here)
- `86a433862912f` ALSA: hda/realtek: Limit mic boost on N14AP7 (same
author, same fixup; had Cc: stable)
- Standalone: not patch X/Y. No prerequisite series.
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record: Edson Juliano Drosdeck has 10 commits in
`sound/pci/hda/patch_realtek.c` on this tree, almost all Positivo/VAIO
HDA quirks. Regular hardware-quirk contributor, not a one-off.
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record:
- Depends only on `ALC269_FIXUP_LIMIT_INT_MIC_BOOST` and
`alc269_fixup_tbl[]`, both present
- Can apply standalone as a one-line quirk in
`sound/pci/hda/patch_realtek.c`
- Mainline file path `sound/hda/codecs/realtek/alc269.c` is the
post-6.12 HDA codec split; that path does **not** exist here.
Equivalent table is `alc269_fixup_tbl` in `patch_realtek.c`
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- `b4 dig -c 253010acfc8ad` → https://patch.msgid.link/20260805154518.19
093-1-edson.drosdeck@gmail.com
- `b4 dig -a`: only v1; no later revision
- Thread is two messages: the patch and Takashi Iwai “Applied to for-
next branch. Thanks.”
- No NAK, no requested changes, no reviewer-flagged risk
- No explicit Cc: stable in the thread (absence expected)
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record (`b4 dig -w`): To Takashi Iwai (`tiwai@suse.com`); Cc Jaroslav
Kysela (`perex@perex.cz`), Realtek (`kailang@realtek.com`), linux-sound,
linux-kernel. Subsystem maintainer received and applied it.
Step 4.3: SEARCH FOR THE BUG REPORT
Record: No syzbot/bugzilla link. Description is a hardware report from
the same author who previously submitted verified Positivo quirks. No
independent public bug count found.
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Standalone one-patch series. Same author’s ARN50/N14AP7 limit-
boost quirks are the precedent; those are already in this tree.
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: lore.kernel.org/stable search returned HTTP 403. No stable-list
discussion verified. No evidence this was rejected for stable.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: Table `alc269_fixup_tbl[]` only. Runtime function used by the
new ID: `alc269_fixup_limit_int_mic_boost()`. Probe picker:
`snd_hda_pick_fixup()` from `patch_alc269()`.
Step 5.2: TRACE CALLERS
Record:
- `patch_alc269()` at `sound/pci/hda/patch_realtek.c:12416` calls
`snd_hda_pick_fixup(codec, alc269_fixup_models, alc269_fixup_tbl,
alc269_fixups)` (line 12583)
- That is the ALC269-family codec probe path
(CONFIG_SND_HDA_CODEC_REALTEK)
- Not IRQ, not syscall hot path; once at device probe
Step 5.3: TRACE CALLEES
Record: `alc269_fixup_limit_int_mic_boost()` →
`snd_hda_codec_get_pincfg()`, `snd_hda_get_input_pin_attr()`,
`snd_hda_override_amp_caps()`. No allocation, no new locks.
Step 5.4: FOLLOW THE CALL CHAIN
Record: Userspace cannot trigger a crash path. The ID is matched when
this laptop’s Realtek HDA codec is probed. Reachable for owners of
Positivo N15RPE-S with SND_HDA_CODEC_REALTEK. Unprivileged users then
get a usable (non-blown-out) internal mic.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Same `ALC269_FIXUP_LIMIT_INT_MIC_BOOST` already used for many
IDs in this tree, including:
- `0x1c6c:0x122a` Positivo N14AP7
- `0x2014:0x800a` Positivo ARN50
- `0x2782:0x0214` VAIO VJFE-CL
This is a systematic hardware pattern, not a one-off experiment.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record:
- `git describe HEAD` = `p-6.12-2-gd38d58a4e0359`; `make kernelversion`
= 6.12.111
- `git merge-base --is-ancestor 253010acfc8ad HEAD` → **not in this
tree**
- `0xa128` is absent from `patch_realtek.c` (grep: no matches)
- The missing-ID bug exists here: the laptop would probe without the
limiter
- Fixup and table exist since well before 6.12 (fixup from v3.10)
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record: Needs a trivial backport, not a clean git-am of the mainline
diff:
1. Path: `sound/hda/codecs/realtek/alc269.c` →
`sound/pci/hda/patch_realtek.c`
2. Context: mainline next line is Lunnen Ground 14 (`0x2782, 0xa212`),
which is **not** in 6.12; insert after `0x2782, 0x4900` and before
`0x7017, 0x2014`
That is the same class of adjustment used for `d44418f5024f6` (ARN50) on
this tree.
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: No N15RPE-S entry. Nearby same-class quirks (ARN50, N14AP7) are
present. No alternate fix for `0x2782:0xa128`.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: [sound/pci/hda Realtek codec] [IMPORTANT for laptop audio;
PERIPHERAL in that only this PCI ID is affected]
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: Very active: last 20 commits on `patch_realtek.c` are mostly
more `SND_PCI_QUIRK` entries (HP, Lenovo, Samsung, MECHREVO, ASUS).
Mature driver; this is the normal way hardware enablement/workarounds
land.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: Driver-specific / PCI-SSID-specific: only Positivo N15RPE-S
(`0x2782:0xa128`) with Realtek ALC269-family HDA.
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record:
- Trigger: every boot/probe on that laptop when using the internal mic
at high boost
- Common for owners of that model; zero impact elsewhere
- Not a security trigger; not unprivileged-crash
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record: [Noisy / overly boosted internal mic, capture quality unusable
at high gain] [MEDIUM for those users; LOW globally]. Not
panic/UAF/corruption, but it is a real hardware defect the existing
quirk is designed to fix.
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record:
- Benefit: high for N15RPE-S users on 6.12 (mic works as on later
kernels)
- Risk: very low (one ID, existing fixup, same pattern already
backported here)
- Ratio: strongly favors backport
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR:
- Explicit audio-codec hardware quirk (`SND_PCI_QUIRK` + existing fixup)
- Real user-visible bug (internal mic boost too high)
- One line, obviously correct, maintainer-applied
- Same author’s identical Positivo ARN50 quirk already in this 6.12 tree
- Fixup and quirk table already present
- No new API, no new driver, no behavioral change except this SSID
AGAINST:
- Not a crash/security/data-corruption bug
- Mainline path differs; needs 1-line context/path adjustment
- No independent public bugzilla/syzbot report
- Affected population is one laptop model
UNRESOLVED:
- Could not query lore.kernel.org/stable (HTTP 403)
- Could not independently verify the author’s hardware test beyond the
commit text and maintainer apply
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? PASS — one ID, existing fixup, applied
by Takashi Iwai
2. Fixes a real bug that affects users? PASS — excessive internal mic
boost on this machine
3. Important issue? PASS under the hardware-quirk exception (audio codec
quirk); severity MEDIUM for that model
4. Small and contained? PASS — +1 line
5. No new features or APIs? PASS — ID mapped to existing fixup
6. Can apply to the local tree? PASS — equivalent table exists; needs
trivial path/context backport, same as prior quirks on this tree
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: **Hardware quirk / audio codec quirk** (`SND_PCI_QUIRK` in
Realtek HDA). This is an explicit stable exception.
Step 9.4: MAKE YOUR DECISION
This should be backported to this 6.12 tree. It is the standard Realtek
laptop quirk: add a PCI subsystem ID so an existing limiter runs. The
driver, table, and `ALC269_FIXUP_LIMIT_INT_MIC_BOOST` are all here; only
the N15RPE-S ID is missing. Risk is confined to that SSID.
------------------------------------------------
What problem it solves and why it matters
The Positivo N15RPE-S ships with an internal mic whose boost steps 2–3
are too hot. Without this ID, 6.12 users of that laptop keep the default
full boost range. The commit maps `0x2782:0xa128` onto the long-standing
limiter already used for other Positivo machines in this tree.
Stable-rules fit
It is small, obviously correct, does not add APIs, and is the documented
audio-quirk exception. It is not a crash fix, but stable routinely takes
these ID-only Realtek quirks.
Risk vs benefit
Benefit is a working internal mic for that model. Risk is a single-ID
table entry using a fixup that has been in the kernel since v3.10 and is
already applied to sibling Positivo IDs here.
Concerns
The mainline hunk will not `git am` cleanly because of the later HDA
file split and a neighboring Lunnen Ground 14 entry that 6.12 lacks. The
backport is still a one-line insert into `alc269_fixup_tbl` in
`sound/pci/hda/patch_realtek.c`.
Verification:
- [Phase 1] Parsed tags on `253010acfc8ad`: author SOB, maintainer SOB,
msgid Link; no Fixes/Reported-by/Cc: stable
- [Phase 2] Diff: +1 `SND_PCI_QUIRK(0x2782, 0xa128, "Positivo N15RPE-S",
ALC269_FIXUP_LIMIT_INT_MIC_BOOST)`
- [Phase 2] Read `alc269_fixup_limit_int_mic_boost()` at
`patch_realtek.c:6661-6690`; confirmed it clamps internal-mic amp
steps to 0–1
- [Phase 2] Confirmed `[ALC269_FIXUP_LIMIT_INT_MIC_BOOST]` exists at
line 8711 and chains to `ALC269_FIXUP_THINKPAD_ACPI` (same as other
Positivo limit-boost entries)
- [Phase 3] `git merge-base --is-ancestor 3e0d611b2045b HEAD` — fixup
present (v3.10)
- [Phase 3] `git merge-base --is-ancestor 253010acfc8ad HEAD` —
candidate **not** in this tree
- [Phase 3] `git log --grep=N15RPE -- sound/pci/hda/` — empty
- [Phase 3] Grep `0xa128` in `patch_realtek.c` — no match
- [Phase 3] Same-class commits in tree: `d44418f5024f6` (ARN50),
`86a433862912f` (N14AP7)
- [Phase 3] Author has 10 Realtek HDA quirk commits in this tree
- [Phase 4] `b4 dig -c 253010acfc8ad` → msgid
20260805154518.19093-1-edson.drosdeck@gmail.com
- [Phase 4] `b4 dig -a`: v1 only
- [Phase 4] `b4 dig -w`: To tiwai, Cc linux-sound / perex / Realtek
- [Phase 4] LKML/Patchew: Takashi “Applied to for-next”; no NAK
- [Phase 4] UNVERIFIED: lore.kernel.org/stable search HTTP 403
- [Phase 5] `patch_alc269()` line 12583 uses `alc269_fixup_tbl`
- [Phase 6] `git describe HEAD` = p-6.12-2-gd38d58a4e0359; kernelversion
6.12.111
- [Phase 6] Local file is `sound/pci/hda/patch_realtek.c`; `alc269.c`
does not exist; insert after 0x2782/0x4900 before 0x7017/0x2014
- [Phase 8] Failure mode: noisy/excessive internal mic boost on one
laptop; not a crash
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index f2b0eb8501a78..5098d3f375316 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -7646,6 +7646,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x2782, 0x1705, "MEDION E15433", ALC269VC_FIXUP_INFINIX_Y4_MAX),
SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME),
SND_PCI_QUIRK(0x2782, 0x4900, "MEDION E15443", ALC233_FIXUP_MEDION_MTL_SPK),
+ SND_PCI_QUIRK(0x2782, 0xa128, "Positivo N15RPE-S", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
SND_PCI_QUIRK(0x2782, 0xa212, "Lunnen Ground 14", ALC269VC_FIXUP_LUNNEN_GROUND_14),
SND_PCI_QUIRK(0x7017, 0x2014, "Star Labs StarFighter", ALC233_FIXUP_STARLABS_STARFIGHTER),
SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.15] ALSA: hda/realtek: add missing error checks for COEF index reads in alc269
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (10 preceding siblings ...)
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Limit mic boost on Positivo N15RPE-S Sasha Levin
@ 2026-10-19 13:46 ` Sasha Levin
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-6.12] ASoC: rt712-sdca: Pull high JD2 to prevent from entering TV mode Sasha Levin
` (49 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:46 UTC (permalink / raw)
To: patches, stable
Cc: Bob Song, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Bob Song <songxiebing@kylinos.cn>
[ Upstream commit 5b106b40ed22098f2bc049efb645148d038444bd ]
alc_read_coef_idx() and alc_read_coefex_idx() can return -1 on error
via snd_hda_codec_read(). Several codec initialization and shutdown
functions save these return values and later write them back to
hardware registers without checking for errors, potentially corrupting
COEF register state on a read failure.
Add error checks in:
- alc282_init() and alc282_shutup(): check coef78 before write-back
- alc285_hp_init(): check coef38/coef0d/coef36 before update, check
val before write-back, and break polling loop on error
- alc294_hp_init(): break polling loop on read error
Signed-off-by: Bob Song <songxiebing@kylinos.cn>
Link: https://patch.msgid.link/20260730015302.253008-1-songxiebing@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This tree is **6.1.188**. The unguarded COEF save/restore paths are
present in `sound/pci/hda/patch_realtek.c`, and the same class of bug
already went to stable in 2014 because writing a failed COEF read can
stall the codec.
## Phase 1: Commit message forensics
**Step 1.1 — Subject**
Record: `[ALSA/hda/realtek] [add] missing error checks for COEF index
reads in alc269`
**Step 1.2 — Tags**
Record:
- `Signed-off-by: Bob Song <songxiebing@kylinos.cn>` (author)
- `Link: https://patch.msgid.link/20260730015302.253008-1-
songxiebing@kylinos.cn`
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` (ALSA maintainer)
- No `Fixes:`, `Reported-by:`, `Tested-by:`, `Reviewed-by:`, `Cc:
stable` (absence expected)
- Ignore any pipeline `Signed-off-by: Sasha Levin` / `[Upstream commit
...]` if present
**Step 1.3 — Body**
Record:
- Bug: `alc_read_coef_idx()` / `alc_read_coefex_idx()` can return `-1`
via `snd_hda_codec_read()`. Init/shutdown save that value and write it
back.
- Symptom: COEF register corruption on read failure (wrong headphone-amp
/ depop state; historically this class of write can stall the codec).
- Root cause: missing `!= -1` checks on save/restore and on depop
polling.
- No version bounds in the message.
**Step 1.4 — Hidden bug fix?**
Record: Yes. “Add missing error checks” is a real error-path fix, not
style. Same pattern as `alc_update_coefex_idx()` and
`alc269_fill_coef()` in this tree.
## Phase 2: Diff analysis
**Step 2.1 — Inventory**
Record:
- File in the candidate: `sound/hda/codecs/realtek/alc269.c` (`+14/-8`)
- Functions: `alc282_init`, `alc282_shutup`, `alc285_hp_init`,
`alc294_hp_init`
- Scope: single-file surgical fix
**Step 2.2 — Flow change**
Record:
- `alc282_init` / `alc282_shutup`: save coef 0x78, temporarily write
`0x9004`, then restore. After: restore only if `coef78 != -1`.
- `alc285_hp_init`: depop poll `val & 0x8000` for up to 20×50ms, then
write `val` and restore coef 0x38/0x0d/0x36. After: stop poll on `-1`;
skip those writes if the saved/read value is `-1`.
- `alc294_hp_init`: same poll pattern on bit `0x0080`; after: break on
`-1`. No val write-back here.
**Step 2.3 — Bug mechanism**
Record: Logic / hardware-state corruption on error.
- `codec_read()` in this tree returns `-1` when `snd_hdac_exec_verb()`
fails (`sound/hda/hdac_device.c`).
- COEF payload is 16-bit, so `-1` becomes `0xFFFF` on write.
- `alc_update_coef_idx(..., mask, coefXX)` with `coefXX == -1` does
`(current & ~mask) | 0xFFFFFFFF` and sets every bit.
- `val & 0x8000` is true for `-1`, so the depop loop always runs the
full ~1s then writes `0xFFFF`.
**Step 2.4 — Fix quality**
Record: Obviously correct and matches existing `if (val != -1)` guards.
Success path unchanged. Regression risk is low: skipping a restore when
there is no valid saved value is safer than writing `0xFFFF`.
## Phase 3: Git history
**Step 3.1 — Blame / introduction**
Record:
- ALC282 save/restore: `7b5c7a0240b11` (2014) “Fix the noise after
suspend and resume on ALC282 codec” — ancestor of this HEAD.
- ALC285 HP init: `3c24e48330adf` (2021) — ancestor of this HEAD.
- 2014 COEF-guard: `f3ee07d8b6e06` “Avoid setting wrong COEF on ALC269 &
co” — ancestor of this HEAD; `Cc: stable`; documented that writing
after a `-1` read can stall the codec and broke resume on Acer AO725.
**Step 3.2 — Fixes: tag**
Record: None. The incomplete coverage of `f3ee07d8b6e06` is the
historical analogue.
**Step 3.3 — Related file history**
Record: Recent `patch_realtek.c` commits are quirks, not this fix. `git
log --grep="missing error checks"` / `"COEF index reads"` on this file:
no hit. Candidate `5b106b40ed220` is **not** an ancestor of HEAD.
**Step 3.4 — Author**
Record: Bob Song (Kylinos), not the ALSA maintainer. Takashi Iwai
applied it after a v1→v2 split.
**Step 3.5 — Dependencies**
Record: Standalone. Needs only `alc_read_coef*_idx()` returning `-1`,
which this tree already has. No new helpers.
## Phase 4: Mailing list
**Step 4.1 — Original discussion**
Record: `b4 dig -c 5b106b40ed220` →
https://patch.msgid.link/20260730015302.253008-1-songxiebing@kylinos.cn
- v1 combined this with a `codec->bus->pci` NULL check.
- Takashi: “Could you split the NULL check to another patch? Basically
it's a completely different sort of fix from others.”
- v2: this COEF patch only. Takashi: “Applied to for-next branch.
Thanks.”
- No NAK, no stable nomination, no reviewer concern about the COEF
checks.
**Step 4.2 — Recipients (`b4 dig -w`)**
Record: `tiwai@suse.com`, `perex@perex.cz`, `linux-sound@`, `linux-
kernel@`. Maintainer was To: and applied it.
**Step 4.3 — Bug report**
Record: No syzbot/bugzilla for *these* sites. The stall/resume failure
for the same `-1` write pattern is documented in `f3ee07d8b6e06` /
bugzilla 52181.
**Step 4.4 — Series**
Record: v2 series patch 1/2 is this fix; patch 2/2 is the PCI NULL check
(separate). This patch is self-contained.
**Step 4.5 — Stable list**
Record: lore.kernel.org WebFetch returned 403 (Anubis). UNVERIFIED
whether stable@ already discussed this specific commit. Full linux-sound
thread was recovered via `b4 dig -m`.
## Phase 5: Code semantics (this tree)
**Step 5.1 — Functions**
Record: `alc282_init`, `alc282_shutup`, `alc285_hp_init`,
`alc294_hp_init` in `sound/pci/hda/patch_realtek.c`.
**Step 5.2 — Callers (verified)**
Record:
- `alc282_init` / `alc282_shutup`: codec `0x10ec0282` (`spec->init_hook`
/ `spec->shutup`).
- `alc285_hp_init`: from `alc225_init` on boot and S3/S4 resume (skipped
only for ALC287/ALC245).
- `alc225_init`: ALC215/245/285/289, ALC225/295/299, ALC287.
- `alc294_hp_init`: from `alc294_init` on boot / S4 restore;
ALC234/274/294 and ALC700.
- `alc_init()` runs `spec->init_hook`; `.init = alc_init`.
- `alc_suspend()` → `alc_shutup()` → `spec->shutup`; `alc_resume()` →
`patch_ops.init`.
**Step 5.3 — Callees**
Record: `alc_read_coef*_idx`, `alc_write_coef*_idx`,
`alc_update_coef*_idx`, `snd_hda_codec_write`, `msleep`.
**Step 5.4 — Reachability**
Record: Yes. Probe, suspend, and resume on common Realtek laptop codecs.
Not an obscure config path.
**Step 5.5 — Similar patterns**
Record: Already guarded in this file:
- `__alc_update_coefex_idx()`: `if (val != -1)`
- `alc269_fill_coef()`: `if (val != -1 && ...)` before write
These four functions were the remaining save/restore holes.
## Phase 6: This checkout (6.1.188)
**Step 6.1 — Does the buggy code exist?**
Record: Yes. Unguarded write-backs:
```3429:3431:sound/pci/hda/patch_realtek.c
/* Headphone capless set to normal mode */
alc_write_coef_idx(codec, 0x78, coef78);
}
```
```3465:3468:sound/pci/hda/patch_realtek.c
alc_auto_setup_eapd(codec, false);
alc_shutup_pins(codec);
alc_write_coef_idx(codec, 0x78, coef78);
}
```
```3718:3727:sound/pci/hda/patch_realtek.c
val = alc_read_coefex_idx(codec, 0x58, 0x00);
for (i = 0; i < 20 && val & 0x8000; i++) {
msleep(50);
val = alc_read_coefex_idx(codec, 0x58, 0x00);
} /* Wait for depop procedure finish */
alc_write_coefex_idx(codec, 0x58, 0x00, val); /* write back the
result */
alc_update_coef_idx(codec, 0x38, 1<<4, coef38);
```
Same unguarded poll in `alc294_hp_init`. Introduced 2014/2021; both are
in this tree.
**Step 6.2 — Backport difficulty**
Record: Minor path rework. Candidate path
`sound/hda/codecs/realtek/alc269.c` does not exist here; equivalent code
is `sound/pci/hda/patch_realtek.c`. Function bodies match the pre-patch
logic. Not a semantic conflict.
**Step 6.3 — Already fixed here?**
Record: No. `git merge-base --is-ancestor 5b106b40ed220 HEAD` failed. No
later substitute fix in this file.
## Phase 7: Subsystem
**Step 7.1**
Record: ALSA HD-audio Realtek codec. **IMPORTANT** (default audio on a
huge set of laptops).
**Step 7.2**
Record: Mature driver; current 6.1.y activity is mostly quirks. These
init/shutup paths have been stable for years, which is why leftover `-1`
write-backs still matter.
## Phase 8: Impact and risk
**Step 8.1 — Who**
Record: Users of ALC282, ALC215/225/285/289, ALC225/295/299,
ALC234/274/294, ALC700 — typical `CONFIG_SND_HDA_CODEC_REALTEK` x86
laptops.
**Step 8.2 — Trigger**
Record: Codec COEF read returns `-1` (verb timeout, invalid COEF on a
variant, flaky link during suspend/resume). Not an unprivileged syscall
exploit; it is a common device PM path.
**Step 8.3 — Failure mode**
Record: Wrong COEF restore / depop result. Severity **HIGH** for audio:
headphone noise, failed depop, or codec stall (the failure
`f3ee07d8b6e06` already shipped to stable). Not a kernel oops by itself.
**Step 8.4 — Ratio**
Record: Benefit medium-high (PM path on common hardware, same class as a
prior stable fix). Risk very low (~14 lines of `!= -1` guards, success
path identical).
## Phase 9: Synthesis
**Evidence FOR**
- Real write of error sentinel `-1`/`0xFFFF` into codec COEF state.
- `alc_update_coef_idx(..., saved)` with `saved == -1` sets all bits on
a register that may still be readable.
- Depop poll treats `-1` as “still busy” for a full second.
- Same class as `f3ee07d8b6e06` (codec stall / resume failure, `Cc:
stable`).
- Small, obviously correct, maintainer-applied.
- Buggy functions exist in this 6.1.188 tree and are not fixed.
**Evidence AGAINST**
- No user report for these four sites.
- Exact patch needs a file-path backport (`alc269.c` →
`patch_realtek.c`).
- Static-analysis style; trigger is an already-failing verb.
**Unresolved**
- lore.kernel.org HTTP 403 for stable@ search (thread itself was
retrieved with b4).
**Stable rules**
1. Obviously correct and tested? **PASS** (maintainer applied v2;
success path unchanged)
2. Real user-visible bug? **PASS** (bad COEF restore on
init/suspend/resume)
3. Important (stall / broken audio / register corruption)? **PASS**
(same class as the 2014 stable COEF-stall fix)
4. Small and contained? **PASS** (`+14/-8`, four local checks)
5. No new features/APIs? **PASS**
6. Can apply here? **PASS** with a trivial path backport to
`patch_realtek.c`
**Exception category:** none (not an ID/quirk/DT/build/docs exception).
It is a normal small bugfix.
This should go into this 6.1.188 tree. The bug is in the local
`alc282_*` / `alc285_hp_init` / `alc294_hp_init` paths; the fix is a few
`!= -1` guards that this tree already uses elsewhere.
Verification:
- [Phase 1] Parsed tags: author Bob Song; Link msgid; SOB Takashi Iwai;
no Fixes/Reported-by/Cc stable
- [Phase 2] Diff: 14 insertions / 8 deletions; four functions; skip
write-back and stop poll on `-1`
- [Phase 2] `codec_read()` in this tree returns `-1` on
`snd_hdac_exec_verb()` failure (`sound/hda/hdac_device.c:988-997`)
- [Phase 3] `git merge-base --is-ancestor 7b5c7a0240b11 HEAD` — yes
(ALC282 write-back, 2014)
- [Phase 3] `git merge-base --is-ancestor 3c24e48330adf HEAD` — yes
(alc285_hp_init, 2021)
- [Phase 3] `git merge-base --is-ancestor f3ee07d8b6e06 HEAD` — yes
(2014 COEF-guard, Cc:stable, codec stall)
- [Phase 3] `git merge-base --is-ancestor 5b106b40ed220 HEAD` — no (fix
not in this tree)
- [Phase 4] `b4 dig -c 5b106b40ed220`: v1 split requested, v2 applied;
no NAK
- [Phase 4] UNVERIFIED: lore.kernel.org/stable search (HTTP 403)
- [Phase 5] Callers: `alc_init` → init_hook; `alc_suspend` → shutup;
`alc_resume` → init; vendor IDs 0x10ec0282 / 0215 / 0225 / 0234 / 0285
/ 0294 / …
- [Phase 6] `git describe HEAD`: `p-6.1-2-g8ee893656ef69`; `make
kernelversion`: **6.1.188**
- [Phase 6] Buggy code present in `sound/pci/hda/patch_realtek.c` lines
3430, 3467, 3719-3727, 3992
- [Phase 6] Target file `sound/hda/codecs/realtek/alc269.c` missing
here; equivalent functions exist
- [Phase 8] Failure mode: COEF corruption / possible codec stall on
resume; severity HIGH for audio, not a kernel oops
**YES**
sound/hda/codecs/realtek/alc269.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index d88627558150f..3364f6ad91fcb 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -296,7 +296,8 @@ static void alc282_init(struct hda_codec *codec)
msleep(100);
/* Headphone capless set to normal mode */
- alc_write_coef_idx(codec, 0x78, coef78);
+ if (coef78 != -1)
+ alc_write_coef_idx(codec, 0x78, coef78);
}
static void alc282_shutup(struct hda_codec *codec)
@@ -333,7 +334,8 @@ static void alc282_shutup(struct hda_codec *codec)
alc_auto_setup_eapd(codec, false);
alc_shutup_pins(codec);
- alc_write_coef_idx(codec, 0x78, coef78);
+ if (coef78 != -1)
+ alc_write_coef_idx(codec, 0x78, coef78);
}
static const struct coef_fw alc283_coefs[] = {
@@ -585,15 +587,19 @@ static void alc285_hp_init(struct hda_codec *codec)
alc_write_coefex_idx(codec, 0x58, 0x00, 0xf888); /* HP depop procedure start */
val = alc_read_coefex_idx(codec, 0x58, 0x00);
- for (i = 0; i < 20 && val & 0x8000; i++) {
+ for (i = 0; i < 20 && val != -1 && val & 0x8000; i++) {
msleep(50);
val = alc_read_coefex_idx(codec, 0x58, 0x00);
} /* Wait for depop procedure finish */
- alc_write_coefex_idx(codec, 0x58, 0x00, val); /* write back the result */
- alc_update_coef_idx(codec, 0x38, 1<<4, coef38);
- alc_update_coef_idx(codec, 0x0d, 0x110, coef0d);
- alc_update_coef_idx(codec, 0x36, 3<<13, coef36);
+ if (val != -1)
+ alc_write_coefex_idx(codec, 0x58, 0x00, val); /* write back the result */
+ if (coef38 != -1)
+ alc_update_coef_idx(codec, 0x38, 1<<4, coef38);
+ if (coef0d != -1)
+ alc_update_coef_idx(codec, 0x0d, 0x110, coef0d);
+ if (coef36 != -1)
+ alc_update_coef_idx(codec, 0x36, 3<<13, coef36);
msleep(50);
alc_update_coef_idx(codec, 0x4a, 1<<15, 0);
@@ -858,7 +864,7 @@ static void alc294_hp_init(struct hda_codec *codec)
/* Wait for depop procedure finish */
val = alc_read_coefex_idx(codec, 0x58, 0x01);
- for (i = 0; i < 20 && val & 0x0080; i++) {
+ for (i = 0; i < 20 && val != -1 && val & 0x0080; i++) {
msleep(50);
val = alc_read_coefex_idx(codec, 0x58, 0x01);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.12] ASoC: rt712-sdca: Pull high JD2 to prevent from entering TV mode
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (11 preceding siblings ...)
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-5.15] ALSA: hda/realtek: add missing error checks for COEF index reads in alc269 Sasha Levin
@ 2026-10-19 13:46 ` Sasha Levin
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Enable mute LEDs on HP Spectre x360 16-aa0xxx Sasha Levin
` (48 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:46 UTC (permalink / raw)
To: patches, stable
Cc: Jack Yu, Mark Brown, Sasha Levin, oder_chiou, lgirdwood, perex,
tiwai, linux-sound, linux-kernel
From: Jack Yu <jack.yu@realtek.com>
[ Upstream commit dfb8bc1d286fd97b7cf47e3af5df84cfb068d214 ]
Add a patch setting to prevent ALC712 from entering TV mode which
may cause unexpected issues.
Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://patch.msgid.link/20260820092415.2979641-1-jack.yu@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:
Local tree is **6.12.111** (`p-6.12-3-gc504cf0baa3d8`). The candidate is
mainline `dfb8bc1d286fd97b7cf47e3af5df84cfb068d214`. It is not in this
checkout; the VB init path it patches is.
## Phase 1: Commit message forensics
**Step 1.1 — Subject**
- Record: `[ASoC/rt712-sdca] [Pull high] Pull JD2 high so ALC712 does
not enter TV mode`
**Step 1.2 — Tags**
- Record:
- `Signed-off-by: Jack Yu <jack.yu@realtek.com>` (vendor author)
- `Link: https://patch.msgid.link/20260820092415.2979641-1-
jack.yu@realtek.com`
- `Signed-off-by: Mark Brown <broonie@kernel.org>` (ASoC maintainer)
- No `Fixes:`, `Reported-by:`, `Tested-by:`, `Reviewed-by:`, `Acked-
by:`, or `Cc: stable` (absence is expected for this review)
- Pipeline `Signed-off-by: Sasha Levin` / `[Upstream commit ...]`
ignored
**Step 1.3 — Body**
- Record:
- Bug: ALC712 can enter **TV mode** if JD2 is not pulled high
- Symptom: “unexpected issues” only — no stack trace, no jack/audio
failure description, no machine name
- Root cause (author): missing vendor register write during VB I/O
init
- Version info: none in the message; change is only in
`rt712_sdca_vb_io_init()`, so version B only
**Step 1.4 — Hidden bug fix?**
- Record: Not disguised cleanup. It is a vendor hardware workaround
worded as “add a patch setting.” That matches HDA/ASoC codec init
quirks, not a refactor.
## Phase 2: Diff analysis
**Step 2.1 — Inventory**
- Record:
- `sound/soc/codecs/rt712-sdca.c`: +1 (write in
`rt712_sdca_vb_io_init`)
- `sound/soc/codecs/rt712-sdca.h`: +1 (`#define RT712_JD_CTL3 0x0b`)
- Scope: single-driver, two-line surgical change
**Step 2.2 — Flow**
- Record: Before, VB init never programmed JD_CTL3. After, every
`rt712_sdca_vb_io_init()` call writes NID `RT712_VENDOR_REG` (0x20),
index 0x0b, value `0x7778` via existing `rt712_sdca_index_write()`.
The write is unconditional (not gated on
`FUNCTION_NEEDS_INITIALIZATION`), so it runs on first attach and later
re-init. Normal init path, not an error path.
**Step 2.3 — Bug mechanism**
- Record: **Hardware workaround / codec quirk.** Jack-detect pin JD2 is
pulled high so the analog frontend stays out of TV (CE) jack mode. The
driver already uses JD1 for HP detection (`rt712->jd_src = RT712_JD1`;
enum has no JD2). This is the same class of change as HDA Realtek
pin/coef quirks.
**Step 2.4 — Fix quality**
- Record: Minimal and matches surrounding vendor init writes. Regression
risk is low: one extra MBQ register write at SoundWire attach.
Theoretical risk is a board that needed JD2 floating/low; this driver
does not implement JD2 as a jack source, and Realtek submitted the
value for all VB parts. Magic `0x7778` is undocumented but typical for
this driver.
## Phase 3: Git history
**Step 3.1 — Blame**
- Record: Insertion point in this tree is after the `func_status` debug
print, blamed to `936abb09c1c7c` (“ASoC: rt712-sdca: add the function
for version B”, Shuming Fan, 2024-06-20). `RT712_JD_CTL1` came from
that same commit. Driver itself landed in `6c39710da75ca` (2023-02).
VB init has been in 6.12 since the branch.
**Step 3.2 — Fixes: tag**
- Record: None. Missing init is the “bug”; there is no later bisect
commit that introduced TV mode.
**Step 3.3 — File history**
- Record: Recent in this tree: `8ad30bd5c1088` (reset at io_init for
silent headphone, already backported; that is VA calibration, not this
JD2 write). No other JD_CTL3 work. Standalone, not patch X/Y.
**Step 3.4 — Author**
- Record: Jack Yu is a Realtek ASoC contributor (`jack.yu@realtek.com`).
Other codec work in this tree includes rt722/rt5682s/rt5645 fixes.
Recipients in the original mail include Shuming Fan and other Realtek
codec people.
**Step 3.5 — Dependencies**
- Record: Needs `rt712_sdca_index_write()`, `RT712_VENDOR_REG`, and
`rt712_sdca_vb_io_init()` — all present. No new helpers. Applies
standalone.
## Phase 4: Mailing list / external
**Step 4.1 — Original discussion**
- Record: `b4 dig -c dfb8bc1d286fd97b7cf47e3af5df84cfb068d214` →
https://patch.msgid.link/20260820092415.2979641-1-jack.yu@realtek.com
- `b4 dig -a`: **v1 only**, no later revision
- Thread (mbox): patch + Mark Brown “Applied to … for-7.3”. **No NAK, no
review comments, no Cc: stable in review**
- Takashi Iwai then included it in **sound fixes for 7.3-rc1** (LKML
pull, listed under “Codec fixes for … rt712 …”)
**Step 4.2 — Recipients (`b4 dig -w`)**
- Record: `broonie@kernel.org`, `lgirdwood@gmail.com`, `alsa-devel@alsa-
project.org`, Realtek codec engineers (`shumingf`, `flove`,
`oder_chiou`, `derek.fang`), MediaTek `Trevor.Wu`. ASoC maintainers
were on To.
**Step 4.3 — Bug report**
- Record: No bugzilla/syzbot/user report. Symptom stays vendor-stated
“unexpected issues.”
**Step 4.4 — Series**
- Record: Standalone 1/1. Later mainline `d56fe35` (“reconfigure PLL2 to
fix calibration time-out”) is a **different** Jack Yu fix, not a
prerequisite or revert of JD_CTL3.
**Step 4.5 — Stable list**
- Record: lore.kernel.org HTTP is 403 from this environment. No stable-
thread evidence found via b4. UNVERIFIED: whether anyone already asked
stable@ for this SHA.
## Phase 5: Semantic / call chain
**Step 5.1 — Functions**
- Record: `rt712_sdca_vb_io_init()` only (plus header define).
**Step 5.2 — Callers**
- Record: `rt712_sdca_io_init()` → if `version_id != RT712_VA` →
`rt712_sdca_vb_io_init()`. `rt712_sdca_io_init()` is called from
`rt712_sdca_update_status()` in `rt712-sdca-sdw.c` when the SoundWire
slave is `SDW_SLAVE_ATTACHED` and `hw_init` is false. That is
boot/resume enumeration, not a syscall hot path.
**Step 5.3 — Callees**
- Record: `rt712_sdca_index_write()` → `regmap_write()` on `mbq_regmap`.
Same helper used throughout this file.
**Step 5.4 — Reachability**
- Record: Yes, from userspace-visible audio: plugging/using headset on
Intel SoundWire laptops with RT712 VB (ACPI match tables exist for
MTL/TGL/LNL in this tree). Unprivileged users do not program the
register; they hit it by using audio after attach.
**Step 5.5 — Similar patterns**
- Record: Many sibling vendor `rt712_sdca_index_write()` calls in the
same function. No other `TV mode` / `JD_CTL3` in this tree. `0x7778`
appears in HDA `ALC256_FIXUP_ASUS_HPE` as an unrelated EAPD coef —
same number, different codec, not this bug.
## Phase 6: This tree (6.12.y)
**Step 6.1 — Buggy code present?**
- Record: Yes. `rt712_sdca_vb_io_init()` at
`sound/soc/codecs/rt712-sdca.c:1721` has the exact pre-patch context.
`RT712_JD_CTL3` is **not** defined. `git merge-base --is-ancestor
dfb8bc1d… HEAD` fails (commit not here). `936abb09c1c7c` **is** an
ancestor. Bug/missing workaround exists since VB support (v6.11-era,
in 6.12).
**Step 6.2 — Backport difficulty**
- Record: **Clean apply with line offset.** Mainline hunk is ~1779; here
the same lines are ~1734. Context strings match; `RT712_JD_CTL3` is
free in the header.
**Step 6.3 — Related fixes already here?**
- Record: `8ad30bd5c1088` resets the codec for VA silent headphones. It
does not pull JD2 / program JD_CTL3. No substitute for this
workaround.
## Phase 7: Subsystem
**Step 7.1**
- Record: ASoC codec driver (`sound/soc/codecs/`). Criticality:
**IMPORTANT** for SoundWire Intel laptops with RT712; not core mm/fs.
Peripheral relative to the whole kernel, but a shipping laptop codec.
**Step 7.2**
- Record: Driver is mature in 6.12 (added 2023, VB in 2024). This is a
late vendor init correction, not churn from a brand-new subsystem.
## Phase 8: Impact and risk
**Step 8.1 — Who**
- Record: Config `SND_SOC_RT712_SDCA_SDW` + RT712/713/716/717 **version
B** on SoundWire (Intel MTL/TGL/LNL match files in-tree). Not
universal.
**Step 8.2 — Trigger**
- Record: Device attach / `io_init`. Common for those machines. Not a
race. Not unprivileged memory-safety.
**Step 8.3 — Failure mode**
- Record: Author did not specify. For Realtek PC codecs, TV mode
typically means **wrong jack detect / headset routing / analog
misbehavior**, not an oops. Severity **MEDIUM** as described, **HIGH**
if it silences the jack on real VB laptops. Exact user symptom is
**not independently verified**.
**Step 8.4 — Benefit vs risk**
- Record: Benefit: hardware init correction from the vendor, 2 lines,
same class as HDA/USB quirks that stable takes. Risk: very low (one
init write, no locking/API change). Ratio favors backport.
## Phase 9: Synthesis
**Evidence FOR**
- Two-line vendor codec workaround; hardware-quirk exception in the
stable rules
- Target function and surrounding init sequence exist in 6.12
- Applies with offset only
- ASoC maintainer applied it; it went in **sound fixes for 7.3-rc1**
- RT712 is used on current Intel SoundWire laptops; this tree already
took a related headphone-init fix
- Driver defaults to JD1; pulling unused JD2 high is consistent with
PC/laptop use
**Evidence AGAINST**
- Commit text is vague (“may cause unexpected issues”); no reporter, no
machine, no crash
- Not a UAF/deadlock/corruption class bug
- Magic coef with no bit documentation
- VB-only (VA machines, e.g. some Lunar Lake ThinkPads, are unaffected)
**Unresolved**
- Exact user-visible TV-mode symptom (UNVERIFIED)
- Whether stable@ already discussed this SHA (lore HTTP 403)
**Stable rules checklist**
1. Obviously correct and tested? **PASS** — one existing helper write;
vendor + Mark Brown; no NAK
2. Real bug affecting users? **PASS** — missing hardware init that lets
the codec enter the wrong analog mode (vendor statement; typical
jack/headset breakage, not proven with a public report)
3. Important? **PASS** under the **audio codec quirk** exception
(headphone/JD misconfig), not as a panic/CVE
4. Small and contained? **PASS** — +2 lines, one driver
5. No new features/APIs? **PASS** — existing init path, existing write
helper
6. Can apply to this tree? **PASS** — context matches; JD_CTL3 unused
**Exception category:** Hardware workaround / audio codec quirk (JD pin
config), analogous to HDA Realtek coef/pin quirks.
This is a contained vendor register quirk for hardware that 6.12 already
supports. Benefit is correct analog/jack behavior on RT712 VB; risk is a
single init write. It should be backported to this tree.
Verification:
- [Phase 1] Parsed subject/tags/body from the provided message and
GitHub `dfb8bc1d286fd97b7cf47e3af5df84cfb068d214`
- [Phase 2] Diff is +1 write in `rt712_sdca_vb_io_init` and +1 `#define
RT712_JD_CTL3 0x0b`
- [Phase 3] `git blame` on this tree: insertion point from
`936abb09c1c7c` (2024-06-20); `git merge-base --is-ancestor
936abb09c1c7c HEAD` true
- [Phase 3] `git merge-base --is-ancestor
dfb8bc1d286fd97b7cf47e3af5df84cfb068d214 HEAD` false (not in 6.12)
- [Phase 3] `git log --oneline -20 -- sound/soc/codecs/rt712-sdca.c`:
related `8ad30bd5c1088` is a different VA reset fix
- [Phase 4] `b4 dig -c dfb8bc1d…` / `-a` / `-w` / `-m`: v1, alsa-devel,
applied by Mark Brown to for-7.3; no NAK
- [Phase 4] LKML: Takashi listed this under 7.3-rc1 sound fixes
- [Phase 4] lore.kernel.org WebFetch/curl: 403
- [Phase 5] Callers: `rt712_sdca_update_status` → `rt712_sdca_io_init` →
`rt712_sdca_vb_io_init`; intel ACPI match files reference rt712
- [Phase 6] `git describe HEAD` / `make kernelversion`: 6.12.111; hunk
context present; `RT712_JD_CTL3` absent
- [Phase 8] Failure mode: TV-mode analog/JD misbehavior (vendor); not a
kernel oops — UNVERIFIED exact symptom
- UNVERIFIED: datasheet meaning of `0x7778`; whether every VB board
needs it; stable@ discussion
**YES**
sound/soc/codecs/rt712-sdca.c | 1 +
sound/soc/codecs/rt712-sdca.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/sound/soc/codecs/rt712-sdca.c b/sound/soc/codecs/rt712-sdca.c
index d8b40663fa92f..a799b8aab73aa 100644
--- a/sound/soc/codecs/rt712-sdca.c
+++ b/sound/soc/codecs/rt712-sdca.c
@@ -1786,6 +1786,7 @@ static void rt712_sdca_vb_io_init(struct rt712_sdca_priv *rt712)
dev_dbg(dev, "%s jack/mic/amp func_status=0x%x, 0x%x, 0x%x\n",
__func__, jack_func_status, mic_func_status, amp_func_status);
+ rt712_sdca_index_write(rt712, RT712_VENDOR_REG, RT712_JD_CTL3, 0x7778);
/* DMIC */
if ((mic_func_status & FUNCTION_NEEDS_INITIALIZATION) || (!rt712->first_hw_init)) {
rt712_sdca_index_write(rt712, RT712_VENDOR_HDA_CTL, RT712_DMIC2_FU_IT_FLOAT_CTL, 0x1526);
diff --git a/sound/soc/codecs/rt712-sdca.h b/sound/soc/codecs/rt712-sdca.h
index 7ab7d5feb50a2..46740281a5c17 100644
--- a/sound/soc/codecs/rt712-sdca.h
+++ b/sound/soc/codecs/rt712-sdca.h
@@ -74,6 +74,7 @@ struct rt712_dmic_kctrl_priv {
#define RT712_JD_PRODUCT_NUM 0x00
#define RT712_ANALOG_BIAS_CTL3 0x04
#define RT712_JD_CTL1 0x09
+#define RT712_JD_CTL3 0x0b
#define RT712_IO_CTL 0x0c
#define RT712_LDO2_3_CTL1 0x0e
#define RT712_PARA_VERB_CTL 0x1a
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Enable mute LEDs on HP Spectre x360 16-aa0xxx
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (12 preceding siblings ...)
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-6.12] ASoC: rt712-sdca: Pull high JD2 to prevent from entering TV mode Sasha Levin
@ 2026-10-19 13:46 ` Sasha Levin
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-5.10] ASoC: codec: max98926: fixup invert setup mask Sasha Levin
` (47 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:46 UTC (permalink / raw)
To: patches, stable
Cc: Shang En Sim, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Shang En Sim <sim@shangen.org>
[ Upstream commit bfcdc1c0eaeae5525c726193568e8d638b2afdc0 ]
The HP Spectre x360 2-in-1 Laptop 16-aa0xxx with PCI subsystem ID
0x103c:0x8c17 only gets the CS35L41 amplifier setup from
ALC287_FIXUP_CS35L41_I2C_2, so the speaker-mute and mic-mute keyboard
LEDs do not work.
Use ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX like subsystem ID 0x8c16 so
the mute LEDs work.
Tested on HP Spectre x360 2-in-1 Laptop 16-aa0xxx.
Signed-off-by: Shang En Sim <sim@shangen.org>
Link: https://patch.msgid.link/20260807055139.58707-1-sim@shangen.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
The local tree is **6.18.53** (`pending-6.18`,
`p-6.18-1-g03b85e06ca9bf`). The buggy `0x8c17` mapping is present here,
and the target AA0XXX fixup already exists.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: [ALSA hda/realtek] [Enable] [map HP Spectre x360 16-aa0xxx SSID
0x8c17 to the mute-LED fixup already used by 0x8c16]
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- Fixes: none (expected for this review)
- Reported-by: none
- Tested-by: none as a tag; body says the author tested on the 16-aa0xxx
- Reviewed-by: none
- Acked-by: none
- Link: https://patch.msgid.link/20260807055139.58707-1-sim@shangen.org
- Cc: stable: none (expected)
- Signed-off-by: Shang En Sim <sim@shangen.org> (author)
- Signed-off-by: Takashi Iwai <tiwai@suse.de> (ALSA maintainer; applied
the patch)
- No syzbot / sanitizer tags
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- Bug: SSID `0x103c:0x8c17` is wired only to
`ALC287_FIXUP_CS35L41_I2C_2`, so CS35L41 amps are set up but speaker-
mute and mic-mute keyboard LEDs do not work.
- Symptom: mute/mic-mute LEDs stay dead on this 16-aa0xxx variant.
- Root cause: sibling `0x8c16` already uses
`ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX`; `0x8c17` was left on the
amp-only quirk.
- Version info: none in the message.
- Author’s fix: use the same AA0XXX fixup as `0x8c16`. Tested on the
16-aa0xxx.
Step 1.4: DETECT HIDDEN BUG FIXES
Record: Not hidden. This is an explicit hardware-quirk correction, not
cleanup disguised as a fix.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- File: `sound/hda/codecs/realtek/alc269.c` (1 hunk)
- Scope: 1 line changed in `alc269_fixup_tbl[]` (SSID string + fixup id)
- Classification: single-file surgical quirk-table update
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record: Before, `SND_PCI_QUIRK(0x103c, 0x8c17, ...)` selected
`ALC287_FIXUP_CS35L41_I2C_2` (`cs35l41_fixup_i2c_two` only). After, the
same SSID selects `ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX`. That fixup
still calls `cs35l41_fixup_i2c_two`, and also applies speaker pin
configs, GPIO amp enable, mute-LED coefbit, and GPIO LED setup. Path:
codec probe via `snd_hda_pick_fixup()`.
Step 2.3: IDENTIFY THE BUG MECHANISM
Record: [Hardware workaround / audio codec quirk] The wrong existing
fixup left mute LEDs (and the extra speaker GPIO/pin work from the 2024
Spectre fixup) unused. The new mapping reuses an already-present fixup.
Step 2.4: ASSESS THE FIX QUALITY
Record: Obviously correct: `0x8c16` and `0x8c17` were added together as
“HP Spectre 16”; `0x8c16` already got the full AA0XXX fixup. One-line
table change, no new API. Regression risk is low: the author tested
0x8c17 hardware; the new fixup still runs the old CS35L41 I2C setup.
Residual risk is that 0x8c17 could differ slightly from 0x8c16 in
speaker pin/GPIO behavior; that is unverified beyond the author’s test.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record: In this tree the `0x8c17` line is attributed to `aeeb85f26c3bb`
(“ALSA: hda: Split Realtek HD-audio codec driver”, 2025-07-09), which is
a file move. The content originated in `aa8e3ef4fe533` (“ALSA:
hda/realtek: Add quirks for various HP ENVY models”, 2024-01-26, first
in v6.9). Both `aa8e3ef4fe533` and `557f6e4ab5ba6` are ancestors of this
HEAD.
Step 3.2: FOLLOW THE FIXES: TAG
Record: No Fixes: tag. The incomplete 0x8c17 mapping has been in the
lineage since v6.9; the AA0XXX fixup landed in `557f6e4ab5ba6` (v6.12)
for 0x8c16 only and left 0x8c17 on the amp-only quirk.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record: Related: `557f6e4ab5ba6` added
`alc245_fixup_hp_spectre_x360_16_aa0xxx` and switched 0x8c16. Recent
`alc269.c` history is other HP mute-LED quirks. This commit is
standalone, not patch X/Y.
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record: Shang En Sim has no other Realtek commits in this history.
Takashi Iwai applied it. This tree already contains many similar HP
mute-LED `SND_PCI_QUIRK` backports.
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record: Needs `ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX` and the 0x8c17
table row. Both exist here. `git apply --check` of `bfcdc1c0eaeae`
succeeded (hunk at offset -491). Standalone.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- `b4 dig -c bfcdc1c0eaeae`:
https://patch.msgid.link/20260807055139.58707-1-sim@shangen.org
- `b4 dig -a`: v1 only (2026-08-06)
- Thread (mbox): Takashi Iwai “Applied to for-next branch now. Thanks.”
No NAK, no stable request, no design concerns.
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record: `b4 dig -w`: To Jaroslav Kysela, Takashi Iwai; Cc linux-sound@.
Maintainer applied it.
Step 4.3: SEARCH FOR THE BUG REPORT
Record: No bugzilla/syzbot link. Evidence is the author’s hardware test
in the commit body. WebFetch of lore/msgid.link returned 403; the thread
was recovered via `b4 dig -m`.
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Standalone. Sibling work is `557f6e4ab5ba6` (already in this
tree).
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: No lore.kernel.org/stable discussion of this subject was found.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: Table `alc269_fixup_tbl[]` only. No function body edited.
Consumed fixup: `alc245_fixup_hp_spectre_x360_16_aa0xxx`.
Step 5.2: TRACE CALLERS
Record: `alc269_probe()` → `snd_hda_pick_fixup(..., alc269_fixup_tbl,
alc269_fixups)` (around line 8517). That is HD-audio codec probe, not a
hot path or IRQ path.
Step 5.3: TRACE CALLEES
Record: New fixup calls `snd_hda_apply_pincfgs`,
`snd_hda_override_conn_list`, `alc_update_gpio_data`,
`cs35l41_fixup_i2c_two`, `alc245_fixup_hp_mute_led_coefbit`,
`alc245_fixup_hp_gpio_led`. Old quirk only called
`cs35l41_fixup_i2c_two`.
Step 5.4: FOLLOW THE CALL CHAIN
Record: PCI/HDA enumeration at boot on this laptop. Userspace mute keys
then drive the LED hooks. Reachable on that hardware without extra
privileges.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Same file already maps 0x8c16 to AA0XXX. Many nearby HP
`SND_PCI_QUIRK` mute-LED entries. This is the same pattern, for the
missed sibling SSID.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record: Yes. `sound/hda/codecs/realtek/alc269.c:6957`:
`SND_PCI_QUIRK(0x103c, 0x8c17, "HP Spectre 16",
ALC287_FIXUP_CS35L41_I2C_2)`
Target enum, function, and `alc269_fixups[]` slot all exist. `git merge-
base --is-ancestor bfcdc1c0eaeae HEAD` is false, so the fix is not in
this tree yet. Incomplete 0x8c17 mapping dates to v6.9; 6.18 still has
it.
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record: Clean apply (`git apply --check` succeeded). File layout matches
mainline (`sound/hda/codecs/realtek/alc269.c`). No rework needed.
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: `557f6e4ab5ba6` is here (0x8c16 + AA0XXX function). 0x8c17 is
still on the amp-only quirk. No substitute fix.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: [ALSA HD-audio Realtek] [IMPORTANT] Common laptop codec path;
this change is one HP SSID only.
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: High. Recent `alc269.c` log is mostly HP/Lenovo/ASUS quirk
additions, including mute LEDs. Mature quirk table, not experimental
code.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: Driver-specific / platform-specific: HP Spectre x360 16-aa0xxx
with PCI SSID 0x103c:0x8c17 only.
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: Every probe of that codec (boot). Mute/mic-mute keys then fail
to light LEDs. Unprivileged users hit it on that laptop. Not a race.
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record: Mute/mic-mute LEDs do not work. The unused AA0XXX path also has
speaker pin/GPIO amp setup that 0x8c16 already gets. Not a panic,
deadlock, or corruption. Severity MEDIUM for that hardware; this is the
documented audio-codec quirk exception.
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record: Benefit high for those users (LEDs, and the same speaker fixup
as 0x8c16). Risk very low: 1-line table change, same fixup already used
by sibling SSID, maintainer-applied, author-tested. Ratio strongly
favors backport.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR:
- Real hardware bug on a shipping HP Spectre x360 16-aa0xxx SSID
- Classic `SND_PCI_QUIRK` audio-codec quirk correction (stable
exception)
- Buggy row and target fixup both exist in 6.18.53
- One-line, applies cleanly, no new API
- Author tested; Takashi Iwai applied
- Sibling 0x8c16 already uses this fixup here
- This tree already takes similar HP mute-LED quirks
AGAINST:
- No crash/security/corruption
- No Fixes:/Cc: stable (not a negative by itself)
- Author is not the subsystem maintainer (mitigated by Iwai applying it)
- Theoretical 0x8c16 vs 0x8c17 hardware difference (mitigated by test on
0x8c17)
UNRESOLVED:
- Could not HTTP-fetch lore (403); thread recovered via b4 mbox
- No independent second-user report
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? PASS — one-line SSID remap; author
tested; maintainer applied
2. Fixes a real bug that affects users? PASS — mute LEDs dead on this
SSID
3. Important issue? PASS under the audio-codec quirk exception (MEDIUM,
not a panic)
4. Small and contained? PASS — 1 line, one table
5. No new features or APIs? PASS — reuses existing fixup
6. Can apply to the local tree? PASS — `git apply --check` succeeded;
prerequisites present
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: Hardware quirk / audio codec `SND_PCI_QUIRK` (HP mute LED +
pin/GPIO). This class is treated as stable material.
Step 9.4: MAKE YOUR DECISION
This tree already has the incomplete 0x8c17 mapping and the AA0XXX
fixup. The commit only points this SSID at that fixup. That is a small,
tested hardware quirk and should be backported.
What the commit solves: 0x8c17 currently only programs CS35L41 amps, so
mute LEDs do not work. After the change it matches 0x8c16.
Risk vs benefit: very low risk, clear user-visible fix on that laptop.
No missing prerequisites in 6.18.53.
Verification:
- [Phase 1] Parsed tags: Link to msgid; SOBs Shang En Sim and Takashi
Iwai; no Fixes/Reported-by/Cc:stable
- [Phase 2] Diff: 1 line in `alc269_fixup_tbl`; 0x8c17
`ALC287_FIXUP_CS35L41_I2C_2` →
`ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX`
- [Phase 2] Confirmed AA0XXX still calls `cs35l41_fixup_i2c_two` plus
mute-LED/GPIO/pin setup (`alc269.c:3550-3590`)
- [Phase 2] Confirmed old quirk is amp-only
(`[ALC287_FIXUP_CS35L41_I2C_2]` → `cs35l41_fixup_i2c_two`)
- [Phase 3] `git blame -L 6954,6960`: 0x8c17 line from split commit
`aeeb85f26c3bb`; origin `aa8e3ef4fe533` (v6.9)
- [Phase 3] `git merge-base --is-ancestor aa8e3ef4fe533 HEAD` true;
`557f6e4ab5ba6` true; `bfcdc1c0eaeae` false
- [Phase 3] `git show 557f6e4ab5ba6`: added AA0XXX for 0x8c16, left
0x8c17 unchanged
- [Phase 4] `b4 dig -c bfcdc1c0eaeae`:
patch.msgid.link/20260807055139.58707-1-sim@shangen.org
- [Phase 4] `b4 dig -a`: v1 only
- [Phase 4] `b4 dig -w`: Kysela, Iwai, linux-sound
- [Phase 4] `b4 dig -m`: Iwai applied to for-next; no NAK
- [Phase 4] WebFetch lore/msgid.link: 403; used mbox instead
- [Phase 4] Stable lore search: no discussion of this patch
- [Phase 5] `alc269_probe()` calls `snd_hda_pick_fixup(...,
alc269_fixup_tbl, ...)`
- [Phase 6] `git describe HEAD`: p-6.18-1-g03b85e06ca9bf; `make
kernelversion`: 6.18.53; branch pending-6.18
- [Phase 6] Buggy line at `alc269.c:6957`; 0x8c16 already AA0XXX at 6956
- [Phase 6] `git show bfcdc1c0eaeae | git apply --check`: succeeded at
offset -491
- [Phase 8] Failure mode: mute LEDs inoperative on SSID 0x8c17; severity
MEDIUM; quirk exception applies
- UNVERIFIED: HTTP lore body (403); whether any 0x8c17 unit differs
electrically from 0x8c16 beyond the author’s test
**YES**
sound/hda/codecs/realtek/alc269.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 5098d3f375316..97ab2269dc472 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -6969,7 +6969,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8bf0, "HP", ALC236_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8c15, "HP Spectre x360 2-in-1 Laptop 14-eu0xxx", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX),
SND_PCI_QUIRK(0x103c, 0x8c16, "HP Spectre x360 2-in-1 Laptop 16-aa0xxx", ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX),
- SND_PCI_QUIRK(0x103c, 0x8c17, "HP Spectre 16", ALC287_FIXUP_CS35L41_I2C_2),
+ SND_PCI_QUIRK(0x103c, 0x8c17, "HP Spectre x360 2-in-1 Laptop 16-aa0xxx", ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX),
SND_PCI_QUIRK(0x103c, 0x8c21, "HP Pavilion Plus Laptop 14-ey0XXX", ALC245_FIXUP_HP_X360_MUTE_LEDS),
SND_PCI_QUIRK(0x103c, 0x8c2d, "HP Victus 15-fa1xxx (MB 8C2D)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
SND_PCI_QUIRK(0x103c, 0x8c30, "HP Victus 15-fb1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.10] ASoC: codec: max98926: fixup invert setup mask
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (13 preceding siblings ...)
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Enable mute LEDs on HP Spectre x360 16-aa0xxx Sasha Levin
@ 2026-10-19 13:46 ` Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-6.1] soundwire: dmi-quirks: Disable ghost Realtek on Asus Expertbook Sasha Levin
` (46 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:46 UTC (permalink / raw)
To: patches, stable
Cc: Kuninori Morimoto, Mark Brown, Sasha Levin, lgirdwood, perex,
tiwai, linux-sound, linux-kernel
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[ Upstream commit dd0ae9a2e19a24c532c9aa80a44f572b4907bcdf ]
invert might have both WCI/BCI mask, but regmap_update_bits() masks
BCI only. It needs both mask. Fixup it.
static int max98926_dai_set_fmt(...)
{
...
switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
case SND_SOC_DAIFMT_NB_NF:
break;
case SND_SOC_DAIFMT_NB_IF:
=> invert = MAX98926_DAI_WCI_MASK;
break; ^^^^^^^^^^^^^^^^^^^^^
case SND_SOC_DAIFMT_IB_NF:
=> invert = MAX98926_DAI_BCI_MASK;
break; ^^^^^^^^^^^^^^^^^^^^^
case SND_SOC_DAIFMT_IB_IF:
=> invert = MAX98926_DAI_BCI_MASK | MAX98926_DAI_WCI_MASK;
break; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
default:
...
}
...
regmap_update_bits(max98926->regmap, MAX98926_FORMAT,
MAX98926_DAI_BCI_MASK, invert);
... ^^^^^^^^^^^^^^^^^^^^^
}
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87wltomc97.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a **6.12.111** tree (`pending-6.12`, `p-6.12-3-gc504cf0baa3d8`).
The candidate is `dd0ae9a2e19a2` (“ASoC: codec: max98926: fixup invert
setup mask”). It is **not** in this checkout; the buggy
`regmap_update_bits()` mask **is**.
---
## PHASE 1: COMMIT MESSAGE FORENSICS
**Step 1.1: PARSE THE SUBJECT LINE**
- Subsystem: `ASoC: codec: max98926`
- Action verb: `fixup`
- Claimed intent: correct the invert-mode bit mask written to the
MAX98926 FORMAT register
Record: **[ASoC/max98926] [fixup] [WCI invert bit never programmed
because update mask is BCI-only]**
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
- `Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>`
(author)
- `Link: https://patch.msgid.link/87wltomc97.wl-
kuninori.morimoto.gx@renesas.com`
- `Signed-off-by: Mark Brown <broonie@kernel.org>` (ASoC maintainer)
- No `Fixes:`, `Reported-by:`, `Tested-by:`, `Reviewed-by:`, `Acked-
by:`, or `Cc: stable` (absence of the last two is expected for this
review)
Record: **Author + ASoC maintainer SOB; lore Link; no user/syzbot
report**
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
The body shows `max98926_dai_set_fmt()` building `invert` as:
- `NB_IF` → `MAX98926_DAI_WCI_MASK`
- `IB_NF` → `MAX98926_DAI_BCI_MASK`
- `IB_IF` → `BCI | WCI`
then calling `regmap_update_bits(..., MAX98926_DAI_BCI_MASK, invert)`.
`regmap_update_bits()` only changes bits in the mask, so WCI is never
written.
Record: **[Bug: WCI invert bit dropped] [Symptom: inverted frame clock
not applied] [No version info] [Root cause: BCI-only mask]**
**Step 1.4: DETECT HIDDEN BUG FIXES**
This is an explicit register-programming bug, not a disguised cleanup.
Record: **Not a hidden fix; it is a real DAI-format bug**
---
## PHASE 2: DIFF ANALYSIS
**Step 2.1: INVENTORY THE CHANGES**
- File: `sound/soc/codecs/max98926.c` (`1 insertion, 1 deletion`)
- Function: `max98926_dai_set_fmt()`
- Scope: single-file, one-line surgical fix
Record: **[max98926.c +1/-1] [max98926_dai_set_fmt] [surgical]**
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Before (this tree, lines 360–363):
```360:364:sound/soc/codecs/max98926.c
regmap_write(max98926->regmap,
MAX98926_FORMAT, MAX98926_DAI_DLY_MASK);
regmap_update_bits(max98926->regmap, MAX98926_FORMAT,
MAX98926_DAI_BCI_MASK, invert);
return 0;
```
`regmap_write()` sets FORMAT to only `DAI_DLY_MASK` (WCI and BCI
cleared). Then update_bits can set BCI, but never WCI.
After: mask is `MAX98926_DAI_BCI_MASK | MAX98926_DAI_WCI_MASK`, so both
invert bits can be set.
Record: **[BCI-only update → BCI|WCI update on DAI set_fmt path]**
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Header bits in this tree:
```525:528:sound/soc/codecs/max98926.h
#define MAX98926_DAI_WCI_MASK (1<<3)
...
#define MAX98926_DAI_BCI_MASK (1<<2)
```
This is a logic/correctness bug: wrong `regmap` mask, so advertised
invert modes do not take effect.
Record: **[Logic/correctness] [WCI never written for NB_IF/IB_IF]**
**Step 2.4: ASSESS THE FIX QUALITY**
Obviously correct: it matches sibling `max98925.c` (already uses `BCI |
WCI`). Minimal. No API/locking/refcount change. Regression risk is near
zero: NB_NF still writes 0 into both bits; IB_NF still sets only BCI.
Record: **[Obviously correct, 1-line] [Very low regression risk]**
---
## PHASE 3: GIT HISTORY INVESTIGATION
**Step 3.1: BLAME THE CHANGED LINES**
`git blame -L 343,363 -- sound/soc/codecs/max98926.c`: the buggy mask is
from `a2e2876aa0bab` (“ASoC: Add max98926 codec driver”, Anish Kumar,
2016-01-14). `git describe --contains a2e2876aa0bab` → `v4.6-rc1~...`.
Present for ~10 years.
Record: **[a2e2876aa0bab, v4.6] [long-standing bug]**
**Step 3.2: FOLLOW THE FIXES: TAG**
No `Fixes:` tag. The introducing commit is in this tree (`git merge-base
--is-ancestor a2e2876aa0bab HEAD` succeeded).
The **identical** bug in the sibling driver was already treated as
stable material:
```
0b51601d4504f4 ASoC: max98925: Fix mask for setting DAI invert mode
...
Cc: stable@vger.kernel.org
```
That 2015 fix is in this tree. max98926 (2016) reintroduced the same
mistake.
Record: **[No Fixes tag; sibling max98925 fix was Cc: stable]
[Introducing commit is in this 6.12 tree]**
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Recent `max98926.c` history in this tree is probe/OF/DAI-terminology
churn, not invert-mask work. No prerequisite refactor. Standalone 1-line
change.
Record: **[No prerequisites] [Standalone]**
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Kuninori Morimoto is a regular ASoC contributor. Nearby work includes
`alc5623` invert tidyup (different driver, “tidyup” not this bug). This
patch is a standalone `[PATCH]`, not patch X/Y.
Record: **[Core ASoC contributor] [Standalone invert-mask fix, not a
series]**
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
The hunk matches this tree exactly. `git show dd0ae9a2e19a2 | git apply
--check` → **APPLY_CLEAN**. No new helpers or structs.
Record: **[No dependencies] [Applies standalone and cleanly]**
---
## PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
`b4 dig -c dd0ae9a2e19a2` → https://patch.msgid.link/87wltomc97.wl-
kuninori.morimoto.gx@renesas.com
`b4 dig -a`: single v1, no later revisions.
Mbox (2 messages): submission + Mark Brown “Applied to for-7.3”. No NAK,
no review concerns, no `Cc: stable` request. Included in the “sound
fixes for 7.3-rc1” pull.
Record: **[v1 only] [Applied by ASoC maintainer] [No objections]
[Treated as a fix in the rc1 pull]**
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
`b4 dig -w` recipients: Jaroslav Kysela, Liam Girdwood, Mark Brown,
Takashi Iwai, linux-sound@. Maintainer applied it the same day.
Record: **[ASoC/ALSA maintainers on To; Mark Brown applied]**
**Step 4.3: SEARCH FOR THE BUG REPORT**
No `Reported-by` / bugzilla / syzbot. Found by code inspection (same
class as Axel Lin’s 2015 max98925 fix).
Record: **[No user report; bug is visible from the code and sibling
driver]**
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Standalone `[PATCH]`. No follow-ups on `all-next` after this commit for
`max98926.c`.
Record: **[Standalone; no later superceding patch]**
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Search for this title on lore stable did not find a prior stable
discussion (unrelated hits only).
Record: **[No stable-list discussion found]**
---
## PHASE 5: CODE SEMANTIC ANALYSIS
**Step 5.1: IDENTIFY KEY FUNCTIONS**
Record: **[`max98926_dai_set_fmt`]**
**Step 5.2: TRACE CALLERS**
Wired as `.set_fmt` in `max98926_dai_ops`. ASoC core
`snd_soc_dai_set_fmt()` in `sound/soc/soc-dai.c` calls
`dai->driver->ops->set_fmt`. `sound/soc/soc-core.c` applies DAI format
from the card/DAI link at setup.
Record: **[Called from ASoC DAI format setup, not a hot IRQ path]**
**Step 5.3: TRACE CALLEES**
`regmap_write` / `regmap_update_bits` on `MAX98926_FORMAT`.
Record: **[Register programming only]**
**Step 5.4: FOLLOW THE CALL CHAIN**
Reachable when a MAX98926 card configures DAI format (DT `dai-format` /
machine driver). Unprivileged users typically cannot change invert
flags, but boot/stream setup hits this. `NB_IF` / `IB_IF` are the broken
cases (`soc-dai.h`: inverted frame).
Record: **[Reachable on DAI setup for this codec] [Broken for inverted
frame clock]**
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
This tree: only `max98926.c` still uses BCI-only. `max98925.c` already
uses `BCI | WCI`.
Record: **[Sibling already fixed; this is the remaining copy of the same
bug]**
---
## PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Yes. `git merge-base --is-ancestor dd0ae9a2e19a2 HEAD` failed (fix not
present). Surrounding code in this tree matches the parent of the
candidate commit. Introduced in v4.6, still here in 6.12.111.
Record: **[Buggy code present at max98926_dai_set_fmt] [Since v4.6]**
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Context is identical; `git apply --check` is clean.
Record: **[Clean apply]**
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
No invert-mask fix for max98926 in this tree. max98925’s equivalent fix
**is** already here.
Record: **[No prior max98926 invert fix; sibling fix already present]**
---
## PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
`sound/soc/codecs/max98926.c` — Maxim MAX98926 speaker amplifier.
`CONFIG_SND_SOC_MAX98926` is selected via `SND_SOC_ALL_CODECS` imply; DT
compatible `maxim,max98926` exists. No in-tree board file found that
hard-codes this codec.
Record: **[ASoC codec driver] [PERIPHERAL, but real hardware]**
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Codec file is mature; little recent functional change.
Record: **[Mature driver; bug is old, not a new-feature regression]**
---
## PHASE 8: IMPACT AND RISK ASSESSMENT
**Step 8.1: DETERMINE WHO IS AFFECTED**
Users of MAX98926 whose DAI link requests inverted word/frame clock
(`NB_IF` or `IB_IF`). Default `NB_NF` is unaffected.
Record: **[Driver-specific; only inverted-frame configurations]**
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Triggered at DAI format setup (card bring-up / PCM start). Common I2S is
`NB_NF` (works). Inverted frame is less common but is a documented,
handled mode in this function. Not a userspace-triggered security issue.
Record: **[DAI setup] [Uncommon invert modes] [Not unprivileged-
exploitable]**
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
WCI never programmed → LRCLK/frame polarity wrong → swapped channels,
DAI desync, or unusable playback. Not a panic/UAF/deadlock.
Record: **[Incorrect audio DAI polarity] [Severity: MEDIUM-HIGH for
affected devices; not CRITICAL crash]**
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
- Benefit: makes advertised invert modes actually work; same class of
fix max98925 already shipped to stable.
- Risk: 1-line mask OR, no API/locking change, applies cleanly.
Record: **[Benefit: medium for this hardware] [Risk: very low]
[Favorable]**
---
## PHASE 9: FINAL SYNTHESIS
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real, obvious register bug: WCI invert is computed then discarded
- One-line, obviously correct; matches max98925
- Identical max98925 fix (`0b51601d4504f4`) was `Cc: stable`
- Bug present since v4.6 and in this 6.12 tree
- Applies cleanly; no dependencies or new APIs
- Applied by Mark Brown; landed in a sound **fixes** pull
- User-visible: inverted frame clock does not work
AGAINST:
- Not a crash, UAF, deadlock, or security issue
- Peripheral codec; no in-tree machine driver found
- No `Reported-by` / `Tested-by`
- Common `NB_NF` path already works
UNRESOLVED:
- Direct user reports of broken MAX98926 inverted-frame setups were not
found
- lore.kernel.org WebFetch returned 403; discussion recovered via `b4
dig -m`
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — 1-line mask, sibling
precedent, maintainer applied
2. Fixes a real bug that affects users? **PASS** — advertised invert
modes do not program WCI
3. Important issue? **PASS** — hardware misconfiguration / broken audio
for inverted frame (same bar as the 2015 max98925 stable fix), not a
panic
4. Small and contained? **PASS** — 1 line, one function
5. No new features or APIs? **PASS**
6. Can apply to the local tree? **PASS** — `git apply --check` clean;
context matches
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Not a device-ID/quirk/DT/build/docs exception. It is a normal small
driver correctness fix.
**Step 9.4: MAKE YOUR DECISION**
This belongs in **this** 6.12 tree. The buggy code is here, the fix is
trivial and already proven on the sibling codec (including an explicit
stable nomination there), and the only cost is flipping one register
mask bit that the driver already intended to set.
### What the commit solves for stable users
On MAX98926, `set_fmt` claims to support word-clock invert (`NB_IF` /
`IB_IF`) but `regmap_update_bits()` only allows the BCI bit to change,
so LRCLK invert never reaches the chip. That is broken DAI polarity for
those boards, not a style change.
### Risk vs benefit
Very low risk (one OR into an existing mask) versus a real, long-
standing hardware-config bug that already met the stable bar on
max98925.
### Concerns
None for this tree: no prerequisites, no conflict, no follow-up needed.
Impact is limited to MAX98926 with inverted frame clock.
---
## Verification
- [Phase 1] Parsed tags: author SOB, Mark Brown SOB, lore Link; no
Fixes/Reported-by/Cc: stable
- [Phase 2] Diff: 1 line in `max98926_dai_set_fmt()`; mask `BCI` → `BCI
| WCI`
- [Phase 2] Header verified: WCI is bit 3, BCI is bit 2 in `max98926.h`
- [Phase 3] `git blame`: buggy line from `a2e2876aa0bab` (2016, v4.6)
- [Phase 3] `git merge-base --is-ancestor a2e2876aa0bab HEAD`:
introducing commit **is** in this tree
- [Phase 3] Sibling fix `0b51601d4504f4` (“Fix mask for setting DAI
invert mode”) had `Cc: stable@vger.kernel.org` and is in this tree
- [Phase 3] `git log` on `max98926.c`: no invert-mask prerequisite
- [Phase 4] `b4 dig -c dd0ae9a2e19a2`: lore URL `87wltomc97.wl-
kuninori.morimoto.gx@renesas.com`
- [Phase 4] `b4 dig -a`: v1 only
- [Phase 4] `b4 dig -w`: Kysela, Girdwood, Brown, Iwai, linux-sound
- [Phase 4] mbox: Mark Brown applied to for-7.3; no NAKs
- [Phase 4] WebFetch lore/msgid: 403; discussion taken from b4 mbox
instead
- [Phase 4] Stable lore search: no prior discussion of this patch
- [Phase 5] Callers: `snd_soc_dai_set_fmt()` → dai ops `.set_fmt`; used
from `soc-core.c` DAI setup
- [Phase 5] `git grep`: only max98926 still has BCI-only invert update
- [Phase 6] `make kernelversion` / Makefile: **6.12.111**; `git describe
HEAD`: `p-6.12-3-gc504cf0baa3d8`
- [Phase 6] `git merge-base --is-ancestor dd0ae9a2e19a2 HEAD`: fix
**not** in this tree
- [Phase 6] Parent context of candidate matches local `max98926.c` lines
360–363
- [Phase 6] `git apply --check`: APPLY_CLEAN
- [Phase 7] No in-tree machine driver hard-coding max98926; DT
compatible `maxim,max98926` exists
- [Phase 8] Failure mode: WCI not programmed → wrong frame polarity /
broken audio; not a crash
- UNVERIFIED: specific MAX98926 products using `NB_IF`/`IB_IF` in the
field (driver still implements those cases)
**YES**
sound/soc/codecs/max98926.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/max98926.c b/sound/soc/codecs/max98926.c
index ae962bda163eb..8f48f702d5621 100644
--- a/sound/soc/codecs/max98926.c
+++ b/sound/soc/codecs/max98926.c
@@ -360,7 +360,7 @@ static int max98926_dai_set_fmt(struct snd_soc_dai *codec_dai,
regmap_write(max98926->regmap,
MAX98926_FORMAT, MAX98926_DAI_DLY_MASK);
regmap_update_bits(max98926->regmap, MAX98926_FORMAT,
- MAX98926_DAI_BCI_MASK, invert);
+ MAX98926_DAI_BCI_MASK | MAX98926_DAI_WCI_MASK, invert);
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.1] soundwire: dmi-quirks: Disable ghost Realtek on Asus Expertbook
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (14 preceding siblings ...)
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-5.10] ASoC: codec: max98926: fixup invert setup mask Sasha Levin
@ 2026-10-19 13:47 ` Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Fix ALC700 audio on Intel Hades Canyon Sasha Levin
` (45 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:47 UTC (permalink / raw)
To: patches, stable
Cc: Charles Keepax, Vinod Koul, Sasha Levin, yung-chuan.liao,
linux-sound, linux-kernel
From: Charles Keepax <ckeepax@opensource.cirrus.com>
[ Upstream commit 90af3209742db61a7f9d7d054a16165818cfc6d8 ]
The Asus Expertbook B9406CAA also has a Realtek device in the ACPI that
doesn't exist in the physical hardware. This confuses the machine driver
into attempting to create DAI links for the device. Add a quirk to
remove this device.
Closes: https://github.com/thesofproject/linux/issues/5828
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260630081132.3294488-1-ckeepax@opensource.cirrus.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
I have enough to decide: this is a DMI hardware quirk for a user-
confirmed “no sound” failure, and the `ghost_realtek` machinery already
exists in this 7.3 tree.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: [soundwire: dmi-quirks] [Disable] [DMI quirk to hide a ghost
Realtek SoundWire device on Asus Expertbook B9406CAA]
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- Closes: https://github.com/thesofproject/linux/issues/5828 (user-filed
SOF audio bug)
- Signed-off-by: Charles Keepax (author)
- Link: https://patch.msgid.link/20260630081132.3294488-1-
ckeepax@opensource.cirrus.com
- Signed-off-by: Vinod Koul (SoundWire maintainer)
- No Fixes: tag (expected)
- No Cc: stable (expected)
- No Reported-by / Tested-by / Reviewed-by / Acked-by in the committed
message
- Ignore pipeline SOBs: none present (no Sasha Levin marker)
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- Bug: ACPI lists a Realtek SoundWire device that is not physically
present on Asus Expertbook B9406CAA.
- Symptom: the machine driver tries to create DAI links for that ghost
device; audio probe fails (dummy output / no card).
- Version info in the GitHub issue (not the commit body): worked on 7.0,
broken since 7.1 after function-topology matching.
- Root cause: firmware/ACPI advertises RT722 on link 3; function
topology builds the card from ACPI, so the ghost device breaks card
creation.
Step 1.4: DETECT HIDDEN BUG FIXES
Record: Not a disguised cleanup. It is an explicit hardware quirk. The
“add a table entry” form is the standard stable-acceptable quirk
pattern.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- File: `drivers/soundwire/dmi-quirks.c` (+7 / −0)
- Function/data: `adr_remap_quirk_table[]` only (no new functions)
- Scope: single-file surgical DMI match addition
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record:
- Before: B9406CAA did not match `adr_remap_quirk_table`, so ACPI `_ADR`
0x000330025d072201 (RT722 on link 3) stayed visible.
- After: DMI match `ASUS` + board `B9406CAA` uses existing
`ghost_realtek[]`, remapping that `_ADR` to 0.
- Path: SoundWire ACPI slave discovery (`find_slave()`), not a hot path
or a new API.
Step 2.3: IDENTIFY THE BUG MECHANISM
Record: [Hardware workaround / DMI quirk]
Mechanism: `ghost_realtek[]` remaps `0x000330025d072201` → `0`.
`find_slave()` does `if (!addr) return false;`, so the ghost device is
not registered and sof_sdw does not build DAI links for it.
Step 2.4: ASSESS THE FIX QUALITY
Record: Obviously correct and minimal. Same pattern as UX5406AA / Lenovo
83QK / 83SF. Regression risk is very low: only that DMI pair is
affected; other machines are unchanged.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record: The new B9406CAA block is this commit (`90af3209742db`,
2026-06-30). `ghost_realtek[]` and the PTL comment come from
`4dab2b904414f` (“Disable ghost Realtek devices”, 2026-05-20, in v7.2).
`dmi-quirks.c` itself dates to `f6594cdfec4cd` (v5.13).
Step 3.2: FOLLOW THE FIXES: TAG
Record: No Fixes: tag. The user-visible regression was function topology
in 7.1 (`e0fb794d67f86` / `45cf24da0a10` pair, present in v7.1). This
commit does not revert those; it adds a device-specific ACPI workaround.
`git merge-base --is-ancestor e0fb794d67f86 v7.1` is true.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record: Same-file siblings: `4dab2b904414f` (base table), then B9406CAA,
then UX8407AA / GX651AR / GX651AX. Standalone: one extra DMI row.
Prerequisite is only `ghost_realtek[]`, which is in this tree.
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record: Charles Keepax has 30 SoundWire commits here; he introduced
`ghost_realtek`. Vinod Koul (maintainer) applied it. Pierre-Louis
Bossart (reviewer in MAINTAINERS) was CCed.
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record: Depends on `ghost_realtek[]` (`4dab2b904414f`, in v7.2 and in
this 7.3 tree) and on remap-to-zero skip in `find_slave()` (`if (!addr)
return false;` in `drivers/soundwire/slave.c`). Both exist here. Applies
standalone on this tree.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- b4 dig: https://patch.msgid.link/20260630081132.3294488-1-
ckeepax@opensource.cirrus.com
- Series: v1 only (no v2/v3)
- Cover note: follow-up quirk after a previous one proved unnecessary
- Vinod Koul: “Applied, thanks!” → `90af3209742db`
- No NAK, no review concerns, no Cc: stable in the thread
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record (b4 dig -w): To Vinod Koul; Cc Pierre-Louis Bossart, Bard Liao,
linux-sound, linux-kernel, Cirrus patches. Maintainer applied it. No
extra Reviewed-by on this follow-up (the base table had Reviewed-by:
Pierre-Louis Bossart).
Step 4.3: SEARCH FOR THE BUG REPORT
Record: GitHub thesofproject/linux#5828, closed.
- Reporter q66: no sound on ExpertBook B9406CAA since 7.1 (dummy output;
`snd_soc_register_card failed -517`, later duplicate sysfs).
- Charles identified ACPI ghost: `link 3 mfg_id 0x025d part_id 0x0722`.
- Reporter confirmed DMI `ASUS` / `B9406CAA` and that this exact quirk
restored sound (downstream Chimera Linux kernel).
- Charles: “Yeah that is the correct fix.”
- Separate later UCM/mute-LED discussion is unrelated to this quirk.
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Standalone 1/1. Same family as `4dab2b904414f` and later laptop
rows. No other patches required for this DMI entry.
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: lore.kernel.org/stable WebFetch returned 403. UNVERIFIED whether
it was discussed on stable@. On the GitHub issue, Charles said the
original ghost-Realtek table should be forwarded to stable because 7.1
already had the topology switch. That is context, not a substitute for
this patch’s own merit.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: No function body changes. Data only: `adr_remap_quirk_table[]`
using existing `ghost_realtek[]`. Consumer: `sdw_dmi_override_adr()`.
Step 5.2: TRACE CALLERS
Record:
- `sdw_dmi_override_adr()` is `bus->ops->override_adr` for Intel
(`drivers/soundwire/intel_auxdevice.c`).
- Called from `find_slave()` in `drivers/soundwire/slave.c` during ACPI
enumeration.
- Context: device probe / SoundWire bus init, not IRQ.
Step 5.3: TRACE CALLEES
Record: `dmi_first_match()`, then table walk. If ADR matches, replace
with remapped value (0 for ghost Realtek).
Step 5.4: FOLLOW THE CALL CHAIN
Record: Boot/probe of Intel SOF SoundWire (Panther Lake Expertbook).
Userspace cannot trigger it except by using the laptop. Reachable on
that hardware every boot. Confirmed by dmesg in the issue.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Same `ghost_realtek` DMI rows for UX5406AA, 83QK, 83SF, later
UX8407AA / GX651AR / GX651AX. Systematic ACPI ghost-device problem, not
a one-off.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record: Yes. Local tree is v7.3-rc4 (`7.3.0-rc4`). `ghost_realtek[]` and
remap-to-zero skip are present. Function topology on PTL
(`snd_soc_acpi_intel_no_function_topology` in `soc-acpi-intel-ptl-
match.c`) is present — that is what made the ghost ACPI entry fatal from
7.1. The B9406CAA row is already in this checkout at lines 189–195 of
`dmi-quirks.c` (`git merge-base --is-ancestor 90af3209742db HEAD`
succeeded). The bug class exists here; this tree already contains the
fix because it is 7.3 mainline.
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record: Clean apply on this tree. Same table layout as the patch. No
rework needed. (Would need `ghost_realtek[]` on a tree older than v7.2.)
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: Base table `4dab2b904414f` is here. No alternate B9406CAA fix
besides this row. Later extra laptops are independent.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: [SoundWire DMI quirks / Intel SOF audio] [IMPORTANT for affected
laptops, PERIPHERAL globally]. Not core mm/net, but complete audio loss
on a shipping Panther Lake laptop.
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: Active: multiple 2026 ghost-Realtek DMI additions. Maintainer-
applied. Mature quirk file since v5.13.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: Driver/platform-specific: Asus Expertbook B9406CAA (DMI board
name). CONFIG_SOUNDWIRE_INTEL + SOF PTL machine driver.
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: Every boot on that laptop once function topology is used (7.1+).
Not a race. Not unprivileged-attack surface. Reporter reproduced on
7.1.1.
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record: [No audio / card probe failure] [HIGH for that hardware]. Not a
panic. User-visible: dummy output, deferred probe `-517`, or failed
DAI/sysfs setup. Confirmed in issue 5828.
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record: Benefit high for those users (restores sound). Risk very low:
7-line DMI entry, existing remap table, DMI-gated. Ratio strongly favors
applying it on trees that already have `ghost_realtek`.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR:
- Hardware quirk / DMI workaround — listed as a stable exception.
- Real user bug: complete audio failure; reporter tested this exact
match.
- Maintainer applied; SOF issue closed with this approach.
- 7 lines, existing `ghost_realtek[]`, no new API.
- `ghost_realtek` and remap-to-0 skip exist in this 7.3 tree.
- Same pattern as other accepted laptop rows.
AGAINST:
- Not a crash/UAF/security bug (audio probe failure).
- Affects one laptop model.
- No Fixes:/Cc: stable (expected for this review pipeline).
- This 7.3-rc4 checkout already contains the commit (mainline source,
not a reason to reject on merit).
UNRESOLVED:
- lore.kernel.org WebFetch 403; stable@ discussion not independently
confirmed beyond GitHub.
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? PASS — same remap table; user confirmed
on B9406CAA; maintainer applied.
2. Fixes a real bug that affects users? PASS — no sound since 7.1 on
that Expertbook.
3. Important issue? PASS — HIGH: total audio loss, not a panic; still a
serious hardware enablement/regression for that machine.
4. Small and contained? PASS — +7 lines, one file, one DMI entry.
5. No new features or APIs? PASS — table row only.
6. Can apply to the local tree? PASS — `ghost_realtek` and
`sdw_dmi_override_adr` exist; patch matches current table form.
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: Hardware quirk / DMI workaround for broken ACPI. Automatically
qualifies.
Step 9.4: MAKE YOUR DECISION
This tree (v7.3-rc4) has the buggy ACPI path, function topology, and
`ghost_realtek`. The change is a one-row DMI quirk that restores audio
on a shipping laptop. That is exactly the stable-acceptable quirk class.
What it solves: ACPI advertises a non-existent RT722; sof_sdw then fails
to build the card. The quirk remaps that `_ADR` to 0 so discovery skips
it.
Risk vs benefit: benefit is restoring sound; risk is a DMI-gated no-op
on every other machine.
No missing prerequisites on this tree.
Verification:
- [Phase 1] Tags: Closes GitHub 5828; SOB Charles Keepax + Vinod Koul;
lore msgid link; no Fixes/Cc: stable
- [Phase 2] Diff: +7 lines in `adr_remap_quirk_table` matching
ASUS/B9406CAA → `ghost_realtek`
- [Phase 2] `ghost_realtek` remaps 0x000330025d072201 → 0;
`find_slave()` skips `!addr`
- [Phase 3] `git describe HEAD` → v7.3-rc4-27-gf0100363d8c37; `make
kernelversion` → 7.3.0-rc4
- [Phase 3] `git merge-base --is-ancestor 90af3209742db HEAD` → already
in this tree (7.3-rc1+)
- [Phase 3] `4dab2b904414f` (`ghost_realtek`) is ancestor of v7.2 and of
HEAD; not in v7.1
- [Phase 3] `90af3209742db` is in v7.3-rc1, not in v7.2 / v7.2.7
- [Phase 3] Topology commits `e0fb794d67f86` / `45cf24da0a10` are in
v7.1 (issue’s regression window)
- [Phase 3] blame: B9406CAA block is 90af3209742db; table intro
4dab2b904414f
- [Phase 4] b4 dig: lore patch-id match, v1 only, Vinod “Applied,
thanks!”
- [Phase 4] b4 dig -w: Vinod, Pierre-Louis Bossart, Bard Liao, linux-
sound
- [Phase 4] GitHub 5828: reporter confirmed quirk; Charles: correct fix;
dmesg shows ghost 0x025d:0x0722 on link 3
- [Phase 4] lore.kernel.org WebFetch 403 — stable@ search UNVERIFIED
- [Phase 5] callers: `intel_auxdevice` `.override_adr` → `find_slave()`
ACPI enum
- [Phase 6] local `dmi-quirks.c` already has B9406CAA and
`ghost_realtek`
- [Phase 7] SOUNDWIRE maintainers Vinod Koul / Bard Liao; reviewer
Pierre-Louis Bossart
- [Phase 8] Failure: no audio on one Asus PTL laptop; severity HIGH;
risk very low
- UNVERIFIED: stable@ mailing list archive contents (HTTP 403)
This is a hardware quirk for a real, user-confirmed audio failure. It is
small, already the established `ghost_realtek` pattern, and the
supporting code is in this tree.
**YES**
drivers/soundwire/dmi-quirks.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/soundwire/dmi-quirks.c b/drivers/soundwire/dmi-quirks.c
index 32a46a2d90f7c..2a98fc8c104d6 100644
--- a/drivers/soundwire/dmi-quirks.c
+++ b/drivers/soundwire/dmi-quirks.c
@@ -178,6 +178,13 @@ static const struct dmi_system_id adr_remap_quirk_table[] = {
.driver_data = (void *)hp_omen_16,
},
/* PTL devices */
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUS"),
+ DMI_MATCH(DMI_BOARD_NAME, "B9406CAA"),
+ },
+ .driver_data = (void *)ghost_realtek,
+ },
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUS"),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Fix ALC700 audio on Intel Hades Canyon
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (15 preceding siblings ...)
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-6.1] soundwire: dmi-quirks: Disable ghost Realtek on Asus Expertbook Sasha Levin
@ 2026-10-19 13:47 ` Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-6.1] soundwire: dmi-quirks: Disable ghost Realtek on Asus ROG Zephyrus Duo Sasha Levin
` (44 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:47 UTC (permalink / raw)
To: patches, stable
Cc: Csaba Budai, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Csaba Budai <ilyr73@gmail.com>
[ Upstream commit 1fcccdc20a76b4639b00124cf2a379b837bd2bf7 ]
On Intel Hades Canyon systems with an ALC700 codec, analog audio can
become unusable after rebooting from Windows into Linux.
The affected system uses codec subsystem ID 8086:2073. In the broken
state, Realtek coefficient 0x1b has value 0x4a4b. Setting bit 0x0400
changes it to 0x4e4b and immediately restores normal analog playback.
The BIOS also sets this bit after disabling and re-enabling onboard
audio, while Windows may leave it cleared. Linux currently does not
restore it during codec initialization.
Add a machine-specific fixup for Intel Hades Canyon which sets only
bit 0x0400 of coefficient 0x1b during HDA_FIXUP_ACT_INIT.
The fix has been verified across Windows -> Linux reboots on an Intel
NUC8i7HNB with an ALC700 codec.
Signed-off-by: Csaba Budai <ilyr73@gmail.com>
Link: https://patch.msgid.link/20260821102514.11194-1-ilyr73@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
Connection lost, reconnecting to https://agentn.us.api5.cursor.sh
(attempt 1)...
Retry attempt 1...
This is a machine-specific ALSA Realtek quirk for Intel Hades Canyon.
The local tree is **6.12.111**; the same Realtek tables exist here, just
in `sound/pci/hda/patch_realtek.c` instead of later `alc269.c`.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: **[ALSA: hda/realtek]** **[Fix]** **ALC700 analog audio unusable
on Intel Hades Canyon after Windows reboot**
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- **Signed-off-by:** Csaba Budai \<ilyr73@gmail.com\> (author)
- **Link:**
https://patch.msgid.link/20260821102514.11194-1-ilyr73@gmail.com
- **Signed-off-by:** Takashi Iwai \<tiwai@suse.de\> (ALSA maintainer,
applied the patch)
- **No Fixes:** tag (expected)
- **No Cc: stable** (expected)
- **No Reported-by / Tested-by / Reviewed-by / Acked-by**
- Author states the fix was verified on an Intel NUC8i7HNB (in the
body, not a Tested-by tag)
- Ignore any pipeline-added Sasha Levin SOB / Upstream-commit markers if
present
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- **Bug:** On Intel Hades Canyon (codec SSID **8086:2073**, ALC700),
analog audio can become unusable after rebooting from Windows into
Linux.
- **Symptom:** Analog playback does not work until a BIOS-level audio
disable/enable or until coef 0x1b bit 0x0400 is set.
- **Root cause:** Windows may leave Realtek coefficient 0x1b as
**0x4a4b** (bit 0x0400 clear). BIOS sets that bit (value becomes
**0x4e4b**). Linux never restores it at codec init.
- **Fix:** Machine-specific HDA fixup that sets only bit 0x0400 of coef
0x1b at `HDA_FIXUP_ACT_INIT`.
- **Version info:** None in the message. Hardware is the 2018 Intel
NUC8i7HNB; ALC700 support has been in-tree since 2016.
Step 1.4: DETECT HIDDEN BUG FIXES
Record: **Not a hidden fix.** The subject and body are an explicit
hardware-quirk bug fix. It is not cleanup, refactoring, or a new
feature.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- **File (upstream):** `sound/hda/codecs/realtek/alc269.c` (**+20 /
-0**)
- **Functions/tables:**
1. Enum: add `ALC700_FIXUP_INTEL_HADES_CANYON`
2. New `alc700_fixup_intel_hades_canyon()`
3. `alc269_fixups[]` entry (`HDA_FIXUP_FUNC`)
4. `alc269_fixup_tbl[]` PCI quirk `SND_PCI_QUIRK(0x8086, 0x2073, ...)`
- **Scope:** Single-file surgical hardware quirk. No API, no data-
structure, no locking changes.
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record:
- **Before:** SSID 8086:2073 has no match in `alc269_fixup_tbl`.
`patch_alc269()` still probes ALC700 (`0x10ec0700`) but never restores
coef 0x1b bit 0x0400. After a Windows boot that left the bit clear,
analog playback stays broken across Linux boot.
- **After:** `snd_hda_pick_fixup()` matches 8086:2073. During
`alc_init()` → `snd_hda_apply_fixup(..., HDA_FIXUP_ACT_INIT)`, the new
function does `alc_update_coef_idx(codec, 0x1b, 0x0400, 0x0400)`,
which is `(val & ~0x0400) | 0x0400` — set one bit, leave the rest.
- **Path:** Codec init (probe and resume), not an error path. Gated to
this SSID only.
Step 2.3: IDENTIFY THE BUG MECHANISM
Record:
- **Category:** Hardware quirk / logic correctness (missing codec-init
restore of a vendor coefficient).
- **Mechanism:** Windows leaves a vendor bit cleared; Linux did not put
it back. The fix is the standard Realtek INIT coef update used by many
existing fixups (e.g. `alc269vb_fixup_aspire_e1_coef`).
Step 2.4: ASSESS THE FIX QUALITY
Record:
- **Quality:** Obviously correct and matches existing INIT-coef fixups.
Mask/set of a single bit is the intended `alc_update_coef_idx` usage
(verified in `__alc_update_coefex_idx`: `(val & ~mask) | bits_set`).
- **Regression risk:** Very low. Only SSID 8086:2073 is changed. Other
machines are untouched. Worst case on this SKU is a wrong vendor bit;
author and BIOS both indicate that bit should be set.
- **No public API / no locking / no refcount changes.**
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record:
- Surrounding enum: `ALC700_FIXUP_INTEL_REFERENCE` from
**b84e843644f211** (PeiSen Hou, 2017-09-01).
- Neighboring NUC 8 quirk 8086:2074 from **d1ee66c5d3c5a0** (2021, "fix
mic boost on Intel NUC 8") — already in this tree.
- ALC700 codec ID `HDA_CODEC_ENTRY(0x10ec0700, "ALC700", patch_alc269)`
from **6fbae35a3170c** (2016-05-30).
- The “buggy” state is missing a quirk that was never present; the codec
path has existed since **v4.8-era / 2016**.
Step 3.2: FOLLOW THE FIXES: TAG
Record: **No Fixes: tag.** Not applicable. This is a missing machine
quirk, not a regression from a specific earlier commit.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record:
- This tree already carries many Realtek `Add quirk` backports in
`patch_realtek.c`.
- Related ALC700 history in-tree: 6fbae35a3170c (add ALC700),
2d7fe6185722b (ALC700 no-sound), b84e843644f21 (ALC700 jack detect).
- Upstream file split **aeeb85f26c3bb** (“ALSA: hda: Split Realtek HD-
audio codec driver”, 2025-07-11) is **not** an ancestor of this 6.12
tree — that is why the path differs.
- **Standalone** patch (not X/Y). No later follow-up on origin/master
targeting Hades Canyon / 8086:2073.
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record: Csaba Budai has this one ALSA commit on origin/master. Not the
subsystem maintainer. **Takashi Iwai** (ALSA maintainer) applied it with
“Applied now. Thanks.”
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record:
- Required pieces **are already here:** `alc_update_coef_idx`,
`HDA_FIXUP_ACT_INIT`, `alc269_fixups[]`, `alc269_fixup_tbl[]`,
`ALC700_FIXUP_INTEL_REFERENCE`, `patch_alc269` for 0x10ec0700,
`alc_init()` calling `snd_hda_apply_fixup(..., HDA_FIXUP_ACT_INIT)`.
- **No functional prerequisites.** Only a path rewrite (`alc269.c` →
`patch_realtek.c`). Insertion anchors exist: enum after
`ALC700_FIXUP_INTEL_REFERENCE`, quirk table immediately before
`0x8086, 0x2074`. `alc287_fixup_lenovo_yoga_book_9i()` (the function
above the new helper upstream) **does** exist in this tree.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- **b4 dig -c 1fcccdc20a76b:**
https://patch.msgid.link/20260821102514.11194-1-ilyr73@gmail.com
- **b4 dig -a:** single **v1**, no later revisions.
- Maintainer reply (Takashi Iwai, 2026-08-23): **“Applied now.
Thanks.”** No NAK, no requested changes, no stable discussion.
- Direct lore.kernel.org WebFetch returned **403**; thread recovered via
`b4 dig -m`.
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record (**b4 dig -w**): Csaba Budai, Jaroslav Kysela, Takashi Iwai,
linux-sound@, linux-kernel@. Right maintainers were on To/Cc. Applied by
Takashi.
Step 4.3: SEARCH FOR THE BUG REPORT
Record: No bugzilla/syzbot link. Evidence is the author’s dual-boot
report plus BIOS/Windows coefficient comparison (0x4a4b vs 0x4e4b).
Severity from the reporter: analog audio unusable until the bit is set.
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Standalone v1. No series companions. No later origin/master
commits touching this SSID.
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: lore.kernel.org/stable WebFetch returned **403**. No stable-list
discussion recovered via b4. **UNVERIFIED:** whether anyone already
requested this on stable@ (does not change the technical merit).
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: New `alc700_fixup_intel_hades_canyon()`. Tables: enum,
`alc269_fixups[]`, `alc269_fixup_tbl[]`. Semcode MCP not available;
identified from hunks and grep.
Step 5.2: TRACE CALLERS
Record:
- `snd_hda_pick_fixup()` in `patch_alc269()`
(`sound/pci/hda/patch_realtek.c` ~12583) selects the quirk from
PCI/codec SSID.
- `alc_init()` (`spec->init` / `.init = alc_init`) calls
`snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT)` (~954). That runs on
codec init (probe and resume).
- Impact surface: **only** devices matching **8086:2073**.
Step 5.3: TRACE CALLEES
Record: `alc_update_coef_idx` → `alc_update_coefex_idx` (NID 0x20,
mutex) → `__alc_update_coefex_idx`: read-modify-write vendor coef.
Standard, already used throughout this file.
Step 5.4: FOLLOW THE CALL CHAIN
Record: Userspace does not need a special syscall. Booting Linux on this
NUC (especially after Windows) enumerates HDA → `patch_alc269` → INIT
fixup. **Reachable from normal device use.** Dual-boot is a realistic
trigger.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Many INIT-time `alc_update_coef_idx` fixups already exist
(`alc269_fixup_hweq`, `alc269vb_fixup_aspire_e1_coef`,
`alc269_fixup_stereo_dmic`). Same pattern. No other 8086:2073 / Hades
Canyon quirk in this tree.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record:
- **Yes.** Local tree: **pending-6.12**, `git describe`
**p-6.12-3-gc504cf0baa3d8**, `make kernelversion` **6.12.111**.
- ALC700 + `patch_alc269` present since 6fbae35a3170c (in this tree).
- **No** `ALC700_FIXUP_INTEL_HADES_CANYON` and **no**
`SND_PCI_QUIRK(0x8086, 0x2073, ...)`.
- `git merge-base --is-ancestor 1fcccdc20a76b HEAD` → **not present**.
- Bug is a long-standing missing restore, not something introduced after
6.12 branched.
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record: **Minor path rewrite, otherwise clean.** Upstream file
`sound/hda/codecs/realtek/alc269.c` is the post-2025 split; 6.12 still
has `sound/pci/hda/patch_realtek.c`. All four hunks have matching
context (enum order, `ALC700_FIXUP_INTEL_REFERENCE` verbs, 8086:2074
quirk). This is the same class of adjustment already used for other
Realtek quirk backports in this tree.
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: **No.** Grep found no Hades Canyon / 0x2073 /
`ALC700_FIXUP_INTEL_HADES_CANYON`. Neighboring NUC 8 quirk (2074) is
unrelated (mic boost on a different SKU).
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: **ALSA HD-audio / Realtek codec** (`sound/pci/hda/`).
**IMPORTANT** for users of this hardware (common laptop/NUC audio
stack), **PERIPHERAL** in the sense that only one SSID is affected. Not
core mm/VFS.
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: Very active: this 6.12 tree already has a long stream of Realtek
quirk backports. The pattern is mature and well-understood.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: **Driver/platform-specific:** Intel Hades Canyon NUC (NUC8i7HNB
/ SSID 8086:2073) with ALC700. Dual-boot Windows→Linux users are the
ones who hit the broken coefficient. Other machines unchanged.
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: Reboot from Windows into Linux (Windows left coef 0x1b bit
0x0400 clear). Not every boot if BIOS left the bit set. Not a race.
Unprivileged users do not need a special exploit; they just have no
analog sound.
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record: Analog audio **unusable** (no playback) until BIOS toggle or
this coef write. **MEDIUM** for the kernel as a whole, **HIGH** for
those users (device functionally broken). Not a panic/UAF, but a real
hardware functional failure — the exact class stable regularly takes as
HDA quirks.
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record:
- **Benefit:** Restores analog audio on a shipping Intel NUC after dual-
boot. Matches BIOS. Tested on the machine.
- **Risk:** Very low (20 lines, SSID-gated, one bit set, standard
helper).
- **Ratio:** Strongly favors backport.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
**FOR backporting:**
- Real user-visible bug: analog playback dead after Windows→Linux
reboot.
- Explicit hardware quirk (SSID + INIT coef), the documented stable
exception.
- Small (+20), obviously correct, SSID-scoped.
- ALC700 and all helpers exist in 6.12; bug is not post-branch.
- Maintainer Takashi Iwai applied v1 with no objections.
- Same style as many quirks already in this tree.
**AGAINST backporting:**
- Affects one NUC SKU, mainly dual-boot.
- Upstream path differs; cherry-pick needs a file-path adjustment.
- No syzbot/CVE/crash.
**UNRESOLVED:**
- Could not read lore.kernel.org/stable (403). No evidence it was
rejected for stable.
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? **PASS** — bit set matches measured
0x4a4b→0x4e4b; verified on NUC8i7HNB; maintainer applied.
2. Fixes a real bug that affects users? **PASS** — analog audio unusable
after dual-boot.
3. Important issue? **PASS** — hardware-quirk class; functional audio
failure on a real product (not a crash, but in-scope for stable
quirks).
4. Small and contained? **PASS** — 20 lines, one file, one SSID.
5. No new features or APIs? **PASS** — quirk only.
6. Can apply to the local tree? **PASS** — needs path rewrite to
`patch_realtek.c`; context matches.
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: **Hardware quirk / workaround** (HDA/Realtek codec quirk table).
This is an automatic YES category in the stable rules given above.
Step 9.4: MAKE YOUR DECISION
This should be backported to this 6.12 tree. The ALC700 path is old;
only the Hades Canyon restore is missing. The upstream split into
`alc269.c` is after 6.12, so the backport is the same hunks in
`sound/pci/hda/patch_realtek.c`.
------------------------------------------------
What problem it solves and why it matters
------------------------------------------------
On Intel Hades Canyon (SSID 8086:2073), Windows can leave Realtek coef
0x1b with bit 0x0400 clear. Linux never sets it, so analog playback
stays dead across boot. Dual-boot NUC users on 6.12 hit this today. The
fix restores that one BIOS bit at codec INIT.
Risk vs benefit
------------------------------------------------
Benefit is restoring audio on that SKU. Risk is a one-bit vendor coef
write gated by PCI quirk, using an existing helper. Path rewrite is
mechanical.
------------------------------------------------
Verification
------------------------------------------------
- [Phase 1] Parsed tags: SOB Csaba Budai, Link msgid, SOB Takashi Iwai;
no Fixes/Cc-stable/Reported-by.
- [Phase 2] Diff: +20 in one file; enum + INIT func + fixup table +
SND_PCI_QUIRK(0x8086, 0x2073).
- [Phase 2] `__alc_update_coefex_idx`: `(val & ~mask) | bits_set` with
mask=bits_set=0x0400 sets one bit.
- [Phase 3] `git describe HEAD` / `make kernelversion`: p-6.12-3,
**6.12.111**.
- [Phase 3] `git merge-base --is-ancestor 1fcccdc20a76b HEAD`: **not in
this tree**.
- [Phase 3] `git merge-base --is-ancestor 6fbae35a3170c HEAD`: ALC700
support **is** in this tree (2016).
- [Phase 3] `git merge-base --is-ancestor aeeb85f26c3bb HEAD`: codec
split **not** in this tree (old path).
- [Phase 3] Blame: `ALC700_FIXUP_INTEL_REFERENCE` from b84e843644f211;
8086:2074 from d1ee66c5d3c5a0.
- [Phase 4] `b4 dig -c 1fcccdc20a76b`: lore/msgid match; v1 only;
Takashi “Applied now. Thanks.”
- [Phase 4] `b4 dig -w`: linux-sound + Takashi Iwai + Jaroslav Kysela.
- [Phase 4] WebFetch lore: **403**; thread via `b4 dig -m /tmp/hades-
canyon.mbox`.
- [Phase 5] Callers: `patch_alc269` → `snd_hda_pick_fixup` → `alc_init`
→ `HDA_FIXUP_ACT_INIT`.
- [Phase 6] Grep: no 0x2073 / Hades Canyon / HADES_CANYON in
`patch_realtek.c`; insertion points present.
- [Phase 8] Failure: analog playback unusable; SSID-scoped; not a crash.
- UNVERIFIED: stable@ mailing list discussion (HTTP 403).
**YES**
sound/hda/codecs/realtek/alc269.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index bc33930e83b9f..8196235c31d2b 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -3820,6 +3820,7 @@ enum {
ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE,
ALC225_FIXUP_S3_POP_NOISE,
ALC700_FIXUP_INTEL_REFERENCE,
+ ALC700_FIXUP_INTEL_HADES_CANYON,
ALC274_FIXUP_DELL_BIND_DACS,
ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
ALC298_FIXUP_TPT470_DOCK_FIX,
@@ -4040,6 +4041,19 @@ static void alc287_fixup_lenovo_yoga_book_9i(struct hda_codec *codec,
__snd_hda_apply_fixup(codec, id, action, 0);
}
+static void alc700_fixup_intel_hades_canyon(struct hda_codec *codec,
+ const struct hda_fixup *fix,
+ int action)
+{
+ /*
+ * Windows may leave coef 0x1b bit 0x0400 cleared, causing broken
+ * analog playback after rebooting into Linux. Restore the bit
+ * during codec initialization.
+ */
+ if (action == HDA_FIXUP_ACT_INIT)
+ alc_update_coef_idx(codec, 0x1b, 0x0400, 0x0400);
+}
+
static const struct hda_fixup alc269_fixups[] = {
[ALC233_FIXUP_WUJIE_SPEAKERS] = {
.type = HDA_FIXUP_PINS,
@@ -5092,6 +5106,10 @@ static const struct hda_fixup alc269_fixups[] = {
{}
}
},
+ [ALC700_FIXUP_INTEL_HADES_CANYON] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc700_fixup_intel_hades_canyon,
+ },
[ALC274_FIXUP_DELL_BIND_DACS] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc274_fixup_bind_dacs,
@@ -7653,6 +7671,8 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x2782, 0xa128, "Positivo N15RPE-S", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
SND_PCI_QUIRK(0x2782, 0xa212, "Lunnen Ground 14", ALC269VC_FIXUP_LUNNEN_GROUND_14),
SND_PCI_QUIRK(0x7017, 0x2014, "Star Labs StarFighter", ALC233_FIXUP_STARLABS_STARFIGHTER),
+ SND_PCI_QUIRK(0x8086, 0x2073, "Intel NUC 8 Hades Canyon",
+ ALC700_FIXUP_INTEL_HADES_CANYON),
SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED),
SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.1] soundwire: dmi-quirks: Disable ghost Realtek on Asus ROG Zephyrus Duo
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (16 preceding siblings ...)
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Fix ALC700 audio on Intel Hades Canyon Sasha Levin
@ 2026-10-19 13:47 ` Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-5.15] ALSA: hda/conexant: Always enable the headset-mic pin on plugin Sasha Levin
` (43 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:47 UTC (permalink / raw)
To: patches, stable
Cc: Charles Keepax, Bard Liao, Vinod Koul, Sasha Levin, linux-sound,
linux-kernel
From: Charles Keepax <ckeepax@opensource.cirrus.com>
[ Upstream commit 5b08a3afd2995e5312c4c47ffea9d21b651e8e13 ]
The Asus ROG Zephyrus Duo also has a Realtek device in the ACPI that
doesn't exist in the physical hardware. This confuses the machine
driver into attempting to create DAI links for the device. Add a
quirk to remove this device.
Suggested-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260807121425.1952003-1-ckeepax@opensource.cirrus.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
I have enough to decide: this is a DMI-gated hardware quirk,
`ghost_realtek` already exists in 6.12, and GX651AR is not listed yet.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: [soundwire: dmi-quirks] [Disable] [DMI quirk to hide a phantom
Realtek SoundWire device on Asus ROG Zephyrus Duo board GX651AR]
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- Suggested-by: Bard Liao <yung-chuan.liao@linux.intel.com>
- Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> (author;
Cirrus codec maintainer)
- Link: https://patch.msgid.link/20260807121425.1952003-1-
ckeepax@opensource.cirrus.com
- Signed-off-by: Vinod Koul <vkoul@kernel.org> (SoundWire maintainer)
- No Fixes:, Reported-by:, Tested-by:, Reviewed-by:, Acked-by:, or Cc:
stable (absence expected)
- Ignored: any pipeline “Upstream commit” / “Signed-off-by: Sasha Levin”
markers
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- Bug: Asus ROG Zephyrus Duo ACPI lists a Realtek SoundWire device that
is not on the board.
- Symptom: the ASoC machine driver still builds DAI links for that ACPI
node.
- Failure mode: wrong/extra DAI links; on the sibling GX651AX report,
sof_sdw probe fails with -12 (ENOMEM) after duplicate `SDW3-Playback-
SimpleJack` links.
- Root cause: firmware exposes a ghost RT722 (`0x000330025d072201`) on
SoundWire link 3.
- Version info: none in this commit. A later sibling patch (GX651AX)
used `Cc: stable # 7.2.x`; that does not describe this GX651AR change.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not disguised. It is an explicit hardware quirk: add one DMI
match that reuses `ghost_realtek`.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `drivers/soundwire/dmi-quirks.c` (+7 lines, 0 removed)
- Data only: one `dmi_system_id` entry in `adr_remap_quirk_table[]`
- No function body changes
- Scope: single-file surgical quirk
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- Before: ASUS GX651AR does not match the remap table, so ACPI `_ADR`
`0x000330025d072201` is used as-is.
- After: that board matches `ghost_realtek`, which remaps that `_ADR` to
`0`.
- Path: SoundWire ACPI slave discovery (`sdw_dmi_override_adr` →
`find_slave()`). If `addr` is 0, `find_slave()` returns false and the
slave is not registered.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record:
- Category: hardware workaround (DMI quirk table)
- Mechanism: same as the existing `ghost_realtek` entries.
`find_slave()`:
```109:113:drivers/soundwire/slave.c
if (bus->ops->override_adr)
addr = bus->ops->override_adr(bus, addr);
if (!addr)
return false;
```
Skipping the slave means it is not in `ctx->ids`
(`drivers/soundwire/intel_init.c`), so SOF machine matching does not
treat a phantom RT722 as present.
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- Obviously correct: one DMI match, existing `ghost_realtek` table, same
pattern as UX5406AA / 83QK / 83SF already in this file.
- Regression risk: very low; only ASUS board name `GX651AR`.
- No API, locking, or allocator changes.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- Local tree: `p-6.12-3-gc504cf0baa3d8`, Makefile `VERSION=6
PATCHLEVEL=12 SUBLEVEL=111`.
- `ghost_realtek[]` and the first DMI users come from `30e7fb61a64ba`
(“soundwire: dmi-quirks: Disable ghost Realtek devices”, 2026-05-20).
- `adr_remap_quirk_table` dates to 2021 (`f6594cdfec4cd`).
- GX651AR is not in this checkout.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No Fixes: tag. Not applicable.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record:
- Recent `dmi-quirks.c` history is other DMI remaps (HP Omen, NUC,
Avell) plus the ghost-Realtek table.
- Not a numbered series (`patch X/Y`). Standalone DMI row.
- Mainline context includes `B9406CAA` and `UX8407AA`; those IDs are not
in 6.12. They are independent rows, not code prerequisites.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record:
- Charles Keepax maintains Cirrus codecs (CS42L43 lives on this class of
machines).
- Same author added the original ghost-Realtek table in this tree
(`30e7fb61a64ba`).
- Suggested-by Bard Liao, SoundWire co-maintainer.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record:
- Needs `ghost_realtek[]` and `sdw_dmi_override_adr()` — both present
(`git merge-base --is-ancestor 30e7fb61a64ba HEAD` → yes).
- Upstream SHA `5b08a3afd2995e5312c4c47ffea9d21b651e8e13` is not an
ancestor of HEAD (expected; this is the candidate).
- Can stand alone once the DMI entry is inserted next to `UX5406AA`.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c 5b08a3afd2995e5312c4c47ffea9d21b651e8e13` → https://patch.m
sgid.link/20260807121425.1952003-1-ckeepax@opensource.cirrus.com
- `b4 dig -a`: v1 only, 2026-08-07.
- Vinod Koul applied it (`commit:
5b08a3afd2995e5312c4c47ffea9d21b651e8e13`). No NAK, no revision churn.
- lore.kernel.org search URLs returned 403; discussion recovered from
b4, patchew, LKML, and openwall.
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): To Vinod Koul; Cc Bard Liao, Pierre-Louis Bossart,
linux-sound, linux-kernel, Cirrus patches. Right SoundWire people. No
extra Reviewed-by on the committed message; maintainer applied it.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record:
- No bugzilla/syzbot link on this patch.
- Sibling GX651AX (Ian Luites, 2026-08-31): ghost RT722 stays
unattached, CS42L43 + two CS35L56 attach, duplicate `SDW3-Playback-
SimpleJack`, sof_sdw probe `-12`. That is the same ACPI ghost class,
different SKU.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone. Later GX651AX is another DMI row, not a dependency.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org/stable returned 403. Web search found no stable-
list discussion of GX651AR. UNVERIFIED: whether anyone asked for this on
stable@ for 6.12.y.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF**
Record: No function edited. Data consumed by `sdw_dmi_override_adr()`.
**Step 5.2: TRACE CALLERS**
Record:
- `sdw_dmi_override_adr` ← `bus->ops->override_adr` in `find_slave()`
(`drivers/soundwire/slave.c`)
- Intel sets `.override_adr = sdw_dmi_override_adr` in
`drivers/soundwire/intel_auxdevice.c`
- `find_slave()` runs during ACPI SoundWire slave enumeration
(probe/boot)
**Step 5.3: TRACE CALLEES**
Record: `dmi_first_match()` then remap. Remap-to-0 is handled by `if
(!addr) return false`.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record:
ACPI scan → Intel SDW link probe → `sdw_slave_add` / `find_slave` →
`override_adr` → skipped slave not on `bus->slaves` → not copied into
`ctx->ids` → `hda_sdw_machine_select()` /
`snd_soc_acpi_sdw_link_slaves_found()` never sees the ghost RT722 →
`sof_sdw` does not build DAI links for it.
Reachable on any GX651AR that boots this kernel with Intel SoundWire +
SOF. Not a syscall fuzzer path; firmware/hardware path.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same `ghost_realtek` already used for ASUS UX5406AA, Lenovo
83QK, Lenovo 83SF in this file. This is another ID in that set.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: Yes. `ghost_realtek` remaps RT722 `0x000330025d072201` to 0. PTL
tables include `ptl_rt722_l3` for that address. GX651AR is not listed,
so this laptop still exposes the ghost device. Bug introduced with the
ACPI firmware + the existing remap-to-0 design (table added 2026-05-20,
already in this 6.12.y checkout).
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: Not a clean apply: mainline hunk context has B9406CAA before
GX651AR; 6.12 goes from the “PTL devices” comment to UX5406AA. Backport
is insert the same 7-line entry next to UX5406AA. Difficulty: minor
context, no semantic rework.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: The generic ghost-Realtek table is here. No
GX651AR/GX651AX/B9406CAA/UX8407AA rows. No alternate fix for this board.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: [drivers/soundwire DMI quirks + Intel SOF/ASoC] [IMPORTANT —
laptop audio on Intel SoundWire machines; not core mm/fs, but user-
visible “no sound / probe fail”]
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Mature DMI table (since 2021) with ongoing per-board additions.
This is the usual stable-friendly pattern, not a new subsystem.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: Driver/platform-specific: ASUS board `GX651AR` (ROG Zephyrus
Duo) with Intel SoundWire. Everyone else is unchanged.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Every boot/probe on that laptop. Not a race. Unprivileged users
do not trigger it; firmware does. Common for owners of that model.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record:
- Failure: extra/wrong DAI links; sibling SKU: sof_sdw probe -ENOMEM; on
this 6.12 tree, `ptl_rt722_l3` can match a laptop that only has a
ghost RT722 on link 3 and then load the wrong topology.
- Severity: HIGH for those machines (audio probe failure / wrong
machine). Not a UAF/panic.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- Benefit: high for GX651AR (and zero elsewhere). Same class as
USB/PCI/DMI quirks that stable already takes; this tree already has
three `ghost_realtek` IDs.
- Risk: very low (7 DMI lines, exact board match).
- Ratio: strongly favors backport.
Note: 6.12 PTL match tables have no CS42L43/CS35L56 entries, so this
laptop may still lack a perfect SOF machine even after the quirk. The
quirk still stops a false `ptl_rt722_l3` match and is the same
enablement already used for UX5406AA. It does not make other hardware
worse.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real hardware ACPI bug on a shipping Asus laptop
- Classic DMI quirk exception in stable-kernel-rules
- 7 lines, existing table, DMI-gated
- Infrastructure (`ghost_realtek`, `override_adr` → skip `addr==0`) is
in this 6.12 tree
- SoundWire maintainer applied; suggested by SoundWire co-maintainer
- Sibling SKU documents sof_sdw probe failure from the same ghost RT722
AGAINST:
- Fuzzy apply (missing B9406CAA context) — trivial to re-context
- No Fixes:/Cc: stable on this patch (not a negative under these rules)
- PTL Cirrus machine tables are thinner in 6.12 than mainline — audio
may still be incomplete, but the quirk is still the correct filter
UNRESOLVED:
- Could not read lore.kernel.org/stable (403)
- No on-list Tested-by for GX651AR itself (author + Intel suggestion)
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? [PASS — identical to existing entries;
maintainer applied]
2. Fixes a real bug that affects users? [PASS — ghost ACPI device breaks
machine/DAI setup]
3. Important issue? [PASS — audio probe failure / wrong topology on that
laptop; HIGH]
4. Small and contained? [PASS — +7 lines, one file]
5. No new features or APIs? [PASS — DMI ID on existing quirk]
6. Can apply to the local tree? [PASS — needs trivial context
adjustment, not missing code]
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: Hardware quirk / DMI match on an existing driver. Automatic YES
class.
**Step 9.4: MAKE YOUR DECISION**
This should be backported to this 6.12.y tree. It is a small, DMI-gated
quirk using code already present here, and it prevents a phantom Realtek
RT722 from participating in SoundWire/SOF setup on Asus GX651AR.
Verification:
- [Phase 1] Parsed tags: Suggested-by Bard Liao; SOBs Keepax + Vinod
Koul; Link msgid 20260807121425.1952003-1; no Fixes/Reported-by
- [Phase 2] Diff: +7 lines in `adr_remap_quirk_table` for ASUS / GX651AR
→ `ghost_realtek`
- [Phase 2] Confirmed `find_slave()` drops `addr==0` after
`override_adr`
- [Phase 3] `git describe HEAD` / Makefile: 6.12.111
(`p-6.12-3-gc504cf0baa3d8`)
- [Phase 3] `git blame`: `ghost_realtek` from `30e7fb61a64ba`; GX651AR
absent
- [Phase 3] `git merge-base --is-ancestor 30e7fb61a64ba HEAD`: present;
`5b08a3afd2995` not ancestor
- [Phase 3] `git log --oneline -20 -- drivers/soundwire/dmi-quirks.c`:
prior DMI remaps only
- [Phase 4] `b4 dig -c 5b08a3afd2995`: lore msgid above; v1 only; Vinod
applied
- [Phase 4] `b4 dig -w`: To vkoul; Cc Liao, Bossart, linux-sound
- [Phase 4] Sibling GX651AX: duplicate SimpleJack DAI links, sof_sdw -12
- [Phase 4] UNVERIFIED: stable@ thread (HTTP 403)
- [Phase 5] Callers: `intel_auxdevice.c` `.override_adr` → `find_slave`
→ `intel_init.c` `ctx->ids` → `hda.c` machine select
- [Phase 6] Local file has UX5406AA/83QK/83SF, not GX651AR; PTL
`rt722_3` ADR matches the quirk
- [Phase 6] Apply: context conflict on B9406CAA, trivial insert beside
UX5406AA
- [Phase 8] Failure: wrong/extra DAI links / failed sof_sdw probe; DMI-
limited; very low regression risk
**YES**
drivers/soundwire/dmi-quirks.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/soundwire/dmi-quirks.c b/drivers/soundwire/dmi-quirks.c
index f738e547a1f30..768255dd12db6 100644
--- a/drivers/soundwire/dmi-quirks.c
+++ b/drivers/soundwire/dmi-quirks.c
@@ -193,6 +193,13 @@ static const struct dmi_system_id adr_remap_quirk_table[] = {
},
.driver_data = (void *)ghost_realtek,
},
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUS"),
+ DMI_MATCH(DMI_BOARD_NAME, "GX651AR"),
+ },
+ .driver_data = (void *)ghost_realtek,
+ },
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUS"),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.15] ALSA: hda/conexant: Always enable the headset-mic pin on plugin
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (17 preceding siblings ...)
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-6.1] soundwire: dmi-quirks: Disable ghost Realtek on Asus ROG Zephyrus Duo Sasha Levin
@ 2026-10-19 13:47 ` Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18] ASoC: codecs: uda1342: Leave cache-only mode before syncing Sasha Levin
` (42 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:47 UTC (permalink / raw)
To: patches, stable
Cc: Bob Song, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Bob Song <songxiebing@kylinos.cn>
[ Upstream commit 9642a5e843758686e02a7f0d1df9eb0f7f96603c ]
Rename the function to cx_process_headset_detect_plug_type() to reflect
that it only reports the detected plug type, and move the pin control
write into cx_update_headset_mic_vref() so that node 0x19 is always set
to enable the headset mic with the 80% VREF whenever the mic is
present, regardless of the type detection result.
Signed-off-by: Bob Song <songxiebing@kylinos.cn>
Link: https://patch.msgid.link/20260826115344.2128835-1-songxiebing@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
Local tree is **6.12.111** (`pending-6.12`). The Conexant headset-mic
VREF logic is present here; the commit is a small hardware fix for
silent 3-pole mics on CX11880/SN6140.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: [ALSA: hda/conexant] [Always enable] [Always write
PIN_WIDGET_CONTROL 0x24 on node 0x19 when a headset mic is present, not
only when CTIA/OMTP type-detect succeeds]
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- Link: https://patch.msgid.link/20260826115344.2128835-1-
songxiebing@kylinos.cn
- Signed-off-by: Bob Song \<songxiebing@kylinos.cn\> (author)
- Signed-off-by: Takashi Iwai \<tiwai@suse.de\> (ALSA maintainer)
- No Fixes:, Reported-by:, Tested-by:, Reviewed-by:, Acked-by:, or Cc:
stable (absence is expected)
- Ignore pipeline SOBs / Upstream markers
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
The v3 body is thin: rename `cx_process_headset_plugin()` to
`cx_process_headset_detect_plug_type()`, and move the pin-control write
so node 0x19 is always set to 0x24 when a mic is present.
The v1 body (same series) is the actual bug statement: *“For 3-pole
headset microphones, the mic pin VREF must always be configured to 0x24
regardless of the headset type, otherwise the mic will not be able to
record audio.”*
Record: [Bug: 3-pole mics that assert pin 0x19 presence but are not
classified as CTIA/OMTP never get VREF 80%] [Symptom: headset mic cannot
record] [Root cause: 0x24 write gated on type-detect bits] [No version
info in the message]
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: [Yes — v3 is written as a rename/move, but it is a functional
fix. Type detection becomes debug-only; the missing 0x24 write for the
3-pole/fallback case is the real change.]
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record: [1 file: `sound/hda/codecs/conexant.c` on mainline (~+6/-4).
Functions: `cx_process_headset_plugin` renamed;
`cx_update_headset_mic_vref` changed. Surgical, single-file.]
In **this** 6.12 tree the same code lives in
`sound/pci/hda/patch_conexant.c` (file not yet moved).
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Before (this tree, `cx_update_headset_mic_vref`):
- Pin 0x19 presence clear → write 0x20 (IN_EN, VREF off)
- Presence set → `cx_process_headset_plugin()`:
- CTIA (`val & 0x800`) or OMTP (`val & 0x400`) → write 0x24
- else log “headphone plugin” and **do not** write 0x24
After:
- Presence clear → write 0x20 (unchanged)
- Presence set → still wait/log type, **then always write 0x24**
Record: [Plugin path: VREF 80% only for CTIA/OMTP → VREF 80% whenever
pin 0x19 reports presence]
**Step 2.3: IDENTIFY THE BUG MECHANISM**
`0x24` = `AC_PINCTL_IN_EN (0x20) | AC_PINCTL_VREF_80 (0x04)`
(`include/sound/hda_verbs.h`). `0x20` is input enable without bias.
The jack callback only runs after pin 0x19 presence. 4-pole CTIA/OMTP
already got bias. 3-pole mics (and any detect timeout/misclassify into
the else branch) did not, so the mic had no bias.
This is a **hardware workaround / logic correctness** fix, not
UAF/leak/race.
Record: [Category: hardware workaround + logic] [Broken: 3-pole mic
recording] [Fix: always enable VREF 80% when mic present]
**Step 2.4: ASSESS THE FIX QUALITY**
Obviously correct: init already does the same in
`cx_fixup_headset_recog()` (presence → 0x24, else 0x20). The plugin path
is being made consistent with that.
Regression risk is low: headphone-only plugs should not assert nid 0x19
presence (node 19 is mic-only per comments; Takashi raised this, author
confirmed presence is checked first). Inner 0x24 write in the renamed
function remains in v3 (redundant with the caller write); harmless.
Record: [Quality: small, correct, matches init path] [Risk: low;
redundant inner write only]
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record: [Introduced by `7aeb2590864874` (“ALSA: hda/conexant: Fix
headset auto detect fail in cx8070 and SN6140”), 2024-01-08. Jack
callback wiring later adjusted by `e60dc981221105` (same author,
2024-07-26). Present since ~v6.8, well before 6.12.]
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: [No Fixes: tag. Introducing commit 7aeb259 is an ancestor of
HEAD. Original intent of 7aeb259 was already “enable VREF when headset
is present”; implementation gated it on CTIA/OMTP.]
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: [Related in this tree: e60dc981 (polling-mode detect),
86c11d5091e11 (remove mic-bias threshold override, Cc:stable, Fixes:
7aeb259), dd110cc00cf85 (jack-detect error check). Standalone fix; not
patch X/Y.]
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: [Bob Song/songxiebing already authored e60dc981 on this exact
callback. Kylin/Senarytech people maintain this CX11880/SN6140 quirk.
Not the ALSA maintainer; Takashi applied it.]
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: [No missing helpers. v2 also merged CTIA/OMTP into `val &
0xc00`; that cleanup is **not** in 6.12 (`git log -S 'val & 0xc00' --
sound/pci/hda/patch_conexant.c` empty). Not required: the caller-side
always-write is the fix. Applies standalone with a path/context tweak.]
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
`b4 mbox` on msgid `20260826115344.2128835-1-songxiebing@kylinos.cn`:
11-message thread.
- v1: “Set mic pin VREF to 0x24 on headset mic plug” — 3-pole mics
cannot record
- Takashi: fallback was meant to be headphone-only; don’t enable mic
there
- Author: nid 0x19 is the mic pin; callback already requires presence;
4-pole = CTIA/OMTP; 3-pole mic was the unhandled case
- Takashi: then type-detect is only debug; move the write to the caller
and rename
- v2: that refactor + CTIA/OMTP merge; Takashi: doesn’t apply on latest
(cleanup already landed)
- v3: rebase; Takashi: “Applied now. Thanks.”
- Landed in sound fixes for 7.3-rc1 as “Conexant headset plugin fixes”
Record: [Lore/msgid as above] [v1→v3] [No NAKs after explanation] [No
Cc: stable from reviewers] [Applied by maintainer]
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record: [To: tiwai@suse.com, perex@perex.cz; Cc: linux-sound, linux-
kernel. Reviewed in-thread by Takashi Iwai.]
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: [No syzbot/bugzilla. Author (Kylin) described 3-pole mic
recording failure. Not a fuzzer crash.]
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: [Single patch, three revisions. v2’s 0xc00 merge is independent
cleanup already on later mainline; 6.12 does not need it.]
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: [lore.kernel.org/stable fetch returned 403. No stable discussion
in the sound thread. UNVERIFIED whether AUTOSEL already queued it.]
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS**
Record: [`cx_process_headset_plugin` / rename;
`cx_update_headset_mic_vref`]
**Step 5.2: TRACE CALLERS**
Record: [`cx_update_headset_mic_vref` registered only in
`patch_conexant_auto()` for vendor IDs `0x14f11f86` (CX11880) and
`0x14f11f87` (SN6140) via `snd_hda_jack_detect_enable_callback()`.
Called from HDA jack unsol/poll (`hda_jack.c` `call_jack_callback`).]
**Step 5.3: TRACE CALLEES**
Record: [`snd_hda_codec_read`/`write`, `msleep` (up to 60 ms wait for
type detect). Process context, already sleeping.]
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: [Reachable from userspace by plugging a headset on those codecs.
Not a syscall crash path; common laptop jack path.]
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: [`cx_fixup_headset_recog()` already writes 0x24/0x20 from
presence alone at init. Plugin path was the inconsistent copy.]
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: [Yes. `sound/pci/hda/patch_conexant.c` lines 216–256.
`7aeb2590864874` and `e60dc981221105` are ancestors of HEAD. Rename not
present. Bug introduced 2024-01, in 6.12.]
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: [Minor: path `sound/pci/hda/patch_conexant.c` vs mainline
`sound/hda/codecs/conexant.c`; 6.12 still has separate CTIA/OMTP
branches instead of `val & 0xc00`. Semantic backport is a few lines in
`cx_update_headset_mic_vref`. No API/struct dependency.]
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: [86c11d5091e11 and dd110cc00cf85 are related but different bugs.
This always-enable-0x24 change is not in the tree.]
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: [ALSA HD-audio Conexant codec. IMPORTANT for users of those
laptops; PERIPHERAL vs core mm/net. Config: `SND_HDA_CODEC_CONEXANT`.]
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: [Active quirk stream on this file (Lenovo pin cfg, mic-bias
override, jack-detect error check). Mature driver, recent hardware-
specific fixes.]
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: [Driver-specific: CX11880/SN6140 (0x14f11f86/0x14f11f87),
typically laptop combo jacks.]
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: [Plug a 3-pole mic / headset that is not classified as
CTIA/OMTP, or type-detect timeout (3×20 ms). Unprivileged user, physical
jack. Common for those machines.]
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: [Headset microphone does not record. Not
oops/deadlock/corruption. Severity: MEDIUM, user-visible audio
breakage.]
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record: [Benefit: high for affected hardware (mic works). Risk: very low
(few lines, same verb already used on the CTIA/OMTP path and at init).
Ratio: favorable.]
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real bug: 3-pole headset mics get no VREF 80%, so recording fails
- Same intent as 7aeb259, which is already in this tree and was
AUTOSEL’d historically
- Matches `cx_fixup_headset_recog()` init behavior
- Small, obviously correct; maintainer reviewed and applied
- Hardware quirk class, routinely backported
- Sibling conexant headset fixes already in 6.12 (including Cc:stable
mic-bias override)
AGAINST:
- Not crash/security/corruption
- Codec-specific
- v3 message dropped the 3-pole explanation; includes a rename
- v3 leaves a redundant inner 0x24 write
- Needs a trivial path/context adjustment
UNRESOLVED:
- Whether stable@ already discussed it (lore/stable 403)
- How many 6.12 systems ship CX11880/SN6140 (not quantified)
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — maintainer applied; logic
matches init path
2. Fixes a real bug that affects users? **PASS** — 3-pole mic cannot
record
3. Important issue? **PASS** — broken recording on combo jack (hardware
quirk; not a panic)
4. Small and contained? **PASS** — ~one function, few lines
5. No new features or APIs? **PASS** — pin-control write already used
6. Can apply to the local tree? **PASS** — buggy code present; minor
path/context tweak
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: [Hardware quirk/workaround for Conexant combo-jack VREF.
Qualifies.]
**Step 9.4: MAKE YOUR DECISION**
This belongs in 6.12. The bug is in this tree, the fix is surgical, and
stable users with CX11880/SN6140 otherwise keep a dead headset mic on
3-pole plugs.
What it solves: on plugin, pin 0x19 presence no longer depends on
CTIA/OMTP bits to get VREF 80% (`0x24`). That is required for 3-pole
mics to record.
Risk vs benefit: benefit is working capture on those jacks; risk is a
redundant codec verb write already used on the success path.
Concerns: backport to `sound/pci/hda/patch_conexant.c` and leave the
existing CTIA/OMTP inner writes (or drop them; either is equivalent once
the caller always writes 0x24).
Verification:
- [Phase 1] Parsed tags: Link msgid, SOB Bob Song + Takashi Iwai; no
Fixes/Reported-by/Cc:stable
- [Phase 1] v1 on openwall/lkml: 3-pole mics cannot record without 0x24
- [Phase 2] Diff: rename + always-write 0x24 in
`cx_update_headset_mic_vref`; inner CTIA/OMTP write kept in v3
- [Phase 2] `0x24`/`0x20` verified as IN_EN|VREF_80 vs IN_EN in
`include/sound/hda_verbs.h`
- [Phase 3] blame: 7aeb2590864874 (2024-01-08); e60dc981221105 later;
both ancestors of HEAD
- [Phase 3] `git merge-base --is-ancestor 7aeb2590864874 HEAD` true;
same for e60dc981
- [Phase 3] `git log -S 'val & 0xc00' -- sound/pci/hda/patch_conexant.c`
empty (no 0xc00 merge here)
- [Phase 4] `b4 mbox` 11-message thread; Takashi applied v3; no NAK
after 3-pole explanation
- [Phase 4] lore.kernel.org/stable: 403, UNVERIFIED
- [Phase 5] only callers: `patch_conexant_auto` for
0x14f11f86/0x14f11f87 → jack callback
- [Phase 5] `cx_fixup_headset_recog` already presence→0x24 at init
(lines 167–183)
- [Phase 6] `git describe HEAD` → p-6.12-3-gc504cf0baa3d8; `make
kernelversion` → 6.12.111
- [Phase 6] buggy functions still named `cx_process_headset_plugin` /
`cx_update_headset_mic_vref` in `sound/pci/hda/patch_conexant.c`
- [Phase 8] Failure mode: silent headset mic, severity MEDIUM, hardware-
specific
**YES**
sound/hda/codecs/conexant.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/sound/hda/codecs/conexant.c b/sound/hda/codecs/conexant.c
index 862fcbe74e4f0..faaabc326f560 100644
--- a/sound/hda/codecs/conexant.c
+++ b/sound/hda/codecs/conexant.c
@@ -213,7 +213,7 @@ static void cx_remove(struct hda_codec *codec)
snd_hda_gen_remove(codec);
}
-static void cx_process_headset_plugin(struct hda_codec *codec)
+static void cx_process_headset_detect_plug_type(struct hda_codec *codec)
{
unsigned int val;
unsigned int count = 0;
@@ -249,10 +249,12 @@ static void cx_update_headset_mic_vref(struct hda_codec *codec, struct hda_jack_
* Check hp&mic tag to process headset plugin & plugout.
*/
mic_present = snd_hda_codec_read(codec, 0x19, 0, AC_VERB_GET_PIN_SENSE, 0x0);
- if (!(mic_present & AC_PINSENSE_PRESENCE)) /* mic plugout */
+ if (!(mic_present & AC_PINSENSE_PRESENCE)) { /* mic plugout */
snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20);
- else
- cx_process_headset_plugin(codec);
+ } else {
+ cx_process_headset_detect_plug_type(codec);
+ snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24);
+ }
}
static int cx_suspend(struct hda_codec *codec)
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18] ASoC: codecs: uda1342: Leave cache-only mode before syncing
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (18 preceding siblings ...)
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-5.15] ALSA: hda/conexant: Always enable the headset-mic pin on plugin Sasha Levin
@ 2026-10-19 13:47 ` Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add quirk for Acer Nitro AN515-45 Sasha Levin
` (41 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:47 UTC (permalink / raw)
To: patches, stable
Cc: Pengpeng Hou, Mark Brown, Sasha Levin, lgirdwood, perex, tiwai,
linux-sound, linux-kernel
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 29da72e58fde87e632f2fa43e448fcd1e3ab31b0 ]
uda1342_suspend() puts the regmap into cache-only mode. uda1342_resume()
marks the cache dirty and syncs it, but does not first leave cache-only
mode and ignores sync failures.
Leave cache-only mode before syncing the dirty cache, propagate sync
failures, and restore cache-only/dirty state on failure.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704072140.67222-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
The local tree is **v7.3-rc4**. The UDA1342 resume path never left
cache-only mode, so after suspend the codec stays cache-only and later
register writes never reach hardware.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: **[ASoC/codecs/uda1342] [Leave / prevent incorrect PM cache
state] [Disable cache-only mode before `regcache_sync()` on resume, and
fail resume if sync fails]**
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- **Fixes:** none (expected for this review)
- **Reported-by:** none
- **Tested-by:** none
- **Reviewed-by:** none
- **Acked-by:** none
- **Cc: stable:** none (expected)
- **Link:**
https://patch.msgid.link/20260704072140.67222-1-pengpeng@iscas.ac.cn
- **Signed-off-by:** Pengpeng Hou (author); Mark Brown (ASoC
maintainer). Ignore any Sasha Levin SOB if present.
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** `uda1342_suspend()` sets `regcache_cache_only(..., true)`.
`uda1342_resume()` marks the cache dirty and calls `regcache_sync()`
without leaving cache-only mode, and ignores the sync return value.
- **Symptom:** After suspend/resume the map stays cache-only, so later
`regmap` writes update only the cache. On this tree, `regcache_sync()`
also `WARN_ON`s and returns `-EINVAL` if `cache_only` is still set.
- **Version info in message:** none
- **Root cause (author):** resume never disables cache-only before sync,
and never reports sync failure.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not a disguised cleanup. It is an explicit PM correctness fix
(leave cache-only, propagate errors, restore dirty/cache-only on
failure).
===============================================================
PHASE 2: DIFF ANALYSIS
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/soc/codecs/uda1342.c` (+8 / -1)
- Function: `uda1342_resume()`
- Scope: single-file surgical fix
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- **Before:** `regcache_mark_dirty()` then `regcache_sync()` with
`cache_only` still true; return 0 always.
- **After:** `regcache_cache_only(..., false)`, mark dirty, `ret =
regcache_sync()`. On failure, re-enter cache-only, mark dirty, return
`ret`.
- Path: system-sleep resume (and the runtime-resume callback used by
`pm_runtime_force_resume()`).
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record:
- **Category:** logic / PM correctness (cache-only left enabled; ignored
error)
- **Mechanism:** suspend enables cache-only. Resume must disable it
before sync so writes hit I2C. Leaving it set means `_regmap_write()`
takes the cache-only early return and never calls `map->reg_write()`.
This tree also has `WARN_ON(map->cache_only)` in `regcache_sync()`, so
the old resume warns and returns `-EINVAL` without restoring hardware.
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- Matches the usual ASoC pattern (`tas2552_runtime_resume()` and many
others).
- Minimal, obviously correct.
- Failure unwind matches other codecs: stay cache-only and dirty so a
later resume can retry.
- Regression risk is low: one driver, resume path only, no API change.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- Buggy resume introduced in `de0fb25e37aae` (“ASoC: codecs: Add uda1342
codec driver”, Binbin Zhou, 2024-10-09).
- First appeared in **v6.13-rc1**. Present in this 7.3-rc4 tree.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Introducer is `de0fb25e37aae`, confirmed
ancestor of HEAD.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: Only four commits on the file: driver add, two `i2c_device_id`
cleanups, then this fix. Standalone, not patch X/Y.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Pengpeng Hou is a regular small-fix contributor, not the UDA1342
author. Original driver is Binbin Zhou (Loongson). Mark Brown applied
the patch. Related work around the same time: many ASoC “propagate
`regcache_sync()` errors” patches.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: None. Uses `regcache_cache_only` / `regcache_mark_dirty` /
`regcache_sync`, all long-standing. Applies standalone.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c 29da72e58fde8` →
https://patch.msgid.link/20260704072140.67222-1-pengpeng@iscas.ac.cn
- `b4 dig -a`: only **v1**
- Thread: submission + Mark Brown “Applied to sound.git for-7.3”. No
NAK, no requested revisions, no reviewer `Cc: stable`.
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Linus Walleij, Charles Keepax, Uwe Kleine-König, linux-
sound, linux-kernel. Maintainer Mark Brown applied it.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No `Reported-by`, syzbot, or bugzilla. Bug is from code
inspection. Driver was added for **Loongson-2K1000** (`7d04763cae994`
series: “Add uda1342 codec required on Loongson-2K1000”), so there are
real boards, even with no in-tree `.dts` match for `nxp,uda1342`.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone v1. Same resume pattern exists across ASoC codecs.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org/stable returned 403. No evidence this was
discussed on stable (UNVERIFIED beyond the 403).
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS**
Record: `uda1342_resume()`; `uda1342_suspend()` unchanged.
**Step 5.2: TRACE CALLERS**
Record:
- Wired via `DEFINE_RUNTIME_DEV_PM_OPS(uda1342_pm_ops, uda1342_suspend,
uda1342_resume, NULL)`:
- system sleep: `pm_runtime_force_suspend` / `pm_runtime_force_resume`
- runtime: `uda1342_suspend` / `uda1342_resume`
- `.pm = pm_sleep_ptr(&uda1342_pm_ops)` so system sleep uses these ops.
- Probe never calls `pm_runtime_enable()`, so runtime autosuspend is
unused. System suspend still calls `GET_CALLBACK(dev,
runtime_suspend/resume)` from `pm_runtime_force_*`
(`drivers/base/power/runtime.c`).
**Step 5.3: TRACE CALLEES**
Record: `regcache_cache_only`, `regcache_mark_dirty`, `regcache_sync`.
Sync uses maple ops (`REGCACHE_MAPLE`) and `_regmap_write`.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record:
- Userspace: suspend/resume (or hibernation) with
`CONFIG_SND_SOC_UDA1342` and a `nxp,uda1342` I2C device.
- After a “successful” old resume, `uda1342_mute()` /
`uda1342_hw_params()` → `regmap_update_bits()` → `_regmap_write()`
cache-only early return → no I2C write.
- Reachable on real Loongson-2K1000 hardware; not a syscall fuzzer path.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same leave-cache-only-then-sync pattern in many codecs
(`tas2552.c`, `wm8962.c`, etc.). This driver was the one that omitted
it.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record:
- `git describe HEAD` → **v7.3-rc4-27-gf0100363d8c37**
- `make kernelversion` → **7.3.0-rc4**
- Driver present: `sound/soc/codecs/uda1342.c`
- `git merge-base --is-ancestor de0fb25e37aae HEAD` → yes
- Bug introduced in v6.13-rc1, still in this lineage. Current file
already has the fixed resume (expected: this is the mainline commit
under review).
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: Clean apply. Surrounding resume/probe code is the original
driver plus trivial `i2c_device_id` init cleanups. No refactor.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: No earlier equivalent fix. Later `86fc3483a4d60` (“regcache:
Warn if regcache_sync() is called in cache_only mode”, also v7.3-rc1)
makes the old resume a `WARN_ON` + `-EINVAL` on this tree.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: **ASoC codec driver** (`sound/soc/codecs/`). Criticality:
**PERIPHERAL** (one NXP codec, Loongson-2K1000). Not core mm/fs/net.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: ASoC codecs are actively developed. This file itself is quiet
(four commits). Mature for this driver: the PM bug was present from
introduction.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: Users of **CONFIG_SND_SOC_UDA1342** / `nxp,uda1342` (documented
for Loongson-2K1000). Driver- and config-specific, not universal.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record:
- Trigger: system suspend/resume with this codec.
- Common on any machine that sleeps.
- Not an unprivileged syscall exploit path.
- Not a timing race.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record:
- On this tree: `WARN_ON` in `regcache_sync()` and resume returns
`-EINVAL` → hardware not restored.
- Even without that warn: cache-only left set → mute/volume/hw_params
never programmed to the chip; audio broken after resume.
- Severity: **HIGH** for those devices (broken audio / failed resume),
not a panic or filesystem corruption.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- **Benefit:** medium-high for UDA1342 boards; zero elsewhere.
- **Risk:** very low (8 lines, one function, standard pattern).
- **Ratio:** favorable.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real suspend/resume bug: cache-only never cleared, so post-resume
register writes never hit I2C.
- On this 7.3-rc4 tree, `regcache_sync()` additionally WARNs and fails
if cache-only is still set.
- Small, surgical, matches other ASoC codecs; maintainer applied v1 with
no objections.
- Driver exists here since v6.13; no extra prerequisites.
- Error return lets the PM core fail resume instead of pretending it
succeeded.
AGAINST:
- Peripheral codec, no in-tree DTS, no user/syzbot report.
- Author is not the original driver author; no `Tested-by`.
- Not a security/UAF/deadlock class issue.
UNRESOLVED:
- Stable list search on lore returned 403.
- No public confirmation of a user-reproduced resume failure (code
analysis only).
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — standard pattern; applied by
Mark Brown. No extra tester tag.
2. Fixes a real bug that affects users? **PASS** — resume leaves the
codec in cache-only; Loongson-2K1000 uses this codec.
3. Important issue? **PASS** — broken audio / failed resume after sleep;
WARN_ON on this tree. Not a panic, but user-visible PM breakage.
4. Small and contained? **PASS** — 8 insertions, 1 deletion, one
function.
5. No new features or APIs? **PASS**
6. Can apply to the local tree? **PASS** — file and helpers exist;
context matches.
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: None (not a device ID / DT / build / docs exception). It is a
normal small bug fix.
**Step 9.4: MAKE YOUR DECISION**
This tree has the UDA1342 driver and the broken resume. The patch is the
usual, low-risk ASoC fix: leave cache-only, sync, report errors. That is
appropriate to backport here.
**What the commit solves for this tree:** After suspend, resume never
turns cache-only off. Sync then either WARNs/`-EINVAL` (this 7.3 code)
or leaves later `regmap` writes stuck in the cache. Audio after sleep is
wrong. The patch restores hardware and reports I2C/sync failure.
**Stable rules:** Small, obviously correct, no new API, applies cleanly,
real PM bug.
**Risk vs benefit:** Very low regression risk vs fixing resume for this
codec.
**Concerns:** Niche hardware, no tester tag. Not enough to reject a
9-line resume fix whose code is present in this checkout.
Verification:
- [Phase 1] Parsed tags: Link to msgid `20260704072140.67222-1`; SOBs
Hou and Brown; no Fixes/Reported-by/Cc:stable
- [Phase 2] Diff: `uda1342_resume()` +8/-1; add
`regcache_cache_only(false)`, check `regcache_sync()`, unwind on error
- [Phase 2] `_regmap_write()`: cache_only + !cache_bypass returns 0
without `reg_write` (verified in `drivers/base/regmap/regmap.c`)
- [Phase 2] `regcache_sync()`: `WARN_ON(map->cache_only)` returns
`-EINVAL` (verified line 437 of `regcache.c`)
- [Phase 3] `git describe HEAD`: v7.3-rc4-27-gf0100363d8c37; `make
kernelversion`: 7.3.0-rc4
- [Phase 3] `git blame` on parent: buggy resume is `de0fb25e37aae`
(v6.13-rc1)
- [Phase 3] `git merge-base --is-ancestor de0fb25e37aae HEAD`: yes
- [Phase 3] `git merge-base --is-ancestor 29da72e58fde8 HEAD`: yes
(mainline commit under review)
- [Phase 3] File log: four commits, no series dependency
- [Phase 4] `b4 dig -c 29da72e58fde8`: lore msgid match; `-a`: v1 only;
`-w`: ASoC maintainers CC’d; mbox: Brown applied, no NAK
- [Phase 4] lore.kernel.org/stable: 403 — UNVERIFIED
- [Phase 5] `DEFINE_RUNTIME_DEV_PM_OPS` + `pm_sleep_ptr`;
`pm_runtime_force_suspend/resume` call the runtime callbacks
- [Phase 5] Probe does not `pm_runtime_enable()` — system sleep still
uses `pm_runtime_force_*`
- [Phase 5] `7d04763cae994`: driver added for Loongson-2K1000
- [Phase 6] Pre-fix resume read from `29da72e58fde8^`: mark dirty +
sync, no `cache_only(false)`
- [Phase 6] WARN_ON added in `86fc3483a4d60` (v7.3-rc1), present in this
tree
- [Phase 8] Failure: WARN + failed resume / cache-only stuck; severity
HIGH for this device
- UNVERIFIED: whether this was already requested on the stable list
(HTTP 403)
**YES**
sound/soc/codecs/uda1342.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/uda1342.c b/sound/soc/codecs/uda1342.c
index b0b29012842da..c21919bef4d72 100644
--- a/sound/soc/codecs/uda1342.c
+++ b/sound/soc/codecs/uda1342.c
@@ -308,9 +308,16 @@ static int uda1342_suspend(struct device *dev)
static int uda1342_resume(struct device *dev)
{
struct uda1342_priv *uda1342 = dev_get_drvdata(dev);
+ int ret;
+ regcache_cache_only(uda1342->regmap, false);
regcache_mark_dirty(uda1342->regmap);
- regcache_sync(uda1342->regmap);
+ ret = regcache_sync(uda1342->regmap);
+ if (ret) {
+ regcache_cache_only(uda1342->regmap, true);
+ regcache_mark_dirty(uda1342->regmap);
+ return ret;
+ }
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add quirk for Acer Nitro AN515-45
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (19 preceding siblings ...)
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18] ASoC: codecs: uda1342: Leave cache-only mode before syncing Sasha Levin
@ 2026-10-19 13:47 ` Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-5.15] ALSA: usb-audio: Add native DSD support for Cambridge Audio streamers Sasha Levin
` (40 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:47 UTC (permalink / raw)
To: patches, stable
Cc: Zhang Heng, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Zhang Heng <zhangheng@kylinos.cn>
[ Upstream commit 0d90a929836344f1d3b39f22f08ccecc62378a59 ]
The Acer Nitro AN515-45 requires ALC2XX_FIXUP_HEADSET_MIC to make the
headset microphone work properly.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=221925
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Link: https://patch.msgid.link/20260921124450.639601-2-zhangheng@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a one-line Realtek HDA hardware quirk for Acer Nitro AN515-45.
The local tree is **6.18.57** (`v6.18.57-155-gcdf239ca885b2`). The
existing `ALC2XX_FIXUP_HEADSET_MIC` path is already in this tree; the
SSID `1025:151e` is not in `v6.18.57`.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: `[ALSA/hda/realtek] [Add] quirk for Acer Nitro AN515-45` — add
an existing headset-mic fixup for one laptop SSID.
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- `Link: https://bugzilla.kernel.org/show_bug.cgi?id=221925` — user bug
report
- `Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>` — author
- `Link:
https://patch.msgid.link/20260921124450.639601-2-zhangheng@kylinos.cn`
— patch 2/2
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` — ALSA maintainer
- No `Fixes:`, `Reported-by:`, `Tested-by:`, `Cc: stable` (absence is
expected)
- Ignore pipeline `[ Upstream commit ... ]` and `Signed-off-by: Sasha
Levin`
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- Bug: headset microphone on Acer Nitro AN515-45 does not work
- Symptom: combo-jack mic not detected / not created as an input
- Root cause (from bugzilla, not the short commit body): BIOS leaves pin
0x19 as N/A (`Pin Default 0x411111f0`); no headset-mic path is parsed
- Fix: apply existing `ALC2XX_FIXUP_HEADSET_MIC` for PCI/codec SSID
`1025:151e`
Step 1.4: DETECT HIDDEN BUG FIXES
Record: Not a disguised cleanup. This is an explicit hardware quirk to
make a broken jack work.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- File: `sound/hda/codecs/realtek/alc269.c` (+1 / −0)
- Function/table: `alc269_fixup_tbl[]`
- Scope: single-file, one-line table addition
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record:
- Before: SSID `0x1025:0x151e` has no dedicated entry, so probe does not
apply the headset-mic pincfg
- After: that SSID maps to `ALC2XX_FIXUP_HEADSET_MIC`
- Path: codec probe / pin parse (`alc269_probe` → `snd_hda_pick_fixup`)
- Not an error path or API change
Step 2.3: IDENTIFY THE BUG MECHANISM
Record:
- Category: hardware workaround (quirk table entry)
- Mechanism: `alc2xx_fixup_headset_mic()` at pre-probe sets pin 0x19 to
`0x03a1103c`, updates coef 0x45, and sets `HDA_PINCFG_HEADSET_MIC` so
the combo-jack mic is parsed
Step 2.4: ASSESS THE FIX QUALITY
Record:
- Minimal, same pattern as AN515-57 / AN515-58 / AN517-55 already in
this tree
- Only the matching laptop is affected
- Regression risk is low; remaining auto-mic source-switch behavior is
existing generic parser behavior, not introduced here
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record:
- Neighboring Acer entries come from `aeeb85f26c3bbe` (Realtek codec
split, 2025-07-09) and later sibling quirks
- The missing-SSID bug is “no quirk for this board,” not a recently
introduced logic bug
- `ALC2XX_FIXUP_HEADSET_MIC` itself dates to 2024 (`5a69e3d0a1b0` /
`50db91fccea0` era) and is present in v6.18.57
Step 3.2: FOLLOW THE FIXES: TAG
Record: No `Fixes:` tag. Not applicable.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record:
- Sibling: `a9584e9e46448` “Enable headset mic for Acer Nitro 5”
(AN515-57) is already in v6.18.57
- Same file routinely receives one-line `SND_PCI_QUIRK` additions
- Series is `[PATCH 2/2]`; patch 1/2 is an unrelated Lenovo ThinkBook
G8+ quirk (`17aa:38dc`) and is not a prerequisite
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record: Zhang Heng submitted two independent one-line quirks. Takashi
Iwai applied both. Author is a contributor; maintainer sign-off is the
stronger signal.
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record: Standalone. Needs only `alc269_fixup_tbl` and
`ALC2XX_FIXUP_HEADSET_MIC`, both present in this 6.18.y tree.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- `b4 dig -c 0d90a929836344f1d3b39f22f08ccecc62378a59` matched `[PATCH
2/2]`
- Lore/msgid: `https://patch.msgid.link/20260921124450.639601-2-
zhangheng@kylinos.cn`
- Only v1; no later revision
- Takashi Iwai: “Applied both patches. Thanks.” No NAK, no stable
objection
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record (`b4 dig -w`): To `tiwai@suse.com`; Cc `linux-
sound@vger.kernel.org`, `linux-kernel@vger.kernel.org`. Subsystem
maintainer applied it.
Step 4.3: SEARCH FOR THE BUG REPORT
Record (bugzilla 221925, fetched via curl; WebFetch returned 403):
- Title: `ALC295 / Acer Nitro AN515-45 (1025:151e): headset mic not
detected, BIOS disables pin 0x19`
- Reporter: Rishikesh Jha, 2026-08-26, hardware AMD AN515-45, codec
ALC295 `0x10ec0295`, subsystem `0x1025151e`
- Symptom: speakers/headphones/internal mic work; combo-jack headset mic
is not created
- Reporter verified a firmware pincfg plus `headset-mode`
- Zhang Heng asked for `model=alc2xx-fixup-headset-mic`; reporter
confirmed the headset mic works
- Remaining userspace auto-mic mux limitation is explained as generic
parser behavior, not a reason this quirk is wrong
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Patch 1/2 is a different machine/SSID/fixup. This commit does
not depend on it.
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: No useful `lore.kernel.org/stable` hit for this model. The
original AN515-58 headset-mic quirk (`5a69e3d0a1b0`) was `Cc: stable`.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: Table `alc269_fixup_tbl[]` only. Consumed fixup:
`alc2xx_fixup_headset_mic()`.
Step 5.2: TRACE CALLERS
Record:
- `alc269_probe()` calls `snd_hda_pick_fixup(..., alc269_fixup_tbl,
alc269_fixups)`
- That matches PCI SSID, then codec SSID
- Probe path for ALC269-family codecs including ALC295 (`0x10ec0295`)
Step 5.3: TRACE CALLEES
Record: `alc2xx_fixup_headset_mic()` → `snd_hda_apply_pincfgs()`,
`alc_update_coef_idx()`, `spec->parse_flags |= HDA_PINCFG_HEADSET_MIC`
Step 5.4: FOLLOW THE CALL CHAIN
Record: Reachable on boot when this laptop’s HD-audio codec is
enumerated. Userspace sees the missing capture device without the quirk.
Not a syscall crash path; it is a real device-enablement path.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Same fixup already used in this tree for AN515-57 (`0x1539`),
AN515-58 (`0x159c`), AN517-55 (`0x1597`), plus other vendors.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record: Yes. v6.18.57 has `sound/hda/codecs/realtek/alc269.c`,
`ALC2XX_FIXUP_HEADSET_MIC`, and sibling Nitro entries, but **no**
`0x1025, 0x151e` / AN515-45 line. Headset mic stays broken on this model
here.
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record: Clean apply. Insert point is identical: after `0x1466` Aspire
A515-56, before `0x1534` Predator PH315-54.
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: Sibling Nitro headset-mic quirks are present. There is no
earlier AN515-45-specific fix. (Ignore candidate-prep cherry-pick on
current HEAD.)
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: ALSA HD-audio Realtek codec driver. Criticality: IMPORTANT for
users of this common laptop audio stack; board-specific impact.
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: Mature, actively receiving per-board quirks. This is the normal
stable-safe pattern, not a new subsystem.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: Driver-specific / hardware-specific: Acer Nitro AN515-45, SSID
`1025:151e`, Realtek ALC295.
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: Every boot / every headset plug on that machine. Unprivileged
user cannot crash the kernel; they just cannot use the headset mic.
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record: Functional hardware failure (headset capture missing). Severity
MEDIUM as a crash, HIGH as user-visible hardware breakage. Stable
routinely takes these quirks.
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record:
- Benefit: high for owners of this 2021-era Nitro 5; restores combo-jack
mic
- Risk: very low (one table row, existing fixup, SSID-matched)
- Ratio: strongly favors backport
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR:
- Real user bug (bugzilla 221925) with alsa-info and codec dump
- Reporter confirmed `alc2xx-fixup-headset-mic` makes the headset mic
work
- One-line `SND_PCI_QUIRK` using a fixup already in 6.18.y
- Same fix already shipped here for sibling Nitro 5 models
- ALSA maintainer applied it; no NAK
- Explicit stable exception: hardware quirk for an existing driver
AGAINST:
- Not a crash/security/corruption fix
- Bugzilla still lists leftover auto-mic source-switch UX after the mic
appears
- Patch 2/2 of a series (other patch is unrelated, not required)
UNRESOLVED:
- WebFetch of lore/bugzilla returned 403; bugzilla content was verified
with curl instead
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? PASS — existing fixup; reporter tested
the model; maintainer applied
2. Fixes a real bug that affects users? PASS — headset mic not detected
3. Important issue? PASS under the hardware-quirk exception (device does
not work correctly)
4. Small and contained? PASS — +1 line
5. No new features or APIs? PASS — table entry only
6. Can apply to the local tree? PASS — clean insert into
`alc269_fixup_tbl` on 6.18.y
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: Hardware quirk / workaround for a broken BIOS pin config on
existing hardware. This is a standard YES for stable.
Step 9.4: MAKE YOUR DECISION
Backport. This tree already has the Realtek driver and
`ALC2XX_FIXUP_HEADSET_MIC`. Adding SSID `1025:151e` is the same class of
fix already present for AN515-57/58.
What it solves for 6.18.y users: on Acer Nitro AN515-45 the BIOS marks
headset-mic pin 0x19 as N/A, so the kernel never creates a headset
capture device. The quirk applies the existing pincfg/coef fixup so the
combo jack mic works.
Risk vs benefit: one SSID-guarded line, reused fixup, verified on the
machine. Benefit is real hardware enablement; regression surface is that
one laptop.
Verification:
- [Phase 1] Parsed tags: bugzilla 221925, msgid `...639601-2...`, SOB
Takashi Iwai; no Fixes/Cc stable
- [Phase 2] Diff: +1 `SND_PCI_QUIRK(0x1025, 0x151e, "Acer Nitro
AN515-45", ALC2XX_FIXUP_HEADSET_MIC)` in `alc269_fixup_tbl`
- [Phase 2] Read `alc2xx_fixup_headset_mic()`: sets pin 0x19
`0x03a1103c`, coef 0x45, `HDA_PINCFG_HEADSET_MIC`
- [Phase 3] `make kernelversion` / `git describe HEAD`: 6.18.57 /
`v6.18.57-155-gcdf239ca885b2`
- [Phase 3] No Fixes tag to follow
- [Phase 3] Sibling AN515-57 quirk `a9584e9e46448` is ancestor of
`v6.18.57`
- [Phase 3] Series patch 1/2 is unrelated ThinkBook G8+ quirk
- [Phase 4] `b4 dig -c 0d90a9298363`: matched patch 2/2; only v1
- [Phase 4] `b4 dig -w`: To tiwai, Cc linux-sound
- [Phase 4] mbox: Takashi “Applied both patches”
- [Phase 4] curl bugzilla 221925: ALC295, SSID 1025:151e, pin 0x19 N/A;
`alc2xx-fixup-headset-mic` confirmed working
- [Phase 4] lore/bugzilla WebFetch: 403 (used curl/b4 instead)
- [Phase 5] `alc269_probe()` → `snd_hda_pick_fixup()` uses this table on
codec enumeration
- [Phase 6] `git grep 0x151e v6.18.57 --
sound/hda/codecs/realtek/alc269.c`: no match
- [Phase 6] `git grep ALC2XX_FIXUP_HEADSET_MIC v6.18.57 --
.../alc269.c`: present, including AN515-57/58
- [Phase 6] v6.18.57 insert point between `0x1466` and `0x1534` matches
the patch
- [Phase 8] Failure mode: headset mic missing on that laptop, not a
kernel oops
- UNVERIFIED: live reproduction on AN515-45 hardware (not available
here)
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 4eefd5d87f04b..fa5bc54ff083d 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -6615,6 +6615,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
+ SND_PCI_QUIRK(0x1025, 0x151e, "Acer Nitro AN515-45", ALC2XX_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1025, 0x1539, "Acer Nitro 5 AN515-57", ALC2XX_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x159c, "Acer Nitro 5 AN515-58", ALC2XX_FIXUP_HEADSET_MIC),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.15] ALSA: usb-audio: Add native DSD support for Cambridge Audio streamers
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (20 preceding siblings ...)
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add quirk for Acer Nitro AN515-45 Sasha Levin
@ 2026-10-19 13:47 ` Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18] ALSA: hda: Add Lisuan HDMI controller and codec support Sasha Levin
` (39 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:47 UTC (permalink / raw)
To: patches, stable
Cc: Matus Gajdos, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Matus Gajdos <matuszpd@gmail.com>
[ Upstream commit 4e1462e7cd6a9b920f441842726cc2b9d232673e ]
The Cambridge Audio streamer advertises the UAC2 RAW_DATA format on
altsetting 2 of its playback interface, but without the DSD_RAW quirk
flag the driver exposes it only as a SPECIAL format that cannot be
used.
Add QUIRK_FLAG_DSD_RAW for the device (USB ID 22e8:ca10), so the
altsetting is exposed as DSD_U32_BE, enabling native DSD64/128/256
playback.
Tested with: gst-launch-1.0 filesrc location=file.dsf ! \
avdemux_dsf ! dsdconvert ! \
alsasink device=hw:2,0
Signed-off-by: Matus Gajdos <matuszpd@gmail.com>
Link: https://patch.msgid.link/20261002125237.82188-1-matuszpd@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a two-line USB quirk that enables native DSD on an existing
device. The local tree is **6.18.57** (`v6.18.57-155-gcdf239ca885b2`).
The DSD_RAW machinery is already here; only the Cambridge Audio ID is
missing.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: `[ALSA/usb-audio] [add] Add native DSD support for Cambridge
Audio streamers`
Subsystem is ALSA USB-audio. The verb is “Add”, but the body is a
device-specific quirk, not a new driver or API.
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Signed-off-by: Matus Gajdos <matuszpd@gmail.com>` (author)
- `Link:
https://patch.msgid.link/20261002125237.82188-1-matuszpd@gmail.com`
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` (ALSA maintainer)
- No `Fixes:` tag (expected)
- No `Reported-by:`, `Tested-by:`, `Reviewed-by:`, `Acked-by:`, or `Cc:
stable`
- Ignored: `[Upstream commit ...]` and `Signed-off-by: Sasha Levin`
(pipeline)
Notable: maintainer SOB; author included a concrete `gst-launch` test
command in the body.
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- Bug: device `22e8:ca10` advertises UAC2 `RAW_DATA` on playback
altsetting 2, but without `QUIRK_FLAG_DSD_RAW` the driver exposes that
altsetting only as `SPECIAL`, which userspace cannot use.
- Symptom: native DSD64/128/256 playback is unavailable on Cambridge
Audio streamers.
- Root cause: UAC has no dedicated DSD bit; the driver only remaps
`RAW_DATA` to `DSD_U32_BE` when `QUIRK_FLAG_DSD_RAW` is set and
`fp->dsd_raw` is true.
- Version info: none in the message.
- Tested with an explicit GStreamer DSD playback pipeline.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not a disguised cleanup. It is a hardware quirk / device-ID
addition so advertised DSD actually works. That is the standard ALSA
usb-audio DSD_RAW pattern.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/usb/quirks.c` (+2 / -0)
- Function/data: `quirk_flags_table[]` only
- Scope: single-file, two-line table insertion
```2376:2383:sound/usb/quirks.c
DEVICE_FLG(0x21b4, 0x0230, /* Ayre QB-9 Twenty */
QUIRK_FLAG_DSD_RAW),
DEVICE_FLG(0x21b4, 0x0232, /* Ayre QX-5 Twenty */
QUIRK_FLAG_DSD_RAW),
DEVICE_FLG(0x22e8, 0xca10, /* Cambridge Audio streamers */
QUIRK_FLAG_DSD_RAW),
DEVICE_FLG(0x2522, 0x0007, /* LH Labs Geek Out HD Audio 1V5 */
QUIRK_FLAG_SET_IFACE_FIRST),
```
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- Before: `22e8:ca10` has no table entry. Probe does not set
`QUIRK_FLAG_DSD_RAW`. UAC2 `RAW_DATA` stays
`SNDRV_PCM_FMTBIT_SPECIAL`.
- After: exact VID:PID match ORs `QUIRK_FLAG_DSD_RAW`.
`snd_usb_interface_dsd_format_quirks()` then returns
`SNDRV_PCM_FMTBIT_DSD_U32_BE` when `fp->dsd_raw` is set.
- Path: device probe / format parse (init), not an error path.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: `[Hardware workaround / USB quirk ID]`
Mechanism: UAC2 `RAW_DATA` is only treated as native DSD when the
existing `QUIRK_FLAG_DSD_RAW` flag is set. This device advertises that
format but was missing from the allow-list.
Verified in this tree:
- `format.c` sets `fp->dsd_raw = true` and `SNDRV_PCM_FMTBIT_SPECIAL`
for `UAC2_FORMAT_TYPE_I_RAW_DATA`
- `quirks.c:2078-2079` remaps only if `(chip->quirk_flags &
QUIRK_FLAG_DSD_RAW) && fp->dsd_raw`
**Step 2.4: ASSESS THE FIX QUALITY**
Record: Obviously correct and minimal. Same `DEVICE_FLG(...,
QUIRK_FLAG_DSD_RAW)` pattern already used for Ayre, ddHiFi, XMOS,
McIntosh, HEM, etc. No API, lock, or struct change. Regression risk is
confined to `22e8:ca10`; other devices are untouched. Matching is exact
VID:PID (`snd_usb_init_quirk_flags_table()` returns on first match;
there is no `VENDOR_FLG(0x22e8)`).
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- New lines are this commit. Surrounding DSD_RAW entries date to
`f7fea075edfa08` (Jussi Laako, 2023) and `c84bd6c810d188` (2024).
- The DSD_RAW mechanism itself is `68e851ee4cfd2` (“Move generic DSD raw
detection into quirk_flags”), 2021-07-29, first appeared in
**v5.15-rc1**. `git merge-base --is-ancestor 68e851ee4cfd2 HEAD` →
yes.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Not applicable. The “bug” is a missing device
allow-list entry, not a regression from a specific commit.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: Recent `sound/usb/quirks.c` history is full of the same class of
patches (JBL FIXED_RATE, Audient IGNORE_CTL_ERROR,
LEAK/PureAudio/Comtrue DSD_RAW, etc.). This commit is standalone, not
`patch X/Y`.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: `git log --author="Matus Gajdos" -- sound/usb/` shows only this
commit. Author is a hardware user, not the subsystem maintainer.
Maintainer Takashi Iwai applied it the next day.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: No prerequisites. Parent of this tree already has `DEVICE_FLG`,
`QUIRK_FLAG_DSD_RAW`, `fp->dsd_raw`, and the Ayre / LH Labs insertion
context. Applies standalone.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c 8a762801bd078` →
https://patch.msgid.link/20261002125237.82188-1-matuszpd@gmail.com
- `b4 dig -a`: **v1 only**, 2026-10-02, Matus Gajdos. No v2/v3.
- Thread (mbox, 2 messages): submission + Takashi Iwai “Applied now.
Thanks.”
- No NAK, no requested changes, no reviewer `Cc: stable`.
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): To/Cc were Jaroslav Kysela, Takashi Iwai, linux-
sound, linux-kernel. Correct ALSA maintainers. Iwai applied it.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No external bugzilla/syzbot report. The author is the reporter
and tester. USB ID `22e8:ca10` is Cambridge Audio (vendor `22e8` is CA;
Windows INF lists `VID_22E8&PID_CA10` as Cambridge Audio USB Audio).
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone single patch. Not part of a series.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: No stable-list discussion found for this ID/subject. lore HTML
fetches returned 403; search did not turn up a prior rejection. Similar
DSD_RAW ID additions **have** been sent to stable historically (`Cc:
stable` on McIntosh `99248c8902f50`, HEM `122e2cb7e1a30`, LEAK
`c83fc13960643`).
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF**
Record: No function body changed. Data: `quirk_flags_table[]`.
Consumers: `snd_usb_init_quirk_flags_table()`,
`snd_usb_interface_dsd_format_quirks()`.
**Step 5.2: TRACE CALLERS**
Record:
- `snd_usb_init_quirk_flags()` in `sound/usb/card.c:728` →
`snd_usb_init_quirk_flags_table()` during USB-audio probe
- `parse_audio_format_i()` in `sound/usb/format.c:157` →
`snd_usb_interface_dsd_format_quirks()`
Probe/format-parse path, not IRQ/hot path.
**Step 5.3: TRACE CALLEES**
Record: Table walk + `chip->quirk_flags |= p->flags`. Later, DSD remap
returns a format bit. No alloc, no lock in the new code (lock already
exists around flag init in `card.c`).
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: USB plug-in → `snd_usb_audio` probe → quirk flags → format parse
→ PCM device with `DSD_U32_BE` on altsetting 2 → userspace (`alsasink`,
etc.). Reachable whenever this streamer is connected. Unprivileged
playback once the device node is accessible.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Dozens of identical `QUIRK_FLAG_DSD_RAW` table entries in the
same file. This is the standard allow-list, not a one-off.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: Yes. This is 6.18.57. `QUIRK_FLAG_DSD_RAW` and `fp->dsd_raw`
have been here since v5.15. Parent of the candidate has **no** `0x22e8`
entry. Without this patch, Cambridge Audio `22e8:ca10` still exposes
`SPECIAL` instead of DSD. The device is not new-to-6.19 infrastructure;
only the ID is new.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: Clean apply. Parent context is exactly Ayre QX-5 Twenty then LH
Labs Geek Out. No refactor of the table in 6.18.y.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: No other Cambridge Audio / `0x22e8` quirk. No alternate DSD fix
for this ID. `git grep 0x22e8 -- sound/usb` only hits this new line.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: `[sound/usb (ALSA USB-audio)] [IMPORTANT]` — common driver, but
this change is device-specific.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Actively maintained. Frequent small quirk-table updates from
Takashi Iwai and hardware vendors. Mature pattern, low churn in the
matching logic itself.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: Driver-specific / device-specific. Only USB `22e8:ca10`
(Cambridge Audio streamers). PCM users of that device are unchanged; DSD
users gain a working format.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Trigger is plugging in that streamer and opening the
RAW_DATA/DSD altsetting. Common for owners of that hardware; impossible
for everyone else. Not a race.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: `[Missing hardware capability / unusable advertised format]
[MEDIUM as a bug; YES as a quirk exception]`
Not a panic, UAF, or corruption. Without the quirk, advertised DSD is
unusable (`SPECIAL`). With it, native DSD works. That is the same class
as USB/codec/SFP quirks the stable rules call out.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- Benefit: high for owners of these streamers (DSD actually works); zero
effect elsewhere.
- Risk: very low (2 lines, exact VID:PID, existing flag, maintainer-
applied, hardware-tested).
- Ratio: strongly favors backport.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Hardware quirk / USB ID addition — explicit stable exception
- 2-line, obviously correct, no API change
- Infrastructure present in this 6.18.y tree since v5.15
- Applies cleanly
- Author tested real DSD64/128/256 playback
- Applied by ALSA maintainer Takashi Iwai; no objections
- Same pattern already used (and historically Cc:stable) for other DACs
- Only `22e8:ca10` is affected
AGAINST:
- Not a crash, security hole, or data-corruption fix
- Enables a capability rather than stopping an oops
- Author is not a regular subsystem contributor (mitigated by maintainer
apply)
UNRESOLVED:
- Could not fetch lore HTML (403); full thread recovered via `b4 dig -m`
- No independent second-user report beyond the author
- usb-ids listing for `22e8` confirms Cambridge Audio; `ca10` is in
Windows CA USB-audio INF, not in every public usb-ids dump
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — 2-line allow-list; author
`gst-launch` test; maintainer applied
2. Fixes a real bug that affects users? **PASS** — advertised DSD
altsetting is unusable without the flag
3. Important issue? **PASS via quirk exception** — not a crash; hardware
enablement for existing devices
4. Small and contained? **PASS** — +2 lines, one table
5. No new features or APIs? **PASS** — no new syscall/API/driver;
existing `QUIRK_FLAG_DSD_RAW` only
6. Can apply to the local tree? **PASS** — clean context in 6.18.57
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Hardware quirk / USB device-ID addition to an existing
driver.** Automatic YES category.
**Step 9.4: MAKE YOUR DECISION**
This belongs on 6.18.y. The tree already has the DSD_RAW path; the
commit only names one USB ID so that device’s advertised RAW_DATA
altsetting becomes usable DSD. That is the same class of stable material
as other ALSA usb-audio DSD and USB quirks.
Verification:
- [Phase 1] Parsed tags: author SOB, Link to msgid, Takashi Iwai SOB; no
Fixes/Reported-by/Cc:stable
- [Phase 1] Body: UAC2 RAW_DATA on altsetting 2 exposed as SPECIAL
without DSD_RAW; tested gst-launch DSD pipeline
- [Phase 2] Diff: +2 lines in `quirk_flags_table[]` only —
`DEVICE_FLG(0x22e8, 0xca10, QUIRK_FLAG_DSD_RAW)`
- [Phase 2] `format.c:59-62` sets `fp->dsd_raw` on UAC2 RAW_DATA;
`quirks.c:2078-2079` remaps only with the flag
- [Phase 2] `snd_usb_init_quirk_flags_table()` exact VID:PID match; no
`VENDOR_FLG(0x22e8)`
- [Phase 3] `68e851ee4cfd2` introduced DSD_RAW in v5.15-rc1; ancestor of
this HEAD
- [Phase 3] Author has no other `sound/usb` commits; not a series
- [Phase 3] Parent of candidate has Ayre then LH Labs context and no
`0x22e8`
- [Phase 4] `b4 dig -c 8a762801bd078`: lore msgid
`20261002125237.82188-1-matuszpd@gmail.com`
- [Phase 4] `b4 dig -a`: v1 only
- [Phase 4] `b4 dig -w`: Iwai, Kysela, linux-sound
- [Phase 4] mbox: Iwai “Applied now. Thanks.” No NAK, no stable
nomination
- [Phase 4] WebFetch lore HTML: 403; discussion recovered from mbox
- [Phase 4] Similar historical DSD_RAW quirks carried `Cc: stable`
(McIntosh, HEM, LEAK)
- [Phase 5] Callers: `card.c:728` probe; `format.c:157` format parse
- [Phase 6] `git describe HEAD` = v6.18.57-155-gcdf239ca885b2; `make
kernelversion` = 6.18.57
- [Phase 6] `git merge-base --is-ancestor v6.18 HEAD` yes; candidate not
in v6.18 release
- [Phase 6] Clean apply in this tree
- [Phase 7] ALSA USB-audio, actively quirk-maintained
- [Phase 8] Failure mode: unusable DSD format on one USB ID; severity
medium, quirk-exception YES
- UNVERIFIED: live lore.kernel.org/stable thread contents (HTTP 403 /
unhelpful search)
**YES**
sound/usb/quirks.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 8dcba375bd4a3..be80d9d14e0ad 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -2379,6 +2379,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
QUIRK_FLAG_DSD_RAW),
DEVICE_FLG(0x21b4, 0x0232, /* Ayre QX-5 Twenty */
QUIRK_FLAG_DSD_RAW),
+ DEVICE_FLG(0x22e8, 0xca10, /* Cambridge Audio streamers */
+ QUIRK_FLAG_DSD_RAW),
DEVICE_FLG(0x2522, 0x0007, /* LH Labs Geek Out HD Audio 1V5 */
QUIRK_FLAG_SET_IFACE_FIRST),
DEVICE_FLG(0x262a, 0x9302, /* ddHiFi TC44C */
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18] ALSA: hda: Add Lisuan HDMI controller and codec support
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (21 preceding siblings ...)
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-5.15] ALSA: usb-audio: Add native DSD support for Cambridge Audio streamers Sasha Levin
@ 2026-10-19 13:47 ` Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-6.1] ALSA: usb-audio: Rename the Audient iD14 monitor mix volume control Sasha Levin
` (38 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:47 UTC (permalink / raw)
To: patches, stable
Cc: Xu Rao, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Xu Rao <raoxu@uniontech.com>
[ Upstream commit ceaebef91d1aff671a512d5f003766ea41152d94 ]
Lisuan GPUs expose an HD-audio controller at PCI ID 4c54:5010 and an
HDMI/DP codec with codec ID 0x4c545020. Neither ID is currently matched
by the HDA stack, leaving HDMI/DP audio unavailable on these devices.
The existing downstream support uses the generic HDMI codec path and
attaches no Lisuan-specific capability flags to the controller. Its
dedicated AZX driver type only changes the short driver name.
Use the corresponding generic upstream paths instead: bind 4c54:5010 to
AZX_DRIVER_GENERIC, register 0x4c545020 as MODEL_GENERIC, and add the
Lisuan codec vendor name. This keeps the enablement minimal and avoids
a vendor-only AZX driver type with no vendor-specific behavior.
Signed-off-by: Xu Rao <raoxu@uniontech.com>
Link: https://patch.msgid.link/DE1B62191D573D37+20260817085531.992573-1-raoxu@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
I have enough to decide. This is a four-line device-ID enablement; the
6.12 HDA driver already has the matching tables under the older paths.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: [ALSA: hda] [Add] [Lisuan HDMI controller PCI ID 4c54:5010 and
codec ID 0x4c545020 so HDMI/DP audio binds on existing generic HDA
paths]
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- Fixes: none (expected)
- Reported-by: none
- Tested-by: none
- Reviewed-by: none
- Acked-by: none
- Link: https://patch.msgid.link/DE1B62191D573D37+20260817085531.992573-
1-raoxu@uniontech.com
- Cc: stable: none (expected)
- Signed-off-by: Xu Rao <raoxu@uniontech.com> (author)
- Signed-off-by: Takashi Iwai <tiwai@suse.de> (ALSA maintainer; applied
the patch)
- Ignore Signed-off-by: Sasha Levin if present (pipeline)
Notable: no syzbot, no crash report. This is hardware enablement, not a
sanitizer fix. Maintainer SOB is present.
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- Bug/problem: Lisuan GPUs expose HD-audio at PCI 4c54:5010 and HDMI/DP
codec 0x4c545020. Neither ID is matched, so HDMI/DP audio is
unavailable.
- Symptom: no HDMI/DP audio on these devices.
- Version info: none in the message. Lore shows this was pulled for
7.3-rc1 (Takashi's "sound updates for 7.3-rc1" on 2026-08-19).
- Root cause: missing ID table entries. Downstream already used the
generic HDMI codec path and attached no Lisuan-specific AZX capability
flags; a dedicated AZX driver type would only change the short name.
- Fix: bind PCI ID to AZX_DRIVER_GENERIC, register codec as
MODEL_GENERIC, add vendor name "Lisuan".
Step 1.4: DETECT HIDDEN BUG FIXES
Record: Not a hidden UAF/race/leak fix. It is a device-ID addition:
hardware does not bind without the IDs. That is the stable exception for
PCI/codec IDs on an existing driver, not a disguised cleanup.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- sound/hda/codecs/hdmi/hdmi.c: +1 (codec ID 0x4c545020, "Lisuan
HDMI/DP", MODEL_GENERIC)
- sound/hda/controllers/intel.c: +2 (comment + PCI_DEVICE(0x4c54,
0x5010) → AZX_DRIVER_GENERIC)
- sound/hda/core/device.c: +1 (vendor 0x4c54 → "Lisuan")
- Total: +4 lines, 0 removals
- Functions/tables: snd_hda_id_generichdmi[], azx_ids[],
hda_vendor_ids[]
- Scope: single-driver ID-table addition (three tables in one subsystem)
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record:
- HDMI codec table: unmatched 0x4c545020 did not hit the generic HDMI
driver by explicit ID. After: it matches MODEL_GENERIC /
patch_generic_hdmi.
- PCI table: 4c54:5010 was not in azx_ids and this tree has no
vendor/class catch-all for 0x4c54, so snd-hda-intel did not probe.
After: it probes as AZX_DRIVER_GENERIC with no extra DCAPS.
- Vendor table: unnamed vendor used "Generic 4c54". After: name is
"Lisuan" (cosmetic for mixer/proc).
- Paths: probe/init only. No hot-path, locking, or API change.
Step 2.3: IDENTIFY THE BUG MECHANISM
Record: [Hardware enablement / device ID] Controller and codec never
matched. PCI ID is required for bind. Codec ID selects the generic HDMI
parser. Vendor string is display-only. Not UAF, leak, race, or overflow.
Step 2.4: ASSESS THE FIX QUALITY
Record: Minimal and consistent with VIA/VMware/RDC generic HDMI IDs.
Author says downstream used generic path with no vendor DCAPS.
Regression risk is the usual new-ID risk (hardware might later need
NO_MSI / POSFIX_LPIB / etc.). No new AZX_DRIVER type, no new API.
Quality is high for an ID add.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record: This tree has no Lisuan entries. Insertion point in 6.12 HDMI
table is beside Glenfly Arise IDs from c51e431052e2e (2023). PCI table
terminator at azx_ids[] is original (Linus 1da177e4c3f41); last entries
are Loongson (28bd137a3c8e1, 2023). Vendor table around 0x434d/0x8086 is
Takashi Iwai 7639a06c23c7d4 (2015). The HDA ID tables have been stable
for years; this is not a bug in newly added 6.12 code.
Step 3.2: FOLLOW THE FIXES: TAG
Record: No Fixes: tag. Not applicable. Missing IDs were never introduced
by a prior commit; they were never added.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record: Same files already received ID adds in this 6.12 tree, e.g.
2b331e7b6cc57 "ALSA: hda: Add new pci id for AMD GPU display HD audio
controller" (in HEAD), e8336a63de03e Intel BMG, e9481d9b83f8d Intel PTL
HDMI codec, c51e431052e2e Glenfly. Standalone; not patch X/Y. No Lisuan
follow-ups on lore.
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record: git log --author='Xu Rao' on sound/ in this tree is empty.
UnionTech contributor; not the ALSA maintainer. Takashi Iwai applied it
the same day. Weight comes from maintainer accept, not author history
here.
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record: Needs existing snd-hda-intel + HDMI codec + AZX_DRIVER_GENERIC.
All present. Does not need a new driver type, Hygon entries, or
MODEL_GENERIC (6.12 uses HDA_CODEC_ENTRY(..., patch_generic_hdmi)).
Standalone with a path/macro translation. No DRM Lisuan driver in this
tree; HDA PCI bind does not require it.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- b4 dig -c HEAD failed (lore server error; this tree's HEAD is
unrelated).
- Lore (linux-sound and all): exactly one series, v1 only.
- Patch: https://lore.kernel.org/linux-
sound/DE1B62191D573D37+20260817085531.992573-1-raoxu@uniontech.com/
- Also mirrored at https://lists.openwall.net/linux-
kernel/2026/08/17/647
- b4 dig -a: not obtained (b4/lore error). Lore search shows no v2/v3.
- Feedback: Takashi Iwai: "Applied now. Thanks." No NAK, no requested
changes, no Cc: stable in review.
- Pulled in "[GIT PULL] sound updates for 7.3-rc1".
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record: Recipients from the openwall/lkml copy: perex@perex.cz, tiwai,
peter.ujfalusi, kai.vehmanen, tglx, broonie, linux-sound, linux-kernel,
plus a few others. Subsystem list and ALSA maintainer were on To/Cc.
Maintainer applied v1 immediately.
Step 4.3: SEARCH FOR THE BUG REPORT
Record: No bugzilla/syzbot. Evidence is the commit text plus "existing
downstream support". Hardware impact is real for Lisuan GPU HDMI audio
users; no public crash report.
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Standalone 4-line patch. lore.kernel.org/all/?q=Lisuan returns
only this patch, Takashi's apply, and the 7.3-rc1 pull. No companion DRM
or quirk series on lore.
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: lore.kernel.org/stable/?q=Lisuan returned no hits. Not discussed
on stable@ yet.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS
Record: No function bodies changed. Tables: snd_hda_id_generichdmi[] /
snd_hda_id_hdmi[], azx_ids[], hda_vendor_ids[]. Consumers: azx_probe
(PCI match), hda_codec_match / snd_hda_codec_configure (codec match),
get_codec_vendor_name().
Step 5.2: TRACE CALLERS
Record:
- azx_ids is MODULE_DEVICE_TABLE(pci) for snd-hda-intel; probe is
azx_probe on PCI enumeration.
- Codec table is MODULE_DEVICE_TABLE(hdaudio); hda_codec_match()
compares vendor_id.
- codec_bind_generic() can still fall back to HDA_CODEC_ID_GENERIC_HDMI
via is_likely_hdmi_codec() if the controller is bound and the codec
looks like HDMI-only. PCI match is the gating bind. Codec ID is
explicit matching/naming, not the only possible codec path.
- Context: device probe, not IRQ/hot path.
Step 5.3: TRACE CALLEES
Record: ID tables do not call allocators or locks. AZX_DRIVER_GENERIC in
this tree is already used (VIA 0x9170/0x9140, RDC, VMware, some AMD).
Stream-count fallback treats AZX_DRIVER_GENERIC like the default ICH6
counts (hda_intel.c ~1987).
Step 5.4: FOLLOW THE CALL CHAIN
Record: PCI enumeration → azx_probe → codec discovery → HDMI parser.
Reachable whenever the Lisuan HDMI audio function is present.
Unprivileged userspace cannot create the device; plug-in hardware users
are affected. HDMI audio is a user-visible function.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Same pattern as Glenfly HDMI IDs, Loongson HDMI, AMD GPU display
HDA PCI IDs, Intel BMG/PTL HDMI IDs — all already in this 6.12 tree. No
other 0x4c54 / 0x4c545020 / "Lisuan" matches in the tree.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record:
- Local tree: pending-6.12, kernel 6.12.111 (git describe
p-6.12-3-gc504cf0baa3d8; Makefile VERSION=6 PATCHLEVEL=12
SUBLEVEL=111).
- git log --grep=Lisuan -- sound/: empty. IDs are not here.
- Mainline paths sound/hda/codecs/hdmi/hdmi.c,
sound/hda/controllers/intel.c, sound/hda/core/device.c do not exist
(post-6.12 HDA split).
- Equivalents do exist:
- sound/pci/hda/hda_intel.c azx_ids[] — AZX_DRIVER_GENERIC at line
244, table ends at Loongson then {0,}
- sound/pci/hda/patch_hdmi.c snd_hda_id_hdmi[] — HDA_CODEC_ENTRY +
patch_generic_hdmi
- sound/hda/hdac_device.c hda_vendor_ids[] — same vendor list, no
0x4c54
- SND_HDA_INTEL and SND_HDA_CODEC_HDMI exist (sound/pci/hda/Kconfig).
- "Bug" is missing IDs, not a regression introduced after 6.12. Lisuan
hardware on 6.12 still fails to bind.
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record: Will not apply as a raw mainline diff (wrong paths,
HDA_CODEC_ID_MODEL vs HDA_CODEC_ENTRY). Mechanical 3-site remap:
1. patch_hdmi.c: HDA_CODEC_ENTRY(0x4c545020, "Lisuan HDMI/DP",
patch_generic_hdmi)
2. hda_intel.c: { PCI_DEVICE(0x4c54, 0x5010), .driver_data =
AZX_DRIVER_GENERIC }
3. hdac_device.c: { 0x4c54, "Lisuan" }
Same class of backport as 2b331e7b6cc57 (AMD PCI ID into hda_intel.c on
this branch). Difficulty: minor / needs small backport, not a rework.
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: No Lisuan IDs. No alternate Lisuan HDA quirk. Nothing to
conflict besides inserting three table rows.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: [ALSA HD-audio / HDMI codec + PCI controller] [IMPORTANT for
HDMI audio users; PERIPHERAL in that only Lisuan 4c54:5010 is newly
matched; core HDA stack is mature]
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: sound/pci/hda/ is actively receiving ID and quirk backports in
this tree (AMD GPU ID, ThinkPad PM denylist, Panther Lake, etc.). Mature
tables, routine ID churn. Matches stable practice.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: Driver-specific / hardware-specific: owners of Lisuan GPUs with
HD-audio 4c54:5010. No effect on other devices. Population is smaller
than Intel/AMD HDMI, but that is normal for vendor ID adds (Glenfly,
Loongson, etc.).
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: Trigger is having the PCI function present (boot/hotplug GPU).
Common for those machines; zero for everyone else. Not an unprivileged
syscall attack. HDMI audio is the user-visible feature.
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record: [HDMI/DP audio never appears] [MEDIUM for affected users:
functional gap, not oops/corruption]. Stable still takes these as
device-ID exceptions. Without the PCI ID, snd-hda-intel never binds
(verified: no 0x4c54 class catch-all in azx_ids[]).
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record:
- Benefit: HDMI/DP audio on Lisuan using the existing generic HDA path.
High for those users; none for others.
- Risk: 4 lines, probe-only, AZX_DRIVER_GENERIC already used. Residual
risk is missing hardware quirks; author/downstream say none are
needed.
- Ratio: favorable. Same as other HDA PCI/codec ID backports already on
6.12.y.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR:
- Classic PCI + codec ID add to an existing driver (snd-hda-intel + HDMI
codec present in 6.12).
- Explicit stable exception: "NEW DEVICE IDs".
- +4 lines, no new API, no new AZX_DRIVER type, no new module param.
- Without PCI ID, controller does not bind in this tree.
- ALSA maintainer applied v1 immediately.
- Same pattern already backported here (AMD GPU HDA PCI ID, Intel HDMI
codec IDs, Glenfly).
- Downstream already used generic HDMI with no extra DCAPS.
AGAINST:
- Not a crash/UAF/security fix.
- Raw diff does not apply (HDA tree split after 6.12).
- No Tested-by / Reported-by on the list.
- No in-tree Lisuan DRM driver; ELD/display integration may be limited
without a GPU driver (HDA still needs the PCI ID).
- Possible later quirks if generic AZX flags are wrong (unverified
beyond author's downstream claim).
UNRESOLVED:
- Mainline SHA not in this checkout; merge-base --is-ancestor of the
upstream commit was not run (commit absent).
- b4 dig failed on lore; thread recovered via lore/openwall instead.
- Could not independently test Lisuan hardware.
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? PASS — four table rows; maintainer
applied; downstream generic path described.
2. Fixes a real bug that affects users? PASS — HDMI/DP audio never binds
without the PCI ID.
3. Important issue (crash, security, corruption, deadlock)? FAIL on that
strict list; PASS under the documented device-ID exception (hardware
enablement).
4. Small and contained? PASS — +4 lines, three ID tables.
5. No new features or APIs? PASS — no new driver, syscall, or userspace
API; IDs only.
6. Can apply to the local tree? PASS with a small backport (patch_hdmi.c
/ hda_intel.c / hdac_device.c). Equivalent tables and
AZX_DRIVER_GENERIC exist.
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: Device ID addition to an existing driver (PCI ID + HDMI codec ID
+ vendor label). This is the standard YES exception. Vendor string is
documentation-level.
Step 9.4: MAKE YOUR DECISION
This belongs in 6.12.y. The HDA controller/codec drivers are here; only
the Lisuan IDs are missing. The mainline file move is a mechanical
remap, not missing infrastructure. Risk is low; benefit is making
HDMI/DP audio work on that GPU.
What the commit solves for stable users: 6.12.y systems with a Lisuan
GPU HD-audio function 4c54:5010 currently do not bind snd-hda-intel.
Adding the PCI ID (and codec/vendor rows) enables the existing generic
HDMI path.
Risk vs benefit: four probe-only table entries vs silent non-function of
HDMI audio. Same class as ID adds already on this branch.
Concerns: backport must retarget 6.12 paths and use HDA_CODEC_ENTRY(...,
patch_generic_hdmi) instead of HDA_CODEC_ID_MODEL(..., MODEL_GENERIC).
No other prerequisites.
Verification:
- [Phase 1] Parsed tags: author Xu Rao; Link msgid
DE1B62191D573D37+20260817085531.992573-1-raoxu@uniontech.com; SOB
Takashi Iwai; no Fixes/Reported-by/Cc: stable
- [Phase 1] Body: missing 4c54:5010 and codec 0x4c545020; downstream
generic HDMI, no extra DCAPS
- [Phase 2] Diff: +1 codec ID, +2 PCI ID/comment, +1 vendor name; 3
files, +4/-0
- [Phase 3] git describe / Makefile: this tree is 6.12.111 pending-6.12
(p-6.12-3-gc504cf0baa3d8)
- [Phase 3] git log --grep=Lisuan -- sound/: not in this tree
- [Phase 3] Equivalent files: sound/pci/hda/hda_intel.c,
sound/pci/hda/patch_hdmi.c, sound/hda/hdac_device.c
- [Phase 3] AZX_DRIVER_GENERIC exists (hda_intel.c:244, used e.g. VIA
0x9170)
- [Phase 3] HDA_CODEC_ID_MODEL absent; HDA_CODEC_ENTRY in
include/sound/hda_codec.h:86
- [Phase 3] Precedent in tree: 2b331e7b6cc57 AMD GPU HDA PCI ID (git
merge-base --is-ancestor: yes)
- [Phase 3] Blame: HDMI Arise IDs c51e431052e2e (2023); azx_ids
terminator 1da177e4c3f41; vendor table 7639a06c23c7d4 (2015)
- [Phase 4] lore linux-sound: 3 hits only (patch, apply, 7.3-rc1 pull);
v1 only; Takashi "Applied now"
- [Phase 4] b4 dig -c HEAD: lore server error; used lore/openwall
instead
- [Phase 4] lore.kernel.org/stable/?q=Lisuan: no discussion
- [Phase 5] azx_ids has Intel/NVIDIA/ATI/Glenfly class catch-alls, not
vendor 0x4c54 — PCI ID required
- [Phase 5] hda_bind.c codec_bind_generic() can fall back to generic
HDMI after controller bind; PCI ID remains the bind gate
- [Phase 5] grep Lisuan/0x4c545020/PCI_DEVICE(0x4c54: no matches
- [Phase 6] No sound/hda/codecs/hdmi/hdmi.c or
sound/hda/controllers/intel.c here (split after 6.12)
- [Phase 6] SND_HDA_INTEL / SND_HDA_CODEC_HDMI present in
sound/pci/hda/Kconfig
- [Phase 8] Failure mode: no HDMI/DP audio device, not a panic
- UNVERIFIED: live Lisuan hardware; whether later quirks are needed
beyond author's downstream statement; exact mainline SHA (not in this
checkout)
**YES**
sound/hda/codecs/hdmi/hdmi.c | 1 +
sound/hda/controllers/intel.c | 2 ++
sound/hda/core/device.c | 1 +
3 files changed, 4 insertions(+)
diff --git a/sound/hda/codecs/hdmi/hdmi.c b/sound/hda/codecs/hdmi/hdmi.c
index 42e4dc0949ec9..480d1c5f129fd 100644
--- a/sound/hda/codecs/hdmi/hdmi.c
+++ b/sound/hda/codecs/hdmi/hdmi.c
@@ -2348,6 +2348,7 @@ static const struct hda_device_id snd_hda_id_generichdmi[] = {
HDA_CODEC_ID_MODEL(0x1d179f8e, "KX-7000 HDMI/DP", MODEL_GF),
HDA_CODEC_ID_MODEL(0x1d179f8f, "KX-7000 HDMI/DP", MODEL_GF),
HDA_CODEC_ID_MODEL(0x1d179f90, "KX-7000 HDMI/DP", MODEL_GF),
+ HDA_CODEC_ID_MODEL(0x4c545020, "Lisuan HDMI/DP", MODEL_GENERIC),
HDA_CODEC_ID_MODEL(0x67663d82, "Arise 82 HDMI/DP", MODEL_GF),
HDA_CODEC_ID_MODEL(0x67663d83, "Arise 83 HDMI/DP", MODEL_GF),
HDA_CODEC_ID_MODEL(0x67663d84, "Arise 84 HDMI/DP", MODEL_GF),
diff --git a/sound/hda/controllers/intel.c b/sound/hda/controllers/intel.c
index 3ed33cba7d83f..fd61dc8e21a53 100644
--- a/sound/hda/controllers/intel.c
+++ b/sound/hda/controllers/intel.c
@@ -2830,6 +2830,8 @@ static const struct pci_device_id azx_ids[] = {
/* Hygon HDAudio */
{ PCI_VDEVICE(HYGON, PCI_DEVICE_ID_HYGON_18H_M05H_HDA),
.driver_data = AZX_DRIVER_HYGON | AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_NO_MSI },
+ /* Lisuan HD-audio */
+ { PCI_DEVICE(0x4c54, 0x5010), .driver_data = AZX_DRIVER_GENERIC },
{ 0, }
};
MODULE_DEVICE_TABLE(pci, azx_ids);
diff --git a/sound/hda/core/device.c b/sound/hda/core/device.c
index ebaa106d0f018..010dd38007a99 100644
--- a/sound/hda/core/device.c
+++ b/sound/hda/core/device.c
@@ -664,6 +664,7 @@ static const struct hda_vendor_id hda_vendor_ids[] = {
{ 0x1af4, "QEMU" },
{ 0x1fa8, "Senarytech" },
{ 0x434d, "C-Media" },
+ { 0x4c54, "Lisuan" },
{ 0x8086, "Intel" },
{ 0x8384, "SigmaTel" },
{} /* terminator */
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.1] ALSA: usb-audio: Rename the Audient iD14 monitor mix volume control
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (22 preceding siblings ...)
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18] ALSA: hda: Add Lisuan HDMI controller and codec support Sasha Levin
@ 2026-10-19 13:47 ` Sasha Levin
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18] ALSA: hda: Add support for Hygon family 18h model 5h HD-Audio Sasha Levin
` (37 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:47 UTC (permalink / raw)
To: patches, stable
Cc: Neil Andrews, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Neil Andrews <neil@androos.io>
[ Upstream commit 9c0564fcc21aec4f5b7648f61865ce3fc2b84a7f ]
On the Audient iD14 (2708:0008), feature unit 12 is traced through to
the Speaker output terminal and is therefore exported as "Speaker
Playback Volume". The name fits it badly. It advertises Volume on
only four of its six logical channels, which the driver records as
cmask=0xf, channels=4 on a 6-channel playback stream, and it sits on
the monitor mixer branch rather than in the direct playback path:
INPUT_TERMINAL 2 (USB streaming, 6ch) -> EXTENSION_UNIT 51 ->
FEATURE_UNIT 10 (no controls) -> OUTPUT_TERMINAL 20 (Speaker)
while FU 12 hangs off MIXER_UNIT 60 and feeds back into
EXTENSION_UNIT 51.
Userspace adopts the control as the stream's hardware playback volume,
so any setting below 0 dB attenuates part of the stream and not the
rest. Measured over the device's own digital loopback, with one
-12 dBFS tone per channel played straight to hw:, PCM channel 0 is
unaffected while channel 1 tracks the control: at 107/127 (-20 dB) the
two read -15.89 and -35.89 dBFS, a 20.00 dB imbalance, and at 127/127
both read -15.89 dBFS.
Give the unit a non-standard name so that it is no longer taken for
the stream's master volume. Dropping the control instead also fixes
the imbalance, but FU 12 keeps its value across a module reload, so
dropping it strands a device that is already attenuated with nothing
able to reset it. Renaming leaves the monitor gain reachable and that
recovery path intact.
The mapped name ends in "Playback" because a name from the map
suppresses the automatic " Playback" but still gets " Volume"
appended; the control comes out as "Monitor Mix Playback Volume".
Tested on the ACP path with PipeWire, which is where the problem
reproduces: the control now stays at 127 at every volume setting and
the imbalance is 0.00 dB, and setting it by hand to 107 and back to
127 gives 20.00 dB and 0.00 dB as before.
Link: https://lore.kernel.org/linux-sound/0102019fed22f9d3-fa294ec5-02f1-4fd3-b3fa-76efc14331cc-000000@eu-west-1.amazonses.com/T/#u
Signed-off-by: Neil Andrews <neil@androos.io>
Link: https://patch.msgid.link/0102019ffcdbb1e6-9b59d3cc-ef05-4df1-8f9f-fb2f425bcda2-000000@eu-west-1.amazonses.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
The local tree is **6.12.111** (`pending-6.12`). This is a device-
specific USB mixer name-map quirk for Audient iD14 MkII (`2708:0008`):
userspace treats a monitor-mix control as master volume and creates a
**20 dB channel imbalance**. That is real, measured, and already the
kind of hardware quirk 6.12.y takes.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: `[ALSA: usb-audio] [Rename] Audient iD14 monitor mix volume
control`
Subsystem: ALSA USB audio mixer maps. Verb “Rename” is a quirk, not a
refactor: the control is misnamed so PipeWire/PulseAudio treat it as
stream master volume.
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Link: https://lore.kernel.org/linux-sound/0102019fed22f9d3-...` —
original `[BUG]` report
- `Link: https://patch.msgid.link/0102019ffcdbb1e6-...` — submitted
patch
- `Signed-off-by: Neil Andrews <neil@androos.io>` — author
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` — ALSA maintainer
- No `Fixes:` (expected: not a regression; hardware descriptor + generic
parser)
- No `Cc: stable` (expected for this review)
- No `Reported-by:` / `Tested-by:` / `Reviewed-by:` / `Acked-by:`
- Ignore pipeline `Signed-off-by: Sasha Levin` / `[Upstream commit ...]`
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** On Audient iD14 USB `2708:0008`, FU 12 is named `"Speaker
Playback Volume"` because it traces to the Speaker OT, but it is a
4-of-6-channel monitor-mix control (`cmask=0xf`), not stream master
volume.
- **Symptom:** Userspace uses it as hardware playback volume. Below 0 dB
some PCM channels are attenuated and others are not. Measured 20.00 dB
imbalance at 107/127; 0.00 dB at 127/127.
- **Root cause:** Topology: USB streaming → EU 51 → FU 10 (no controls)
→ Speaker OT 20; FU 12 hangs off mixer unit 60 and feeds back into EU
51.
- **Why rename not drop:** Dropping also fixes imbalance, but FU 12
keeps its value across module reload, so hiding the control strands an
already-attenuated device with no recovery except power cycle.
- **Versions:** Reporter: “Not a regression”; same results on 6.19.14
and 7.1.6.
- **Tested:** ACP + PipeWire; after rename the control stays at 127 and
imbalance is 0.00 dB.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not disguised. It is an explicit hardware-quirk bug fix: wrong
exported kcontrol name causes incorrect userspace volume application.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/usb/mixer_maps.c` only (~+18 lines, 0 removed)
- New `audient_id14_map[]`: `{ 12, "Monitor Mix Playback" }`
- New `usbmix_ctl_maps[]` entry: `USB_ID(0x2708, 0x0008)`
- Scope: single-file, data-only, device-ID gated
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- **Before:** Generic mixer walk names FU 12 from Speaker OT → `"Speaker
Playback Volume"` (mapped_name=0 so `" Playback"` is auto-appended,
then `" Volume"`).
- **After:** `find_map()` hits unit 12; `check_mapped_name()` copies
`"Monitor Mix Playback"`; auto `" Playback"` is skipped; `" Volume"`
is still appended → `"Monitor Mix Playback Volume"`. PipeWire no
longer selects it as master volume.
- Path: USB mixer build at probe (`snd_usb_create_mixer` →
`usbmix_ctl_maps` lookup → `__build_feature_ctl`).
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: **Hardware workaround / mixer name-map quirk.** Wrong ALSA
control name → userspace hardware-volume path → asymmetric attenuation.
Same class as existing maps (e.g. Hercules `"Master Playback"` instead
of `"Speaker Playback"`).
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- Obviously correct relative to `__build_feature_ctl()` naming rules,
which the commit message documents.
- Surgical; no locking, alloc, or API change.
- Regression risk: only `2708:0008`. Userspace looking for `"Speaker
Playback Volume"` on this card will miss it — that is the intended
fix. The control remains settable for recovery.
- Maintainer chose rename over `{ 12, NULL }` after hardware tests of
both.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record: Insertion is next to maps that have been there for years
(`usbmix_ctl_maps` since 2005; MAYA44 `044bddb9ca8d49` 2015; KEF
`d70a1b9893f820` 2014). Buggy *behavior* is generic USB mixer naming of
FU 12 from Speaker OT, not a recent 6.12-era commit. Device is class-
compliant; the bug exists whenever this interface is used with `snd-usb-
audio`.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Not applicable. Reporter called it “Not a
regression.”
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: Recent `mixer_maps.c` changes in *this* tree are other device
maps/quirks (Corsair Virtuoso, Razer Barracuda dB map, KTMicro rename,
Corsair HS80). Same pattern. Standalone; not “patch X/Y”.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: No other Neil Andrews commits under `sound/usb/` in this tree.
Maintainer is Takashi Iwai, who applied the patch.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: Uses `usbmix_name_map` / `usbmix_ctl_maps` / `find_map()` /
`check_mapped_name()` already in this tree. No new helpers. Standalone.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c` not usable: commit SHA is not in this checkout.
- `b4 mbox` on msgid found 2 messages: patch + Takashi “Applied to for-
next branch. Thanks.”
- Bug thread (4 messages): Neil’s `[BUG]` report → Takashi suggested
skip *or* rename → Neil tested both on 7.1.6 out-of-tree → Takashi:
“Let's take the rename approach” → formal patch applied.
- No NAKs. No later unapplied revision.
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record: To/Cc: `tiwai@suse.com`, `perex@perex.cz`, `linux-
sound@vger.kernel.org`. Reviewed and applied by ALSA USB maintainer
Takashi Iwai.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record:
- Lore `[BUG] snd-usb-audio: Audient iD14 (2708:0008) 20 dB channel
imbalance` with loopback RMS numbers, descriptor dump, alsa-info.
- Independent real-world reports of L/R imbalance below 100% (AskUbuntu,
Reddit, markwatkinson.com, GitHub `Audientid14-linux-fix`).
- UCM later qualified the userspace path: `alsa-ucm-conf` `Audient-
iD14-HiFi-0008.conf` avoids driving FU 12; ACP (`api.alsa.use-
ucm=false`) still hits it; alsactl restore of a value below 0 dB still
hits it.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Single standalone patch. Follow-up UCM work is userspace (`alsa-
ucm-conf` PR mentioning this kernel quirk). No kernel series dependency.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: Web search of `lore.kernel.org/stable` for this subject found no
stable-list discussion. No recorded reason to skip it.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF**
Record: No functions modified. New static data consumed by existing
mixer build.
**Step 5.2: TRACE CALLERS**
Record (verified in this tree):
- `usbmix_ctl_maps` scanned in mixer create (~line 3272 of
`sound/usb/mixer.c`)
- `find_map()` in `__build_feature_ctl()` (~1689)
- `check_mapped_name()` then `append_ctl_name(..., " Volume")`
(~1740–1786)
- Probe path when `2708:0008` is enumerated; not IRQ/hot-path locking
**Step 5.3: TRACE CALLEES**
Record: Data-only. Callees of the *users* of this map: `find_map`,
`check_ignored_ctl` (not taken because name is non-NULL),
`check_mapped_name`, `append_ctl_name`.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Plug in device → `snd-usb-audio` probe → mixer descriptor walk →
FU 12 kcontrol registered → PipeWire/PulseAudio/alsactl. Userspace-
reachable. Unprivileged volume changes trigger the imbalance.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same file already remaps “Speaker Playback” (Hercules, Gigabyte,
ASUS, UAC3 BADD). This tree already contains `c4f7e90e66b6d` “Rename
ALSA kcontrol PCM and PCM1 for the KTMicro sound card” — a mixer_maps
rename that *was* backported with `Cc: stable`.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: Yes.
- `git describe HEAD`: `p-6.12-3-gc504cf0baa3d8`; `make kernelversion`:
**6.12.111**
- `mixer_maps.c` and `__build_feature_ctl()` naming logic are present
- `audient_id14_map` / `USB_ID(0x2708, 0x0008)` **not** present (`git
grep` empty)
- Existing Audient entry is MkI only: `DEVICE_FLG(0x2708, 0x0002,
QUIRK_FLAG_IGNORE_CTL_ERROR)` in `quirks.c` (`df0380b9539b0`, 2021).
Different product ID; does not fix MkII naming.
- Bug is descriptor + generic parser, present since this driver existed;
reporter confirmed not a regression.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: Clean apply. Local hunk context matches the patch (MAYA44
`0x2573:0x0008` then KEF `0x27ac:0x1000`). `usbmix_name_map` layout `{
id, name, control, dB }` matches `{ 12, "Monitor Mix Playback" }`.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: No Audient monitor-mix rename. No other 6.12 fix for `2708:0008`
mixer names.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: `sound/usb/` (`CONFIG_SND_USB_AUDIO`). **IMPORTANT** for USB
audio interfaces; device-specific, not core mm/fs. Mixer maps are the
designed extension point (“if the mixer topology is too complicated… add
the entries in usbmixer_maps.c”).
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Mature driver; this file still gets device maps regularly.
Recent 6.12 backports in the same file are other quirks/maps.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: Users of Audient iD14 MkII USB `2708:0008` with `snd-usb-audio`
(class-compliant). Not universal. ACP/PipeWire without the UCM profile
is the reproducing path; alsactl restore of a low FU 12 value affects
even UCM users.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Common for desktop use: plug in, play audio, move volume below
100%. Unprivileged. Not a race. Hardware keeps attenuated FU 12 across
module reload.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: Severe **audio correctness** bug: 20 dB L/R (or channel 0 vs 1)
imbalance. Not oops/UAF/corruption. HIGH for this device class
(interface unusable at typical desktop volumes). Multiple independent
user reports.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- Benefit: HIGH for iD14 MkII on 6.12 (desktop/PipeWire, no or old UCM).
- Risk: VERY LOW — +18 lines, one USB ID, no behavioral change for any
other device.
- Ratio: strongly favors backport. Same class as maps already in this
tree.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real, measured 20 dB imbalance; loopback RMS; PipeWire ACP
reproduction
- Hardware quirk / mixer name map — explicit stable exception
- Small, data-only, device-ID gated
- Applies cleanly to this 6.12 tree; infrastructure present since 2005
- ALSA maintainer requested rename, tested both options, applied v1
- Analogous KTMicro mixer rename already in this tree via stable
- Long-standing user complaints of L/R imbalance on this hardware
- No new APIs/features/module parameters
AGAINST:
- Not a crash/security/data-corruption issue
- Newer `alsa-ucm-conf` can avoid driving the control on the HiFi
profile
- Does not cover MkI `2708:0002` (out of scope of this patch)
UNRESOLVED:
- Exact mainline SHA (not in this checkout; `b4 dig -c` unused)
- No stable@ discussion found
Those do not outweigh the quirk: UCM is userspace and not guaranteed on
6.12 distros; MkI is a different ID.
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — maintainer-approved;
hardware loopback tests of rename vs drop
2. Fixes a real bug that affects users? **PASS** — 20 dB imbalance;
multiple reports
3. Important issue? **PASS** — serious functional audio bug on a
shipping USB interface (quirk exception)
4. Small and contained? **PASS** — ~18 lines, one file
5. No new features or APIs? **PASS** — existing map table only
6. Can apply to the local tree? **PASS** — clean context at MAYA44/KEF
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Hardware quirk / workaround** (USB mixer name map for a
misdescribed control). Same bucket as USB/PCI/codec quirks that stable
already takes.
**Step 9.4: MAKE YOUR DECISION**
Backport to this 6.12.y tree. The bug is in this kernel’s generic mixer
naming; the device works here; the fix is a one-ID table entry with
negligible regression risk.
===============================================================
Verification
===============================================================
- [Phase 1] Parsed subject/tags/body from the provided commit and lore
mbox; no Fixes/Cc:stable; Links to bug + patch
- [Phase 1] Bug thread: “Not a regression”; 6.19.14 and 7.1.6 identical;
20.00 dB at 107/127
- [Phase 2] Diff: +18 lines in `sound/usb/mixer_maps.c` only;
`audient_id14_map` + `USB_ID(0x2708, 0x0008)`
- [Phase 2] Verified `__build_feature_ctl()`: mapped name skips `"
Playback"`, still appends `" Volume"` (`mixer.c` 1740–1786)
- [Phase 2] Verified `check_ignored_ctl()`: non-NULL name is not ignored
(so rename keeps the control)
- [Phase 3] `git blame` insertion neighbors: MAYA44 2015, KEF 2014, maps
table since 2005
- [Phase 3] `git log --author='Neil Andrews' -- sound/usb/`: empty in
this tree
- [Phase 3] Existing Audient quirk `df0380b9539b0` is `2708:0002`
IGNORE_CTL_ERROR only
- [Phase 3] KTMicro rename `c4f7e90e66b6d` is an ancestor of HEAD (same
class, already backported)
- [Phase 4] `b4 mbox` patch msgid: 2 msgs; Takashi applied to for-next;
no NAK
- [Phase 4] `b4 mbox` bug msgid: 4 msgs; Takashi asked for rename; Neil
measured both options
- [Phase 4] lore WebFetch 403; used b4 + lkml.iu.edu + patchew instead
- [Phase 4] `b4 dig -c`: UNVERIFIED (SHA not in this tree)
- [Phase 4] stable@ search: no hits
- [Phase 5] Callers: mixer create map walk (~3272), `find_map` in
`__build_feature_ctl` (~1689)
- [Phase 6] `git describe HEAD` / `make kernelversion`: 6.12.111
`pending-6.12`
- [Phase 6] `git grep audient_id14_map` / `USB_ID(0x2708, 0x0008)`: not
in tree (bug still present)
- [Phase 6] Insertion point in local `mixer_maps.c` 586–595 matches the
patch (clean apply)
- [Phase 7] `CONFIG_SND_USB_AUDIO` in `sound/usb/Kconfig`
- [Phase 8] Failure mode: 20 dB channel imbalance, not oops; severity
HIGH for this device
- UNVERIFIED: mainline commit SHA; whether every 6.12 distro ships the
later UCM profile (kernel still should export the correct name)
This is a small, tested, device-ID-gated mixer quirk that stops PipeWire
from driving a partial-coverage monitor mix as master volume. It belongs
in this 6.12 tree.
**YES**
sound/usb/mixer_maps.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c
index ce27fc871f513..8046d5987d5b1 100644
--- a/sound/usb/mixer_maps.c
+++ b/sound/usb/mixer_maps.c
@@ -505,6 +505,19 @@ static const struct usbmix_connector_map gigabyte_b450_connector_map[] = {
{}
};
+/* Audient iD14: FU 12 advertises Volume on only 4 of its 6 logical channels
+ * and sits on the monitor mixer branch, but it is traced through to the
+ * Speaker output terminal and gets named "Speaker Playback Volume". Userspace
+ * then adopts it as the stream's hardware volume, and any setting below 0 dB
+ * attenuates some channels but not others (20 dB imbalance at 80%). Give it a
+ * non-standard name so that it is no longer taken for the stream's master
+ * volume, while remaining reachable for anyone who wants the monitor gain.
+ */
+static const struct usbmix_name_map audient_id14_map[] = {
+ { 12, "Monitor Mix Playback" }, /* FU, partial coverage */
+ {}
+};
+
/*
* Control map entries
*/
@@ -588,6 +601,11 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
.id = USB_ID(0x2573, 0x0008),
.map = maya44_map,
},
+ {
+ /* Audient iD14 */
+ .id = USB_ID(0x2708, 0x0008),
+ .map = audient_id14_map,
+ },
{
/* KEF X300A */
.id = USB_ID(0x27ac, 0x1000),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18] ALSA: hda: Add support for Hygon family 18h model 5h HD-Audio
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (23 preceding siblings ...)
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-6.1] ALSA: usb-audio: Rename the Audient iD14 monitor mix volume control Sasha Levin
@ 2026-10-19 13:48 ` Sasha Levin
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-5.10] ALSA: usx2y: Stop clearing urb->hcpriv before submission Sasha Levin
` (36 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:48 UTC (permalink / raw)
To: patches, stable
Cc: Fu Hao, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Fu Hao <fuhao@open-hieco.net>
[ Upstream commit 41212ff3e4ed475d9f91d26b5324075087702987 ]
Add the new PCI ID 0x1d94 0x14a9 for Hygon family 18h model 5h
HDA controller.
Signed-off-by: Fu Hao <fuhao@open-hieco.net>
Link: https://patch.msgid.link/8b38f2941375553e4246167736c6acb5a541e833.1781523812.git.fuhao@open-hieco.net
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
The local tree is **6.18.53** (`v6.18.53-5049-g0f0bdc2b0dffb`). The
verdict is only about this tree: the existing HD-Audio PCI driver is
present, Hygon vendor IDs already exist, and this is a PCI ID addition
to that driver.
---
## PHASE 1: COMMIT MESSAGE FORENSICS
**Step 1.1: PARSE THE SUBJECT LINE**
Record: `[ALSA/hda] [Add] [PCI ID 0x1d94:0x14a9 for Hygon family 18h
model 5h HD-Audio controller]`
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Fixes:` — none (expected)
- `Reported-by:` — none
- `Tested-by:` — none
- `Reviewed-by:` / `Acked-by:` — none on the commit
- `Link:` `https://patch.msgid.link/8b38f2941375553e4246167736c6acb5a541
e833.1781523812.git.fuhao@open-hieco.net`
- `Cc: stable@vger.kernel.org` — none (expected)
- `Signed-off-by: Fu Hao <fuhao@open-hieco.net>` (author)
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` (ALSA maintainer)
- Ignore pipeline `Signed-off-by: Sasha Levin` and `[Upstream commit
...]`
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
[Bug description] Hygon family 18h model 5h HD-Audio is missing from the
existing Intel/generic HDA PCI ID table, so `snd-hda-intel` never binds.
[Symptom] No HD-Audio controller on that SoC (no `snd_hda_intel` probe).
[Version information] None in the message.
[Root cause] New PCI device `vendor 0x1d94` / `device 0x14a9` was never
listed.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not a hidden fix. This is explicit hardware enablement via a PCI
ID. Cover letter (v3 0/7) calls it “initial support for the integrated
HD-Audio controller.” A follow-up (v3 7/7) adds a dword-access quirk
because byte writes to GCTL/SD_CTL fail on this controller.
---
## PHASE 2: DIFF ANALYSIS
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/hda/controllers/intel.c` only (`+7` lines, no deletions)
- Functions/data: `#define PCI_DEVICE_ID_HYGON_18H_M05H_HDA`, enum
`AZX_DRIVER_HYGON`, `driver_short_names[]`, `azx_ids[]`
- Scope: single-file surgical PCI ID + driver-type tag
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- Before: `azx_ids[]` has Intel/AMD/ATI/Zhaoxin/Loongson/etc.; no Hygon
entry. AMD/ATI class wildcards do not match vendor `0x1d94`. Probe
never runs for this device.
- After: PCI match `PCI_VDEVICE(HYGON, 0x14a9)` with `AZX_DRIVER_HYGON |
AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_NO_MSI`, then normal `azx_probe()`.
- Path: PCI enumeration / module probe, not an error path.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: `[Hardware enablement / PCI ID]` Existing driver does not claim
this controller. New enum value is an internal tag (same pattern as
Loongson/Zhaoxin), not a new driver. Caps reuse existing
`AZX_DCAPS_POSFIX_LPIB` and `AZX_DCAPS_NO_MSI`.
**Step 2.4: ASSESS THE FIX QUALITY**
Record: Minimal and obviously correct. Regression risk is low and
limited to this PCI ID. `azx_max_codecs[]` is sparse; HYGON stays 0, and
`azx_probe_codecs()` treats 0 as `AZX_DEFAULT_CODECS`. Companion quirk
(7/7) is needed for reliable register writes; this ID patch still
compiles and applies alone.
---
## PHASE 3: GIT HISTORY INVESTIGATION
**Step 3.1: BLAME THE CHANGED LINES**
Record: Insertion is next to Loongson IDs (`28bd137a3c8e1`, 2023) and
the table terminator (`{ 0, }`, ancient). Not a recent regression; the
ID was never present. `PCI_VENDOR_ID_HYGON` (`0x1d94`) has been in
`include/linux/pci_ids.h` since `c6babb5806b77` (2018).
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. N/A.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: Related: `054940f79377d` / upstream `e096c24e7f97` — “Fix single
byte writing issue for Hygon family 18h model 5h” (series 7/7). That
patch depends on `AZX_DRIVER_HYGON` from this one. Other nearby HDA ID
work (Lisuan, denylist) is unrelated. This ID commit is standalone for
bind/enable; the quirk is a separate follow-up.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Fu Hao submitted the Hygon 18h models 4h–8h series (CPU
topology, perf, microcode, HDA). Not the ALSA maintainer. Takashi Iwai
applied both HDA patches to for-next.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: Needs `PCI_VENDOR_ID_HYGON`, `PCI_VDEVICE()`,
`AZX_DCAPS_POSFIX_LPIB`, `AZX_DCAPS_NO_MSI`, and
`sound/hda/controllers/intel.c` (moved in `2d9223d2d64cb`, already in
v6.18.53). All present. Does not need series patches 1–5
(x86/perf/microcode). Patch 7/7 is recommended so audio actually works,
but is not a compile/apply prerequisite.
---
## PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record: `b4 dig -c 41212ff3e4ed` →
https://patch.msgid.link/8b38f2941375553e4246167736c6acb5a541e833.178152
3812.git.fuhao@open-hieco.net
Series: **[PATCH v3 0/7] Add support for Hygon family 18h models 4h-8h**
(2026-06-15). This is **6/7**. `b4 dig -a` listed v3 as the matching
series. v1→v2: switched to existing `access_sdnctl_in_dword` instead of
a Hygon-specific flag; v2→v3: “Refine the code of Hygon HD-Audio device
ID.” Takashi: “Applied to for-next branch now.” No NAK on 6/7 or 7/7.
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record: `b4 dig -w` recipients: Fu Hao, Bjorn Helgaas, Jaroslav Kysela
(`perex@perex.cz`), Takashi Iwai, linux-kernel, linux-sound, linux-pci,
tingyin.duan. ALSA maintainers were on To/Cc. Takashi applied it.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No syzbot/bugzilla. Hardware enablement from Hygon (open-hieco).
No public crash report.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: 1–5 are x86 CPU/perf/microcode (independent). 6 = this ID. 7 =
dword-access quirk using `AZX_DRIVER_HYGON`. Audio support is 6+7; 6 is
still a valid PCI ID addition by itself.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org `/stable/` returned HTTP 403 (WebFetch and
curl). UNVERIFIED whether stable@ discussed this ID.
---
## PHASE 5: CODE SEMANTIC ANALYSIS
**Step 5.1: IDENTIFY KEY FUNCTIONS**
Record: No function bodies changed. Data only: ID define,
`AZX_DRIVER_HYGON`, `driver_short_names`, `azx_ids[]`. Runtime path is
existing `azx_probe()`.
**Step 5.2: TRACE CALLERS**
Record: `azx_ids` → `azx_driver.id_table` → PCI core → `azx_probe()` →
`azx_first_init()` / `azx_probe_continue()`. Device-enumeration path,
not IRQ/hot path until the device exists.
**Step 5.3: TRACE CALLEES**
Record: Unchanged. Probe uses existing PCI/HDA init, LPIB position fix,
MSI disable.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Userspace does not trigger it; PCI probe does on Hygon 18h m5h.
No class wildcard for `PCI_VENDOR_ID_HYGON` (only
Intel/Glenfly/NVIDIA/Creative/ATI/AMD). Without this ID, the controller
is not claimed.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same pattern as Loongson (`28bd137a3c8e1`) and many other HDA
PCI ID additions already in this tree (Alder Lake, Glenfly, AMD display
HDA, etc.).
---
## PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: Yes. v6.18.53 `azx_ids[]` ends at Loongson then `{ 0, }`. No
Hygon entry. `git merge-base --is-ancestor` of the candidate vs
`v6.18.53` is false (not in 6.18.53). Driver file and
`PCI_VENDOR_ID_HYGON` are present.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: Dry-run apply of upstream `41212ff3e4ed` onto v6.18.53 `intel.c`
succeeded (`patch -p1 --dry-run`; later hunks applied at offsets because
mainline grew extra IDs). Expected backport difficulty: **clean apply /
trivial offsets**.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: v6.18.53 has no Hygon HDA ID and no Hygon dword-access quirk.
`access_sdnctl_in_dword` already exists (Loongson). No alternate fix for
0x1d94:0x14a9.
---
## PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: `[sound/hda PCI controller] [IMPORTANT]` — not core mm/net, but
the standard HD-Audio stack used on PCs/servers with this SoC.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Active (denylists, Nvidia BDL, other PCI IDs). PCI ID table is
the normal extension point. Maintainer Takashi Iwai applied the patch.
---
## PHASE 8: IMPACT AND RISK ASSESSMENT
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: Driver-specific / platform-specific: Hygon family 18h model 5h
with HD-Audio `0x1d94:0x14a9`. Other machines unchanged.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Every boot on that hardware (PCI probe). Not a race. Not
unprivileged-syscall. Without the ID, audio is simply missing.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: `[No HD-Audio device bind] [MEDIUM for those users; exception-
qualified]` Not a panic. Follow-up 7/7: byte writes fail so audio can
still be broken after bind if 7/7 is omitted.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record: Benefit: high for that hardware (enables existing driver). Risk:
very low (+7 lines, one PCI ID, existing caps). Ratio favors backport.
Best if 7/7 is taken with it so GCTL/SD_CTL writes succeed.
---
## PHASE 9: FINAL SYNTHESIS
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Classic PCI ID addition to an existing driver (stable exception #1)
- Driver, path `sound/hda/controllers/intel.c`, and
`PCI_VENDOR_ID_HYGON` all exist in 6.18.53
- No Hygon class wildcard; without this ID the device is never bound
- +7 lines, existing `AZX_DCAPS_*`, applies to v6.18.53
- Applied by ALSA maintainer Takashi Iwai
- Same pattern as Loongson and other HDA PCI IDs already in this tree
AGAINST:
- Part of series 6/7; 7/7 is the functional quirk (byte writes fail)
- No `Reported-by` / crash / CVE
- Adds an internal `AZX_DRIVER_HYGON` enum (needed for the quirk, not a
UAPI)
UNRESOLVED:
- Stable mailing list (lore 403)
- How widely this SoC is deployed on 6.18-based distros
**Step 9.2: STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — ID table entry; maintainer
applied; v3 after review
2. Fixes a real bug that affects users? **PASS** — missing bind = no
audio on this controller
3. Important issue? **PASS** under the device-ID exception (not a panic)
4. Small and contained? **PASS** — 7 lines, one file
5. No new features or APIs? **PASS** — existing driver, internal enum,
no UAPI
6. Can apply to the local tree? **PASS** — dry-run on v6.18.53 `intel.c`
succeeded
**Step 9.3: EXCEPTION CATEGORIES**
Record: **New device ID on an existing driver.** Also adjacent to a
hardware quirk (7/7), which is a separate YES-class patch.
**Step 9.4: DECISION**
This is hardware enablement for a controller the 6.18.53 HDA driver
already knows how to drive, blocked only by a missing PCI ID. That is
standard stable material. Series patches 1–5 are unrelated. Patch 7/7
should also be considered so register writes work, but it does not make
6/7 unsuitable.
---
### What the commit solves for this tree
On 6.18.53, `snd-hda-intel` never matches Hygon `0x1d94:0x14a9`. This
adds that ID (with LPIB position fix and `NO_MSI`) so probe runs. That
matters for users of Hygon 18h model 5h who stay on this LTS kernel.
### Risk vs benefit
Benefit is enabling audio hardware; risk is confined to that PCI ID.
Companion quirk 7/7 should travel with it so byte-only GCTL/SD_CTL
writes do not fail after bind.
### Concerns
Apply is clean. No missing symbols. Incomplete without 7/7 for full
functionality, but 6/7 is still a valid, self-contained ID addition.
---
Verification:
- [Phase 1] Parsed tags: author Fu Hao, Link msgid, SOB Takashi Iwai; no
Fixes/Reported-by/Cc:stable
- [Phase 2] Diff: +7 lines in `sound/hda/controllers/intel.c` (define,
enum, short name, `azx_ids[]`)
- [Phase 2] Confirmed no generic Hygon HD-Audio class match; AMD/ATI
wildcards only
- [Phase 2] `azx_probe_codecs(..., 0)` uses `AZX_DEFAULT_CODECS`
(`sound/hda/common/controller.c`)
- [Phase 3] `PCI_VENDOR_ID_HYGON` since `c6babb5806b77` (2018); present
in v6.18.53 `pci_ids.h:2616`
- [Phase 3] File move `2d9223d2d64cb` is ancestor of v6.18.53
- [Phase 3] `git merge-base --is-ancestor <candidate> v6.18.53` → not in
6.18.53
- [Phase 3] Follow-up `e096c24e7f97` / `054940f79377d` is series 7/7
(dword access)
- [Phase 4] `b4 dig -c 41212ff3e4ed`: v3 6/7, lore msgid above; `b4 dig
-a`: series v3 0/7; `b4 dig -w`: tiwai/perex/linux-sound
- [Phase 4] mbox: Takashi “Applied to for-next”; no NAK on HDA patches
- [Phase 4] UNVERIFIED: lore.kernel.org WebFetch/curl 403 (including
/stable/)
- [Phase 5] Call chain: `azx_ids` → `azx_probe` (PCI enumeration)
- [Phase 6] `make kernelversion` / Makefile: 6.18.53; `git describe
HEAD`: `v6.18.53-5049-g0f0bdc2b0dffb`
- [Phase 6] Dry-run `patch -p1` of `41212ff3e4ed` onto v6.18.53
`intel.c`: success
- [Phase 6] `AZX_DCAPS_POSFIX_LPIB` / `AZX_DCAPS_NO_MSI` present in
v6.18.53
- [Phase 8] Failure mode: missing PCI bind → no HD-Audio on that SoC;
severity medium, exception-qualified
**YES**
sound/hda/controllers/intel.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/hda/controllers/intel.c b/sound/hda/controllers/intel.c
index 98367b87d8017..f07fc5dc5cede 100644
--- a/sound/hda/controllers/intel.c
+++ b/sound/hda/controllers/intel.c
@@ -100,6 +100,8 @@ enum {
#define ATIHDMI_NUM_CAPTURE 0
#define ATIHDMI_NUM_PLAYBACK 8
+/* Hygon HD Audio controller */
+#define PCI_DEVICE_ID_HYGON_18H_M05H_HDA 0x14a9
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
@@ -241,6 +243,7 @@ enum {
AZX_DRIVER_ZHAOXIN,
AZX_DRIVER_ZHAOXINHDMI,
AZX_DRIVER_LOONGSON,
+ AZX_DRIVER_HYGON,
AZX_DRIVER_GENERIC,
AZX_NUM_DRIVERS, /* keep this as last entry */
};
@@ -357,6 +360,7 @@ static const char * const driver_short_names[] = {
[AZX_DRIVER_ZHAOXIN] = "HDA Zhaoxin",
[AZX_DRIVER_ZHAOXINHDMI] = "HDA Zhaoxin HDMI",
[AZX_DRIVER_LOONGSON] = "HDA Loongson",
+ [AZX_DRIVER_HYGON] = "HDA Hygon",
[AZX_DRIVER_GENERIC] = "HD-Audio Generic",
};
@@ -2814,6 +2818,9 @@ static const struct pci_device_id azx_ids[] = {
.driver_data = AZX_DRIVER_LOONGSON | AZX_DCAPS_NO_TCSEL },
{ PCI_VDEVICE(LOONGSON, PCI_DEVICE_ID_LOONGSON_HDMI),
.driver_data = AZX_DRIVER_LOONGSON | AZX_DCAPS_NO_TCSEL },
+ /* Hygon HDAudio */
+ { PCI_VDEVICE(HYGON, PCI_DEVICE_ID_HYGON_18H_M05H_HDA),
+ .driver_data = AZX_DRIVER_HYGON | AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_NO_MSI },
{ 0, }
};
MODULE_DEVICE_TABLE(pci, azx_ids);
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.10] ALSA: usx2y: Stop clearing urb->hcpriv before submission
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (24 preceding siblings ...)
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18] ALSA: hda: Add support for Hygon family 18h model 5h HD-Audio Sasha Levin
@ 2026-10-19 13:48 ` Sasha Levin
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Enable mute LED on HP Laptop 15-dy0xxx Sasha Levin
` (35 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:48 UTC (permalink / raw)
To: patches, stable
Cc: Michal Pecio, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Michal Pecio <michal.pecio@gmail.com>
[ Upstream commit fabae5548149ef5c8a056875d9ebdc38366db539 ]
This is managed by USB core and drivers aren't expected to touch it.
It should only be not NULL on a submitted URB, in which case clearing
defeats the "submitted while active" sanity check in usb_submit_urb()
and may crash the HCD handling the URB and panic the kernel.
Signed-off-by: Michal Pecio <michal.pecio@gmail.com>
Link: https://patch.msgid.link/20260810075728.483c827e.michal.pecio@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
I have the local tree, the live `hcpriv` path, and the mailing-list
record. The rest of this is the nine-phase write-up and the backport
verdict for 6.12 only.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: **[ALSA/usx2y] [Stop]** Stop clearing `urb->hcpriv` before
`usb_submit_urb()`. “Stop” here means “stop doing something unsafe,”
i.e. a correctness fix, not a feature.
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Verified from `git show fabae5548149ef5c8a056875d9ebdc38366db539`:
- `Signed-off-by: Michal Pecio <michal.pecio@gmail.com>` (author)
- `Link: https://patch.msgid.link/20260810075728.483c827e.michal.pecio@g
mail.com`
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` (ALSA maintainer)
Absent (expected for this pipeline, not a negative signal): `Fixes:`,
`Cc: stable`, `Reported-by`, `Tested-by`, `Reviewed-by`, `Acked-by`.
No syzbot, no CVE, no multi-user report.
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** Client driver writes `urb->hcpriv = NULL` immediately before
`usb_submit_urb()`. `hcpriv` is USB-core/HCD private.
- **Symptom/failure mode:** If the URB is still active (`hcpriv !=
NULL`), that store hides it from `usb_submit_urb()`’s “submitted while
active” check. The HCD then treats a live URB as a new submit and
**can crash / panic**.
- **Version info in the message:** none. Git places the commit at
`v7.2-rc5-196-gfabae5548149e` (2026-08-10). The assignment itself
dates to `1da177e4c3f41` (Linux-2.6.12-rc2).
- **Root cause (author):** drivers must not touch `hcpriv`; a non-NULL
value means “already submitted.”
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not a disguised cleanup. The message names the panic path. The
diff is a one-line deletion of an illegal store.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/usb/usx2y/usbusx2yaudio.c` — 1 deletion, 0 additions
- Function: `usx2y_urb_submit()`
- Scope: single-file, surgical
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record: Before, `usx2y_urb_submit()` set `start_frame`, **zeroed
`hcpriv`**, set `urb->dev`, then `usb_submit_urb(GFP_ATOMIC)`. After,
the `hcpriv` store is gone. This is the **normal ISO resubmit path**
(completion → `usx2y_usbframe_complete()` → `usx2y_urb_submit()`), not
an error-only path.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: **[Memory safety / HCD invariant]** `urb->hcpriv` is documented
in `include/linux/usb.h` as HCD-private. `usb_submit_urb()` in this
tree:
```378:381:drivers/usb/core/urb.c
if (urb->hcpriv) {
WARN_ONCE(1, "URB %pK submitted while active\n", urb);
return -EBUSY;
}
```
`__usb_hcd_giveback_urb()` already sets `urb->hcpriv = NULL` **before**
the complete callback, so on a legal resubmit the driver’s store is a
no-op. If the URB is still queued, the store defeats
`-EBUSY`/`WARN_ONCE`. xHCI then does `urb->hcpriv = urb_priv` in
`xhci_urb_enqueue()` over a live URB (new `urb_priv`, old still on the
ring) → DMA/ring corruption and panic.
**Step 2.4: ASSESS THE FIX QUALITY**
Record: Obviously correct: delete an illegal write. Minimal. Regression
risk is very low: giveback already NULL’s `hcpriv` before complete;
first-time submits from `usx2y_urbs_start()` go through
`usb_submit_urb()` directly with a freshly allocated URB. On a true
double-submit, users get `-EBUSY` and this driver’s existing `dev_err` +
`usx2y_clients_stop()` instead of an HCD panic.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record: `git blame` on line 170: `urb->hcpriv = NULL` introduced in
**`1da177e4c3f41` (Linux-2.6.12-rc2, 2005)**. Present for the entire
life of this driver. Surrounding function was only renamed/style-fixed
(Takashi Iwai, 2021).
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. The broken line is original driver code, not a
later regression. The USB-core check was added in **`2f02bc8af3abb`
(Alan Stern, 2012)** “USB: report submission of active URBs”
(`WARN_ONCE` + `-EBUSY`). That commit exists in this tree. This driver
has been defeating that check since the check existed.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: Recent local history on this file includes `86f82bf2b5f99`
(validate `nrpacks`), print API, `__counted_by`, etc. None of those
remove `hcpriv`. `git merge-base --is-ancestor fabae5548149e HEAD` →
**not an ancestor** (exit 1). Standalone one-line patch, not `N/M`.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Michal Pecio has no prior ALSA usx2y commits in this checkout.
On `origin/master` the only nearby `hcpriv` work is `25e531b422dc2`
(`usb: xhci: Make usb_host_endpoint.hcpriv survive endpoint_disable()`)
— different field (`ep->hcpriv`), not a prerequisite. Author is a
USB/xHCI contributor; ALSA maintainer applied this the same day.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: None. The function, field, and `usb_submit_urb()` check all
exist here. `git show fabae5548149e | git apply --check` succeeded.
Standalone.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c fabae5548149e` → https://patch.msgid.link/20260810075728.48
3c827e.michal.pecio@gmail.com
- `b4 dig -a`: **v1 only**, 2026-08-10
- Thread (LKML/openwall): standalone `[PATCH]`, no v2. Takashi Iwai:
“Applied to for-next branch. Thanks.” No NAK, no stable discussion, no
reviewer risk flags.
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): To/Cc Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-kernel. **Not** linux-usb. Applied by the ALSA maintainer the same
day; no separate Reviewed-by.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No `Reported-by`, no bugzilla/syzbot. Inspection-driven.
Severity from the author is kernel panic; no public crash log was found.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Not a series. `git log origin/master
fabae5548149e..origin/master -- sound/usb/usx2y/usbusx2yaudio.c` is
empty (no follow-up/revert).
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org returned 403 via WebFetch. Web search of
`site:lore.kernel.org/stable usx2y hcpriv` found **no** stable-list
thread. UNVERIFIED beyond that search: no evidence it was rejected for
stable.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
semcode MCP is not available; callers/callees from grep + reads.
**Step 5.1: IDENTIFY KEY FUNCTIONS**
Record: `usx2y_urb_submit()` only.
**Step 5.2: TRACE CALLERS**
Record:
- `usx2y_usbframe_complete()` in the same file: playback URB after
`usx2y_urb_play_prepare()`, capture `completed_urb` after retire.
Called from `i_usx2y_urb_complete()` (URB complete / giveback).
- `usx2yhwdeppcm.c` includes `usbusx2yaudio.c` and calls
`usx2y_urb_submit()` for capture (and second capture) in the
hwdep/rawusb path.
Hot path: **every ISO frame** while PCM is running. Userspace trigger:
open/play/record on a Tascam US-122/224/428 (`CONFIG_SND_USB_USX2Y`).
**Step 5.3: TRACE CALLEES**
Record: `usb_submit_urb(urb, GFP_ATOMIC)`, `dev_err` on failure. No
alloc, no new locks.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: `usb_hcd_giveback_urb` → `__usb_hcd_giveback_urb` (`hcpriv =
NULL`) → `i_usx2y_urb_complete` → `usx2y_usbframe_complete` →
`usx2y_urb_submit` → `usb_submit_urb`. Reachable from normal PCM. On a
clean complete, `hcpriv` is already NULL. Double-submit is the dangerous
case (startup state machine `STATE_STARTING1/2` can pick
`urb[0]`/`urb[1]` by index; two URBs per substream, `NRURBS == 2`).
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: `urb->hcpriv = NULL` in `sound/` exists **only** in this file.
Other `hcpriv` writes are in HCDs (`xhci`, `ehci`, `ohci`, …), which is
correct. This driver is the outlier among ALSA USB.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: **Yes.** Local tree: `pending-6.12`, `git describe`
`p-6.12-3-gc504cf0baa3d8`, **`make kernelversion` = 6.12.111**. Line 170
of `sound/usb/usx2y/usbusx2yaudio.c` is `urb->hcpriv = NULL;`.
Introduced in 2.6.12-rc2; present for this entire 6.12 line.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: **Clean apply** (`git apply --check` exit 0). Hunk context
matches. No refactor of this submit helper in 6.12 vs the mainline
parent.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: No prior usx2y `hcpriv` fix (`git log --grep=hcpriv --
sound/usb/usx2y/` empty). Nearby usx2y hardening in this tree (`nrpacks`
validation, URB `actual_length` checks, etc.) does not replace this
change.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: **ALSA USB** (`sound/usb/usx2y/`), driver-specific.
**PERIPHERAL/IMPORTANT-for-those-devices**: Tascam US-122/224/428
(`CONFIG_SND_USB_USX2Y`, x86/PPC/Alpha). Not core mm/net, but USB audio
submit on a live HCD is a **system-wide panic** if it fires.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Mature (2002–2005 origin), still receiving real fixes in 6.12
(parameter validation, bounds). Low churn, not staging.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: **Driver-specific / config-specific**: users with Tascam
US-122/224/428 and `CONFIG_SND_USB_USX2Y`. Unprivileged PCM I/O can
exercise the path.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Legal resubmit after giveback: `hcpriv` already NULL → **no
behavior change**. Panic requires submitting a still-active URB (startup
state machine, lost `completed_urb`, or overlapping complete/submit).
Not shown with a public reproducer; ISO ping-pong with two URBs makes it
**plausible**. Unprivileged users running audio can hit the submit path.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: **HCD crash / kernel panic** if an active URB is submitted after
`hcpriv` is cleared. **Severity: CRITICAL** when it fires; **likelihood:
unproven / low** (no Reported-by). After the fix: `-EBUSY` + WARN +
stream stop — **HIGH** improvement vs panic.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- **Benefit:** Restores USB core’s active-URB guard on a path that
otherwise can panic the machine; correct path unchanged.
- **Risk:** 1-line deletion, no API, no locking, no data-structure
change.
- **Ratio:** Strongly favors backport.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Objectively illegal write to HCD-private `urb->hcpriv` (docs + USB
core).
- Defeats `usb_submit_urb()`’s `WARN_ONCE`/`-EBUSY` (in this tree since
2012).
- Failure mode is HCD crash/panic (xhci re-owns a live URB).
- Buggy line present here since 2.6.12; commit is **not** in HEAD.
- 1 deletion; `git apply --check` clean; no prerequisites.
- USB-knowledgeable author; ALSA maintainer applied v1 same day; no NAK;
no later revert.
AGAINST:
- No `Reported-by` / syzbot / crash log.
- Tascam-only driver.
- On the spec-compliant complete path the store is already a no-op
(giveback NULL’s `hcpriv` first), so this is **latent** unless double-
submit happens.
UNRESOLVED:
- Could not fetch lore.kernel.org (403); discussion recovered via b4 +
LKML/openwall.
- No stable-list hit found; not proven it was ever NAK’d for stable.
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — one illegal store removed;
maintainer applied; correct path unchanged.
2. Fixes a real bug that affects users? **PASS** — drivers must not
clear `hcpriv`; this driver does; users of this hardware exist.
3. Important issue (crash, security, corruption, deadlock)? **PASS** —
bypass can panic the HCD; severity is crash, even if unreported.
4. Small and contained? **PASS** — 1 line, one function.
5. No new features or APIs? **PASS**.
6. Can apply to the local tree? **PASS** — clean apply; code present.
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: Not a device-ID/quirk/DT/build/docs exception. Ordinary small
bugfix.
**Step 9.4: MAKE YOUR DECISION**
This belongs in **this** 6.12 tree. The hardware set is narrow, but the
patch is the lowest-risk way to stop a driver from disabling USB core’s
double-submit guard. A panic on ISO resubmit is exactly the class of bug
stable is meant to take; waiting for a public oops is unnecessary when
the mechanism is visible in this checkout.
------------------------------------------------
What the commit solves for 6.12 users
------------------------------------------------
`usx2y_urb_submit()` currently zeros `urb->hcpriv` before
`usb_submit_urb()`. USB core uses that pointer as “this URB is in the
HCD.” Clearing it lets a still-active URB through as if it were idle.
That can crash the host controller. After the deletion, a double-submit
returns `-EBUSY` and this driver already stops the streams.
Meets stable rules: obviously correct, real invariant bug, crash
severity, 1 line, no new API, applies here.
Risk vs benefit: benefit is avoiding a panic; risk is effectively zero
on the giveback path this driver uses every frame.
Concerns: niche device, no reproducer. Neither blocks a one-line restore
of an existing USB-core check.
Verification:
- [Phase 1] Tags: author SOB, Link msgid, Takashi Iwai SOB; no
Fixes/Reported-by/stable Cc
- [Phase 1] Subject/body: stop illegal `hcpriv` clear; panic if URB
still active
- [Phase 2] Diff: delete `urb->hcpriv = NULL` in `usx2y_urb_submit()`;
confirmed at line 170 in this tree
- [Phase 2] `usb_submit_urb()` checks `urb->hcpriv` and returns `-EBUSY`
(`drivers/usb/core/urb.c:378-381`)
- [Phase 2] `__usb_hcd_giveback_urb()` sets `urb->hcpriv = NULL` before
`urb->complete()` (`hcd.c:1627`)
- [Phase 2] xHCI `xhci_urb_enqueue()` assigns `urb->hcpriv = urb_priv`
(`xhci.c:1552`)
- [Phase 2] `include/linux/usb.h`: `hcpriv` is HCD-private;
Documentation `-EBUSY` = URB already active
- [Phase 3] blame: `1da177e4c3f41` Linux-2.6.12-rc2 introduced the store
- [Phase 3] sanity check added `2f02bc8af3abb` (2012), present here
- [Phase 3] `git merge-base --is-ancestor fabae5548149e HEAD` → not in
this tree
- [Phase 3] no follow-up/revert on `origin/master` for this file after
the commit
- [Phase 4] `b4 dig -c fabae5548149e`: lore msgid; v1 only; To/Cc ALSA
maintainers
- [Phase 4] Takashi Iwai applied to for-next; no NAK
- [Phase 4] lore.kernel.org WebFetch 403; LKML/openwall used instead
- [Phase 5] callers: `usx2y_usbframe_complete`, hwdep path via `#include
"usbusx2yaudio.c"`
- [Phase 5] only `sound/` instance of `urb->hcpriv = NULL`
- [Phase 6] `git describe HEAD` = p-6.12-3-gc504cf0baa3d8; `make
kernelversion` = 6.12.111
- [Phase 6] `git apply --check` of `fabae5548149e` succeeded
- [Phase 7] `CONFIG_SND_USB_USX2Y` Tascam US-122/224/428
- [Phase 8] Failure mode: HCD panic on active-URB submit; severity
CRITICAL if triggered
- UNVERIFIED: no public reproducer; stable@ archive not readable (403)
**YES**
sound/usb/usx2y/usbusx2yaudio.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c
index c7c7ec9c228b4..1ea181e9bb283 100644
--- a/sound/usb/usx2y/usbusx2yaudio.c
+++ b/sound/usb/usx2y/usbusx2yaudio.c
@@ -167,7 +167,6 @@ static int usx2y_urb_submit(struct snd_usx2y_substream *subs, struct urb *urb, i
if (!urb)
return -ENODEV;
urb->start_frame = frame + NRURBS * nr_of_packs(); // let hcd do rollover sanity checks
- urb->hcpriv = NULL;
urb->dev = subs->usx2y->dev; /* we need to set this at each time */
err = usb_submit_urb(urb, GFP_ATOMIC);
if (err < 0) {
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Enable mute LED on HP Laptop 15-dy0xxx
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (25 preceding siblings ...)
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-5.10] ALSA: usx2y: Stop clearing urb->hcpriv before submission Sasha Levin
@ 2026-10-19 13:48 ` Sasha Levin
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: add missing NULL check for codec->bus->pci Sasha Levin
` (34 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:48 UTC (permalink / raw)
To: patches, stable
Cc: Carl Quist, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Carl Quist <equalizerjr@gmail.com>
[ Upstream commit eb2b516900f2cff6c931a0d664a625ee93855779 ]
The mute LED on the HP Laptop 15-dy0xxx (PCI SSID 103c:864f, Realtek
ALC236) does not work, because the machine has no entry in the quirk
table. No fixup is applied, so no mute LED classdev is registered and
nothing ever drives the LED.
The LED is controlled by COEF index 0x07, bit 0. This was verified on
the hardware with hda-verb: setting the bit lights the mute LED and
clearing it turns the LED off.
hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x07
hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x1 # LED on
hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x200 # LED off
That is exactly what ALC236_FIXUP_HP_MUTE_LED_COEFBIT2 configures, and
the closely related HP Laptop 15-dw0xxx (103c:85f0) already uses it.
Bit 9 (0x200) is set by default on this board and is preserved by the
fixup's read-modify-write.
Tested on an HP Laptop 15-dy0xxx (SKU 7FU54UA#ABA, board 864F,
BIOS F.40).
Signed-off-by: Carl Quist <equalizerjr@gmail.com>
Link: https://lore.kernel.org/CAOtcGaxXndKxTK5MVSEcmF-LUy+V51K7fhE=qvLA+VvW5ZyCNA@mail.gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a one-line Realtek HDA mute-LED quirk for PCI SSID `103c:864f`.
The local tree is **6.12.111** (`pending-6.12`). The helper it uses
already exists here; only the table entry is missing.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: `[ALSA: hda/realtek] [Enable] Enable mute LED on HP Laptop
15-dy0xxx`
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Signed-off-by: Carl Quist <equalizerjr@gmail.com>` (author)
- `Link: https://lore.kernel.org/CAOtcGaxXndKxTK5MVSEcmF-
LUy+V51K7fhE=qvLA+VvW5ZyCNA@mail.gmail.com`
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` (ALSA maintainer)
- No `Fixes:` tag (expected)
- No `Cc: stable` (expected)
- No `Reported-by:` / `Tested-by:` / `Reviewed-by:` / `Acked-by:`
- Hardware test is in the body (“Tested on an HP Laptop 15-dy0xxx…”)
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** HP Laptop 15-dy0xxx (PCI SSID `103c:864f`, ALC236) has no
quirk-table entry, so no mute-LED classdev is registered and the LED
never lights.
- **Symptom:** mute LED does not track mute state.
- **Root cause:** missing `SND_PCI_QUIRK` for this SSID. LED is COEF
index `0x07` bit 0, verified with `hda-verb` on real hardware.
- **Fix:** reuse existing `ALC236_FIXUP_HP_MUTE_LED_COEFBIT2` (same as
HP Laptop 15-dw0xxx `103c:85f0`).
- **Version info:** none beyond the model; hardware SKU `7FU54UA#ABA`,
BIOS F.40.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not a disguised cleanup. It is an explicit hardware-quirk
addition for a non-working mute LED.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File in mainline: `sound/hda/codecs/realtek/alc269.c` (+1 / -0)
- Function/table: `alc269_fixup_tbl[]`
- Scope: single-file, one-line surgical quirk
- Local equivalent file: `sound/pci/hda/patch_realtek.c` (HDA codecs
were not yet split in 6.12)
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record: Before, SSID `103c:864f` matches no entry, so
`snd_hda_pick_fixup()` applies no ALC236 mute-LED fixup. After, that
SSID maps to `ALC236_FIXUP_HP_MUTE_LED_COEFBIT2`, which at
`HDA_FIXUP_ACT_PRE_PROBE` registers a mute-LED classdev. Probe-time
only; no other SSIDs change.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: **(h) Hardware workaround.** Missing `SND_PCI_QUIRK` for a
laptop whose ALC236 mute LED is driven by COEF `0x07` bit 0.
Verified against this tree’s helper:
```4763:4776:sound/pci/hda/patch_realtek.c
static void alc236_fixup_hp_mute_led_coefbit2(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{
struct alc_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->mute_led_polarity = 0;
spec->mute_led_coef.idx = 0x07;
spec->mute_led_coef.mask = 1;
spec->mute_led_coef.on = 1;
spec->mute_led_coef.off = 0;
snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
}
}
```
`alc_update_coef_idx()` is RMW (`(val & ~mask) | bits_set`), so bit 9
(`0x200`) is preserved as the commit claims.
**Step 2.4: ASSESS THE FIX QUALITY**
Record: Obviously correct: one existing fixup, one SSID, gated by PCI
subsystem ID. Regression risk is limited to this exact machine. No API,
locking, or hot-path change.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record: There is no “buggy line” — the bug is a **missing** table entry.
The helper `alc236_fixup_hp_mute_led_coefbit2` was added in
`0659400f18c0e` (2023-07-19, “Enable Mute LED on HP Laptop 15s-eq2xxx”)
with `Cc: stable`. That helper is an ancestor of this HEAD.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Not applicable. The missing-SSID pattern is the
same as many later quirk adds.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: This tree already contains the same class of patches, e.g.:
- `dda834cc2048d` — HP 14s-dr1xxx mute LED (`0x86c8`, COEFBIT2), landed
2026-09-21
- `dc60a7d2dc78b` — HP 15s-eq1xxx mute LED (`0x8706`, COEFBIT2)
- `b685eba97a5ae` — HP 14s-dr5xxx mute LED
Standalone; not patch X/Y.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: `git log --author="Carl Quist" -- sound/pci/hda/` in this tree
is empty. Author is an end-user reporter, not the subsystem maintainer.
Takashi Iwai applied the patch the same day.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: Only prerequisite is `ALC236_FIXUP_HP_MUTE_LED_COEFBIT2`,
present here. The commit mentions 15-dw0xxx (`103c:85f0`,
`b28d3d0841a60`, 2026-07-03) as a related user of the same fixup; that
SSID is **not** in this tree and is **not** required. Can apply
standalone.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c eb2b516900f2c` →
https://patch.msgid.link/CAOtcGaxXndKxTK5MVSEcmF-
LUy+V51K7fhE=qvLA+VvW5ZyCNA@mail.gmail.com
- `b4 dig -a`: single v1, 2026-08-05, Carl Quist. No later revision.
- Thread: Takashi Iwai: “Applied now. But at the next time, please
submit to linux-sound@vger.kernel.org, instead.”
- No NAK, no stable objection, no requested changes.
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record: `b4 dig -w` recipients: Carl Quist, `alsa-devel@alsa-
project.org`, `tiwai@suse.de`. Subsystem maintainer received and applied
it.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: The submission is the bug report. Hardware-verified with `hda-
verb` and a named SKU. Lore fetch of the search URL returned 403; the
thread was obtained via `b4 dig -m` instead.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone. Sibling 15-dw0xxx (`b28d3d0841a60`) was AUTOSEL’d
for 6.18 — same pattern, different SSID. Not a dependency.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: Web search of lore.kernel.org/stable for this subject did not
return a 15-dy0xxx discussion. No evidence it was rejected for stable.
Closely analogous COEFBIT2 mute-LED quirks are already in this 6.12
tree.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF**
Record: Table `alc269_fixup_tbl[]` only. Runtime path uses existing
`alc236_fixup_hp_mute_led_coefbit2()` →
`snd_hda_gen_add_mute_led_cdev()` → `coef_mute_led_set()` →
`alc_update_coef_led()`.
**Step 5.2: TRACE CALLERS**
Record: `alc269_fixup_tbl` is passed from the ALC269-family probe path:
```12583:12584:sound/pci/hda/patch_realtek.c
snd_hda_pick_fixup(codec, alc269_fixup_models,
alc269_fixup_tbl, alc269_fixups);
```
That is codec probe (device enumeration), not IRQ or a syscall hot path.
**Step 5.3: TRACE CALLEES**
Record: `alc_update_coef_idx()` → `__alc_update_coefex_idx()` does RMW
on NID `0x20`. Matches the `hda-verb` sequence in the commit
(`SET_COEF_INDEX 0x07` on `0x20`).
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Userspace mute → LED classdev brightness →
`coef_mute_led_set()`. Reachable on this laptop whenever the user mutes.
Not a crash path.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Many HP ALC236 laptops in this tree already use
`ALC236_FIXUP_HP_MUTE_LED_COEFBIT2` (`0x84ae`, `0x86c1`, `0x86c8`,
`0x8706`, `0x87b7`, `0x87d3`, …). This is the same established pattern.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record:
- Tree: `p-6.12-2-gd38d58a4e0359`, `make kernelversion` = **6.12.111**,
branch `pending-6.12`
- `git merge-base --is-ancestor eb2b516900f2c HEAD` → not an ancestor
(commit not in this tree)
- `0x864f` is absent from `sound/pci/hda/patch_realtek.c`
- Helper and enum `ALC236_FIXUP_HP_MUTE_LED_COEFBIT2` are present (since
v6.5-era `0659400f18c0e`)
- Insertion neighbors exist: `0x861f` then `0x869d` at lines 10898–10899
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: Path remap only (`alc269.c` → `patch_realtek.c`). Context around
`0x861f`/`0x869d` matches. Expected: **clean apply with path
adjustment**, same as `dda834cc2048d` already on this branch.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: No 15-dy0xxx / `0x864f` entry. Other COEFBIT2 HP mute-LED quirks
are present; none covers this SSID.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: `sound/pci/hda` Realtek codec quirks. **IMPORTANT** for laptop
audio (very common driver), but this one line is **platform/device-
specific**.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Active: recent mute-LED quirk backports on this same file
(`faee5b4612c26`, `dda834cc2048d`, …). Mature quirk table; this is a
routine SSID add, not new infrastructure.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: **Driver-specific / platform-specific:** HP Laptop 15-dy0xxx
with PCI SSID `103c:864f` and `CONFIG_SND_HDA_CODEC_REALTEK`. No other
machines match this SSID.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Every mute toggle on that laptop. Unprivileged users can trigger
the LED path, but the current bug is “LED never works,” not a crash.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: Mute LED stuck/off. **MEDIUM** for that hardware (broken
indicator, not oops/corruption). Still the documented stable **hardware-
quirk exception**.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- **Benefit:** restores mute LED on a shipping HP 15-dy0xxx; same fix
already used on many ALC236 HP models in this tree.
- **Risk:** very low — 1 line, SSID-gated, existing helper.
- **Ratio:** strongly favorable.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Hardware codec quirk (`SND_PCI_QUIRK`) — explicit stable exception
- Real, hardware-tested bug (named SKU, `hda-verb` proof)
- One line; existing `ALC236_FIXUP_HP_MUTE_LED_COEFBIT2` already in 6.12
- ALSA maintainer applied v1 with no objections
- Same class of quirks already backported to this tree (14s-dr1xxx two
days ago)
- Sibling 15-dw0xxx quirk was AUTOSEL’d for 6.18
AGAINST:
- Not a crash, security issue, or data-corruption fix (LED-only)
- Mainline path differs (`alc269.c` vs `patch_realtek.c`) — trivial
remap
- Author is not a regular ALSA contributor
UNRESOLVED:
- Direct lore.kernel.org HTTP fetch returned 403; thread recovered via
`b4 dig -m`
- No dedicated stable-list thread found for this exact subject
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — 1-line SSID map; tested on
named hardware; maintainer applied
2. Fixes a real bug that affects users? **PASS** — mute LED never driven
on this laptop
3. Important issue? **PASS** under the hardware-quirk exception
(severity MEDIUM: LED, not crash)
4. Small and contained? **PASS** — +1 line, one table
5. No new features or APIs? **PASS** — wires an existing fixup
6. Can apply to the local tree? **PASS** — helper present; insert
between `0x861f` and `0x869d` in `patch_realtek.c`
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Hardware quirk / audio codec quirk** (`SND_PCI_QUIRK` in
Realtek HDA). Qualifies automatically.
**Step 9.4: MAKE YOUR DECISION**
The 6.12 tree already has the COEFBIT2 helper and many HP ALC236 mute-
LED SSIDs. This commit only adds `103c:864f`. That is the standard, low-
risk stable backport for Realtek laptop LED quirks.
Detailed explanation:
- **Problem:** Without a quirk, ALC236 on HP 15-dy0xxx never registers a
mute-LED classdev, so the LED stays dead.
- **Why it matters here:** 6.12 users on that SKU still see a broken
LED; the driver and helper are already in this tree.
- **Rules:** Matches the quirk exception; small, tested, no new API.
- **Risk vs benefit:** Benefit is a working LED on one HP model; risk is
confined to that SSID.
- **Backport note:** Change the path to `sound/pci/hda/patch_realtek.c`;
no other code changes needed.
Verification:
- [Phase 1] Parsed tags: author SOB Carl Quist; Link to lore Message-ID;
maintainer SOB Takashi Iwai; no Fixes/Cc:stable/Reported-by
- [Phase 2] Diff: +1 `SND_PCI_QUIRK(0x103c, 0x864f, …,
ALC236_FIXUP_HP_MUTE_LED_COEFBIT2)` in `alc269_fixup_tbl`
- [Phase 2] Helper in this tree at `alc236_fixup_hp_mute_led_coefbit2()`
uses COEF 0x07 mask/on=1; `__alc_update_coefex_idx` is RMW
- [Phase 3] `git log -S alc236_fixup_hp_mute_led_coefbit2 --
sound/pci/hda/patch_realtek.c` → `0659400f18c0e` (2023-07-19,
Cc:stable); `git merge-base --is-ancestor 0659400f18c0e HEAD` →
present
- [Phase 3] `git merge-base --is-ancestor eb2b516900f2c HEAD` → not in
this tree
- [Phase 3] Related in-tree backports: `dda834cc2048d` (14s-dr1xxx),
`dc60a7d2dc78b` (15s-eq1xxx)
- [Phase 4] `b4 dig -c eb2b516900f2c`: v1 only; Takashi “Applied now”;
CC’d alsa-devel + tiwai
- [Phase 4] Sibling `b28d3d0841a60` (15-dw0xxx) AUTOSEL 6.18; not an
ancestor of this HEAD and not required
- [Phase 5] Probe uses `snd_hda_pick_fixup(..., alc269_fixup_tbl, ...)`
- [Phase 6] `git describe HEAD` = `p-6.12-2-gd38d58a4e0359`; `make
kernelversion` = 6.12.111; `0x864f` absent; insert point
`0x861f`/`0x869d` at lines 10898–10899
- [Phase 8] Failure mode: mute LED not driven; severity MEDIUM; SSID-
gated
- UNVERIFIED: lore.kernel.org HTTP 403 on search/direct Message-ID URLs
(thread obtained via b4 instead)
- UNVERIFIED: no dedicated stable@ thread found for this exact commit
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 68d5e5aa7f62d..f2b0eb8501a78 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -6772,6 +6772,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x860c, "HP ZBook 17 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT),
+ SND_PCI_QUIRK(0x103c, 0x864f, "HP Laptop 15-dy0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: add missing NULL check for codec->bus->pci
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (26 preceding siblings ...)
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Enable mute LED on HP Laptop 15-dy0xxx Sasha Levin
@ 2026-10-19 13:48 ` Sasha Levin
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Add quirk for ASRock NUC BOX-358H Sasha Levin
` (33 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:48 UTC (permalink / raw)
To: patches, stable
Cc: Bob Song, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Bob Song <songxiebing@kylinos.cn>
[ Upstream commit 3b36ac93739e7b119a30affaee9c2dd41f24efbb ]
In alc269_probe(), codec->bus->pci is dereferenced without a NULL check
for the ALC236 vendor ID case. Add the missing check, consistent with
the existing pattern used elsewhere in the same function.
Signed-off-by: Bob Song <songxiebing@kylinos.cn>
Link: https://patch.msgid.link/20260730015302.253008-2-songxiebing@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
The local checkout is **v7.3-rc4** (mainline, `7.3.0-rc4`). The
candidate is a one-line NULL check in `alc269_probe()`. The unguarded
`codec->bus->pci->vendor` dereference is real: non-PCI HDA controllers
leave `bus->pci` NULL, and the same function already guards other PCI
accesses.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: `[ALSA hda/realtek] [add] missing NULL check for
codec->bus->pci`
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Signed-off-by: Bob Song <songxiebing@kylinos.cn>` (author)
- `Link: https://patch.msgid.link/20260730015302.253008-2-
songxiebing@kylinos.cn`
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` (ALSA maintainer)
- No `Fixes:`, `Reported-by:`, `Tested-by:`, `Reviewed-by:`, `Acked-
by:`, or `Cc: stable` (absence expected)
- Message-Id suffix `-2` indicates patch 2 of a 2-patch series
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- Bug: `alc269_probe()` dereferences `codec->bus->pci` with no NULL
check in the ALC236 (`0x10ec0236`) case
- Symptom: kernel oops / NULL pointer dereference at codec probe
- Root cause: missing the same `codec->bus->pci &&` guard already used
earlier in the same function
- No stack trace, reproducer, or version range in the message
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not disguised. It is an explicit NULL-deref fix (“add missing
NULL check”, “consistent with the existing pattern”).
===============================================================
PHASE 2: DIFF ANALYSIS
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/hda/codecs/realtek/alc269.c` (+1 / −0)
- Function: `alc269_probe()`
- Scope: single-file, single-line surgical fix
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record: In the `0x10ec0236` / ALC256 variant case, probe used to
evaluate `codec->bus->pci->vendor != PCI_VENDOR_ID_AMD` unconditionally.
After the change it short-circuits if `codec->bus->pci` is NULL and
leaves `spec->en_3kpull_low` at its default (`true`). PCI-present
behavior is unchanged.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record:
- Category: NULL pointer dereference (memory safety)
- Mechanism: `hda_bus.pci` is optional. `azx_bus_init()` does `bus->pci
= chip->pci`. Platform controllers (Tegra, ACPI HDA, CIX IPBLOQ) never
set `chip->pci`, so it stays NULL. ALC236 probe then does
`pci->vendor` and oopses. The 2014 commit `5100cd07d43a1` (“ALSA:
hda/realtek - Allow NULL bus->pci”) already established that Realtek
must tolerate a NULL PCI pointer.
**Step 2.4: ASSESS THE FIX QUALITY**
Record: Obviously correct; matches existing guards at lines 9119 and
9126 in the same function. No API, locking, or data-structure change. If
`pci` is NULL, skipping the AMD-specific `en_3kpull_low = false` keeps
the default — the same “optional PCI” policy as 2014. Regression risk is
very low.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- Unguarded deref introduced in `69ea4c9d02b79` (“ALSA: hda/realtek -
remove 3k pull low procedure”, 2023-07-13, in v6.5-rc3)
- Condition rewritten (still unguarded) in `46cdff2369cbd` (“ALSA:
hda/realtek - Remodified 3k pull low procedure”, 2023-08-15, in
v6.5-rc7)
- File later moved/split (`6014e9021b28e`, `aeeb85f26c3bbe`); logic
unchanged until this fix
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. The buggy pattern dates to `69ea4c9d02b79` /
`46cdff2369cbd`, both ancestors of this HEAD.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: Recent `alc269.c` history is mostly laptop quirks. Sibling in
the same series is `5b106b40ed220` (COEF error checks). That patch
touches `alc282_init` / `alc282_shutup` / `alc285_hp_init` /
`alc294_hp_init`, not `alc269_probe` or `bus->pci`. This NULL check is
standalone.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Bob Song is a regular HDA contributor, not the subsystem
maintainer. Takashi Iwai applied the patch. Related author work around
the same time is the independent COEF-check patch.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: None required. One added `&&` in an existing `if`. The v2 split
from the COEF patch was requested by Iwai because they are different
fixes.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c 3b36ac93739e7` → https://patch.msgid.link/20260730015302.25
3008-2-songxiebing@kylinos.cn
- v1: combined COEF checks + this NULL check
(`20260729063803.1453980-1`)
- v2: split into two patches after maintainer request
- Applied version is v2 (latest)
- Direct lore HTTP fetch returned 403; thread recovered via `b4 dig -m`
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): To/Cc `tiwai@suse.com`, `perex@perex.cz`, `linux-
sound@vger.kernel.org`, `linux-kernel@vger.kernel.org`. Takashi Iwai
(ALSA maintainer) applied it: “Applied to for-next branch now. Thanks.”
No NAK.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No `Reported-by`, syzbot, or bugzilla. Found by code inspection
(missing check vs. siblings). No user crash report found.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Two-patch v2 series. Patch 1 = COEF error checks (independent).
Iwai on v1: “Could you split the NULL check to another patch? Basically
it's a completely different sort of fix from others.” Confirms this is
self-contained.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org/stable search returned HTTP 403. No stable
discussion in the saved mbox. UNVERIFIED whether anyone already
nominated this for stable.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF**
Record: `alc269_probe()` only.
**Step 5.2: TRACE CALLERS**
Record: Assigned as `alc269_codec_ops.probe`. Invoked from the HDA codec
driver probe path when a matching ID in `snd_hda_id_alc269[]` is
enumerated (includes `0x10ec0236` “ALC236”). Probe-time, not IRQ/hot
path.
**Step 5.3: TRACE CALLEES**
Record: The hunk only reads `codec->core.vendor_id` and
`codec->bus->pci->vendor`, then may set `spec->en_3kpull_low`. That flag
is later consumed by `alc256_shutup()`.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Device enumeration → HDA controller probe → codec bind →
`alc269_probe()`. Reachable on any machine with an ALC236 (very common
Dell/HP laptop codec). The NULL path is reached only when the controller
did not assign `bus->pci` (platform/ACPI/Tegra/CIX). Userspace can
trigger it by loading the codec module / booting with that hardware.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same function already uses `if (codec->bus->pci && …)` for
Acer/Lenovo rename quirks. `realtek.c` has `if (!codec->bus->pci)
return`. This site was the hole left by the 2023 3k-pull rewrite.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: Yes. Local tree is `v7.3-rc4-27-gf0100363d8c37` / `7.3.0-rc4`.
File `sound/hda/codecs/realtek/alc269.c` exists. The ALC236
`bus->pci->vendor` test is at lines 9188–9191; this commit
(`3b36ac93739e7`) is already an ancestor of HEAD. The bug was introduced
in v6.5-era code that this tree still contains.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: Expected apply: clean. One context line in an `if`. No refactor
needed on this tree. (Older stables still using
`sound/pci/hda/patch_realtek.c` / `patch_alc269()` would need a
path/function-name adjustment; that does not apply to this checkout.)
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: This exact fix is already in HEAD. `5100cd07d43a1` (2014) added
the general “allow NULL bus->pci” policy; it did not cover this later
ALC236 site. No other substitute for this one-line guard.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: `sound/hda/codecs/realtek` — HD-audio Realtek codec.
Criticality: **IMPORTANT** (extremely common laptop audio), not core
mm/VFS.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Actively developed (quirks land frequently). The buggy PCI deref
itself has been stable since 2023; this is a late correctness fix, not
churn in new code.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: Driver/codec-specific: ALC236 (`0x10ec0236`) on a bus where
`hda_bus.pci` is NULL. Intel/AMD PCI HDA (the usual ALC236 laptops)
always set `pci` in `azx_create()` / SOF / AVS, so they do not crash.
Non-PCI controllers in this tree (Tegra, ACPI HDA, CIX IPBLOQ) never
assign `chip->pci`.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Codec probe of ALC236 with `bus->pci == NULL`. Not a race. Not
unprivileged-syscall-exploitable beyond “device exists.” Commonness of
the crash path is low; commonness of ALC236 is high. The NULL case is a
supported configuration (explicit 2014 policy).
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: NULL deref → oops at probe. Audio init fails; with
`panic_on_oops` the machine dies. Severity: **HIGH** (crash), trigger
rarity: low-to-medium.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- Benefit: prevents a probe-time oops on a supported non-PCI HDA +
ALC236 configuration; restores the documented NULL-PCI policy
- Risk: one `&&` in a probe-time `if`; PCI systems behave identically
- Ratio: high benefit / very low risk
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real NULL deref, not style
- Same function already NULL-checks `bus->pci` in two other places
- 2014 maintainer commit documented that Realtek must allow NULL
`bus->pci`
- Platform HDA controllers in this tree leave `pci` NULL (verified: no
`->pci =` in tegra.c, acpi.c, cix-ipbloq.c)
- One-line, obviously correct, applied by Takashi Iwai
- Independent of the sibling COEF patch
- Code and bug exist in this tree
AGAINST:
- No user crash report or syzbot hit
- Typical ALC236 laptops use PCI HDA, so they never take the NULL path
- No `Fixes:` / `Cc: stable` from the author (not a negative per the
rules)
UNRESOLVED:
- Direct lore.kernel.org HTTP was 403 (thread recovered via b4)
- No confirmed stable-list discussion
- How often ALC236 actually sits behind Tegra/ACPI/CIX HDA is
unverified; the NULL-PCI design is still supported
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — one `&&` matching existing
pattern; maintainer applied to for-next
2. Fixes a real bug that affects users? **PASS** — NULL deref on a
supported non-PCI HDA configuration
3. Important issue (crash, security, corruption, deadlock)? **PASS** —
probe-time oops
4. Small and contained? **PASS** — +1 line, one function
5. No new features or APIs? **PASS**
6. Can apply to the local tree? **PASS** — file and surrounding code
match; commit is already in this HEAD
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: Not a device-ID/quirk/DT/build/doc exception. It is a straight
crash fix.
**Step 9.4: MAKE YOUR DECISION**
This is a one-line NULL check closing a hole left when the 2023 3k-pull
rewrite dereferenced `codec->bus->pci` without the guard the rest of
Realtek has used since 2014. On this v7.3-rc4 tree the buggy site
exists, non-PCI controllers still leave `pci` NULL, and the change
cannot alter PCI HDA behavior. It meets the stable rules: real crash,
tiny, obviously correct.
Verification:
- [Phase 1] Parsed tags: SOB Bob Song + Takashi Iwai; Link msgid `-2`;
no Fixes/Reported-by/Cc:stable
- [Phase 2] Diff: +1 line in `alc269_probe()` adding `codec->bus->pci
&&` before `pci->vendor`
- [Phase 2] Confirmed sibling NULL checks at alc269.c:9119 and :9126
- [Phase 3] `git blame`: guard is `3b36ac93739e7`; surrounding code from
`aeeb85f26c3bbe` (file split)
- [Phase 3] Unguarded deref from `69ea4c9d02b79` (v6.5-rc3) and
`46cdff2369cbd` (v6.5-rc7); both are ancestors of HEAD
- [Phase 3] Sibling `5b106b40ed220` does not touch `alc269_probe` /
`bus->pci` — not a prerequisite
- [Phase 3] `git merge-base --is-ancestor 3b36ac93739e7 HEAD` → already
in this tree
- [Phase 4] `b4 dig -c 3b36ac93739e7`: lore URL found; v1 combined, v2
split at Iwai’s request; Iwai applied v2
- [Phase 4] `b4 dig -w`: linux-sound, perex, tiwai on original To/Cc
- [Phase 4] lore HTTP 403; mbox saved with `b4 dig -m`
- [Phase 5] `alc269_probe` is `.probe` of `alc269_codec_ops`; ID
`0x10ec0236` is in `snd_hda_id_alc269[]`
- [Phase 5] `azx_bus_init()` assigns `bus->pci = chip->pci`;
tegra/acpi/cix-ipbloq never set `chip->pci`
- [Phase 6] `git describe HEAD` → `v7.3-rc4-27-gf0100363d8c37`; `make
kernelversion` → `7.3.0-rc4`
- [Phase 6] Buggy ALC236 block present at alc269.c:9188–9191
- [Phase 6] Historical policy: `5100cd07d43a1` “Allow NULL bus->pci”
(v3.15-rc1) is in HEAD
- [Phase 8] Failure mode: NULL deref at codec probe → oops; severity
HIGH; PCI path unchanged
- UNVERIFIED: whether ALC236 is commonly wired to Tegra/ACPI/CIX in the
field; lore.kernel.org/stable discussion (HTTP 403)
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 6bf500c0b5f9b..d88627558150f 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -8451,6 +8451,7 @@ static int alc269_probe(struct hda_codec *codec, const struct hda_device_id *id)
spec->init_hook = alc256_init;
spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
if (codec->core.vendor_id == 0x10ec0236 &&
+ codec->bus->pci &&
codec->bus->pci->vendor != PCI_VENDOR_ID_AMD)
spec->en_3kpull_low = false;
break;
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Add quirk for ASRock NUC BOX-358H
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (27 preceding siblings ...)
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: add missing NULL check for codec->bus->pci Sasha Levin
@ 2026-10-19 13:48 ` Sasha Levin
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-6.6] ASoC: amd: acp-config: Add HVY-WXX9/M1060 DMI quirk Sasha Levin
` (32 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:48 UTC (permalink / raw)
To: patches, stable
Cc: Eckhart Mohr, Werner Sembach, Takashi Iwai, Sasha Levin, perex,
tiwai, linux-sound, linux-kernel
From: Eckhart Mohr <e.mohr@tuxedocomputers.com>
[ Upstream commit 9a44b828dd7c0be1d0d6d6cf178d9727ceb6da6e ]
Fix headphone jack detection for some devices
Signed-off-by: Eckhart Mohr <e.mohr@tuxedocomputers.com>
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Link: https://patch.msgid.link/20261001183403.103990-1-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a one-line Realtek HDA hardware quirk for the ASRock NUC
BOX-358H. The local tree is **6.18.57**. The same jack-detect fixup
already exists here; only the new PCI SSID is missing.
## PHASE 1: COMMIT MESSAGE FORENSICS
**Step 1.1: PARSE THE SUBJECT LINE**
Record: `[ALSA/hda/realtek] [Add] quirk for ASRock NUC BOX-358H`
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Signed-off-by: Eckhart Mohr <e.mohr@tuxedocomputers.com>` (author)
- `Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>` (Tuxedo;
submitted the patch)
- `Link: https://patch.msgid.link/20261001183403.103990-1-
wse@tuxedocomputers.com`
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` (ALSA maintainer)
- No `Fixes:`, `Reported-by:`, `Tested-by:`, `Reviewed-by:`, or `Cc:
stable` on the committed message
- Ignore pipeline tags (`[Upstream commit 9a44b828...]`, `Signed-off-by:
Sasha Levin`)
Notable: no `Cc: stable` on the commit itself. That is expected for this
review queue. On-list, Werner later asked for stable (Phase 4).
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- Bug: headphone jack detection fails on some devices (the ASRock NUC
BOX-358H)
- Symptom: jack not detected / audio jack unusable until the codec is
quirked
- Version info: none in the message
- Root cause (from this message): not spelled out beyond “fix headphone
jack detection”
- The sibling 2021 quirk for ASRock NUC Box 1100 (`174a7fb3859ae`)
documents the mechanism: cold boot leaves COEF values that hide the
jack; warm reboot from another OS preserves working COEF dumps. This
commit reuses that same `ALC233_FIXUP_NO_AUDIO_JACK` for a new SSID.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not a disguised cleanup. It is an explicit hardware quirk. The
“Add quirk” wording is the standard ALSA form for a real device bug.
## PHASE 2: DIFF ANALYSIS - LINE BY LINE
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/hda/codecs/realtek/alc269.c` (`+1 / -0`)
- Function/data: `alc269_fixup_tbl[]`
- Scope: single-file, one-line table entry
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- Before: PCI SSID `0x1849:0x6256` has no match in `alc269_fixup_tbl`,
so `snd_hda_pick_fixup()` does not apply `ALC233_FIXUP_NO_AUDIO_JACK`
- After: that SSID maps to `alc233_fixup_no_audio_jack()`, which writes
the existing COEF table via `alc_process_coef_fw()`
- Path: codec probe / init, not an error path
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record:
- Category: **(h) Hardware workaround** — `SND_PCI_QUIRK` for ASRock
(`0x1849`) product `0x6256`
- Mechanism: same COEF default programming already used for ASRock NUC
Box 1100 (`0x1849:0x1233`)
- No leak, race, UAF, or locking change
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- Quality: obviously correct as a SSID-scoped reuse of an existing fixup
- Minimal: one table line, no unrelated edits
- Regression risk: very low. `SND_PCI_QUIRK` matches PCI subsystem
vendor/device only. `0x6256` does not appear on any other HDA quirk in
this tree
- Residual (not a reason to reject): the 358H ships a Realtek ALC256;
the fixup name is ALC233. That is pre-existing reuse of the 1100 COEF
dump. Tuxedo submitted it and Takashi applied it with no objection
## PHASE 3: GIT HISTORY INVESTIGATION
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- Insertion sits next to the 1100 entry from `174a7fb3859ae` (Werner
Sembach, 2021-11-12, `Cc: stable`)
- Surrounding table came into `alc269.c` via `aeeb85f26c3bb`
(2025-07-11, “Split Realtek HD-audio codec driver”), which is an
ancestor of `v6.18.57`
- The buggy *behavior* is missing SSID coverage, not a recently
introduced logic bug. The 1100 workaround has been in-tree since
v5.16-era (Nov 2021)
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Not applicable. The analogous original commit
is `174a7fb3859ae` (“Add quirk for ASRock NUC Box 1100”), present in
this tree.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record:
- Recent `alc269.c` history is full of similar one-line/small quirk
additions (HP mute LEDs, ASUS speakers, Lenovo SSIDs, etc.), including
several already in 6.18.y
- No later follow-up in this tree mentioning `358H` or `0x6256`
- Standalone, not `patch X/Y`
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record:
- Eckhart Mohr / Werner Sembach (Tuxedo Computers) regularly submit
Realtek quirks
- Takashi Iwai applied this; he is the ALSA HD-audio maintainer
- Same authors shipped the 1100 quirk that this extends
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record:
- Needs `ALC233_FIXUP_NO_AUDIO_JACK`, `alc233_fixup_no_audio_jack()`,
and `alc269_fixup_tbl` — all present on `v6.18.57` and on the
candidate’s parent
- Parent of `8fa1cfe41877d` does **not** contain `0x1849, 0x6256`
- Applies standalone
## PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c 8fa1cfe41877d`: match at https://patch.msgid.link/202610011
83403.103990-1-wse@tuxedocomputers.com
- `b4 dig -a`: **v1 only**, no later revisions
- LKML: Takashi: “Applied now. Thanks.” (2026-10-03)
- Werner: “again i forgot to add cc stable can you add that in your
branch?” (2026-10-03)
- Takashi: “Just send a post again to stable once when the commit is
merged to Linus tree.” (2026-10-04)
- No NAKs, no risk flags
- lore.kernel.org direct fetches returned HTTP 403; thread recovered via
`b4 dig` + lkml.iu.edu
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`):
- To/Cc: Werner Sembach, Eckhart Mohr, Jaroslav Kysela, Takashi Iwai,
linux-sound, linux-kernel
- Right maintainers and list were on the original recipients
- Applied by Takashi Iwai
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record:
- No syzbot/bugzilla link
- Vendor hardware is real: ASRock Industrial NUC BOX-358H (Intel Core
Ultra Series 3 / Panther Lake-H), front combo jack, Realtek ALC256
(asrockind.com)
- ServeTheHome even has a photo titled around the 358H audio jack
- User impact is that specific mini-PC’s headphone/mic jack
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone v1. Only related in-tree work is the 2021 1100 quirk,
already present.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org/stable search did not turn up a dedicated stable
thread for this SSID. Absence of an auto `Cc: stable` is why this is in
manual review. The author still requested stable on the original thread.
## PHASE 5: CODE SEMANTIC ANALYSIS
**Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF**
Record: No function body changes. Data: `alc269_fixup_tbl[]`. Runtime
effect goes through existing `alc233_fixup_no_audio_jack()` →
`alc_process_coef_fw()`.
**Step 5.2: TRACE CALLERS**
Record:
- `alc269_fixup_tbl` is passed to `snd_hda_pick_fixup()` in the
ALC269-family probe path (`alc269.c` ~8557)
- `snd_hda_pick_fixup()` matches PCI subsystem vendor/device first
(`sound/hda/common/auto_parser.c`)
- Called at codec init for Realtek ALC269-family devices (includes
ALC256, vendor id `0x10ec0256`)
**Step 5.3: TRACE CALLEES**
Record:
- `alc_process_coef_fw()` writes the COEF firmware table (`WRITE_COEF`
for indices 0x1a, 0x1b, 0x37, 0x38, 0x45, 0x46, 0x49)
- No allocations, no locks added
**Step 5.4: FOLLOW THE CALL CHAIN**
Record:
- Reachable when this NUC’s HDA codec probes (boot / module load)
- Userspace does not need a special syscall; plugging headphones is the
user-visible path
- Not a security/syzbot path; it is a device init quirk
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Identical pattern already used for `0x1849:0x1233` (NUC Box
1100). Many other `SND_PCI_QUIRK` rows in the same table. `0x6256` is
unique in ALSA HDA.
## PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record:
- Local tree: `git describe HEAD` = `v6.18.57-155-gcdf239ca885b2`; `make
kernelversion` = `6.18.57`
- `v6.18.57:sound/hda/codecs/realtek/alc269.c` has
`ALC233_FIXUP_NO_AUDIO_JACK` and the 1100 SSID
- `v6.18.57` does **not** contain `0x1849, 0x6256`
- Context around the 1100 row on `v6.18.57` matches the patch (verified
by string match)
- Candidate commit `8fa1cfe41877d` is an ancestor of current HEAD
because this autosel checkout already contains evaluation commits;
that is **not** treated as “already selected”
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: Expected **clean apply** onto 6.18.57. File path and surrounding
table rows match. No refactor needed.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: The 1100 quirk is here. There is no alternate 358H fix. No
follow-up revert/correction in this tree.
## PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record:
- Subsystem: ALSA HD-audio / Realtek codec (`sound/hda/codecs/realtek/`)
- Criticality: **IMPORTANT** for users of this hardware; **PERIPHERAL**
for everyone else (SSID-gated)
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Mature, actively maintained quirk table. Frequent small
hardware-quirk backports in 6.18.y.
## PHASE 8: IMPACT AND RISK ASSESSMENT
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: Driver-specific / platform-specific: ASRock NUC BOX-358H (`PCI
SSID 1849:6256`). Other machines unchanged.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record:
- Trigger: boot on that NUC, then use the front combo jack
- Common for owners of that box; zero for others
- Unprivileged users hit it (jack detect), but this is not an exploit
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record:
- Failure: headphone/headset jack not detected (broken analog audio I/O
on a machine that has a jack)
- Severity: **MEDIUM** for functional impact (not a panic/UAF), **HIGH**
for that device’s usability
- Matches the documented 1100 failure: jack dead on cold boot
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- Benefit: high for 358H users on 6.18.y (this series is still current
as of Oct 2026; this is a 2026 Panther Lake NUC)
- Risk: very low (1 line, existing fixup, SSID-matched)
- Ratio: strongly favors backport
## PHASE 9: FINAL SYNTHESIS
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Textbook stable exception: hardware quirk / PCI ID on an existing
driver
- Real user-visible bug: jack detection
- 1-line, existing fixup, no new API
- Prerequisites present in 6.18.57; applies cleanly
- ALSA maintainer applied it
- Submitter explicitly asked for stable
- Same pattern as the 2021 1100 quirk, which was `Cc: stable`
- Tuxedo-tested on the named device
AGAINST:
- Short commit body
- No `Fixes:` / no sanitizer report (expected for a quirk)
- COEF table originally dumped for the 1100 (ALC233-named); 358H is
ALC256 per vendor specs — accepted by maintainer, SSID-limited
UNRESOLVED:
- Could not fetch lore.kernel.org HTML (403); discussion recovered via
`b4 dig` and LKML archives
- Did not independently dump COEFs on a 358H (not available)
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — one SSID row; Tuxedo
authors; maintainer applied
2. Fixes a real bug that affects users? **PASS** — jack detection on a
shipping NUC
3. Important issue? **PASS** as a hardware quirk (broken jack; not a
panic, but the documented exception class)
4. Small and contained? **PASS** — +1 line
5. No new features or APIs? **PASS**
6. Can apply to the local tree? **PASS** — clean on 6.18.57
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Hardware quirk / PCI ID addition to an existing driver.**
Automatic YES class.
**Step 9.4: MAKE YOUR DECISION**
Backport. The 6.18.57 tree already has the fixup and the 1100 SSID; it
only lacks `0x1849:0x6256`. That is exactly the class of change stable
exists to take.
What it solves for stable users: on ASRock NUC BOX-358H, the Realtek
jack is not detected unless this COEF quirk runs. Without it, the combo
headphone/mic jack stays broken on cold boot.
Risk vs benefit: one SSID-matched table line, no structural change,
benefit is working analog audio on that NUC.
### Verification
- [Phase 1] Parsed tags: author Eckhart Mohr; SOB Werner Sembach,
Takashi Iwai; Link msgid; no Fixes/Cc:stable on the commit
- [Phase 1] Ignored `[Upstream commit 9a44b828…]` and Sasha Levin SOB as
pipeline markers
- [Phase 2] Diff: +1 line in `alc269_fixup_tbl[]` —
`SND_PCI_QUIRK(0x1849, 0x6256, …, ALC233_FIXUP_NO_AUDIO_JACK)`
- [Phase 2] Confirmed fixup body at `alc233_fixup_no_audio_jack()`
writes `alc233_fixup_no_audio_jack_coefs`
- [Phase 3] `git show 174a7fb3859ae`: 2021 1100 quirk, `Cc: stable`,
same fixup; `git merge-base --is-ancestor` vs parent of candidate =
present
- [Phase 3] `git log --author='Eckhart Mohr'` / Werner: regular Realtek
quirk contributors
- [Phase 3] No follow-up `358H`/`0x6256` commits in this tree
- [Phase 4] `b4 dig -c 8fa1cfe41877d`: lore msgid
`20261001183403.103990-1-wse@tuxedocomputers.com`
- [Phase 4] `b4 dig -a`: v1 only
- [Phase 4] `b4 dig -w`: Takashi Iwai, Jaroslav Kysela, linux-sound
- [Phase 4] LKML: Takashi applied; Werner requested Cc:stable; Takashi
said to send to stable after Linus merge
- [Phase 4] lore.kernel.org WebFetch: 403 (UNVERIFIED via direct lore
HTML)
- [Phase 5] `snd_hda_pick_fixup()` matches PCI SSID; probe calls it with
`alc269_fixup_tbl`
- [Phase 5] `git grep 0x6256` in HDA: only this new quirk
- [Phase 6] `git describe HEAD` / `make kernelversion`: 6.18.57
- [Phase 6] `git grep` on `v6.18.57`: 1100 quirk present, 358H SSID
absent; insertion context matches
- [Phase 8] Vendor spec: NUC BOX-358H has a front combo jack and ALC256
- UNVERIFIED: independent COEF dump on 358H hardware; lore.kernel.org
HTML body
This is a small, SSID-scoped hardware quirk that restores jack detection
on a real machine, with the required fixup already in 6.18.57.
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 2a466ef894697..0bfa64bee9d3b 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -7640,6 +7640,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x17aa, 0x9e56, "Lenovo ZhaoYang CF4620Z", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1849, 0x0269, "Positivo Master C6400", ALC269VB_FIXUP_ASUS_ZENBOOK),
SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK),
+ SND_PCI_QUIRK(0x1849, 0x6256, "ASRock NUC Box 358H", ALC233_FIXUP_NO_AUDIO_JACK),
SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x1854, 0x0440, "LG CQ6", ALC256_FIXUP_HEADPHONE_AMP_VOL),
SND_PCI_QUIRK(0x1854, 0x0441, "LG CQ6 AIO", ALC256_FIXUP_HEADPHONE_AMP_VOL),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.6] ASoC: amd: acp-config: Add HVY-WXX9/M1060 DMI quirk
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (28 preceding siblings ...)
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Add quirk for ASRock NUC BOX-358H Sasha Levin
@ 2026-10-19 13:48 ` Sasha Levin
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-6.1] ALSA: usb-audio: Add iD14 MkI to monitor-mix volume quirk Sasha Levin
` (31 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:48 UTC (permalink / raw)
To: patches, stable
Cc: Mehmet Aysel, Mark Brown, Sasha Levin, Vijendar.Mukunda,
lgirdwood, perex, tiwai, linux-sound, linux-kernel
From: Mehmet Aysel <mehmet4ysel@gmail.com>
[ Upstream commit 032bb633e0c34a88b70a4bfc65ebd4e2b510f706 ]
Add DMI match table entry for HUAWEI HVY-WXX9 board, product version
M1060, a MateBook D16 2021 (Ryzen 5 4600H) revision not covered by the
existing M1010/M1020/M1040 entries. This board uses the same
FLAG_AMD_LEGACY / ACP_PCI_DEV_ID configuration as the other HVY-WXX9
variants.
Signed-off-by: Mehmet Aysel <mehmet4ysel@gmail.com>
Link: https://patch.msgid.link/20260825092432.56292-1-mehmet4ysel@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
## Phase 1: Commit message forensics
**Step 1.1: Subject line**
Record: `[ASoC/amd/acp-config] [Add] DMI quirk for HUAWEI HVY-WXX9
product version M1060`
**Step 1.2: Tags**
Record:
- `Signed-off-by: Mehmet Aysel <mehmet4ysel@gmail.com>` (author)
- `Link:
https://patch.msgid.link/20260825092432.56292-1-mehmet4ysel@gmail.com`
- `Signed-off-by: Mark Brown <broonie@kernel.org>` (ASoC maintainer)
- No `Fixes:`, `Reported-by:`, `Tested-by:`, `Reviewed-by:`, `Acked-
by:`, or `Cc: stable` (absence of the last two is expected for this
review)
**Step 1.3: Body**
Record:
- **Bug:** MateBook D16 2021 (Ryzen 5 4600H), board HVY-WXX9 / product
version M1060, is not in the DMI table. Sibling revisions
M1010/M1020/M1040 already are.
- **Symptom:** ACP legacy audio does not bind on this BIOS revision.
- **Root cause:** `snd_amd_acp_find_config()` only returns
`FLAG_AMD_LEGACY` on exact DMI matches; M1060 is missing.
- **Version info:** same hardware family already supported; this is
another product-version string.
**Step 1.4: Hidden bug fix?**
Record: Not hidden. This is an explicit hardware DMI quirk. It is not
cleanup or refactoring.
## Phase 2: Diff analysis
**Step 2.1: Inventory**
Record: `sound/soc/amd/acp-config.c` only; **+14 / -0**. One new
`config_table[]` entry. Single-file surgical change. Functions: none
changed; static table data only.
**Step 2.2: Code flow**
Record: **Before:** HVY-WXX9 + M1060 does not match;
`snd_amd_acp_find_config()` returns 0. `acp_pci_probe()` then does `if
(flag != FLAG_AMD_LEGACY && flag != FLAG_AMD_LEGACY_ONLY_DMIC) return
-ENODEV`.
**After:** Same board matches and gets `FLAG_AMD_LEGACY` /
`ACP_PCI_DEV_ID`, like M1010/M1020/M1040. Probe path only; no error-path
or locking change.
**Step 2.3: Bug mechanism**
Record: **Hardware workaround / DMI quirk.** Missing exact DMI match
left a real MateBook D16 2021 revision without ACP legacy enablement.
**Step 2.4: Fix quality**
Record: Copy of the existing M1040 entry with version `"M1060"`.
Minimal, obviously correct, no API or lock changes. Regression risk is
limited to that DMI triple (HUAWEI / HVY-WXX9 / M1060).
## Phase 3: Git history
**Step 3.1: Blame**
Record: M1010 HVY-WXX9: `b5338b1b901e4` (“Add support for a new Huawei
Matebook laptop”, Marian Postevca, Dec 2023). M1020/M1040:
`54fcd9dd44b2c` (Aug 2023). Table itself: `f1bdd8d385a80` (Nov 2021).
All are ancestors of this 6.12 tree. The gap is only the M1060 string.
**Step 3.2: Fixes: tag**
Record: No `Fixes:` tag. Not applicable.
**Step 3.3: File history**
Record: Last `acp-config.c` change on this branch is `e17de785850e3`
(ACP 7.0 ACPI machine id). Huawei DMI rows have been unchanged since
v6.7-era additions. Standalone table append; no prerequisite refactor.
**Step 3.4: Author**
Record: Mehmet Aysel has no other commits in `sound/soc/amd/` on this
tree. ASoC maintainer Mark Brown applied the series. Related historical
work is Marian Postevca’s HVY-WXX9 entries, including `5513c5d0fb3d5`
(“Fix support… must also update acp3x-es83xx DMI table”).
**Step 3.5: Dependencies**
Record: Compiles and applies alone. This is **patch 1/2**. Companion
`c1a39c228ace` (“ASoC: amd: acp3x-es83xx: Add HVY-WXX9/M1060 DMI quirk”)
is also not in this tree. Without 2/2, `acp3x_es83xx_probe()` still
returns `-ENODEV` if ACPI exposes ES83xx but DMI does not match. 1/2 is
still required: ACP PCI will not bind without `FLAG_AMD_LEGACY`. Same
two-table pattern as M1010 (`b5338b1b901e4` + `5513c5d0fb3d5`).
## Phase 4: Mailing list / external
**Step 4.1: Original discussion**
Record: `b4 dig -c 032bb633e0c3` →
https://patch.msgid.link/20260825092432.56292-1-mehmet4ysel@gmail.com
`b4 dig -a`: **v1 only** (no v2/v3). Mark Brown applied both patches to
`broonie/sound` `for-7.3`
(https://git.kernel.org/broonie/sound/c/032bb633e0c3). Included in the
sound fixes pull for 7.3-rc1 (`git describe --contains` →
`v7.3-rc1~17^2^2~4`). No NAK found.
**Step 4.2: Recipients**
Record: `b4 dig -w`: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi
Iwai, linux-sound, linux-kernel. Right ASoC/sound maintainers.
**Step 4.3: Bug report**
Record: No Bugzilla/syzbot link. Author describes a specific board/SKU
not covered by existing exact matches. No user-count beyond that machine
class.
**Step 4.4: Series**
Record: Two-patch series. [2/2] adds the same DMI triple to
`acp3x-es83xx.c` with `ES83XX_ENABLE_DMIC`. Both should be backported
for working speakers/mic; this commit is still a valid standalone quirk
and a prerequisite for 2/2.
**Step 4.5: Stable list**
Record: No stable-list discussion found for HVY-WXX9/M1060. Lore search
from this environment is 403-limited; lkml/openwall mirrors were used
instead.
## Phase 5: Semantic / call-graph
**Step 5.1: Functions**
Record: No function bodies edited. Data consumed by
`snd_amd_acp_find_config()`.
**Step 5.2: Callers**
Record: `snd_amd_acp_find_config()` is called from PCI probe:
- `sound/soc/amd/acp/acp-pci.c` (`acp_pci_probe`) — **this is the path
that matters** (`FLAG_AMD_LEGACY`)
- `sound/soc/amd/renoir/rn-pci-acp3x.c`, `vangogh/pci-acp5x.c`, `yc/pci-
acp6x.c`, `ps/pci-ps.c`
- SOF: `pci-rn.c`, `pci-rmb.c`, `pci-vangogh.c`, `pci-acp63.c`, `pci-
acp70.c`
**Step 5.3: Callees**
Record: `dmi_check_system()` on each `config_entry`. Match sets
`acp_quirk_data` and returns flags.
**Step 5.4: Reachability**
Record: Yes — PCI enumeration on AMD ACP `0x15E2`
(`CONFIG_SND_SOC_AMD_ACP_PCI` / `CONFIG_SND_AMD_ACP_CONFIG`,
X86+PCI+ACPI). Userspace does not trigger it; missing audio on that
laptop is the user-visible effect.
**Step 5.5: Similar patterns**
Record: Same table already has HVY-WXX9 M1010/M1020/M1040 and other
Huawei KLVL/BOM entries. This tree has many post-v6.12 AMD DMI quirk
backports (e.g. `6599a33c97f45`, `33680092d71b4`).
## Phase 6: This tree (6.12.y)
**Step 6.1: Buggy/missing code**
Record: Local tree is **6.12.111** (`git describe HEAD` →
`p-6.12-3-gc504cf0baa3d8`, `make kernelversion` → 6.12.111). M1060 is
**absent**. Sibling HVY-WXX9 entries are at `acp-config.c:120-161`.
`032bb633e0c3` is **not** an ancestor of HEAD.
**Step 6.2: Backport difficulty**
Record: `git show 032bb633e0c3 | git apply --check` → **Hunk succeeded
at 159 (offset -50 lines)**. Clean apply.
**Step 6.3: Related fixes already here?**
Record: No M1060 entry in `sound/soc/amd/`. No substitute fix.
## Phase 7: Subsystem context
**Step 7.1:**
Record: ASoC AMD ACP machine config. **IMPORTANT** for owners of these
Huawei AMD laptops; not core mm/fs. Driver already exists here.
**Step 7.2:**
Record: ACP config table is mature (since ~5.17/6.7 Huawei work). This
6.12 tree continues to take AMD DMI quirks.
## Phase 8: Impact and risk
**Step 8.1:**
Record: Driver-specific, DMI-specific: HUAWEI HVY-WXX9 / M1060 (MateBook
D16 2021, Ryzen 5 4600H).
**Step 8.2:**
Record: Trigger is boot/ACP PCI probe on that SKU. Not unprivileged-
attack surface. Common for that machine; zero effect on others.
**Step 8.3:**
Record: Failure mode is **no audio** (`-ENODEV`), not oops/UAF. Severity
**MEDIUM** for those users; this is the hardware-quirk exception, not a
crash fix.
**Step 8.4:**
Record: **Benefit high** for that SKU (audio enablement, same as
IDs/quirks already taken here). **Risk very low** (14-line DMI row,
exact match, existing flag). Ratio strongly favors backport.
## Phase 9: Synthesis
**Evidence FOR:**
- Documented hardware-quirk / device-ID exception
- Real laptop revision omitted from exact DMI matches
- Sibling M1010/M1020/M1040 already in this 6.12 tree
- +14 lines, one file, no new API
- Applies cleanly with line offset
- Applied by ASoC maintainer; in v7.3-rc1 sound pull
- This tree already backports AMD DMI quirks after v6.12
**Evidence AGAINST:**
- Not a crash/security/corruption fix
- Full speakers/mic also need companion 2/2 (`c1a39c228ace`), not in
this tree
- Author is not the subsystem regular (mitigated by Mark Brown applying
it)
**Unresolved:** None that change the verdict. Stable-list 403 on lore;
mirrors showed no NAK and no prior rejection.
**Stable rules:**
1. Obviously correct and tested? **PASS** — copy of existing entry;
maintainer applied
2. Real bug affecting users? **PASS** — missing audio on M1060
3. Important (crash/security/corruption/deadlock)? **PASS via quirk
exception** — device enablement
4. Small and contained? **PASS** — 14 lines, one file
5. No new features/APIs? **PASS** — DMI row for existing driver/flags
6. Applies to this tree? **PASS** — verified `git apply --check`
**Exception category:** Hardware DMI quirk / device-ID-style addition to
an existing driver.
The patch makes ACP legacy bind on a MateBook D16 2021 BIOS revision
this tree already treats as supported for M1010/M1020/M1040. That is
exactly the class of quirk 6.12.y already takes. Companion
`acp3x-es83xx` M1060 should be backported too for a complete card, but
this commit is self-contained, applies cleanly, and is the PCI-bind half
of that enablement.
Verification:
- [Phase 1] Tags: author SOB, Mark Brown SOB, msgid link; no
Fixes/Reported-by/Cc: stable
- [Phase 2] Diff: +14 lines in `config_table[]` only; `FLAG_AMD_LEGACY`
+ `ACP_PCI_DEV_ID` + DMI triple
- [Phase 3] Blame: M1010=`b5338b1b901e4`, M1020/M1040=`54fcd9dd44b2c`;
both ancestors of HEAD
- [Phase 3] `5513c5d0fb3d5` documents that acp-config alone is
incomplete without es83xx DMI
- [Phase 3] Author has no other `sound/soc/amd` commits on this tree
- [Phase 4] `b4 dig -c 032bb633e0c3`: msgid 20260825092432.56292-1; v1
only; Broonie applied both
- [Phase 4] Recipients: lgirdwood, broonie, perex, tiwai, linux-sound
- [Phase 4] Included in sound fixes pull for 7.3-rc1; `git describe
--contains` = `v7.3-rc1~17^2^2~4`
- [Phase 5] `acp_pci_probe()` returns `-ENODEV` unless flag is
`FLAG_AMD_LEGACY`
- [Phase 5] `acp3x_es83xx_probe()` also requires its own DMI table
(companion 2/2)
- [Phase 6] `git describe HEAD` = `p-6.12-3-gc504cf0baa3d8`; `make
kernelversion` = 6.12.111
- [Phase 6] `git merge-base --is-ancestor 032bb633e0c3 HEAD` → not
ancestor; `M1060` absent
- [Phase 6] `git apply --check` of 032bb633 → success at line 159,
offset -50
- [Phase 6] Companion `c1a39c228ace` also not an ancestor of HEAD
- [Phase 7/8] Post-v6.12 AMD DMI quirks already present (e.g.
`6599a33c97f45`, 2026-09-21)
- UNVERIFIED: full lore.kernel.org thread body (HTTP 403); used
lkml.iu.edu / openwall / b4 instead
**YES**
sound/soc/amd/acp-config.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/amd/acp-config.c b/sound/soc/amd/acp-config.c
index 365209ea53f36..653e8ce946082 100644
--- a/sound/soc/amd/acp-config.c
+++ b/sound/soc/amd/acp-config.c
@@ -159,6 +159,20 @@ static const struct config_entry config_table[] = {
{}
},
},
+ {
+ .flags = FLAG_AMD_LEGACY,
+ .device = ACP_PCI_DEV_ID,
+ .dmi_table = (const struct dmi_system_id []) {
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "HUAWEI"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HVY-WXX9"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "M1060"),
+ },
+ },
+ {}
+ },
+ },
};
static int snd_amd_acp_acpi_find_config(struct pci_dev *pci)
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.1] ALSA: usb-audio: Add iD14 MkI to monitor-mix volume quirk
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (29 preceding siblings ...)
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-6.6] ASoC: amd: acp-config: Add HVY-WXX9/M1060 DMI quirk Sasha Levin
@ 2026-10-19 13:49 ` Sasha Levin
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18] ALSA: hda: Force resume if acomp notified during system suspend Sasha Levin
` (30 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:49 UTC (permalink / raw)
To: patches, stable
Cc: Will Porter, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Will Porter <mrwillporter@gmail.com>
[ Upstream commit 17056a36d276a740f09dca723de1bc6aa3eb4ef9 ]
Add the iD14 MkI USB ID to the existing audient_id14_map. This
names feature unit 12 Monitor Mix Playback Volume.
Live meter A/B testing on MkI USB ID 2708:0002 reproduced the same
asymmetric attenuation seen on MkII. At ALSA value 104, the right
channel was 23.07 dB below the left. At 127, both channels were equal.
The misleading Speaker Playback Volume name causes PipeWire to adopt
FU12 as the stream master. Reuse the existing map to keep the control
available while preventing that selection.
Hardware-tested on Bazzite 7.2.0-ogc4.1.fc44.x86_64 with this change
backported. ALSA exposed Monitor Mix Playback Volume after module load
and USB reconnect. PipeWire volume changes from 100% to 35% and back
left all four FU12 values at 127. Channel-isolated left/right playback
remained balanced after reconnect.
Build-tested with CONFIG_SND_USB_AUDIO=m using the focused sound/usb
target.
Assisted-by: Codex:gpt-5
Signed-off-by: Will Porter <mrwillporter@gmail.com>
Link: https://patch.msgid.link/20260823015353.686080-1-mrwillporter@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
I have the local-tree, prerequisite, and mailing-list evidence. Writing
the full nine-phase analysis next.
---
## PHASE 1: COMMIT MESSAGE FORENSICS
**Step 1.1: PARSE THE SUBJECT LINE**
Record: **[ALSA / usb-audio] [Add] Add iD14 MkI USB ID to the existing
monitor-mix volume name map**
- Subsystem: `ALSA: usb-audio`
- Action verb: **Add** (USB ID / quirk-table entry, not a new API)
- Intent: extend `audient_id14_map` so MkI feature unit 12 is named
“Monitor Mix Playback Volume” instead of “Speaker Playback Volume”
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- **Fixes:** none (expected for this review pipeline)
- **Reported-by:** none
- **Tested-by:** none as a tag; body describes first-party hardware test
- **Reviewed-by:** none
- **Acked-by:** none
- **Link:** `https://patch.msgid.link/20260823015353.686080-1-
mrwillporter@gmail.com`
- **Cc: stable:** none (expected; not a negative signal)
- **Assisted-by:** Codex:gpt-5
- **Signed-off-by:** Will Porter `<mrwillporter@gmail.com>`
- **Signed-off-by:** Takashi Iwai `<tiwai@suse.de>` (ALSA maintainer;
ignore any Sasha Levin SOB)
- **Upstream commit** markers: ignore per instructions
Notable: no syzbot, no multi-user Reported-by. Strength comes from
hardware measurement and maintainer apply.
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** FU 12 is walked through to the Speaker output terminal, so
ALSA exports it as “Speaker Playback Volume”. PipeWire then uses that
control as the stream hardware master.
- **Symptom:** asymmetric attenuation. On MkI `2708:0002`, ALSA value
104 → right channel **23.07 dB** below left; at 127 both channels
match.
- **Root cause:** misleading default name, not a kernel crash path. Same
class of bug already described for MkII.
- **Fix:** reuse `audient_id14_map` so the control is “Monitor Mix
Playback Volume” and is no longer chosen as stream master, while
remaining reachable.
- **Version info:** tested as a backport on Bazzite
`7.2.0-ogc4.1.fc44.x86_64`; build-tested with
`CONFIG_SND_USB_AUDIO=m`.
- **Hidden vs explicit:** this is an explicit hardware-quirk / name-map
fix, not cleanup disguised as a fix.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: **Not a hidden fix.** The message states the imbalance, the
userspace trigger, and the map reuse. It is a USB mixer name-map quirk.
---
## PHASE 2: DIFF ANALYSIS
**Step 2.1: INVENTORY THE CHANGES**
Record:
- **File:** `sound/usb/mixer_maps.c` only
- **Scope:** +13 / −8 (comment rewrite + one `usbmix_ctl_maps[]` entry)
- **Functions / objects:** `audient_id14_map[]` comment;
`usbmix_ctl_maps[]` (adds `USB_ID(0x2708, 0x0002)`)
- **Classification:** single-file surgical USB-ID / quirk addition
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- **Before (mainline, MkII-only):** `audient_id14_map` remaps unit 12 →
`"Monitor Mix Playback"` for `0x2708:0x0008` only. MkI `0x2708:0x0002`
still gets the default “Speaker Playback Volume” name.
- **After:** same map is also bound to `0x2708:0x0002`.
`snd_usb_create_mixer()` walks `usbmix_ctl_maps[]`, matches
`chip->usb_id`, and `check_mapped_name()` supplies the mapped name.
Because `mapped_name` is set, mixer.c does **not** append `"
Playback"`; it still appends `" Volume"` → `"Monitor Mix Playback
Volume"`.
- **Path:** mixer probe / control-creation only. Not a hot path, error
path, or locking change.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record:
- **Category:** **(h) Hardware workaround** + **(g) logic/correctness of
exported control name**
- **Mechanism:** default terminal-derived name makes PipeWire treat a
monitor-mix FU as master volume. That FU does not apply equally to all
channels (MkI: imbalance inside the stereo pair; MkII: 4 of 6
channels). Remapping the name stops that selection without dropping
the control (dropping it would strand a persisted attenuated FU12).
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- **Quality:** obviously correct and matches an established
`usbmix_name_map` pattern already used throughout this file.
- **Regression risk:** very low. The new entry is keyed by USB ID
`0x2708:0x0002` only. Other devices are untouched. The control remains
present under a different name.
- **Red flags:** none for APIs, locking, or size. Dependency: the commit
**assumes** `audient_id14_map` and the MkII `0x2708:0x0008` entry
already exist.
---
## PHASE 3: GIT HISTORY INVESTIGATION
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- In **this** 6.12 tree, `audient_id14_map` and the `0x2708:0x0008` ctl-
map entry **do not exist**.
- The buggy *behavior* is the long-standing default in
`__build_feature_ctl()` (`sound/usb/mixer.c`): if there is no map,
volume is named from the output terminal (“Speaker”) + `" Playback"` +
`" Volume"`. That logic is in this tree (verified at
mixer.c:1740–1786).
- MkI already has a **different** quirk here since 2021: `df0380b9539b0`
(“ALSA: usb-audio: Add quirk for Audient iD14”) adds
`DEVICE_FLG(0x2708, 0x0002, QUIRK_FLAG_IGNORE_CTL_ERROR)` in
`sound/usb/quirks.c:2374`. That is control-message error ignoring, not
this name-map.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: **No Fixes: tag.** Not applicable.
The functional prerequisite is the MkII map, submitted 2026-08-13 by
Neil Andrews: “ALSA: usb-audio: Rename the Audient iD14 monitor mix
volume control” (adds `audient_id14_map` + `USB_ID(0x2708, 0x0008)`).
Takashi applied that to for-next on 2026-08-14. That commit is **not**
in this 6.12 checkout.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record (this tree, `sound/usb/mixer_maps.c`):
- Recent entries are the same class of quirk: Corsair Virtuoso later
revision, Razer Barracuda dB map, Corsair HS80, Gigabyte B450, MSI
boards, etc.
- This candidate is **standalone relative to a series** (not “N/M”), but
it **depends** on the Aug 13 MkII map commit.
- Same-class commits **already backported into this 6.12 tree**:
- `0d928648172c3` Corsair Virtuoso later revision — adds USB IDs to an
existing mixer map
- `c74de4e57685d` Corsair HS80 — new mixer map so PulseAudio/PipeWire
do not grab the wrong volume
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record:
- Will Porter has **no** other usb-audio commits in this tree.
- Neil Andrews has none here either.
- Takashi Iwai is the ALSA/usb-audio maintainer and applied both the
MkII and MkI patches immediately (“Applied now. Thanks.” / “Applied to
for-next branch.”).
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record:
- **Prerequisite:** MkII `audient_id14_map` (Neil Andrews, 2026-08-13).
Missing from HEAD, from `master` in this repo (tip ~7.2-rc7,
2026-08-08), and from `linux-rolling-stable` / `linux-rolling-lts`
mixer_maps.c.
- **Can this SHA apply standalone here?** No. Context hunks (the map
comment and the `0x2708:0x0008` entry) are absent.
- **Can a backport stand alone?** Yes. `usbmix_name_map` /
`usbmix_ctl_maps` / `find_map()` / `check_mapped_name()` already
exist. A 6.12 backport is: add the 4-line map plus the MkI (and
optionally MkII) USB ID. That is the same shape as HS80/Virtuoso maps
already in this tree.
---
## PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c <sha>`: candidate SHA is **not in this repo** (applied
after current `master` tip). Used msgid instead.
- `b4 mbox` msgid `20260823015353.686080-1-mrwillporter@gmail.com`:
**2-message thread**.
- Lore/LKML: https://lkml.iu.edu/2608.2/12083.html
- **Revisions:** single version (v1). `base-commit:
7e77c09e23dae1ff8bd8598c3c96f9db6862eddd` (object exists here but is
**not** an ancestor of this 6.12 HEAD).
- **Reviewer feedback:** Takashi Iwai, 2026-08-23: “Applied now.
Thanks.” No NAK, no requested changes, no stable nomination in-thread.
- MkII prerequisite thread: https://lists.openwall.net/linux-
kernel/2026/08/13/2036 — Takashi: “Applied to for-next branch.
Thanks.”
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record: To/Cc on the MkI mail includes the ALSA path; Takashi (subsystem
maintainer) applied it the next morning. No other review comments.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record:
- No bugzilla/syzbot link.
- Evidence is the author’s live-meter A/B test on MkI `2708:0002`,
reproducing the MkII imbalance (Neil Andrews measured 20.00 dB on MkII
via digital loopback).
- **Users affected:** owners of Audient iD14 MkI (USB `2708:0002`) using
PipeWire (default on modern desktops). MkI has been quirked in-tree
since 2021, so this population exists on 6.12.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Not a numbered series. Follow-up to the MkII rename (different
author, 10 days later). For this tree, a useful backport is **map + MkI
ID** (MkII ID optional).
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org/stable returned 403; WebSearch on
`site:lore.kernel.org/stable` for this subject found **no** iD14
monitor-mix discussion. No recorded reason to exclude it. The 2021
IGNORE_CTL_ERROR quirk **was** sent to stable (`[PATCH 5.15 12/12]`).
---
## PHASE 5: CODE SEMANTIC ANALYSIS
**Step 5.1: KEY FUNCTIONS IN THE DIFF**
Record: no function bodies changed. Data only: `audient_id14_map`,
`usbmix_ctl_maps[]`.
**Step 5.2: TRACE CALLERS**
Record:
- `snd_usb_create_mixer()` (`mixer.c:3272`) walks `usbmix_ctl_maps[]`
and sets `state.map` on USB ID match.
- `find_map()` / `check_mapped_name()` / `__build_feature_ctl()` consume
that map when creating feature-unit kcontrols.
- Context: USB audio probe / mixer build. Not IRQ, not a syscall hot
path.
**Step 5.3: TRACE CALLEES**
Record: map is data. Naming uses `check_mapped_name()` → `strscpy()`,
then `append_ctl_name(..., " Volume")`. No alloc/lock/I/O in the new
code.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: userspace-reachable: plug in iD14 MkI → `snd-usb-audio` probe →
mixer controls appear → PipeWire enumerates “Speaker Playback Volume” as
hardware master. **Yes, reachable from normal desktop use.**
Unprivileged users can trigger it by moving the session volume.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: this file is full of the same pattern (Corsair, Gigabyte, MSI,
Bose, …). This 6.12 tree already backported sibling “wrong mixer name →
userspace grabs the wrong volume” quirks.
---
## PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record:
- **Tree:** `git describe HEAD` = `p-6.12-3-gc504cf0baa3d8`; `make
kernelversion` = **6.12.111**.
- **Buggy default naming:** yes, `sound/usb/mixer.c`
`__build_feature_ctl()`.
- **MkI device:** yes, `QUIRK_FLAG_IGNORE_CTL_ERROR` for
`0x2708:0x0002`.
- **`audient_id14_map` / MkII ID `0x2708:0x0008`:** **no**.
- Bug is **not** “introduced after 6.12 branched”. The hardware +
default namer have been here for years. The *fix table* is what is new
(2026).
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: **needs a small backport, not a clean `git am`.** Insertion
point still exists (`MAYA44 USB+` then `KEF X300A` at
mixer_maps.c:586–595). Add `audient_id14_map` after
`gigabyte_b450_connector_map` and a `usbmix_ctl_maps[]` entry for
`0x2708:0x0002`. Line numbers differ slightly from mainline; no
structural conflict.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: no monitor-mix / `audient_id14` name map. The 2021
IGNORE_CTL_ERROR quirk is unrelated and does not fix imbalance.
---
## PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
**Step 7.1: SUBSYSTEM AND CRITICALITY**
Record: **ALSA USB-audio mixer maps** (`sound/usb/mixer_maps.c`).
Criticality: **PERIPHERAL / device-specific**, but the driver is common
(`CONFIG_SND_USB_AUDIO`). Same class as USB/codec quirks that stable
accepts routinely.
**Step 7.2: SUBSYSTEM ACTIVITY**
Record: actively maintained; this 6.12 tree continues to take mixer-map
USB ID and naming quirks (Virtuoso, HS80, etc.).
---
## PHASE 8: IMPACT AND RISK ASSESSMENT
**Step 8.1: WHO IS AFFECTED**
Record: **driver-specific / USB-ID-specific** — Audient iD14 MkI
(`2708:0002`). MkII (`2708:0008`) is not even listed in this tree; this
commit’s MkI ID is the one that matters here.
**Step 8.2: TRIGGER CONDITIONS**
Record:
- Trigger: PipeWire (or similar) adopts “Speaker Playback Volume” as
stream master and the user sets volume below 0 dB / 100%.
- **How common:** every volume change below unity on a typical desktop,
once the device is plugged in.
- **Unprivileged:** yes (session volume). Not a privilege-escalation
issue; it is broken stereo.
**Step 8.3: FAILURE MODE SEVERITY**
Record:
- **Failure:** large L/R imbalance (measured **23.07 dB** at ALSA 104).
Audio is effectively wrong; not a panic/UAF.
- **Severity: HIGH for affected hardware** (serious functional/hardware
bug), **not CRITICAL** (no crash/corruption/security).
**Step 8.4: RISK-BENEFIT RATIO**
Record:
- **Benefit:** high for MkI owners on 6.12 (device already quirked here
since 2021; PipeWire is the usual stack).
- **Risk:** very low (ID-keyed name map; ~10-line backport).
- **Ratio:** strongly favors backporting, matching Virtuoso/HS80
precedent **in this same tree**.
---
## PHASE 9: FINAL SYNTHESIS
**Step 9.1: COMPILE THE EVIDENCE**
**FOR:**
- Real, measured 23 dB channel imbalance on MkI; same class as the MkII
bug.
- Hardware-tested, including a backport; maintainer applied v1
immediately.
- Classic USB mixer name-map / hardware quirk (stable exception).
- This 6.12 tree already ships the same kind of mixer_maps USB-ID
quirks.
- MkI is already a supported ID here; the namer bug is present.
- Tiny, ID-scoped, no new API, no locking.
**AGAINST:**
- `audient_id14_map` is not in this tree; the patch does not apply as-
is.
- Depends on the Aug 2026 MkII map commit (18 lines).
- Not a crash/security/corruption bug.
- Affects one USB audio interface.
**UNRESOLVED:**
- Exact mainline SHA is not in this clone (`master` stops at
~2026-08-08). Thread + msgid confirm apply.
- Stable list search could not be fetched (403); no positive or negative
stable-list signal.
**Step 9.2: STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — map reuse; hardware + build
tested; maintainer applied.
2. Fixes a real bug that affects users? **PASS** — 23 dB imbalance under
PipeWire.
3. Important issue? **PASS** under the hardware-quirk exception (severe
broken output on a supported device). Not a kernel crash.
4. Small and contained? **PASS** — one file; backport is a small map +
ID.
5. No new features or APIs? **PASS** — rename existing control via
existing map machinery.
6. Can apply to the local tree? **PASS with backport** — not a clean
apply; fold in `audient_id14_map` (and optionally the MkII ID).
Infrastructure is already here.
**Step 9.3: EXCEPTION CATEGORIES**
Record: **Hardware quirk / USB ID addition** to the existing usb-audio
mixer map tables. Same exception as USB quirks and HDA `SND_PCI_QUIRK`
entries.
**Step 9.4: DECISION**
This is a device-specific name-map quirk for hardware this 6.12 tree
already supports. The missing MkII map is a packaging dependency, not a
missing subsystem: a few lines of `usbmix_name_map` plus `USB_ID(0x2708,
0x0002)` are enough. That is exactly the class of mixer_maps change this
tree already takes (HS80, Virtuoso). Benefit for MkI + PipeWire users is
large; regression risk is confined to that USB ID.
---
### What the commit solves (for this tree)
On Audient iD14 MkI, feature unit 12 is exported as “Speaker Playback
Volume”. PipeWire treats that as hardware master and, below 0 dB,
attenuates channels unequally (23 dB L/R error in the author’s test).
Remapping unit 12 to “Monitor Mix Playback Volume” stops that selection
and keeps the monitor gain usable.
### Risk vs benefit
Benefit is restoring correct stereo for an interface already quirked in
6.12 since 2021. Risk is a few ID-keyed lines in `mixer_maps.c`. The
only extra work is including `audient_id14_map` because the Aug 2026
MkII commit is not here.
### Concerns
- Do not `git am` the mainline diff as-is; add the map (and the MkI ID)
by hand.
- MkII `0x2708:0x0008` is optional on 6.12 (that ID is not present
here).
---
### Verification
- **[Phase 1]** Parsed subject/tags/body from the provided commit and
the b4 mbox. Tags: Link msgid, Assisted-by Codex, SOB Will Porter +
Takashi Iwai. No Fixes/Reported-by/Cc:stable.
- **[Phase 2]** Diff is comment rewrite + one `usbmix_ctl_maps[]` entry
for `0x2708:0x0002` in `sound/usb/mixer_maps.c`.
- **[Phase 2]** Verified naming in this tree: `mixer.c:1740–1786` —
mapped name suppresses `" Playback"`, still appends `" Volume"`.
- **[Phase 2]** Verified map attach: `mixer.c:3272–3278` matches
`usbmix_ctl_maps[].id` to `chip->usb_id`.
- **[Phase 3]** `git describe HEAD` / `make kernelversion`: **6.12.111**
(`p-6.12-3-gc504cf0baa3d8`).
- **[Phase 3]** `git grep` on `sound/usb`: no `audient_id14`, no
`Monitor Mix`; only `DEVICE_FLG(0x2708, 0x0002)` in `quirks.c:2374`.
- **[Phase 3]** `git show df0380b9539b0`: 2021 IGNORE_CTL_ERROR quirk;
`git merge-base --is-ancestor` → present. Different bug.
- **[Phase 3]** `git log --grep=iD14 -- sound/usb/`: only that 2021
quirk plus an unrelated subject match. No monitor-mix map.
- **[Phase 3]** Similar 6.12 backports: `0d928648172c3` (Virtuoso USB
IDs), `c74de4e57685d` (HS80 mixer map, `cc: stable`).
- **[Phase 3]** `git merge-base --is-ancestor 7e77c09e23dae1... HEAD` →
**not** an ancestor; object type is `commit`.
- **[Phase 3]** `master` / `linux-rolling-stable` / `linux-rolling-lts`:
still no `audient_id14_map` (master tip ~2026-08-08, before both
patches).
- **[Phase 4]** `b4 mbox` MkI thread (2 msgs): submission + Takashi
“Applied now.”
- **[Phase 4]** `b4 mbox` MkII thread (2 msgs): Neil Andrews map +
Takashi “Applied to for-next.”
- **[Phase 4]** WebFetch LKML/openwall confirmed both diffs.
lore.kernel.org 403; stable-list search found nothing relevant.
- **[Phase 5]** Call chain: probe → `snd_usb_create_mixer` →
`__build_feature_ctl` → PipeWire. Userspace-reachable.
- **[Phase 6]** Insertion neighbors `MAYA44` / `KEF X300A` exist at
mixer_maps.c:586–595; map array itself missing.
- **[Phase 8]** Failure mode verified from commit text + MkII loopback
measurements in the prerequisite mail (20 dB MkII / 23 dB MkI).
- **UNVERIFIED:** mainline SHA of the applied MkI commit (not in this
clone). Not used as a reason to reject; thread + maintainer apply are
verified.
The missing MkII map is a few lines to include in the backport, not a
missing subsystem. This is a hardware quirk this tree already accepts.
**YES**
sound/usb/mixer_maps.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c
index 8046d5987d5b1..ace4ccad8f51c 100644
--- a/sound/usb/mixer_maps.c
+++ b/sound/usb/mixer_maps.c
@@ -505,13 +505,13 @@ static const struct usbmix_connector_map gigabyte_b450_connector_map[] = {
{}
};
-/* Audient iD14: FU 12 advertises Volume on only 4 of its 6 logical channels
- * and sits on the monitor mixer branch, but it is traced through to the
- * Speaker output terminal and gets named "Speaker Playback Volume". Userspace
- * then adopts it as the stream's hardware volume, and any setting below 0 dB
- * attenuates some channels but not others (20 dB imbalance at 80%). Give it a
- * non-standard name so that it is no longer taken for the stream's master
- * volume, while remaining reachable for anyone who wants the monitor gain.
+/* Audient iD14 MkI and MkII: FU 12 sits on the monitor mixer branch but is
+ * traced through to the Speaker output terminal, so it is named "Speaker
+ * Playback Volume". On MkII it controls only 4 of 6 playback channels. MkI
+ * testing found asymmetric attenuation within the main stereo pair. Userspace
+ * adopts this control as the stream's hardware volume, causing imbalance below
+ * 0 dB. Give it a non-standard name so that userspace no longer treats it as
+ * the stream master, while keeping the monitor gain reachable.
*/
static const struct usbmix_name_map audient_id14_map[] = {
{ 12, "Monitor Mix Playback" }, /* FU, partial coverage */
@@ -602,7 +602,12 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
.map = maya44_map,
},
{
- /* Audient iD14 */
+ /* Audient iD14 MkI */
+ .id = USB_ID(0x2708, 0x0002),
+ .map = audient_id14_map,
+ },
+ {
+ /* Audient iD14 MkII */
.id = USB_ID(0x2708, 0x0008),
.map = audient_id14_map,
},
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18] ALSA: hda: Force resume if acomp notified during system suspend
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (30 preceding siblings ...)
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-6.1] ALSA: usb-audio: Add iD14 MkI to monitor-mix volume quirk Sasha Levin
@ 2026-10-19 13:49 ` Sasha Levin
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Add quirk for Lenovo ThinkBook G8+ Sasha Levin
` (29 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:49 UTC (permalink / raw)
To: patches, stable
Cc: Nícolas F. R. A. Prado, Takashi Iwai, Sasha Levin, perex,
tiwai, linux-sound, linux-kernel
From: Nícolas F. R. A. Prado <nfraprado@collabora.com>
[ Upstream commit c0933934d5d96fc641e8d0025f9099e554a7b47a ]
Currently if an HDMI cable is connected while the system is suspended,
the HDMI audio jack status stays off after resume.
This is due to the jack state not being synced by the HDA HDMI codec
device's runtime resume, as that never happens if the device was runtime
suspended before the system suspended, or by the acomp notification
triggered from the DRM side if that happens before the HDA HDMI codec
device has resumed.
To fix this, if snd_hda_hdmi_acomp_pin_eld_notify() gets called before
the HDA HDMI codec device has resumed, mark it to be forcefully runtime
resumed at the next PM complete time.
Do this using a separate acomp_requested_resume flag that can be
temporarily set without overwriting forced_resume for drivers that
always want to force resume.
Assisted-by: Copilot:claude-sonnet-4.6
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://patch.msgid.link/20260626-hda-force-resume-eld-notify-v1-1-a92cb01393e0@collabora.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
The local tree is **6.18.y** (`v6.18.53`). The candidate is a small HDMI
jack-sync fix for AMD/Nvidia HDA; the buggy skip-during-suspend path is
present at `v6.18.53` and the patch applies there cleanly.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: `[ALSA: hda]` `[Force]` Force a runtime resume if the DRM audio
component (acomp) notifies HDMI pin/ELD state during system suspend.
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Assisted-by: Copilot:claude-sonnet-4.6` (authoring aid; not a quality
verdict)
- `Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>`
(author)
- `Link: https://patch.msgid.link/20260626-hda-force-resume-eld-
notify-v1-1-a92cb01393e0@collabora.com`
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` (ALSA maintainer applied
it)
- Pipeline-added tags ignored: `[Upstream commit ...]`, `Signed-off-by:
Sasha Levin`
- No `Fixes:`, `Reported-by:`, `Tested-by:`, `Reviewed-by:`, `Acked-
by:`, or `Cc: stable` (absence expected)
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** Plug an HDMI cable while the system is suspended; after
resume the HDMI audio jack stays off.
- **Symptom:** Userspace sees HDMI audio disconnected until a later
unplug/replug or some other codec resume.
- **Root cause:** Two missed sync paths: (1) HDA HDMI runtime resume
never runs if the codec was already runtime-suspended before system
suspend (direct-complete); (2) DRM `pin_eld_notify` during that window
is dropped because `power_state.event == PM_EVENT_SUSPEND`.
- **Fix:** Remember the notify and force `pm_request_resume()` in
`hda_codec_pm_complete()`. Use a dedicated flag so `forced_resume` is
not overwritten for codecs that keep it set (Intel KAE / Realtek).
- **Version info:** None in the message. Author date is 2026-06-26
(after 6.18).
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not hidden. It is an explicit functional fix for stale HDMI jack
state after suspend.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- `include/sound/hda_codec.h`: +1 (`acomp_requested_resume` bitfield)
- `sound/hda/codecs/hdmi/hdmi.c`: +3/-1 in
`snd_hda_hdmi_acomp_pin_eld_notify()`
- `sound/hda/common/codec.c`: +4/-1 in `hda_codec_pm_complete()`
- Scope: 8 insertions, 2 deletions; single-purpose surgical change
across HDMI notifier + codec PM
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- **hdmi.c:** Previously, acomp notify during system suspend returned
immediately (comment: “state will be updated at resume”). After: same
early return, but sets `codec->acomp_requested_resume = 1`.
- **codec.c `hda_codec_pm_complete()`:** Previously requested runtime
resume only for jackpoll, `hda_codec_need_resume()`, or
`forced_resume`. After: also if `acomp_requested_resume`, then clear
the flag.
- Path: system-sleep complete of an already runtime-suspended HDMI
codec, after DRM notified during HDA’s `PM_EVENT_SUSPEND` window.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: **Logic / correctness (missed jack sync after suspend/resume).**
- HDMI acomp codecs set `relaxed_resume` when the DRM notifier is bound
(`generic_acomp_notifier_set()`), so `hda_codec_need_resume()` is
false.
- Direct-complete (`hda_codec_pm_prepare`/`complete`, Kai-Heng Feng
2020) keeps a runtime-suspended codec suspended through S3.
- Notify is dropped; resume never runs `snd_hda_hdmi_generic_resume()` →
`hdmi_present_sense()` / `sync_eld_via_acomp()`.
- Jack kcontrol stays off.
**Step 2.4: ASSESS THE FIX QUALITY**
Record: Obviously correct and minimal. Runtime resume already jacks-
syncs all pins (`hda_call_codec_resume()` → `ops->resume` →
`hdmi_present_sense` per pin, plus `snd_hda_jack_report_sync()`), so a
boolean “something changed” is enough. Separate flag avoids clobbering
`forced_resume`. Regression risk is low: extra `pm_request_resume()`
only when DRM notified during the suspend window; at worst a short extra
wake before runtime suspend. Does not change userspace APIs. Intel’s
`intel_pin_eld_notify()` still skips without this flag (same class of
bug, different notifier); that gap does not make this AMD/Nvidia-path
fix incorrect.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- Skip-during-suspend introduced in `ade49db337a9d` (“ALSA: hda/hdmi -
Allow audio component for AMD/ATI and Nvidia HDMI”, Takashi Iwai,
2018; contained in v5.4-rc1).
- `hda_codec_pm_complete()` forced-resume conditions from
`215a22ed31a13` (direct-complete, 2020) and `forced_resume` from
`a6e7d0a4bdb02` (2020).
- Buggy combination (drop notify + stay runtime-suspended because of
`relaxed_resume`) has been in the tree for years, including 6.18.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Not applicable. Introducer of the skip is
`ade49db337a9d`; it is in this tree.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: Recent HDMI/codec PM work is unrelated (Lisuan IDs, `__force`
cleanup, power-pm error check). No series (`v1-1` standalone). No
follow-up on these three files that extends this flag.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Only this HDA commit from Nícolas Prado in this tree. ALSA
maintainer Takashi Iwai applied it. Author is a regular kernel
contributor (Collabora), not the HDA maintainer; maintainer SOB is the
stronger signal.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: Uses existing `forced_resume` / `hda_codec_pm_complete()` /
`snd_hda_hdmi_acomp_pin_eld_notify()`. All present at `v6.18.53`.
Standalone. File layout `sound/hda/codecs/hdmi/hdmi.c` exists in 6.18
(`6014e9021b28e` reorg is already in this tree).
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c c0933934d5d96…` → https://patch.msgid.link/20260626-hda-
force-resume-eld-notify-v1-1-a92cb01393e0@collabora.com
- `b4 dig -a`: **v1 only**, no later revisions.
- Thread (mbox): submission + Takashi Iwai “Applied to for-next branch
now. Thanks.” No NAKs, no requested changes, no reviewer `Cc: stable`.
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): To Jaroslav Kysela, Takashi Iwai; Cc `linux-
sound`, `linux-kernel`, Collabora. Maintainer applied v1 as-is.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No `Reported-by` / bugzilla / syzbot. Description is a concrete
user-visible HDMI jack failure. Severity from the author: HDMI audio
jack stays off after a plug-during-S3. User count unverified beyond the
author.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone v1. Intel `intel_pin_eld_notify()` still has the old
skip; no sibling Intel patch in this tree.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org/stable search returned 403; web search did not
find a stable-list thread for this subject. UNVERIFIED whether anyone
already nominated or rejected it for stable. That absence is not used as
a NO.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS**
Record: `snd_hda_hdmi_acomp_pin_eld_notify()`,
`hda_codec_pm_complete()`. Struct field
`hda_codec.acomp_requested_resume`.
**Step 5.2: TRACE CALLERS**
Record:
- `snd_hda_hdmi_acomp_pin_eld_notify` is the `.pin_eld_notify` op for
AMD (`atihdmi.c`) and Nvidia (`nvhdmi.c`). DRM calls it via
`amdgpu_dm_audio_eld_notify()`, `radeon_audio`, `nouveau dispnv50`.
Typical context: display modeset / connector ELD change (hotplug or
resume modeset), not a syscall on the ALSA side.
- `hda_codec_pm_complete` is `.complete` in `hda_codec_driver_pm`
(system sleep complete for every HDA codec).
- Intel uses a separate `intel_pin_eld_notify()` and is **not** covered.
**Step 5.3: TRACE CALLEES**
Record: Notify still returns during suspend (no verbs). Complete path
calls existing `pm_request_resume()`. Runtime resume →
`hda_call_codec_resume()` → HDMI `snd_hda_hdmi_generic_resume()` →
`hdmi_present_sense()` (`sync_eld_via_acomp` when acomp is bound).
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Reachable without privilege: physical HDMI/DP plug while the
machine is suspended, then resume. Common laptop/dock path. Not a
fuzzer/syscall crash path.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same skip remains in `sound/hda/codecs/hdmi/intelhdmi.c`
`intel_pin_eld_notify()`. Same `forced_resume` pattern already used for
jack/KAE. This patch copies that idea for acomp.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: **Yes.** `git describe HEAD` / `make kernelversion` →
**6.18.53**. At `v6.18.53`:
- `snd_hda_hdmi_acomp_pin_eld_notify()` still returns on
`PM_EVENT_SUSPEND` with no flag.
- `hda_codec_pm_complete()` has no `acomp_requested_resume`.
- `hda_codec` has `forced_resume` but not the new bit.
Bug introduced ~2018/2020; present in 6.18. Upstream SHA `c0933934d5d96`
is **not** an ancestor of `v6.18.53`.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: **Clean apply.** `git diff v6.18.53 6a484c2d8404d` on the three
files is exactly this patch. Context lines match.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: No other 6.18 fix for “acomp notify during suspend” / this jack-
stays-off sequence. Intel skip is still unfixed; not a substitute.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: ALSA HD-audio HDMI (AMD/Nvidia acomp). **IMPORTANT** (common
dGPU/APU HDMI audio), not core mm/vfs. Affects AMD/Nvidia HDMI jack
kcontrols/PCM availability after S3.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Active (quirks, HDMI, PM). The skip itself has been stable since
2018; this is a late correctness fix, not churn for new infrastructure.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: Driver-specific: AMD ATI HDMI (`atihdmi`) and Nvidia HDMI
(`nvhdmi`) with DRM audio-component binding. Intel HDMI notifier is
unchanged.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: HDMI/DP cable (or dock) attached while the system is in S3, then
resume, **and** the HDMI codec was runtime-suspended before suspend
(normal with `relaxed_resume`). Unprivileged physical hotplug; not a
syscall exploit. Timing: DRM notify before HDA `complete()`.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: HDMI audio jack stays reported off; HDMI PCM/jack userspace does
not see the display. No oops, deadlock, or filesystem corruption.
**MEDIUM** functional suspend/resume bug (audio device missing until
another resume/replug).
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- **Benefit:** High for AMD/Nvidia HDMI users who dock/plug during
suspend (common). Jack state is restored via the existing resume path.
- **Risk:** Very low (8 lines, existing PM helper, 1-bit flag still
inside the same `unsigned int` bitfield group of 26 bits). Possible
extra runtime resume if DRM notifies on every GPU resume while HDA is
still `PM_EVENT_SUSPEND`; that is transient power, not a functional
break.
- **Ratio:** Benefit outweighs risk for 6.18.y.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real user-visible bug: HDMI audio jack stays off after plug-during-
suspend.
- Mechanism verified in 6.18 code: skip notify + `relaxed_resume` +
direct-complete.
- Tiny, obviously correct, maintainer-applied v1 with no NAKs.
- Applies cleanly to this tree; all helpers exist.
- Existing resume path already resyncs ELD/jacks; this only ensures that
path runs.
- Same class of PM/jack workaround already used (`forced_resume`).
AGAINST:
- Not a crash, UAF, or security issue.
- No independent `Reported-by` / `Tested-by`.
- Intel HDMI notifier still has the skip (incomplete coverage, not a
regression of this patch).
- Possible extra runtime resume after S3 if DRM notifies during the HDA
suspend window.
UNRESOLVED:
- Could not fetch lore.kernel.org/stable (403); no verified stable-list
discussion.
- Could not quantify how often AMD/Nvidia DRM notifies during HDA’s
suspend window on every resume vs only on true hotplug.
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — logic matches the resume
path; maintainer applied v1. No extra Tested-by, but the change is
reviewable from the code.
2. Fixes a real bug that affects users? **PASS** — stale HDMI jack after
a common plug-during-S3.
3. Important issue? **PASS** — not panic/corruption, but a
suspend/resume hardware-functional bug that leaves HDMI audio
unavailable; this class is routinely taken in stable.
4. Small and contained? **PASS** — 8 insertions / 2 deletions, three
files, one flag.
5. No new features or APIs? **PASS** — internal bitfield; no UAPI.
6. Can apply to the local tree? **PASS** — identical context at
`v6.18.53`.
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: Not a device-ID/quirk/DT/build/docs exception. It is a normal
small functional PM/jack fix.
**Step 9.4: MAKE YOUR DECISION**
This should be backported to this 6.18.y tree. The buggy skip and
complete-path exist here, the fix is surgical, and the user impact (HDMI
audio missing after docking/plugging in suspend) is real.
### What the commit solves and why it matters here
On 6.18, AMD/Nvidia HDMI codecs using acomp set `relaxed_resume` and can
stay runtime-suspended across system sleep. DRM may notify pin/ELD while
the codec is still `PM_EVENT_SUSPEND`; that notify is dropped, and
`hda_codec_pm_complete()` does not wake the codec. HDMI jack kcontrols
stay off after resume. Forcing a one-shot runtime resume when such a
notify arrived restores the existing ELD/jack sync in
`hda_call_codec_resume()`.
### Stable rules / risk vs benefit
Meets the stable bar: real bug, small, no new API, clean apply, low
regression risk. Benefit is restoring HDMI audio after a common suspend
hotplug; risk is an extra runtime resume in that window.
### Concerns
Intel HDMI still skips notify during suspend (separate function). No
`Fixes:`/`Cc: stable` (expected). No third-party test tag. Neither is a
reason to withhold this AMD/Nvidia-path fix from 6.18.y.
Verification:
- [Phase 1] Parsed tags: author SOB, Takashi Iwai SOB, msgid Link; no
Fixes/Reported-by/Cc:stable
- [Phase 1] Body: HDMI jack stays off after plug-during-suspend; skipped
acomp notify + no runtime resume
- [Phase 2] Diff: +1 bitfield, set flag in
`snd_hda_hdmi_acomp_pin_eld_notify`, test/clear in
`hda_codec_pm_complete` (8+/2-)
- [Phase 2] `hda_codec_need_resume()` is `!relaxed_resume &&
jacktbl.used`; acomp sets `relaxed_resume`
- [Phase 3] blame: skip from `ade49db337a9d` (v5.4-rc1); complete path
from `215a22ed31a13` (2020)
- [Phase 3] `git merge-base --is-ancestor c0933934d5d96 HEAD` → not in
v6.18.53; buggy code is
- [Phase 3] No series/prereqs; files exist at 6.18 paths
- [Phase 4] `b4 dig -c`: lore msgid; `b4 dig -a`: v1 only; mbox: Takashi
“Applied to for-next”; no NAK
- [Phase 4] `b4 dig -w`: To Iwai/Kysela, Cc linux-sound
- [Phase 4] UNVERIFIED: stable@ discussion (lore 403)
- [Phase 5] Callers: atihdmi/nvhdmi ops; DRM amdgpu/radeon/nouveau
pin_eld_notify; Intel uses different function
- [Phase 5] Resume callee chain verified: `hda_codec_runtime_resume` →
`hda_call_codec_resume` → HDMI generic_resume → `hdmi_present_sense`
- [Phase 6] `git describe HEAD` / Makefile: 6.18.53; `git show
v6.18.53:...` has pre-fix code; diff vs candidate is this patch only
- [Phase 7] ALSA HDA HDMI, important, AMD/Nvidia
- [Phase 8] Trigger: HDMI plug in S3 then resume; failure: jack stays
off; severity MEDIUM; risk very low
- UNVERIFIED: how often DRM notifies on every GPU resume vs only
hotplug; Intel still buggy (out of scope of this commit)
**YES**
include/sound/hda_codec.h | 1 +
sound/hda/codecs/hdmi/hdmi.c | 4 +++-
sound/hda/common/codec.c | 5 ++++-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h
index 3c9e64dc02524..b801943f0667f 100644
--- a/include/sound/hda_codec.h
+++ b/include/sound/hda_codec.h
@@ -257,6 +257,7 @@ struct hda_codec {
unsigned int link_down_at_suspend:1; /* link down at runtime suspend */
unsigned int relaxed_resume:1; /* don't resume forcibly for jack */
unsigned int forced_resume:1; /* forced resume for jack */
+ unsigned int acomp_requested_resume:1; /* resume requested by acomp */
unsigned int no_stream_clean_at_suspend:1; /* do not clean streams at suspend */
unsigned int ctl_dev_id:1; /* old control element id build behaviour */
unsigned int eld_jack_detect:1; /* Machine jack-detection by ELD */
diff --git a/sound/hda/codecs/hdmi/hdmi.c b/sound/hda/codecs/hdmi/hdmi.c
index f427d04176e92..42e4dc0949ec9 100644
--- a/sound/hda/codecs/hdmi/hdmi.c
+++ b/sound/hda/codecs/hdmi/hdmi.c
@@ -2236,8 +2236,10 @@ void snd_hda_hdmi_acomp_pin_eld_notify(void *audio_ptr, int port, int dev_id)
/* skip notification during system suspend (but not in runtime PM);
* the state will be updated at resume
*/
- if (codec->core.dev.power.power_state.event == PM_EVENT_SUSPEND)
+ if (codec->core.dev.power.power_state.event == PM_EVENT_SUSPEND) {
+ codec->acomp_requested_resume = 1;
return;
+ }
snd_hda_hdmi_check_presence_and_report(codec, pin_nid, dev_id);
}
diff --git a/sound/hda/common/codec.c b/sound/hda/common/codec.c
index 164906e2f00f4..8cab932177194 100644
--- a/sound/hda/common/codec.c
+++ b/sound/hda/common/codec.c
@@ -2949,8 +2949,11 @@ static void hda_codec_pm_complete(struct device *dev)
dev->power.power_state = PMSG_RESUME;
if (pm_runtime_suspended(dev) && (codec->jackpoll_interval ||
- hda_codec_need_resume(codec) || codec->forced_resume))
+ hda_codec_need_resume(codec) || codec->forced_resume ||
+ codec->acomp_requested_resume)) {
+ codec->acomp_requested_resume = 0;
pm_request_resume(dev);
+ }
}
static int hda_codec_pm_suspend(struct device *dev)
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Add quirk for Lenovo ThinkBook G8+
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (31 preceding siblings ...)
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18] ALSA: hda: Force resume if acomp notified during system suspend Sasha Levin
@ 2026-10-19 13:49 ` Sasha Levin
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-5.15] soundwire: dmi-quirks: add a global ghost list Sasha Levin
` (28 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:49 UTC (permalink / raw)
To: patches, stable
Cc: Zhang Heng, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Zhang Heng <zhangheng@kylinos.cn>
[ Upstream commit 4322ac247f4ce7932edbd46aa37f3dae62cde424 ]
Fix Bass Speaker volume control on Lenovo ThinkBook G8+ by adding
quirk 17aa:38dc with ALC285_FIXUP_SPEAKER2_TO_DAC1.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=221799
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Link: https://patch.msgid.link/20260921124450.639601-1-zhangheng@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
The local tree is **6.18.57**. The ThinkBook G8+ SSID is not in
`v6.18.57`; the existing `ALC285_FIXUP_SPEAKER2_TO_DAC1` path is, so
this is a one-line hardware quirk that belongs in this series.
---
## PHASE 1: COMMIT MESSAGE FORENSICS
**Step 1.1: PARSE THE SUBJECT LINE**
Record: `[ALSA/hda/realtek] [Add] [quirk for Lenovo ThinkBook G8+ to fix
bass speaker volume]`
- Subsystem: `ALSA: hda/realtek`
- Verb: `Add` (hardware quirk, not a new API)
- Intent: enable an existing Realtek fixup for PCI SSID `17aa:38dc`
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Link: https://bugzilla.kernel.org/show_bug.cgi?id=221799` — user-
filed hardware bug
- `Link:
https://patch.msgid.link/20260921124450.639601-1-zhangheng@kylinos.cn`
— original submission
- `Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>` — author
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` — ALSA maintainer
- No `Fixes:` tag (expected; this adds a device match, it does not
revert an earlier logic bug)
- No `Reported-by:` / `Tested-by:` / `Reviewed-by:` / `Cc: stable`
(absence is expected)
- Pipeline markers (`[Upstream commit 4322ac247f4ce…]`, `Signed-off-by:
Sasha Levin`) ignored per instructions
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- Bug: bass speaker volume control is broken on Lenovo ThinkBook G8+
- Symptom: users cannot control bass speaker volume
- Root cause (from the existing fixup, not restated in this commit): NID
0x17 (bass speaker) is not routed to DAC1 (0x02), so volume amp is
missing
- Fix: match SSID `17aa:38dc` to `ALC285_FIXUP_SPEAKER2_TO_DAC1`
- Version info: none in the message; patch dated 2026-09-21, applied by
Takashi Iwai 2026-09-28
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not a disguised cleanup. This is an explicit hardware quirk for
a documented laptop audio defect.
---
## PHASE 2: DIFF ANALYSIS
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/hda/codecs/realtek/alc269.c` (`+1 / -0`)
- Function/table: `alc269_fixup_tbl[]`
- Scope: single-file, one-line surgical addition
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- Before: PCI SSID `17aa:38dc` has no quirk; generic Realtek auto-config
is used
- After: that SSID selects `ALC285_FIXUP_SPEAKER2_TO_DAC1` at codec
probe
- Path: HDA codec probe / pin-config fixup (init path), not a hot path
or error path
- Only machines with that SSID are affected
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record:
- Category: hardware workaround / codec quirk (`SND_PCI_QUIRK`)
- Mechanism: `alc285_fixup_speaker2_to_dac1()` on
`HDA_FIXUP_ACT_PRE_PROBE` calls `snd_hda_override_conn_list(codec,
0x17, …, {0x02})`, forcing the bass-speaker pin onto DAC1 so volume
control works
- The fixup is also chained to `ALC269_FIXUP_THINKPAD_ACPI` (Lenovo ACPI
hooks), which is the same chain already used for Yoga Pro 7 14ARP8
(`17aa:386e`)
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- Obviously correct: one table entry using an existing, long-lived fixup
- Minimal: no unrelated edits
- Regression risk: low and SSID-scoped. Wrong SSID would mis-route audio
on that ID only; `17aa:38dc` is unused in this tree’s HDA tables
- No public API / data-structure change
---
## PHASE 3: GIT HISTORY INVESTIGATION
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- This is a new table row, not a change to old lines
- Neighboring Lenovo SSIDs (`0x38d7`, `0x38df`) already exist in
`v6.18.57`
- `alc285_fixup_speaker2_to_dac1` / bass-speaker-to-DAC pattern dates to
`e79c22695abd3` (2019; originally `Cc: stable`)
- Same enum used for Yoga Pro 7 14ARP8 in `1a49509885cd9` (2024-06-16),
which **is** an ancestor of `v6.18.57`
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Not applicable. The “bug” is missing hardware
enablement for this SSID, not a regression of a prior commit.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record:
- Recent `alc269.c` history is dominated by similar `SND_PCI_QUIRK`
additions
- Submitted as `[PATCH 1/2]`; 2/2 is an unrelated Acer Nitro headset-mic
quirk (`1025:151e`). Not a prerequisite
- Standalone
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record:
- Zhang Heng is a regular Realtek quirk contributor (ASUS, Lenovo, HP,
Samsung entries in this file)
- Not the subsystem maintainer; Takashi Iwai applied the patch
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record:
- Needs `ALC285_FIXUP_SPEAKER2_TO_DAC1`,
`alc285_fixup_speaker2_to_dac1()`, `ALC269_FIXUP_THINKPAD_ACPI`,
`snd_hda_override_conn_list()`, and `alc269_fixup_tbl[]`
- All present in `v6.18.57`
- Can apply standalone
---
## PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c 4322ac247f4ce7932edbd46aa37f3dae62cde424` →
https://patch.msgid.link/20260921124450.639601-1-zhangheng@kylinos.cn
- Series: **v1 only** (`[PATCH 1/2]`)
- Takashi Iwai reply (`875wzp5yr7.wl-tiwai@suse.de`, 2026-09-28):
“Applied both patches. Thanks.”
- No NAK, no requested revision, no stable-risk comments
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`):
- To: `tiwai@suse.com` (ALSA maintainer)
- Cc: `linux-sound@vger.kernel.org`, `linux-kernel@vger.kernel.org`
- Maintainer applied it after review
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record:
- Commit cites bugzilla 221799
- Direct fetch of bugzilla/lore HTML was blocked by Anubis/captcha (403
/ bot check)
- UNVERIFIED: bugzilla comment text, number of duplicates, reporter
hardware dump
- Verified: author and maintainer treated it as a real bass-speaker
volume bug for SSID `17aa:38dc`
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record:
- 2/2 is an independent Acer quirk, not required here
- Same fixup already used for Lenovo Yoga Pro 7 14ARP8 in this tree
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org/stable search blocked by Anubis. UNVERIFIED
whether anyone already asked for this on stable@. No in-tree evidence of
a prior rejection.
---
## PHASE 5: CODE SEMANTIC ANALYSIS
**Step 5.1: IDENTIFY KEY FUNCTIONS**
Record:
- Modified: `alc269_fixup_tbl[]` (data)
- Invoked fixup: `alc285_fixup_speaker2_to_dac1()`
- Lookup at probe: `alc269_fixup_tbl` passed into the generic HDA fixup
picker (around line 8558 in this checkout / 8528 in `v6.18.57`)
**Step 5.2: TRACE CALLERS**
Record:
- Table is consulted during Realtek ALC269-family codec probe
- Triggered by HDA bus enumeration of matching PCI SSID
- Not IRQ/hot-path; once per codec init
**Step 5.3: TRACE CALLEES**
Record:
- `snd_hda_override_conn_list()` — present in `v6.18.57`
(`include/sound/hda_codec.h`)
- Chained `ALC269_FIXUP_THINKPAD_ACPI` — present in `v6.18.57`
**Step 5.4: FOLLOW THE CALL CHAIN**
Record:
- Userspace-reachable: yes, by using the laptop’s speakers / mixer
- Unprivileged users cannot attack other machines; they only exercise
this laptop’s audio path
- Impact is functional (bass volume), not a kernel crash
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record:
- Same fixup already bound to Yoga Pro 7 14ARP8 (`SND_PCI_QUIRK(0x17aa,
0x386e, …, ALC285_FIXUP_SPEAKER2_TO_DAC1)`)
- Many other `SND_PCI_QUIRK` Lenovo entries in the same table
- Systematic, well-worn pattern
---
## PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record:
- Tree: `git describe HEAD` → `v6.18.57-155-gcdf239ca885b2`; `make
kernelversion` → `6.18.57`
- `git merge-base --is-ancestor 4322ac247f4ce7932edbd46aa37f3dae62cde424
v6.18.57` → **NO** (upstream commit not in 6.18.57)
- `git grep 0x38dc v6.18.57 -- sound/hda/codecs/realtek/alc269.c` →
**absent**
- The missing-quirk bug **does** exist in this series
- Driver, fixup enum, and function **do** exist
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record:
- Dry-run of the upstream hunk onto
`v6.18.57:sound/hda/codecs/realtek/alc269.c`: **Hunk #1 succeeded at
7538 (offset -726 lines)**
- Expected difficulty: clean apply (line-offset only)
- Neighboring context (`0x38d7` Yoga 9, then `0x38df` Yoga Y990) matches
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record:
- No other `17aa:38dc` HDA quirk in `v6.18.57`
- No alternate ThinkBook G8+ fix
- (HEAD currently contains the autosel candidate copy; ignored as
pipeline state)
---
## PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record:
- Subsystem: ALSA HD-audio Realtek codec (`sound/hda/codecs/realtek/`)
- Criticality: IMPORTANT (very common laptop audio), not core
mm/scheduler
- Affects only Lenovo ThinkBook G8+ (`17aa:38dc`)
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record:
- Mature but active: `v6.18.57` already contains many similar quirk
backports (HP, Lenovo, ASUS)
- Typical stable material for this file
---
## PHASE 8: IMPACT AND RISK ASSESSMENT
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: driver-specific / machine-specific — owners of Lenovo ThinkBook
G8+ with PCI SSID `17aa:38dc`
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record:
- Trigger: boot / audio init on that laptop, then using speaker volume
- Common for those users (every session)
- Not a security trigger; not a race
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record:
- Failure mode: bass speaker volume control does not work (wrong DAC
routing)
- Severity: MEDIUM functionally, but this is an explicit **hardware
quirk** exception that stable routinely takes
- Not a panic/UAF/corruption
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- Benefit: high for affected hardware (makes volume control work); zero
for everyone else
- Risk: very low (1 line, existing fixup, SSID-matched)
- Ratio: strongly favors backport
---
## PHASE 9: FINAL SYNTHESIS
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real hardware bug with bugzilla link
- One-line `SND_PCI_QUIRK` using an existing fixup already in 6.18.57
- ALSA maintainer applied it with no objections
- Same pattern as Yoga Pro 7 14ARP8 in this tree
- Applies cleanly to `v6.18.57`
- Explicit stable exception: audio codec quirks
AGAINST:
- Not a crash/security/data-corruption issue
- Affects one laptop SSID
- Bugzilla body could not be fetched (captcha)
UNRESOLVED:
- Full bugzilla 221799 text
- Whether stable@ already discussed this commit
Those gaps do not outweigh the verified quirk itself.
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — 1-line table entry;
maintainer applied; existing fixup
2. Fixes a real bug that affects users? **PASS** — broken bass volume on
ThinkBook G8+
3. Important issue? **PASS** under the hardware-quirk exception (pin/DAC
routing so speakers are controllable)
4. Small and contained? **PASS** — +1 line, one file
5. No new features or APIs? **PASS** — no new fixup, no new kAPI; device
ID/quirk only
6. Can apply to the local tree? **PASS** — dry-run succeeded on
`v6.18.57`
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Hardware quirk / workaround** (ALSA Realtek `SND_PCI_QUIRK`
for a specific laptop). This is the documented stable exception for
codec quirks.
**Step 9.4: DECISION**
This should be backported to this 6.18.y tree. The driver and fixup are
already here; only the SSID match is missing. That is exactly the class
of change stable takes for laptop audio.
---
### What the commit solves and why it matters
Without the quirk, ThinkBook G8+ (`17aa:38dc`) leaves the bass speaker
pin on a DAC without volume amp, so bass volume cannot be controlled.
The one-line match sends that SSID through
`alc285_fixup_speaker2_to_dac1()`, which is already used for other
Lenovo dual-speaker machines in this tree.
### Stable rules / risk
It is small, obviously correct, introduces no API, and is SSID-scoped.
Apply risk is an offset-only hunk. Benefit is real for users of that
laptop on 6.18.y; risk to other machines is negligible.
### Concerns
None that block backport. Series 2/2 is unrelated. Bugzilla details were
not readable due to captcha, but the code, existing fixup, and
maintainer accept are sufficient.
Verification:
- [Phase 1] Parsed subject/tags: quirk add; bugzilla 221799; Iwai SOB;
no Fixes tag
- [Phase 2] Diff: +1 `SND_PCI_QUIRK(0x17aa, 0x38dc, …,
ALC285_FIXUP_SPEAKER2_TO_DAC1)` in `alc269_fixup_tbl`
- [Phase 2] Read `alc285_fixup_speaker2_to_dac1()` at `alc269.c:2532`:
overrides NID 0x17 conn list to DAC 0x02; chained to
`ALC269_FIXUP_THINKPAD_ACPI`
- [Phase 3] `git merge-base --is-ancestor 4322ac247f4ce v6.18.57` → NO
(not already in 6.18.57)
- [Phase 3] Fixup enum/function present in `v6.18.57` (`alc269.c:3791`,
`:4907`, Yoga Pro 7 use at `:7492`)
- [Phase 3] Similar Lenovo quirk `1a49509885cd9` is an ancestor of
`v6.18.57`
- [Phase 3] Series 2/2 is an independent Acer quirk; not a dependency
- [Phase 4] `b4 dig -c 4322ac247f4ce`: lore/msgid
`20260921124450.639601-1-zhangheng@kylinos.cn`; v1 only
- [Phase 4] `b4 dig -w`: To Iwai, Cc linux-sound
- [Phase 4] mbox: Iwai “Applied both patches. Thanks.”; no NAK
- [Phase 4] UNVERIFIED: bugzilla 221799 body (Anubis/403); stable@
search (Anubis)
- [Phase 5] Table consumed at Realtek codec probe;
`snd_hda_override_conn_list` exists in `v6.18.57`
- [Phase 6] `git describe HEAD` / `make kernelversion`: 6.18.57;
`0x38dc` absent from `v6.18.57` alc269.c
- [Phase 6] `patch --dry-run` of upstream hunk onto `v6.18.57` file:
succeeded at line 7538
- [Phase 8] Failure mode: bass speaker volume broken on one Lenovo SSID;
quirk-scoped
- UNVERIFIED: exact bugzilla reporter comments and whether stable@
already nominated this
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index b1cb93922c3bc..6afb35769f746 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -7572,6 +7572,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x17aa, 0x38d5, "Yoga S990-16 Pro IMH YC Quad", ALC287_FIXUP_TAS2781_I2C),
SND_PCI_QUIRK(0x17aa, 0x38d6, "Yoga S990-16 Pro IMH VECO Quad", ALC287_FIXUP_TAS2781_I2C),
SND_PCI_QUIRK(0x17aa, 0x38d7, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN),
+ SND_PCI_QUIRK(0x17aa, 0x38dc, "Lenovo ThinkBook G8", ALC285_FIXUP_SPEAKER2_TO_DAC1),
SND_PCI_QUIRK(0x17aa, 0x38df, "Yoga Y990 Intel YC Dual", ALC287_FIXUP_TAS2781_I2C),
SND_PCI_QUIRK(0x17aa, 0x38e0, "Yoga Y990 Intel VECO Dual", ALC287_FIXUP_TAS2781_I2C),
SND_PCI_QUIRK(0x17aa, 0x38f8, "Yoga Book 9i", ALC287_FIXUP_TAS2781_I2C),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.15] soundwire: dmi-quirks: add a global ghost list
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (32 preceding siblings ...)
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Add quirk for Lenovo ThinkBook G8+ Sasha Levin
@ 2026-10-19 13:49 ` Sasha Levin
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-6.1] soundwire: dmi-quirks: Disable ghost Realtek on Asus Zenbook Duo Sasha Levin
` (27 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:49 UTC (permalink / raw)
To: patches, stable
Cc: Bard Liao, Charles Keepax, Pierre-Louis Bossart, Vinod Koul,
Sasha Levin, linux-sound, linux-kernel
From: Bard Liao <yung-chuan.liao@linux.intel.com>
[ Upstream commit b7a5d101d7d267922e828c40135bcaccf8cfb3bf ]
Not like other ghost devices, the 0x000000D010010500 ADR doesn't belong
to any codec. We should disable it in all devices.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20260703011656.2572959-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
The local tree is Linux **7.3.0-rc4**. This is a hardware quirk that
disables a bogus SoundWire ACPI `_ADR` on Intel hosts; the same class of
ghost-device quirks has already been treated as stable material.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
- Subsystem prefix: `soundwire: dmi-quirks:`
- Action verb: **add** (adds a global ghost-ADR table)
- Claimed intent: disable ACPI `_ADR` `0x000000D010010500` on every
machine because it is not a real codec
Record: [soundwire/dmi-quirks] [add] [global ghost ADR list to disable a
firmware-invented SoundWire device]
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
- Fixes: **absent** (expected for this review pipeline; not a negative
signal)
- Reported-by: **absent**
- Tested-by: **absent**
- Reviewed-by: Charles Keepax (Cirrus; author of the earlier per-machine
ghost-Realtek quirks); Pierre-Louis Bossart (SoundWire expert)
- Acked-by: **absent**
- Link: `https://patch.msgid.link/20260703011656.2572959-1-yung-
chuan.liao@linux.intel.com`
- Cc: stable: **absent** (expected)
- Signed-off-by: Bard Liao (author, Intel SoundWire); Vinod Koul
(SoundWire maintainer). Ignore any Sasha Levin SOB if present; none is
on this commit.
Record: Author + two subsystem reviewers + maintainer SOB. No
user/syzbot report. No Fixes/Cc-stable.
Step 1.3: ANALYZE THE COMMIT BODY TEXT
The body is two sentences: unlike DMI-matched ghost codecs, `_ADR
0x000000D010010500` does not belong to any codec, so it should be
disabled on all devices. No stack trace, no machine list, no kernel-
version range.
Decoded `_ADR` (MIPI DisCo layout in `include/linux/soundwire/sdw.h`):
link_id=0, version=0, unique_id=0, mfg_id=`0xd010`, part_id=`0x0105`,
class_id=0. That is not a known in-tree codec (Realtek is `0x025d`). It
is firmware garbage, not a real part.
Record: [Bug: ACPI exposes a non-codec SoundWire `_ADR`] [Symptom:
kernel enumerates a phantom slave, which can break machine-driver /
function-topology matching] [No version info] [Root cause: BIOS `_ADR`
is not a real codec; remap to 0 so core skips it]
Step 1.4: DETECT HIDDEN BUG FIXES
Not disguised cleanup. It is an explicit hardware workaround: treat a
bogus ACPI device as missing.
Record: [Not a hidden fix; it is a hardware quirk. Same pattern as
`ghost_realtek[]` remapping to 0.]
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
- File: `drivers/soundwire/dmi-quirks.c` only
- +20 / -1 (21-line change)
- New table `global_ghost_adr[]`; function `sdw_dmi_override_adr()`
updated (`break` → `goto out`, then a global remap loop)
Record: [1 file, +20/-1] [sdw_dmi_override_adr] [single-file surgical
quirk]
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Before: `sdw_dmi_override_adr()` only remapped addresses if DMI matched
`adr_remap_quirk_table`.
After:
1. DMI remap still runs first. On a hit, `goto out` so a machine-
specific remap wins and is not overwritten.
2. Otherwise walk `global_ghost_adr[]`. If `addr == 0x000000D010010500`,
set `addr = 0`.
Caller `find_slave()` in `drivers/soundwire/slave.c` already does `if
(!addr) return false;` (since 2021), so a zero `_ADR` is not enumerated.
Record: [DMI remap still preferred; unmatched 0x000000D010010500 is
forced to 0 and skipped during ACPI slave discovery]
Step 2.3: IDENTIFY THE BUG MECHANISM
Category **(h) hardware workaround**, using the existing remap-to-zero
disable path.
Record: [Hardware quirk] [BIOS lists a fake SoundWire device; remap to 0
so Intel SoundWire enumeration ignores it]
Step 2.4: ASSESS THE FIX QUALITY
Obviously correct: same remap-to-0 used by `ghost_realtek[]`. Pierre-
Louis noted on-list that zero is ignored by existing core logic.
Regression risk is low: only `_ADR 0x000000D010010500` is dropped, and
reviewers state it is not a real codec. `ARRAY_SIZE` includes the `{}`
terminator (one extra compare of `adr==0`); harmless. `goto out` is
required so a DMI remap is not then clobbered by the global list.
Record: [Minimal, obviously correct] [Regression risk: low; worst case
would be disabling a real device with this exact `_ADR`, which the
author/reviewers say does not exist]
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
`sdw_dmi_override_adr()` and remap-to-0 skip date to **6558b667a7297**
(“soundwire: add override addr ops”, 2021-03-22, first in **v5.13**).
File introduced by **f6594cdfec4cd** (v5.12-rc2-2). Per-machine ghost
Realtek disable: **4dab2b904414f** (in **v7.2**).
Record: [Quirk infrastructure since v5.13] [This specific ADR workaround
is new in 7.3; the BIOS bug is not a recent kernel regression]
Step 3.2: FOLLOW THE FIXES: TAG
No Fixes: tag.
Record: [N/A — no Fixes tag] [Buggy “code” is firmware; kernel side is
missing a quirk]
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Related commits on this file: `4dab2b904414f` (ghost Realtek, DMI-
matched), then more ASUS/Lenovo DMI rows, then this global list, then
more per-machine Realtek ghosts. This commit is not patch N/M.
Record: [Same-file ghost-device series, but this patch is standalone]
[No extra kernel commit required for remap-to-0 to work]
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Bard Liao is a regular Intel SoundWire contributor (many
cadence/intel_ace2x commits). Reviewed by Keepax and Bossart; applied by
Vinod Koul.
Record: [Intel SoundWire contributor; patch vetted by subsystem
experts/maintainer]
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Needs `sdw_dmi_override_adr` + `if (!addr) return false` in
`find_slave()` — both present since v5.13. Does not need
`ghost_realtek[]`. Applies standalone on this tree.
Record: [No missing prereqs in this tree] [Standalone]
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
`b4 dig -c b7a5d101d7d26` matched:
https://patch.msgid.link/20260703011656.2572959-1-yung-
chuan.liao@linux.intel.com
`b4 dig -a`: **v1 only**, dated 2026-07-03. Thread (mbox): Bard submit →
Pierre-Louis Reviewed-by (notes zero is ignored by core) → Vinod applied
as `b7a5d101d7d26`. No NAK, no v2.
Record: [lore via b4] [v1 applied as-is] [No NAKs] [No reviewer Cc:
stable] [Keepax Rb already on v1]
Step 4.2: CHECK WHO REVIEWED THE PATCH
`b4 dig -w` recipients: linux-sound, Vinod Koul, Pierre-Louis Bossart,
Peter Ujfalusi, Bard Liao. SoundWire maintainer and Intel SoundWire
people were on To/Cc.
Record: [Vinod (maintainer), Pierre-Louis, linux-sound; Keepax reviewed]
Step 4.3: SEARCH FOR THE BUG REPORT
No Reported-by, bugzilla, or syzbot. Web search only finds this patch
thread. User impact is inferred from the sibling ghost-Realtek commit:
ACPI-listed missing codecs confuse function-topology sound-card
creation.
Record: [No public user bug report for this ADR] [Impact inferred from
the same ghost-device mechanism, which is documented in 4dab2b904414f]
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Standalone 1/1. Later dmi-quirks commits only add more DMI rows for
Realtek ghosts; they do not fix this patch.
Record: [Standalone] [Follow-ups are unrelated extra DMI IDs]
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Direct lore.kernel.org/stable fetch returned 403. Web search found
**AUTOSEL of the sibling** `soundwire: dmi-quirks: Disable ghost Realtek
devices` for **6.18–6.1**, and **no AUTOSEL of this global-ghost
commit** (no Fixes/Cc-stable, so it needs this review).
Record: [Sibling ghost-device quirk was AUTOSEL’d into stable] [This
commit was not auto-picked; that is why it is here] [UNVERIFIED: raw
stable-list HTML]
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: [`sdw_dmi_override_adr`] [new static table `global_ghost_adr`]
Step 5.2: TRACE CALLERS
`sdw_intel_ops.override_adr = sdw_dmi_override_adr` in
`drivers/soundwire/intel_auxdevice.c` only. Invoked from `find_slave()`
during ACPI child walk when Intel SoundWire enumerates slaves.
Record: [Intel SoundWire ACPI enumeration only] [Not IRQ/hot path;
probe/enumeration]
Step 5.3: TRACE CALLEES
`dmi_first_match()`, `dev_dbg()`. No alloc, no locks, no I/O.
Record: [DMI match + debug print + table walk]
Step 5.4: FOLLOW THE CALL CHAIN
Intel SoundWire link probe → ACPI walk → `find_slave()` →
`override_adr()` → skip if 0. Reachable on Intel laptops with SoundWire
+ ACPI (typical modern OEM audio). Unprivileged users do not trigger it
directly; it runs at device probe and can break audio setup.
Record: [Reachable on Intel SoundWire machines at enumeration] [Not a
syscall crash path]
Step 5.5: SEARCH FOR SIMILAR PATTERNS
`ghost_realtek[]` remaps `0x000330025d072201` to 0, but only for DMI-
matched ASUS/Lenovo boards. This patch is the same disable, globally,
for a different `_ADR`.
Record: [Same pattern as in-tree ghost Realtek quirks; this ADR is not
machine-specific]
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
`git describe HEAD` = **v7.3-rc4-27-gf0100363d8c37**; `make
kernelversion` = **7.3.0-rc4**.
`drivers/soundwire/dmi-quirks.c` and `sdw_dmi_override_adr()` are
present. `find_slave()` skips `addr==0`. Without this quirk, a BIOS that
publishes `0x000000D010010500` still enumerates a phantom slave. (`git
merge-base --is-ancestor b7a5d101d7d26 HEAD` is true because this is the
mainline tree that already contains the commit; that is not used as a
“already selected” NO.)
Record: [Yes — Intel SoundWire DMI override path exists] [Firmware bug;
kernel lacked a global skip until 7.3-rc1]
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
On this tree the patch is already the current code. Against the pre-
image (`v7.2` `sdw_dmi_override_adr` is the same shape, only fewer DMI
rows) it would apply with at most context shift in the DMI table. No
API/data-structure change.
Record: [Clean/trivial on this codebase]
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
`ghost_realtek[]` is here but only matches specific DMI IDs and a
different `_ADR`. It does **not** hide `0x000000D010010500`.
Record: [No substitute fix for this ADR]
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
`drivers/soundwire/` — Intel SoundWire master + ACPI quirks. Affects
Intel-laptop audio, not core mm/fs.
Record: [SoundWire / Intel audio] [IMPORTANT for those machines,
PERIPHERAL vs core kernel]
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Active (BRA/BPT, ACE2x, many 7.3 SoundWire commits). dmi-quirks itself
is a mature table of BIOS workarounds dating to 2021.
Record: [Active Intel SoundWire; quirk file is a long-lived table]
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
CONFIG_SOUNDWIRE_INTEL machines whose ACPI includes `_ADR
0x000000D010010500`. Not universal. The author says the ADR is not a
codec, so the quirk is intentionally global rather than DMI-limited.
Record: [Intel SoundWire / config-specific; any OEM BIOS with that
`_ADR`]
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Triggered at SoundWire/ACPI enumeration (boot or audio-controller
probe), not a race. Not userspace-triggered. How common the BIOS entry
is was not documented; Intel submitted it as a global rule, which
implies it is not one SKU.
Record: [Boot/probe on matching firmware] [Unprivileged users are not
the trigger; they see broken or mis-created audio]
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Not a panic/UAF. Failure mode matches the documented ghost-Realtek
issue: phantom ACPI device confuses topology/machine matching → missing
or wrong sound card, probe noise, possible timeouts talking to a device
that is not there. That is a real user-visible audio failure on affected
laptops.
Record: [Broken/misbuilt audio / failed slave probe] [Severity:
MEDIUM–HIGH for affected hardware; not a generic kernel crash]
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Benefit: restores correct enumeration on machines with this BIOS bug;
same class AUTOSEL already accepted for Realtek ghosts. Risk: ~20 lines,
one file, existing 0-skip path, expert review. Global match is slightly
broader than DMI quirks but the `_ADR` is not a real vendor/part.
Record: [Benefit: medium-high for Intel SoundWire laptops] [Risk: very
low] [Favor applying]
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR:
- Hardware quirk/workaround (stable exception category)
- Small, one-file, uses remap-to-0 that core has honored since v5.13
- Reviewed by Keepax and Bossart; applied by Vinod
- Sibling ghost-device dmi-quirks were AUTOSEL’d to 6.1–6.18
- Code and skip-on-zero path exist in this tree
- Standalone; no new API
AGAINST:
- Thin commit message; no public reproducer or Reported-by
- Not a crash/security/corruption bug
- Global (all machines) rather than DMI-scoped
UNRESOLVED:
- Could not fetch lore.kernel.org/stable HTML (403)
- No independent confirmation of how many BIOSes contain this `_ADR`
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? **PASS** — existing mechanism; two
expert reviews; maintainer applied v1
2. Fixes a real bug that affects users? **PASS** — phantom ACPI slave
breaks audio topology/enumeration
3. Important issue? **PASS** as hardware quirk (broken audio on real
Intel laptops), not as a generic panic
4. Small and contained? **PASS** — +20/-1, one file
5. No new features or APIs? **PASS** — table entry + lookup in existing
override hook
6. Can apply to the local tree? **PASS** — `dmi-quirks.c` /
`sdw_dmi_override_adr` / `if (!addr)` all present
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: **Hardware quirk/workaround** (SoundWire DMI/`_ADR` quirk,
equivalent to USB/PCI/codec quirk table entries)
Step 9.4: MAKE YOUR DECISION
This is a textbook stable hardware quirk: surgical, reviewed, uses a
long-standing disable path, and fixes real OEM firmware that would
otherwise present a fake SoundWire device to audio matching. The missing
Fixes/Cc-stable tags are why it needs review, not a reason to drop it.
Verification:
- [Phase 1] Tags: Reviewed-by Keepax + Bossart; Link msgid; no
Fixes/Reported-by/Cc-stable
- [Phase 1] ADR decode: mfg_id 0xd010 / part_id 0x0105 / class 0 — not
an in-tree codec
- [Phase 2] Diff: +20/-1 in `dmi-quirks.c`; `sdw_dmi_override_adr`
remaps 0x000000D010010500 → 0
- [Phase 2] `slave.c` `if (!addr) return false` confirmed at lines
125–129
- [Phase 3] override/zero-skip: 6558b667a7297 (v5.13); dmi-quirks file:
f6594cdfec4cd; ghost_realtek: 4dab2b904414f (v7.2)
- [Phase 3] `git merge-base --is-ancestor b7a5d101d7d26 v7.2` → not in
v7.2; in v7.3-rc1 via soundwire-7.3-rc1
- [Phase 3] `git describe HEAD` = v7.3-rc4-27-gf0100363d8c37; `make
kernelversion` = 7.3.0-rc4
- [Phase 4] `b4 dig -c/-a/-w/-m`: v1 only; Pierre-Louis Rb + zero-skip
note; Vinod applied; no NAK
- [Phase 4] lore WebFetch 403; used b4 mbox instead
- [Phase 4] Web search: sibling “Disable ghost Realtek devices” AUTOSEL
6.18–6.1; this commit not AUTOSEL’d
- [Phase 5] Only hooked from `intel_auxdevice.c`
`sdw_intel_ops.override_adr`
- [Phase 6] Local `dmi-quirks.c` already contains `global_ghost_adr`;
`ghost_realtek[]` does not cover this ADR
- [Phase 8] Failure mode: phantom slave at Intel SoundWire probe → audio
topology/machine mismatch, not oops
- UNVERIFIED: how many machines ship this `_ADR`; stable-list HTML
beyond web snippets
The patch is a small Intel SoundWire hardware quirk, it matches stable
rules, and the local tree has the code it needs.
**YES**
drivers/soundwire/dmi-quirks.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/soundwire/dmi-quirks.c b/drivers/soundwire/dmi-quirks.c
index 2a98fc8c104d6..62cee6e2179da 100644
--- a/drivers/soundwire/dmi-quirks.c
+++ b/drivers/soundwire/dmi-quirks.c
@@ -15,6 +15,14 @@ struct adr_remap {
u64 remapped_adr;
};
+static const struct adr_remap global_ghost_adr[] = {
+ {
+ 0x000000D010010500ull,
+ 0x0000000000000000ull
+ },
+ {}
+};
+
/*
* Some TigerLake devices based on an initial Intel BIOS do not expose
* the correct _ADR in the DSDT.
@@ -212,6 +220,7 @@ static const struct dmi_system_id adr_remap_quirk_table[] = {
u64 sdw_dmi_override_adr(struct sdw_bus *bus, u64 addr)
{
const struct dmi_system_id *dmi_id;
+ int i;
/* check if any address remap quirk applies */
dmi_id = dmi_first_match(adr_remap_quirk_table);
@@ -223,10 +232,20 @@ u64 sdw_dmi_override_adr(struct sdw_bus *bus, u64 addr)
dev_dbg(bus->dev, "remapped _ADR 0x%llx as 0x%llx\n",
addr, map->remapped_adr);
addr = map->remapped_adr;
- break;
+ goto out;
}
}
}
+ /* remap the ghost ADRs */
+ for (i = 0; i < ARRAY_SIZE(global_ghost_adr); i++) {
+ if (global_ghost_adr[i].adr == addr) {
+ dev_dbg(bus->dev, "remapped _ADR 0x%llx as 0x%llx\n",
+ addr, global_ghost_adr[i].remapped_adr);
+ addr = global_ghost_adr[i].remapped_adr;
+ break;
+ }
+ }
+out:
return addr;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.1] soundwire: dmi-quirks: Disable ghost Realtek on Asus Zenbook Duo
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (33 preceding siblings ...)
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-5.15] soundwire: dmi-quirks: add a global ghost list Sasha Levin
@ 2026-10-19 13:49 ` Sasha Levin
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add mute LED quirk for HP Victus 15-fb2xxx Sasha Levin
` (26 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:49 UTC (permalink / raw)
To: patches, stable
Cc: Charles Keepax, Pierre-Louis Bossart, Vinod Koul, Sasha Levin,
yung-chuan.liao, linux-sound, linux-kernel
From: Charles Keepax <ckeepax@opensource.cirrus.com>
[ Upstream commit ca02ffd4975ca5249abf0cfb750a495d23b453ee ]
The Asus Zenbook Duo also has a Realtek device in the ACPI that
doesn't exist in the physical hardware. This confuses the machine
driver into attempting to create DAI links for the device. Add a
quirk to remove this device.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20260720095741.3592825-1-ckeepax@opensource.cirrus.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a DMI hardware quirk for this 6.12 tree. The `ghost_realtek`
remap table is already here; the commit only adds board `UX8407AA`.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: **[soundwire / dmi-quirks] [Disable] Disable ghost Realtek on
Asus Zenbook Duo.** “Disable” is a bug-fix verb: stop enumerating a non-
existent ACPI codec.
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- Signed-off-by: Charles Keepax (author)
- Reviewed-by: Pierre-Louis Bossart (SoundWire/Intel audio)
- Link: https://patch.msgid.link/20260720095741.3592825-1-
ckeepax@opensource.cirrus.com
- Signed-off-by: Vinod Koul (SoundWire maintainer; applied as
`ca02ffd4975c`)
- No Fixes:, Reported-by:, Tested-by:, Cc: stable (absence expected)
- Ignore pipeline SOBs/Upstream markers
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- Bug: Asus Zenbook Duo ACPI lists a Realtek SoundWire device that is
not on the board.
- Symptom: machine driver tries to create DAI links for that ghost codec
→ wrong/broken sound card.
- Root cause: firmware _ADR for a phantom RT722 (same class as UX5406AA
/ Lenovo entries already in this tree).
- No stack trace; hardware/firmware description.
Step 1.4: DETECT HIDDEN BUG FIXES
Record: Not a disguised cleanup. It is an explicit hardware quirk.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- File: `drivers/soundwire/dmi-quirks.c` (+7 / −0)
- Function/data: `adr_remap_quirk_table[]` only
- Scope: single-file surgical DMI entry
- New match: `DMI_SYS_VENDOR "ASUS"` + `DMI_BOARD_NAME "UX8407AA"` →
existing `ghost_realtek`
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record: Before, UX8407AA was not in the table, so ACPI _ADR
`0x000330025d072201` (RT722 on link3) was used as-is. After, that _ADR
is remapped to `0`, so `find_slave()` skips the device.
Step 2.3: IDENTIFY THE BUG MECHANISM
Record: **Hardware workaround (DMI quirk).** Same `ghost_realtek` map
already in tree:
```97:104:drivers/soundwire/dmi-quirks.c
static const struct adr_remap ghost_realtek[] = {
/* rt722 on link3 */
{
0x000330025d072201ull,
0x0000000000000000ull
},
{}
};
```
`sdw_dmi_override_adr()` applies that map. `find_slave()` then drops a
zero address:
```109:113:drivers/soundwire/slave.c
if (bus->ops->override_adr)
addr = bus->ops->override_adr(bus, addr);
if (!addr)
return false;
```
Intel ops already wire this (`override_adr = sdw_dmi_override_adr` in
`intel_auxdevice.c`). `intel_init.c` builds `ctx->ids` from registered
slaves, so SOF machine select in `hda_sdw_machine_select()` never sees
the ghost.
Step 2.4: ASSESS THE FIX QUALITY
Record: Copy of existing ASUS/Lenovo rows; DMI-gated; no
API/locking/hot-path change. Regression risk is limited to mis-matched
board strings on UX8407AA only.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record: PTL `ghost_realtek` rows come from `30e7fb61a64ba` (“Disable
ghost Realtek devices”), backport of upstream `4dab2b904414` (Charles
Keepax, 2026-05-20). Already in this tree. UX8407AA is not.
Step 3.2: FOLLOW THE FIXES: TAG
Record: No Fixes: tag. Introduced bug is firmware, not a kernel commit.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record: Recent `dmi-quirks.c` history is quirk additions. Sibling IDs
already here: UX5406AA, Lenovo 83QK, 83SF. Upstream context also has
B9406CAA; that ID is **not** in this tree and is **not** required for
UX8407AA.
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record: Charles Keepax is a regular SoundWire/ASoC contributor (Cirrus).
Same author added the original `ghost_realtek` table. Reviewed by
Pierre-Louis Bossart; applied by Vinod Koul.
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record: Needs `ghost_realtek` + `sdw_dmi_override_adr` + Intel
`override_adr`. All present (`30e7fb61a64ba`). Standalone; not patch
x/y. Original May 2026 series (ptl-match Chrome matches, then
ghost_realtek) is independent of this July follow-up.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- `b4 dig -c ca02ffd4975c` → https://patch.msgid.link/20260720095741.359
2825-1-ckeepax@opensource.cirrus.com
- `b4 dig -a`: single v1, no later revision
- Pierre-Louis Bossart: Reviewed-by; noted this will keep happening as
more BIOS bugs ship; not a NAK
- Vinod Koul: Applied, thanks
- No NAKs, no Cc: stable in review (not a negative)
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record: To Vinod Koul; Cc Yung-Chuan Liao, Pierre-Louis Bossart, linux-
sound, linux-kernel, Cirrus patches. Appropriate maintainers.
Step 4.3: SEARCH FOR THE BUG REPORT
Record: No syzbot/bugzilla. Author report of shipping ACPI. Same
firmware class as quirks already in 6.12. Related AUTOSEL for 6.12:
`platform/x86: asus-nb-wmi: add DMI quirk for ASUS Zenbook Duo UX8407AA`
— this SKU is already treated as 6.12-relevant.
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Standalone 1/1. Follow-up to `4dab2b904414` / `30e7fb61a64ba`,
already here.
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: **UNVERIFIED** — lore.kernel.org/stable returned 403. No
evidence this was rejected for stable.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: No function body change. Data: `adr_remap_quirk_table`.
Consumer: `sdw_dmi_override_adr()`.
Step 5.2: TRACE CALLERS
Record:
- `sdw_dmi_override_adr` ← Intel `sdw_intel_ops.override_adr`
- `find_slave()` during ACPI slave walk
- Boot/probe only, Intel SoundWire platforms with matching DMI
Step 5.3: TRACE CALLEES
Record: `dmi_first_match()`, remap loop, `dev_dbg()`. No alloc/locks.
Step 5.4: FOLLOW THE CALL CHAIN
Record: Reachable at SoundWire probe on UX8407AA. Not a syscall UAF;
broken audio on that laptop. `hda_sdw_machine_select()` uses
`hdev->sdw->ids` from registered slaves, so skipping the ghost changes
machine matching and DAI-link construction.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Same pattern already used for UX5406AA and two Lenovo SKUs. This
extends that list.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record:
- Tree: **pending-6.12**, `make kernelversion` = **6.12.111**
(`p-6.12-2-gd38d58a4e0359`)
- `drivers/soundwire/dmi-quirks.c` present; `ghost_realtek` present;
UX8407AA **absent**
- PTL SOF support present (`pci-ptl.c`, `soc-acpi-intel-ptl-match.c`
with RT722 link0/link3)
- Mechanism that makes a zero _ADR drop the slave is present
- Candidate `ca02ffd4975c` is **not** an ancestor of HEAD (expected)
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record: Lore hunk (insert before first LENOVO `ghost_realtek` row)
**`git apply --check` clean**. Full upstream context mentioning B9406CAA
is not required. Difficulty: **clean apply**.
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: Generic ghost-Realtek table yes; this board ID no. No substitute
UX8407AA SoundWire quirk.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: **soundwire DMI quirks** (Intel laptop audio). **IMPORTANT** for
those machines; DMI-gated so not CORE-wide.
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: Mature quirk table (since ~2021) with ongoing DMI additions.
This is the usual enablement pattern, not a new subsystem.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: **Driver/platform-specific**: ASUS board UX8407AA (Zenbook Duo).
Everyone else unchanged.
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: Every boot/probe on that DMI. No race. Unprivileged users get
broken audio; they cannot trigger it on other machines.
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record: Wrong DAI links / wrong SOF machine (e.g. matching
`ptl_rt722_l3` on a ghost RT722) or probe of a codec that is not there.
**HIGH** for that SKU (no/wrong audio), not a panic.
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record:
- Benefit: audio enumeration correct on a shipping PTL laptop; same
class as quirks already in 6.12
- Risk: very low (7 lines, DMI-gated, existing table)
- Ratio: strongly favors backport
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR:
- Hardware quirk / DMI ID on an existing driver — stable exception
- Real firmware bug: ghost Realtek in ACPI
- User-visible: machine driver builds DAI links for hardware that does
not exist
- +7 lines, copy of existing entries
- `ghost_realtek` + Intel override path already in 6.12.111
- Applies cleanly
- Reviewed by Bossart, applied by Koul
- Same author/table as UX5406AA already in this tree
- PTL SoundWire/SOF present
- Zero blast radius off that DMI match
AGAINST:
- One laptop SKU
- No Reported-by/syzbot (normal for DMI quirks)
- PTL match table in 6.12 is still mostly RT711/RT722 (function-topology
DAI building is stronger on later/ARL paths); the skip still prevents
ghost-slave probe and false `ptl_rt722_l3` match
- lore.kernel.org/stable search 403
UNRESOLVED:
- Exact UX8407AA DMI strings not independently dumped
- Stable-list discussion not fetched (HTTP 403)
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? **PASS** — identical to existing rows;
maintainer Reviewed-by/applied
2. Fixes a real bug that affects users? **PASS** — ghost ACPI codec
breaks card/DAI setup
3. Important issue? **PASS** — broken audio on a shipping laptop (HIGH
for that SKU)
4. Small and contained? **PASS** — 7 lines, one table
5. No new features or APIs? **PASS** — DMI quirk only
6. Can apply to the local tree? **PASS** — lore hunk applies;
prerequisites present
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: **Hardware quirk / DMI workaround** on an existing SoundWire
quirk table.
Step 9.4: MAKE YOUR DECISION
This belongs on 6.12.y. The bug exists here, the fix is the established
DMI pattern, and it does not depend on B9406CAA or later function-
topology work.
------------------------------------------------
What problem it solves for this tree
------------------------------------------------
Asus Zenbook Duo UX8407AA ships ACPI for a Realtek RT722 on SoundWire
link3 that is not physically present. Without the quirk, Intel SoundWire
registers that slave, SOF machine select can treat it as real, and
`sof_sdw` can create DAI links for it. Remapping that _ADR to 0 drops
the ghost device. The remap table and call path are already in 6.12.111;
this only names the board.
Risk vs benefit
------------------------------------------------
Benefit is working (or at least not mis-probed) audio on that SKU. Risk
is a DMI-only table row. No new APIs, no locking, no cross-subsystem
change.
Concerns
------------------------------------------------
None that block backport. B9406CAA in some upstream context is a
different board and is not a prerequisite. Apply is clean with the lore
hunk.
Verification:
- [Phase 1] Parsed subject/tags from the provided message; no
Fixes/syzbot; Reviewed-by Bossart; Link msgid 20260720095741.3592825-1
- [Phase 2] Diff is +7 lines in `adr_remap_quirk_table`; `ghost_realtek`
maps RT722 link3 `_ADR` to 0
- [Phase 2] Confirmed `find_slave()` returns false on `!addr`; Intel ops
set `override_adr`
- [Phase 3] `git blame` PTL block → `30e7fb61a64ba` (backport of
`4dab2b904414`); UX8407AA not present
- [Phase 3] `git merge-base --is-ancestor 30e7fb61a64ba HEAD` → yes;
`ca02ffd4975c` → no
- [Phase 3] Author history in `drivers/soundwire/` includes the original
ghost-Realtek quirk
- [Phase 4] `b4 dig -c ca02ffd4975c` → lore msgid; `-a` v1 only; `-w`
Vinod/Bossart/linux-sound
- [Phase 4] Patchew/openwall: Bossart Reviewed-by; Vinod applied
`ca02ffd4975c`
- [Phase 4] WebSearch: related 6.12 AUTOSEL asus-nb-wmi quirk for
UX8407AA
- [Phase 5] Callers: `sdw_dmi_override_adr` ← `find_slave` ← Intel
probe; `ctx->ids` from registered slaves
- [Phase 6] `git describe HEAD` p-6.12-2; `make kernelversion` 6.12.111;
PTL SOF files present
- [Phase 6] `git apply --check` of lore hunk: clean
- [Phase 8] Failure mode: wrong DAI links / ghost codec probe; DMI-gated
- UNVERIFIED: lore.kernel.org/stable search (403); live DMI dump of
UX8407AA
The patch is a small, existing-pattern DMI quirk; prerequisites are in
this tree and it applies cleanly.
**YES**
drivers/soundwire/dmi-quirks.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/soundwire/dmi-quirks.c b/drivers/soundwire/dmi-quirks.c
index 62cee6e2179da..f738e547a1f30 100644
--- a/drivers/soundwire/dmi-quirks.c
+++ b/drivers/soundwire/dmi-quirks.c
@@ -200,6 +200,13 @@ static const struct dmi_system_id adr_remap_quirk_table[] = {
},
.driver_data = (void *)ghost_realtek,
},
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUS"),
+ DMI_MATCH(DMI_BOARD_NAME, "UX8407AA"),
+ },
+ .driver_data = (void *)ghost_realtek,
+ },
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add mute LED quirk for HP Victus 15-fb2xxx
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (34 preceding siblings ...)
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-6.1] soundwire: dmi-quirks: Disable ghost Realtek on Asus Zenbook Duo Sasha Levin
@ 2026-10-19 13:49 ` Sasha Levin
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/intel: Add sanity check for BAR0 size Sasha Levin
` (25 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:49 UTC (permalink / raw)
To: patches, stable
Cc: Krish Gulati, erph.briones27, Takashi Iwai, Sasha Levin, perex,
tiwai, linux-sound, linux-kernel
From: Krish Gulati <krishgulati7@gmail.com>
[ Upstream commit c748c42abb9b549fc79c41ea55e1f220eadb60ec ]
The HP Victus 15-fb2xxx (PCI SSID 103c:8c2f) with the ALC245 codec
does not turn on the mute LED when audio is muted.
Add a quirk entry to enable it.
Reported-by: erph.briones27@gmail.com
Link: https://bugzilla.kernel.org/show_bug.cgi?id=221946
Signed-off-by: Krish Gulati <krishgulati7@gmail.com>
Tested-by: Raphael Briones <erph.briones27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260921131728.8999-1-krishgulati7@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a one-line HP Realtek mute-LED quirk for an existing fixup. The
local tree is **6.18.57** (`v6.18.57-155-gcdf239ca885b2`). The bug
exists here: SSID `103c:8c2f` is not in `v6.18.57`, while
`ALC245_FIXUP_HP_MUTE_LED_COEFBIT` and sibling Victus entries already
are.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: **[ALSA: hda/realtek]** **[Add]** one-line PCI SSID quirk so the
HP Victus 15-fb2xxx mute LED works.
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- **Reported-by:** erph.briones27@gmail.com (real user hit it)
- **Link:** https://bugzilla.kernel.org/show_bug.cgi?id=221946 (user bug
report)
- **Link:**
https://patch.msgid.link/20260921131728.8999-1-krishgulati7@gmail.com
(submission)
- **Tested-by:** Raphael Briones \<erph.briones27@gmail.com\> (reporter
verified the fix)
- **Signed-off-by:** Krish Gulati \<krishgulati7@gmail.com\> (author)
- **Signed-off-by:** Takashi Iwai \<tiwai@suse.de\> (ALSA maintainer)
- No **Fixes:** tag (expected)
- No original **Cc: stable** (expected; not a negative)
- Pipeline `[Upstream commit c748c42abb9b549fc79c41ea55e1f220eadb60ec]`
and Sasha Levin SOB ignored per instructions
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- **Bug:** HP Victus 15-fb2xxx, PCI SSID `103c:8c2f`, ALC245 codec, mute
LED stays off when audio is muted.
- **Symptom:** mute LED does not light (hardware indicator broken; audio
itself is not described as broken).
- **Root cause (author):** this SSID is missing from the Realtek quirk
table, so the existing ALC245 mute-LED coefbit fixup is never
selected.
- **Version info:** none in the message. Reporter later said they tested
on kernel 7.2.6-1-cachyos (from the lore thread, not the commit body).
Step 1.4: DETECT HIDDEN BUG FIXES
Record: Not a hidden fix. It is an explicit hardware quirk. Same class
as the documented stable exception for `SND_PCI_QUIRK` / HDA codec
quirks.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- **File:** `sound/hda/codecs/realtek/alc269.c` (+1 / −0)
- **Function/data:** `alc269_fixup_tbl[]` only
- **Scope:** single-file, surgical, one table entry
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record:
- **Before:** `snd_hda_pick_fixup()` walks `alc269_fixup_tbl` at
ALC269-family probe. SSID `103c:8c2f` does not match, so no mute-LED
coefbit setup runs.
- **After:** that SSID maps to `ALC245_FIXUP_HP_MUTE_LED_COEFBIT`, which
calls `alc245_fixup_hp_mute_led_coefbit()` on
`HDA_FIXUP_ACT_PRE_PROBE` and registers the mute LED cdev via
`snd_hda_gen_add_mute_led_cdev()`.
- **Path:** device probe / codec init only, and only for this SSID.
Step 2.3: IDENTIFY THE BUG MECHANISM
Record:
- **Category:** hardware workaround / existing-driver quirk (h)
- **Mechanism:** ALC245 mute LED on this HP board is driven by codec
coef 0x0b bits, not the generic path. Without the quirk, the LED never
turns on. The patch does not invent that logic; it reuses
`alc245_fixup_hp_mute_led_coefbit()` already used by nearby Victus IDs
(`0x8c30` 15-fb1xxx, `0x8c2d` 15-fa1xxx, `0x8d07` another 15-fb2xxx
board).
Verified fixup body in this tree:
```1566:1579:sound/hda/codecs/realtek/alc269.c
static void alc245_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{
struct alc_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->mute_led_polarity = 0;
spec->mute_led_coef.idx = 0x0b;
spec->mute_led_coef.mask = 3 << 2;
spec->mute_led_coef.on = 2 << 2;
spec->mute_led_coef.off = 1 << 2;
snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
}
}
```
Step 2.4: ASSESS THE FIX QUALITY
Record:
- Obviously correct: one `SND_PCI_QUIRK(0x103c, 0x8c2f, ...,
ALC245_FIXUP_HP_MUTE_LED_COEFBIT)` in SSID order between `0x8c2d` and
`0x8c30`.
- `SND_PCI_QUIRK` uses `_SND_PCI_QUIRK_ID(vend, dev)` with
`subdevice_mask = 0xffff`, so it matches only this exact SSID.
- Regression risk is very low: no locking, no API, no shared-path logic
change. Wrong-board risk is limited to `103c:8c2f`. Reporter tested
both hardware mute key and software mixer.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record:
- Insertion sits between existing HP entries. Neighbor `0x8c30` “HP
Victus 15-fb1xxx” comes from `b474f60f6a0c9` (“Enable Mute Led for HP
Victus 15-fb1xxx”, 2024-09-04), present in this tree.
- Mute-LED coefbit helper itself dates to `22c7f77247a84` (“Support mute
led function for HP platform”, 2025-04-02), ancestor of `v6.18.57`.
- This is long-lived driver infrastructure, not post-6.18 code.
Step 3.2: FOLLOW THE FIXES: TAG
Record: No `Fixes:` tag. Not applicable. The “bug” is a missing SSID for
hardware that already existed; there is no introducing-commit in the
usual sense.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record:
- Related: `ce174b48aebb3` “Add mute LED support for HP Victus
15-fb2xxx” added **`0x8d07`** (MB 8D07), not `0x8c2f`. That earlier
patch even had `Cc: stable@vger.kernel.org`. Same product line,
different motherboard SSID.
- `v6.18.57` already has `0x8d07` and `0x8c30`. `0x8c2f` is the missing
sibling.
- Standalone: not patch X/Y. One table line, no series.
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record: Krish Gulati has this one Realtek commit in this tree. Not the
subsystem maintainer. Weight comes from Takashi Iwai applying it and
from the reporter’s `Tested-by`.
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record:
- Needed pieces in `v6.18.57`: `alc269.c`, `alc269_fixup_tbl`, enum
`ALC245_FIXUP_HP_MUTE_LED_COEFBIT`,
`alc245_fixup_hp_mute_led_coefbit()`, `snd_hda_pick_fixup()`.
- Confirmed present via `git grep` on `v6.18.57`.
- Can apply standalone.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- `b4 dig -c c748c42abb9b549fc79c41ea55e1f220eadb60ec` →
https://patch.msgid.link/20260921131728.8999-1-krishgulati7@gmail.com
- `b4 dig -a`: **v1 only**, 2026-09-21. No later revision.
- Thread:
1. Krish Gulati submits the one-line quirk.
2. Raphael Briones (reporter): applied on HP Victus 15-fb2xxx, ALC245,
SSID `103c:8c2f`, kernel 7.2.6-1-cachyos; mute LED works with
hardware key and software mixer. `Tested-by` given.
3. Takashi Iwai (2026-09-28): “Applied now. Thanks.” No NAK, no stable
objection.
- Lore HTML fetch returned 403 (Anubis). Thread recovered via `b4 dig
-m`.
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record (`b4 dig -w`): To/Cc included Jaroslav Kysela, Takashi Iwai,
linux-sound, Realtek’s Kailang Yang, and the reporter. Maintainer
applied it. No NAK.
Step 4.3: SEARCH FOR THE BUG REPORT
Record: Bugzilla 221946 is cited. Direct HTTP fetch was blocked by
Anubis (403). Primary evidence of user impact is the lore `Tested-by` on
the exact SSID, which is verified.
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Standalone v1. Precedent: `ce174b48aebb3` did the same for
15-fb2xxx SSID `0x8d07` and nominated stable.
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: lore.kernel.org/stable HTML search also 403. UNVERIFIED whether
stable@ discussed this exact `0x8c2f` patch. The sibling `0x8d07` change
was explicitly Cc’d to stable, which is verified from git.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: No function body changed. Data: `alc269_fixup_tbl[]`. Runtime
path: `snd_hda_pick_fixup()` → `ALC245_FIXUP_HP_MUTE_LED_COEFBIT` →
`alc245_fixup_hp_mute_led_coefbit()`.
Step 5.2: TRACE CALLERS
Record:
- `alc269_fixup_tbl` is passed from ALC269-family probe in `alc269.c`
(`snd_hda_pick_fixup(codec, alc269_fixup_models, alc269_fixup_tbl,
alc269_fixups)` around line 8557).
- Called during HD-audio codec probe, not IRQ/hot path.
- Impact surface is this one PCI subsystem ID.
Step 5.3: TRACE CALLEES
Record: `alc245_fixup_hp_mute_led_coefbit()` writes `spec->mute_led_*`
and calls `snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set)`.
Existing, already used by many HP entries in this tree.
Step 5.4: FOLLOW THE CALL CHAIN
Record: Userspace-reachable on machines with this laptop: codec probe at
boot, then mute LED updates when the user mutes. Not a syscall crash
path. Real user-visible hardware behavior.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Same `ALC245_FIXUP_HP_MUTE_LED_COEFBIT` already used for many HP
Victus SSIDs in `v6.18.57` (`0x88ee`, `0x8a25`, `0x8a26`, `0x8a4f`,
`0x8a50`, `0x8bbe`, `0x8bc8`, `0x8c2d`, `0x8c30`, `0x8d07`, …). This is
the established pattern, not a one-off experiment.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record:
- Local tree: **Linux 6.18.57** (`git describe HEAD` =
`v6.18.57-155-gcdf239ca885b2`, `VERSION/PATCHLEVEL/SUBLEVEL` =
6/18/57).
- `v6.18.57` **does not** contain `0x8c2f` (`git grep 0x8c2f v6.18.57 --
sound/hda/codecs/realtek/alc269.c` empty).
- `v6.18.57` **does** contain the insertion neighbors `0x8c2d` and
`0x8c30`, and the fixup enum/function.
- Bug is a missing quirk for hardware that this driver already supports.
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record:
- Mainline context after the new line includes `0x8c3f`, which is
**not** in `v6.18.57` (8c2d is immediately followed by 8c30).
- Applying to `v6.18.57` is a trivial one-line insert between those two
existing entries (minor context fuzz, not a semantic conflict).
- File path `sound/hda/codecs/realtek/alc269.c` already exists here
(Realtek split commit `aeeb85f26c3bbe` is in 6.18).
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: `0x8d07` “HP Victus 15-fb2xxx (MB 8D07)” is already in
`v6.18.57`. That does **not** cover `0x8c2f`. No other fix for this SSID
in 6.18.57.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: **ALSA HD-audio / Realtek codec** (`sound/hda/codecs/realtek/`).
**IMPORTANT** for laptop audio, not core mm/scheduler. Quirk tables in
this driver are a standard stable target.
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: Actively receiving similar one-line HP mute-LED quirks
(Pavilion, Victus, EliteBook). Mature table, same pattern repeated. This
is not experimental code.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: Driver/config-specific: `CONFIG_SND_HDA_CODEC_REALTEK` users
with PCI audio SSID **103c:8c2f** (HP Victus 15-fb2xxx). No effect on
other machines.
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: Every boot on that laptop: mute LED stays dark when mute is
engaged. Unprivileged users notice it; not a security trigger. Reporter
reproduced it on real hardware.
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record: Mute LED does not light. **MEDIUM** functionally (broken
hardware indicator, not oops/corruption). Still qualifies under the
**hardware quirk exception**, which stable explicitly takes.
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record:
- **Benefit:** high for owners of this common HP gaming laptop; restores
LED using the same path already shipping for sibling Victus boards.
Precedent: 8d07 was sent to stable.
- **Risk:** very low (1 line, exact SSID match, existing fixup).
- **Ratio:** strongly favors backport.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
**FOR:**
- Real user bug + Tested-by on the exact SSID
- Maintainer applied (Takashi Iwai)
- One-line `SND_PCI_QUIRK` — classic stable exception
- Fixup and neighboring Victus entries already in 6.18.57
- Sibling 15-fb2xxx `0x8d07` quirk was Cc:stable
- No new API, no new function, no shared-path logic change
**AGAINST:**
- Not a crash/security/corruption fix (mute LED only)
- Mainline context line `0x8c3f` is absent here (trivial fuzz)
**UNRESOLVED:**
- Bugzilla 221946 page body (HTTP 403)
- Whether stable@ already discussed this exact hash (HTTP 403)
Those gaps do not change the decision: lore + git already show a tested,
maintainer-accepted quirk whose prerequisites are in this tree.
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? **PASS** — 1-line SSID add; reporter
tested; maintainer applied
2. Fixes a real bug that affects users? **PASS** — mute LED broken on HP
Victus 15-fb2xxx `103c:8c2f`
3. Important issue? **PASS** under hardware-quirk exception (severity
MEDIUM as a crash class, but explicit stable exception)
4. Small and contained? **PASS** — +1 line, one table
5. No new features or APIs? **PASS** — enables existing fixup for one
more ID
6. Can apply to the local tree? **PASS** — file, table, and fixup exist
in `v6.18.57`; insert between `0x8c2d` and `0x8c30`
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: **Hardware quirk / SND_PCI_QUIRK for an existing HDA Realtek
driver.** This is the documented YES class (audio codec quirks for
specific laptop models).
Step 9.4: MAKE YOUR DECISION
Backport. The 6.18.y driver already has the mute-LED machinery and other
Victus SSIDs; this only names the missing `103c:8c2f` board.
What problem it solves: on HP Victus 15-fb2xxx (`103c:8c2f`, ALC245) the
mute LED never turns on because the SSID is absent from
`alc269_fixup_tbl`. Adding the existing
`ALC245_FIXUP_HP_MUTE_LED_COEFBIT` entry enables the LED. That matters
to stable users of this laptop and does not change any other machine.
Risk vs benefit: benefit is restoring a user-visible LED on a current HP
model; risk is a single exact-SSID table line. Neighbor `0x8d07` for the
same product name already went to stable.
Concerns: apply context may need dropping the mainline `0x8c3f` line;
that is a one-line mechanical insert, not a semantic dependency.
Verification:
- [Phase 1] Parsed tags: Reported-by, Tested-by (same user), bugzilla
221946, maintainer SOB Takashi Iwai
- [Phase 2] Diff: +1 `SND_PCI_QUIRK(0x103c, 0x8c2f, ...
ALC245_FIXUP_HP_MUTE_LED_COEFBIT)` in `alc269_fixup_tbl`
- [Phase 2] `SND_PCI_QUIRK` uses `subdevice_mask = 0xffff`
(`include/sound/core.h`) — exact SSID only
- [Phase 2] Read `alc245_fixup_hp_mute_led_coefbit()` at alc269.c:1566 —
existing coef 0x0b LED setup
- [Phase 3] `git describe HEAD` / Makefile: this tree is 6.18.57
- [Phase 3] `git merge-base --is-ancestor 22c7f77247a84 v6.18.57` —
fixup helper is in 6.18.57
- [Phase 3] `git grep 0x8c2f v6.18.57 --
sound/hda/codecs/realtek/alc269.c` — empty; bug present
- [Phase 3] `git grep` on v6.18.57: `0x8c2d`, `0x8c30`, `0x8d07`,
`ALC245_FIXUP_HP_MUTE_LED_COEFBIT` all present
- [Phase 3] `ce174b48aebb3` is a different SSID (`0x8d07`) for the same
product line, Cc:stable
- [Phase 4] `b4 dig -c c748c42...`: lore
https://patch.msgid.link/20260921131728.8999-1-krishgulati7@gmail.com
- [Phase 4] `b4 dig -a`: v1 only
- [Phase 4] `b4 dig -w`: linux-sound + Takashi Iwai + Jaroslav Kysela
- [Phase 4] mbox: reporter Tested-by on 103c:8c2f; Iwai “Applied now”;
no NAK
- [Phase 4] UNVERIFIED: bugzilla HTML and stable@ lore (HTTP 403 /
Anubis)
- [Phase 5] `alc269_fixup_tbl` selected from codec probe via
`snd_hda_pick_fixup()` (alc269.c ~8557)
- [Phase 6] v6.18.57 table has 8c2d then 8c30; 8c3f not in this series —
trivial context adjust
- [Phase 8] Failure mode: mute LED dark; severity MEDIUM; quirk
exception applies
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 0a3df8b78aae6..4eefd5d87f04b 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -7004,6 +7004,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8c17, "HP Spectre x360 2-in-1 Laptop 16-aa0xxx", ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX),
SND_PCI_QUIRK(0x103c, 0x8c21, "HP Pavilion Plus Laptop 14-ey0XXX", ALC245_FIXUP_HP_X360_MUTE_LEDS),
SND_PCI_QUIRK(0x103c, 0x8c2d, "HP Victus 15-fa1xxx (MB 8C2D)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
+ SND_PCI_QUIRK(0x103c, 0x8c2f, "HP Victus 15-fb2xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
SND_PCI_QUIRK(0x103c, 0x8c30, "HP Victus 15-fb1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
SND_PCI_QUIRK(0x103c, 0x8c3f, "HP Victus 15-fa1xxx (MB 8C3F)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
SND_PCI_QUIRK(0x103c, 0x8c46, "HP EliteBook 830 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.10] ALSA: hda/intel: Add sanity check for BAR0 size
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (35 preceding siblings ...)
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add mute LED quirk for HP Victus 15-fb2xxx Sasha Levin
@ 2026-10-19 13:49 ` Sasha Levin
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-6.1] ASoC: amd: yc: Add DMI entry for Alienware m18 R1 AMD Sasha Levin
` (24 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:49 UTC (permalink / raw)
To: patches, stable
Cc: Takashi Iwai, syzbot+10cd2d1efe8eeb604bee,
syzbot+5ebe7cd17e48b4293660, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Takashi Iwai <tiwai@suse.de>
[ Upstream commit 9895573b0185f922be4cf500a0f2e5b9560ab1c3 ]
The recent reports from syzkaller showed that we can bind any wild PCI
device to HD-audio controller, and if PCI BAR of the device is too
small, it may lead to a crash, as the driver believes as if the full
register range were accessible.
For avoiding such a problem, add a safeguard before the actual probe
to check the available BAR0 size.
Note that the threshold (0x200) is chosen to cover all needed
registers at probing. But this doesn't mean that it would cover fully
for all features including the extended ones.
Reported-by: syzbot+10cd2d1efe8eeb604bee@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=10cd2d1efe8eeb604bee
Reported-by: syzbot+5ebe7cd17e48b4293660@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=5ebe7cd17e48b4293660
Link: https://patch.msgid.link/20260813150354.763502-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
## Phase 1: Commit message forensics
**Step 1.1: Subject line**
Record: `[ALSA: hda/intel] [Add] sanity check for BAR0 size` — safeguard
in the Intel HD-audio PCI probe path.
**Step 1.2: Tags**
Record:
- `Reported-by: syzbot+10cd2d1efe8eeb604bee@syzkaller.appspotmail.com`
- `Closes: https://syzkaller.appspot.com/bug?extid=10cd2d1efe8eeb604bee`
- `Reported-by: syzbot+5ebe7cd17e48b4293660@syzkaller.appspotmail.com`
- `Closes: https://syzkaller.appspot.com/bug?extid=5ebe7cd17e48b4293660`
- `Link: https://patch.msgid.link/20260813150354.763502-1-tiwai@suse.de`
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` (ALSA maintainer;
applied his own patch)
- No `Fixes:` tag (expected)
- No `Cc: stable` (expected)
- No `Reviewed-by` / `Tested-by` / `Acked-by`
Notable: two independent syzbot reports with C reproducers.
**Step 1.3: Body**
Record:
- **Bug:** binding a non-HD-audio / undersized-BAR PCI device to `snd-
hda-intel` lets the driver treat BAR0 as a full HD-audio register
window.
- **Symptom:** kernel paging oops while reading controller registers.
- **Root cause:** no check of `pci_resource_len(pci, 0)` before
`pcim_iomap_regions` + MMIO reads.
- **Fix:** reject probe if BAR0 < `0x200`.
- **Caveat:** `0x200` covers probe-time registers (GCAP at `0x00`, LLCH
at `0x14`), not the full extended register set.
- No version range given.
**Step 1.4: Hidden bug fix?**
Record: Not hidden. It is an explicit crash-prevention check, even
though the verb is “Add”.
## Phase 2: Diff analysis
**Step 2.1: Inventory**
Record:
- Upstream file: `sound/hda/controllers/intel.c` (+9 / −0)
- Function: `azx_probe()`
- Scope: single-file surgical check before `snd_card_new()`
**Step 2.2: Code flow**
Record:
Before: after the `dmic_detect` / DSP-driver selection block, probe
continues into `snd_card_new()` → `azx_create()` → later
`azx_first_init()`, which iomaps BAR0 and reads registers with no size
check.
After: if BAR0 length < 512 bytes, log `"Too small PCI BAR0"` and return
`-EINVAL` before allocating a card.
**Step 2.3: Bug mechanism**
Record: **Memory safety / out-of-bounds MMIO**. `pcim_iomap_regions()`
maps whatever BAR0 exists. `azx_readw(GCAP)` and
`snd_hdac_bus_parse_capabilities()` then `readw` past the mapping →
`#PF` / oops. Category (g)+(h): logic/correctness guard plus a
hardware/binding sanity check.
**Step 2.4: Fix quality**
Record: Obviously correct. `pci_resource_len()` is the standard helper.
`0x200` is well below a real HD-audio BAR (typically 16KB / `0x4000` per
spec); legitimate devices will not be rejected. Regression risk is very
low: only devices with BAR0 < 512 bytes fail probe, which could not work
anyway. Incomplete vs. every later register (author notes that); still
sufficient for the reported oops.
## Phase 3: Git history
**Step 3.1: Blame**
Record: Insertion point is immediately before `snd_card_new()` in
`azx_probe()`, blamed to Takashi Iwai 2014 (`60c5772b50fe`) / original
driver era (`e58de7baf7de`, `^1da177e4c3f41`). The missing BAR check is
not a recent regression; the driver has always assumed a full controller
BAR.
**Step 3.2: Fixes: tag**
Record: None. The “bug” is long-standing missing validation, not a
single introducing commit.
**Step 3.3: File history**
Record: Recent `hda_intel.c` commits in this tree are device IDs,
denylist, and PM quirks. No prior BAR0 size check, no conflicting
refactor of `azx_probe()`. Standalone, not patch X/Y.
**Step 3.4: Author**
Record: Takashi Iwai is the ALSA/HDA maintainer. He authored and
committed the patch the same day (2026-08-13). Strong maintainer signal.
**Step 3.5: Dependencies**
Record: None. Uses `pci_resource_len()` (`include/linux/pci.h` in this
tree). Surrounding `azx_probe()` context (dmic_detect warning, then
`snd_card_new`) matches this checkout. Standalone.
Upstream SHA `9895573b0185` exists as an object but is **not** an
ancestor of HEAD (`git merge-base --is-ancestor` exit 1).
## Phase 4: Mailing list / external
**Step 4.1: Original discussion**
Record: `b4 dig -c 9895573b0185` →
https://patch.msgid.link/20260813150354.763502-1-tiwai@suse.de
`b4 dig -a`: **v1 only**, no later revisions.
`b4 dig -m`: thread is the single patch email; **no replies, no NAK, no
Cc: stable suggestion**. Maintainer self-applied (~1 hour later).
Lore WebFetch returned 403; discussion was recovered from the b4 mbox
instead.
**Step 4.2: Recipients**
Record (`b4 dig -w`): `Takashi Iwai`, `linux-sound@vger.kernel.org`
only. Appropriate list; author is the maintainer.
**Step 4.3: Bug reports**
Record (syzkaller, both marked **prio:high**, C repro, fix commit
`9895573b0185`):
1. `extid=10cd2d1efe8eeb604bee` — `BUG: unable to handle kernel paging
request in snd_hdac_bus_parse_capabilities`
RIP: `readw` of LLCH (`+0x14`) in `snd_hdac_bus_parse_capabilities`;
caller `azx_first_init` → `azx_probe_work`.
Security notes: DenialOfService yes, Exploitable yes, Unprivileged no,
PeripheralTrigger yes, VMHostTrigger yes.
2. `extid=5ebe7cd17e48b4293660` — `BUG: unable to handle kernel paging
request in azx_probe_work`
RIP: `azx_readw(GCAP)` in `azx_first_init`. Same workqueue path. DoS
yes, unprivileged no.
**Step 4.4: Series**
Record: Standalone v1. No sibling patches required.
**Step 4.5: Stable list**
Record: lore.kernel.org/stable WebFetch 403. UNVERIFIED: no independent
confirmation of a prior stable request/rejection. Absence of `Cc:
stable` is expected for this review pipeline.
## Phase 5: Semantic / call-chain
**Step 5.1: Functions**
Record: `azx_probe()` only (new early return). Crash site functions
unchanged: `azx_first_init()`, `snd_hdac_bus_parse_capabilities()`.
**Step 5.2: Callers**
Record: `azx_probe` is `azx_driver.probe`
(`module_pci_driver(azx_driver)`). Invoked on PCI bind of matching IDs,
including the generic Intel class match:
```2595:2599:sound/pci/hda/hda_intel.c
/* Generic Intel */
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_ANY_ID),
.class = PCI_CLASS_MULTIMEDIA_HD_AUDIO << 8,
.class_mask = 0xffffff,
.driver_data = AZX_DRIVER_ICH | AZX_DCAPS_NO_ALIGN_BUFSIZE },
```
Similar class catch-alls exist for NVIDIA/ATI/AMD. Binding also works
via sysfs `new_id` / `driver_override` (privileged).
**Step 5.3: Callees of the crash path (this tree)**
Record: `azx_first_init()` does `pcim_iomap_regions(pci, 1 << 0, ...)`,
then `snd_hdac_bus_parse_capabilities(bus)` for SKL, then
`azx_readw(chip, GCAP)` at offset `0x00`.
`snd_hdac_bus_parse_capabilities()` starts with
`snd_hdac_chip_readw(bus, LLCH)` at `0x14`. `pcim_iomap_regions()` does
**not** require a minimum size.
**Step 5.4: Reachability**
Record: PCI probe / `azx_probe_work` workqueue. Reachable from:
- automatic bind of class `0x0403` devices (including fuzzed/malformed
PCI devices)
- privileged `new_id` / `driver_override`
Not a normal unprivileged syscall. Still a real kernel oops, including
in VMs (syzbot’s environment).
**Step 5.5: Similar patterns**
Record: Other ALSA PCI drivers already reject tiny BARs (e.g.
`sound/pci/oxygen/oxygen_lib.c` compares `pci_resource_len(pci, 0) <
OXYGEN_IO_SIZE`). HDA Intel was missing that class of check. This commit
does not touch `hda_tegra.c`.
## Phase 6: This tree (6.12.y)
**Step 6.1: Buggy code present?**
Record: **Yes.** Local tree is **6.12.111** (`p-6.12-3-gc504cf0baa3d8`).
File is `sound/pci/hda/hda_intel.c` (pre-rename). `azx_probe()` at 2116
has the same dmic_detect block and goes straight to `snd_card_new()`
with **no** BAR0 check. `azx_first_init()` at 1854 performs the same
iomap + GCAP/capability MMIO. `"Too small PCI BAR0"` is absent.
**Step 6.2: Backport difficulty**
Record: **Clean apply after path remap**
(`sound/hda/controllers/intel.c` → `sound/pci/hda/hda_intel.c`). Hunk
context is identical. No data-structure or helper prerequisites.
**Step 6.3: Related fixes already here?**
Record: No. `git log --grep` on those paths found no BAR0 sanity check.
`9895573b0185` is not an ancestor of HEAD.
## Phase 7: Subsystem context
**Step 7.1**
Record: ALSA HD-audio PCI controller (`sound/pci/hda`). **IMPORTANT** —
default audio driver on essentially all x86 laptops/desktops
(`CONFIG_SND_HDA_INTEL`).
**Step 7.2**
Record: Mature, actively maintained. Probe path itself is old and
stable; recent churn is IDs/quirks, not `azx_probe()` structure.
## Phase 8: Impact and risk
**Step 8.1: Who is affected**
Record: Users of `snd-hda-intel` (very common), plus anyone who can bind
a PCI function with a tiny BAR0 (VM/PCI fuzzing, `new_id`,
malformed/class-matching devices).
**Step 8.2: Trigger**
Record: PCI bind of a device whose BAR0 is smaller than the offsets the
driver reads. Common in syzkaller/QEMU; uncommon on real ICH/PCH
hardware (those BARs are ~16KB). Typically needs a matching class/ID or
CAP_SYS_ADMIN for `new_id`. Unprivileged userspace cannot trigger it
directly (syzbot: Unprivileged: no). Peripheral/VM-host injection is in
the syzbot assessment.
**Step 8.3: Failure mode**
Record: Kernel oops (`BUG: unable to handle kernel paging request`) in
`azx_probe_work`. **Severity: CRITICAL** (host/guest crash). DoS; one
report also marked exploitable. Not filesystem corruption.
**Step 8.4: Risk-benefit**
Record:
- **Benefit:** High — prevents a documented, reproducible oops in a
widely enabled driver.
- **Risk:** Very low — 9 lines, fail-closed on impossible hardware, no
locking/API change.
- **Ratio:** Strongly favors backport.
## Phase 9: Synthesis
**Step 9.1: Evidence**
FOR:
- Two syzbot reports, C repros, prio:high, paging oops
- Real crash in `azx_first_init` / `snd_hdac_bus_parse_capabilities` —
both exist here
- 9-line, obviously correct check
- ALSA maintainer authored and applied it
- Same probe context in 6.12; only the filename differs
- Spec-sized HD-audio BARs are far larger than `0x200`
AGAINST:
- Trigger is not the everyday laptop codec path (needs a tiny BAR / wild
bind)
- `0x200` is a floor, not full MMIO coverage
- No mailing-list review besides the maintainer
- Lore/stable-list HTTP 403 (discussion recovered via b4)
UNRESOLVED:
- Could not WebFetch lore.kernel.org or git.kernel.org (403/bot wall);
b4 mbox and syzbot pages were sufficient
- No independent stable-list discussion found
**Step 9.2: Stable rules**
1. Obviously correct and tested? **PASS** — maintainer patch; syzbot
lists it as the fix commit and patched on upstream CI.
2. Real bug affecting users? **PASS** — reproducible kernel oops.
3. Important (crash/security/corruption/deadlock)? **PASS** — oops / DoS
(CRITICAL).
4. Small and contained? **PASS** — +9 lines, one function.
5. No new features/APIs? **PASS**
6. Can apply to this tree? **PASS** — path remap only; context matches.
**Step 9.3: Exception category**
Record: Not an ID/quirk/DT/docs exception. It is a normal crash-
prevention bugfix.
**Step 9.4: Decision**
This tree has the vulnerable probe path. The patch is a small, correct
guard that stops a syzbot-proven oops. It should be backported to this
6.12 tree.
---
### What the commit solves, and why it matters here
`snd-hda-intel` maps BAR0 and then reads HD-audio registers (GCAP at
`0x00`, LLCH at `0x14`, later stream descriptors). If BAR0 is too small
— syzkaller binds a wild PCI function, or a class-`0x0403` device has a
truncated BAR — those `readw`s walk off the iomap and oops the kernel in
`azx_probe_work`. On 6.12 that is still `azx_probe()` in
`sound/pci/hda/hda_intel.c` with no size check. The patch rejects BAR0 <
512 bytes before `snd_card_new()`, which is enough to stop the reported
crash and will not reject real controllers.
### Stable-rules / risk vs benefit
Meets the rules: real oops, tiny diff, no API, applies with a filename
change. Benefit is preventing a kernel crash in a default x86 audio
driver; risk is an early `-EINVAL` only for hardware that could not
function.
### Concerns
Need to drop the patch onto `sound/pci/hda/hda_intel.c` instead of
`sound/hda/controllers/intel.c`. No other prerequisites. The `0x200`
floor is incomplete for later registers; that is documented and does not
block the oops fix.
### Verification
- [Phase 1] Parsed tags: two syzbot Reported-by/Closes, maintainer SOB,
no Fixes/Cc:stable
- [Phase 2] Diff: +9 lines in `azx_probe()`, `pci_resource_len(pci, 0) <
0x200` → `-EINVAL`
- [Phase 3] `git describe HEAD` / `make kernelversion`: **6.12.111**
(`p-6.12-3-gc504cf0baa3d8`)
- [Phase 3] `git merge-base --is-ancestor 9895573b0185 HEAD` → not
ancestor (exit 1); object exists
- [Phase 3] Blame around insertion: `snd_card_new` path dates to
2008–2014; no existing BAR check
- [Phase 3] `git log --oneline -20 -- sound/pci/hda/hda_intel.c`:
IDs/quirks only; no related fix
- [Phase 4] `b4 dig -c 9895573b0185`: lore URL
`20260813150354.763502-1-tiwai@suse.de`
- [Phase 4] `b4 dig -a`: v1 only; `b4 dig -w`: linux-sound + maintainer
- [Phase 4] b4 mbox: single email, no NAK/review replies
- [Phase 4] syzbot: paging oops in `snd_hdac_bus_parse_capabilities` and
`azx_probe_work`; C repro; prio:high; fix `9895573b0185`
- [Phase 4] WebFetch lore/stable/git.kernel.org: 403 — UNVERIFIED via
HTTP; b4/syzbot used instead
- [Phase 5] Callers: PCI `.probe = azx_probe`; Intel/NVIDIA/ATI/AMD HD-
audio class catch-alls
- [Phase 5] This tree `azx_first_init`: `pcim_iomap_regions` then
`azx_readw(GCAP)` / `snd_hdac_bus_parse_capabilities` (LLCH `0x14`)
- [Phase 5] `pcim_iomap_regions()` maps BAR as-is; no minimum size
- [Phase 6] Local `azx_probe()` at `sound/pci/hda/hda_intel.c:2116`
lacks the check; grep found no `"Too small PCI BAR0"`
- [Phase 6] Surrounding lines 2149–2160 match the upstream hunk — clean
path-remap apply
- [Phase 8] Failure: kernel oops on probe workqueue; severity CRITICAL;
unprivileged trigger not shown
**YES**
sound/hda/controllers/intel.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sound/hda/controllers/intel.c b/sound/hda/controllers/intel.c
index f07fc5dc5cede..3ed33cba7d83f 100644
--- a/sound/hda/controllers/intel.c
+++ b/sound/hda/controllers/intel.c
@@ -2155,6 +2155,15 @@ static int azx_probe(struct pci_dev *pci,
dev_warn(&pci->dev, "dmic_detect option is deprecated, pass snd-intel-dspcfg.dsp_driver=1 option instead\n");
}
+ /* A sanity check against wild device binding;
+ * here the range 0x200 is enough for the registers used at probe,
+ * but it doesn't mean covering all HD-audio registers
+ */
+ if (pci_resource_len(pci, 0) < 0x200) {
+ dev_err(&pci->dev, "Too small PCI BAR0\n");
+ return -EINVAL;
+ }
+
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
0, &card);
if (err < 0) {
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.1] ASoC: amd: yc: Add DMI entry for Alienware m18 R1 AMD
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (36 preceding siblings ...)
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/intel: Add sanity check for BAR0 size Sasha Levin
@ 2026-10-19 13:50 ` Sasha Levin
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Limit internal mic boost on HP Pavilion 15 (103c:2164) Sasha Levin
` (23 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:50 UTC (permalink / raw)
To: patches, stable
Cc: Zhang Heng, Mark Brown, Sasha Levin, Vijendar.Mukunda, lgirdwood,
perex, tiwai, linux-sound, linux-kernel
From: Zhang Heng <zhangheng@kylinos.cn>
[ Upstream commit fd8ed52ecea6b93e23d52cb2758fb4fb4029067f ]
Add DMI entry so the YC machine driver probes on this model and
the internal DMIC works.
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221485
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Link: https://patch.msgid.link/20260824130302.553419-1-zhangheng@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a DMI quirk that enables the existing Yellow Carp DMIC driver on
one Alienware laptop. The local tree is **6.12.111** (`pending-6.12`);
the entry is not present here yet, and the surrounding driver/table are.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: **[ASoC/amd/yc] [Add] Add DMI entry for Alienware m18 R1 AMD**
- Subsystem: `ASoC: amd: yc:` (ALSA SoC, AMD Yellow Carp ACP6x machine
driver)
- Action verb: **Add** — here it is a DMI/quirk table addition, not a
new driver
- Intent: make the YC machine driver probe on this model so the internal
digital mic works
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record (from `git show fd8ed52ecea6b93e23d52cb2758fb4fb4029067f` and the
mailing-list mbox):
- **Closes:** `https://bugzilla.kernel.org/show_bug.cgi?id=221485` —
user-filed kernel.org bug
- **Link:** `https://patch.msgid.link/20260824130302.553419-1-
zhangheng@kylinos.cn`
- **Signed-off-by:** Zhang Heng `<zhangheng@kylinos.cn>` (author)
- **Signed-off-by:** Mark Brown `<broonie@kernel.org>` (ASoC maintainer;
applied to `sound.git for-7.3`)
- **No Fixes:** tag (expected)
- **No Cc: stable** (expected)
- **No Reported-by / Tested-by / Reviewed-by / Acked-by**
- Ignore pipeline SOB markers
Notable: Closes a public bugzilla; ASoC maintainer applied it. No
syzbot/KASAN.
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** BIOS on Alienware m18 R1 AMD does not cause the YC machine
driver to bind, so the internal DMIC is not registered.
- **Symptom:** internal microphone does not work (no ACP DMIC capture
device).
- **Root cause (author):** missing DMI match in `yc_acp_quirk_table[]`.
- **Version info:** none in the message. Driver exists since 2021
(`fa991481b8b22`).
- **Fix:** add `DMI_BOARD_VENDOR "Alienware"` + `DMI_PRODUCT_NAME
"Alienware m18 R1 AMD"`.
Same class as existing sibling entries already in this tree (m15 R7 AMD,
m17 R5 AMD).
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not hidden. It is an explicit hardware-quirk / device-enablement
fix. Stable exception category: DMI quirk for existing driver.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/soc/amd/yc/acp6x-mach.c` — **+7 / -0**
- Function: none; one new initializer in `yc_acp_quirk_table[]`
- Scope: **single-file surgical quirk addition**
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- **Before:** `dmi_first_match(yc_acp_quirk_table)` in `acp6x_probe()`
does not match this product. If ACPI `_WOV` / `AcpDmicConnected` also
fail (typical on these Dell/Alienware BIOS images),
`platform_get_drvdata()` is NULL and probe returns `-ENODEV`. No
`acp6x` DMIC card.
- **After:** DMI matches, `platform_set_drvdata(pdev, &acp6x_card)`,
card registers. Log: `Enabling ACP DMIC support via DMI`.
- Path: probe/init only; no hot path, no locking, no API change.
Verified in this tree:
```817:826:sound/soc/amd/yc/acp6x-mach.c
check_dmi_entry:
/* check for any DMI overrides */
dmi_id = dmi_first_match(yc_acp_quirk_table);
if (dmi_id)
platform_set_drvdata(pdev, dmi_id->driver_data);
card = platform_get_drvdata(pdev);
if (!card)
return -ENODEV;
dev_info(&pdev->dev, "Enabling ACP DMIC support via %s", dmi_id
? "DMI" : "ACPI");
```
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: **(h) Hardware workaround / DMI quirk**
BIOS does not advertise DMIC via ACPI; the machine must be listed.
Without the entry, the existing ACP6x PDM path never registers.
Mechanism is identical to m15 R7 / m17 R5 entries already here.
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- Obviously correct: same struct shape as every other table entry;
`driver_data = &acp6x_card`.
- Minimal: 7 lines, one model.
- Regression risk: **very low**. Match is vendor+product-name specific.
Other machines are unaffected. If this SKU has no ACP6x PCI device,
`acp6x_probe()` never runs and the entry is inert.
- No public API, no data-structure layout change, no new Kconfig.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- Insertion is after the m17 R5 AMD entry, blamed to `d40b6529c6269`
(Brent Mendelsohn, 2022-10-24): “This model requires an additional
detection quirk to enable the internal microphone - BIOS doesn't seem
to support AcpDmicConnected”.
- m15 R7 AMD: `c70f006356fac` (already in this 6.12 tree).
- Machine driver introduced: `fa991481b8b22` (2021-10-18, v5.16-era).
Present long before 6.12.
The “bug” is absence of this SKU from a table that has existed for
years.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No Fixes: tag. N/A. Introduced-by is “never listed this DMI
string,” not a later regression.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: This file on 6.12.y is a long series of standalone DMI additions
(`git log --oneline --grep='Add DMI' -- sound/soc/amd/yc/acp6x-mach.c` →
24 commits). Parent of the candidate is `e2aa5ad3be41a` (“Add DMI entry
for MSI Thin A15 B7UC”), already in this tree as `aacaae0b94875`.
**Standalone, not patch X/Y.**
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Zhang Heng is a regular DMI-quirk contributor in this same file
on this tree (HP Victus 16-e1xxx, Thin A15 B7VF, ASUS EXPERTBOOK
PM1503CDA, Acer TravelMate P216-41-TCO). Not the subsystem maintainer;
Mark Brown applied the patch.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: None. Relies only on `yc_acp_quirk_table` and `acp6x_card`, both
in this checkout. `git merge-base --is-ancestor fd8ed52ecea6 HEAD` is
false (fix not yet here). No follow-up/revert grepping `Alienware m18`
on this path.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c fd8ed52ecea6` →
https://patch.msgid.link/20260824130302.553419-1-zhangheng@kylinos.cn
- `b4 dig -a`: **v1 only** (no later revision)
- Thread (2 messages, saved via `b4 mbox`):
1. Zhang Heng, 2026-08-24: the patch
2. Mark Brown: **Applied** to
`git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
for-7.3` as `fd8ed52ecea6`
- No NAK, no requested changes, no reviewer concern about the DMI
strings
- Also listed in sound fixes for 7.3-rc1 (lkml.iu.edu sound-fix pull)
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): To/Cc = Zhang Heng, `broonie@kernel.org`, `linux-
sound@vger.kernel.org`, `linux-kernel@vger.kernel.org`. ASoC maintainer
was the recipient and applied it. No extra reviewer Ack.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record:
- Closes bugzilla.kernel.org 221485.
- Direct fetch of bugzilla and lore HTML was blocked by Anubis (403 /
PoW). **Full bugzilla comments UNVERIFIED.**
- Commit body + Closes: tag still document a real user-facing DMIC
failure on this model.
- Unrelated Ubuntu bugs about Intel Alienware 18 Area-51 / SOF are a
different machine; not this ACP6x DMI.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone `[PATCH]`, not a series. Sibling Alienware YC entries
already in this tree.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: Web search of lore.kernel.org/stable for this subject found
**no** discussion. No record of a prior rejection. Absence is expected;
this is why the commit is under review.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: KEY FUNCTIONS**
Record: Table data only. Consumer: `acp6x_probe()`.
**Step 5.2: TRACE CALLERS**
Record:
- `acp6x_probe` is `.probe` of `platform_driver acp6x_mach_driver`
(`name = "acp_yc_mach"`).
- Platform device created in `sound/soc/amd/yc/pci-acp6x.c` when ACP pin
config is PDM mode (`pdevinfo[2].name = "acp_yc_mach"`).
- Context: boot / ACPI+PCI enumeration. Not IRQ, not a syscall hot path.
**Step 5.3: TRACE CALLEES**
Record: `dmi_first_match`, `platform_set_drvdata`,
`devm_snd_soc_register_card`. No alloc/lock change in this commit.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: PCI ACP6x device → create `acp_yc_mach` → `acp6x_probe` → DMI
table → ALSA card `acp6x` / “DMIC capture”. Reachable on this laptop at
boot. Userspace then sees a capture device. Unprivileged apps can use
the mic once the card exists; they cannot trigger a kernel crash with
this patch.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Entire `yc_acp_quirk_table[]` (~200 `DMI_MATCH` lines) is this
pattern. Same Alienware vendor/product matching is already used for m15
R7 and m17 R5.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record:
- Tree: `git describe HEAD` → `p-6.12-3-gc504cf0baa3d8`; `make
kernelversion` → **6.12.111**; branch `pending-6.12`.
- File and table exist. m15 R7 and m17 R5 entries exist. **`Alienware
m18 R1 AMD` does not** (`grep` no matches).
- ACPI fallback (`AcpDmicConnected` / `_WOV`) is the same as mainline;
this SKU still needs DMI.
- Driver since 2021; 6.12 is affected.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: **Clean apply / trivial offset.** Insertion is immediately after
the m17 R5 AMD block, which is present at lines 503–509. The candidate’s
3-line context matches this file. Preceding MSI “Raider A18 HX A9WJG”
from a later mainline snapshot is **not** required.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: No m18 R1 entry. No alternate fix for this product string.
m15/m17 quirks do not cover m18 (exact `DMI_PRODUCT_NAME` match).
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: **ASoC AMD Yellow Carp (`sound/soc/amd/yc/`)** —
**PERIPHERAL/driver-specific**, but the quirk table is the supported way
to enable DMIC on YC laptops. Kconfig: `SND_SOC_AMD_YC_MACH` depends on
`SND_SOC_AMD_ACP6x && ACPI`.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Mature driver (2021), still actively receiving DMI quirks (many
already on 6.12.y). This is the normal maintenance pattern, not a new
subsystem.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: **Driver-specific / DMI-specific.** Only systems whose DMI board
vendor is `Alienware` and product name is `Alienware m18 R1 AMD`, and
that actually instantiate `acp_yc_mach`. Everyone else: no code path
change.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Every boot on that laptop if ACP6x PDM mode is active. Not a
race. Not unprivileged-exploit. Common for owners of that model; zero
for others.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: Internal microphone missing (ALSA card never registered).
**MEDIUM** functionally (hardware does not work), not a panic/UAF. Still
the exact class stable accepts as a quirk.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- **Benefit:** restores internal mic on a shipping AMD Alienware laptop
for 6.12.y users (enterprise/LTS kernels). Documented via bugzilla
Closes.
- **Risk:** very low (7 lines, DMI-gated, existing table format,
maintainer-applied).
- **Ratio:** strongly favors backport.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real hardware bug: internal DMIC never enabled without DMI
- Closes kernel.org bug 221485
- Textbook stable exception: DMI quirk on an existing driver
- 7-line, obviously correct, matches m15/m17 entries already in 6.12
- File, probe path, and table exist here; patch applies
- Applied by Mark Brown; landed in sound 7.3-rc1 fixes
- Standalone; no prerequisites missing from this tree
- This tree already carries dozens of the same DMI additions
AGAINST:
- Not a crash/security/corruption issue
- No Tested-by/Reviewed-by besides maintainer apply
- Full bugzilla thread could not be fetched (Anubis)
UNRESOLVED:
- Exact bugzilla comments / reporter DMI dump (UNVERIFIED)
- Whether every m18 R1 AMD SKU is ACP6x vs a later ACP (if not, entry is
a harmless no-op)
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — identical to existing table
entries; maintainer applied v1
2. Fixes a real bug that affects users? **PASS** — mic does not work;
bugzilla Closes
3. Important issue? **PASS** as hardware-quirk exception (mic unusable
on that model; not a panic)
4. Small and contained? **PASS** — +7 lines, one file
5. No new features or APIs? **PASS** — DMI ID on existing driver
6. Can apply to the local tree? **PASS** — YC driver + insertion point
present
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Hardware quirk / DMI table entry for an existing driver.**
Explicitly allowed.
**Step 9.4: DECISION**
Backport to this 6.12.y tree. It enables existing ACP6x DMIC support on
one DMI-matched laptop, is tiny, and matches the quirk pattern already
used here.
------------------------------------------------
What the commit solves for stable users
------------------------------------------------
On Alienware m18 R1 AMD, ACPI often does not flag the ACP DMIC. Without
this DMI row, `acp6x_probe()` returns `-ENODEV` and there is no internal
capture device. Adding the match makes the existing YC machine driver
bind and register the DMIC card. 6.12 users of that laptop keep a broken
mic until this lands.
Risk vs benefit: benefit is real hardware enablement; risk is confined
to that DMI pair. No locking, allocation, or ABI change.
------------------------------------------------
Verification
------------------------------------------------
- [Phase 1] Parsed subject/tags from `git show fd8ed52ecea6`: Closes
221485, Link msgid, SOB Zhang Heng + Mark Brown; no Fixes/Cc-stable
- [Phase 2] Diff: +7 lines in `yc_acp_quirk_table[]` only
- [Phase 2] Read `acp6x_probe()` in this tree: DMI match sets drvdata;
no match → `-ENODEV`
- [Phase 3] Blame: m17 R5 entry `d40b6529c6269` (2022); driver
`fa991481b8b22` (2021); both ancestors of HEAD
- [Phase 3] `git merge-base --is-ancestor fd8ed52ecea6 HEAD` → not
ancestor (not in this tree yet)
- [Phase 3] `grep 'Alienware m18 R1 AMD'` → no matches in `acp6x-mach.c`
- [Phase 3] Author history: several other YC DMI commits already on this
branch
- [Phase 4] `b4 dig -c fd8ed52ecea6`: lore URL; v1 only; To/Cc include
broonie and linux-sound
- [Phase 4] `b4 mbox`: Mark Brown applied to sound.git for-7.3; no NAK
- [Phase 4] Bugzilla HTML UNVERIFIED (Anubis 403). Closes: tag verified
in commit and patch email
- [Phase 4] Stable list search: no prior discussion found
- [Phase 5] Callers: `pci-acp6x.c` creates `acp_yc_mach` in PDM mode;
probe at boot
- [Phase 6] `git describe HEAD` / `make kernelversion`: **6.12.111**,
branch pending-6.12
- [Phase 6] Insertion context after m17 R5 AMD present at lines 503–509;
expected clean apply
- [Phase 8] Failure mode: missing internal mic, severity MEDIUM, quirk
exception
- UNVERIFIED: full bugzilla comment text; whether every m18 R1 AMD SKU
is ACP6x (mismatch would be inert)
**YES**
sound/soc/amd/yc/acp6x-mach.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
index 666ac5b36e7d6..8e203c034851f 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -514,6 +514,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m17 R5 AMD"),
}
},
+ {
+ .driver_data = &acp6x_card,
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Alienware"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m18 R1 AMD"),
+ }
+ },
{
.driver_data = &acp6x_card,
.matches = {
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Limit internal mic boost on HP Pavilion 15 (103c:2164)
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (37 preceding siblings ...)
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-6.1] ASoC: amd: yc: Add DMI entry for Alienware m18 R1 AMD Sasha Levin
@ 2026-10-19 13:50 ` Sasha Levin
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-5.15] ALSA: usb-audio: Add mixer mapping for MSI MAG B850M MORTAR WIFI Sasha Levin
` (22 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:50 UTC (permalink / raw)
To: patches, stable
Cc: Hernan Ganzo, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Hernan Ganzo <gp@sneemgp.com>
[ Upstream commit 786fb6b3f513937f712db5a9ba6a12cbc6982ba9 ]
The HP Pavilion 15 with the ALC3227 codec (SSID 103c:2164) exposes the full
four-step internal mic boost on pin 0x12: nsteps=3 with stepsize=0x2f, that is
0, 12, 24 and 36 dB. Combined with the ADC capture gain of +30 dB the analogue
cascade reaches 66 dB, and the internal microphone clips on the ambient noise of
a quiet room; the upper two steps are unusable at any useful input level. This
is the defect class ALC269_FIXUP_LIMIT_INT_MIC_BOOST exists for.
The machine matches no SSID quirk and falls through to the pin table, which
selects ALC269_FIXUP_HP_MUTE_LED_MIC1 through a pin signature shared with
several other HP models. Add an SSID entry instead, using
ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED: the existing fixup that applies
alc269_fixup_limit_int_mic_boost() and chains to the same mute LED fixup, as
already done for 103c:218b. The boost becomes 0 or 12 dB and the LED handling is
unchanged.
Tested on the affected machine by selecting the same fixup through the model
string (snd-hda-intel.model), which bypasses the SSID and pin tables, with the
driver confirming the selection:
snd_hda_codec_alc269 hdaudioC1D0: ALC3227: picked fixup limit-mic-boost (model specified)
With that, Internal Mic Boost reports Limits 0 - 1 (0 or 12 dB) instead of 0 - 3
(0 to 36 dB), so alc269_fixup_limit_int_mic_boost() clamps this codec's internal
mic pin as intended. Note that /proc/asound/card1/codec#0 keeps printing the
unclamped hardware caps (nsteps=0x03): that file reads codec parameters uncached
by design, while the fixup overrides the driver's cached parameter that the
control is built from.
This does not by itself make the default capture volume sane -- the remaining
12 dB on top of the +30 dB ADC gain is still hotter than this machine's usable
operating point. It removes the two unusable steps from the hardware range, which
is what a quirk of this class can do.
Signed-off-by: Hernan Ganzo <gp@sneemgp.com>
Link: https://patch.msgid.link/20260921205538.41192-1-gp@sneemgp.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: [ALSA: hda/realtek] [Limit] [Add an SSID quirk so the HP
Pavilion 15 (103c:2164) uses the existing internal-mic boost limiter
plus mute-LED chain]
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- Link: https://patch.msgid.link/20260921205538.41192-1-gp@sneemgp.com
- Signed-off-by: Hernan Ganzo <gp@sneemgp.com> (author)
- Signed-off-by: Takashi Iwai <tiwai@suse.de> (ALSA maintainer)
- Signed-off-by: Sasha Levin — ignored per instructions
- `[ Upstream commit 786fb6b3f513937f712db5a9ba6a12cbc6982ba9 ]` —
ignored per instructions
- No Fixes:, Reported-by:, Tested-by:, Reviewed-by:, Acked-by:, or Cc:
stable (absence expected)
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- Bug: HP Pavilion 15 ALC3227 (SSID 103c:2164) exposes a four-step
internal mic boost (0/12/24/36 dB) on pin 0x12. With ADC capture gain
of +30 dB the analogue cascade is 66 dB; the mic clips on quiet-room
ambient noise. The top two steps are unusable.
- Symptom: Distorted/clipped internal-mic capture; Internal Mic Boost
reports Limits 0–3.
- Root cause: No SSID quirk, so the machine falls through to the pin
table and gets only `ALC269_FIXUP_HP_MUTE_LED_MIC1` (mute LED, no
boost clamp). This is the class `ALC269_FIXUP_LIMIT_INT_MIC_BOOST`
exists for.
- Fix: Add SSID 103c:2164 using existing
`ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED` (same as 103c:218b): clamp
boost to 0 or 12 dB, keep mute LED.
- Tested on the affected machine via `snd-hda-intel.model=limit-mic-
boost`; driver log confirmed the pick; mixer Limits became 0–1.
- Author notes the remaining 12 dB + 30 dB ADC is still hotter than
ideal; the quirk only removes the two unusable steps.
- No kernel-version range given.
Step 1.4: DETECT HIDDEN BUG FIXES
Record: Not a disguised cleanup. It is an explicit hardware quirk: one
`SND_PCI_QUIRK` for a known broken boost range.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- File: `sound/hda/codecs/realtek/alc269.c` (+1 / −0)
- Function/table: `alc269_fixup_tbl[]` only
- Scope: single-file, one-line table insertion
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record:
- Before: PCI SSID 103c:2164 is absent from `alc269_fixup_tbl`.
`snd_hda_pick_fixup()` does not match; `snd_hda_pick_pin_fixup()` then
selects `ALC269_FIXUP_HP_MUTE_LED_MIC1` for a shared HP pin signature.
- After: SSID matches `ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED`. That
fixup runs `alc269_fixup_limit_int_mic_boost()` and chains to
`ALC269_FIXUP_HP_MUTE_LED_MIC1`.
- Path: codec probe / fixup selection. Other SSIDs unchanged.
Step 2.3: IDENTIFY THE BUG MECHANISM
Record:
- Category: hardware workaround (quirk / device-ID table entry)
- Mechanism: hardware advertises nsteps=3, stepsize=0x2f.
`alc269_fixup_limit_int_mic_boost()` calls
`snd_hda_override_amp_caps()` on internal-mic pins so NUM_STEPS
becomes 1 (0 or 12 dB). Without the SSID, that override never runs.
Verified in this tree (`alc269.c`):
```2371:2391:sound/hda/codecs/realtek/alc269.c
/* The mic boosts on level 2 and 3 are too noisy
on the internal mic input.
Therefore limit the boost to 0 or 1. */
...
snd_hda_override_amp_caps(codec, nid, HDA_INPUT,
(0x00 <<
AC_AMPCAP_OFFSET_SHIFT) |
(0x01 <<
AC_AMPCAP_NUM_STEPS_SHIFT) |
(0x2f <<
AC_AMPCAP_STEP_SIZE_SHIFT) |
(0 << AC_AMPCAP_MUTE_SHIFT));
```
Chained fixup verified:
```4511:4516:sound/hda/codecs/realtek/alc269.c
[ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc269_fixup_limit_int_mic_boost,
.chained = true,
.chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC1,
},
```
SSID lookup runs first; pin match is skipped once `fixup_id` is set
(`snd_hda_pick_pin_fixup()` returns immediately if `codec->fixup_id !=
HDA_FIXUP_ID_NOT_SET`).
Step 2.4: ASSESS THE FIX QUALITY
Record:
- Obviously correct: reuses a 2013 combined boost+LED fixup already used
for 103c:218b.
- Minimal: one sorted table line; no API, no new fixup enum.
- Regression risk: very low. Only SSID 103c:2164 is affected. Mute LED
is the same chain the pin table already applied. Boost clamp only
touches internal-mic amp caps at probe.
- Caveat (verified): on-machine testing used model string `limit-mic-
boost` (`ALC269_FIXUP_LIMIT_INT_MIC_BOOST`, which chains ThinkPad
ACPI, not HP mute LED). That proves the clamp works on this codec;
SSID selection of the MUTE_LED variant is by construction (same boost
function + same LED chain as the pin table).
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record:
- Insertion sits between 103c:18e6 (`ALC269_FIXUP_HP_GPIO_LED`) and
103c:218b (`ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED`).
- Combined fixup and 103c:218b come from `8e35cd4ac9967` (“ALSA: HDA -
Limit mic boost and add mute LED for an HP machine”, 2013-11-06, David
Henningsson / Takashi Iwai). That commit exists in this tree (`git
merge-base --is-ancestor 8e35cd4ac9967 HEAD` → 0).
- Boost-limit helper has been in the Realtek HDA driver since that era;
file later moved (`6014e9021b28e`) and split (`aeeb85f26c3bb`).
Step 3.2: FOLLOW THE FIXES: TAG
Record: No Fixes: tag. Not applicable. The “bug” is a missing per-board
quirk, not a regression from a later commit.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record: Recent `alc269.c` history is other per-machine quirks (HP mute
LEDs, ASUS speakers, Star Labs mic boost). Same class of standalone
entries. No prerequisite refactor needed for this one line.
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record: Only this Realtek HDA commit from Hernan Ganzo in this tree.
Signed off by Takashi Iwai, who maintains ALSA HDA and routinely merges
these quirk lines.
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record: Standalone. Depends only on
`ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED`,
`alc269_fixup_limit_int_mic_boost()`, and `alc269_fixup_tbl[]`, all
present on v6.18.57. Neighboring 103c:18e6 / 103c:218b lines match the
hunk context, so it applies cleanly to this series.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- `b4 dig -c 786fb6b3f513937f712db5a9ba6a12cbc6982ba9` →
https://patch.msgid.link/20260921205538.41192-1-gp@sneemgp.com
- `b4 dig -a`: single v1 series, 2026-09-21, Hernan Ganzo. No v2/v3.
- Thread (via `b4 mbox`): author patch + Takashi Iwai reply 2026-09-28:
“Applied now. Thanks.” No NAK, no requested changes, no stable
discussion in-thread.
- lore WebFetch returned 403; thread recovered with b4 instead.
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record (`b4 dig -w`): To/Cc linux-sound@vger.kernel.org, tiwai@suse.com,
perex@perex.cz. Subsystem maintainer applied it. No other reviewers.
Step 4.3: SEARCH FOR THE BUG REPORT
Record: No bugzilla/syzbot/Launchpad link on this patch. Evidence is the
author’s on-machine test (kmsg + mixer Limits). The 2013 sibling quirk
103c:218b had Launchpad 1248476 (same defect class: noisy internal mic +
mute LED).
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Standalone, not part of a multi-patch series. Same table already
has many `ALC269_FIXUP_LIMIT_INT_MIC_BOOST*` entries (ThinkPad, ASUS,
Positivo, VAIO, Star Labs). `56b321df2863d` “Limit Star Labs internal
mic boost” is already in v6.18.57.
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: UNVERIFIED. `https://lore.kernel.org/stable/?q=...` returned
403. No evidence in the sound thread that stable was discussed or
rejected.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: No function body changed. Data only: `alc269_fixup_tbl[]`.
Runtime path: `snd_hda_pick_fixup()` → `snd_hda_apply_fixup()` →
`alc269_fixup_limit_int_mic_boost()` +
`alc269_fixup_hp_mute_led_mic1()`.
Step 5.2: TRACE CALLERS
Record:
- `alc269` probe (`alc269.c` ~8557) calls `snd_hda_pick_fixup(codec,
alc269_fixup_models, alc269_fixup_tbl, alc269_fixups)`.
- Then pin-table pick, which is a no-op once SSID matched.
- Probe/init path only, not IRQ or syscall hot path.
Step 5.3: TRACE CALLEES
Record: `alc269_fixup_limit_int_mic_boost()` uses
`snd_hda_codec_get_pincfg()`, `snd_hda_get_input_pin_attr()`,
`snd_hda_override_amp_caps()`. Mute LED helper registers LED cdev /
power filter. All already used by other HP SSIDs.
Step 5.4: FOLLOW THE CALL CHAIN
Record: Reachable when this laptop enumerates HDA (boot / resume /
module load). Not a userspace-exploit path; userspace mixer sees a
smaller boost range. Unprivileged users benefit because capture is
usable without a model= module option.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Same table already maps 103c:218b to this exact fixup. Many
other boards use `ALC269_FIXUP_LIMIT_INT_MIC_BOOST`. Systematic, well-
worn pattern.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record:
- Local tree: `v6.18.57-155-gcdf239ca885b2`, `make kernelversion` =
6.18.57.
- Baseline v6.18.57: `sound/hda/codecs/realtek/alc269.c` exists;
`ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED` exists; 103c:218b exists;
**103c:2164 does not**.
- Without the line, this HP falls through to the pin table
(`ALC269_FIXUP_HP_MUTE_LED_MIC1` entries for codec 0x10ec0282 / vendor
0x103c are present). ALC3227 is the HP OEM name for 0x10ec0282
(`realtek.c`: `{ 0x10ec0282, 0x103c, 0, "ALC3227" }`).
- Hardware defect is as old as the machine; software has never limited
this SSID.
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record: Clean apply. v6.18.57 context is identical to the hunk (`0x18e6`
then `0x218b`). File path is already `sound/hda/codecs/realtek/alc269.c`
on 6.18.y (move/split already landed).
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: No other 103c:2164 quirk. Sibling boost+LED fixup and Star Labs
boost limit are already in v6.18.57. This SSID is the missing piece.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: ALSA HD-audio Realtek codec (`sound/hda/codecs/realtek/`).
IMPORTANT for laptop audio, not core mm/fs. Still a long-lived
production driver.
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: High activity: frequent one-line `SND_PCI_QUIRK` additions,
routinely taken by Iwai. Mature quirk table; this is not new-subsystem
code.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: Driver-specific / SSID-specific. Only HP Pavilion 15 with PCI
SSID 103c:2164 (ALC3227). Other machines unchanged.
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: Always on that hardware: every probe, default mixer range
includes 24/36 dB boost. No race. An unprivileged user using the
internal mic hits it. Workaround today is `snd-hda-intel.model=limit-
mic-boost`.
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record: Internal microphone clips / is unusable at the two highest boost
steps (and noisy even at ambient). Not oops/deadlock/corruption.
Severity: MEDIUM for that machine, but it is a documented hardware quirk
class that stable-kernel-rules explicitly include.
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record:
- Benefit: high for owners of this SKU (usable capture range without a
module option); zero for everyone else.
- Risk: very low (1 line, SSID-gated, existing fixup, maintainer-
applied, tested).
- Ratio: strongly favorable.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR:
- One-line PCI/SSID quirk on an existing driver — stable-kernel-rules:
“fix a real bug that bothers people or just add a device ID”;
“hardware quirk” is listed as in-scope.
- Real user-visible defect: 66 dB analogue cascade, clipping on quiet-
room noise; author tested on the machine.
- Reuses `ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED` already in 6.18.y
(103c:218b since 2013).
- Mute LED preserved via chain to the same pin-table fixup.
- Applies cleanly to v6.18.57; no new APIs; ALSA maintainer applied v1
with no objections.
- Same class as other boost-limit quirks already in this tree (e.g. Star
Labs).
AGAINST:
- Not a crash/security/data-corruption fix; one laptop SKU.
- Author says remaining 12 dB + 30 dB ADC is still hotter than ideal
(partial mitigation by design of this quirk class).
- Model-string test used `limit-mic-boost`, not the MUTE_LED SSID id
(boost path still verified on hardware).
UNRESOLVED:
- Stable mailing-list search blocked (HTTP 403).
- lore WebFetch 403; discussion recovered via b4 mbox.
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? PASS — one table line, existing fixup,
on-machine test, maintainer “Applied now.”
2. Fixes a real bug that affects users? PASS — unusable internal-mic
boost steps on this HP.
3. Important issue? PASS as hardware quirk (explicitly allowed); not
CRITICAL crash.
4. Small and contained? PASS — +1 line, one file.
5. No new features or APIs? PASS — existing fixup ID only.
6. Can apply to the local tree? PASS — v6.18.57 has the file, fixup, and
identical hunk context; 103c:2164 is missing on the 6.18.57 baseline.
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: Hardware quirk / device-ID addition to an existing driver.
Automatic stable-qualifier.
Step 9.4: MAKE YOUR DECISION
This is a textbook stable HDA quirk: SSID-matched, one line, existing
helper, real capture breakage on a shipping laptop, clean apply on
6.18.y. Include it.
What it solves for stable users: on HP Pavilion 15 103c:2164, Internal
Mic Boost is clamped to 0/12 dB instead of 0–36 dB, so the mic no longer
clips at the two hardware steps that this codec cannot use. Mute LED
behavior stays the pin-table path.
Risk vs benefit: benefit is localized and real; risk is confined to that
SSID and the helper has been in-tree for years.
Verification:
- [Phase 1] Parsed tags: Link msgid, SOB Ganzo + Iwai; no
Fixes/Reported-by/Cc-stable
- [Phase 1] Body: 66 dB cascade, pin-table fallback to HP_MUTE_LED_MIC1,
reuse of LIMIT_INT_MIC_BOOST_MUTE_LED
- [Phase 2] Diff: +1 `SND_PCI_QUIRK(0x103c, 0x2164, ...
LIMIT_INT_MIC_BOOST_MUTE_LED)` in `alc269_fixup_tbl`
- [Phase 2] Read `alc269_fixup_limit_int_mic_boost()` and chained fixup
in this tree
- [Phase 2] Read `snd_hda_pick_fixup()` / `snd_hda_pick_pin_fixup()`:
SSID wins over pin table
- [Phase 3] `git blame` around insertion; `git show 8e35cd4ac9967` (2013
218b/combined fixup); ancestor of HEAD
- [Phase 3] `git log -S 'ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED'`
traces to 8e35cd4ac9967 via file moves
- [Phase 3] Author history: only this Realtek commit in-tree
- [Phase 4] `b4 dig -c 786fb6b3...`: lore URL; `-a` v1 only; `-w` linux-
sound/tiwai/perex
- [Phase 4] `b4 mbox`: Iwai “Applied now. Thanks.”; no NAK
- [Phase 4] UNVERIFIED: lore WebFetch 403; stable list 403
- [Phase 5] Callers: alc269 probe → pick_fixup; clamp at
HDA_FIXUP_ACT_PROBE
- [Phase 5] ALC3227 = 0x10ec0282 + HP 0x103c in `realtek.c`
- [Phase 6] `git describe HEAD` = v6.18.57-155-gcdf239ca885b2; `make
kernelversion` = 6.18.57
- [Phase 6] `git grep 0x2164 v6.18.57 -- alc269.c`: absent; fixup and
218b present
- [Phase 6] Context at v6.18.57 matches the hunk (18e6 then 218b)
- [Phase 6] Star Labs boost-limit `56b321df2863d` is ancestor of
v6.18.57
- [Phase 7] ALSA HDA Realtek; quirk table still actively extended
- [Phase 8] Failure mode: clipped/unusable internal mic on one SSID;
severity MEDIUM; hardware-quirk exception
- [Phase 9] `Documentation/process/stable-kernel-rules.rst` lines 15–20:
device ID / hardware quirk allowed
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index bc87062f86da7..10d930d8fed72 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -6707,6 +6707,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED),
+ SND_PCI_QUIRK(0x103c, 0x2164, "HP Pavilion 15 Notebook PC", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x21f9, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x2210, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.15] ALSA: usb-audio: Add mixer mapping for MSI MAG B850M MORTAR WIFI
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (38 preceding siblings ...)
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Limit internal mic boost on HP Pavilion 15 (103c:2164) Sasha Levin
@ 2026-10-19 13:50 ` Sasha Levin
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Fix mute LED for HP Victus 15-fa1xxx (MB 8C3F) Sasha Levin
` (21 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:50 UTC (permalink / raw)
To: patches, stable
Cc: Tomasz Bojanowski, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Tomasz Bojanowski <tomasz@bojanowski.me>
[ Upstream commit 7b457ae8cf711831f19d20963f5ed2fdf4842d3a ]
The USB audio device 0db0:cc78 (Realtek ALC4080) on the MSI MAG B850M
MORTAR WIFI motherboard exposes all playback controls as "PCM", which
makes it hard to tell the outputs apart.
Its mixer layout matches the one of the MSI MPG X570S Carbon Max Wifi
(units 29, 30 and 32), so reuse msi_mpg_x570s_carbon_max_wifi_alc4080_map
for this device too. With the mapping applied, the controls show up as
"Speaker", "Front Headphone" and "IEC958".
Tested with a patched snd-usb-audio module on a 7.2.7 kernel.
Signed-off-by: Tomasz Bojanowski <tomasz@bojanowski.me>
Link: https://patch.msgid.link/20260923184957.6687-1-tomasz@bojanowski.me
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a four-line USB mixer-map ID addition for an existing `snd-usb-
audio` quirk table. The local tree is **6.18.57**; the reused ALC4080
map is already here, and the new ID is not in `v6.18.57`.
---
## PHASE 1: COMMIT MESSAGE FORENSICS
**Step 1.1: PARSE THE SUBJECT LINE**
Record: **[ALSA/usb-audio] [Add] mixer mapping for MSI MAG B850M MORTAR
WIFI (USB ID 0db0:cc78)**
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- **Fixes:** none (expected for this review class)
- **Reported-by:** none
- **Tested-by:** none as a tag; body says the author tested a patched
`snd-usb-audio` on **7.2.7**
- **Reviewed-by / Acked-by:** none in the commit; mailing-list apply-ack
from Takashi Iwai
- **Link:**
`https://patch.msgid.link/20260923184957.6687-1-tomasz@bojanowski.me`
- **Cc: stable:** absent (not a negative signal)
- **Signed-off-by:** Tomasz Bojanowski (author); Takashi Iwai
`<tiwai@suse.de>` (SOUND maintainer). Ignore Sasha Levin.
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** USB audio `0db0:cc78` (Realtek ALC4080 on MSI MAG B850M
MORTAR WIFI) exposes every playback control as `"PCM"`, so speaker,
front headphone, and S/PDIF cannot be told apart.
- **Symptom:** unusable/ambiguous mixer controls;
PulseAudio/PipeWire/UCM cannot bind the right output.
- **Root cause:** generic USB mixer names; layout matches existing MSI
ALC4080 maps (units 29, 30, 32).
- **Fix:** reuse `msi_mpg_x570s_carbon_max_wifi_alc4080_map`.
- **Version info:** tested on 7.2.7; hardware is a current AM5 board, so
6.18.y users have this device.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: **Not a hidden fix.** It is an explicit hardware quirk / mixer-
map ID addition. Not cleanup or a new API.
---
## PHASE 2: DIFF ANALYSIS
**Step 2.1: INVENTORY THE CHANGES**
Record:
- **File:** `sound/usb/mixer_maps.c` — **+4 / −0**
- **Function/data:** `usbmix_ctl_maps[]` only
- **Scope:** single-file surgical table entry
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record: **Before:** `snd_usb_mixer_controls()` walks `usbmix_ctl_maps`;
`0x0db0:0xcc78` misses, so units keep generic `"PCM"` names. **After:**
that ID selects `msi_mpg_x570s_carbon_max_wifi_alc4080_map`, and
`find_map()` / `check_mapped_name()` rename units 29/30/32. Probe-time
mixer build only; other USB IDs unchanged.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: **[Hardware workaround / USB mixer-map ID]** — same pattern as
PCI/USB ID additions. No leak, race, or crash.
Verified map in this tree:
```476:481:sound/usb/mixer_maps.c
static const struct usbmix_name_map
msi_mpg_x570s_carbon_max_wifi_alc4080_map[] = {
{ 29, "Speaker Playback" },
{ 30, "Front Headphone Playback" },
{ 32, "IEC958 Playback" },
{}
};
```
Lookup in `snd_usb_mixer_controls()`:
```3278:3286:sound/usb/mixer.c
for (map = usbmix_ctl_maps; map->id; map++) {
if (map->id == state.chip->usb_id) {
state.map = map->map;
state.selector_map = map.selector_map;
mixer->connector_map = map->connector_map;
break;
}
}
```
**Step 2.4: ASSESS THE FIX QUALITY**
Record: **Obviously correct.** Four lines, reuses a 2022 map already
used for two MSI ALC4080 IDs. **Regression risk: very low** — scoped to
one USB ID; wrong names would only affect that board, and the author
tested it. No locking, allocation, or API change.
---
## PHASE 3: GIT HISTORY INVESTIGATION
**Step 3.1: BLAME THE CHANGED LINES**
Record: Candidate lines blamed to `53b3abbe6e262` (this patch). Reused
map from **`5762f980ca10d`** (Johannes Schickel, 2022-01-15, “add
mapping for MSI MPG X570S Carbon Max Wifi”). Sibling ID `0x0db0:0xa073`
from **`4ddef9c4d70aa`** (2022-04-18, Torpedo Max). Neighboring
`usbmix_ctl_maps` MSI/ASUS entries date to 2020.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: **No Fixes: tag.** Bug is missing a device-specific map, not a
regression from a named commit. Prerequisite map **is** in this series:
`git merge-base --is-ancestor 5762f980ca10d v6.18.57` → yes; same for
`4ddef9c4d70aa`.
**Step 3.3: CHECK FILE HISTORY**
Record: Recent `mixer_maps.c` work is more ID/quirk entries (Corsair
Virtuoso, Razer Barracuda dB map, KTMicro rename, Corsair HS80).
**Standalone.** No “patch X/Y”.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Only this ALSA commit in-tree. Author is a hardware reporter,
not the maintainer. Weight comes from **Takashi Iwai** applying it.
**Step 3.5: DEPENDENT/PREREQUISITE COMMITS**
Record: Needs `msi_mpg_x570s_carbon_max_wifi_alc4080_map` and
`usbmix_ctl_maps[]`. Both exist at `v6.18.57`. **Applies standalone.**
Precedent: Torpedo Max (`4ddef9c4d70aa`) is the same reuse and carried
**`Cc: stable@vger.kernel.org`**. This 6.18.y tree already has later
mixer-map ID quirks (`5144ddfb71c18` Corsair Virtuoso later revision,
`a7de2b873f3db` HS80, `93adf20ff4d6e` KTMicro) — `git merge-base --is-
ancestor` of each vs `v6.18.57` is true.
---
## PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c 53b3abbe6e262` →
https://patch.msgid.link/20260923184957.6687-1-tomasz@bojanowski.me
- `b4 dig -a`: **v1 only**, 2026-09-23
- Thread: submission + Takashi Iwai **“Applied now. Thanks.”**
(2026-09-28). **No NAK, no revision requests, no stable discussion in-
thread.**
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): To/Cc **Takashi Iwai**, **Jaroslav Kysela**,
`linux-sound`, `linux-kernel`. Right maintainers. Maintainer applied v1
unchanged.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No bugzilla/syzbot. Author hit it on real hardware. Related
userspace: alsa-ucm-conf PR #581 (“add UCM2 support for MSI MAG B850M
Mortar Wifi (ALC4080)”) describes **front-panel and S/PDIF routing
problems** on this board. Kernel mixer names matter for UCM. That PR is
supporting context, not a second kernel report.
**Step 4.4: RELATED PATCHES AND SERIES**
Record: Standalone 1/1. A later lore subject “USB-Audio: add MSI MAG
B850M Mortar **Max** WiFi (0db0:83ed)” is a **different** USB ID — not a
dependency.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: `lore.kernel.org/stable/?q=...` returned **403**. Openwall/LKML
copies had **no stable NAK**. Unverified whether anyone mailed stable@
about this exact patch. Not used as a negative.
---
## PHASE 5: CODE SEMANTIC ANALYSIS
**Step 5.1: KEY FUNCTIONS**
Record: No function bodies changed. Data consumed by
`snd_usb_mixer_controls()` → `find_map()` → `check_mapped_name()`.
**Step 5.2: TRACE CALLERS**
Record: `snd_usb_mixer_controls()` runs when `snd-usb-audio` builds
mixers for a matching USB audio interface (device probe). Userspace-
reachable via plugging/enumerating this onboard codec.
**Step 5.3: TRACE CALLEES**
Record: `find_map` is a linear table walk; `check_mapped_name` copies a
string into `kctl->id.name`. No alloc/lock beyond existing mixer control
creation.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: USB enumerate → `snd-usb-audio` probe → mixer parse → kcontrol
names. **Yes, reachable** for anyone with this motherboard. Unprivileged
users see the names via ALSA/PulseAudio; they cannot trigger a kernel
crash with this change.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same map already used for `0x0db0:0x419c` and `0x0db0:0xa073`.
This is the established ALC4080 pattern.
---
## PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record:
- `git describe HEAD` → **`v6.18.57-155-gcdf239ca885b2`**
- `make kernelversion` → **6.18.57**
- `v6.18.57:sound/usb/mixer_maps.c` has the ALC4080 map and IDs `0x419c`
/ `0xa073`, **not** `0xcc78`
- The unmapped-ID bug **exists on this 6.18.y base**
- `git merge-base --is-ancestor 53b3abbe6e262 v6.18.57` → **false** (not
in the 6.18.57 tag)
(The candidate is present on current HEAD because autosel applied it for
evaluation. That is ignored as selection evidence.)
**Step 6.2: BACKPORT COMPLICATIONS**
Record: **Clean apply.** Context around the Torpedo Max entry is
identical at `v6.18.57`. Needle found; `0xcc78` absent; map symbol
present.
**Step 6.3: RELATED FIXES ALREADY HERE**
Record: Carbon Max and Torpedo Max maps are here. **No equivalent
`0xcc78` mapping** at `v6.18.57`.
---
## PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
**Step 7.1:** Record: **ALSA USB audio (`sound/usb/`)** — **IMPORTANT**
(common onboard USB audio on AM5 boards). Not core mm/net, not staging.
**Step 7.2:** Record: Active; this 6.18.y tree already backports mixer-
map ID quirks. SOUND maintainers: Takashi Iwai, Jaroslav Kysela
(`MAINTAINERS`).
---
## PHASE 8: IMPACT AND RISK ASSESSMENT
**Step 8.1:** Record: **Driver-specific / USB-ID-specific** — MSI MAG
B850M MORTAR WIFI (`0db0:cc78`) with `CONFIG_SND_USB_AUDIO`. Other
devices unaffected.
**Step 8.2:** Record: Trigger is **every probe** of that codec. Common
for that board. Unprivileged users see wrong mixer names; not a syscall
crash.
**Step 8.3:** Record: **Failure mode:** all playback controls named
`"PCM"` → users cannot control speaker vs headphone vs IEC958
independently; userspace routing/UCM can pick the wrong output.
**Severity: MEDIUM** as a functional hardware quirk (not
oops/corruption). Still the class stable explicitly wants.
**Step 8.4:** Record: **Benefit: high for those boards, zero
elsewhere.** **Risk: very low** (4 lines, one ID). **Ratio: strongly
favorable.**
---
## PHASE 9: FINAL SYNTHESIS
**Step 9.1: EVIDENCE**
**For:**
- Official rule: *“fix a real bug that bothers people **or just add a
device ID**”* and *hardware quirk* (`Documentation/process/stable-
kernel-rules.rst`)
- Same class as USB/PCI ID and mixer-map quirks routinely taken into
6.18.y
- Identical 2022 sibling (Torpedo Max) was **Cc: stable**
- Real hardware: ALC4080 with colliding `"PCM"` names
- 4 lines, reuses an in-tree map, maintainer-applied, author-tested
- Map + table exist at `v6.18.57`; applies cleanly
- Only that USB ID is affected
**Against:**
- Not a crash, UAF, or security fix
- No Fixes:/Cc: stable on this commit (expected; not a veto)
- No second independent reporter in the kernel thread
**Unresolved:**
- lore.kernel.org/stable search 403 — no verified stable-list thread
- Commit text says controls show as `"Speaker"` / `"Front Headphone"` /
`"IEC958"`; table strings are `"* Playback"`. Same as the 2022 map.
Does not change correctness.
**Step 9.2: STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — 4-line ID add; author
tested; maintainer applied
2. Fixes a real bug that affects users? **PASS** — indistinguishable
mixer controls on real hardware
3. Important issue? **PASS** as **hardware quirk / device ID**
(documented exception); not a panic
4. Small and contained? **PASS** — +4 lines, one file
5. No new features or APIs? **PASS** — existing map, existing driver
6. Can apply to the local tree? **PASS** — clean against `v6.18.57`
**Step 9.3: EXCEPTION CATEGORY**
Record: **Device ID addition + hardware quirk/workaround** (USB mixer-
map ID on existing `snd-usb-audio`).
**Step 9.4: DECISION**
Backport. This is the standard stable-eligible USB mixer ID quirk:
small, isolated, already-supported driver, real board, in-tree map.
---
### What the commit solves and why it matters here
On this 6.18.y tree, `snd-usb-audio` already drives Realtek ALC4080
motherboard codecs, but `0db0:cc78` has no name map. All playback
volumes appear as `"PCM"`, so users (and UCM) cannot separate speaker,
front headphone, and S/PDIF. The patch binds that ID to the existing MSI
ALC4080 map.
### Stable rules / risk vs benefit
Meets the written stable rules via the **device ID / hardware quirk**
exception. Benefit is correct mixer labels for this AM5 board; risk is
confined to that USB ID. No prerequisites beyond code already in
`v6.18.57`.
### Concerns
None material. Different Mortar **Max** ID `0db0:83ed` is a separate
patch and not required. Presence of this commit on current autosel HEAD
is evaluation-pipeline state, not a reason to skip a technical YES.
---
### Verification
- **[Phase 1]** Parsed subject/tags/body from `git show 53b3abbe6e262`;
Link msgid `20260923184957.6687-1-tomasz@bojanowski.me`
- **[Phase 2]** Diff: +4 lines in `usbmix_ctl_maps[]`; map contents and
`snd_usb_mixer_controls()` lookup read in this tree
- **[Phase 3]** `git blame` on map (5762f980ca10d, 2022) and ID rows;
Torpedo Max `4ddef9c4d70aa` has `Cc: stable`; `git merge-base --is-
ancestor` of map/Torpedo vs `v6.18.57` = yes
- **[Phase 3]** `git log --oneline -20 -- sound/usb/mixer_maps.c`;
author search only this commit
- **[Phase 4]** `b4 dig -c/-a/-w` and `-m /tmp/thread.mbox`: v1 only; To
Iwai/Kysela/linux-sound; Iwai “Applied now”
- **[Phase 4]** Openwall + LKML mirrors of the same thread;
lore.kernel.org 403 on patch.msgid.link and stable search
- **[Phase 4]** Web search found alsa-ucm-conf PR #581 for this board
(userspace routing)
- **[Phase 5]** Call path: `snd_usb_mixer_controls` → `find_map` →
`check_mapped_name` verified in `mixer.c`
- **[Phase 6]** `git describe HEAD` = `v6.18.57-155-gcdf239ca885b2`;
`make kernelversion` = 6.18.57; `git grep` on `v6.18.57 --
sound/usb/mixer_maps.c`: map yes, `0xcc78` no; ancestor check of
candidate vs `v6.18.57` = no
- **[Phase 6]** Context around Torpedo Max entry identical at `v6.18.57`
(clean apply)
- **[Phase 6]** Similar mixer-map ID quirks already in `v6.18.57`
(Corsair Virtuoso, HS80, KTMicro)
- **[Phase 7]** SOUND maintainers in `MAINTAINERS`; `sound/usb/` still
receiving 6.18.y quirks
- **[Phase 8]** Failure mode is misnamed mixer controls for one USB ID,
not a kernel oops
- **UNVERIFIED:** whether this patch was already discussed on stable@
(lore stable search 403)
The patch is a contained hardware quirk for an existing driver and
should be taken into this 6.18.y tree.
**YES**
sound/usb/mixer_maps.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c
index ace4ccad8f51c..a82b9c1d578d9 100644
--- a/sound/usb/mixer_maps.c
+++ b/sound/usb/mixer_maps.c
@@ -718,6 +718,10 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
.id = USB_ID(0x0db0, 0xa073),
.map = msi_mpg_x570s_carbon_max_wifi_alc4080_map,
},
+ { /* MSI MAG B850M MORTAR WIFI */
+ .id = USB_ID(0x0db0, 0xcc78),
+ .map = msi_mpg_x570s_carbon_max_wifi_alc4080_map,
+ },
{ /* MSI TRX40 */
.id = USB_ID(0x0db0, 0x543d),
.map = trx40_mobo_map,
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Fix mute LED for HP Victus 15-fa1xxx (MB 8C3F)
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (39 preceding siblings ...)
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-5.15] ALSA: usb-audio: Add mixer mapping for MSI MAG B850M MORTAR WIFI Sasha Levin
@ 2026-10-19 13:50 ` Sasha Levin
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-6.1] ASoC: amd: yc: Add DMI quirk for Lenovo V15 G6 ARP Sasha Levin
` (20 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:50 UTC (permalink / raw)
To: patches, stable
Cc: Yashraj Ghule, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Yashraj Ghule <yashrajghule.221@gmail.com>
[ Upstream commit 19b02fecd8f857909af779afe3816e487ac10cd0 ]
The HP Victus 15-fa1xxx with motherboard 8C3F is missing the
existing mute LED quirk for ALC245 codecs.
Add the 103c:8c3f subsystem ID to the existing
ALC245_FIXUP_HP_MUTE_LED_COEFBIT quirk.
Tested on HP Victus 15-fa1xxx (MB 8C3F). The mute LED works
as intended.
Signed-off-by: Yashraj Ghule <yashrajghule.221@gmail.com>
Link: https://patch.msgid.link/20260816110655.11592-1-yashrajghule.221@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
Confirmed: this is a one-line HDA subsystem-ID quirk, the existing
ALC245 mute-LED fixup is already in 6.12, and 0x8c3f is not. Writing the
full nine-phase analysis.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: **[ALSA: hda/realtek]** **[Fix]** mute LED for HP Victus
15-fa1xxx motherboard 8C3F by adding PCI/HDA subsystem ID `103c:8c3f` to
an existing quirk.
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- **Fixes:** none (expected for this review pipeline)
- **Reported-by:** none
- **Tested-by:** none as a tag; the body states the author tested it on
the matching machine
- **Reviewed-by:** none
- **Acked-by:** none
- **Link:** `https://patch.msgid.link/20260816110655.11592-1-
yashrajghule.221@gmail.com`
- **Cc: stable:** none (expected; not a negative signal)
- **Signed-off-by:** Yashraj Ghule `<yashrajghule.221@gmail.com>`
(author); Takashi Iwai `<tiwai@suse.de>` (ALSA maintainer)
- Ignore any Sasha Levin SOB if present in candidate packaging
Notable: ALSA maintainer SOB; author-tested; no syzbot/crash report (not
expected for a hardware quirk).
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** HP Victus 15-fa1xxx with motherboard ID 8C3F does not match
the existing ALC245 mute-LED quirk, so the mute LED does not follow
mute state.
- **Symptom:** mute LED stays wrong / does not work.
- **Version info:** none in the message.
- **Root cause:** missing `SND_PCI_QUIRK` for SSID `103c:8c3f`. Same
product line already has other SSIDs (this tree already has
`103c:8bc8` "HP Victus 15-fa1xxx").
- **Fix:** add that SSID to `ALC245_FIXUP_HP_MUTE_LED_COEFBIT`.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not a hidden fix. It is an explicit hardware quirk / device-ID
addition. The verb "Fix" is accurate: the LED hardware is already there;
the driver never maps this SSID onto the existing coefbit LED helper.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File in the candidate: `sound/hda/codecs/realtek/alc269.c` (+1 / −0)
- This 6.12 tree still uses `sound/pci/hda/patch_realtek.c` (codec split
not present)
- Function/table: `alc269_fixup_tbl[]`
- Scope: single-file, one-line surgical quirk addition
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- **Before:** `snd_hda_pick_fixup()` during Realtek ALC269-family probe
walks `alc269_fixup_tbl` by PCI SSID. `103c:8c3f` does not match.
Probe then may fall through to pin fixups and the vendor-wide HP entry
`SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED)`
(`alc269_fixup_vendor_tbl`). That generic HP LED path is not the
ALC245 coefbit path used by other Victus 15-fa/fb machines.
- **After:** SSID `103c:8c3f` matches
`ALC245_FIXUP_HP_MUTE_LED_COEFBIT`, so
`alc245_fixup_hp_mute_led_coefbit()` runs at `HDA_FIXUP_ACT_PRE_PROBE`
and registers the mute LED via coef index 0x0b.
- Path affected: codec probe / mute-LED setup on that one HP SSID only.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record:
- **Category:** hardware workaround / device ID addition (stable
exception).
- **Mechanism:** HP reused the Victus 15-fa1xxx name across motherboard
SSIDs (`8bc8` already in this tree; mainline also has `8c2d`, `8c3f`,
and later `8bb1`). Quirk matching is exact vendor:device. Missing ID →
LED not driven by the ALC245 coefbit helper.
- Not UAF, leak, race, or crash.
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- Obviously correct: one `SND_PCI_QUIRK` using the same fixup already
used by many Victus SKUs in this file (`8a4f`, `8a50`, `8bc8`, `8c30`,
`8c99`, `8c9c`, …).
- Minimal; no unrelated edits.
- Regression risk is very low: the new entry is SSID-specific. Wrong
SSID would not match. Same helper is already production-used on this
tree.
- v2 reordering (SSID sort) does not change runtime (the table is a
match list, not order-dependent beyond uniqueness).
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- Insertion sits next to `SND_PCI_QUIRK(0x103c, 0x8c30, "HP Victus
15-fb1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT)` — blamed to
`b474f60f6a0c9` (Adam Queler, 2024-09-03), already in this tree,
originally `Cc: stable`.
- The fixup enum/function `ALC245_FIXUP_HP_MUTE_LED_COEFBIT` /
`alc245_fixup_hp_mute_led_coefbit()` exists here (`patch_realtek.c`
around 4778 and 10522).
- Helper was brought in via `c4cc8f6c31263` ("ALSA: hda/realtek -
Support mute led function for HP platform", upstream `22c7f77247a8`),
ancestor of HEAD.
- Same product line: `96fe253552c26` already added `103c:8bc8` "HP
Victus 15-fa1xxx" to this tree (upstream `a0914bf56e26`, `Cc:
stable`).
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. N/A. The "bug" is a missing table entry, not a
regression from a specific prior commit.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record:
- This tree already contains many of the same class of patches (git log
`--grep='mute LED' -- sound/pci/hda/patch_realtek.c` returned 166
commits).
- Recent examples: Victus 16-e0xxx MB 88ED (`faee5b4612c26`), Victus
15-fa0xxx MB 8A50 (`0ecc9d81b46b1`), Victus 16-s0xxx, 16-r0xxx,
15-fb1xxx (`b474f60f6a0c9`).
- Mainline context line `103c:8c2d` "HP Victus 15-fa1xxx (MB 8C2D)" is
**not** in this tree (`git log --grep='8C2D' --
sound/pci/hda/patch_realtek.c` empty). That is neighboring context,
not a functional prerequisite.
- Standalone: yes. Not patch X/Y.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: `git log --author='Yashraj Ghule' -- sound/pci/hda/` is empty in
this tree. Author is an end-user contributor, not the subsystem
maintainer. Weight comes from Takashi Iwai applying it, plus the well-
worn quirk pattern.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record:
- Needs `ALC245_FIXUP_HP_MUTE_LED_COEFBIT` and `alc269_fixup_tbl` — both
present.
- Does **not** need the later `alc269.c` file split.
- Does **not** need the 8C2D quirk.
- Can apply standalone with path remap to
`sound/pci/hda/patch_realtek.c` and insertion after the existing
`0x8c30` line.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c <HEAD>` cannot match this commit; it is not in this
checkout.
- `b4 mbox` on Message-ID
`20260816110655.11592-1-yashrajghule.221@gmail.com` found **4
messages**.
- Thread: v1 (15 Aug 2026) → Takashi review → v2 (16 Aug 2026) → Takashi
"Applied now."
- v1 issues (not technical risk of the quirk): SOB must use a real name;
table must stay in PCI SSID order (`8c3f` belongs after `8c30`, not
before).
- v2 addressed both; that is the committed form.
- No NAK. No reviewer concern about the quirk itself. No `Cc: stable` in
the thread.
- lore.kernel.org HTTP fetch returned 403; thread recovered from lore
via `b4 mbox`.
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (from mbox, equivalent of `b4 dig -w`):
- To: Jaroslav Kysela `perex@perex.cz`
- Cc: Takashi Iwai `tiwai@suse.de`, `linux-sound@vger.kernel.org`
- Reviewer/applier: Takashi Iwai (ALSA/HDA maintainer)
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No bugzilla/syzbot link. Evidence of user impact is the author
test on HP Victus 15-fa1xxx (MB 8C3F). Same model family already needed
extra SSIDs (8bc8 here; 8C2D and 8BB1 in later/mainline discussion),
which matches HP shipping multiple board IDs under one marketing name.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone v1→v2, not a multi-patch series. Related but
independent: 8C2D (Eren Demir) and 8BB1 (Krish Gulati / bugzilla 221982)
add other fa1xxx SSIDs. None of those replace 8C3F.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: No stable-list discussion found for 8C3F specifically. Closely
related 8bc8 and 8c30 quirks in this tree **did** carry `Cc: stable` and
were backported. That is the established policy for this exact pattern,
not evidence this commit was already selected.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: KEY FUNCTIONS**
Record: table `alc269_fixup_tbl`; runtime helper
`alc245_fixup_hp_mute_led_coefbit()` (unchanged); picker
`snd_hda_pick_fixup()`.
**Step 5.2: TRACE CALLERS**
Record:
- Realtek ALC269-family probe in `patch_realtek.c` (~12583) calls
`snd_hda_pick_fixup(..., alc269_fixup_tbl, alc269_fixups)`.
- Then `snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE)` (~12606).
- Context: codec probe (device enumeration), not IRQ/hot path.
**Step 5.3: TRACE CALLEES**
Record: `alc245_fixup_hp_mute_led_coefbit()` sets `spec->mute_led_coef`
(idx 0x0b, mask/on/off bits) and `snd_hda_gen_add_mute_led_cdev(codec,
coef_mute_led_set)`.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: userspace/hw mute → HDA mixer/LED classdev → coef write.
Reachable on this laptop at boot + mute key. Not a syscall security
path.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: many `ALC245_FIXUP_HP_MUTE_LED_COEFBIT` rows for Victus SSIDs
already in this file (including `0x8bc8` 15-fa1xxx and `0x8c30`
15-fb1xxx). Same bug, different board ID — systematic HP SSID
fragmentation.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record:
- Tree: `pending-6.12` / `git describe` `p-6.12-3-gc504cf0baa3d8` /
`make kernelversion` **6.12.111**.
- `sound/hda/codecs/realtek/alc269.c` does **not** exist.
- Equivalent table: `sound/pci/hda/patch_realtek.c` `alc269_fixup_tbl`.
- `0x8c3f` is **absent** (`grep` on that file: no match).
- `ALC245_FIXUP_HP_MUTE_LED_COEFBIT` **is** present.
- Nearby `0x8c30` **is** present (line 11088).
- Nearby mainline `0x8c2d` is **absent**.
- Bug is a missing ID, not a post-6.12 logic regression. The machine and
the helper both exist for 6.12 users.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: **minor path/context adjustment**, not a rework.
- Remap file to `sound/pci/hda/patch_realtek.c`.
- Insert after `0x8c30` (8c2d context from mainline is missing, so a
verbatim git-apply of the mainline hunk may not be fully clean).
- No API/data-structure change.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: `0x8bc8` covers a different fa1xxx SSID, not 8C3F. Exact PCI
SSID match only. No substitute for this ID.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: SUBSYSTEM AND CRITICALITY**
Record: ALSA HD-audio / Realtek codec (`sound/pci/hda/`). **IMPORTANT**
for laptop audio users, **PERIPHERAL** in blast radius (one HP SSID).
Not mm/fs/net core.
**Step 7.2: SUBSYSTEM ACTIVITY**
Record: High churn of device quirks; this file is the standard place for
HP mute-LED IDs. Mature helper, incremental table growth.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: WHO IS AFFECTED**
Record: **driver-specific / hardware-specific** — only HP SSID
`103c:8c3f` (Victus 15-fa1xxx MB 8C3F). CONFIG_SND_HDA_CODEC_REALTEK
(standard laptop configs).
**Step 8.2: TRIGGER CONDITIONS**
Record: every boot + mute on that SKU. Not a race. Unprivileged user can
observe the LED; not a privilege-escalation path.
**Step 8.3: FAILURE MODE SEVERITY**
Record: mute LED does not track mute. **MEDIUM** functionally (no
oops/corruption). Still a real hardware bug. Stable rules explicitly
include device IDs and hardware quirks.
**Step 8.4: RISK-BENEFIT RATIO**
Record:
- **Benefit:** restores mute LED on a shipping HP Victus SKU for 6.12
users; same class already backported here many times.
- **Risk:** very low (one SSID-guarded line, existing helper).
- **Ratio:** strongly favors backport.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Stable rules: "fix a real bug … **or just add a device ID**" and
"**hardware quirk**" (`Documentation/process/stable-kernel-rules.rst`
lines 15–20).
- One-line addition to an existing driver/fixup.
- Target SSID missing; helper and table present in 6.12.111.
- Author tested on the exact machine; ALSA maintainer applied v2.
- Same Victus 15-fa1xxx family already has `8bc8` in this tree; 8C3F is
another board ID.
- Dozens of identical mute-LED quirk backports already in this file.
AGAINST:
- Not a crash/security/data-corruption fix.
- Mainline path differs (`alc269.c` vs `patch_realtek.c`); 8c2d context
line missing (trivial).
- No `Cc: stable` on the original (expected here; similar quirks often
still go to stable).
UNRESOLVED:
- Direct lore.kernel.org HTTP was 403; discussion was recovered via `b4
mbox`.
- Could not `b4 dig -c` an upstream SHA because that commit is not in
this checkout.
- No independent bugzilla for 8C3F (author is the tester).
**Step 9.2: STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — one table entry; author
tested; maintainer applied.
2. Fixes a real bug that affects users? **PASS** — mute LED dead on that
SKU.
3. Important issue? **PASS** as hardware quirk / device ID (severity
MEDIUM, allowed exception).
4. Small and contained? **PASS** — +1 line.
5. No new features or APIs? **PASS** — enables existing fixup for one
SSID.
6. Can apply to the local tree? **PASS** — helper+table exist; needs
path remap and insert after `0x8c30`.
**Step 9.3: EXCEPTION CATEGORIES**
Record: **Device ID addition to an existing driver** and **hardware
quirk/workaround** (HDA `SND_PCI_QUIRK`).
**Step 9.4: DECISION**
This should be backported to **this** 6.12 tree. The bug is present
(missing `103c:8c3f`), the fix is the standard Realtek mute-LED quirk,
and it is self-contained aside from a trivial file-path/context tweak.
What it solves for stable users: HP Victus 15-fa1xxx systems with
motherboard SSID 8C3F get a working mute LED, matching other
fa1xxx/fb1xxx board IDs already quirked here.
Risk vs benefit: one SSID-specific line vs a user-visible LED bug on a
current consumer laptop. Benefit dominates.
Concerns: apply to `sound/pci/hda/patch_realtek.c`, not `alc269.c`; do
not require the absent 8C2D row.
Verification:
- [Phase 1] Parsed subject/tags/body from the candidate message; Link
msgid `20260816110655.11592-1-yashrajghule.221@gmail.com`; SOBs Ghule
+ Iwai; no Fixes/syzbot/stable Cc.
- [Phase 2] Diff is +1 `SND_PCI_QUIRK(0x103c, 0x8c3f, ...,
ALC245_FIXUP_HP_MUTE_LED_COEFBIT)` in `alc269_fixup_tbl`.
- [Phase 3] `git describe HEAD` → `p-6.12-3-gc504cf0baa3d8`; `make
kernelversion` → 6.12.111; branch `pending-6.12`.
- [Phase 3] `alc269.c` missing; quirk table in
`sound/pci/hda/patch_realtek.c`.
- [Phase 3] `grep 0x8c3f` in that file: no match.
`ALC245_FIXUP_HP_MUTE_LED_COEFBIT` present (enum ~8222, fixup ~10522,
function ~4778).
- [Phase 3] `0x8c30` present (blame `b474f60f6a0c9`); `0x8bc8` present
(`96fe253552c26`); `0x8c2d` absent.
- [Phase 3] `git merge-base --is-ancestor` for `b474f60f6a0c9` and
`c4cc8f6c31263`: both ancestors of HEAD.
- [Phase 3] `git log --grep='mute LED' --
sound/pci/hda/patch_realtek.c`: 166 commits of the same class.
- [Phase 4] `b4 mbox` on the msgid: v1, Takashi review (SOB name + SSID
sort), v2, "Applied now."
- [Phase 4] Recipients: perex, tiwai, linux-sound. No NAK.
- [Phase 4] lore WebFetch 403; discussion taken from the saved mbox.
- [Phase 5] Probe path `snd_hda_pick_fixup` ~12583 →
`snd_hda_apply_fixup` PRE_PROBE ~12606; vendor HP fallback
`ALC269_FIXUP_HP_MUTE_LED` at `alc269_fixup_vendor_tbl`.
- [Phase 6] Backport difficulty: path remap + insert after 8c30 (8c2d
context missing).
- [Phase 7] ALSA HDA Realtek; quirk-table activity high.
- [Phase 8] Failure: mute LED inoperative on one HP SSID; severity
MEDIUM; risk very low.
- UNVERIFIED: upstream mainline SHA of this commit (not in this
checkout; `b4 dig -c HEAD` cannot match it).
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 9ec18f779a700..bc33930e83b9f 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -6974,6 +6974,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8c21, "HP Pavilion Plus Laptop 14-ey0XXX", ALC245_FIXUP_HP_X360_MUTE_LEDS),
SND_PCI_QUIRK(0x103c, 0x8c2d, "HP Victus 15-fa1xxx (MB 8C2D)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
SND_PCI_QUIRK(0x103c, 0x8c30, "HP Victus 15-fb1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
+ SND_PCI_QUIRK(0x103c, 0x8c3f, "HP Victus 15-fa1xxx (MB 8C3F)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
SND_PCI_QUIRK(0x103c, 0x8c46, "HP EliteBook 830 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8c47, "HP EliteBook 840 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8c48, "HP EliteBook 860 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.1] ASoC: amd: yc: Add DMI quirk for Lenovo V15 G6 ARP
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (40 preceding siblings ...)
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Fix mute LED for HP Victus 15-fa1xxx (MB 8C3F) Sasha Levin
@ 2026-10-19 13:50 ` Sasha Levin
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-5.10] ALSA: usb-audio: Skip mixer creation on M-Audio Venom Sasha Levin
` (19 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:50 UTC (permalink / raw)
To: patches, stable
Cc: Daniel Ortiz, Mark Brown, Sasha Levin, Vijendar.Mukunda,
lgirdwood, perex, tiwai, linux-sound, linux-kernel
From: Daniel Ortiz <letargopausado@gmail.com>
[ Upstream commit d395e1b62d9694f2e4add9122f8d473eacd374aa ]
The Lenovo V15 G6 ARP (product name 83UU) uses the ACP6x PDM interface
for its internal digital microphone array. Its firmware exposes neither
the AcpDmicConnected _DSD property nor the _WOV method, so acp6x_probe()
falls through to the DMI check and returns -ENODEV, leaving
acp_yc_mach.0 unbound and no capture device registered.
Add a DMI quirk entry for this model. With it, the machine driver binds
and the DMIC capture device is created:
acp_yc_mach acp_yc_mach.0: Enabling ACP DMIC support via DMI
card 2: acp6x [acp6x], device 0: DMIC capture dmic-hifi-0
Capture was verified working with arecord and PipeWire.
Signed-off-by: Daniel Ortiz <letargopausado@gmail.com>
Link: https://patch.msgid.link/20260920011920.2482786-1-letargopausado@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
Local tree is **6.18.y** (`v6.18.57-155-gcdf239ca885b2`, `VERSION=6
PATCHLEVEL=18 SUBLEVEL=57`). Verdict is for this tree only.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: **[ASoC/amd/yc] [Add] [DMI quirk so Lenovo V15 G6 ARP (83UU)
binds the existing ACP6x DMIC machine driver]**
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Fixes:`: none (expected)
- `Reported-by:`: none
- `Tested-by:`: none as a tag; body says capture was verified with
arecord and PipeWire
- `Reviewed-by:`: none
- `Acked-by:`: none
- `Link:`: https://patch.msgid.link/20260920011920.2482786-1-
letargopausado@gmail.com
- `Cc: stable@vger.kernel.org`: absent (expected; not a negative)
- `Signed-off-by: Daniel Ortiz <letargopausado@gmail.com>` (author)
- `Signed-off-by: Mark Brown <broonie@kernel.org>` (ASoC maintainer)
- Pipeline tags (`[Upstream commit ...]`, `Signed-off-by: Sasha Levin`)
ignored per instructions
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** Lenovo V15 G6 ARP firmware exposes neither `AcpDmicConnected`
`_DSD` nor `_WOV`. `acp6x_probe()` therefore misses ACPI enablement,
the DMI table does not match, and probe returns `-ENODEV`.
- **Symptom:** `acp_yc_mach.0` stays unbound; no capture PCM is
registered (internal mic missing).
- **Root cause:** incomplete ACPI on this model; the driver already has
a DMI fallback table for that class of firmware.
- **Fix:** add `LENOVO` / `83UU` to `yc_acp_quirk_table`. After that,
dmesg shows `Enabling ACP DMIC support via DMI` and `DMIC capture
dmic-hifi-0`.
- **Version info:** none in the message. Maintainer applied it to
`for-7.3`.
- **Author explanation:** firmware gap → DMI check → `-ENODEV`; quirk
makes the existing machine driver bind.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not a disguised cleanup. It is an explicit hardware-quirk
addition. That is a documented stable exception (quirks/workarounds for
broken firmware), not a new driver or API.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/soc/amd/yc/acp6x-mach.c` — **+7 / -0**
- Function/object: `yc_acp_quirk_table[]` only
- Scope: **single-file surgical quirk** (one `dmi_system_id` entry)
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- **Before:** DMI match on this model fails; if ACPI
`_WOV`/`AcpDmicConnected` also fail, `platform_get_drvdata()` is NULL
and `acp6x_probe()` returns `-ENODEV`.
- **After:** `dmi_first_match()` hits `LENOVO`+`83UU`, sets drvdata to
`&acp6x_card`, and the existing DMIC card is registered.
- Path affected: **probe/init** for this DMI identity only. Other
machines unchanged.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: **[Hardware workaround / DMI quirk]** Incomplete ACPI means the
existing DMI table is the only enable path. Missing table entry → probe
failure → no capture device. Same pattern as the many Lenovo/HP/ASUS
entries already in this file.
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- Obviously correct: copies the established `{ .driver_data =
&acp6x_card, DMI_BOARD_VENDOR "LENOVO", DMI_PRODUCT_NAME "<sku>" }`
pattern used by `83N6`/`83Q2`/`83Q3`.
- Minimal: 7 lines, no logic, locking, or API change.
- Regression risk: **very low**. Match is vendor+product SKU `83UU`.
Wrong enablement would only hit that SKU; author confirmed capture
works on the real machine.
- Red flags: none.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- Insertion sits after Lenovo `83Q3` (from `b9a8ea185f3f8` “ASoC: acp:
Support microphone from Lenovo Go S”, in this tree since
**v6.14-rc1**).
- Driver file and table originated in `fa991481b8b22` (“ASoC: amd: add
YC machine driver using dmic”, **v5.16-rc3**).
- DMI override in probe: `e521f087780d07` (2022-04-11).
- `_WOV` failure → `goto check_dmi_entry`: `984795e76def5c` (“ASoC: amd:
yc: Fix the wrong return value”, **v6.13-rc3**).
- Bug for this laptop is **absence of a DMI row**, not a recent logic
regression. The probe fallback this quirk uses is in 6.18.y.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Not applicable. The “broken” thing is this
model’s firmware plus a missing quirk row.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: This file is a long list of the same DMI additions (HP, Lenovo,
ASUS, MSI, Acer, …). Recent examples already in this tree: ThinkPad E16
Gen 2 (`21JN`), Acer Aspire Go 15, HyperX OMEN 16-ap1xxx, HP Victus
16-e1xxx. Standalone; not patch X/Y. No prerequisites beyond the
existing table and `acp6x_probe()` DMI fallback, both present.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: `git log --author='Daniel Ortiz' -- sound/soc/amd/` shows only
this commit. Author is a hardware reporter, not the subsystem
maintainer. Weight comes from Mark Brown applying it and from the
standard quirk pattern, not from maintainer authorship.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: Diff only needs `yc_acp_quirk_table`, `acp6x_card`, and
`dmi_first_match()` in `acp6x_probe()`. All exist in this checkout.
Applies standalone. Parent of the candidate already has `83Q3`
immediately before the insertion point.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c d395e1b62d9694f2e4add9122f8d473eacd374aa` → https://patch.m
sgid.link/20260920011920.2482786-1-letargopausado@gmail.com
- `b4 dig -a`: **v1 only** (2026-09-19). No later revision.
- lore.kernel.org fetch returned **403**; thread recovered from
Openwall/Patchew mirrors.
- Mark Brown applied it to
`git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
for-7.3` on 2026-09-21. No NAK, no requested respin, no reviewer
concern in the apply mail.
- No reviewer `Cc: stable` in the thread (not a negative).
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): To/Cc included Vijendar Mukunda (AMD ACP), Mark
Brown (ASoC), Liam Girdwood, Venkata Prasad Potturu, Jaroslav Kysela,
Takashi Iwai, linux-sound, linux-kernel. Maintainer applied it. No
Acked-by/Reviewed-by on the commit itself.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No bugzilla/syzbot link. Evidence of user impact is the author
reproducing missing capture, then verifying arecord/PipeWire after the
quirk. Web search confirms the same patch text; no independent multi-
user report found. **UNVERIFIED:** how many other 83UU owners hit this
(likely all of them given ACPI gap, but not counted).
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone 1/1 patch. Not part of a multi-patch series.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org/stable search returned 403 / no useful hits for
this subject. **UNVERIFIED:** no prior stable-list NAK or explicit
nomination found. Same class of ACP6x DMI quirks has historically been
AUTOSEL’d (e.g. MSI Bravo 15 C7UCX).
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
semcode MCP is not available; used file reads and `git grep`.
**Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF**
Record: No function body changed. Data only: `yc_acp_quirk_table[]`.
Consumer: `acp6x_probe()`.
**Step 5.2: TRACE CALLERS**
Record:
- `acp6x_mach_driver.probe = acp6x_probe` (`module_platform_driver`).
- Platform device `"acp_yc_mach"` registered from `sound/soc/amd/yc/pci-
acp6x.c` when ACP is in `ACP6x_PDM_MODE`.
- Context: PCI probe / boot on ACP6x Yellow Carp systems with
`CONFIG_SND_SOC_AMD_YC_MACH`. Not a hot path, IRQ, or syscall.
**Step 5.3: TRACE CALLEES**
Record: `acp6x_probe()` uses
`acpi_dev_get_property("AcpDmicConnected")`,
`acpi_evaluate_integer("_WOV")`, `dmi_first_match(yc_acp_quirk_table)`,
`devm_snd_soc_register_card()`. The quirk only changes whether
`dmi_first_match()` returns an entry.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Boot → ACP PCI driver → register `acp_yc_mach` → `acp6x_probe()`
→ ACPI miss → DMI table → with this entry, card registers. Userspace
then sees the capture PCM (arecord/PipeWire). Reachable on this laptop
without special config beyond the existing ASoC ACP6x machine driver.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: 108 `DMI_MATCH(DMI_BOARD_VENDOR` rows in this file. `83UU`
appears only once (this entry). Nearby Lenovo SKUs `83N6`/`83Q2`/`83Q3`
are Go S quirks from `b9a8ea185f3f8`, not this model.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: **Yes.** `sound/soc/amd/yc/acp6x-mach.c` is present.
`acp6x_probe()` still returns `-ENODEV` when ACPI and DMI both miss
(lines 845–853). Parent of the candidate has no `83UU`. Without this
row, Lenovo V15 G6 ARP has no capture device on **this** 6.18.y tree.
Driver dates to v5.16; DMI fallback is long-standing.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: **Clean apply.** Parent context is `83Q3` then Nitro ANV15-41;
the hunk is a pure insertion. No refactor of the table or probe vs this
tree.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: Many other DMI quirks are already in this tree. None match
`83UU`. No alternate fix for this SKU.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: **[ASoC AMD Yellow Carp DMIC machine driver] [PERIPHERAL /
driver-specific]** — important for owners of that laptop, not core
mm/fs. Config: `CONFIG_SND_SOC_AMD_YC_MACH` (`depends on
SND_SOC_AMD_ACP6x && ACPI`, `depends on X86 && PCI` for ACP6x).
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Actively maintained quirk table (many DMI additions through
2025–2026). Mechanism is mature; this commit does not change it.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: **Driver/platform-specific** — Lenovo V15 G6 ARP (DMI product
name `83UU`) with ACP6x PDM DMIC. No effect on other DMI IDs.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Every boot/probe on that model. Not a race. Unprivileged users
do not trigger a crash; they simply have **no microphone**. Common for
anyone using this SKU on 6.18.y.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: **Missing audio capture device** (internal mic dead). Not
panic/UAF/corruption. Severity **MEDIUM** for that hardware, but this is
the documented **hardware quirk** exception: without the row, the
existing driver cannot bind.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- **Benefit:** High for 83UU users (mic actually works); zero for
everyone else.
- **Risk:** Very low (7-line table add, unique SKU, author-tested).
- **Ratio:** Strongly favors backport.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real user-visible bug: no DMIC capture on Lenovo V15 G6 ARP because
firmware omits ACPI DMIC methods.
- Existing driver and DMI fallback are in 6.18.y; only the SKU row is
missing.
- Textbook stable exception: hardware quirk / DMI table entry on an
existing driver.
- 7 lines, copy of established pattern, ASoC maintainer applied v1
unchanged.
- Author verified arecord and PipeWire.
- Same class of ACP6x DMI quirks is already common in this tree.
AGAINST:
- Not a crash/security/corruption fix.
- Single-model, one reporter; no `Cc: stable` / `Fixes:` (expected).
- No independent second user report found.
UNRESOLVED:
- lore.kernel.org itself 403’d; discussion taken from b4 +
Openwall/Patchew.
- No stable-list thread found.
- Population of 83UU users not counted.
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — identical table pattern;
author tested capture.
2. Fixes a real bug that affects users? **PASS** — mic never appears
without the quirk.
3. Important issue? **PASS** under the hardware-quirk exception (broken
firmware / missing device), not a kernel crash.
4. Small and contained? **PASS** — +7 lines, one file.
5. No new features or APIs? **PASS** — no new driver, Kconfig, or
userspace API; enables existing DMIC machine driver for one SKU.
6. Can apply to the local tree? **PASS** — table and probe path present;
applies cleanly.
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Hardware quirk/workaround** (DMI match for firmware that does
not describe the DMIC). Closely analogous to device-ID additions.
**Step 9.4: MAKE YOUR DECISION**
This tree already has `acp6x_probe()`’s DMI fallback and a large
`yc_acp_quirk_table`. Adding `LENOVO`/`83UU` is the standard, low-risk
way to make the internal microphone work on the Lenovo V15 G6 ARP. It
should be backported to this 6.18.y tree.
------------------------------------------------
What the commit solves
The laptop’s ACPI does not advertise DMIC (`AcpDmicConnected` / `_WOV`).
Probe then depends on DMI, finds no match, returns `-ENODEV`, and users
get no capture device. One quirk row binds `acp_yc_mach` and registers
the existing ACP6x DMIC PCM.
Why it meets stable rules
It is a 7-line, obviously correct DMI quirk on a driver that already
exists in 6.18.y, tested on the hardware, with no API or behavioral
change except for that SKU.
Risk vs benefit
Benefit is a working microphone on this model; risk is confined to
`LENOVO`+`83UU`. That is the usual stable trade-off for ID/quirk
patches.
Concerns
None that block backport: no missing prerequisites, no apply conflicts,
no series dependency. Severity is “device missing,” not a panic, which
is still accepted for quirks.
Verification:
- [Phase 1] Subject/tags: ASoC amd yc DMI quirk; SOB Daniel Ortiz + Mark
Brown; Link msgid 20260920011920.2482786-1; no Fixes/Reported-
by/Cc:stable
- [Phase 1] Body: ACPI miss → DMI → -ENODEV; arecord/PipeWire
verification quoted
- [Phase 2] `git show`: +7 lines in `yc_acp_quirk_table` only
(`LENOVO`/`83UU` → `&acp6x_card`)
- [Phase 2] Read `acp6x_probe()` at 807–865: ACPI then
`dmi_first_match`; NULL card → `-ENODEV`
- [Phase 3] `git describe HEAD` / Makefile: **6.18.57**
- [Phase 3] `git blame`: 83UU row is this commit; neighbors 83Q3 from
`b9a8ea185f3f8` (v6.14-rc1)
- [Phase 3] File added `fa991481b8b22` (v5.16-rc3); DMI fallback
`e521f087780d07`; `_WOV` goto `984795e76def5c` (v6.13-rc3)
- [Phase 3] `git grep 83UU` on parent: absent; on HEAD: only this entry
- [Phase 3] Author log on `sound/soc/amd/`: only this commit
- [Phase 4] `b4 dig -c d395e1b62d96`: lore msgid match; `-a` v1 only;
`-w` AMD ACP + ASoC maintainers
- [Phase 4] Openwall 2026/09/20/35: original patch; 2026/09/21/1579:
Mark Brown applied to for-7.3
- [Phase 4] lore.kernel.org WebFetch 403; stable search: no relevant
hits
- [Phase 5] `git grep acp_yc_mach`: defined in acp6x-mach.c; registered
in pci-acp6x.c:238
- [Phase 5] Kconfig `SND_SOC_AMD_YC_MACH` depends on `SND_SOC_AMD_ACP6x
&& ACPI`
- [Phase 6] Probe/DMI table present in this tree; insertion context 83Q3
→ ANV15-41 matches parent
- [Phase 8] Failure: no capture device on 83UU; not a crash
- UNVERIFIED: exact number of affected users; full lore.kernel.org HTML
(403)
**YES**
sound/soc/amd/yc/acp6x-mach.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
index 507c07efc069b..209ac43f9e31e 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -374,6 +374,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "83Q3"),
}
},
+ {
+ .driver_data = &acp6x_card,
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83UU"),
+ }
+ },
{
.driver_data = &acp6x_card,
.matches = {
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.10] ALSA: usb-audio: Skip mixer creation on M-Audio Venom
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (41 preceding siblings ...)
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-6.1] ASoC: amd: yc: Add DMI quirk for Lenovo V15 G6 ARP Sasha Levin
@ 2026-10-19 13:50 ` Sasha Levin
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-6.1] ASoC: codecs: max98396: Unwind supplies on resume failure Sasha Levin
` (18 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:50 UTC (permalink / raw)
To: patches, stable
Cc: Federico Valentín Andrade, Takashi Iwai, Sasha Levin, perex,
tiwai, linux-sound, linux-kernel
From: Federico Valentín Andrade <fandrade@frba.utn.edu.ar>
[ Upstream commit 4c0ec35e011309bd7091053ad5bbc01420967a66 ]
The M-Audio Venom (0763:2084) does not answer any GET_CUR request
of its feature units, hanging up the USB microcontroller and
"responding" with timeouts. So the mixer building lasts around 47
seconds, and the device does not stream at all.
The same GET_CUR requests issued through libusb (with no kernel
driver bound) complete correctly and blazingly fast. So it seems
to only happen during the initial probe.
I defined an explicit composite quirk to bypass the mixer creation,
as it is not needed (the synth already comes with volume controls).
With both this and the device flag applied, the synth works
flawlessly.
Signed-off-by: Federico Valentín Andrade <fandrade@frba.utn.edu.ar>
Link: https://patch.msgid.link/20260824140211.17003-3-fandrade@frba.utn.edu.ar
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
I have enough to decide: this is a device-specific usb-audio quirk, the
local 6.12 tree has the same table and macros, and the companion flag
patch is independent.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: [ALSA usb-audio] [Skip] [Do not build the mixer for M-Audio
Venom 0763:2084 because GET_CUR on feature units hangs the device]
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- Signed-off-by: Federico Valentín Andrade <fandrade@frba.utn.edu.ar>
(author)
- Link: https://patch.msgid.link/20260824140211.17003-3-
fandrade@frba.utn.edu.ar (v3 series; msgid `-3` is patch 2/2 after the
cover)
- Signed-off-by: Takashi Iwai <tiwai@suse.de> (ALSA maintainer; applied)
- No Fixes:, Reported-by:, Tested-by:, Reviewed-by:, Acked-by:, or Cc:
stable (absence expected)
- Ignore pipeline markers (Upstream commit / Sasha Levin) if present
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- Bug: Venom does not answer GET_CUR on feature units during probe; the
USB microcontroller hangs and later transfers time out.
- Symptom: mixer build ~47 seconds; device does not stream.
- Contrast: same GET_CUR via libusb with no kernel driver is fast — hang
is probe-path specific.
- Fix: composite quirk ignores interface 0 (AudioControl/mixer);
interfaces 1–2 stay standard audio; 3 stays standard MIDI. Hardware
already has volume knobs.
- Author: “With both this and the device flag applied, the synth works
flawlessly.”
- Cover letter (v1 0/2): device has never worked over USB on Linux;
users reported the port useless for years. dmesg without quirks:
`cannot get freq at ep 0x2`, then many `failed to get current value` /
`cannot get min/max` with `-110` (ETIMEDOUT), then looping
`usb_set_interface failed (-110)`. Flags alone list the card but
produce no sound. Mixer skip is what made audio work.
- Tested on 7.1.8-arch1-3 xHCI (Intel PCH); alsa-info linked from v1.
Step 1.4: DETECT HIDDEN BUG FIXES
Record: Not hidden. Explicit hardware workaround: skip mixer creation so
probe does not issue the GET_CUR sequence that wedges the MCU.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- File: `sound/usb/quirks-table.h` only (+22 lines, 0 removed)
- Function: none; one `usb_device_id` / `snd_usb_audio_quirk` table
entry
- Scope: single-file surgical hardware quirk
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record:
- Before: 0763:2084 is not in the quirk table. Generic class match in
`usb_audio_ids` (`USB_CLASS_AUDIO` / `USB_SUBCLASS_AUDIOCONTROL`,
`card.c` 1171–1173) claims it. Probe calls `snd_usb_create_streams()`
then `snd_usb_create_mixer()` (`card.c` 899–903). Mixer build issues
GET_MIN/GET_MAX/GET_CUR (`get_min_max_with_quirks`, `init_cur_mix_raw`
in `mixer.c`).
- After: `USB_DEVICE_VENDOR_SPEC(0x0763, 0x2084)` + composite:
`QUIRK_DATA_IGNORE(0)` → `ignore_interface_quirk()` returns 0 (no
mixer); `QUIRK_DATA_STANDARD_AUDIO(1/2)` →
`create_standard_audio_quirk()` → `snd_usb_parse_audio_interface()`;
`QUIRK_DATA_STANDARD_MIDI(3)`. Because `snd_usb_create_quirk()`
returns 0, `card.c` does not take the generic `snd_usb_create_mixer()`
path.
Step 2.3: IDENTIFY THE BUG MECHANISM
Record: [Hardware workaround] Feature-unit GET_CUR during mixer init
hangs the device MCU; skipping AudioControl interface 0 avoids those
control messages. Same pattern as existing M-Audio entries (e.g. Quattro
`QUIRK_DATA_IGNORE(0)` at ~1496).
Step 2.4: ASSESS THE FIX QUALITY
Record:
- Obviously correct: VID/PID-scoped; uses macros already in this tree;
ignore-iface-0 is a long-standing pattern.
- Minimal: one table entry, no API/data-structure change.
- Regression risk: very low — only 0763:2084. Worst case if matching
were wrong: that one device stays broken (current behavior).
- Companion: patch 1/2 adds `DEVICE_FLG(0x0763, 0x2084,
QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_DISABLE_AUTOSUSPEND)`. Parse
still calls `snd_usb_init_sample_rate()` (`stream.c:1255` →
`set_sample_rate_v1` GET_CUR). Full device function needs both; this
patch still compiles and is safe alone.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record:
- Insertion is after M-Audio Fast Track Ultra 8R `0x2081` (Felix Homann,
2010, `fca5bca48759c`) and before Casio (2006).
- Buggy path is generic mixer creation, not a recent regression. Class
match dates to `e5779998bf8b70` (2010).
- Venom has been broken on Linux since USB support was expected; not a
new-subsystem bug.
Step 3.2: FOLLOW THE FIXES: TAG
Record: No Fixes: tag. N/A. Bug is device firmware vs generic UAC mixer,
not a specific introducing commit.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record:
- Recent same-file quirks already in this tree: YAMAHA CDS3000, Novation
Mininova, RME Digiface, Pioneer DDJ-800, M-Audio Micro, etc.
- This entry is not present (`rg` found no `0x2084` / Venom).
- Series is standalone 2/2: this file vs `quirks.c` flags. No refactor
prerequisite.
- Macros (`QUIRK_DATA_IGNORE`, `QUIRK_DATA_COMPOSITE`,
`USB_DEVICE_VENDOR_SPEC`) from `0c3ad39b791c2` / `d79e13f8e8abb`,
already here.
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record: No Andrade commits in `sound/` on this tree. First-time ALSA
contributor (cover: “first ever patch”). Weight is the maintainer apply,
not author history.
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record:
- Code dependency: none. Applies without patch 1/2.
- Functional dependency: patch 1/2 recommended so sample-rate GET_CUR /
autosuspend do not hang the device. Flags used there
(`QUIRK_FLAG_GET_SAMPLE_RATE`, `QUIRK_FLAG_DISABLE_AUTOSUSPEND`)
already exist in `usbaudio.h` on this tree. Nearby mainline context
uses `QUIRK_FLAG_MIXER_GET_CUR_BROKEN` (not in 6.12) — that is only a
context line for patch 1, not this patch.
- Can apply standalone: yes.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- `b4 dig -c` not run: commit is not in this checkout (no SHA to give
b4).
- Thread via msgid `20260824140211.17003-3-fandrade@frba.utn.edu.ar`:
- Cover: https://lists.openwall.net/linux-kernel/2026/08/24/1347
- 1/2 flags: https://lists.openwall.net/linux-kernel/2026/08/24/1354
- 2/2 this patch: https://lists.openwall.net/linux-
kernel/2026/08/24/1356
- v1 cover: https://lists.openwall.net/linux-kernel/2026/08/22/126
- Revisions: v1 (22 Aug) → v2 (23 Aug, extra SOB) → v3 (24 Aug, drop
duplicate SOB). Diff of this hunk unchanged across versions.
- Takashi Iwai on v3 1/2 (25 Aug 2026): “Applied both patches now.
Thanks.” (https://lkml.iu.edu/2608.3/02561.html)
- No NAK. v2 comment was only “a single Signed-off-by is enough.”
- No reviewer Cc: stable; hardware quirks are still the documented
exception.
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record: To/Cc: linux-sound, linux-kernel, perex@perex.cz, tiwai@suse.com
(maintainer, applied), plus unrelated Ccs (kuba, deucher). No extra
Reviewed-by; maintainer apply is the review.
Step 4.3: SEARCH FOR THE BUG REPORT
Record: No bugzilla/syzbot. Author is the reporter; cover cites years of
“USB useless on Linux.” dmesg + USBPcap + pyusb repro. Severity from
reporter: device never streams.
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Two-patch series, both hardware quirks, independent files. This
commit is 2/2 (mixer). 1/2 is the flags entry. Both needed for a working
synth; neither is a code prerequisite of the other.
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: lore.kernel.org/stable search for this VID/subject returned no
Venom discussion. Not previously rejected for stable.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: No function bodies edited. Runtime path uses
`create_composite_quirk`, `ignore_interface_quirk`,
`create_standard_audio_quirk`, `create_any_midi_quirk` (`quirks.c`).
Step 5.2: TRACE CALLERS
Record:
- `usb_audio_ids[]` includes `quirks-table.h` (`card.c:1169–1170`).
- Match → `usb_audio_probe` → `snd_usb_create_quirk` → composite walk.
- Context: USB enumeration / driver probe, not IRQ/hot path.
Step 5.3: TRACE CALLEES
Record: IGNORE: no I/O. STANDARD_AUDIO: `snd_usb_parse_audio_interface`
(may `snd_usb_init_sample_rate`). STANDARD_MIDI:
`snd_usb_midi_v2_create`. No new alloc/lock.
Step 5.4: FOLLOW THE CALL CHAIN
Record: Plug in Venom → snd-usb-audio probe. Userspace not required.
Reachable on any machine with CONFIG_SND_USB_AUDIO and this hardware.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Many `QUIRK_DATA_IGNORE(0)` entries (19+), including other
M-Audio 0x0763 devices. Established, not a new mechanism.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record:
- Tree: `p-6.12-3-gc504cf0baa3d8`, `make kernelversion` = 6.12.111.
- Generic mixer/probe path is present (`card.c`, `mixer.c`).
- No Venom / 0x2084 entry (`rg` over `sound/usb`).
- Bug is the generic UAC path vs this firmware, present for many years.
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record: Clean apply. Local `quirks-table.h` 1816–1818 is the same Fast
Track Ultra 8R end / Casio start as the diff. All macros exist. Expected
difficulty: clean apply.
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: No Venom mixer or flags entry. No alternate fix.
`QUIRK_FLAG_MIXER_GET_CUR_BROKEN` is not in 6.12 (unused by this patch).
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: [sound/usb / ALSA usb-audio] [IMPORTANT] — common USB audio
stack; this change is one VID/PID.
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: Active (recent CDS3000/Mininova quirks, resume cleanup). Quirk-
table additions are routine and already land in this 6.12 tree.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: Driver-specific — M-Audio Venom (0763:2084) owners.
CONFIG_SND_USB_AUDIO. No effect on other devices.
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: Plug in / probe. Certain. Unprivileged user can trigger by
attaching the USB synth. Not a race.
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record:
- Failure: MCU hang, ~47s probe, ETIMEDOUT, no PCM/MIDI stream, repeated
`usb_set_interface` failures.
- Severity: HIGH for those users (device unusable). Not a kernel
panic/UAF. USB control timeout is 5000 ms (`USB_CTRL_GET_TIMEOUT`);
many GET_CUR/GET_MIN/GET_MAX calls match the ~47s story.
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record:
- Benefit: high for Venom owners (first working Linux USB audio/MIDI).
Matches “hardware quirk” exception. Cover letter: flags alone were not
enough; this skip is what produced sound.
- Risk: very low (22 lines, one ID, existing macros).
- Ratio: strongly favors backport.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR:
- Real hardware bug: GET_CUR during mixer init hangs the MCU; no
streaming.
- Author dmesg, USBPcap, libusb/pyusb, and “works with both quirks.”
- Device never worked on Linux; users have asked for years.
- Small VID/PID table entry; same pattern as other M-Audio quirks
already in this tree.
- Maintainer Takashi Iwai applied v3.
- All macros and insertion context exist in 6.12.111.
- Hardware quirks / workarounds are an explicit stable exception.
- Does not change APIs or other devices.
AGAINST:
- Part of a 2/2 series; sample-rate + autosuspend flags are also needed
for a fully working device.
- Niche synth, not a core-path crash.
- First-time contributor (offset by maintainer apply).
UNRESOLVED:
- Could not run `b4 dig -c` (commit not in this repo). Threads recovered
from msgid/openwall/lkml.
- Did not independently attach a Venom (author + maintainer evidence
used).
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? PASS — table-only, existing macros,
author tested, maintainer applied.
2. Fixes a real bug that affects users? PASS — probe hang and
silent/broken USB audio.
3. Important issue? PASS — HIGH: device freeze and total loss of
function (not panic).
4. Small and contained? PASS — +22 lines, one file, one ID.
5. No new features or APIs? PASS — quirk for existing snd-usb-audio.
6. Can apply to the local tree? PASS — clean apply on 6.12.111.
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: Hardware quirk/workaround (ALSA usb-audio quirk table).
Qualifies on that exception alone.
Step 9.4: MAKE YOUR DECISION
This should be backported to this 6.12 tree. It is a contained, VID/PID-
scoped workaround that stops mixer GET_CUR from wedging the Venom so the
existing driver can stream. The companion flags patch is a separate two-
line quirk and is not a apply/compile dependency.
What it solves for stable users: without it, plugging in 0763:2084 runs
generic mixer init, burns ~47s of USB timeouts, hangs the MCU, and never
streams. With it, AudioControl is ignored and standard PCM/MIDI
interfaces are used — the path the author verified.
Risk vs benefit: benefit is a working device for Venom owners; risk is
limited to that ID. 6.12 already has the same table style and macros, so
no rework.
Concerns: take the sample-rate/autosuspend flags patch too for full
function; this commit is still correct and safe on its own.
Verification:
- [Phase 1] Parsed subject/tags/body: Skip mixer; SOB Andrade + Iwai;
msgid 17003-3; no Fixes/stable Cc
- [Phase 1] Cover letter: never worked on Linux; dmesg -110; flags
insufficient; mixer skip enabled sound
- [Phase 2] Diff: +22 in `sound/usb/quirks-table.h`;
IGNORE(0)+STANDARD_AUDIO(1,2)+STANDARD_MIDI(3)
- [Phase 2] `card.c` 899–903: generic path creates mixer; quirk return 0
skips it
- [Phase 2] `mixer.c` `get_min_max_with_quirks` / `init_cur_mix_raw`:
GET_CUR/GET_MIN/GET_MAX on probe
- [Phase 2] `ignore_interface_quirk` returns 0;
`create_standard_audio_quirk` parses then returns 0
- [Phase 3] Blame: insert after 0x2081 (2010) / before Casio (2006)
- [Phase 3] `rg` 0x2084/Venom: absent in this tree
- [Phase 3] Macros present (`quirks-table.h` 20–81)
- [Phase 3] No Andrade history in `sound/` here
- [Phase 3] Companion flags: GET_SAMPLE_RATE + DISABLE_AUTOSUSPEND
exist; MIXER_GET_CUR_BROKEN does not (irrelevant to this hunk)
- [Phase 4] lore/openwall v1–v3; technical diff unchanged; Iwai “Applied
both patches”
- [Phase 4] v2 feedback: duplicate SOB only
- [Phase 4] stable list: no prior Venom discussion found
- [Phase 4] UNVERIFIED: `b4 dig -c` (no local SHA)
- [Phase 5] Call chain: `usb_audio_ids` → probe →
`create_composite_quirk`
- [Phase 5] `stream.c:1255` `snd_usb_init_sample_rate` on parse (why
flags patch also matters)
- [Phase 5] 19+ existing `QUIRK_DATA_IGNORE(0)` including M-Audio
Quattro
- [Phase 6] `git describe` p-6.12-3-gc504cf0baa3d8; `make kernelversion`
6.12.111
- [Phase 6] Insertion context matches; clean apply
- [Phase 7] SOUND maintainers Iwai/Kysela; quirk additions already in
this 6.12 tree
- [Phase 8] Trigger: USB plug-in; timeout 5000 ms; severity HIGH for
that device
- UNVERIFIED: live Venom reproduce
This is a small, tested hardware quirk for existing snd-usb-audio. It
belongs on this 6.12 tree.
**YES**
sound/usb/quirks-table.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index d783dae1850a0..061d21da91fbe 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -1814,6 +1814,28 @@ YAMAHA_DEVICE(0x7010, "UB99"),
}
}
},
+{
+ /*
+ * M-Audio Venom
+ *
+ * The AudioControl interface times out on every GET_CUR request,
+ * which adds around 47 seconds to the card registration and
+ * freezes the device, blocking streaming.
+ * Using an explicit composite quirk to skip the mixer entirely.
+ */
+ USB_DEVICE_VENDOR_SPEC(0x0763, 0x2084),
+ QUIRK_DRIVER_INFO {
+ .vendor_name = "M-Audio",
+ .product_name = "Venom",
+ QUIRK_DATA_COMPOSITE {
+ { QUIRK_DATA_IGNORE(0) },
+ { QUIRK_DATA_STANDARD_AUDIO(1) },
+ { QUIRK_DATA_STANDARD_AUDIO(2) },
+ { QUIRK_DATA_STANDARD_MIDI(3) },
+ QUIRK_COMPOSITE_END
+ }
+ }
+},
/* Casio devices */
{
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.1] ASoC: codecs: max98396: Unwind supplies on resume failure
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (42 preceding siblings ...)
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-5.10] ALSA: usb-audio: Skip mixer creation on M-Audio Venom Sasha Levin
@ 2026-10-19 13:50 ` Sasha Levin
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18] ASoC: cs35l56: Add support for CS35L62 for SoundWire Sasha Levin
` (17 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:50 UTC (permalink / raw)
To: patches, stable
Cc: Pengpeng Hou, Mark Brown, Sasha Levin, lgirdwood, perex, tiwai,
linux-sound, linux-kernel
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit d20de7409dfa8e3341af7f157cd42130bd4ba3a7 ]
max98396_resume() enables the core, pvdd, and vbat supplies before
leaving cache-only mode, resetting the device, and replaying cached
register state. The function currently ignores regcache_sync() failures,
and the optional pvdd/vbat enable failures return without unwinding
supplies that were already enabled in this resume attempt.
Rework the function to use common error labels. This propagates sync
failures, restores cache-only/dirty state on failed cache replay, and
disables each supply acquired by this resume path before returning the
error.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704040651.47558-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
The local tree is **v7.3-rc4** (`7.3.0-rc4`). The MAX98396 resume path
has been in this lineage since v6.0, and this patch is a small, self-
contained error-path fix for that path.
---
## PHASE 1: COMMIT MESSAGE FORENSICS
**Step 1.1: PARSE THE SUBJECT LINE**
Record: **[ASoC/codecs/max98396] [Unwind] [Disable supplies and restore
cache state if resume fails]**
Subsystem prefix `ASoC: codecs: max98396:`. Verb **Unwind** is error-
path cleanup language; the body is a real leak/error-propagation fix,
not a refactor.
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- **Fixes:** none (expected)
- **Reported-by / Tested-by / Reviewed-by / Acked-by:** none on the
commit itself
- **Link:**
https://patch.msgid.link/20260704040651.47558-1-pengpeng@iscas.ac.cn
- **Cc: stable:** none (expected)
- **Signed-off-by:** Pengpeng Hou (author); Mark Brown (ASoC
maintainer). Ignore any Sasha Levin SOB from candidate prep.
No syzbot, no multi-user reports.
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** `max98396_resume()` enables core / optional pvdd / vbat, then
leaves cache-only, resets, and calls `regcache_sync()`.
`regcache_sync()` errors are ignored. If optional pvdd/vbat enable
fails, already-enabled supplies are not disabled.
- **Symptom:** Regulator enable-count leak after a failed resume; resume
can report success while cached register state was not written back
(codec left in reset/defaults → broken audio after suspend).
- **Version info:** none in the message.
- **Root cause:** Missing unwind and ignored `regcache_sync()` return.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: **Yes, a real bug fix described as error-path rework.** “Common
error labels” is the usual shape of a leak fix: added `goto` cleanup,
`regulator_disable` / `regulator_bulk_disable`, restore cache-
only/dirty, propagate `regcache_sync()` failure.
---
## PHASE 2: DIFF ANALYSIS
**Step 2.1: INVENTORY THE CHANGES**
Record:
- **File:** `sound/soc/codecs/max98396.c` — **+21 / −3** (`git show
--stat`: 24 lines changed)
- **Function:** `max98396_resume()` only
- **Scope:** single-file surgical fix
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record (verified against `703ee0557f892` original resume and current
`max98396_resume()`):
| Path | Before | After |
|---|---|---|
| core enable fails | return, nothing enabled | unchanged |
| pvdd enable fails | **return with core still enabled** | `goto
err_core_supplies` → disable core |
| vbat enable fails | **return with core (+ pvdd) still enabled** |
`goto err_pvdd` → disable pvdd if present, then core |
| `regcache_sync()` fails | **ignored; return 0** | restore cache-only +
mark dirty, unwind vbat/pvdd/core, **return error** |
| success | return 0 | return 0 |
Error labels check optional regulators before disable (`if
(max98396->vbat)` / `if (max98396->pvdd)`), so NULL optional supplies
are not disabled.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record:
- **Category:** (a) error-path resource leak + (g) ignored return /
incorrect success
- **Mechanism:** resume acquired regulators without matching disable on
later failure; `regcache_sync()` failure was dropped so PM treated a
failed register restore as success.
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- Unwind order matches enable order (core → pvdd → vbat). Labels are
correct for optional supplies.
- Restoring `regcache_cache_only(true)` + `regcache_mark_dirty()` after
a failed sync is the standard pattern so a later resume can retry.
- **Regression risk:** low. Error paths only. `device_resume()` in this
tree sets `dev->power.is_suspended = false` **before** the callback
(`drivers/base/power/main.c` line 1129), so a later suspend may
`regulator_disable()` already-disabled supplies and warn. That class
of imbalance already existed on some old failure paths; leaking
enables (keeping rails on) is worse. Sibling ASoC patches in the same
series use the same unwind-on-resume-fail pattern.
---
## PHASE 3: GIT HISTORY INVESTIGATION
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- Driver added: `b585811367705` (“ASoC: max98396: add amplifier driver”)
- Buggy regulator resume: **`703ee0557f892` (“ASoC: max98396: add
voltage regulators”, 2022-06-27)** — **present in v6.0** (`git merge-
base --is-ancestor 703ee0557f892 v6.0` succeeded; not in v5.19)
- Resume body was unchanged from that commit until this fix (blame:
Daniel Mack 2022 for enable/return, Pengpeng Hou 2026 for gotos)
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: **No Fixes: tag.** Introducing commit is `703ee0557f892`, in
this tree and in v6.0+.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: Later history is probe/PM-macro/style (`c009893bc5864`
SYSTEM_SLEEP_PM_OPS, DAPM convert, named initializers). **No
prerequisite refactor of resume.** **Standalone** for this file. Cover
letter lists it as **18/19** of an independent per-codec series, not a
stacked dependency.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Pengpeng Hou is **not** the ASoC maintainer. Same week: many
`Propagate regcache_sync() errors` codec patches. Maintainer who applied
this one: **Mark Brown**.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: **None required.** Touches only `max98396_resume()`, existing
`regulator_*` / `regcache_*` APIs. Can apply standalone. No follow-ups
on this file after `d20de7409dfa8`.
---
## PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- **b4 dig:**
https://patch.msgid.link/20260704040651.47558-1-pengpeng@iscas.ac.cn
- **Series:** v1 only, **[PATCH 00/19] ASoC: codecs: propagate
regcache_sync() failures** (`20260704034845.14291-1`)
- Cover letter (from saved mbox): *“This series is source-audited only.
I did not test on the affected hardware.”* Explicitly calls out
max98396 as one of four patches that also unwind resources.
- **No NAK** on this patch. Richard Fitzgerald `Reviewed-by` on sibling
Cirrus patches (wm2200/cs4349/wm8962). Mark Brown discussed revert-on-
sync-fail for wm8962 and said not to over-engineer recovery without a
real use case — **not a NAK of unwind/propagate**.
- Mark applied **18/19** (skipped 03/19 lpass-wsa-macro) to `for-7.3`.
- **No reviewer Cc: stable** on this patch.
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record: Recipients included Mark Brown, Liam Girdwood, linux-sound,
codec vendors. **No Reviewed-by on the max98396 patch itself.** Applied
by the ASoC maintainer.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: **No user/syzbot/bugzilla report.** Source audit only.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: 19 independent per-driver patches. This one does not need the
others.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: **UNVERIFIED** — lore.kernel.org HTTP search returned 403.
Thread retrieved via `b4 dig -m` has no stable discussion.
---
## PHASE 5: CODE SEMANTIC ANALYSIS
**Step 5.1: KEY FUNCTIONS**
Record: `max98396_resume()` only. Helpers used:
`regulator_bulk_enable/disable`, `regulator_enable/disable`,
`regcache_cache_only`, `regcache_mark_dirty`, `regcache_sync`,
`max98396_reset()`.
**Step 5.2: TRACE CALLERS**
Record: Only wired through `SYSTEM_SLEEP_PM_OPS(max98396_suspend,
max98396_resume)` → `max98396_pm` → `i2c_driver.driver.pm`. Called from
**system sleep resume**, not a hot syscall path.
**Step 5.3: TRACE CALLEES**
Record: Regulator enable/disable and regmap cache replay after
`max98396_reset()`. Probe enables the same supplies and uses
`devm_add_action_or_reset()` to unwind; **resume has no equivalent**
without this patch.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Userspace suspend (`/sys/power/state` or equivalent) →
`dpm_resume` → `device_resume` → driver resume. **Reachable on any
machine with this codec that suspends.** Not unprivileged-exploit in the
UAF sense; it is a normal PM path.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same author’s series applies the same propagate/unwind pattern
across many ASoC codecs. This driver uniquely also unwinds three
supplies.
---
## PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: **Yes.** File `sound/soc/codecs/max98396.c` is present.
Introducing commit `703ee0557f892` is an ancestor of HEAD. Bug since
**v6.0**. Current HEAD already contains `d20de7409dfa8` (the candidate);
pre-image of resume matches the patch’s before-state.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: **Clean apply** to this lineage’s pre-fix resume (identical to
v6.0-era function). `SYSTEM_SLEEP_PM_OPS` conversion (`c009893bc5864`)
did not change resume body. No conflicting local changes to that
function.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: No earlier alternate fix of this leak. No later revert/follow-up
on this file.
---
## PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: **ASoC codec driver** (`sound/soc/codecs/max98396.c`).
**PERIPHERAL / driver-specific** (MAX98396/MAX98397 speaker amps, I2C,
ACPI IDs `ADS8396`/`ADS8397`). Not core mm/net/fs.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: ASoC codecs are actively developed; this file is **mature**
(driver 2022, regulators 2022, few functional changes since). Long-lived
bug, not a brand-new subsystem.
---
## PHASE 8: IMPACT AND RISK ASSESSMENT
**Step 8.1: WHO IS AFFECTED**
Record: **Driver-specific / config-specific**
(`CONFIG_SND_SOC_MAX98396`). Implied by a large ASoC codec umbrella
Kconfig; in-tree DT only has the binding example (no board `.dts` in
this tree). ACPI/OF/I2C IDs exist for real hardware.
**Step 8.2: TRIGGER CONDITIONS**
Record:
- System suspend/resume with this codec bound.
- **pvdd/vbat enable fail:** uncommon (regulator failure).
- **`regcache_sync()` fail:** more realistic (I2C error after
reset/power-up). Old code returned **0** in that case — **every such
failure was silent**.
- Unprivileged user cannot typically force I2C failure; they can trigger
suspend.
**Step 8.3: FAILURE MODE SEVERITY**
Record:
- Regulator leak / enable-count imbalance → **HIGH for that class, but
rare trigger**
- Silent successful resume with unrestored registers → **broken audio
after suspend**, device in reset defaults → **MEDIUM** (user-visible,
not panic/corruption)
- **Overall severity: MEDIUM** (important for this hardware, not a
kernel-wide crash)
**Step 8.4: RISK-BENEFIT RATIO**
Record:
- **Benefit:** medium for MAX98396/97 users (correct resume failure, no
leaked supplies, cache left retryable)
- **Risk:** low (21 lines, one function, error paths, obvious labels)
- **Ratio:** favorable
---
## PHASE 9: FINAL SYNTHESIS
**Step 9.1: COMPILE THE EVIDENCE**
**FOR:**
- Real bugs: leaked enabled regulators on resume failure; ignored
`regcache_sync()` so resume can succeed with hardware not restored
- Small, contained, obviously correct unwind
- Bug in this tree since v6.0 (`703ee0557f892`)
- No extra APIs/features; no series dependency
- ASoC maintainer merged it; sibling patches reviewed
- Matches stable’s usual error-path leak / missing-cleanup pattern
**AGAINST:**
- Source-audited only; author did not test on hardware
- No user/syzbot reports
- Not a panic, UAF, or data-corruption bug
- Peripheral codec, not core
- Possible extra `regulator_disable` on the *next* suspend if PM still
treats the device as resumed after a failed callback (pre-existing PM
interaction, mild)
**UNRESOLVED:**
- lore.kernel.org search 403; no independent confirmation of stable-list
discussion
- No in-tree board DT showing how widely this amp is shipped (ACPI IDs
still indicate real products)
**Step 9.2: STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** on correctness (labels match
enable order). **Weak on hardware test** (source audit), but soak in
this 7.3-rc tree and maintainer merge count as review, not a FAIL.
2. Fixes a real bug that affects users? **PASS** — leak + silent failed
cache replay after suspend.
3. Important issue? **PASS at MEDIUM** — not crash/security, but broken-
audio-after-resume and regulator leak on a production PM path. Error-
path resource cleanup is an accepted stable class.
4. Small and contained? **PASS** — +21/−3, one function, one file.
5. No new features or APIs? **PASS**
6. Can apply to the local tree? **PASS** — driver and buggy resume exist
here; pre-fix code matches the hunk.
**Step 9.3: EXCEPTION CATEGORIES**
Record: None (not a device ID, quirk, DT, build, or docs-only change).
Qualifies as a normal small bugfix.
**Step 9.4: DECISION**
This tree has the buggy resume path and the hardware driver. The patch
is a surgical fix for a real resume leak and a real ignored-error
success path. Conservative severity, but it meets the letter of the
stable rules and the “error-path leak = backport” guidance. Risk is low
enough to take it.
---
### What the commit solves for this tree
`max98396_resume()` can enable core (and maybe pvdd) supplies then
return without disabling them, and it previously ignored
`regcache_sync()`. After suspend, a failed I2C cache replay left the amp
in reset/defaults while PM thought resume succeeded. The patch unwinds
every supply this resume acquired, restores cache-only/dirty on sync
failure, and returns the error.
### Stable-rules fit
Small, obviously correct, no new API, applies to this tree’s long-
standing resume function. Importance is medium (driver PM error path),
not a core crash, but it is a real user-visible resume bug plus a
resource leak.
### Risk vs benefit
Benefit is correct suspend/resume for MAX98396/97. Risk is confined to
failure paths already returning errors (except the newly propagated sync
failure, which *should* fail).
### Concerns
Untested on hardware; no field reports. That is not enough to drop a
21-line leak/error-propagation fix for a driver this tree actually
ships.
### Verification
- **[Phase 1]** Parsed subject/tags/body from `git show d20de7409dfa8`;
no Fixes/Reported-by/Cc stable; Link to msgid 20260704040651.47558-1
- **[Phase 2]** Diff: +21/−3 in `max98396_resume()` only; compared to
original resume in `703ee0557f892`
- **[Phase 3]** `git blame -L 1574,1634 sound/soc/codecs/max98396.c`;
introducer `703ee0557f892`; in v6.0, not v5.19; `git merge-base --is-
ancestor` for both introducer and fix vs HEAD
- **[Phase 3]** `git log --oneline -- sound/soc/codecs/max98396.c`; no
resume prerequisites; no follow-ups after the fix
- **[Phase 3]** `git describe HEAD` / `make kernelversion` / Makefile:
**v7.3-rc4, 7.3.0-rc4**
- **[Phase 4]** `b4 dig -c/-a/-w/-m`: series 18/19, v1 only, cover
letter “source-audited only”; Mark Brown applied to for-7.3; no NAK on
this patch
- **[Phase 4]** lore HTTP search 403 — stable-list discussion
**UNVERIFIED**
- **[Phase 5]** Callers: only `SYSTEM_SLEEP_PM_OPS` → i2c `.pm`; probe
uses `devm_add_action_or_reset` for the same supplies
- **[Phase 6]** Buggy resume exists in this tree from v6.0; current file
already has the fixed form
- **[Phase 8]** `device_resume()` sets `is_suspended = false` before the
callback (main.c:1126–1129, 1192)
- **UNVERIFIED:** in-tree board usage (no `.dts` nodes; ACPI/OF IDs
only)
**YES**
sound/soc/codecs/max98396.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/max98396.c b/sound/soc/codecs/max98396.c
index 4b4e1fc98a6da..0255399c405df 100644
--- a/sound/soc/codecs/max98396.c
+++ b/sound/soc/codecs/max98396.c
@@ -1601,19 +1601,37 @@ static int max98396_resume(struct device *dev)
if (max98396->pvdd) {
ret = regulator_enable(max98396->pvdd);
if (ret < 0)
- return ret;
+ goto err_core_supplies;
}
if (max98396->vbat) {
ret = regulator_enable(max98396->vbat);
if (ret < 0)
- return ret;
+ goto err_pvdd;
}
regcache_cache_only(max98396->regmap, false);
max98396_reset(max98396, dev);
- regcache_sync(max98396->regmap);
+ ret = regcache_sync(max98396->regmap);
+ if (ret < 0) {
+ regcache_cache_only(max98396->regmap, true);
+ regcache_mark_dirty(max98396->regmap);
+ goto err_vbat;
+ }
+
return 0;
+
+err_vbat:
+ if (max98396->vbat)
+ regulator_disable(max98396->vbat);
+err_pvdd:
+ if (max98396->pvdd)
+ regulator_disable(max98396->pvdd);
+err_core_supplies:
+ regulator_bulk_disable(MAX98396_NUM_CORE_SUPPLIES,
+ max98396->core_supplies);
+
+ return ret;
}
static const struct dev_pm_ops max98396_pm = {
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18] ASoC: cs35l56: Add support for CS35L62 for SoundWire
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (43 preceding siblings ...)
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-6.1] ASoC: codecs: max98396: Unwind supplies on resume failure Sasha Levin
@ 2026-10-19 13:51 ` Sasha Levin
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add quirk for Acer Nitro ANV16-42 headset mic Sasha Levin
` (16 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:51 UTC (permalink / raw)
To: patches, stable
Cc: Stefan Binding, Richard Fitzgerald, Mark Brown, Sasha Levin,
david.rhodes, lgirdwood, perex, tiwai, linux-sound, patches,
linux-kernel
From: Stefan Binding <sbinding@opensource.cirrus.com>
[ Upstream commit 3330b5f6d8dea66df51c07362f01a39ad9845aad ]
CS35L62 uses the same control and regmap interface as CS35L63 so
support for it can be added into the CS35L56 driver.
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260715120135.939280-2-rf@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:
## Phase 1: Commit message forensics
**Step 1.1 — Subject**
- Record: `[ASoC/cs35l56] [add] [enable CS35L62 on SoundWire by reusing
CS35L63 paths]`
**Step 1.2 — Tags**
- Record:
- `Fixes:` none (expected)
- `Reported-by:` none
- `Tested-by:` none
- `Reviewed-by:` none on the commit
- `Acked-by:` none
- `Link: https://patch.msgid.link/20260715120135.939280-2-
rf@opensource.cirrus.com`
- `Cc: stable@vger.kernel.org` none (expected)
- `Signed-off-by: Stefan Binding` (author)
- `Signed-off-by: Richard Fitzgerald` (Cirrus; submitted the series)
- `Signed-off-by: Mark Brown` (ASoC maintainer)
- Ignore any Sasha Levin SOB if present — pipeline noise
**Step 1.3 — Body**
- Record: No bug, crash, leak, or regression is described. Claimed
intent is hardware enablement: CS35L62 shares CS35L63’s control/regmap
interface, so it can live in the existing cs35l56 driver. Symptom
without the patch: a CS35L62 SoundWire amp is not matched (`-ENODEV` /
unknown DEVID). Root cause: missing part ID and type cases. No version
range is given. Mark Brown applied it to `for-7.3` as merge-window
material, not as a bugfix.
**Step 1.4 — Hidden bug fix?**
- Record: No. Wording is “Add support”, not cleanup/locking/error-path
repair. This is new silicon enablement, not a disguised UAF/leak/race
fix.
## Phase 2: Diff analysis
**Step 2.1 — Inventory**
- Record: 3 files, **+7 / −0**, single-driver surgical change.
- `sound/soc/codecs/cs35l56-sdw.c` (+2): `cs35l56_sdw_probe()`,
`cs35l56_sdw_id[]`
- `sound/soc/codecs/cs35l56-shared.c` (+4): `cs35l56_set_patch()`,
`cs35l56_set_fw_reg_table()`, `cs35l56_system_reset()`,
`cs35l56_hw_init()`
- `sound/soc/codecs/cs35l56.c` (+1): `_cs35l56_component_probe()`
- Scope: device-ID addition to an existing codec driver.
**Step 2.2 — Flow**
- Before: SoundWire ID `0x01FA:0x3562` is unmatched; type `0x62` / DEVID
`0x35A620` fall through to `-ENODEV` or skip CS35L63
firmware/reset/controls.
- After: ID binds; all CS35L63-specific switches also accept CS35L62 and
reuse `cs35l63_regmap_sdw`, `cs35l63_patch_fw`, `cs35l63_fw_reg`,
`cs35l63_system_reset_seq`, `cs35l63_calibration_controls`,
`cs35l63_controls`.
- Path: probe/init only for the new part. Existing 0x54/56/57/63 paths
are unchanged.
**Step 2.3 — Bug mechanism**
- Record: `[Hardware enablement / SoundWire device ID]` not a memory-
safety or locking bug. Mechanism: add `SDW_SLAVE_ENTRY(0x01FA, 0x3562,
0x3562)` and sibling `case` labels so CS35L62 is treated as CS35L63.
**Step 2.4 — Fix quality**
- Record: Obviously correct given the stated aliasing. Minimal. No
public API, no new driver. Regression risk for existing chips is very
low (new cases only). Completeness: other `type` switches in this
driver already use `default:` for CS35L63-class silicon, so they pick
up 0x62 without extra cases. I2C/SPI tables are intentionally
untouched (series is SoundWire-only). KUnit still special-cases only
0x63 in one test; that is test-only.
## Phase 3: Git history
**Step 3.1 — Blame**
- Record: CS35L63 cases/IDs came from `978858791ceda` (“Add initial
support for CS35L63…”, 2025-04-07). That commit is an ancestor of HEAD
and is in v6.16. cs35l56 itself dates to `e496112529006` (2023-03-20).
The CS35L62 lines are this commit (`3330b5f6d8dea`).
**Step 3.2 — Fixes: tag**
- Record: None. There is no “buggy commit”; support was simply never
added. N/A.
**Step 3.3 — File history / series**
- Record: Patch **1/2**. Companion `0306d21155819` (“ASoC: sdw_utils:
Add codec info for CS35L62”) adds the SOF/generic machine-driver table
entry. Cover letter: chip IDs in the codec driver **and** sdw_utils.
Follow-up `998b8a6c8aff2` sorted the SDW ID table (addresses Pierre-
Louis Bossart’s nit). Later cs35l56 changes are independent (IRQ,
probe deadlock, pm_runtime).
**Step 3.4 — Author**
- Record: Stefan Binding is a regular Cirrus cs35l56/cs35l41 contributor
(including the original CS35L63 support). Submitted via Richard
Fitzgerald; applied by Mark Brown. High confidence in the ID mapping.
**Step 3.5 — Prerequisites**
- Record: Needs CS35L63 symbols (`cs35l63_regmap_sdw`,
patch/fw/reset/calibration/controls). Those exist in this checkout.
Standalone for the codec driver; SOF auto-wiring wants patch 2/2 as
well.
## Phase 4: Mailing list / external
**Step 4.1 — b4 dig**
- Record: Lore/thread: `https://patch.msgid.link/20260715120135.939280-
2-rf@opensource.cirrus.com`
- Series: **v1 only** (no v2/v3). Applied as submitted.
- Review: Pierre-Louis Bossart (SoundWire) only nitted sort order (62
after 63). No NAK, no stable nomination, no functional concern.
- Mark Brown: applied to `for-7.3`, with the standard note that merge-
window patches go in the next window “or sooner **if it is a bug
fix**” — i.e. this was **not** treated as a bugfix.
**Step 4.2 — Recipients (`b4 dig -w`)**
- Record: `broonie@kernel.org`, `linux-sound@vger.kernel.org`, `linux-
kernel@vger.kernel.org`, `patches@opensource.cirrus.com`. Maintainer
applied it.
**Step 4.3 — Bug report**
- Record: None. No syzbot, bugzilla, or user crash report.
**Step 4.4 — Related patches**
- Record: `[PATCH 0/2]` + `[PATCH 2/2]` sdw_utils codec_info. Both
applied together (`3330b5f6d8dea`, `0306d21155819`).
**Step 4.5 — stable@**
- Record: lore.kernel.org/stable WebFetch returned 403. **UNVERIFIED**
whether stable@ discussed it. Unlikely: 7.3 is still rc4 and this was
merge-window work.
## Phase 5: Semantic / call graph
**Step 5.1 — Functions**
- Record: `cs35l56_sdw_probe`, `cs35l56_sdw_id[]`, `cs35l56_set_patch`,
`cs35l56_set_fw_reg_table`, `cs35l56_system_reset`, `cs35l56_hw_init`,
`_cs35l56_component_probe`.
**Step 5.2 — Callers**
- Record: `cs35l56_sdw_probe` is the `sdw_driver.probe` (SoundWire
enumeration). `cs35l56_common_probe()` is called from SDW/I2C/SPI
probe. `cs35l56_hw_init` / `cs35l56_set_patch` are called from the
codec init path in `cs35l56.c`. `_cs35l56_component_probe` is the ALSA
component probe. Not a syscall hot path; probe/runtime of this amp.
**Step 5.3 — Callees**
- Record: `devm_regmap_init_sdw`, `cs35l56_common_probe`,
`regmap_register_patch`, `regmap_multi_reg_write_bypassed`,
`snd_soc_add_component_controls`. No new helpers.
**Step 5.4 — Reachability**
- Record: Reachable when a CS35L62 SoundWire slave enumerates
(laptops/SOF). Unprivileged userspace cannot trigger a crash path
here; without the ID the device simply does not bind.
**Step 5.5 — Similar patterns**
- Record: Same pattern as CS35L63 (`978858791ceda`) and CS35L57 IDs.
Remaining `case 0x57` blocks use `default:` for CS35L63-class parts,
so CS35L62 is covered there.
## Phase 6: This tree
**Step 6.1 — Local tree and whether the code exists**
- Record: `git describe HEAD` = **v7.3-rc4-27-gf0100363d8c37**; `make
kernelversion` = **7.3.0-rc4**. This is mainline 7.3-rc, not an LTS
branch.
- Driver, CS35L63 paths, and the new IDs all exist here. `git merge-base
--is-ancestor 978858791ceda HEAD` succeeds. `git merge-base --is-
ancestor 3330b5f6d8dea HEAD` succeeds. CS35L62 first appears in
**v7.3-rc1**, not v7.2.
**Step 6.2 — Backport difficulty**
- Record: Context here already includes later IRQ/ID-sort changes, but
the hunks are trivial case/ID inserts. Expected apply: clean or
trivial reorder. **Low difficulty.**
**Step 6.3 — Related fixes already here**
- Record: No alternate CS35L62 fix. Support is this series. ID table
sort came after.
## Phase 7: Subsystem
**Step 7.1**
- Record: `[ASoC codec driver, Cirrus CS35L56 family] [IMPORTANT —
common laptop speaker amps, not core mm/fs; not staging]`
**Step 7.2**
- Record: Actively maintained (many 2026 probe/IRQ/pm fixes). CS35L56 is
mature; CS35L62 is a small ID alias on top of CS35L63.
## Phase 8: Impact and risk
**Step 8.1 — Who is affected**
- Record: Driver-specific / config-specific
(`CONFIG_SND_SOC_CS35L56_SDW`). Only CS35L62 SoundWire hardware.
Existing CS35L54/56/57/63 behavior unchanged.
**Step 8.2 — Trigger**
- Record: Device enumeration of part `0x3562`. Not a race. Not
unprivileged exploit surface.
**Step 8.3 — Failure mode without the patch**
- Record: Device does not probe; no speaker amp. Severity **LOW** as a
kernel bug (no oops/corruption), **HIGH** as hardware enablement for
those machines.
**Step 8.4 — Benefit vs risk**
- Record: Benefit: CS35L62 SoundWire amps work on this kernel. Risk:
very low (7 lines, additive cases). Ratio: favorable **if** treating
this as a device-ID exception; poor **if** requiring a crash/security
bug.
## Phase 9: Synthesis
**Step 9.1 — Evidence**
For:
- Matches the documented **new device ID** exception (SoundWire ID +
cases routing to existing CS35L63 code).
- Small (7 lines), obviously correct, maintainer-applied.
- Driver and CS35L63 prerequisites exist in this 7.3 tree.
- No change to existing IDs’ control flow.
- Author is the Cirrus driver owner.
Against:
- Subject/body are **new feature**, not a bugfix. No crash, leak, UAF,
deadlock, or CVE.
- Mark Brown applied it to **for-7.3 merge window**, not as a stable
bugfix.
- Patch 1/2; SOF machine auto-config also wants `0306d21155819`.
- No `Reported-by` / no in-field bug.
- Stable rules 2 and 3 fail unless the ID exception is used.
Unresolved:
- stable@ lore search could not be fetched (403).
**Step 9.2 — Stable rules checklist**
1. Obviously correct and tested? **PASS** — aliasing is local and
reviewed; applied by broonie. Only review comment was sort order.
2. Fixes a real bug that affects users? **FAIL** as a defect; **PASS**
only under the device-ID exception (unsupported CS35L62).
3. Important issue (crash/security/corruption/deadlock)? **FAIL**
4. Small and contained? **PASS** (7 lines, one driver)
5. No new features or APIs? **FAIL** as a feature; **PASS** under
device-ID exception (no new driver/API, only an ID)
6. Can apply to the local tree? **PASS** — CS35L63 paths present on
7.3-rc4
**Step 9.3 — Exception**
- Record: **NEW DEVICE IDs** on an existing driver. Same class as adding
a PCI/USB ID. Not a new driver, not a new uAPI.
**Step 9.4 — Decision**
This tree is **7.3.0-rc4**. The cs35l56 driver and CS35L63 handling are
present, so the patch is applicable here. It does not fix a stability
bug, but it is the standard “add ID to existing driver” pattern the
stable rules explicitly allow: one SoundWire ID and a handful of `case`
labels so CS35L62 reuses CS35L63. Risk to current users is negligible.
Companion sdw_utils entry is separate and not required for the codec to
bind.
### What it solves for users of this tree
Without the ID, a CS35L62 SoundWire amp never matches the driver. With
it, the existing CS35L63 path runs. That is hardware enablement, not a
crash fix.
### Rules / risk
Meets “small, obviously correct, no new API”. Importance is hardware
support, covered by the device-ID exception. Backport/apply risk is very
low.
---
Verification:
- [Phase 1] Parsed tags: SOB Binding/Fitzgerald/Brown; Link to patch
1/2; no Fixes/Reported-by/stable Cc
- [Phase 2] Diff: +7 lines, ID `0x3562` + cases `0x62`/`0x35A620`
reusing CS35L63
- [Phase 3] `git blame`: CS35L63 from `978858791ceda` (v6.16); CS35L62
from `3330b5f6d8dea`
- [Phase 3] `git merge-base --is-ancestor 978858791ceda HEAD`: CS35L63
in this tree
- [Phase 3] `git merge-base --is-ancestor 3330b5f6d8dea v7.3-rc1`: first
in 7.3-rc1; not in v7.2
- [Phase 3] Series: 1/2 codec IDs, 2/2 `0306d21155819` sdw_utils
- [Phase 4] `b4 dig -c 3330b5f6d8dea`: v1 only; URL
patch.msgid.link/20260715120135.939280-2-…
- [Phase 4] `b4 dig -a`: no later revision
- [Phase 4] `b4 dig -w`: broonie + linux-sound
- [Phase 4] mbox: Bossart sort-order nit only; Brown applied to for-7.3
- [Phase 4] WebFetch lore.kernel.org: 403; used b4 mbox + openwall
instead
- [Phase 5] grep callers: SDW probe → `cs35l56_common_probe`;
hw_init/set_patch from codec init
- [Phase 5] Other `case 0x63` sites updated; remaining type switches use
`default:` for L63-class
- [Phase 6] `git describe HEAD` / `make kernelversion`: v7.3-rc4 /
7.3.0-rc4; files present
- [Phase 8] Failure mode: no bind for CS35L62, not an oops; existing IDs
unchanged
- UNVERIFIED: stable@ mailing list (lore 403)
**YES**
sound/soc/codecs/cs35l56-sdw.c | 2 ++
sound/soc/codecs/cs35l56-shared.c | 4 ++++
sound/soc/codecs/cs35l56.c | 1 +
3 files changed, 7 insertions(+)
diff --git a/sound/soc/codecs/cs35l56-sdw.c b/sound/soc/codecs/cs35l56-sdw.c
index a513a15d7e5a7..a7b4e2a923205 100644
--- a/sound/soc/codecs/cs35l56-sdw.c
+++ b/sound/soc/codecs/cs35l56-sdw.c
@@ -529,6 +529,7 @@ static int cs35l56_sdw_probe(struct sdw_slave *peripheral, const struct sdw_devi
regmap_config = &cs35l56_regmap_sdw;
break;
case 0x3563:
+ case 0x3562:
regmap_config = &cs35l63_regmap_sdw;
break;
default:
@@ -582,6 +583,7 @@ static const struct sdw_device_id cs35l56_sdw_id[] = {
SDW_SLAVE_ENTRY(0x01FA, 0x3556, 0x3556),
SDW_SLAVE_ENTRY(0x01FA, 0x3557, 0x3557),
SDW_SLAVE_ENTRY(0x01FA, 0x3563, 0x3563),
+ SDW_SLAVE_ENTRY(0x01FA, 0x3562, 0x3562),
{},
};
MODULE_DEVICE_TABLE(sdw, cs35l56_sdw_id);
diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c
index 646bb4fbca025..3001ec45a72de 100644
--- a/sound/soc/codecs/cs35l56-shared.c
+++ b/sound/soc/codecs/cs35l56-shared.c
@@ -86,6 +86,7 @@ int cs35l56_set_patch(struct cs35l56_base *cs35l56_base)
ARRAY_SIZE(cs35l56_patch_fw));
break;
case 0x63:
+ case 0x62:
ret = regmap_register_patch(cs35l56_base->regmap, cs35l63_patch_fw,
ARRAY_SIZE(cs35l63_patch_fw));
break;
@@ -370,6 +371,7 @@ static void cs35l56_set_fw_reg_table(struct cs35l56_base *cs35l56_base)
}
break;
case 0x63:
+ case 0x62:
cs35l56_base->fw_reg = &cs35l63_fw_reg;
break;
}
@@ -576,6 +578,7 @@ void cs35l56_system_reset(struct cs35l56_base *cs35l56_base, bool is_soundwire)
}
break;
case 0x63:
+ case 0x62:
regmap_multi_reg_write_bypassed(cs35l56_base->regmap,
cs35l63_system_reset_seq,
ARRAY_SIZE(cs35l63_system_reset_seq));
@@ -1080,6 +1083,7 @@ int cs35l56_hw_init(struct cs35l56_base *cs35l56_base)
cs35l56_base->calibration_controls = &cs35l56_calibration_controls;
break;
case 0x35A630:
+ case 0x35A620:
cs35l56_base->calibration_controls = &cs35l63_calibration_controls;
devid = devid >> 4;
break;
diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index e3334b2d84532..69976761ffa50 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -968,6 +968,7 @@ static int cs35l56_component_probe(struct snd_soc_component *component)
ARRAY_SIZE(cs35l56_controls));
break;
case 0x63:
+ case 0x62:
ret = snd_soc_add_component_controls(component, cs35l63_controls,
ARRAY_SIZE(cs35l63_controls));
break;
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add quirk for Acer Nitro ANV16-42 headset mic
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (44 preceding siblings ...)
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18] ASoC: cs35l56: Add support for CS35L62 for SoundWire Sasha Levin
@ 2026-10-19 13:51 ` Sasha Levin
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Add quirk for HP ENVY 13-aq1xxx Sasha Levin
` (15 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:51 UTC (permalink / raw)
To: patches, stable
Cc: Zhang Heng, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Zhang Heng <zhangheng@kylinos.cn>
[ Upstream commit e00a6a89900dfa4cda3669558d2f3581cd41a656 ]
The Acer Nitro ANV16-42 (subsystem 0x1025:0x1909, Realtek ALC245)
does not detect the headset microphone jack. Adding the
ALC2XX_FIXUP_HEADSET_MIC quirk resolves the issue and restores
proper headset mic functionality.
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221623
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260807125857.678297-1-zhangheng@kylinos.cn
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
The locally checked-out tree at decision time is **pending-6.12**
(`p-6.12-3-g710455e2077bb`, kernel **6.12.111**). The candidate is
mainline `e00a6a89900dfa4cda3669558d2f3581cd41a656` and is not an
ancestor of `HEAD`.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
- Subsystem prefix: `ALSA: hda/realtek`
- Action verb: **Add** (quirk)
- Claimed intent: enable headset-mic detection on Acer Nitro ANV16-42
Record: [ALSA/hda/realtek] [add] [PCI quirk so ANV16-42 headset mic is
detected]
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
- Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221623
- Signed-off-by: Zhang Heng \<zhangheng@kylinos.cn\> (author)
- Signed-off-by: Takashi Iwai \<tiwai@suse.de\> (ALSA/HDA maintainer,
applied)
- Link:
https://patch.msgid.link/20260807125857.678297-1-zhangheng@kylinos.cn
- No Fixes:, no Cc: stable, no Reported-by, no Tested-by, no Reviewed-
by, no Acked-by
- (Ignore any Sasha Levin SOB / Upstream commit markers if present in
candidates)
Record: [Closes bugzilla 221623] [author Zhang Heng] [maintainer SOB
Takashi Iwai] [msgid link] [no Fixes/Cc-stable — expected]
Step 1.3: ANALYZE THE COMMIT BODY TEXT
The Acer Nitro ANV16-42 (SSID 0x1025:0x1909, Realtek ALC245) does not
detect the headset microphone jack. `ALC2XX_FIXUP_HEADSET_MIC` restores
it.
Bugzilla 221623 (verified): reporter samuelrenault37, 2026-06-08; status
NEW; product Drivers / Sound(ALSA). Reporter states analog-input-
headset-mic does not appear without this quirk, points at the same table
line, cites sibling Acer Nitro entries, and says it was tested on Fedora
44, kernel 7.0.11. Zhang Heng replied 2026-08-06 that he would submit
the patch.
Record: [Bug: headset mic jack not enumerated] [Symptom: no analog-
input-headset-mic] [Root cause: missing PCI quirk for SSID 1025:1909]
[User-tested]
Step 1.4: DETECT HIDDEN BUG FIXES
Not hidden. Explicit hardware quirk matching the documented stable
exception for HDA codec quirks.
Record: [Not a disguised cleanup; it is a hardware quirk]
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Mainline diff: `sound/hda/codecs/realtek/alc269.c` +1 line.
This 6.12 tree uses the pre-split file `sound/pci/hda/patch_realtek.c`.
Function: `alc269_fixup_tbl[]` (one `SND_PCI_QUIRK` entry).
Record: [1 file, +1 line] [alc269_fixup_tbl] [single-file surgical
quirk]
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Before: SSID 0x1025:0x1909 has no table match; pin parse does not treat
the jack as a headset mic.
After: `snd_hda_pick_fixup()` in `patch_alc269()` selects
`ALC2XX_FIXUP_HEADSET_MIC`, which on this tree calls
`alc_fixup_headset_mic()` at `HDA_FIXUP_ACT_PRE_PROBE`.
That function (verified identical to later `alc2xx_fixup_headset_mic`):
- applies pin 0x19 config `0x03a1103c`
- updates coef 0x45
- sets `HDA_PINCFG_HEADSET_MIC`
Record: [probe-time pin/coef fixup for this SSID only]
Step 2.3: IDENTIFY THE BUG MECHANISM
Category (h): hardware workaround — PCI quirk table entry for a laptop
whose BIOS pin config omits the headset mic.
Record: [Hardware quirk] [SSID 1025:1909 → existing
ALC2XX_FIXUP_HEADSET_MIC]
Step 2.4: ASSESS THE FIX QUALITY
Obviously correct: same pattern already used in this tree for Acer Nitro
5 AN515-57/58 and AN517-55. Scope is one table row keyed by SSID, so it
cannot affect other machines. Regression risk is very low.
Record: [Surgical, matches existing Acer Nitro entries] [Regression
risk: very low]
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
There is no “buggy line” to blame. The gap is a missing SSID. The fixup
ID and function have been in this tree since `1c643c600407d` (“Add new
alc2xx-fixup-headset-mic model”, upstream 50db91fccea0, in 6.12.y as of
2025-01-09). `alc_fixup_headset_mic` dates to `c8c0a03ec1be6`.
Record: [Missing SSID, not a regression in existing code] [Fixup
infrastructure present since early 6.12.y]
Step 3.2: FOLLOW THE FIXES: TAG
No Fixes: tag. Expected. This is enablement for a specific machine, not
a revert of a bad commit.
Record: [No Fixes: tag; N/A]
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
This tree already contains the same class of backports:
- `db8799e80cb73` ALSA: hda/realtek: Enable headset mic for Acer Nitro 5
- `04818a914fdce` ALSA: hda/realtek: Add quirk for Acer Nitro AN517-55
Recent `patch_realtek.c` history is dominated by other one-line HDA
quirks.
Record: [Standalone] [Precedent: sibling Acer Nitro headset-mic quirks
already in 6.12.y]
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Zhang Heng has other Realtek quirk commits in this tree (e.g.
`2362e35c63cae` Samsung 750XBE/730XBE, `63a5bca438cfb` ASUS UM6702RC).
Regular HDA quirk contributor. Applied by Takashi Iwai.
Record: [Regular quirk contributor] [Maintainer applied]
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Submitted as patch 1/4 with three unrelated quirks (Acer Gadget E10
speaker, ASUS Vivobook S5406SA mic, Huawei Matebook Conexant). No shared
code. On 6.12, `ALC2XX_FIXUP_HEADSET_MIC` already exists and points at
`alc_fixup_headset_mic`, whose body matches mainline
`alc2xx_fixup_headset_mic`. ALC245 (`0x10ec0245`) is already handled in
`patch_alc269()`.
Record: [Standalone] [No missing prerequisites in this tree]
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
`b4 dig -c e00a6a89900dfa4cda3669558d2f3581cd41a656` matched
https://patch.msgid.link/20260807125857.678297-1-zhangheng@kylinos.cn
`b4 dig -a`: only v1 (`[PATCH 1/4]`). Thread saved to mbox.
Takashi Iwai reply (`874ih5bxrt.wl-tiwai@suse.de`): “Applied all four
patches now. Thanks.” No NAK, no requested changes, no Cc: stable
discussion.
Record: [lore/msgid above] [v1 only, applied as submitted] [maintainer
applied] [no NAKs]
Step 4.2: CHECK WHO REVIEWED THE PATCH
`b4 dig -w`: To tiwai@suse.com; Cc linux-sound@vger.kernel.org, linux-
kernel@vger.kernel.org.
Record: [ALSA maintainer was the To: recipient and applied the patch]
Step 4.3: SEARCH FOR THE BUG REPORT
Bugzilla 221623 fetched (HTTP 200 XML). Real user report, codec dump
attached (dump itself is only the HDMI codec; the text still names
ALC245 / 1025:1909). Author confirmed intent to patch. Reporter claimed
the quirk works on their machine.
Record: [One user + author] [Severity: headset mic missing] [Tested by
reporter]
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Series 1–4 are independent device quirks. This commit does not need
2/4–4/4.
Record: [Standalone despite 1/4 numbering]
Step 4.5: CHECK STABLE MAILING LIST HISTORY
lore.kernel.org/stable search returned HTTP 403.
Record: [UNVERIFIED: no stable-list discussion retrieved]
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: [alc269_fixup_tbl entry only] [runtime: alc_fixup_headset_mic
via ALC2XX_FIXUP_HEADSET_MIC]
Step 5.2: TRACE CALLERS
`patch_alc269()` (`sound/pci/hda/patch_realtek.c:12416`) calls
`snd_hda_pick_fixup(..., alc269_fixup_tbl, alc269_fixups)` then
`snd_hda_apply_fixup(..., HDA_FIXUP_ACT_PRE_PROBE)`. That is the
ALC269-family probe path, which includes ALC245 (`0x10ec0245` at line
445).
Record: [Codec probe / device enumeration] [Only SSID 1025:1909]
Step 5.3: TRACE CALLEES
`alc_fixup_headset_mic` → `snd_hda_apply_pincfgs`,
`alc_update_coef_idx`, set `spec->parse_flags |= HDA_PINCFG_HEADSET_MIC`
(defined in `sound/pci/hda/hda_auto_parser.h`).
Record: [Pin override + headset-mic parse flag]
Step 5.4: FOLLOW THE CALL CHAIN
Userspace does not trigger a special syscall; plugging a headset on this
laptop hits the already-probed HDA jack path. Without the quirk the
headset mic control never appears.
Record: [Reachable on this laptop at codec probe] [User-visible audio
input]
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Same SSID vendor 0x1025 already has three `ALC2XX_FIXUP_HEADSET_MIC`
Acer Nitro rows in this tree (0x1539, 0x159c, 0x1597).
Record: [Systematic Acer Nitro headset-mic pin-config bug; this is
another SSID]
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Yes, functionally: quirk table + `ALC2XX_FIXUP_HEADSET_MIC` + ALC245
support are in `sound/pci/hda/patch_realtek.c`. The 0x1909 row is absent
(`git grep 0x1909` on that file: no match). `git merge-base --is-
ancestor e00a6a89900df HEAD` failed.
Record: [Bug/gap exists here] [Introduced as missing hardware
description, not by a post-6.12 commit]
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Mainline path is `sound/hda/codecs/realtek/alc269.c` (post-split). 6.12
still has `sound/pci/hda/patch_realtek.c`. Insertion context also
differs: 6.12’s last Acer 0x1025 rows are 0x1597 / 0x169a, then Dell
0x1028:0x0470; mainline inserts after 0x1844 Helios ZPS. Needs a trivial
path + context backport, not a semantic rework. Exact insert in this
tree: after the 0x169a Acer Swift SFG16 line, before Dell M101z.
Record: [Minor conflicts: file path + nearby rows] [Otherwise clean one-
liner]
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
No 0x1909 / ANV16-42 entry. Sibling Nitro quirks are present; they do
not cover this SSID.
Record: [No existing fix for 1025:1909]
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: [ALSA HD-audio Realtek codec] [IMPORTANT: common laptop audio;
quirk is machine-specific]
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
`patch_realtek.c` is actively receiving quirk backports on this branch
(HP mute LED, Samsung, Victus, etc.). Mature table, high quirk churn by
design.
Record: [Mature driver, active quirk additions — expected for stable]
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: [Driver-specific / DMI-SSID-specific: Acer Nitro ANV16-42 only]
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: [Every boot/probe on that laptop with a headset jack] [Common
for owners of that model] [Unprivileged users hit it via
Pulse/PipeWire/ALSA]
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Not a panic. Headset microphone is missing/unusable. That is a real
functional regression versus Windows/firmware intent for that SKU.
Severity MEDIUM for the platform, HIGH for affected users (basic audio
input broken).
Record: [Failure: headset mic not detected] [Severity: MEDIUM (important
hardware bug, not crash)]
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Benefit: restores headset mic on a shipping Acer Nitro using an
existing, tested fixup. Risk: one SSID-keyed table entry; no API, no
lock, no parser change for other IDs.
Record: [Benefit: high for that SKU] [Risk: very low] [Favor backport]
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR:
- Documented user bug (bugzilla 221623) with claimed test of this exact
quirk
- Textbook hardware quirk / PCI ID exception for stable
- One line, existing `ALC2XX_FIXUP_HEADSET_MIC` /
`alc_fixup_headset_mic`
- ALC245 already supported; sibling Acer Nitro quirks already in 6.12.y
- Applied by ALSA maintainer; no review objections
- Independent of the rest of the 4-patch series
AGAINST:
- File path/context need a trivial backport (driver split after 6.12)
- Bugzilla codec attachment is only HDMI (incomplete dump);
identification still given in the report text
- lore.kernel.org/stable search was blocked (403)
UNRESOLVED:
- Could not read stable mailing-list archives (HTTP 403)
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? **PASS** — same fixup as other Nitro
rows; reporter tested; maintainer applied
2. Fixes a real bug that affects users? **PASS** — headset mic not
enumerated
3. Important issue? **PASS** — hardware unusable (mic), not a crash;
still the documented quirk exception
4. Small and contained? **PASS** — +1 line
5. No new features or APIs? **PASS** — existing quirk ID on existing
driver
6. Can apply to the local tree? **PASS** — needs path/context adjustment
only; semantics exist here
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: [Hardware quirk/workaround — SND_PCI_QUIRK in Realtek HDA table]
Step 9.4: MAKE YOUR DECISION
This is a one-line Realtek HDA PCI quirk for a user-reported broken
headset mic, using a fixup already in 6.12.y. It should be backported to
this tree.
Verification:
- [Phase 1] Subject/tags: Closes bugzilla 221623; SOB Zhang Heng +
Takashi Iwai; msgid 20260807125857.678297-1; no Fixes/Cc-stable
- [Phase 1] Bugzilla XML HTTP 200: reporter samuelrenault37, ALC245
1025:1909, claimed test on Fedora 44 / 7.0.11
- [Phase 2] Diff: +1 `SND_PCI_QUIRK(0x1025, 0x1909, ...,
ALC2XX_FIXUP_HEADSET_MIC)`
- [Phase 2] 6.12 fixup at patch_realtek.c:10552 uses
`alc_fixup_headset_mic`; body matches later `alc2xx_fixup_headset_mic`
(pin 0x19, coef 0x45, HDA_PINCFG_HEADSET_MIC)
- [Phase 3] `git merge-base --is-ancestor e00a6a89900df HEAD` → not in
this tree
- [Phase 3] `git grep 0x1909 -- sound/pci/hda/patch_realtek.c` → no
match
- [Phase 3] ALC2XX_FIXUP_HEADSET_MIC present; sibling Nitro quirks
0x1539/0x159c/0x1597 present
- [Phase 3] `1c643c600407d` already in 6.12.y (alc2xx-fixup-headset-mic
model)
- [Phase 3] ALC245 `0x10ec0245` handled in patch_realtek.c:445
- [Phase 4] `b4 dig -c e00a6a89900df` →
patch.msgid.link/20260807125857.678297-1; v1 only
- [Phase 4] `b4 dig -w`: To tiwai@suse.com, Cc linux-sound
- [Phase 4] mbox: Iwai “Applied all four patches now”; series 2/4–4/4
are unrelated machines
- [Phase 4] lore.kernel.org and patch.msgid.link HTTP 403 from
curl/WebFetch; used b4 mbox instead
- [Phase 4] UNVERIFIED: stable@ lore search (HTTP 403)
- [Phase 5] Caller: `patch_alc269()` → `snd_hda_pick_fixup(...,
alc269_fixup_tbl, ...)`
- [Phase 6] `git describe HEAD` / Makefile: pending-6.12, 6.12.111; file
is patch_realtek.c not alc269.c
- [Phase 6] Insertion point: after 0x169a Acer Swift SFG16, before Dell
0x1028:0x0470
- [Phase 8] Failure mode: missing headset mic on one laptop SKU, not a
panic
- UNVERIFIED: bugzilla attachment is HDMI-only, so pin dump for ALC245
was not independently re-checked from that file
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 05e7fcc2f67e6..9ec18f779a700 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -6595,6 +6595,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1025, 0x1826, "Acer Helios ZPC", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
SND_PCI_QUIRK(0x1025, 0x182c, "Acer Helios ZPD", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
SND_PCI_QUIRK(0x1025, 0x1844, "Acer Helios ZPS", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
+ SND_PCI_QUIRK(0x1025, 0x1909, "Acer Nitro ANV16-42", ALC2XX_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X),
SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Add quirk for HP ENVY 13-aq1xxx
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (45 preceding siblings ...)
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add quirk for Acer Nitro ANV16-42 headset mic Sasha Levin
@ 2026-10-19 13:51 ` Sasha Levin
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18-5.10] ASoC: tlv320aic26: remove keyclick sysfs file Sasha Levin
` (14 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:51 UTC (permalink / raw)
To: patches, stable
Cc: Tarun Noonemunthala, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Tarun Noonemunthala <ntarun2000@gmail.com>
[ Upstream commit a01a223bd685be42e908d970de32eeb3646097f3 ]
The HP ENVY Laptop 13-aq1xxx (PCI SSID 103c:86ad) uses an ALC285 codec
with two speaker pairs: front (pin 0x14) and bottom (pin 0x17).
The BIOS leaves pin 0x14 as [N/A] ("not connected"), so the generic
parser never enables the front pair and only the bottom speakers are
audible. The vendor driver (RTKVHD64.sys) programs that pin with the
value 0x90170150 and runs the HP amplifier initialization, which is
already implemented in the driver as ALC285_FIXUP_HP_GPIO_AMP_INIT.
Add a board fixup that applies the pin configuration for 0x14 and chains
to the existing amplifier init fixup.
The pin value was recovered from the vendor driver's own configuration
data. The patch and this changelog were prepared with an AI coding
assistant (see the Assisted-by tag below); the change was reviewed and
tested by the submitter on the affected machine.
Tested on an HP ENVY 13-aq1xxx by rebuilding snd-hda-codec-alc269 from
the Fedora 7.1.10 source and loading it: the codec now reports
"line_outs=2 (0x14/0x17)", pin 0x14 comes up as an output (Pin-ctls
0x40) with its amplifier unmuted, and both speaker pairs play.
Assisted-by: OpenCode:deepseek-v4.1-flash checkpatch
Signed-off-by: Tarun Noonemunthala <ntarun2000@gmail.com>
Link: https://patch.msgid.link/20260923094014.58867-1-ntarun2000@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
I have enough to decide: this is a scoped Realtek pin/amp quirk for one
HP SSID, the 6.18.57 driver already has the helpers it needs, and the
patch applies cleanly.
## PHASE 1: COMMIT MESSAGE FORENSICS
**Step 1.1: PARSE THE SUBJECT LINE**
Record: `[ALSA/hda/realtek] [Add] [PCI SSID quirk so HP ENVY 13-aq1xxx
front speakers are enabled]`
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Assisted-by: OpenCode:deepseek-v4.1-flash checkpatch`
- `Signed-off-by: Tarun Noonemunthala <ntarun2000@gmail.com>` (author)
- `Link:
https://patch.msgid.link/20260923094014.58867-1-ntarun2000@gmail.com`
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` (ALSA maintainer)
- No `Fixes:` tag (expected; this is a BIOS/hardware workaround, not a
regression from a prior kernel commit)
- No `Reported-by:`, `Tested-by:`, `Reviewed-by:`, `Acked-by:`, or `Cc:
stable@vger.kernel.org`
- Pipeline markers (`[Upstream commit
a01a223bd685be42e908d970de32eeb3646097f3]`, `Signed-off-by: Sasha
Levin`) ignored per instructions
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** HP ENVY Laptop 13-aq1xxx, PCI SSID `103c:86ad`, ALC285, two
speaker pairs (front pin `0x14`, bottom pin `0x17`). BIOS marks pin
`0x14` as `[N/A]` / not connected.
- **Symptom:** Generic parser never enables the front pair; only bottom
speakers play.
- **Root cause:** Broken BIOS pin config. Vendor Windows driver
(`RTKVHD64.sys`) programs pin `0x14` as `0x90170150` and runs HP amp
init already present as `ALC285_FIXUP_HP_GPIO_AMP_INIT`.
- **Fix:** New board fixup applying that pin config and chaining to the
existing amp-init fixup.
- **Version info:** Tested by rebuilding `snd-hda-codec-alc269` from
Fedora 7.1.10 source on the affected machine; codec then reports
`line_outs=2 (0x14/0x17)`, pin `0x14` output (`Pin-ctls 0x40`), amp
unmuted, both pairs play.
- No stack traces (not a crash). No kernel-version range beyond “this
laptop + this codec driver”.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not a disguised cleanup. It is an explicit hardware quirk: pin
override plus existing amp-init chain. That is the documented Realtek
HDA workaround pattern.
## PHASE 2: DIFF ANALYSIS
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/hda/codecs/realtek/alc269.c` (`+11` lines, 0 removed)
- Functions/tables: `enum { ... }` (add `ALC285_FIXUP_HP_ENVY_13AQ`),
`alc269_fixups[]`, `alc269_fixup_tbl[]`
- Scope: single-file surgical hardware quirk
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
1. Enum: add `ALC285_FIXUP_HP_ENVY_13AQ` after
`ALC285_FIXUP_HP_ENVY_X360`.
2. `alc269_fixups[]`: new `HDA_FIXUP_PINS` entry `{ 0x14, 0x90170150 }`,
chained to `ALC285_FIXUP_HP_GPIO_AMP_INIT`.
3. `alc269_fixup_tbl[]`: `SND_PCI_QUIRK(0x103c, 0x86ad, "HP ENVY
13-aq1xxx", ALC285_FIXUP_HP_ENVY_13AQ)` between `0x869d` and
`0x86c1`.
Before: SSID `103c:86ad` has no match; generic parser skips unused pin
`0x14`.
After: probe applies the speaker pin and the existing HP GPIO amp-init
(and its existing LED chain).
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: **Hardware workaround (category h)** plus pin-config
correctness. `0x90170150` decodes as fixed-function internal speaker
(`AC_JACK_PORT_FIXED` + `AC_JACK_SPEAKER` + analog +
`AC_DEFCFG_MISC_NO_PRESENCE`, assoc 5). Same speaker pincfg already used
for HP Envy x360 pin `0x14` (`B&O soundbar speakers`) in
`alc285_fixup_hp_envy_x360()`.
**Step 2.4: ASSESS THE FIX QUALITY**
Record: Minimal, table-driven, SSID-scoped. Uses existing
`HDA_FIXUP_PINS` and `ALC285_FIXUP_HP_GPIO_AMP_INIT`. Regression risk is
low and confined to PCI SSID `103c:86ad`. Chain to
`ALC285_FIXUP_HP_GPIO_AMP_INIT` also chains to
`ALC285_FIXUP_HP_GPIO_LED` (`alc_fixup_hp_gpio_led(..., 0x04, 0x01)`);
that is the established HP ALC285 amp-init pattern (same as Envy x360).
Submitter tested both speaker pairs on the machine. No public API or
data-structure change.
## PHASE 3: GIT HISTORY INVESTIGATION
**Step 3.1: BLAME THE CHANGED LINES**
Record: Insertion points sit next to HP ALC285 fixups from
`aeeb85f26c3bb` (“ALSA: hda: Split Realtek HD-audio codec driver”,
Takashi Iwai, 2025-07-09). No prior `0x86ad` entry; the “bug” is a
missing quirk for BIOS-broken pin config, not a later regression. SSID
`0x86ad` is absent from `v6.18.57`.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Not applicable. This does not revert or patch a
specific earlier commit.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: `alc269.c` regularly gets SSID quirks. Nearby HP entries already
use `ALC285_FIXUP_HP_GPIO_AMP_INIT` (ZBook 17 G6 `0x860c`, ZBook 15 G6
`0x860f`, Elite Dragonfly G1 `0x861f`). Standalone, not `patch X/Y`.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Only this Realtek commit from Tarun Noonemunthala in this tree.
Maintainer Takashi Iwai applied it (`Signed-off-by` + “Applied now.
Thanks.”).
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: Depends on `ALC285_FIXUP_HP_GPIO_AMP_INIT` /
`alc285_fixup_hp_gpio_amp_init()`, `alc269_fixups[]`,
`alc269_fixup_tbl[]`, and `snd_hda_pick_fixup()`. All present in
`v6.18.57`. Applies standalone.
## PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c a01a223bd685be42e908d970de32eeb3646097f3` matched patch-id
`273d83204a2340faba5eada8e1765ed331574a12`
- Lore/msgid:
https://patch.msgid.link/20260923094014.58867-1-ntarun2000@gmail.com
- `b4 dig -a`: single **v1**, no later revisions
- Takashi Iwai, 2026-09-28: “Applied now. Thanks.” No NAK, no requested
changes, no `Cc: stable` in the thread
- `lore.kernel.org` WebFetch returned 403; thread confirmed via `b4
dig`, openwall, and IU LKML mirrors
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): To Takashi Iwai; Cc Jaroslav Kysela, `linux-
sound@vger.kernel.org`, `linux-kernel@vger.kernel.org`. Subsystem
maintainer received and applied it.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No bugzilla/syzbot link. Evidence is the submitter’s hardware
test (codec dump + both speaker pairs). Web search did not find a
separate public user-report thread beyond this patch.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone v1. Not part of a multi-patch series.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: No stable-list discussion of this SSID/quirk found. Unverified
whether anyone previously declined it; no evidence of a NAK.
## PHASE 5: CODE SEMANTIC ANALYSIS
**Step 5.1: KEY FUNCTIONS**
Record: No new functions. Tables: `alc269_fixups[]`,
`alc269_fixup_tbl[]`. Runtime path uses `snd_hda_pick_fixup()`,
`__snd_hda_apply_fixup()`, `snd_hda_apply_pincfgs()`,
`alc285_fixup_hp_gpio_amp_init()`, `alc285_fixup_hp_gpio_led()`.
**Step 5.2: TRACE CALLERS**
Record: Codec probe in `alc269.c` (~line 8557) calls
`snd_hda_pick_fixup(codec, alc269_fixup_models, alc269_fixup_tbl,
alc269_fixups)`. Match is PCI subsystem ID via `SND_PCI_QUIRK`.
`HDA_FIXUP_PINS` runs at `HDA_FIXUP_ACT_PRE_PROBE` (`auto_parser.c`).
Amp init runs at `HDA_FIXUP_ACT_INIT` (`msleep(100)` then
`alc_write_coef_idx(codec, 0x65, 0x0)`). Path is module/codec probe, not
a hot syscall.
**Step 5.3: TRACE CALLEES**
Record: `snd_hda_codec_set_pincfg()` for pin `0x14`; coef write `0x65`;
GPIO LED helper. No allocations, no new locks.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Boot / `snd-hda-codec-realtek` load → ALC269/ALC285 probe → SSID
match `103c:86ad` → pin override → generic parser sees a speaker at
`0x14` → amp init. Reachable on that laptop without special userspace.
Unprivileged users cannot trigger it on other machines (SSID match).
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same `0x90170150` speaker pincfg appears multiple times in
`alc269.c`. Envy x360 uses it on pin `0x14` and also chains
`ALC285_FIXUP_HP_GPIO_AMP_INIT`. This patch is the same class of fix,
smaller (one pin, no extra coef/headset logic).
## PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record:
- Tree: `git describe HEAD` = `v6.18.57-155-gcdf239ca885b2`; `make
kernelversion` = `6.18.57`
- `sound/hda/codecs/realtek/alc269.c` exists (split is in `v6.18.57`)
- `v6.18.57` has no `0x86ad` / `ALC285_FIXUP_HP_ENVY_13AQ`; BIOS-broken
pin path is unquirked there
- Candidate overlay on current HEAD is ignored as selection evidence;
the 6.18.57 baseline still needs the quirk
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: `git apply --check` of this diff onto the `v6.18.57` copy of
`alc269.c` succeeded (exit 0). Insertion context (enum after
`ALC285_FIXUP_HP_ENVY_X360`, fixup after that entry, quirk between
`0x869d` and `0x86c1`) matches. Expected backport difficulty: **clean
apply**.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: No other `0x86ad` quirk. `ALC285_FIXUP_HP_ENVY_X360` is a
different SSID (`0x85de`) with extra pin/coef work. No alternate fix for
13-aq1xxx.
## PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: ALSA HD-audio Realtek codec (`sound/hda/codecs/realtek/`).
**IMPORTANT** for laptop audio; **PERIPHERAL** in blast radius (one PCI
SSID). Driver is common; this table entry is model-specific.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Actively maintained; frequent `Add quirk` commits. Pattern is
mature: append enum + fixup + `SND_PCI_QUIRK`.
## PHASE 8: IMPACT AND RISK ASSESSMENT
**Step 8.1: WHO IS AFFECTED**
Record: Driver-specific / platform-specific: HP ENVY 13-aq1xxx with HDA
SSID `103c:86ad` (vendor `0x103c` = HP). No other `0x86ad` uses in this
tree.
**Step 8.2: TRIGGER CONDITIONS**
Record: Every codec probe on that laptop. Common for owners of that
model; impossible for everyone else. Not a race. Not an unprivileged
attack path.
**Step 8.3: FAILURE MODE SEVERITY**
Record: Front speakers stay silent; bottom pair still works. Not a
panic/UAF. User-visible broken audio on shipping hardware. Severity
**MEDIUM** as a crash, **HIGH** as a hardware-quirk enablement (laptop
audio half-dead). Stable rules list “hardware quirk” as an accepted
class.
**Step 8.4: RISK-BENEFIT RATIO**
Record:
- **Benefit:** Restores front speakers on a real ALC285 HP laptop;
tested on hardware; maintainer-applied.
- **Risk:** Very low — 11 lines, SSID-scoped, existing helpers only.
- **Ratio:** Strongly favors backport.
## PHASE 9: FINAL SYNTHESIS
**Step 9.1: EVIDENCE**
For:
- Hardware quirk / pin override for existing Realtek HDA driver (stable-
rules exception)
- Real user-visible bug: BIOS leaves pin `0x14` disconnected; front
speakers silent
- Pin value taken from vendor driver; same `0x90170150` already used as
HP internal speaker
- Chains to existing `ALC285_FIXUP_HP_GPIO_AMP_INIT` already in 6.18.57
- 11 lines, one file, SSID-scoped
- Tested on the affected machine (codec state + playback)
- Applied by Takashi Iwai after v1; no NAK
- Applies cleanly to this tree’s `alc269.c`
Against:
- Not a crash, UAF, or security fix
- Affects one laptop SSID
- Changelog mentions AI assistance (mitigated by maintainer apply +
hardware test)
- No independent second reporter / bugzilla (unverified beyond
submitter)
Unresolved:
- Direct `lore.kernel.org` fetch 403 (thread recovered via `b4` and
mirrors)
- No stable-list discussion found
- GPIO LED chain side-effect on this exact SKU not independently
documented; same chain as other HP ALC285 amp-init boards, and the
submitter tested playback
**Step 9.2: STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — standard pin table +
existing chain; hardware-tested; maintainer applied
2. Fixes a real bug that affects users? **PASS** — silent front speakers
on HP ENVY 13-aq1xxx
3. Important issue? **PASS** — hardware quirk (explicitly allowed);
broken onboard speakers
4. Small and contained? **PASS** — +11 lines, one file
5. No new features or APIs? **PASS** — SSID quirk only; no new UAPI
6. Can apply to the local tree? **PASS** — file, enum, tables, and
`ALC285_FIXUP_HP_GPIO_AMP_INIT` exist in 6.18.57; `git apply --check`
clean
**Step 9.3: EXCEPTION CATEGORIES**
Record: **Hardware quirk / audio codec quirk** (and effectively a
device-ID table addition to an existing driver). Automatic yes-class for
stable.
**Step 9.4: DECISION**
This tree is 6.18.57. The Realtek ALC269/ALC285 quirk tables are
present; SSID `103c:86ad` is not. The patch is the usual HP pin+amp
workaround, scoped to one subsystem ID, already used elsewhere in this
driver. That is exactly the class of change stable is meant to take.
### What it solves for stable users
On HP ENVY 13-aq1xxx, BIOS marks the front-speaker pin unused, so Linux
only drives the bottom pair. The quirk programs pin `0x14` as an
internal speaker and runs the existing HP amp init so both pairs work.
Without it, 6.18.y users of that laptop keep broken speaker output for
the life of the LTS tree.
### Risk vs benefit
Benefit is real, hardware-tested audio on a shipping laptop. Risk is a
11-line SSID-local table addition with no locking, allocation, or API
change.
### Concerns
None that block backport. GPIO LED chaining is inherited from
`ALC285_FIXUP_HP_GPIO_AMP_INIT` and is the existing HP ALC285 pattern.
No extra prerequisite commits are required.
Verification:
- [Phase 1] Parsed tags: author SOB, Takashi Iwai SOB, msgid Link; no
Fixes/Reported-by/Cc: stable
- [Phase 1] Body: BIOS pin 0x14 N/A; vendor pincfg 0x90170150; tested
line_outs=2 on HP ENVY 13-aq1xxx
- [Phase 2] Diff: +11 lines in `alc269.c` — enum, `alc269_fixups[]` pin
table, `SND_PCI_QUIRK(0x103c, 0x86ad, ...)`
- [Phase 2] Pin 0x90170150 verified as fixed internal speaker via
`include/sound/hda_verbs.h`; same value at Envy x360 pin 0x14
- [Phase 2] Chain target `ALC285_FIXUP_HP_GPIO_AMP_INIT` at lines
5704–5708; func `alc285_fixup_hp_gpio_amp_init` at 2827–2835
- [Phase 3] `git describe HEAD` = `v6.18.57-155-gcdf239ca885b2`; `make
kernelversion` = 6.18.57
- [Phase 3] `git merge-base --is-ancestor 2c9247c1739db v6.18.57` — not
in v6.18.57 baseline
- [Phase 3] `git grep 0x86ad v6.18.57 -- alc269.c` — absent;
`ALC285_FIXUP_HP_GPIO_AMP_INIT` present
- [Phase 3] Blame insertion neighbors: `aeeb85f26c3bb` (Realtek split),
ancestor of v6.18.57
- [Phase 4] `b4 dig -c a01a223bd685...`: v1 only; maintainer To/Cc;
Takashi “Applied now”
- [Phase 4] lore WebFetch 403; IU/openwall used instead
- [Phase 4] No stable-list hit for this model
- [Phase 5] Probe calls `snd_hda_pick_fixup(..., alc269_fixup_tbl,
alc269_fixups)` ~line 8557; `HDA_FIXUP_PINS` in
`auto_parser.c:841-847`
- [Phase 5] `0x86ad` unique in tree
- [Phase 6] `git apply --check` of this diff onto v6.18.57 `alc269.c`:
exit 0
- [Phase 8] Failure mode: silent front speakers on one HP SSID, not a
kernel oops
- UNVERIFIED: GPIO mute-LED wiring on this exact SKU (same inherited
chain as other HP ALC285 amp-init boards; playback was tested)
This is a small, maintainer-applied hardware quirk that restores
speakers on an existing Realtek codec in this 6.18.57 tree, with clean
apply and SSID-local risk.
**YES**
sound/hda/codecs/realtek/alc269.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 1fcf2ba795e8a..0a3df8b78aae6 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -3774,6 +3774,7 @@ enum {
ALC285_FIXUP_HP_SPECTRE_X360_EB1,
ALC285_FIXUP_HP_SPECTRE_X360_DF1,
ALC285_FIXUP_HP_ENVY_X360,
+ ALC285_FIXUP_HP_ENVY_13AQ,
ALC288_FIXUP_DELL_HEADSET_MODE,
ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
ALC288_FIXUP_DELL_XPS_13,
@@ -5981,6 +5982,15 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true,
.chain_id = ALC285_FIXUP_HP_GPIO_AMP_INIT,
},
+ [ALC285_FIXUP_HP_ENVY_13AQ] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = (const struct hda_pintbl[]) {
+ { 0x14, 0x90170150 }, /* front speakers */
+ { }
+ },
+ .chained = true,
+ .chain_id = ALC285_FIXUP_HP_GPIO_AMP_INIT,
+ },
[ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc285_fixup_ideapad_s740_coef,
@@ -6794,6 +6804,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT),
SND_PCI_QUIRK(0x103c, 0x864f, "HP Laptop 15-dy0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
+ SND_PCI_QUIRK(0x103c, 0x86ad, "HP ENVY 13-aq1xxx", ALC285_FIXUP_HP_ENVY_13AQ),
SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
SND_PCI_QUIRK(0x103c, 0x86c8, "HP Laptop 14s-dr1xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.10] ASoC: tlv320aic26: remove keyclick sysfs file
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (46 preceding siblings ...)
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Add quirk for HP ENVY 13-aq1xxx Sasha Levin
@ 2026-10-19 13:51 ` Sasha Levin
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda: Check snd_hda_power_pm construct error before executing verb Sasha Levin
` (13 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:51 UTC (permalink / raw)
To: patches, stable
Cc: Pengpeng Hou, Mark Brown, Sasha Levin, shenghao-ding, kevin-lu,
baojun.xu, sen, lgirdwood, perex, tiwai, linux-sound,
linux-kernel
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit ae375f8d063d71e598c0d7e14fc056154c84d7a7 ]
aic26_probe() creates the keyclick sysfs file on the component device.
The file callback uses the ASoC component pointer stored in the driver
private data.
There is no matching remove callback, so the sysfs file can remain after
the component is removed while its backing component state is gone.
Add a component remove callback that removes the keyclick file.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260615064549.34110-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
The local tree is **6.18.53**. The buggy `device_create_file()` path is
present in `v6.18.53`; this 6-line remove-side cleanup is a real
UAF/NULL-deref fix and applies cleanly here.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: **[ASoC / tlv320aic26] [remove] [tear down the keyclick sysfs
attribute on component remove]**
The subject says “remove keyclick sysfs file”; the body is more precise:
the file is **not** deleted as a feature. A matching `.remove` callback
is added so the existing debug attribute is unregistered when the
component goes away.
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- **Link:**
`https://patch.msgid.link/20260615064549.34110-1-pengpeng@iscas.ac.cn`
- **Signed-off-by:** Pengpeng Hou `<pengpeng@iscas.ac.cn>` (author)
- **Signed-off-by:** Mark Brown `<broonie@kernel.org>` (ASoC maintainer)
- **No Fixes:** tag (expected for this review)
- **No Cc: stable@vger.kernel.org** (expected)
- **No Reported-by / Tested-by / Reviewed-by / Acked-by / syzbot**
- Ignored pipeline tags (`[Upstream commit …]`, Sasha Levin SOB) per
instructions
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** `aic26_probe()` creates `keyclick` on `component->dev`.
`keyclick_show` / `keyclick_store` use `dev_get_drvdata()` and then
`aic26->component`. There is no matching remove.
- **Symptom:** After the ASoC component is removed, the sysfs file can
still be there while the component / driver private state is gone.
- **Failure mode:** use of stale `aic26` / `aic26->component` from sysfs
(UAF or NULL deref).
- **Version info:** none in the message. The create-file path dates to
the original 2008 driver.
- **Fix:** add `aic26_remove()` that calls `device_remove_file()` and
wire it to `snd_soc_component_driver.remove`.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: **Yes — a real lifetime bug, not a feature deletion.** The
subject is slightly misleading; this is the standard “create in probe,
never remove” sysfs teardown hole.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- **File:** `sound/soc/codecs/tlv320aic26.c` (**+6 / −0**)
- **Functions:** new `aic26_remove()`; `aic26_soc_component_dev` gets
`.remove`
- **Scope:** single-file surgical fix
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- **Before:** `aic26_probe()` (card bind) does
`device_create_file(component->dev, &dev_attr_keyclick)` and returns 0
even if create fails. No `.remove`.
- **After:** card/component teardown calls `aic26_remove()` →
`device_remove_file()`.
- **Path:** component remove / card unbind / codec unregister — not the
playback hot path.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: **[UAF / NULL deref from leftover sysfs] [probe creates an
unmanaged attribute; remove never tears it down]**
Verified mechanics in this tree:
1. `component->dev` is the SPI device (`snd_soc_component_initialize()`
sets `component->dev = dev`; SPI probe passes `&spi->dev`).
2. `keyclick_show` / `keyclick_store` do `dev_get_drvdata(dev)` then
`snd_soc_component_read/update_bits(aic26->component, …)`.
3. `aic26_probe()` is only run from `soc_probe_component()` when a card
binds.
4. `soc_remove_component()` calls `snd_soc_component_remove()` →
`driver->remove` if set. Without this patch that is NULL, so the
attribute stays on the still-live SPI device.
5. On SPI driver unbind, `device_unbind_cleanup()` runs
`devres_release_all()` (frees `aic26` via `devm_kzalloc`, unregisters
the component) then `dev_set_drvdata(dev, NULL)`.
`device_create_file()` is **not** a managed resource, so `keyclick`
remains.
6. Later sysfs access: NULL deref if drvdata is already NULL; UAF in the
window while `aic26` is freed and drvdata is not yet cleared; or
concurrent show/store vs teardown because `device_remove_file()` is
what waits out in-flight sysfs ops.
Sibling codecs already pair create/remove the same way (`wm8962.c`,
`cs42l52.c`, `cs42l56.c`).
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- **Obviously correct:** matches the established ASoC pattern;
`device_remove_file()` is the matching API.
- **Minimal:** 6 lines, no API/behavior change for working hardware.
- **Regression risk:** very low. If `device_create_file()` failed,
`device_remove_file()` may emit a kernfs “failed to remove” warning;
that is the same pattern as the sibling beep drivers and only on the
already-failed create path. No new locking.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- **Introduced by:** `d8e3bb7385da0` (“ALSA: ASoC: Add Texas Instruments
TLV320AIC26 codec driver”, 2008-07-29)
- **Kernel version:** v2.6.27-era; present for the entire life of this
6.18 tree
- Sysfs create itself has been stable; later commits only reworked ASoC
helpers (`1514613a7a448` codec→component, `2eadc04d83f6c`
`DEVICE_ATTR_RW`, `1218d67d37615` `sysfs_emit`)
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: **No Fixes: tag.** Blame is sufficient: the hole is the original
driver, not a recent regression.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record:
- Recent on this file at `v6.18.53`: `sysfs_emit`, DAI naming,
`DEVICE_ATTR_RW` — none add remove.
- Same author, same day: `02b2a3058912d` / upstream `ce3733792d38`
“ASoC: sma1303: remove fault-check sysfs group on remove” —
**parallel** fix in another codec, different msgid, not a
prerequisite.
- **Standalone.**
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Pengpeng Hou is a regular ASoC codec contributor (error-path /
lifetime fixes). Not the subsystem maintainer. Maintainer **Mark Brown**
applied the patch.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: **None.** `.remove` is already `void (*remove)(struct
snd_soc_component *)` in `include/sound/soc-component.h` on this tree.
No new helpers.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- **b4 dig:**
https://patch.msgid.link/20260615064549.34110-1-pengpeng@iscas.ac.cn
- **Revisions:** v1 only (no v2/v3)
- **Thread (mbox via `b4 dig -m`):** 2 messages — submission and Mark
Brown’s apply to `broonie/sound.git for-7.3`
- **No NAK, no review comments, no Cc: stable in-thread**
- Direct lore HTTP fetch returned **403**; discussion was recovered from
the mbox, not from the web UI
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): To/Cc included Mark Brown, Liam Girdwood, Takashi
Iwai, Jaroslav Kysela, TI codec contacts, `linux-sound`, `linux-kernel`.
Applied by the ASoC maintainer. No extra Reviewed-by.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: **No user/syzbot/bugzilla report.** Code-analysis fix. No
evidence of a field crash report.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Same-day sma1303 sysfs-remove patch is a sibling, not a
dependency. This patch is `[PATCH]` (not `n/N`).
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: **UNVERIFIED** for lore.kernel.org/stable (HTTP 403). No in-tree
discussion of a reason to skip this on 6.18.y.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF**
Record: `aic26_remove` (new), `aic26_soc_component_dev` table; related
existing: `aic26_probe`, `keyclick_show`, `keyclick_store`,
`aic26_spi_probe`
**Step 5.2: TRACE CALLERS**
Record:
- `aic26_probe` ← `snd_soc_component_probe()` ← `soc_probe_component()`
(card bind)
- `aic26_remove` ← `snd_soc_component_remove()` ←
`soc_remove_component()` ← `soc_remove_link_components()` / error
unwind; also via card unbind when the component is unregistered
(`snd_soc_del_component_unlocked()` → `snd_soc_unbind_card()`)
- Sysfs callbacks: userspace read/write of `keyclick` (mode 0644 via
`DEVICE_ATTR_RW`)
**Step 5.3: TRACE CALLEES**
Record: `device_remove_file()` only. Show/store use
`snd_soc_component_read` / `update_bits` on `aic26->component`.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record:
- Bind: SPI probe → `devm_snd_soc_register_component` → later card bind
→ `aic26_probe` → sysfs create
- Unbind: card/component teardown should drop the file; SPI unbind then
frees `aic26` and clears drvdata
- **Reachable from userspace:** yes, via sysfs after bind. After broken
unbind, any reader of that 0644 file can oops. Unprivileged read is
possible; write is typically root. Trigger is teardown (rmmod / unbind
/ card removal), not every PCM period.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: In-tree ASoC codecs that create device sysfs files already
remove them (wm8962, cs42l52, cs42l56). This driver was the outlier.
sma1303 got the same class of fix the same day.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: **Yes.** `git describe HEAD` → `v6.18.53-5049-g0f0bdc2b0dffb`;
`make kernelversion` → **6.18.53**.
- `git grep aic26_remove v6.18.53 -- sound/soc/codecs/tlv320aic26.c` →
**not present**
- `v6.18.53:sound/soc/codecs/tlv320aic26.c` still has create in
`aic26_probe()` and no `.remove`
- Bug introduced in 2008; present for all of 6.18.y
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: **Clean apply** to the `v6.18.53` copy of the file (`patch
--dry-run` return code 0). Surrounding probe/driver table matches the
hunk. `.remove` is already `void` here.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: No earlier tlv320aic26 sysfs-remove fix at `v6.18.53`.
`sysfs_emit` conversion does not close the lifetime hole.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: **ASoC codec driver (`sound/soc/codecs/`)** — **PERIPHERAL**
- `CONFIG_SND_SOC_TLV320AIC26` is a **promptless** tristate, `depends on
SPI`
- Only in-tree `imply` is `SND_SOC_ALL_CODECS`, which **`depends on
COMPILE_TEST`**
- Grep of the whole tree: no machine driver, DTS, or defconfig selects
this codec
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: ASoC is active; **this file is mature/quiet**. Last functional
churn is ASoC API modernization, not new features. Long-lived bug.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: **Driver-specific / config-specific.** Production 6.18 configs
will not enable this unless they set the hidden
`CONFIG_SND_SOC_TLV320AIC26` (out-of-tree board, explicit fragment).
Compile-test “all codecs” builds can include it.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record:
- Requires the codec bound to a card (so probe created the file), then
component/driver teardown, then sysfs access — or concurrent access
during unbind
- Not every-boot; **module unload / card unbind**
- Unprivileged users can **read** the leftover 0644 file (DoS oops), not
typically write
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: **NULL deref / UAF → kernel oops** — **HIGH** (crash;
theoretically memory-safety). Not silent corruption. No syzbot/CVE.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- **Benefit:** medium-low population, high severity *if* the driver is
used; prevents oops/UAF on teardown
- **Risk:** very low (6 lines, standard API, no locking/ABI)
- **Ratio:** favorable for stable — cheap crash fix
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real probe/remove mismatch: unmanaged sysfs vs component/driver
lifetime
- Failure is oops/UAF, a class stable regularly takes
- 6 lines, obviously correct, same pattern as wm8962/cs42l52/cs42l56
- Bug present since 2008; code exists in this 6.18.53 tree; patch
applies cleanly
- No prerequisites; `void (*remove)` already matches
- ASoC maintainer applied v1 with no objections
AGAINST:
- No field report / syzbot / Fixes / Cc: stable
- Obscure codec: no in-tree card, hidden Kconfig, only implied under
`COMPILE_TEST`
- Debug sysfs, not the PCM path
- Tiny warning risk if create failed and remove still runs
UNRESOLVED:
- Stable-list discussion (lore HTTP 403)
- Whether any distro/out-of-tree 6.18 config actually sets
`CONFIG_SND_SOC_TLV320AIC26`
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — standard
`device_remove_file` pairing; maintainer applied; in-tree siblings
already do this
2. Fixes a real bug that affects users? **PASS** — leftover sysfs after
remove is a real lifetime bug (population is small, but the bug is
real)
3. Important issue (crash, security, corruption, deadlock)? **PASS** —
UAF/NULL deref oops on a world-readable sysfs file after unbind
4. Small and contained? **PASS** — +6 lines, one codec
5. No new features or APIs? **PASS**
6. Can apply to the local tree? **PASS** — applies to `v6.18.53`
tlv320aic26.c; `.remove` type matches
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Not** an ID/quirk/DT/build/doc exception. Ordinary small
bugfix.
**Step 9.4: MAKE YOUR DECISION**
This is a small, correct teardown fix for a use-after-free / NULL deref.
The driver is obscure, but the rules and the usual stable practice still
take this class of probe/remove hole: crash on unbind, surgical change,
no dependencies, clean apply to **this** 6.18.53 tree. Benefit is
limited by who enables the codec; risk is negligible. That is a YES.
------------------------------------------------
What the commit solves for stable users
------------------------------------------------
`aic26_probe()` publishes `keyclick` on the SPI device. Show/store use
driver private data and `aic26->component`. Nothing ever calls
`device_remove_file()`. After card/component teardown or `rmmod`, the
attribute can remain while `aic26` is freed and drvdata is cleared. A
later read oopses. The patch adds the missing component `.remove`.
------------------------------------------------
Stable rules / risk vs benefit
------------------------------------------------
Meets the bar: obviously correct, real crash-class bug, tiny, no new
API, applies here. User set is small (hidden Kconfig, no in-tree
machine), but regression risk is near zero. No extra commits needed.
------------------------------------------------
Verification
------------------------------------------------
- **[Phase 1]** Tags: Link msgid, SOB Hou + Brown; no Fixes/Reported-
by/syzbot/Cc:stable
- **[Phase 2]** Diff: +6 lines, `aic26_remove` + `.remove =
aic26_remove`
- **[Phase 2]** `keyclick_show`/`store` use `dev_get_drvdata` then
`aic26->component` (file read)
- **[Phase 2]** Siblings wm8962/cs42l52/cs42l56 already
`device_remove_file` in remove
- **[Phase 3]** Blame: create-file from `d8e3bb7385da0` (2008); no Fixes
tag
- **[Phase 3]** Author also fixed sma1303 sysfs on remove the same day;
independent
- **[Phase 4]** `b4 dig -c ae375f8d063d…`: lore msgid
20260615064549.34110-1; v1 only
- **[Phase 4]** `b4 dig -w`: Brown, Girdwood, Iwai, Kysela, linux-sound
CC’d
- **[Phase 4]** `b4 dig -m`: 2-message thread; Brown applied to for-7.3;
no NAK
- **[Phase 4]** lore.kernel.org / patch.msgid.link HTTP **403**; used
mbox instead
- **[Phase 5]** probe via `soc_probe_component`; remove via
`soc_remove_component`
- **[Phase 5]** `device_unbind_cleanup` (`drivers/base/dd.c`):
`devres_release_all` then `dev_set_drvdata(NULL)`
- **[Phase 5]** `DEVICE_ATTR_RW` → 0644 (`include/linux/device.h`)
- **[Phase 6]** `git describe HEAD` = `v6.18.53-5049-g0f0bdc2b0dffb`;
kernelversion 6.18.53
- **[Phase 6]** `aic26_remove` **absent** from `v6.18.53`; patch dry-run
against that file **succeeds**
- **[Phase 6]** `git merge-base --is-ancestor ae375f8d063d HEAD` → not
ancestor (upstream 7.3 material)
- **[Phase 7]** `CONFIG_SND_SOC_TLV320AIC26` promptless; only `imply`
from `SND_SOC_ALL_CODECS` (`depends on COMPILE_TEST`); no
DTS/board/defconfig
- **[Phase 8]** Failure mode: oops/UAF after unbind; severity HIGH;
population small
- **UNVERIFIED:** stable@ lore discussion (HTTP 403); whether any 6.18
distro enables this hidden symbol
**YES**
sound/soc/codecs/tlv320aic26.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c
index e5dfb3d752a3a..84e954311c1b2 100644
--- a/sound/soc/codecs/tlv320aic26.c
+++ b/sound/soc/codecs/tlv320aic26.c
@@ -320,8 +320,14 @@ static int aic26_probe(struct snd_soc_component *component)
return 0;
}
+static void aic26_remove(struct snd_soc_component *component)
+{
+ device_remove_file(component->dev, &dev_attr_keyclick);
+}
+
static const struct snd_soc_component_driver aic26_soc_component_dev = {
.probe = aic26_probe,
+ .remove = aic26_remove,
.controls = aic26_snd_controls,
.num_controls = ARRAY_SIZE(aic26_snd_controls),
.dapm_widgets = tlv320aic26_dapm_widgets,
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.1] ALSA: hda: Check snd_hda_power_pm construct error before executing verb
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (47 preceding siblings ...)
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18-5.10] ASoC: tlv320aic26: remove keyclick sysfs file Sasha Levin
@ 2026-10-19 13:51 ` Sasha Levin
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18-6.6] ALSA: hda/realtek: Fix speakers on ASUS PM3406CHA Sasha Levin
` (12 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:51 UTC (permalink / raw)
To: patches, stable
Cc: Bob Song, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Bob Song <songxiebing@kylinos.cn>
[ Upstream commit df27e4dc80c4a30ad206432cb848aab00de22ca7 ]
When userspace writes 1 to /sys/bus/pci/devices/XX/remove to remove
HDA PCI device, the HDA hardware control path is shut down and devres
unmaps the BAR virtual address bus->remap_addr automatically during
driver removal.
If a delayed HDA verb command arrives after the MMIO region is
unmapped, the driver will access invalid virtual addresses and trigger
a page fault splat.
So add an error check right after constructing snd_hda_power_pm.
Signed-off-by: Bob Song <songxiebing@kylinos.cn>
Link: https://patch.msgid.link/20260717024948.506335-1-songxiebing@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
Local tree is **7.3-rc4** (`v7.3-rc4-27-gf0100363d8c37`). The HDA
`CLASS(snd_hda_power_pm)` path exists here, and this is a real page-
fault on PCI unbind. Analysis below is for this checkout only.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: **[ALSA: hda:] [Check] [bail out of verb execution if
`snd_hda_power_pm` construction failed and the controller is already
stopped]**
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Signed-off-by: Bob Song <songxiebing@kylinos.cn>` (author)
- `Link: https://patch.msgid.link/20260717024948.506335-1-
songxiebing@kylinos.cn` (v2 submission)
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` (ALSA/HDA maintainer)
- No `Fixes:`, no `Reported-by:`, no `Tested-by:`, no `Cc: stable`
(absence expected)
- Pipeline `Signed-off-by: Sasha Levin` / `[Upstream commit ...]`
ignored
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** After `echo 1 > /sys/bus/pci/devices/XX/remove`, the HDA
control path is torn down and `devres` unmaps `bus->remap_addr`.
- **Symptom:** A later HDA verb still runs, touches the unmapped BAR,
**page fault / splat**.
- **Root cause (author):** `CLASS(snd_hda_power_pm, pm)(codec)` can
fail; the old code ignored `pm.err` and still called
`snd_hdac_bus_exec_verb_unlocked()`.
- **Version info:** none in the message.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not hidden. Explicit crash-avoidance check. The v1 lore text is
even clearer: constructor fails, code still issues verbs, then MMIO
after iounmap.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/hda/common/codec.c` — **+6 / -0**
- Function: `call_exec_verb()`
- Scope: **single-file surgical fix**
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- **Before:** `CLASS(snd_hda_power_pm, pm)(codec)` then immediately
`guard(mutex)` and `snd_hdac_bus_exec_verb_unlocked()` — `pm.err`
unused.
- **After:** if `pm.err < 0 && !bus->core.chip_init`, warn and return
`pm.err`; skip MMIO.
- Path: verb send after power-up, specifically when the controller is
already stopped.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record:
- **Category:** memory-safety / invalid MMIO after teardown (page
fault).
- **Mechanism:** `snd_hdac_bus_send_cmd_corb()` does
`snd_hdac_chip_readw(bus, CORBWP)` via `bus->remap_addr` with **no
`chip_init` guard**. `azx_send_cmd()` only checks `chip->disabled`.
After `snd_hdac_bus_stop_chip()` sets `chip_init = false`, a delayed
verb still MMIO’s the BAR. Power-up failure (`pm_runtime_get_sync`
error while the device is going away) is the signal that hardware is
no longer usable.
- **Note:** `CLASS` destructor still runs on the early return, so the
`get`/`put` pair stays balanced (`pm_runtime_get_sync` still bumps the
usage count on error).
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- **Quality:** Small, matches the header note (“If the error handling is
needed, refer `pm.err`”). HDMI already checks `pm.err`
(`sound/hda/codecs/hdmi/hdmi.c`).
- **Conservative:** both `pm.err < 0` **and** `!chip_init` — v1’s
`pm_runtime_status_suspended()` false-positive on platform devices
without RPM was why v1 was dropped.
- **Residual hole:** if power-up fails but `chip_init` is still true,
verbs still run; if `chip_init` is false but power-up succeeded, verbs
still run. Incomplete, not wrong.
- **Regression risk:** low for this v2 form. `codec_warn` on a teardown
race is acceptable.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- `CLASS(snd_hda_power_pm, pm)(codec)` introduced in **`8dad6b3dac279`**
(“ALSA: hda/common: Use cleanup macros for PM controls”, 2025-08-29) —
in this tree.
- Before that, `codec_exec_verb()` called `snd_hda_power_up_pm()` and
**also ignored the return value** (`664c715573c2c`, 2015). Ignoring
power-up failure is old; `pm.err` only became easy to check after
CLASS.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Closest introducer of this exact shape is
`8dad6b3dac279` (CLASS refactor, “no functional changes”). Present in
this 7.3 tree.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record:
- Immediate parents of `call_exec_verb`: `8dad6b3dac279` (extract +
CLASS), `62dd3851d2450` (`guard(mutex)`).
- Follow-ups on this file after the fix (`ba4239b6d8e1b`,
`7284788743121`) are unrelated.
- Standalone 6-line patch, not patch X/Y.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Bob Song is a regular HDA contributor (quirks, NULL checks), not
the maintainer. Maintainer is Takashi Iwai, who applied the patch.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record:
- Needs `CLASS(snd_hda_power_pm)` / `struct __hda_power_obj.err` from
**`5d8c9c987fbdd`** + **`8dad6b3dac279`**.
- Needs `sound/hda/common/codec.c` (moved in **`05be28fe8521f`**,
2025-07).
- **All of that is in this 7.3-rc4 tree.** Applies standalone here.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- Lore (via `b4 dig`): https://patch.msgid.link/20260717024948.506335-1-
songxiebing@kylinos.cn
- **v1** (2026-07-13): `pm.err < 0 && pm_runtime_status_suspended(...)`.
Takashi applied, then **author asked to drop it**: platforms without
RPM keep `runtime_status == suspended`, so verbs would be blocked.
Takashi dropped it.
- **v2** (2026-07-17): `pm.err < 0 && !bus->core.chip_init`. Takashi:
“Applied to for-next branch.” **This is the committed version.**
- **v3** (same day): only `!bus->core.chip_init` (no `pm.err`). **Not
applied.**
- No NAKs on v2. No `Cc: stable` in review.
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record: To/Cc: Takashi Iwai, Jaroslav Kysela, linux-sound, linux-kernel.
Subsystem maintainer applied v2 after the v1 false-positive.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No bugzilla/syzbot. Trigger described as sysfs PCI `remove`. No
stack dump in the thread. **UNVERIFIED** how many users hit it beyond
the author (Kylinos).
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone. HDMI already has similar `pm.err` checks;
ca0132/realtek CLASS sites were not changed.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org/stable search returned a bot wall (403).
**UNVERIFIED** whether stable@ already discussed this. No local `git log
--grep` hits besides this commit.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF**
Record: `call_exec_verb()`; helper for `codec_exec_verb()`.
**Step 5.2: TRACE CALLERS**
Record:
- `codec_exec_verb` is `codec->core.exec_verb`
(`snd_hda_codec_device_new`).
- `snd_hdac_exec_verb()` uses that; fallback is
`snd_hdac_bus_exec_verb()`.
- Reachable from mixer/jack/HDMI/proc/hwdep/regmap — **normal HDA I/O**,
not an obscure helper.
**Step 5.3: TRACE CALLEES**
Record: `snd_hda_power_up_pm` → `pm_runtime_get_sync`;
`snd_hdac_bus_exec_verb_unlocked` → `bus->ops->command` (`azx_send_cmd`
→ `snd_hdac_bus_send_cmd_corb`) which **MMIO’s `remap_addr`**.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record:
- Everyday verbs: yes, from ALSA ioctls (often unprivileged for the
audio device).
- **The crash path** is teardown: PCI `remove` / `snd_card_free` /
`azx_free` → `azx_stop_chip()` (`chip_init = false`) then `pcim` BAR
unmap. Needs a verb still in flight (jack work, unsol work, a racing
ctl).
- `echo 1 > .../remove` is admin; **VFIO GPU passthrough** also unbinds
the HDA function. Userspace-reachable as a privileged/hotplug path,
not a syzbot syscall smash.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: HDMI already checks `pm.err`. USB mixer code widely checks
`pm.err < 0` after CLASS. This `call_exec_verb` site was the hole for
generic HDA verbs.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: **Yes.** `sound/hda/common/codec.c` `call_exec_verb()` uses
CLASS; `chip_init` and `pm.err` exist. Parent of `df27e4dc80c4a` had no
check. Bug is this tree’s HDA code (CLASS era, ~6.18+; this is 7.3).
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: **Clean apply** on this tree: same function, same CLASS, same
`bus->core.chip_init`.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: No earlier alternate fix. HDMI’s `pm.err` checks do not cover
`call_exec_verb`.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: **ALSA HD-audio codec core** (`sound/hda/common/`).
**IMPORTANT** — Intel/AMD/NVIDIA HDA is on most PCs, not core mm/sched.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Active (CLASS/guard cleanups, HDMI, Realtek). Maintainer-acked.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: **Driver-specific** — HDA users who unbind/remove the PCI
function (sysfs remove, VFIO, hotplug, driver rebind). Not all boots.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Timing-dependent: delayed verb vs. chip stop / BAR unmap.
Privileged/hotplug, not a typical unprivileged mixer write while the
device is live.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: **Page fault / oops** (author; lore v1 said “page fault BUG”).
**Severity: HIGH** (oops on unbind; panic if `panic_on_oops`). Not
filesystem corruption.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- **Benefit:** HIGH for unbind/VFIO/hotplug — avoids oops.
- **Risk:** LOW — 6 lines, v1 regression already filtered, maintainer
applied v2.
- **Ratio:** favorable.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
**FOR:**
- Real oops: MMIO after HDA BAR unmap / chip stop.
- `snd_hdac_bus_send_cmd_corb()` has no `chip_init`/`remap_addr`
validity check — verified.
- 6-line, no new API, CLASS destructor still balances PM.
- Maintainer applied v2 after a real v1 false-positive on no-RPM
platform devices.
- All prerequisites exist in **this** 7.3-rc4 tree.
- HDA + PCI unbind (including GPU audio / VFIO) is a real production
path.
**AGAINST:**
- No stack trace, syzbot, or extra `Reported-by`.
- Trigger is teardown, not playback.
- Check is incomplete (`pm.err` XOR `chip_init`).
- v3 was not taken; v2 is what mainline has.
**UNRESOLVED:**
- Exact delayed-verb source (jack vs unsol vs racing ctl) not dumped.
- stable@ discussion unverified (lore blocked).
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — v2 after v1 drop; maintainer
applied.
2. Fixes a real bug that affects users? **PASS** — oops on PCI remove.
3. Important issue? **PASS** — kernel page fault / oops (HIGH, not idle
WARN).
4. Small and contained? **PASS** — +6 lines, one function.
5. No new features or APIs? **PASS**.
6. Can apply to the local tree? **PASS** —
CLASS/`pm.err`/`chip_init`/`call_exec_verb` all present.
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: None (not a device ID/quirk/DT/build/doc). It is a normal crash
fix.
**Step 9.4: MAKE YOUR DECISION**
For **this 7.3-rc4 tree**, the bug is present, the patch is self-
contained, and it prevents a verified MMIO-after-teardown oops. It meets
stable rules here.
**What it solves for this tree:** A delayed HDA verb after controller
stop / BAR unmap used to ignore `snd_hda_power_pm` failure and hit
unmapped MMIO. Skipping the verb when power-up failed **and**
`chip_init` is false stops that oops without the v1 “platform device
never left RPM_SUSPENDED” regression.
**Risk vs benefit:** Low risk, clear oops-avoidance benefit on
unbind/hotplug.
---
Verification:
- [Phase 1] Tags: author Bob Song; Link to v2 msgid; SOB Takashi Iwai;
no Fixes/Reported-by/Cc:stable
- [Phase 1] Body: PCI sysfs `remove` → BAR unmap → delayed verb → page
fault
- [Phase 2] Diff: +6 in `call_exec_verb()`; `pm.err < 0 &&
!bus->core.chip_init` then return
- [Phase 2] `snd_hdac_bus_send_cmd_corb()` uses `snd_hdac_chip_readw` on
`remap_addr` with no `chip_init` check (`sound/hda/core/controller.c`)
- [Phase 2] `azx_send_cmd()` only checks `chip->disabled`
- [Phase 2] Header documents `pm.err` (`include/sound/hda_codec.h`)
- [Phase 2] CLASS destructor still `snd_hda_power_down_pm` on early
return (RAII)
- [Phase 3] Blame: CLASS in `8dad6b3dac279` (2025-08-29); this tree has
it (`git merge-base --is-ancestor` 0)
- [Phase 3] Pre-CLASS `codec_exec_verb` also ignored
`snd_hda_power_up_pm()` return (`git show 8dad6b3dac279`)
- [Phase 3] CLASS macros: `5d8c9c987fbdd`; file move: `05be28fe8521f`;
both in this tree
- [Phase 3] No follow-up fix of this check after `df27e4dc80c4a`
- [Phase 4] `b4 dig -c df27e4dc80c4a`: v1/v2/v3; committed = v2
- [Phase 4] mbox: v1 applied then dropped (no-RPM platform false
positive); v2 applied; v3 not applied
- [Phase 4] Recipients: tiwai, perex, linux-sound
- [Phase 4] lore WebFetch 403; stable@ search unverified (bot wall)
- [Phase 5] `codec_exec_verb` set as `codec->core.exec_verb`; used via
`snd_hdac_exec_verb`
- [Phase 5] HDMI already checks `pm.err` (`hdmi.c`)
- [Phase 6] `git describe HEAD` = `v7.3-rc4-27-gf0100363d8c37`; `make
kernelversion` = 7.3.0-rc4
- [Phase 6] Pre-image of `call_exec_verb` confirmed via `git show
df27e4dc80c4a^:sound/hda/common/codec.c`
- [Phase 6] `azx_free()` stops chip when `bus->chip_init` (`intel.c`);
`azx_remove()` → `snd_card_free`
- [Phase 8] Failure mode: page fault on unmapped BAR; trigger: PCI
remove / unbind
- UNVERIFIED: exact delayed-verb producer; number of users; stable@
thread
The fix is small, matches this tree’s CLASS-based HDA code, and prevents
a real oops on device teardown.
**YES**
sound/hda/common/codec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sound/hda/common/codec.c b/sound/hda/common/codec.c
index 8cab932177194..7869f673894fe 100644
--- a/sound/hda/common/codec.c
+++ b/sound/hda/common/codec.c
@@ -39,6 +39,12 @@ static int call_exec_verb(struct hda_bus *bus, struct hda_codec *codec,
int err;
CLASS(snd_hda_power_pm, pm)(codec);
+ if (pm.err < 0 && !bus->core.chip_init) {
+ codec_warn(codec,
+ "Failed to send cmd 0x%x ret=[%d], hda control stopped\n",
+ cmd, pm.err);
+ return pm.err;
+ }
guard(mutex)(&bus->core.cmd_mutex);
if (flags & HDA_RW_NO_RESPONSE_FALLBACK)
bus->no_response_fallback = 1;
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.6] ALSA: hda/realtek: Fix speakers on ASUS PM3406CHA
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (48 preceding siblings ...)
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda: Check snd_hda_power_pm construct error before executing verb Sasha Levin
@ 2026-10-19 13:51 ` Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Add quirk for Lenovo ThinkBook 16p Gen 3 ARH (21EK) Sasha Levin
` (11 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:51 UTC (permalink / raw)
To: patches, stable
Cc: Muhtasham Nawr al-Mahmud, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Muhtasham Nawr al-Mahmud <muhtaseem2005@gmail.com>
[ Upstream commit 0eee030c2c09c7a44be778de5f451d9e7a2f09c1 ]
The ASUS ExpertBook PM3406CHA uses an ALC256 codec with subsystem
ID 1043:1664. On Linux boot, the internal speakers are silent even
though playback is routed to the codec and the speaker pin is
configured for output.
The codec starts with coefficient 0x10 set to 0x1d20. Writing 0x7f20
to coefficient 0x10 immediately restores internal speaker output.
This was reproduced on the affected hardware from a fresh boot using
hda-verb. Reducing a larger initialization sequence showed that this
coefficient write alone is sufficient; no GPIO, EAPD, pin-control, or
other coefficient changes are required. After applying the coefficient
in userspace, speaker output also remains functional across suspend
and resume.
Add a machine-specific HDA fixup that writes the required coefficient.
The fixup has been compile-tested, but could not be boot-tested because
the affected hardware is no longer available.
Closes: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/2162718
Signed-off-by: Muhtasham Nawr al-Mahmud <muhtaseem2005@gmail.com>
Link: https://patch.msgid.link/20260924144512.3989-1-muhtaseem2005@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a machine-specific Realtek HDA quirk for silent speakers on one
ASUS laptop. The local tree is **6.18.57**; the ALC256 driver and quirk
tables are already here, and the SSID entry is not.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: **[ALSA: hda/realtek]** **[Fix]** **[restore internal speakers
on ASUS ExpertBook PM3406CHA]**
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Closes: https://bugs.launchpad.net/ubuntu/+source/alsa-
driver/+bug/2162718` — Ubuntu bug with a real user report
- `Link: https://patch.msgid.link/20260924144512.3989-1-
muhtaseem2005@gmail.com` — original submission
- `Signed-off-by: Muhtasham Nawr al-Mahmud <muhtaseem2005@gmail.com>` —
author
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` — ALSA maintainer
applied it
- No `Fixes:` tag (expected: this is a missing hardware quirk, not a
regression)
- No `Cc: stable@vger.kernel.org` (expected for this review queue)
- No `Reported-by:` / `Tested-by:` in the git message; the Launchpad
thread supplies both in practice
- Ignore pipeline `Signed-off-by: Sasha Levin` / `[Upstream commit ...]`
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** ASUS ExpertBook PM3406CHA (ALC256, SSID `1043:1664`) boots
with internal speakers silent even though ALSA routes playback to the
codec and the speaker pin is an output.
- **Symptom:** no audible speaker output; HDMI/Bluetooth still work
(Launchpad).
- **Root cause:** vendor coefficient `0x10` comes up as `0x1d20`.
Writing `0x7f20` restores output. Isolated with `hda-verb` from a
larger init sequence; GPIO/EAPD/pin-control/other coeffs were not
required. After the userspace write, audio still worked across
suspend/resume.
- **Version info:** Launchpad reporter: Ubuntu 24.04.4, kernel
`7.0.0-28-generic`; author also tested on `7.2.6-arch2-1`.
- **Caveat in the message:** author compile-tested the kernel patch but
no longer had the laptop for a kernel boot-test.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not a disguised cleanup. This is an explicit hardware-quirk bug
fix.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/hda/codecs/realtek/alc269.c` **+10 / -0**
- Functions/tables: `enum { ... }` (add `ALC256_FIXUP_ASUS_PM3406CHA`),
`alc269_fixups[]`, `alc269_fixup_tbl[]`
- Scope: **single-file surgical hardware quirk**
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
1. Enum: add a new fixup ID used as an index into `alc269_fixups[]`.
2. Fixup table: `HDA_FIXUP_VERBS` writing nid `0x20`
`AC_VERB_SET_COEF_INDEX 0x10` then `AC_VERB_SET_PROC_COEF 0x7f20`.
3. Quirk table: `SND_PCI_QUIRK(0x1043, 0x1664, "ASUS ExpertBook
PM3406CHA", ALC256_FIXUP_ASUS_PM3406CHA)`.
Before: `alc269_probe()` has no PCI-SSID match for `1043:1664`.
Launchpad shows a pin-match fallback (`"ALC256: picked fixup (pin
match)"` with empty name) that does not enable speakers.
After: PCI SSID match wins (`snd_hda_pick_fixup` runs first;
`snd_hda_pick_pin_fixup` returns immediately if `fixup_id` is already
set). Verbs are queued at `HDA_FIXUP_ACT_PROBE` via
`snd_hda_add_verbs()` and executed in `alc_init()` after Realtek init,
including resume.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: **[Hardware workaround / codec quirk]**
Broken: ALC256 coef `0x10` left at `0x1d20` on this SKU, so the internal
amp/output path stays muted.
Fix: machine-specific init/resume verb write of `0x7f20`. Same pattern
as `ALC269_FIXUP_DELL_M101Z` (speaker enable via coef verbs).
**Step 2.4: ASSESS THE FIX QUALITY**
Record: Obviously correct for this class of fix: one SSID, two verbs,
existing `HDA_FIXUP_VERBS` machinery. Isolated to `1043:1664`. ALSA
maintainer accepted it. Low regression risk for other machines. Residual
risk is headphone routing on this one SKU if coef `0x10` is also a
HP/speaker switch on ALC256 (GX502/GU502 comments use `0x10` that way
with different values). That is unverified on this SKU; Takashi still
applied the patch, and the Launchpad reporter confirmed speakers work.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record: There is no “introduced-by” regression. The bug is a **missing
quirk**. Surrounding table entries (`0x1043:0x1663` / `0x1683`,
`ALC269_FIXUP_DELL_M101Z`) already exist at `v6.18.57`. ALC256
(`0x10ec0256`) is a first-class ID in this file
(`HDA_CODEC_ID(0x10ec0256, "ALC256")`).
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Not applicable. This is new-hardware quirk
coverage, not a revert of a bad change.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record:
- Related: `0156c22fb0ca8` “Add support for ASUS Commercial laptops
using CS35L41 HDA” adds **PM3406CKA** (`0x1043:0x1454`) with
`ALC287_FIXUP_CS35L41_I2C_2`. That is a **different SKU** with Cirrus
companion amps. Copying it to CHA would be wrong.
- Similar silent-speaker quirk already in this tree: `e561c2740b628`
Higole F9B.
- Standalone 10-line patch, not `X/Y` of a series. No follow-up on this
SSID after the candidate.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Only this commit by Muhtasham Nawr al-Mahmud under `sound/hda/`.
Not the subsystem maintainer. Applied by Takashi Iwai (`MAINTAINERS`:
sound maintainer).
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: None. Uses `HDA_FIXUP_VERBS`, `SND_PCI_QUIRK`,
`alc269_fixups[]`, `alc269_fixup_tbl[]` — all present at `v6.18.57`. Can
apply standalone.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c 0eee030c2c09…` matched msgid
`20260924144512.3989-1-muhtaseem2005@gmail.com`
- Series: **v1 RFC only** (no v2/v3)
- LKML: https://lkml.iu.edu/2609.3/01658.html (patch),
https://lkml.iu.edu/2609.3/11978.html (reply)
- Takashi Iwai: “The code change looks OK, so I applied this now.” **No
NAK, no requested changes.**
- lore.kernel.org fetches returned 403; discussion recovered via `b4
dig`, Patchew, and LKML IU.
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): Muhtasham Nawr al-Mahmud; Jaroslav Kysela; Takashi
Iwai; Kailang Yang (Realtek); `linux-sound@vger.kernel.org`; `linux-
kernel@vger.kernel.org`. Subsystem maintainer reviewed and applied.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record (Launchpad #2162718):
- Reporter: Nguyễn Trọng Tuyền, 2026-08-03, ASUS ExpertBook P3
PM3406CHA, Ryzen 7 8840HS, ALC256, SSID `1043:1664`.
- Thought it was the same as PM3406CKA (#2133791, `1043:1454`); that SKU
needed CS35L41, this one does not.
- Author isolated coef `0x10` on the hardware; reporter later: “It works
perfectly on my laptop (Ubuntu 24.04.4, kernel 7.0.0-28). My speakers
are finally working again!”
- Independent user confirmation of the userspace workaround. Kernel-
patch `Tested-by` was offered but not in the commit.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone RFC. Not part of a multi-patch series. PM3406CKA
CS35L41 quirk is a different machine and must not be reused.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: No stable-list hit for PM3406CHA (lore.kernel.org/stable 403;
web search did not show a stable NAK or prior rejection). UNVERIFIED
that it was ever discussed on stable@; absence is not a negative.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS**
Record: No function bodies changed. Data: `ALC256_FIXUP_ASUS_PM3406CHA`,
`alc269_fixups[]`, `alc269_fixup_tbl[]`. Consumers: `alc269_probe()` →
`snd_hda_pick_fixup()` → `snd_hda_apply_fixup()`; `alc_init()` →
`snd_hda_apply_verbs()`.
**Step 5.2: TRACE CALLERS**
Record:
- `alc269_probe()` calls `snd_hda_pick_fixup(..., alc269_fixup_tbl,
alc269_fixups)` then `snd_hda_apply_fixup(..., HDA_FIXUP_ACT_PROBE)`.
- `alc_init()` (codec `.init`, including resume) calls
`snd_hda_apply_verbs()` then `HDA_FIXUP_ACT_INIT`.
- `HDA_FIXUP_VERBS` are applied only at `HDA_FIXUP_ACT_PROBE` to
**register** the list; documented to run at init and resume
(`snd_hda_add_verbs` comment in `auto_parser.c`).
- Path: HD-audio codec probe on this laptop, then PCM playback. Not IRQ-
hot.
**Step 5.3: TRACE CALLEES**
Record: `snd_hda_sequence_write()` of two vendor verbs on nid `0x20`
(Realtek vendor processing node). No alloc/lock/API change.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Unprivileged playback on this laptop triggers the silent path
today. After the quirk, probe/init writes the coef. Userspace-reachable
on the affected SKU.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same file already uses coef-`0x10` verbs
(`ALC269_FIXUP_ASUS_N7601ZM`, `ALC274_FIXUP_ASUS_ZEN_AIO_27`) and
speaker-enable verbs (`ALC269_FIXUP_DELL_M101Z`). This matches
established Realtek practice.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record:
- `git describe HEAD` → `v6.18.57-155-gcdf239ca885b2`
- `make kernelversion` / Makefile → **6.18.57**
- `git merge-base --is-ancestor 97902f970e5cd v6.18.57` → **not an
ancestor** (the quirk is **not** in the 6.18.57 baseline)
- At `v6.18.57`, `alc269_fixup_tbl` goes `0x1663` then `0x1683`; **no
`0x1664` / PM3406CHA**
- File `sound/hda/codecs/realtek/alc269.c` exists (split in
`aeeb85f26c3bb`, long before 6.18)
- ALC256 ID table present at v6.18.57
- Bug is the missing SSID quirk; it exists on this 6.18.y tree
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: **Clean apply expected.** Insertion points at v6.18.57:
- enum: `ALC269_FIXUP_DELL_M101Z` then `ALC269_FIXUP_SKU_IGNORE`
- `alc269_fixups[]`: same pair of entries
- quirk table: `0x1663` then `0x1683`
No struct/API mismatch.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: No other `PM3406CHA` / `0x1043:0x1664` fix. PM3406CKA CS35L41
entry is a different SSID and amp topology.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: **ALSA HD-audio Realtek codec** (`sound/hda/codecs/realtek/`).
**IMPORTANT** for laptop audio, not core mm/VFS. Quirk-table maintenance
is routine in stable.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: High churn of per-machine quirks (mute LEDs, SSIDs, silent
speakers). Mature driver, new rows for new laptops. That is the intended
stable pattern.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: **Driver-specific / SSID-specific.** Only ASUS ExpertBook
PM3406CHA (`PCI SSID 1043:1664`, ALC256). No effect on other machines.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Every boot / every speaker playback on that laptop. Not a race.
Unprivileged user playing audio. Reported on Ubuntu 24.04.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: Internal speakers completely silent while the stack looks
healthy. Not a panic/UAF. **MEDIUM–HIGH functional** for owners of that
laptop (device unusable for built-in audio). HDMI/BT still work.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- **Benefit:** High for that SKU (speakers work). Matches the stable
hardware-quirk exception. User-confirmed.
- **Risk:** Very low: +10 lines, one SSID, existing verb mechanism,
maintainer-acked. Possible headphone interaction on this SKU only
(unverified).
- **Ratio:** Strongly favors backport.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real user-visible bug: silent internal speakers
- Ubuntu Launchpad #2162718; original reporter confirmed the coef
workaround
- Isolated, machine-specific `HDA_FIXUP_VERBS` + `SND_PCI_QUIRK`
- +10 lines, one file, no new API
- Driver, ALC256 support, and quirk tables already in 6.18.57
- Same pattern as existing speaker/coef quirks
- Takashi Iwai applied the RFC as-is
- Explicit stable exception: hardware quirk / SSID enablement for an
existing driver
AGAINST:
- Not a crash, UAF, or security bug
- Author could not boot-test the kernel patch after losing the laptop
(userspace path was tested; reporter confirmed it)
- Unverified headphone behavior if coef `0x10` is a HP/speaker mux on
this SKU
UNRESOLVED:
- lore.kernel.org HTTP 403 (discussion recovered elsewhere)
- No stable@ thread found
- Headphone path on this SKU not documented
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — standard quirk; hda-verb
isolation; Launchpad confirmation; maintainer applied
2. Fixes a real bug that affects users? **PASS** — silent speakers,
filed and confirmed
3. Important issue? **PASS** for this class (hardware quirk / broken
audio on a shipping laptop), not CRITICAL crash
4. Small and contained? **PASS** — 10 lines, one SSID
5. No new features or APIs? **PASS** — quirk only
6. Can apply to the local tree? **PASS** — 6.18.57 has the file and
insertion context; SSID not already present
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Hardware quirk / existing-driver SSID enablement.** Automatic
YES category in the stable rules given in the prompt.
**Step 9.4: MAKE YOUR DECISION**
This belongs on 6.18.y. The ALC256 Realtek driver already enumerates
this laptop; without the SSID row, speakers stay silent. The change is a
two-verb init/resume write gated to `1043:1664`, the same style as other
Realtek speaker quirks already in this file. It applies cleanly to this
tree and does not need the unrelated PM3406CKA CS35L41 patch.
Verification:
- [Phase 1] Parsed tags: `Closes:` Launchpad 2162718; `Link:` patch
msgid; SOB author + Takashi Iwai; no `Fixes:`/`Cc: stable`
- [Phase 1] Body: silent speakers; coef `0x10` `0x1d20`→`0x7f20`; hda-
verb isolation
- [Phase 2] Diff: +10 in `alc269.c`; enum + `HDA_FIXUP_VERBS` +
`SND_PCI_QUIRK(0x1043,0x1664)`
- [Phase 2] `auto_parser.c`: `HDA_FIXUP_VERBS` registered at PROBE, run
from `alc_init()` after codec init and on resume
- [Phase 3] No `Fixes:` tag; missing-quirk, not a regression
- [Phase 3] Related `0156c22fb0ca8` is PM3406CKA CS35L41 (`0x1454`),
different hardware
- [Phase 3] Author has only this hda commit; Takashi applied it
- [Phase 4] `b4 dig -c 0eee030c2c09…`: RFC v1 only; recipients include
Iwai/Kysela/Realtek/linux-sound
- [Phase 4] Takashi: “The code change looks OK, so I applied this now.”
No NAK
- [Phase 4] Launchpad: reporter confirmed speakers work with the coef
write
- [Phase 4] lore.kernel.org direct fetch: 403; used b4/Patchew/LKML IU
instead
- [Phase 5] Call chain: `alc269_probe` → `snd_hda_pick_fixup` → verbs →
`alc_init`/`snd_hda_apply_verbs`
- [Phase 5] Pin-match cannot override once PCI SSID is set
(`snd_hda_pick_pin_fixup` early return)
- [Phase 6] `git describe HEAD` = `v6.18.57-155-gcdf239ca885b2`;
kernelversion 6.18.57
- [Phase 6] `git merge-base --is-ancestor 97902f970e5cd v6.18.57` failed
→ quirk **not** in 6.18.57 baseline
- [Phase 6] `git show v6.18.57:…alc269.c` has `0x1663` then `0x1683`, no
`0x1664`; DELL_M101Z/SKU_IGNORE insertion points exist
- [Phase 6] ALC256 `0x10ec0256` present at v6.18.57
- [Phase 7] ALSA Realtek; Takashi Iwai in MAINTAINERS
- [Phase 8] Failure mode: silent speakers on one laptop SSID; severity
MEDIUM–HIGH functional; risk very low
- UNVERIFIED: headphone interaction of coef `0x10` on this SKU; no
stable@ discussion recovered
**YES**
sound/hda/codecs/realtek/alc269.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index fa5bc54ff083d..a40b85fbaf393 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -3678,6 +3678,7 @@ enum {
ALC269_FIXUP_SONY_VAIO,
ALC275_FIXUP_SONY_VAIO_GPIO2,
ALC269_FIXUP_DELL_M101Z,
+ ALC256_FIXUP_ASUS_PM3406CHA,
ALC269_FIXUP_SKU_IGNORE,
ALC269_FIXUP_ASUS_G73JW,
ALC269_FIXUP_ASUS_N7601ZM_PINS,
@@ -4089,6 +4090,14 @@ static const struct hda_fixup alc269_fixups[] = {
{}
}
},
+ [ALC256_FIXUP_ASUS_PM3406CHA] = {
+ .type = HDA_FIXUP_VERBS,
+ .v.verbs = (const struct hda_verb[]) {
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x10 },
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x7f20 },
+ {}
+ }
+ },
[ALC269_FIXUP_SKU_IGNORE] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc_fixup_sku_ignore,
@@ -7184,6 +7193,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x1652, "ASUS ROG Zephyrus Do 15 SE", ALC289_FIXUP_ASUS_ZEPHYRUS_DUAL_SPK),
SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK),
SND_PCI_QUIRK(0x1043, 0x1663, "ASUS GU603ZI/ZJ/ZQ/ZU/ZV", ALC285_FIXUP_ASUS_HEADSET_MIC),
+ SND_PCI_QUIRK(0x1043, 0x1664, "ASUS ExpertBook PM3406CHA", ALC256_FIXUP_ASUS_PM3406CHA),
SND_PCI_QUIRK(0x1043, 0x1683, "ASUS UM3402YAR", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS UX3402VA", ALC245_FIXUP_CS35L41_SPI_2),
SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Add quirk for Lenovo ThinkBook 16p Gen 3 ARH (21EK)
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (49 preceding siblings ...)
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18-6.6] ALSA: hda/realtek: Fix speakers on ASUS PM3406CHA Sasha Levin
@ 2026-10-19 13:52 ` Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.6] ASoC: sma1303: remove fault-check sysfs group on remove Sasha Levin
` (10 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:52 UTC (permalink / raw)
To: patches, stable
Cc: KIM MinWoo, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: KIM MinWoo <phrimm136@gmail.com>
[ Upstream commit 3867e38b2d4b844d89076f988c7b9741c87a9858 ]
The ThinkBook 16p Gen 3 ARH (SSID 17aa:3871) has a TI TAS2563
amplifier device on I2C, exposed by ACPI as INT8866, the same
arrangement as the Yoga 7 14ARB7 (SSID 17aa:3870). Without a quirk,
the codec falls back to the vendor-wide Lenovo quirk
(ALC269_FIXUP_LENOVO_XPAD_ACPI), the amplifier is never bound, and the
internal speakers stay silent while the headphone output works.
Reuse the Yoga 7 14ARB7 fixup, which binds the INT8866 device as a side
codec. ALC287_FIXUP_TAS2781_I2C does not work on this machine because it
looks for a TIAS2781 device.
Assisted-by: LLM
Signed-off-by: KIM MinWoo <phrimm136@gmail.com>
Link: https://patch.msgid.link/20260923013756.106033-1-phrimm136@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a one-line Realtek HDA quirk for ThinkBook 16p Gen 3 ARH. The
Yoga 7 INT8866 fixup already exists in this 6.18.57 tree; without the
new SSID the machine falls through to the Lenovo vendor quirk and
internal speakers stay silent.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: [ALSA hda/realtek] [Add] [PCI/codec SSID quirk for Lenovo
ThinkBook 16p Gen 3 ARH (21EK), SSID 17aa:3871]
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- Assisted-by: LLM
- Signed-off-by: KIM MinWoo <phrimm136@gmail.com> (author)
- Link:
https://patch.msgid.link/20260923013756.106033-1-phrimm136@gmail.com
- Signed-off-by: Takashi Iwai <tiwai@suse.de> (ALSA maintainer; applied
the patch)
- No Fixes:, Reported-by:, Tested-by:, Reviewed-by:, Acked-by:, or Cc:
stable (absence expected)
- Ignore: `[ Upstream commit 3867e38b2d4b844d89076f988c7b9741c87a9858 ]`
and `Signed-off-by: Sasha Levin` (pipeline markers)
Notable: ALSA maintainer SOB; hardware-tested in the mailing-list cover
(see Phase 4). LLM assistance is disclosed; maintainer still applied it.
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- Bug: ThinkBook 16p Gen 3 ARH (SSID 17aa:3871) has a TI TAS2563 amp on
I2C, ACPI HID INT8866 — same as Yoga 7 14ARB7 (17aa:3870).
- Symptom: internal speakers silent; headphone jack works.
- Root cause: no machine-specific quirk, so the codec falls back to
vendor-wide `ALC269_FIXUP_LENOVO_XPAD_ACPI`; the amp is never bound.
- Fix: reuse `ALC287_FIXUP_YOGA7_14ARB7_I2C` (binds INT8866 as a side
codec). `ALC287_FIXUP_TAS2781_I2C` is the wrong HID (TIAS2781).
- Version info: none in the commit body; author tested on 7.2.6-arch2-1
(BIOS KCCN40WW) per mailing-list text.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not hidden. Explicit hardware quirk for silent speakers. Classic
stable exception (quirks/workarounds).
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/hda/codecs/realtek/alc269.c` (+1 / −0)
- Function/table: `alc269_fixup_tbl[]`
- One `SND_PCI_QUIRK(0x17aa, 0x3871, "Lenovo ThinkBook 16p Gen 3 ARH",
ALC287_FIXUP_YOGA7_14ARB7_I2C)` next to the existing 0x3870 Yoga 7
entry
- Scope: single-file surgical quirk addition
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- Before: 17aa:3871 is unmatched in `alc269_fixup_tbl`.
`snd_hda_pick_fixup()` then hits `alc269_fixup_vendor_tbl`
`SND_PCI_QUIRK_VENDOR(0x17aa, ..., ALC269_FIXUP_LENOVO_XPAD_ACPI)`.
That only runs `alc_fixup_ideapad_acpi` + ThinkPad ACPI; it does not
bind INT8866. Speakers stay silent.
- After: 17aa:3871 selects `ALC287_FIXUP_YOGA7_14ARB7_I2C` →
`yoga7_14arb7_fixup_i2c()` → `comp_generic_fixup(..., "i2c",
"INT8866", ...)`. Chained to `ALC285_FIXUP_THINKPAD_HEADSET_JACK`.
- Path: probe/init only, one SSID.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: [Hardware workaround / missing quirk]
Mechanism: companion TAS2563 never bound without a matching SSID. Fix
reuses the existing INT8866 bind path. Confirmed:
`ALC287_FIXUP_TAS2781_I2C` uses `tas2781_fixup_tias_i2c()` → HID
`TIAS2781`; this machine is `INT8866`.
**Step 2.4: ASSESS THE FIX QUALITY**
Record:
- Obviously correct: one table entry, existing fixup, adjacent to
17aa:3870.
- Minimal; no API/structure change.
- Regression risk very low: only SSID 17aa:3871. No other `0x3871` quirk
in this file. Distinct from ThinkBook 16P 17aa:38a9/38ab (CS35L41).
- Caveat (not a kernel regression): author notes `TAS2XXX3871.bin` is
not in linux-firmware; speakers worked after symlink to Yoga
`TAS2XXX3870.bin`. The quirk is still required for component bind;
firmware is a separate userspace/linux-firmware issue.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- Neighbor 17aa:3870 Yoga 7 14ARB7: present since `b5cb53fd32779`
(“ALSA: hda/tas2781: add fixup for Lenovo 14ARB7”, 2024-01-02, in
v6.8-rc2 era).
- Fixup `ALC287_FIXUP_YOGA7_14ARB7_I2C` / `yoga7_14arb7_fixup_i2c()`
present in this tree (moved into `alc269.c` by `aeeb85f26c3bb`,
2025-07).
- 3871 line is the candidate itself. Bug is missing table entry, not bad
logic, and has existed since the Yoga 7 path landed.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No Fixes: tag. Expected. Buggy “code” is the vendor fallback for
unmatched Lenovo SSIDs, which is in this tree at
`alc269_fixup_vendor_tbl`.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record:
- Yoga 7 14ARB7 quirk is already here (`SND_PCI_QUIRK(0x17aa, 0x3870,
...)`).
- TAS2781 I2C side codec with INT8866 ACPI ID is already here
(`tas2781_hda_i2c.c`).
- Standalone one-liner; not part of a numbered series.
- Recent `alc269.c` history is other machine quirks; no prerequisite
refactor needed on this tree.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Only this commit under `--author="KIM MinWoo"` in `sound/`. Not
the subsystem maintainer. Applied by Takashi Iwai (ALSA maintainer).
Recipients included TI TAS2781 contact Shenghao Ding.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record:
- Needs `ALC287_FIXUP_YOGA7_14ARB7_I2C`, `yoga7_14arb7_fixup_i2c()`,
`comp_generic_fixup()`, and INT8866 in `snd_hda_scodec_tas2781_i2c`.
All present in v6.18.57.
- `git merge-base --is-ancestor b5cb53fd32779 v6.18.57` → yes.
- Can apply standalone. No series dependency.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c 3867e38b2d4b844d89076f988c7b9741c87a9858` →
https://patch.msgid.link/20260923013756.106033-1-phrimm136@gmail.com
- `b4 dig -a`: single v1 series; no later revision.
- Thread (mbox): author tested on hardware. Without patch: `ALC287:
picked fixup for PCI SSID 17aa:0000`. With patch: `picked fixup for
codec SSID 17aa:3871` and `bound i2c-INT8866:00 (ops
tas2781_hda_comp_ops)`. Wrong TAS2781 fixup left component “not
bound”. Headphones, mics, mute/volume keys still worked.
- Takashi Iwai 2026-09-28: “Applied now. Thanks.” No NAK, no stable
discussion.
- Author cites Fang Junhua alsa-devel 2026-03-04:
“[ALSA][ALC287][TAS2781] Lenovo 21EK speakers silent on Linux,
headphones work”, codec dump SSID 17aa:3871. Original Fang mail not
independently fetched (lore HTTP 403).
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): KIM MinWoo; linux-sound@vger.kernel.org;
tiwai@suse.com; perex@perex.cz; shenghao-ding@ti.com. Right lists and
maintainers. Applied by Takashi Iwai; no separate Reviewed-by.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: Cover letter is the primary report (silent speakers, kernel
logs, TAS2781-I2C mismatch). Second user (Fang Junhua, machine type
21EK) cited; that lore fetch is UNVERIFIED beyond the cover letter.
Symptom matches.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone v1. Reuses Yoga 7 14ARB7 fixup already in this tree.
Not the Yoga Pro 9 16IMH9 TAS2781 PCI/codec collision (different SSID).
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: UNVERIFIED (lore.kernel.org/stable HTTP 403). Thread itself has
no stable nomination or rejection.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF**
Record: No function body change. Adds a row in `alc269_fixup_tbl[]`.
Runtime path: `snd_hda_pick_fixup()` → `ALC287_FIXUP_YOGA7_14ARB7_I2C` →
`yoga7_14arb7_fixup_i2c()` → `comp_generic_fixup()` /
`hda_component_manager_init()`.
**Step 5.2: TRACE CALLERS**
Record:
- `alc269_probe`-style init calls `snd_hda_pick_fixup(codec,
alc269_fixup_models, alc269_fixup_tbl, alc269_fixups)` then vendor
table if unmatched (`alc269.c` ~8557–8572).
- Probe/enumeration, not IRQ/hot path.
- Impact: only SSID 17aa:3871. `snd_hda_pick_fixup()` matches PCI SSID
first, then codec SSID (`auto_parser.c` 1066–1087). Author’s PCI SSID
17aa:0000 still matches via codec SSID 17aa:3871.
**Step 5.3: TRACE CALLEES**
Record: `yoga7_14arb7_fixup_i2c` → `comp_generic_fixup(..., "INT8866")`
→ `hda_component_manager_init`. TAS2781 I2C driver matches ACPI
`{"INT8866", 0}` and treats it as HDA_TAS2563.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: User-reachable on this laptop at codec probe (boot / module
load). Unprivileged users get silent speakers, not a crash. Headset path
already works.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same table is full of Lenovo `SND_PCI_QUIRK` / `HDA_CODEC_QUIRK`
amp-bind entries. 17aa:3870 is the sibling. TAS2781-I2C entries use
TIAS2781; this machine must not use those.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record:
- Local tree: VERSION 6.18.57, `git describe HEAD` =
`v6.18.57-155-gcdf239ca885b2`.
- `make kernelversion` = 6.18.57.
- In **v6.18.57** (without this candidate): 17aa:3870 Yoga 7 entry
exists; **17aa:3871 does not**. Vendor Lenovo XPAD fallback exists.
INT8866 TAS2563 side-codec exists.
- `git merge-base --is-ancestor 2a2ad57597a9e v6.18.57` → not an
ancestor (candidate is not in the 6.18.57 baseline).
- Bug exists here: unmatched 17aa:3871 → silent speakers.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: Clean apply. File path `sound/hda/codecs/realtek/alc269.c`
already used (HDA split `aeeb85f26c3bb` is in v6.18.57). Context around
3870 matches. Expected difficulty: clean apply.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: Yoga 7 14ARB7 (3870) is here. No other 3871 quirk. ThinkBook 16P
38a9/38ab is a different SSID/amp (CS35L41). No substitute fix for 21EK.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: [sound/hda Realtek codec quirks] [IMPORTANT] — common laptop
audio, machine-specific. Not core mm/fs, but silent internal speakers is
a real user-facing bug.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: High activity; `alc269.c` regularly gets SSID quirks. Mature
table, well-understood pattern. Takashi Iwai maintains ALSA.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: Driver/platform-specific: Lenovo ThinkBook 16p Gen 3 ARH (21EK),
SSID 17aa:3871. CONFIG_SND_HDA_CODEC_REALTEK plus TAS2781 I2C side codec
(already used for Yoga 7 14ARB7).
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Every boot on that machine. Not a race. Not unprivileged-
exploit. Author plus cited 21EK report.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: Internal speakers silent (headphones work). Severity MEDIUM–HIGH
for those users (device unusable for speaker audio), not
panic/corruption. Standard stable quirk class.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- Benefit: high for 21EK owners on 6.18.y; existing fixup already
shipped for Yoga 7.
- Risk: very low (1 line, SSID-scoped, maintainer-applied, hardware-
tested).
- Ratio: strongly favors backport.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real hardware bug: silent internal speakers on ThinkBook 16p Gen 3
ARH.
- Hardware quirk exception in stable rules.
- 1-line reuse of fixup already in v6.18.57.
- Yoga 7 14ARB7 / INT8866 / TAS2563 path already present.
- Author kernel logs; ALSA maintainer applied v1; TI TAS2781 list CC’d.
- Applies cleanly; no new API/driver.
AGAINST:
- Affects one laptop SSID, not all users.
- `TAS2XXX3871.bin` may still be missing from linux-firmware (author
used 3870 symlink). Does not make the quirk wrong or unsafe.
- Author is not the maintainer; LLM-assisted. Offset by hardware test
and maintainer apply.
UNRESOLVED:
- Fang Junhua lore thread not independently fetched (403).
- No stable@ discussion found (lore 403).
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? [PASS — 1-line table add; tested on
21EK; maintainer applied]
2. Fixes a real bug that affects users? [PASS — silent speakers]
3. Important issue? [PASS — hardware workaround / silent speakers;
stable quirk exception]
4. Small and contained? [PASS — +1 line, one file]
5. No new features or APIs? [PASS — existing fixup, new SSID only]
6. Can apply to the local tree? [PASS — v6.18.57 has the file, fixup,
and INT8866 driver]
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: Hardware quirk/workaround (HDA `SND_PCI_QUIRK`). Qualifies
automatically when the driver/fixup already exist.
**Step 9.4: MAKE YOUR DECISION**
Backport. The v6.18.57 tree already has the Yoga 7 INT8866 fixup and
TAS2563 side codec; it lacks only SSID 17aa:3871, so this machine hits
the Lenovo vendor fallback and never binds the amp. One matching table
line is the correct, low-risk stable fix.
Verification:
- [Phase 1] Parsed tags: author SOB, Link to msgid, Takashi Iwai SOB; no
Fixes/Cc:stable (expected)
- [Phase 2] Diff: +1 `SND_PCI_QUIRK(0x17aa, 0x3871, ...,
ALC287_FIXUP_YOGA7_14ARB7_I2C)` in `alc269_fixup_tbl`
- [Phase 2] `ALC287_FIXUP_TAS2781_I2C` → `tas2781_fixup_tias_i2c()` HID
TIAS2781; Yoga fixup HID INT8866 — mismatch confirmed in code
- [Phase 2] Vendor fallback `SND_PCI_QUIRK_VENDOR(0x17aa, ...,
ALC269_FIXUP_LENOVO_XPAD_ACPI)` confirmed at alc269.c:7739
- [Phase 3] `git describe HEAD` / `make kernelversion`:
v6.18.57-155-gcdf239ca885b2 / 6.18.57
- [Phase 3] `git merge-base --is-ancestor 2a2ad57597a9e v6.18.57`: not
in 6.18.57 baseline
- [Phase 3] v6.18.57 has 17aa:3870 and `ALC287_FIXUP_YOGA7_14ARB7_I2C`;
does not have 17aa:3871
- [Phase 3] Yoga 7 fixup from `b5cb53fd32779` (2024-01-02) is ancestor
of v6.18.57
- [Phase 3] INT8866 in `tas2781_hda_i2c.c` present in v6.18.57 (ACPI
match + HDA_TAS2563)
- [Phase 4] `b4 dig -c 3867e38b2d4b...`: lore msgid
20260923013756.106033-1-phrimm136@gmail.com
- [Phase 4] `b4 dig -a`: v1 only; `b4 dig -w`: linux-sound, tiwai,
perex, shenghao-ding@ti.com
- [Phase 4] mbox: hardware logs; Takashi “Applied now”; Fang Junhua 21EK
citation
- [Phase 4] lore.kernel.org WebFetch 403 — stable@ search UNVERIFIED
- [Phase 5] `snd_hda_pick_fixup()` PCI then codec SSID; 17aa:0000 PCI
still matches codec 17aa:3871
- [Phase 6] Clean apply on this tree’s `alc269.c` path; no 3871
collision
- [Phase 8] Failure: silent internal speakers on 21EK; not crash; quirk-
scoped
- UNVERIFIED: Fang Junhua original mail body; linux-firmware
TAS2XXX3871.bin status; stable@ archive
The patch is a one-line SSID quirk, reuses a fixup this tree already
ships, and restores speaker amp bind on a real Lenovo model with
maintainer ack.
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 10d930d8fed72..b1cb93922c3bc 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -7527,6 +7527,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
HDA_CODEC_QUIRK(0x17aa, 0x38a7, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C), /* this must match before PCI SSID 17aa:386f below */
SND_PCI_QUIRK(0x17aa, 0x386f, "Legion Pro 7i 16IAX7", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x17aa, 0x3870, "Lenovo Yoga 7 14ARB7", ALC287_FIXUP_YOGA7_14ARB7_I2C),
+ SND_PCI_QUIRK(0x17aa, 0x3871, "Lenovo ThinkBook 16p Gen 3 ARH", ALC287_FIXUP_YOGA7_14ARB7_I2C),
SND_PCI_QUIRK(0x17aa, 0x3874, "Legion 7i 16IAX7", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x17aa, 0x3877, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x17aa, 0x3878, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.6] ASoC: sma1303: remove fault-check sysfs group on remove
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (50 preceding siblings ...)
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Add quirk for Lenovo ThinkBook 16p Gen 3 ARH (21EK) Sasha Levin
@ 2026-10-19 13:52 ` Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.1] ASoC: amd: yc: Add Lenovo ThinkPad E16 Gen 2 (21JN) to quirks Sasha Levin
` (9 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:52 UTC (permalink / raw)
To: patches, stable
Cc: Pengpeng Hou, Mark Brown, Sasha Levin, kiseok.jo, lgirdwood,
perex, tiwai, linux-sound, linux-kernel
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit ce3733792d38ade8df8ce288a96ff0c6ad858bf3 ]
sma1303_i2c_probe() creates a sysfs group that exposes the fault-check
controls. The check_fault_status store callback can queue
check_fault_work.
sma1303_i2c_remove() only cancels the delayed work. It does not remove
the sysfs group, so the controls can remain published after remove while
their callbacks still use the driver data and can queue the work again.
Remove the sysfs group before cancelling the delayed work.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260615064456.28615-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a two-line unbind/UAF fix in the SMA1303 codec. The local tree
is **6.18.53**; the driver and the unmatched `sysfs_create_group()` have
been present here since v6.3.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
- Subsystem: `ASoC: sma1303`
- Action verb: **remove**
- Claimed intent: tear down the fault-check sysfs group in the I2C
remove path
Record: [ASoC/sma1303] [remove] [tear down fault-check sysfs group on
driver remove]
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Present (ignoring pipeline `Upstream commit` / `Signed-off-by: Sasha
Levin`):
- `Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>` (author)
- `Link:
https://patch.msgid.link/20260615064456.28615-1-pengpeng@iscas.ac.cn`
- `Signed-off-by: Mark Brown <broonie@kernel.org>` (ASoC maintainer)
Absent (expected for this review): `Fixes:`, `Cc: stable`, `Reported-
by`, `Tested-by`, `Reviewed-by`, `Acked-by`.
Record: Author SOB + ASoC maintainer SOB + lore Link. No syzbot/user
report tags.
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
- Bug: `sma1303_i2c_probe()` creates a sysfs group;
`sma1303_i2c_remove()` only `cancel_delayed_work_sync()`s
`check_fault_work`.
- Symptom: sysfs controls stay published after remove. Their store
callback uses driver private data and can queue `check_fault_work`
again.
- Root cause: missing `sysfs_remove_group()` before work cancellation.
- No stack trace, no version list, no “this is theoretical only”
language.
Record: [sysfs left published after unbind] [UAF / re-queue of delayed
work after remove] [no version info] [missing sysfs teardown]
**Step 1.4: DETECT HIDDEN BUG FIXES**
This is not disguised cleanup. The message describes a concrete lifetime
bug.
Record: [Not a hidden fix; explicit lifetime/UAF fix]
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
- File: `sound/soc/codecs/sma1303.c` (+2 / -0)
- Function: `sma1303_i2c_remove()`
- Scope: single-file, two-line surgical fix
Record: [sma1303.c +2] [sma1303_i2c_remove] [single-file surgical]
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Before (verified from `git show
02b2a3058912d^:sound/soc/codecs/sma1303.c`):
```c
cancel_delayed_work_sync(&sma1303->check_fault_work);
```
After:
```c
if (sma1303->attr_grp)
sysfs_remove_group(sma1303->kobj, sma1303->attr_grp);
cancel_delayed_work_sync(&sma1303->check_fault_work);
```
Affected path: I2C driver unbind / module unload. The NULL check matches
probe, which sets `attr_grp = NULL` if `sysfs_create_group()` failed.
Record: [remove: cancel work only -> unpublish sysfs first, then cancel
work]
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Category: **memory safety / UAF + resource lifetime**, with a **race**
on re-queue.
Verified facts in this tree:
- Probe does `sysfs_create_group(sma1303->kobj, ...)` on
`&client->dev.kobj` (not `devm_device_add_group()`).
- `check_fault_status_store()` does `dev_get_drvdata(dev)` and may
`queue_delayed_work()`.
- `check_fault_period_{show,store}` also dereference `sma1303` with no
extra locking.
- `sma1303` is `devm_kzalloc()`’d, so it is freed in
`device_unbind_cleanup()` after `.remove`.
- The driver is `module_i2c_driver()` (`MODULE_LICENSE("GPL v2")`), so
unbind on `rmmod` is a real path.
- `sysfs_remove_group()` → `kernfs_remove_by_name()` drains active sysfs
ops, so after it returns no store can still be running. Then
`cancel_delayed_work_sync()` waits for already-queued work. That order
is the correct one.
Record: [UAF / dangling sysfs after unbind] [unpublish group, then
cancel work so store cannot re-queue]
**Step 2.4: ASSESS THE FIX QUALITY**
Obviously correct, matches the probe/create pairing, two lines, no
API/data-structure change. Regression risk is very low:
`sysfs_remove_group()` on a group that was never created is avoided via
`attr_grp`. `kobj` is the still-live i2c device kobject during
`.remove`.
Record: [minimal, correct] [very low regression risk]
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
`git blame` on probe/remove: sysfs create and the original remove body
come from `68cd394efd0fd` (“ASoC: The Iron Device SMA1303 is a boosted
Class-D audio amplifier.”, KiseokJo, 2023-01-26).
`git describe --contains 68cd394efd0fd` → `v6.3-rc1~...`
`git merge-base --is-ancestor 68cd394efd0fd HEAD` → yes.
Record: [introduced in 68cd394efd0fd / v6.3] [present for the entire
6.18 lifetime]
**Step 3.2: FOLLOW THE FIXES: TAG**
No `Fixes:` tag. Expected. The introducing commit is the original driver
add, and it **is** an ancestor of this tree.
Record: [no Fixes tag] [buggy code is the original driver, in this tree]
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Recent `sma1303.c` history is unrelated (probe_new conversion, DT
includes, `driver_data` init). No series (“patch X/Y”). Standalone.
Record: [no related prerequisite series] [standalone]
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Pengpeng Hou is not the SMA1303 maintainer (that is Kiseok Jo). Nearby
author work is systematic driver correctness (MODULE_DEVICE_TABLE,
bounds checks, error propagation). Mark Brown applied the patch.
Record: [not the codec author; ASoC maintainer applied it]
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
The fix uses existing `sysfs_remove_group()`, `attr_grp`, and `kobj` —
all present since the driver was added. Applies standalone.
Record: [no dependencies] [can apply standalone]
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
`b4 dig -c 02b2a3058912d` →
https://patch.msgid.link/20260615064456.28615-1-pengpeng@iscas.ac.cn
`b4 dig -a`: **v1 only**.
`b4 dig -m`: thread is the patch plus Mark Brown’s apply mail to
`for-7.3` (`ce3733792d38`). No NAK, no requested changes, no reviewer
risk comments.
lore.kernel.org WebFetch returned 403; discussion was recovered from the
mbox instead.
Record: [msgid link above] [v1 only] [applied by Mark Brown, no
objections]
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
`b4 dig -w` original recipients: Kiseok Jo, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-kernel. ASoC/sound
maintainers were on To/Cc. Applied by Mark Brown.
Record: [ASoC maintainer To/Cc and applied]
**Step 4.3: SEARCH FOR THE BUG REPORT**
No `Reported-by` / bugzilla / syzbot. The bug is identified from code
review of the probe/remove mismatch.
Record: [no user/syzbot report; code-analysis bug]
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Standalone 1/1. Sibling `sma1307.c` has delayed-work cancel on remove
but **no** sysfs group (different driver). `cs43130.c` already calls
`sysfs_remove_groups()` on teardown; `fs210x.c` uses
`devm_device_add_group()`.
Record: [standalone; not part of a multi-patch series]
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
lore.kernel.org/stable WebFetch 403. `git log --grep` on `sound/` found
only this commit for this subject.
Record: [no stable-list discussion recovered]
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF**
Record: [`sma1303_i2c_remove` only]
**Step 5.2: TRACE CALLERS**
`.remove = sma1303_i2c_remove` on `sma1303_i2c_driver`. Called by the
I2C/driver core on unbind (`rmmod`, `echo ... > unbind`, device
deletion). Not a hot path, but a standard teardown path.
Record: [I2C driver remove / module unload / device unbind]
**Step 5.3: TRACE CALLEES**
`sysfs_remove_group()` then `cancel_delayed_work_sync()`. Worker
`sma1303_check_fault_worker` does I2C/regmap reads and may re-queue
itself if `check_fault_status` is set. `check_fault_status` defaults to
`true` in probe.
Record: [sysfs_remove_group, cancel_delayed_work_sync; worker talks to
hardware]
**Step 5.4: FOLLOW THE CALL CHAIN**
Userspace can trigger the bad path by unbinding the driver (or `rmmod
snd-soc-sma1303`) and then reading/writing leftover `check_fault_status`
/ `check_fault_period` attributes, or by a store racing remove. That is
reachable without special hardware beyond having this codec bound. Work
is also queued from `sma1303_startup()` when the amp starts, so cancel-
then-requeue is not hypothetical if sysfs stays live.
Record: [reachable from unbind/sysfs] [yes, from userspace on systems
with this device]
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Same file already cancels work in `sma1303_remove()` (component remove)
and `sma1303_shutdown()`, but those do not remove the I2C-device sysfs
group. Only i2c_remove can.
Record: [no second copy of this sysfs group; sibling sma1307 has no such
group]
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Yes. `git describe HEAD` = `v6.18.53-5049-g0f0bdc2b0dffb`; `make
kernelversion` = `6.18.53`. File `sound/soc/codecs/sma1303.c` exists.
Parent of this commit has `sma1303_i2c_remove()` with only
`cancel_delayed_work_sync()`. Driver first appeared in v6.3, long before
6.18.
Record: [yes, sma1303_i2c_remove without sysfs_remove_group] [bug since
v6.3]
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Parent hunk matches this tree exactly. Two insertions. Expected apply:
**clean**.
Record: [clean apply]
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
No earlier sma1303 sysfs-lifetime fix. This is the first teardown of
that group.
Record: [no prior equivalent fix]
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
`sound/soc/codecs/` — ASoC codec driver for Iron Device SMA1303
(`CONFIG_SND_SOC_SMA1303`, tristate, depends on I2C).
Record: [ASoC codec] [PERIPHERAL — specific amplifier, but a real in-
tree driver]
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
`sound/soc/codecs/` is actively developed. `sma1303.c` itself has been
mostly quiet since 2023 except mechanical ASoC conversions.
Record: [codec tree active; this driver mature/stable]
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Users with an SMA1303 on I2C (`compatible = "irondevice,sma1303"`). No
in-tree board DTS uses it (only the binding example); boards use out-of-
tree / product DTs. Still a supported in-tree driver.
Record: [driver-specific / config CONFIG_SND_SOC_SMA1303]
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
- Module unload or I2C unbind with the sysfs files still present.
- Or a concurrent write to `check_fault_status` during remove, which re-
queues work after cancel.
Not every boot. Unprivileged sysfs write depends on attribute mode
(`DEVICE_ATTR_RW` → 0644, so typically root). Unbind is admin. Still a
real oops/UAF on a supported teardown path.
Record: [unbind + leftover/racy sysfs] [uncommon but real] [not an
unprivileged remote exploit]
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Use-after-free of `sma1303_priv` and/or calls into an unloaded module
via leftover sysfs attrs. That is oops / UAF, not a log-only issue.
Record: [UAF / oops on unbind] [HIGH]
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Benefit: prevents UAF/oops on driver remove for this codec. Risk: two-
line, obviously correct teardown. Ratio strongly in favor of backport.
Record: [HIGH benefit for affected hardware] [VERY LOW risk]
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real lifetime bug: `sysfs_create_group()` with no matching remove.
- Failure is UAF/oops (store can also re-queue delayed work after
cancel).
- Two lines, obviously correct, applied by ASoC maintainer Mark Brown.
- Buggy code exists in this 6.18 tree (driver since v6.3).
- Clean apply; no prerequisites.
- `kernfs` drain on attribute removal makes the chosen order (sysfs
first, then cancel work) correct.
AGAINST:
- Peripheral codec; no in-tree board DT, so user population is limited.
- No `Reported-by` / syzbot crash.
- Trigger is unbind/rmmod, not the audio hot path.
UNRESOLVED:
- lore.kernel.org HTTP 403 (thread recovered via `b4`).
- No stable@ discussion recovered.
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — pairing is standard; applied
by maintainer to for-7.3.
2. Fixes a real bug that affects users? **PASS** — leftover sysfs after
unbind is a real UAF.
3. Important issue? **PASS** — UAF/oops (HIGH), not a feature tweak.
4. Small and contained? **PASS** — +2 lines, one function.
5. No new features or APIs? **PASS**.
6. Can apply to the local tree? **PASS** — code present, hunk matches.
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Not a device-ID/quirk/DT/build/docs exception. It qualifies as a normal
small bugfix.
**Step 9.4: MAKE YOUR DECISION**
The limited hardware audience does not outweigh a two-line UAF fix that
applies cleanly to this 6.18 tree. Stable users who have this amp and
unbind or unload the module can oops; the fix is the standard teardown
the driver was missing from day one.
### What the commit solves
`sma1303_i2c_probe()` publishes `check_fault_period` /
`check_fault_status` on the I2C device. Remove only cancelled delayed
work, so those attributes stayed live, their callbacks still used
`sma1303_priv`, and `check_fault_status_store()` could queue work again
after cancel — UAF once `devm` frees the private data.
### Stable rules
Small, obviously correct, no new API, real UAF, present in this tree
since v6.3.
### Risk vs benefit
Very low risk, meaningful crash/UAF prevention on unbind.
### Concerns
None that block backport. No series dependencies. Apply is clean.
Verification:
- [Phase 1] Parsed subject/tags/body from `git log -1` on
`02b2a3058912d`; tags are author SOB, Mark Brown SOB, msgid Link; no
Fixes/Cc stable/Reported-by.
- [Phase 2] `git show --numstat`: +2/0 in `sma1303_i2c_remove`; parent
file confirms cancel-only remove.
- [Phase 2] Read `sma1303_i2c_probe`/`check_fault_status_store`/`sma1303
_check_fault_worker`; confirmed `devm_kzalloc`, `sysfs_create_group`
on `client->dev.kobj`, default `check_fault_status = true`.
- [Phase 2] Read `fs/sysfs/group.c` `sysfs_remove_group`/`remove_files`
and `fs/kernfs/dir.c` drain path; removal waits for active sysfs ops.
- [Phase 3] `git blame`: create/remove introduced in `68cd394efd0fd`;
`git describe --contains` → v6.3-rc1; `merge-base --is-ancestor` yes.
- [Phase 3] `git log --oneline -- sound/soc/codecs/sma1303.c`: no
prerequisite series.
- [Phase 4] `b4 dig -c/-a/-w/-m`: v1 only; maintainers CC’d; Mark Brown
applied to for-7.3; no NAK.
- [Phase 4] WebFetch lore/stable: 403; UNVERIFIED via HTTP, recovered
via b4 mbox.
- [Phase 5] Grep: `.remove = sma1303_i2c_remove`; `module_i2c_driver`;
work also queued from `sma1303_startup`.
- [Phase 6] `git describe HEAD` = v6.18.53-5049-g0f0bdc2b0dffb; `make
kernelversion` = 6.18.53; buggy parent remove exists; no earlier
equivalent fix.
- [Phase 7] `Kconfig` `SND_SOC_SMA1303`; DT binding
`irondevice,sma1303.yaml`; no in-tree `.dts` users.
- [Phase 8] Failure mode UAF/oops on unbind; severity HIGH; patch size 2
lines.
- UNVERIFIED: live user reports; stable@ mailing list (HTTP 403).
The fix is small, surgical, and meets the stable criteria for this 6.18
tree.
**YES**
sound/soc/codecs/sma1303.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/sma1303.c b/sound/soc/codecs/sma1303.c
index 980c48cbc3482..e07ec1bbf2d50 100644
--- a/sound/soc/codecs/sma1303.c
+++ b/sound/soc/codecs/sma1303.c
@@ -1787,6 +1787,8 @@ static void sma1303_i2c_remove(struct i2c_client *client)
struct sma1303_priv *sma1303 =
(struct sma1303_priv *) i2c_get_clientdata(client);
+ if (sma1303->attr_grp)
+ sysfs_remove_group(sma1303->kobj, sma1303->attr_grp);
cancel_delayed_work_sync(&sma1303->check_fault_work);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.1] ASoC: amd: yc: Add Lenovo ThinkPad E16 Gen 2 (21JN) to quirks
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (51 preceding siblings ...)
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.6] ASoC: sma1303: remove fault-check sysfs group on remove Sasha Levin
@ 2026-10-19 13:52 ` Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.12] ASoC: amd: acp3x-es83xx: Add HVY-WXX9/M1060 DMI quirk Sasha Levin
` (8 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:52 UTC (permalink / raw)
To: patches, stable
Cc: Seiji Adachi, Mark Brown, Sasha Levin, Vijendar.Mukunda,
lgirdwood, perex, tiwai, linux-sound, linux-kernel
From: Seiji Adachi <seiji_adachi@yahoo.co.jp>
[ Upstream commit 4cae4ca34992d210d115e8e891f1e88c9df5f24c ]
Signed-off-by: Seiji Adachi <seiji_adachi@yahoo.co.jp>
Link: https://patch.msgid.link/20260917131851.2122144-1-seiji_adachi@yahoo.co.jp
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a DMI hardware quirk for the existing AMD Yellow Carp ASoC
machine driver. The local tree is **6.18.57**
(`v6.18.57-155-gcdf239ca885b2`). The driver, quirk table, and
neighboring Lenovo E16 entries are all present here, so the patch is a
straightforward YES for this tree.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: **[ASoC/amd/yc] [Add] [Lenovo ThinkPad E16 Gen 2 DMI product
21JN to the Yellow Carp quirk table]**
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- No `Fixes:` tag (expected for this review class)
- No `Reported-by:` / `Tested-by:` / `Reviewed-by:` / `Acked-by:` on the
committed message
- `Link: https://patch.msgid.link/20260917131851.2122144-1-
seiji_adachi@yahoo.co.jp`
- `Signed-off-by: Seiji Adachi <seiji_adachi@yahoo.co.jp>` (author)
- `Signed-off-by: Mark Brown <broonie@kernel.org>` (ASoC maintainer)
- Ignore pipeline markers (`[Upstream commit ...]`, `Signed-off-by:
Sasha Levin`)
Notable: the committed message is thin, but the mailing-list thread
(Phase 4) has the real bug report and `arecord -l` output. Absence of
`Cc: stable` is expected and is not a negative signal. Sibling E16 Gen 2
quirks for **21M5** and **21M6** in this same file *did* carry `Cc:
stable@vger.kernel.org`.
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
The git object itself has almost no body. The original submission text
(resend, same diff) is:
> Add ThinkPad E16 Gen 2 (21JN) to the DMI table in acp6x-mach.c to
enable the internal digital microphone (DMIC).
The earlier request in the same thread (17 Jul 2026) is more specific:
on a ThinkPad E16 Gen 2 (AMD Ryzen 7 7735HS, machine type 21JN), the
internal DMIC is not detected on Debian 13 **kernel 6.18**. The author
later confirmed the same failure on 7.0.13 and 7.1.8, with `arecord -l`
showing only analog HDA capture (`CX11880 Analog`), not the ACP DMIC
card.
Record:
- Bug: this SKU’s ACPI `_WOV` / `AcpDmicConnected` path does not enable
ACP DMIC, so the machine driver bails out unless a DMI quirk matches
- Symptom: internal digital microphone is missing; only analog HDA
capture appears
- Versions: reporter hit it on **6.18**, which is this tree
- Root cause: missing DMI product `21JN` in `yc_acp_quirk_table[]`
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not a disguised cleanup. It is an explicit hardware quirk: one
DMI entry so an already-supported DMIC path probes on this Lenovo SKU.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/soc/amd/yc/acp6x-mach.c` — **+7 / -0**
- Function/object: `yc_acp_quirk_table[]` (data only; no control-flow
change)
- Scope: single-file surgical table insertion between existing `21J6`
and `21M1` Lenovo entries
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record: Before, `dmi_first_match(yc_acp_quirk_table)` in `acp6x_probe()`
does not match product `21JN`, so `platform_set_drvdata()` is not
populated from the quirk and the probe returns `-ENODEV` if ACPI did not
already enable DMIC. After, that SKU matches, `driver_data` is
`&acp6x_card`, and the ACP DMIC card registers.
Verified probe logic in this tree:
```845:854:sound/soc/amd/yc/acp6x-mach.c
check_dmi_entry:
/* check for any DMI overrides */
dmi_id = dmi_first_match(yc_acp_quirk_table);
if (dmi_id)
platform_set_drvdata(pdev, dmi_id->driver_data);
card = platform_get_drvdata(pdev);
if (!card)
return -ENODEV;
```
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: **Hardware workaround / DMI quirk.** Same pattern as
USB/PCI/codec quirks: the generic ACPI path is wrong/incomplete for this
laptop, so a DMI match enables the existing `acp6x_card` DMIC machine
driver. Not a UAF, race, leak, or crash-path fix.
**Step 2.4: ASSESS THE FIX QUALITY**
Record: Obviously correct. It copies the exact struct used by dozens of
neighboring Lenovo entries (`DMI_BOARD_VENDOR "LENOVO"` +
`DMI_PRODUCT_NAME "21JN"` + `.driver_data = &acp6x_card`). Regression
risk is confined to that DMI string: a false match would only affect a
different Lenovo product also named `21JN`, which is how this table is
designed. No locking, no API, no data-structure change.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record: The insertion sits between:
- `21J5` / `21J6`: `c0fc96fed7ffa` (syed sabakareem, 2022-08-02)
- `21J0`: `50ee641643dd0` (Johnny Hsieh, 2024-02-26)
- `21M1`: `cbc86dd0a4fe9f` (Uwe Kleine-König, 2024-11-22)
The Yellow Carp machine driver itself landed in `fa991481b8b22` (“ASoC:
amd: add YC machine driver using dmic”, 2021-10-18). The table has been
the supported way to enable DMIC on laptops with broken ACPI for years.
This is not new 7.x-only infrastructure.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. N/A. The “bug” is a missing SKU in a allow-
list, not a regression from a specific earlier commit.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: Same file has a long series of identical DMI additions. Directly
related E16 Gen 2 quirks already in this tree:
- `1d9ce4440414c` — “Support mic on Lenovo Thinkpad E16 Gen 2” (product
**21M5**, `Cc: stable`)
- `0704a15b930cf` — “Support mic on another Lenovo ThinkPad E16 Gen 2
model” (product **21M6**, `Cc: stable`)
This commit is the same class of fix for SKU **21JN**. Standalone; not
patch X/Y.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: `git log --author='Seiji Adachi' -- sound/soc/amd/` shows only
this commit. Author is an end user with the hardware, not the subsystem
maintainer. Maintainer Mark Brown applied it to `sound.git` `for-7.3`.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: None. It only needs `yc_acp_quirk_table[]`, `acp6x_card`, and
`acp6x_probe()`’s `dmi_first_match()` path, all present here. Confirmed
`21M5`/`21M6` ancestor commits are in this tree. Parent context already
has `21J6` then `21M1`, matching the hunk.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c 99dcbf96a43ed`:
https://patch.msgid.link/aqu4HOCmdCUs_unm@adriana (RESEND)
- Applied version: https://patch.msgid.link/20260917131851.2122144-1-
seiji_adachi@yahoo.co.jp
- `b4 dig -a`: one series revision after a formatting-rejected RESEND;
applied version is the git-formatted v1
- Thread also includes the Jul/Aug user reports on 6.18 / 7.0.13 / 7.1.8
- Mark Brown first asked for proper `submitting-patches.rst` formatting,
then applied the reformatted patch to `for-7.3` as `4cae4ca34992`
- No NAK on the change itself; no reviewer concern about the DMI ID
- No explicit `Cc: stable` in review (not a negative)
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): To/Cc included `Vijendar.Mukunda@amd.com` (AMD
audio), `broonie@kernel.org` (ASoC maintainer), `alsa-devel@alsa-
project.org`, `linux-sound@vger.kernel.org`. Mark Brown applied it. No
separate Reviewed-by.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: The lore thread *is* the bug report. One user, ThinkPad E16 Gen
2 21JN-003SCD, internal DMIC missing on 6.18 (this series), still
missing after upgrading. `arecord -l` shows only HDA analog. Severity
from the reporter: laptop microphone does not work.
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Standalone one-patch series. Related historical patches are the
21M5/21M6 E16 Gen 2 quirks already in this file.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: Web search of `lore.kernel.org/stable` for this subject/SKU
found no prior stable discussion and no recorded reason to keep it out
of stable. (lore.kernel.org fetches returned 403; gnuweeb/patchew
mirrors and `b4 dig` were used instead.)
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS**
Record: No function body changed. Data consumed by `acp6x_probe()`.
Table: `yc_acp_quirk_table[]`. Card: `acp6x_card`.
**Step 5.2: TRACE CALLERS**
Record: `acp6x_probe()` is `.probe` of `platform_driver
acp6x_mach_driver` (`name = "acp_yc_mach"`). The PCI driver
`sound/soc/amd/yc/pci-acp6x.c` registers that platform device as
`pdevinfo[2].name = "acp_yc_mach"` during ACP PDM-mode probe. Call path:
ACPI/PCI enumerate ACP → `pci-acp6x` probe → register `acp_yc_mach` →
`acp6x_probe()`. This runs at boot on Yellow Carp laptops, not from a
syscall, but it is the normal device-probe path users hit.
**Step 5.3: TRACE CALLEES**
Record: `dmi_first_match()`, `platform_set_drvdata()` /
`platform_get_drvdata()`, `devm_snd_soc_register_card()`. No
allocation/locking change in this commit.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Reachable on this hardware at boot if
`CONFIG_SND_SOC_AMD_YC_MACH` is enabled (`depends on SND_SOC_AMD_ACP6x
&& ACPI`, x86/PCI). That is the intended config for AMD Ryzen 7735HS
ThinkPads. Userspace sees the result via ALSA PCM (`arecord -l`).
Unprivileged users do not trigger a crash; they just have no internal
DMIC.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: The same file is a catalog of this exact pattern (HP, Dell,
Lenovo, ASUS, MSI, Acer, …). 21M5 and 21M6 are the same laptop family.
This is a systematic, well-established quirk style, not a one-off
experiment.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: Yes. This is **6.18.y**. `sound/soc/amd/yc/acp6x-mach.c`,
`yc_acp_quirk_table[]`, and `acp6x_probe()`’s DMI override all exist.
Without the 21JN entry, this SKU does not match. The reporter’s original
failure was on Debian 13 kernel **6.18**, so the bug is native to this
branch, not introduced after it.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: **Clean apply.** Context lines `21J6` then `21M1` are present.
Insertion is 7 identical-style lines. No refactor of the probe path
needed.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: 21M5 and 21M6 quirks are already in this tree; they do **not**
cover product name `21JN`. No alternate 21JN fix exists besides this DMI
row.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: **ASoC / AMD Yellow Carp (`sound/soc/amd/yc/`)** —
**PERIPHERAL** globally, **IMPORTANT** for users of this laptop. Config:
`SND_SOC_AMD_YC_MACH`.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: Actively maintained via a stream of DMI quirk additions (V15 G6
ARP, Acer Aspire Go 15, HP Victus, Alienware, MSI Thin A15, …). Mature
driver (since 2021) with a stable quirk-table contract.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: Driver-specific / DMI-specific: Lenovo ThinkPad E16 Gen 2
product **21JN** (AMD Yellow Carp / Ryzen 7735HS). No effect on other
machines.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: Every boot on that SKU. ACPI does not enable DMIC; without the
quirk, `acp6x_probe()` returns `-ENODEV`. Not a race. Not triggerable as
a privilege-escalation path.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: Internal digital microphone never appears. Not a
panic/UAF/corruption bug. **MEDIUM** as a kernel-severity class,
**HIGH** as a user-visible hardware defect on an otherwise-supported
laptop. This is exactly the class the stable “hardware quirk” exception
is for.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- Benefit: **HIGH** for 21JN owners on 6.18.y (microphone works);
**zero** for everyone else
- Risk: **VERY LOW** (7-line DMI row, existing table, existing
driver_data)
- Ratio: strongly favors backporting
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Real, user-reported hardware bug: internal DMIC missing on ThinkPad
E16 Gen 2 21JN
- Reporter reproduced it on **kernel 6.18**, i.e. this tree
- Canonical stable exception: DMI quirk in an existing driver
- Sibling SKUs 21M5/21M6 already use the same quirk and were sent to
stable
- 7 lines, identical to existing entries, applied by ASoC maintainer
Mark Brown
- Driver and table exist here since 2021/2022; no missing prerequisites
- Applies cleanly between `21J6` and `21M1`
AGAINST:
- Not a crash, deadlock, or security bug
- Commit message on the git object is sparse (bug detail lives on lore)
- Single reporter, not a maintainer-authored patch
UNRESOLVED:
- Could not fetch lore.kernel.org directly (403); thread recovered via
`b4 dig`, gnuweeb, and patchew
- Could not independently dump DMI from the reporter’s machine beyond
the strings they posted
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — identical table pattern;
user tested on the affected laptop; maintainer applied it
2. Fixes a real bug that affects users? **PASS** — internal mic not
enumerated
3. Important issue? **PASS** under the hardware-quirk exception (broken
input device on a shipping laptop)
4. Small and contained? **PASS** — +7 lines, one file, one DMI row
5. No new features or APIs? **PASS** — no new driver, syscall, or module
param; enables existing DMIC card on one SKU
6. Can apply to the local tree? **PASS** — 6.18.y has the file, table,
probe path, and hunk context
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Hardware quirk / workaround** (DMI match in
`yc_acp_quirk_table[]`). Closely analogous to USB/PCI/codec ID
additions.
**Step 9.4: MAKE YOUR DECISION**
This belongs on 6.18.y. The machine driver is already here; only this
Lenovo product ID is missing; the user-visible failure is a non-working
internal microphone; the change is the same 7-line DMI addition already
used for other E16 Gen 2 SKUs.
Verification:
- [Phase 1] `git describe HEAD` / `make kernelversion` / Makefile: local
tree is **v6.18.57** (6.18.y)
- [Phase 1] Parsed tags: author SOB, Mark Brown SOB, msgid Link; no
Fixes/Reported-by/Cc:stable on the git object
- [Phase 1/4] Original patch body and Jul 17 report: DMIC missing on
Debian 13 kernel 6.18; DMI vendor LENOVO, product 21JN
- [Phase 2] Diff: +7 lines in `yc_acp_quirk_table[]` only;
`acp6x_probe()` uses `dmi_first_match()` then `-ENODEV` if no card
- [Phase 3] `git blame -L 220,260 sound/soc/amd/yc/acp6x-mach.c`:
neighbors from 2022–2024; driver added in `fa991481b8b22` (2021)
- [Phase 3] `git merge-base --is-ancestor 1d9ce4440414c HEAD` and
`0704a15b930cf`: 21M5/21M6 E16 quirks **are** in this tree; both had
`Cc: stable`
- [Phase 3] No `Fixes:` tag to follow
- [Phase 3] Author has no other `sound/soc/amd` commits here
- [Phase 4] `b4 dig -c 99dcbf96a43ed`: lore RESEND at
patch.msgid.link/aqu4HOCmdCUs_unm@adriana; applied msgid
20260917131851.2122144-1; Mark Brown applied to for-7.3 as
4cae4ca34992
- [Phase 4] `b4 dig -a`: RESEND then properly formatted PATCH; no v2
technical changes
- [Phase 4] `b4 dig -w`: AMD audio + broonie + alsa-devel/linux-sound
- [Phase 4] gnuweeb thread: no NAK of the quirk; only formatting
feedback
- [Phase 4] lore.kernel.org WebFetch: 403; used b4/gnuweeb/patchew
instead
- [Phase 4] stable list search: no hit for this SKU
- [Phase 5] Callers: `pci-acp6x.c` registers `"acp_yc_mach"`; probe is
boot-time on ACP PDM platforms
- [Phase 5] Kconfig: `SND_SOC_AMD_YC_MACH` depends on `SND_SOC_AMD_ACP6x
&& ACPI`
- [Phase 6] Pre-patch context in this tree has `21J6` then `21M1`;
`21JN` is the missing row; apply is clean
- [Phase 6] `rg 21JN` confirms the entry is the standard Lenovo match
- [Phase 8] Failure mode verified against probe: no card → `-ENODEV` →
no ACP DMIC PCM; matches `arecord -l` in the report
- UNVERIFIED: live DMI dump from the reporter’s machine (only the
strings they mailed)
The patch is a 7-line DMI quirk for existing AMD YC DMIC support. It
fixes a real, 6.18-reproduced microphone failure on ThinkPad E16 Gen 2
21JN, matches the established stable quirk exception, and applies
cleanly here.
**YES**
sound/soc/amd/yc/acp6x-mach.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
index 8e203c034851f..507c07efc069b 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -234,6 +234,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "21J6"),
}
},
+ {
+ .driver_data = &acp6x_card,
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21JN"),
+ }
+ },
{
.driver_data = &acp6x_card,
.matches = {
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.12] ASoC: amd: acp3x-es83xx: Add HVY-WXX9/M1060 DMI quirk
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (52 preceding siblings ...)
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.1] ASoC: amd: yc: Add Lenovo ThinkPad E16 Gen 2 (21JN) to quirks Sasha Levin
@ 2026-10-19 13:52 ` Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 14-dv1001TU Sasha Levin
` (7 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:52 UTC (permalink / raw)
To: patches, stable
Cc: Mehmet Aysel, Mark Brown, Sasha Levin, Vijendar.Mukunda,
lgirdwood, perex, tiwai, linux-sound, linux-kernel
From: Mehmet Aysel <mehmet4ysel@gmail.com>
[ Upstream commit c1a39c228aceebc0ede83781ea906d257e324009 ]
Add matching DMI table entry for the ES83xx machine driver, so the
HUAWEI HVY-WXX9 / M1060 board (MateBook D16 2021, Ryzen 5 4600H) can
successfully probe its ES8316 codec via the acp3x-es83xx machine
driver, consistent with the existing M1010/M1020/M1040 entries for
the same board name.
Signed-off-by: Mehmet Aysel <mehmet4ysel@gmail.com>
Link: https://patch.msgid.link/20260825092432.56292-2-mehmet4ysel@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
# Stable backport analysis
Local tree: **pending-6.12** (`p-6.12-3-gc504cf0baa3d8`, `make
kernelversion` = **6.12.111**). Verdict is for this tree only.
Commit under review: **ASoC: amd: acp3x-es83xx: Add HVY-WXX9/M1060 DMI
quirk** (mainline `c1a39c228ace`). It is **not** in this checkout (`git
merge-base --is-ancestor c1a39c228ace HEAD` failed).
---
## PHASE 1: COMMIT MESSAGE FORENSICS
**Step 1.1: PARSE THE SUBJECT LINE**
Record: `[ASoC/amd/acp3x-es83xx] [Add] [DMI quirk so HUAWEI HVY-WXX9
product version M1060 probes the existing ES8316 machine driver]`
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- `Fixes:` — none (expected for this review queue)
- `Reported-by:` — none
- `Tested-by:` — none
- `Reviewed-by:` — none
- `Acked-by:` — none
- `Link:` `https://patch.msgid.link/20260825092432.56292-2-
mehmet4ysel@gmail.com`
- `Cc: stable@vger.kernel.org` — none (expected)
- `Signed-off-by: Mehmet Aysel <mehmet4ysel@gmail.com>` (author)
- `Signed-off-by: Mark Brown <broonie@kernel.org>` (ASoC maintainer;
applied the series)
- Ignore `Signed-off-by: Sasha Levin` if present (pipeline)
Notable: Message-ID `...-2-...` and subject history show this is **patch
2/2**. Companion is patch 1/2 to `sound/soc/amd/acp-config.c`.
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** The MateBook D16 2021 (Ryzen 5 4600H) board `HUAWEI` / `HVY-
WXX9` / `M1060` is not in `acp3x_es83xx_dmi_table`. Sibling SKUs
`M1010` / `M1020` / `M1040` already are.
- **Symptom:** Machine driver does not probe the ES8316 codec; onboard
audio does not come up. `acp3x_es83xx_probe()` logs that ACPI lists
ES83xx but the DMI table has no match, and returns `-ENODEV`.
- **Version info:** None in the message. Hardware is a 2021 laptop;
driver landed in v6.7.
- **Root cause (author):** Exact DMI version match omits this SKU. Same
`ES83XX_ENABLE_DMIC` data as the other HVY-WXX9 rows.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: Not a disguised cleanup. It is an explicit DMI quirk / hardware-
enablement addition, the audio analogue of a device-ID row.
---
## PHASE 2: DIFF ANALYSIS
**Step 2.1: INVENTORY THE CHANGES**
Record:
- File: `sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c` — **+8 / -0**
- Function/data: `acp3x_es83xx_dmi_table[]` only
- Scope: single-file surgical table addition
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record: Before, `dmi_first_match(acp3x_es83xx_dmi_table)` fails for
`PRODUCT_VERSION == "M1060"` (`DMI_EXACT_MATCH`). Probe takes the else
branch (`-ENODEV`). After, that SKU matches and `driver_data =
ES83XX_ENABLE_DMIC`, same as M1010/M1020/M1040.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: **Hardware workaround / DMI quirk (category h).** Missing table
row, not UAF/race/leak. Without a match, ES8316 never initializes on
this SKU.
**Step 2.4: ASSESS THE FIX QUALITY**
Record: Copy of existing HVY-WXX9 rows with version `M1060`. No new
APIs, no locking, no hot-path logic. Regression risk is limited to that
DMI triple being wrong (would only affect that SKU). Quality: obviously
correct, minimal.
---
## PHASE 3: GIT HISTORY INVESTIGATION
**Step 3.1: BLAME THE CHANGED LINES**
Record:
- Table introduced in `54fcd9dd44b2c` (“Add machine driver that enables
sound for systems with a ES8336 codec”), **2023-09-11**, contained in
**v6.7-rc1**. Original HVY-WXX9 rows: **M1020 and M1040**.
- M1010 row added in `5513c5d0fb3d5` (2024-01-29): “Previous commit that
added support for Huawei MateBook D16 2021 … (HVY-WXX9 M1010) was
incomplete.” Both commits **are ancestors of this HEAD**.
- M1060 was never added here.
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: No `Fixes:` tag. Closest precedent is `5513c5d0fb3d5`, which
`Fixes: b5338b1b901e` because **acp-config alone is not enough**; the
es83xx DMI table must match too.
**Step 3.3: CHECK FILE HISTORY**
Record: This file in 6.12 has a short, stable history (`54fcd9dd44b2c` …
`5513c5d0fb3d5`). No later refactor of the table. Standalone data
addition; series companion is a parallel row in `acp-config.c`.
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: `git log --author="Mehmet Aysel" -- sound/soc/amd/` is empty in
this tree (new contributor). Driver author is Marian Postevca.
Maintainer Mark Brown applied the series to `for-7.3`.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: Code-level: none (no new helpers). Functional: **patch 1/2**
(`acp-config.c` M1060, `FLAG_AMD_LEGACY`) is required for a full enable.
`acp_pci_probe()` only continues if `snd_amd_acp_find_config()` returns
`FLAG_AMD_LEGACY` or `FLAG_AMD_LEGACY_ONLY_DMIC`. That DMI table in this
tree has M1010/M1020/M1040 but **not M1060**. This commit still applies
and is harmless alone (unused table row). Precedent: `b5338b1b901e` then
`5513c5d0fb3d5` were the same two-table split.
---
## PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- `b4 dig -c c1a39c228ace` →
https://patch.msgid.link/20260825092432.56292-2-mehmet4ysel@gmail.com
- `b4 dig -a`: **v1 only** (no v2/v3)
- Thread: submit 2026-08-25; Mark Brown applied 2026-08-26 to `for-7.3`
(`032bb633e0c3` + `c1a39c228ace`)
- No NAK, no review objections, no `Cc: stable` in-thread
- lore.kernel.org `WebFetch` returned **403**; thread recovered via `b4
dig -m`
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record (`b4 dig -w`): To/Cc Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, `linux-sound`, `linux-kernel`. ASoC maintainer applied it.
No extra Reviewed-by.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: No bugzilla/syzbot/Reported-by. Author describes a specific 2021
MateBook SKU missing from an existing DMI set. User count: that SKU only
(unverified beyond the commit text).
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: **[PATCH 1/2]** `ASoC: amd: acp-config: Add HVY-WXX9/M1060 DMI
quirk` — same DMI triple, `FLAG_AMD_LEGACY` / `ACP_PCI_DEV_ID`. Both
needed for audio. This patch is still a self-contained table insert.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: `WebFetch` of lore.kernel.org/stable **403**. Original thread
has no stable discussion. **UNVERIFIED** whether anyone asked for this
on stable@ separately. This tree already carries many AMD ASoC DMI
quirks (e.g. `6599a33c97f45`, `33680092d71b4`).
---
## PHASE 5: CODE SEMANTIC ANALYSIS
**Step 5.1: KEY FUNCTIONS**
Record: No function body changes. Data: `acp3x_es83xx_dmi_table`.
Consumer: `acp3x_es83xx_probe()`.
**Step 5.2: TRACE CALLERS**
Record:
- `acp3x_es83xx_probe` ← `acp_ops_probe()` (`acp-mach.h`) ←
`acp_legacy_mach` platform probe
- ops installed by `acp3x_es83xx_init_ops()` when `hs_codec_id ==
ES83XX`
- PCI gate: `acp_pci_probe()` → `snd_amd_acp_find_config()` (companion
table)
- Context: boot/device probe, not IRQ/hot path
**Step 5.3: TRACE CALLEES**
Record: `dmi_first_match()`, then ACPI codec lookup / `devm_kzalloc`. No
new callees.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Reachable on this laptop at boot if ACP PCI + ES83xx ACPI are
present. Not a syscall attack path. User-visible: missing sound device.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same file already has three HVY-WXX9 rows. Same pattern as
`5513c5d0fb3d5`. AMD ASoC in this tree is full of DMI quirk additions.
---
## PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: **Yes.** `sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c` lines
357–381 have HVY-WXX9 M1010/M1020/M1040 and **no M1060**. Driver since
**v6.7**, long before 6.12. `acp-config.c` likewise has those three SKUs
and not M1060.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: **Clean apply** (small line-number offset vs mainline).
Surrounding table matches the hunk. No refactor in this file since
M1010.
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: `git log --grep='HVY-WXX9'` / `M1060`: no M1060 fix. M1010
completion (`5513c5d0fb3d5`) is already here from mainline 6.12, not a
substitute for M1060.
---
## PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
**Step 7.1: SUBSYSTEM AND CRITICALITY**
Record: **ASoC AMD ACP machine driver** (`sound/soc/amd/`). Criticality:
**PERIPHERAL** (one laptop SKU), but this is the supported path for that
hardware. Not staging.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: File is mature (few commits). Wider `sound/soc/amd` still gets
DMI quirks in this 6.12 tree. Pattern is well established.
---
## PHASE 8: IMPACT AND RISK ASSESSMENT
**Step 8.1: WHO IS AFFECTED**
Record: **Platform/SKU-specific:** HUAWEI MateBook D16 2021, DMI `HVY-
WXX9` / `M1060`. No effect on other machines.
**Step 8.2: TRIGGER CONDITIONS**
Record: Every boot on that SKU. Not a race. Unprivileged users cannot
exploit it; they just have no speaker/mic.
**Step 8.3: FAILURE MODE SEVERITY**
Record: Probe `-ENODEV` → **no audio**. Not panic/UAF/corruption.
Severity **MEDIUM** for that user; class is a **hardware quirk**, which
stable explicitly takes.
**Step 8.4: RISK-BENEFIT RATIO**
Record:
- Benefit: restores audio on a 2021 Ryzen MateBook SKU that 6.12 already
supports via sibling DMI rows.
- Risk: **very low** (8-line table, existing flag).
- Ratio: favorable. Companion 1/2 should go with it for a working stack.
---
## PHASE 9: FINAL SYNTHESIS
**Step 9.1: COMPILE THE EVIDENCE**
**FOR:**
- Explicit **hardware quirk / DMI ID** exception (same class as USB/PCI
IDs).
- Driver and sibling HVY-WXX9 rows **already in 6.12.111**.
- Real user-visible bug: codec never probes.
- 8 lines, copy of existing entries, ASoC maintainer applied it.
- This tree already backports other AMD ASoC DMI quirks.
- Historical split (`b5338b1b901e` + `5513c5d0fb3d5`) shows **both**
tables are required; this is the machine-driver half.
**AGAINST:**
- Not a crash/security/deadlock issue.
- Patch **2/2**; full audio also needs `acp-config` M1060.
- No Tested-by / Reported-by in the message.
- One SKU only.
**UNRESOLVED:**
- lore.kernel.org HTTP 403 (thread obtained via b4).
- Stable@ search not independently fetched.
- Author-tested DMI dump not in the mail.
**Step 9.2: STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — identical to existing rows;
maintainer applied. No separate Tested-by.
2. Fixes a real bug that affects users? **PASS** — that SKU gets
`-ENODEV` and no sound.
3. Important issue? **PASS via quirk exception** — missing audio on
supported hardware, not a panic.
4. Small and contained? **PASS** — +8 lines, one table.
5. No new features or APIs? **PASS** — no new driver/API; only a DMI
match for an existing path.
6. Can apply to the local tree? **PASS** — file and context present;
M1060 absent.
**Step 9.3: EXCEPTION CATEGORIES**
Record: **Hardware quirk / DMI table entry** for an **existing** driver
(device-ID analogue).
**Step 9.4: DECISION**
This should be backported to **this** 6.12 tree. It is a small DMI quirk
so a MateBook D16 2021 SKU already described by HVY-WXX9
M1010/M1020/M1040 can probe ES8316. Risk is negligible; apply difficulty
is clean.
Companion **[PATCH 1/2]** (`acp-config.c` M1060) is not this commit, but
without it `acp_pci_probe()` still returns `-ENODEV` for M1060. That
does not make this commit a NO: the two additions are independent table
rows, and this one is necessary and safe on its own.
---
## What the commit solves (for stable users)
On this 6.12 tree, `acp3x_es83xx_probe()` only registers the card if
`dmi_first_match()` hits `acp3x_es83xx_dmi_table`. M1060 is missing, so
that SKU warns and returns `-ENODEV`. Adding the row (same
`ES83XX_ENABLE_DMIC` as the other HVY-WXX9 entries) is the standard,
low-risk way to enable already-supported hardware.
## Risk vs benefit
Benefit: working analog audio/DMIC on one existing 2021 HUAWEI board
revision. Risk: an 8-line DMI insert that cannot affect other DMI
triples. Meets stable rules under the quirk exception.
---
## Verification
- **[Phase 1]** Tags: author SOB, Mark Brown SOB, msgid.link; no
Fixes/Reported-by/Cc stable. Subject is hardware quirk add.
- **[Phase 2]** Diff: +8 lines in `acp3x_es83xx_dmi_table` only;
`ES83XX_ENABLE_DMIC`; no logic change.
- **[Phase 2]** Local probe: `acp3x_es83xx_probe()` uses
`dmi_first_match`; else `-ENODEV` + “not registered in DMI table”.
- **[Phase 3]** `git describe HEAD` / `make kernelversion`:
pending-6.12, 6.12.111.
- **[Phase 3]** `git blame`: M1020/M1040 from `54fcd9dd44b2c`
(v6.7-rc1); M1010 from `5513c5d0fb3d5`; both ancestors of HEAD.
- **[Phase 3]** `git merge-base --is-ancestor c1a39c228ace HEAD`: commit
**not** in this tree.
- **[Phase 3]** `5513c5d0fb3d5` documents that acp-config without es83xx
DMI is incomplete.
- **[Phase 3]** `acp_pci_probe` requires `FLAG_AMD_LEGACY` from
`snd_amd_acp_find_config()`; local `acp-config.c` has HVY-WXX9
M1010/M1020/M1040, not M1060.
- **[Phase 4]** `b4 dig -c c1a39c228ace`: msgid.link thread; v1 only;
Mark Brown applied both patches to for-7.3.
- **[Phase 4]** `b4 dig -w`: ASoC maintainers on To/Cc.
- **[Phase 4]** `b4 dig -m /tmp/thread.mbox`: no NAK; no Cc: stable in-
thread.
- **[Phase 4]** WebFetch lore.kernel.org and lore.kernel.org/stable:
**403** — UNVERIFIED via HTTP; b4 mbox used instead.
- **[Phase 5]** Call chain: `acp_pci_probe` → legacy mach probe →
`acp_ops_probe` → `acp3x_es83xx_probe` → DMI table. Boot-time, SKU-
specific.
- **[Phase 6]** Grep: no `M1060` in `sound/soc/amd`; HVY-WXX9 appears
three times in es83xx + three in acp-config. Apply: clean.
- **[Phase 7–8]** Subsystem `sound/soc/amd`; this 6.12 tree already has
many `ASoC: amd: yc: Add DMI quirk` commits. Failure mode: no audio,
not oops.
- **UNVERIFIED:** Independent stable@ archive search; author-provided
DMI dump; how many M1060 units exist.
**YES**
sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c b/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c
index eb5d4a5baef24..b18a8971aec94 100644
--- a/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c
+++ b/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c
@@ -379,6 +379,14 @@ static const struct dmi_system_id acp3x_es83xx_dmi_table[] = {
},
.driver_data = (void *)(ES83XX_ENABLE_DMIC),
},
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "HUAWEI"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HVY-WXX9"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "M1060"),
+ },
+ .driver_data = (void *)(ES83XX_ENABLE_DMIC),
+ },
{}
};
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 14-dv1001TU
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (53 preceding siblings ...)
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.12] ASoC: amd: acp3x-es83xx: Add HVY-WXX9/M1060 DMI quirk Sasha Levin
@ 2026-10-19 13:52 ` Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add quirk for ASUS VivoBook M515DA/X515DAP Sasha Levin
` (6 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:52 UTC (permalink / raw)
To: patches, stable
Cc: renpanpan, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: renpanpan <renpanpan@kylinos.cn>
[ Upstream commit ece609abc95cc0f75e633d93f3d868b030d9a8fe ]
The HP Pavilion 14-dv1001TU (subsystem ID 103c:8987) uses a Realtek
ALC287 codec. The mute LED on this machine is controlled by GPIO bit
0x10, which was verified via hda-verb, but the subsystem ID is missing
from the quirk table. As a result, the ALC287_FIXUP_HP_GPIO_LED fixup
that drives GPIO 0x10 is never applied and the mute LED stays off even
though the associated LED class device toggles correctly.
Add the missing SND_PCI_QUIRK entry to map this subsystem ID to
ALC287_FIXUP_HP_GPIO_LED so the mute LED works as expected.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=221810
Signed-off-by: renpanpan <renpanpan@kylinos.cn>
Link: https://patch.msgid.link/20260930065504.24151-1-rppxj178543@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a one-line HP ALC287 mute-LED quirk for this 6.18.y tree. The
SSID is missing from `alc269_fixup_tbl`, GPIO 0x10 was verified on the
machine, and the existing `ALC287_FIXUP_HP_GPIO_LED` fixup is already
present.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: [ALSA/hda/realtek] [Add] [mute LED quirk for HP Pavilion
14-dv1001TU]
Subsystem prefix `ALSA: hda/realtek`. Action verb is “Add”, but the body
is a missing-quirk hardware workaround, not a new feature.
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- Link: https://bugzilla.kernel.org/show_bug.cgi?id=221810 (user bug
report)
- Signed-off-by: renpanpan <renpanpan@kylinos.cn> (author)
- Link:
https://patch.msgid.link/20260930065504.24151-1-rppxj178543@163.com
- Signed-off-by: Takashi Iwai <tiwai@suse.de> (ALSA/HDA
maintainer)
- No Fixes: tag (expected for this review)
- No Reported-by / Tested-by / Reviewed-by / Acked-by / Cc: stable
- Ignore pipeline-added “[Upstream commit …]” and “Signed-off-by: Sasha
Levin”
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- Bug: HP Pavilion 14-dv1001TU (SSID 103c:8987, Realtek ALC287) never
matches a quirk, so `ALC287_FIXUP_HP_GPIO_LED` is not applied.
- Symptom: speaker mute works; physical mute LED stays off. LED class
device `/sys/class/leds/hda::mute` still toggles.
- Root cause: GPIO bit 0x10 drives the LED (verified with hda-verb);
that GPIO is what `alc287_fixup_hp_gpio_led()` programs, but 103c:8987
is absent from the table.
- Version info in the message: none. Bugzilla reporter used kernel
7.1.5-arch1-2; the omission is in this 6.18 tree as well.
Step 1.4: DETECT HIDDEN BUG FIXES
Record: Not a disguised cleanup. It is an explicit hardware quirk
addition for a missing SSID.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- File: `sound/hda/codecs/realtek/alc269.c` (+1 / −0)
- Function/table: `alc269_fixup_tbl[]`
- Scope: single-file, one-line surgical quirk
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record: Before, `snd_hda_pick_fixup()` in the ALC269 probe path did not
match 103c:8987, so no GPIO mute-LED hook ran. After, that SSID maps to
`ALC287_FIXUP_HP_GPIO_LED`, which calls `alc287_fixup_hp_gpio_led()` →
`alc_fixup_hp_gpio_led(codec, action, 0x10, 0)` (mute mask 0x10, no
micmute mask). Only this SSID is affected.
Step 2.3: IDENTIFY THE BUG MECHANISM
Record: [Hardware workaround / codec quirk] Missing `SND_PCI_QUIRK`
meant GPIO 0x10 was never configured as the mute LED. The fix adds that
table entry. Not a UAF, leak, race, or crash.
Step 2.4: ASSESS THE FIX QUALITY
Record: Obviously correct and minimal. Neighboring HP Pavilion entries
already use the same fixup (e.g. 0x898a “HP Pavilion 15-eg100”).
Matching is by PCI subsystem ID only, so other machines are untouched.
Regression risk is very low; wrong GPIO on this one SKU would at worst
leave the LED still broken.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record: The bug is a missing row, not a bad existing line. Neighbors
0x8981 and 0x898a come from `aeeb85f26c3bb` (“ALSA: hda: Split Realtek
HD-audio codec driver”, 2025-07-11), which is an ancestor of this tree.
`ALC287_FIXUP_HP_GPIO_LED` / `alc287_fixup_hp_gpio_led()` exist in that
split and at the parent of this patch.
Step 3.2: FOLLOW THE FIXES: TAG
Record: No Fixes: tag. Not applicable. The defect is an omitted SSID for
a laptop that already uses the long-standing ALC287 GPIO-LED fixup.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record: Same file has many one-line mute-LED quirks (Pavilion 15-eg0xxx,
15-eg3xxx, Victus, etc.). This is standalone, not patch X/Y. No extra
refactor is required.
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record: `git log --author=renpanpan -- sound/hda/codecs/realtek/` shows
only this commit in this tree. Author is not the ALSA maintainer;
Takashi Iwai applied it the same day.
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record: Parent already has `alc287_fixup_hp_gpio_led()`, enum
`ALC287_FIXUP_HP_GPIO_LED`, table entry for 0x898a, and
`alc_fixup_hp_gpio_led()` in `realtek.c`. Applies standalone.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- `b4 dig -c 66ab53f7fac5a` →
https://patch.msgid.link/20260930065504.24151-1-rppxj178543@163.com
- `b4 dig -a`: single v1 series, no later revision
- Thread: Takashi Iwai replied “Applied now. Thanks.” No NAK, no
requested changes, no stable note
- Lore WebFetch returned 403; the full thread was recovered via `b4 dig
-m`
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record: `b4 dig -w` recipients: tiwai@suse.de, perex@perex.cz, alsa-
devel, linux-kernel, author. Subsystem maintainer was To: and merged it.
Step 4.3: SEARCH FOR THE BUG REPORT
Record: Bugzilla 221810, title “ALC287: HP Pavilion 14-dv1001TU
(103c:8987) missing mute LED quirk”. Reporter (Arch, kernel 7.1.5)
documented Product ID 50N47PA#ACJ, SOF TGL driver, ALC287, and hda-verb
GPIO 0x10 on/off. They could not rebuild the module on that machine.
Patch author confirmed the analysis and posted the quirk. No Tested-by
of the kernel patch itself; hardware GPIO behavior is verified.
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Standalone one-patch series. Same pattern as `8db3663d3c3e2`
(Pavilion 15-eg0xxx, GPIO 0x10, `ALC287_FIXUP_HP_GPIO_LED`), which is
already in this series (`v6.18.24~178`).
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: lore.kernel.org/stable search returned 403. UNVERIFIED whether
anyone discussed this hash on stable@. No evidence it was rejected.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: No function body edited. Added one entry in
`alc269_fixup_tbl[]`, consumed by `snd_hda_pick_fixup()`. Downstream:
`alc287_fixup_hp_gpio_led` → `alc_fixup_hp_gpio_led`.
Step 5.2: TRACE CALLERS
Record: `alc269_fixup_tbl` is passed from ALC269-family probe
(`alc269.c` around the `snd_hda_pick_fixup(codec, alc269_fixup_models,
alc269_fixup_tbl, alc269_fixups)` call). Codec probe / device
enumeration, not IRQ or a syscall hot path.
Step 5.3: TRACE CALLEES
Record: `alc_fixup_hp_gpio_led()` sets `gpio_mute_led_mask` and
registers the mute LED cdev with `gpio_mute_led_set`. mute_mask=0x10
matches the reporter’s SET_GPIO_MASK/DIR/DATA 0x10.
Step 5.4: FOLLOW THE CALL CHAIN
Record: Userspace mute → HDA generic LED cdev → GPIO. Reachable on this
laptop whenever the Realtek HDA codec probes. Unprivileged unmute/mute
of speakers is enough once the quirk is applied; today the LED class
device already toggles, but GPIO is never programmed.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Multiple HP SSIDs already use `ALC287_FIXUP_HP_GPIO_LED`
(0x87c8, 0x87cb, 0x87cc, 0x88d0, 0x8919, 0x898a, 0x8a0f, …). Same bug
class: new HP SKU omitted from the table.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record: Yes. Local tree is `v6.18.57` (Makefile 6.18.57). Parent of the
candidate has 0x8981 then 0x898a with **no** 0x8987. File path
`sound/hda/codecs/realtek/alc269.c` exists (post-split). Fixup enum and
function exist. The laptop is a consumer HP Pavilion 14-dv1xxx; the
omission is old, not introduced after 6.18.
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record: Clean apply. Context lines match. No conflicting 0x8987 entry.
Expected difficulty: clean apply.
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: No other 103c:8987 quirk. Similar GPIO-LED quirks for other HP
models are present; they do not cover this SSID.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: [sound/hda/realtek] [IMPORTANT] — common laptop audio, not core
mm/fs. Impact is one HP SKU’s mute LED.
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: Very active quirk table; recent log is mostly per-model
`SND_PCI_QUIRK` additions. Mature driver, ongoing hardware ID
maintenance.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: Driver-specific / platform-specific: owners of HP Pavilion
14-dv1001TU (PCI SSID 103c:8987, ALC287).
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: Every boot/probe on that machine. Mute key / userspace mute. Not
a race. No extra privilege needed. Audio mute itself already works.
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record: [Mute LED stays off] [MEDIUM/LOW as a crash class, but a real
hardware bug]. Not panic, deadlock, or data corruption. User-visible
broken LED on a shipping laptop.
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record: Benefit: restores mute LED on this SKU using the same fixup
already used on sibling Pavilion models. Risk: one SSID-guarded line;
very low. Ratio strongly favors backport.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR:
- Real, user-reported hardware bug (bugzilla 221810) with hda-verb proof
of GPIO 0x10
- Existing, already-used fixup; only the SSID was missing
- One-line `SND_PCI_QUIRK` — the documented audio-codec quirk exception
- ALSA maintainer merged v1 the same day; no NAKs
- Applies cleanly; fixup and table exist in 6.18.57
- Same pattern as other HP mute-LED quirks already in this series (e.g.
15-eg0xxx in v6.18.24)
AGAINST:
- Not a crash, security hole, or data-corruption bug
- No Tested-by of the built module (reporter used hda-verb only)
- Affects one laptop SKU
UNRESOLVED:
- Stable@ discussion (lore/stable 403)
- Original reporter never confirmed the kernel module on that machine
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? [PASS] — GPIO verified on hardware;
maintainer applied; kernel-module Tested-by missing but the mapping
is the standard ALC287 GPIO-LED path
2. Fixes a real bug that affects users? [PASS] — mute LED never lights
on this Pavilion
3. Important issue? [PASS under hardware-quirk exception] — not
crash/corruption; codec quirk / broken LED on real hardware
4. Small and contained? [PASS] — +1 line, one table
5. No new features or APIs? [PASS] — no new API; enables existing fixup
for one SSID
6. Can apply to the local tree? [PASS] — file, neighbors, and
`ALC287_FIXUP_HP_GPIO_LED` all present
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: Audio codec quirk (`SND_PCI_QUIRK` for a specific laptop).
Explicitly treated as stable material.
Step 9.4: MAKE YOUR DECISION
This is a contained hardware quirk for a machine this tree already
supports (ALC287 + `ALC287_FIXUP_HP_GPIO_LED`). The bug is real and
user-visible; the change cannot affect other SSIDs. It should be
backported to this 6.18.y tree.
Verification:
- [Phase 1] Parsed tags: bugzilla 221810; msgid link; SOB renpanpan and
Takashi Iwai; no Fixes/Cc-stable/Tested-by
- [Phase 1] `git describe HEAD` / `make kernelversion` / Makefile:
v6.18.57-155-gcdf239ca885b2, 6.18.57
- [Phase 2] Diff: +1 line in `alc269_fixup_tbl[]` mapping 0x103c:0x8987
→ `ALC287_FIXUP_HP_GPIO_LED`
- [Phase 2] `alc287_fixup_hp_gpio_led()` at alc269.c:1386 uses mute_mask
0x10, matching the report
- [Phase 2] `alc_fixup_hp_gpio_led()` in realtek.c:2223 sets
`gpio_mute_led_mask` and registers the mute LED cdev
- [Phase 3] Parent `git grep 0x8987` empty; neighbors 0x8981/0x898a
present
- [Phase 3] `git merge-base --is-ancestor aeeb85f26c3bb HEAD` succeeded
(codec split / file path in this tree)
- [Phase 3] `alc287_fixup_hp_gpio_led` present at `66ab53f7fac5a^`
- [Phase 3] Author has no other realtek commits in this tree
- [Phase 4] `b4 dig -c 66ab53f7fac5a`: v1 only; lore
patch.msgid.link/20260930065504.24151-1-rppxj178543@163.com
- [Phase 4] `b4 dig -w`: To tiwai, Cc perex/alsa-devel/lkml
- [Phase 4] mbox: Iwai “Applied now. Thanks.” No NAK
- [Phase 4] curl bugzilla 221810: GPIO 0x10 verified; reporter on 7.1.5;
could not test rebuilt module
- [Phase 4] lore/stable search: 403, UNVERIFIED
- [Phase 5] `snd_hda_pick_fixup(..., alc269_fixup_tbl, ...)` at
alc269.c:8557 during codec probe
- [Phase 6] No duplicate 103c:8987; context applies cleanly
- [Phase 6] Similar quirk `8db3663d3c3e2` is in this series
(`v6.18.24~178`) — same fixup, different SSID
- [Phase 8] Failure mode: mute LED stuck off, audio mute still works;
SSID-scoped
- UNVERIFIED: whether the compiled quirk was tested on 14-dv1001TU (hda-
verb only)
- UNVERIFIED: stable@ thread contents (HTTP 403)
The patch is a one-line SSID quirk onto an existing ALC287 GPIO mute-LED
fixup. That is the standard audio-codec exception, it matches verified
hardware, and it applies cleanly to this 6.18.57 tree.
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index a40b85fbaf393..2a466ef894697 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -6902,6 +6902,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8975, "HP EliteBook x360 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x897d, "HP mt440 Mobile Thin Client U74", ALC236_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8981, "HP Elite Dragonfly G3", ALC245_FIXUP_CS35L41_SPI_4),
+ SND_PCI_QUIRK(0x103c, 0x8987, "HP Pavilion 14-dv1001TU", ALC287_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x898a, "HP Pavilion 15-eg100", ALC287_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x898e, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x898f, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add quirk for ASUS VivoBook M515DA/X515DAP
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (54 preceding siblings ...)
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 14-dv1001TU Sasha Levin
@ 2026-10-19 13:52 ` Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 15-ec1xxx Sasha Levin
` (5 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:52 UTC (permalink / raw)
To: patches, stable
Cc: Mauricio Orozco, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Mauricio Orozco <maudob@live.com>
[ Upstream commit a9fa2a016e805504223abf8c9b373ac9f7bfb9b3 ]
The ASUS VivoBook M515DA/X515DAP (subsystem ID 1043:1e3e)
requires the ALC256_FIXUP_ASUS_MIC_NO_PRESENCE fixup to
enable the internal microphone.
Without this quirk, the internal microphone captures only
silence under Linux, while it works correctly under Windows.
The fix has been verified on real hardware.
Tested on an ASUS VivoBook M515DA/X515DAP running Linux Mint
22.3 with Ubuntu HWE kernel 7.0.0-28.
Signed-off-by: Mauricio Orozco <maudob@live.com>
Link: https://patch.msgid.link/20260730033506.8958-1-mauoro3@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a one-line ALSA Realtek SSID quirk for a 2020 ASUS VivoBook. The
local tree is **5.15.221** (`pending-5.15`). The Realtek table lives at
`sound/pci/hda/patch_realtek.c` here, not the later `alc269.c` path, but
the same fixup and quirk table already exist.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: [ALSA hda/realtek] [add] [SSID quirk so ASUS VivoBook
M515DA/X515DAP internal mic works]
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- Signed-off-by: Mauricio Orozco <maudob@live.com> (author)
- Link: https://patch.msgid.link/20260730033506.8958-1-mauoro3@gmail.com
- Signed-off-by: Takashi Iwai <tiwai@suse.de> (ALSA maintainer)
- No Fixes: tag (expected)
- No Cc: stable (expected)
- No Reported-by / Tested-by / Reviewed-by / Acked-by
- Ignore any pipeline "Upstream commit" / "Signed-off-by: Sasha Levin"
markers; they are not evidence of selection
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- Bug: ASUS VivoBook M515DA/X515DAP, PCI/codec SSID **1043:1e3e**,
internal mic records silence on Linux; works on Windows.
- Symptom: functional capture failure (silent input), not a crash.
- Root cause implied: BIOS pin config does not describe the mic; needs
existing `ALC256_FIXUP_ASUS_MIC_NO_PRESENCE`.
- Version info: tested on Linux Mint 22.3 with Ubuntu HWE kernel
7.0.0-28 on real hardware.
- Author explains the needed fixup and the user-visible failure; does
not claim a new API.
Step 1.4: DETECT HIDDEN BUG FIXES
Record: Not a disguised cleanup. This is an explicit hardware quirk: add
one `SND_PCI_QUIRK` so an existing pin fixup is applied.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- File in the candidate: `sound/hda/codecs/realtek/alc269.c` (+1 line)
- Function/table: `alc269_fixup_tbl[]`
- Scope: single-file, one-line surgical table addition
- This 5.15 tree: that path does **not** exist; equivalent is
`sound/pci/hda/patch_realtek.c`
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record:
- Before: SSID 1043:1e3e is not in `alc269_fixup_tbl`, so
`snd_hda_pick_fixup()` does not apply this MIC_NO_PRESENCE pin
rewrite.
- After: that SSID matches and applies
`ALC256_FIXUP_ASUS_MIC_NO_PRESENCE`.
- Path: codec probe / initialization, not a hot path or error path.
- In this tree, `alc269_probe()` calls `snd_hda_pick_fixup(...,
alc269_fixup_tbl, alc269_fixups)` then pin-fallback tables. A PCI-SSID
hit sets `codec->fixup_id`, so later `snd_hda_pick_pin_fixup()`
returns immediately.
Step 2.3: IDENTIFY THE BUG MECHANISM
Record:
- Category: **hardware workaround / audio codec quirk**
- Mechanism: remap NID 0x19 to `0x04a11120` (headset mic, no jack
detect) and chain `ALC256_FIXUP_ASUS_HEADSET_MODE` →
`alc_fixup_headset_mode`. Without that, auto-parse leaves the internal
mic unusable (silence).
- Same pattern already used in this tree for other ASUS machines
(X430UN, X509DAP, pin-quirk ASUS ALC256 entries).
Step 2.4: ASSESS THE FIX QUALITY
Record:
- Obviously correct: one table entry, existing fixup, SSID-gated.
- Regression risk: confined to 1043:1e3e. Wrong-SSID collision would
only affect that ID; ASUS SSIDs are SKU-specific. No locking, alloc,
or API change.
- Upstream insert is slightly unsorted (0x1e3e placed after 0x1e10,
before 0x1e11). Lookup is linear in `snd_pci_quirk_lookup_id()`, so
order is not a functional issue.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record:
- `ALC256_FIXUP_ASUS_MIC_NO_PRESENCE` introduced in `e1037354a0a75a`
(Jian-Hong Pan, 2019-03-22), contained in **v5.1-rc3**, ancestor of
this HEAD.
- Nearby 0x1e11 entry blamed to `4b43d05a1978a9` (2020-07-24).
- Bug is missing table row, not a later regression. Hardware is ~2020
VivoBook 15 (Ryzen 3000).
Step 3.2: FOLLOW THE FIXES: TAG
Record: No Fixes: tag. Not applicable. The "bug" is incomplete BIOS pin
config, not a prior kernel commit.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record:
- This tree already backported the same class of fix: `82199bb33185f`
"ALSA: hda/realtek: Add quirk for ASUS VivoBook X509DAP" (also
`ALC256_FIXUP_ASUS_MIC_NO_PRESENCE`).
- Many other "Add quirk" commits on `patch_realtek.c`.
- Standalone; not patch X/Y.
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record:
- Mauricio Orozco has no prior commits under `sound/pci/hda/` in this
tree.
- Applied by Takashi Iwai (ALSA maintainer). Weight comes from
maintainer acceptance plus hardware test, not author history here.
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record:
- Needs `ALC256_FIXUP_ASUS_MIC_NO_PRESENCE`, `alc269_fixup_tbl`,
`SND_PCI_QUIRK`, ALC256 in `alc269` probe. All present.
- Does not need later-only IDs (`ALC245_FIXUP_CS35L41_SPI_2`,
`HDA_CODEC_QUIRK`, etc.).
- Can apply standalone after rewriting the path/context.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- b4 mbox msgid `20260730033506.8958-1-mauoro3@gmail.com`: 2 messages.
- Submission: https://lists.openwall.net/linux-kernel/2026/07/30/304
(also lkml.iu.edu).
- Single v1; no v2/v3.
- Reply: Takashi Iwai 2026-08-03: "Applied to for-next branch now.
Thanks." No NAK, no requested changes.
- lore.kernel.org WebFetch returned 403 (Anubis). Thread recovered via
b4 + openwall/lkml mirrors.
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record:
- To: tiwai@suse.com, perex@perex.cz
- Cc: linux-sound, linux-kernel, maudob@live.com
- Appropriate maintainers were on the original mail. Maintainer applied
it. No extra Reviewed-by.
Step 4.3: SEARCH FOR THE BUG REPORT
Record:
- No bugzilla/syzbot link. Evidence is the author's hardware test
(silent mic vs Windows).
- No additional independent public reports found beyond this patch
thread.
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Standalone 1/1 patch. Closest sibling already in this tree:
VivoBook X509DAP MIC_NO_PRESENCE quirk.
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: No stable@ discussion found for M515DA/X515DAP. No recorded
reason to exclude it. This tree's `stable-kernel-rules.rst` line 24:
"New device IDs and quirks are also accepted."
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: No function body change. Data: `alc269_fixup_tbl[]`. Consumers:
`snd_hda_pick_fixup()` from `alc269_probe()`; applied fixup
`ALC256_FIXUP_ASUS_MIC_NO_PRESENCE` → `alc_fixup_headset_mode`.
Step 5.2: TRACE CALLERS
Record:
- `alc269_probe()` in `patch_realtek.c` (~10555) calls
`snd_hda_pick_fixup(..., alc269_fixup_tbl, ...)`.
- ALC256 (`0x10ec0256`) is handled in that probe (`spec->codec_variant =
ALC269_TYPE_ALC256` at ~10475).
- Trigger: HDA codec probe at boot / module load for that laptop. Not
IRQ/syscall hot path.
Step 5.3: TRACE CALLEES
Record: `snd_hda_pick_fixup` → `snd_pci_quirk_lookup` /
`snd_pci_quirk_lookup_id` (linear SSID match in `sound/core/misc.c`).
Then pin overwrite + `alc_fixup_headset_mode`.
Step 5.4: FOLLOW THE CALL CHAIN
Record: Userspace capture (PulseAudio/PipeWire/arecord) uses the HDA PCM
created at probe. Unprivileged users on this laptop hit the silent-mic
bug. Reachable and user-visible.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Multiple `ALC256_FIXUP_ASUS_MIC_NO_PRESENCE` entries already in
this tree (X430UN 0x1271, X509DAP 0x197e, three ASUS pin quirks, Huawei
WRT-WX9). Systematic ASUS ALC256 BIOS-pin problem; this is another SSID.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record:
- Local: **5.15.221**, branch `pending-5.15`, `git describe`
`p-5.15-2-g6703e5d2f3a29`.
- Quirk table: `alc269_fixup_tbl` at
`sound/pci/hda/patch_realtek.c:9132`.
- SSID **0x1e3e is absent** (`grep` over `sound/pci/hda` found no
match).
- Fixup exists at enum line 7146 and table 8393–8401.
- Insertion point: around the existing 0x1e11 Zephyrus G15 entry (line
9449). 0x1e10 X507UAR is not in 5.15.
- Bug is missing hardware enablement, present since the driver shipped
without this SSID.
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record: **Minor context/path rewrite, not a semantic rework.** Upstream
file was split later to `sound/hda/codecs/realtek/alc269.c`. Same one-
line add used for X509DAP (`82199bb33185f` → `patch_realtek.c`).
Surrounding mainline-only quirks are not required.
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: No M515DA/0x1e3e entry. Pin quirks for other ASUS ALC256 pin
maps exist, but this machine still needs the SSID quirk (author: mic is
silent without it). `snd_hda_pick_pin_fixup` only runs if no SSID fixup
matched; it did not save this SKU.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: [sound/pci/hda Realtek codec] [IMPORTANT for laptop audio;
PERIPHERAL as a single SKU]. Affects owners of this ASUS model only.
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: Mature, actively patched in 5.15-stable with many quirk
backports. This is long-lived Realtek HDA code, not a post-5.15
subsystem.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: Driver-specific / platform-specific: ASUS VivoBook
M515DA/X515DAP (SSID 1043:1e3e), ALC256. Ubuntu 22.04-class 5.15 users
still run these 2020 machines.
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: Every boot / every capture on that laptop. Not a race.
Unprivileged user can trigger (open the mic). Common for that hardware,
zero impact elsewhere.
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record: Internal microphone captures silence. Not panic/corruption.
Severity **MEDIUM** functionally, but it is a real hardware-broken-on-
Linux bug. Audio codec quirks are an explicit stable exception.
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record:
- Benefit: restores internal mic on a real, still-deployed VivoBook;
same class as quirks already in 5.15.y.
- Risk: very low (one SSID-matched line, existing fixup).
- Ratio: high benefit for those users, negligible risk to everyone else.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR backporting:
- Real user-visible bug: internal mic silent on Linux, works on Windows.
- Verified on real hardware; ALSA maintainer applied v1 with no
objections.
- One-line `SND_PCI_QUIRK` using a fixup present since v5.1.
- Stable rules in this tree explicitly allow new device IDs and quirks.
- Identical VivoBook ALC256 MIC_NO_PRESENCE quirk already backported
here (X509DAP).
- Hardware (2020) is in the 5.15 user population.
- No new APIs, no refactor, no series dependencies.
AGAINST:
- Not a crash/security/corruption issue (quirk exception covers this).
- Upstream path differs; needs a one-line backport to `patch_realtek.c`.
- No extra independent reporters beyond the author.
- Tested on kernel 7.0, not 5.15 — unverified on this exact series, but
the missing SSID and the fixup are the same.
UNRESOLVED:
- Could not fetch lore.kernel.org HTML (403). Thread contents confirmed
via b4 mbox and public mirrors.
- Could not confirm codec pin dump for this SKU beyond the author's SSID
+ chosen fixup.
- No stable@ thread found.
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? **PASS** — one SSID line; tested on
hardware; maintainer applied.
2. Fixes a real bug that affects users? **PASS** — silent internal mic.
3. Important issue? **PASS** under the quirk exception (and "oh, that's
not good" hardware breakage); not CRITICAL crash.
4. Small and contained? **PASS** — +1 line.
5. No new features or APIs? **PASS** — existing fixup, new ID only.
6. Can apply to the local tree? **PASS** — table and fixup exist;
path/context rewrite only.
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: **Hardware quirk / audio codec quirk** (`SND_PCI_QUIRK` in
Realtek HDA). Also treated like a device-ID addition to an existing
driver.
Step 9.4: MAKE YOUR DECISION
This should be backported to this 5.15 tree. It is the standard Realtek
laptop microphone quirk: small, SSID-scoped, already-used fixup, real
hardware confirmation, and this tree already takes the same kind of
patch.
What it solves for stable users: 5.15 LTS systems on ASUS VivoBook
M515DA/X515DAP currently get a dead internal mic. The quirk applies
`ALC256_FIXUP_ASUS_MIC_NO_PRESENCE` so capture works.
Risk vs benefit: one table entry vs restoring mic on that SKU. Backport
adjustment is the file path (`alc269.c` → `patch_realtek.c`) and
inserting next to the existing 0x1e11 ASUS entry.
Verification:
- [Phase 1] Parsed tags: author SOB, Link msgid, Takashi Iwai SOB; no
Fixes/Cc-stable/Reported-by
- [Phase 2] Diff: +1 `SND_PCI_QUIRK(0x1043, 0x1e3e, ...,
ALC256_FIXUP_ASUS_MIC_NO_PRESENCE)` in `alc269_fixup_tbl`
- [Phase 2] Read fixup at `patch_realtek.c:8393-8401`: pin 0x19 →
0x04a11120, chained to `ALC256_FIXUP_ASUS_HEADSET_MODE`
- [Phase 2] Read `alc_fixup_headset_mode` chain at 8101–8104
- [Phase 3] `git describe HEAD` / Makefile: 5.15.221, `pending-5.15`,
`p-5.15-2-g6703e5d2f3a29`
- [Phase 3] `git blame` fixup: `e1037354a0a75a`, `git merge-base --is-
ancestor` of HEAD, `git describe --contains` → v5.1-rc3
- [Phase 3] `git log --grep=M515DA` / `0x1e3e` on `patch_realtek.c`:
empty
- [Phase 3] Precedent: `82199bb33185f` X509DAP same fixup already in
HEAD
- [Phase 4] `b4 mbox` msgid: v1 patch + Takashi "Applied to for-next";
no NAK
- [Phase 4] Openwall/LKML mirrors match that thread
- [Phase 4] lore WebFetch: 403; contents taken from b4 mbox instead
- [Phase 4] WebSearch stable@: no discussion of this SKU
- [Phase 5] `alc269_probe` at 10555 uses `alc269_fixup_tbl`; ALC256 case
at 10475; pick_pin_fixup skips if SSID already matched (934–942)
- [Phase 5] `snd_pci_quirk_lookup_id` linear match in
`sound/core/misc.c`
- [Phase 6] File `sound/hda/codecs/realtek/alc269.c` missing;
`sound/pci/hda/patch_realtek.c` present;
`ALC256_FIXUP_ASUS_MIC_NO_PRESENCE` present; 0x1e3e absent
- [Phase 6] `Documentation/process/stable-kernel-rules.rst` line 24:
quirks accepted
- [Phase 8] Failure mode: silent internal mic, SSID-scoped, low
regression risk
- UNVERIFIED: live pin dump for 1043:1e3e; lore HTML; runtime test on
5.15 itself
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 3364f6ad91fcb..4cadbad99537a 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -7196,6 +7196,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x1264, "ASUS UM5606KA", ALC294_FIXUP_BASS_SPEAKER_15),
SND_PCI_QUIRK(0x1043, 0x1e02, "ASUS UX3402ZA", ALC245_FIXUP_CS35L41_SPI_2),
SND_PCI_QUIRK(0x1043, 0x1e10, "ASUS VivoBook X507UAR", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
+ SND_PCI_QUIRK(0x1043, 0x1e3e, "ASUS VivoBook M515DA/X515DAP", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502),
SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM3402", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x1043, 0x1e1f, "ASUS Vivobook 15 X1504VAP", ALC2XX_FIXUP_HEADSET_MIC),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 15-ec1xxx
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (55 preceding siblings ...)
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add quirk for ASUS VivoBook M515DA/X515DAP Sasha Levin
@ 2026-10-19 13:52 ` Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 15-eg3xxx (103c:8bfd) Sasha Levin
` (4 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:52 UTC (permalink / raw)
To: patches, stable
Cc: Luis Banha, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Luis Banha <luisbanha26@gmail.com>
[ Upstream commit 775aa96c310d59f3d15a6e5a9bd1796fd1ba95ec ]
The mute LED on the HP Pavilion Gaming Laptop 15-ec1xxx (103c:87b2)
does not work automatically. Add the ALC285_FIXUP_HP_MUTE_LED quirk
to fix this behavior.
Signed-off-by: Luis Banha <luisbanha26@gmail.com>
Link: https://patch.msgid.link/20260921230105.16844-1-luisbanha26@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a one-line HP Realtek mute-LED quirk for PCI SSID `103c:87b2`.
The local tree is **6.18.57** (`v6.18.57-155-gcdf239ca885b2`). The
Realtek HDA driver, `alc269_fixup_tbl[]`, and `ALC285_FIXUP_HP_MUTE_LED`
are already present here; without this entry the Pavilion 15-ec1xxx mute
LED stays dead.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: [ALSA/hda/realtek] [Add] [mute LED quirk for HP Pavilion
15-ec1xxx]
Subsystem prefix `ALSA: hda/realtek`. Action verb is **Add**, but the
object is a hardware quirk for a specific laptop, not a new feature/API.
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- Signed-off-by: Luis Banha \<luisbanha26@gmail.com\> (author)
- Link:
https://patch.msgid.link/20260921230105.16844-1-luisbanha26@gmail.com
- Signed-off-by: Takashi Iwai \<tiwai@suse.de\> (ALSA maintainer)
- No Fixes:, Reported-by:, Tested-by:, Reviewed-by:, Acked-by:, or Cc:
stable (absence is expected for this review)
- Pipeline-added markers ignored: `[ Upstream commit
775aa96c310d59f3d15a6e5a9bd1796fd1ba95ec ]`, Signed-off-by: Sasha
Levin
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- Bug: mute LED on HP Pavilion Gaming Laptop 15-ec1xxx (SSID 103c:87b2)
does not work automatically
- Symptom: mute-key LED does not track mute state
- Version info: none stated
- Root cause implied: this SSID is missing from `alc269_fixup_tbl[]`, so
the existing `ALC285_FIXUP_HP_MUTE_LED` path is never applied
Step 1.4: DETECT HIDDEN BUG FIXES
Record: Not a disguised cleanup. It is an explicit hardware-quirk
addition. That is a documented stable exception, not a hidden leak/race.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- File: `sound/hda/codecs/realtek/alc269.c` (+1 / -0)
- Function/table: `alc269_fixup_tbl[]`
- Scope: single-file surgical one-liner
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record:
- Before: SSID 0x103c:0x87b2 has no matching `SND_PCI_QUIRK`.
`snd_hda_pick_fixup()` in `alc269_probe()` leaves the codec without
this LED fixup.
- After: that SSID maps to `ALC285_FIXUP_HP_MUTE_LED`.
- Path affected: codec probe/init for this laptop only.
Step 2.3: IDENTIFY THE BUG MECHANISM
Record:
- Category: **hardware workaround / codec quirk**
- Mechanism: HP wired mute/mic-mute LEDs to Realtek COEF bits.
`alc285_fixup_hp_mute_led()` already programs:
- mute LED: COEF 0x0b bit 3 via `alc285_fixup_hp_mute_led_coefbit()`
- mic-mute LED: COEF 0x19 bit 13 via
`alc285_fixup_hp_coef_micmute_led()`
- The bug is a missing table entry, not missing driver logic. Same
pattern as nearby HP OMEN 15 (`0x8786/0x8787/0x8788`) and Pavilion
15z-ec200 (`0x88dd`).
Step 2.4: ASSESS THE FIX QUALITY
Record:
- Obviously correct: one `SND_PCI_QUIRK` in PCI-ID order between
`0x8788` and `0x87b7`.
- Minimal: no API, locking, or control-path changes.
- Regression risk: confined to 103c:87b2. Wrong LED polarity would at
worst invert LEDs on that model; it cannot affect other machines.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record:
- The new line is the candidate itself (`e0d12f383475a`, Luis Banha,
2026-09-22).
- Surrounding HP ALC285 mute-LED entries come from the Realtek split
`aeeb85f26c3bb` (2025-07-09) and older `patch_realtek.c` history.
- `ALC285_FIXUP_HP_MUTE_LED` has been used since at least
`375f8426ed994` (“Add a quirk for HP OMEN 15 mute LED”, 2021-10-28,
Cc: stable). That commit is an ancestor of this tree.
Step 3.2: FOLLOW THE FIXES: TAG
Record: No Fixes: tag. Not applicable. The “bug” is a missing per-
machine ID, not a regression from a specific earlier commit.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record:
- Related: `d75dba4974447` “Add a quirk for HP Pavilion 15z-ec200” (same
15-ec family, same `ALC285_FIXUP_HP_MUTE_LED`, Cc: stable). Present in
this tree (`git merge-base --is-ancestor` exit 0).
- Many later HP mute-LED ID additions in the same table (15-eg0xxx,
14-dv1001TU, Victus, etc.).
- Standalone: not “patch X/Y”. No prerequisites beyond the existing
fixup enum/function, both already here.
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record: Luis Banha has only this Realtek commit in this tree. Maintainer
Takashi Iwai applied it (SOB). Not the subsystem maintainer, but
maintainer-applied.
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record: None. Diff assumes `SND_PCI_QUIRK`, `ALC285_FIXUP_HP_MUTE_LED`,
and `alc269_fixup_tbl[]`, all present. Can apply standalone.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- `b4 dig -c 775aa96c310d59f3d15a6e5a9bd1796fd1ba95ec` matched patch-id
`0b68c9761ca63e73bd01063dba912b15105a26c8`
- Lore/msgid:
https://patch.msgid.link/20260921230105.16844-1-luisbanha26@gmail.com
- `b4 dig -a`: single revision **v1** only; committed version is that v1
- Maintainer reply (Takashi Iwai, 2026-09-28): “Applied now. Thanks.” No
NAK, no requested changes, no extra stable discussion
- msgid.link and lore.kernel.org returned 403; discussion recovered from
LKML archive (https://lkml.iu.edu/2609.2/15241.html and
https://lkml.iu.edu/2609.3/09057.html)
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record (`b4 dig -w`): To/Cc were Luis Banha, tiwai@suse.com,
perex@perex.cz, linux-sound@vger.kernel.org, linux-
kernel@vger.kernel.org. Correct ALSA maintainers and list. Takashi
applied it.
Step 4.3: SEARCH FOR THE BUG REPORT
Record:
- No kernel.org bugzilla link in the commit
- Arch Linux forum thread “HP Pavilion Gaming Laptop 15-ec1xxx mute
button led issue” (2024-06): OP plus a second user with the same
model; `aplay -l` shows **ALC285 Analog**; existing `model=` strings
including `hp-mute-led-mic1/2/3` did not help (those map to older
`ALC269_FIXUP_HP_MUTE_LED_MICx`, not `ALC285_FIXUP_HP_MUTE_LED`)
- linux-hardware.org probe for Pavilion Gaming 15-ec1xxx confirms PCI
subsystem **103c:87b2**
- Same-family 15z-ec200 already uses this exact fixup in-tree
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Standalone v1. Not part of a multi-patch series. Sibling
15z-ec200 quirk already here.
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: lore.kernel.org/stable search for this subject/SSID returned no
relevant discussion (403 on direct lore fetch; web search of stable
archives found no prior NAK or exclusion). No evidence this was rejected
for stable.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: Table `alc269_fixup_tbl[]` only. Consumed by `alc269_probe()` →
`snd_hda_pick_fixup()`. Applied function: `alc285_fixup_hp_mute_led()`.
Step 5.2: TRACE CALLERS
Record:
- `alc269_probe()` (codec probe) calls `snd_hda_pick_fixup(...,
alc269_fixup_tbl, alc269_fixups)`
- Match is PCI subsystem vendor/device
- Context: device enumeration / module load, not IRQ/hot path
- Impact surface: only machines with SSID 103c:87b2
Step 5.3: TRACE CALLEES
Record: `alc285_fixup_hp_mute_led()` → COEF setup +
`snd_hda_gen_add_mute_led_cdev()` /
`snd_hda_gen_add_micmute_led_cdev()`. Registers LED class devices so
userspace mute state drives the hardware LED.
Step 5.4: FOLLOW THE CALL CHAIN
Record: PCI HDA probe → Realtek ALC269-family probe → quirk pick →
PRE_PROBE fixup. Reachable on every boot of this laptop. Not a syscall
fuzzer path; it is normal hardware init.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Multiple HP machines already use `ALC285_FIXUP_HP_MUTE_LED` in
this file (`0x8603`, `0x877a`, `0x8786/87/88`, `0x8896`, `0x88dd`,
`0x8902`). This is the established pattern for ALC285 HP mute LEDs.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record: Yes. Tree is 6.18.57. File `sound/hda/codecs/realtek/alc269.c`
exists. Parent of the candidate (`ce2e10f2403a4`) has no `0x87b2` entry
(`git show parent | rg 0x87b2` empty). `ALC285_FIXUP_HP_MUTE_LED` and
`alc285_fixup_hp_mute_led()` exist. Upstream SHA `775aa96c310d` is
**not** an ancestor of HEAD (expected: this is 6.18.y, patch is from
2026-09). The machine’s missing-ID bug exists here.
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record: Clean apply. Context around `0x8788` / `0x87b7` matches the
submitted diff. No structural conflict with this 6.18 tree. Reverse of
the one-line patch applies cleanly on current HEAD.
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: No other `0x87b2` quirk anywhere in the tree. 15z-ec200
(`0x88dd`) is a related SKU, not a substitute for 15-ec1xxx.
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: ALSA HD-audio Realtek codec (`sound/hda/codecs/realtek/`).
Criticality: **IMPORTANT** (very common laptop audio), but this change
is machine-specific.
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: Actively maintained; recent `alc269.c` history is mostly
additional `SND_PCI_QUIRK` mute-LED IDs. Mature driver, long-lived quirk
table. Takashi Iwai is the maintainer and applied this patch.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: Driver-specific / hardware-specific. Only HP Pavilion Gaming
15-ec1xxx (PCI SSID 103c:87b2), typically ALC285. Requires
`SND_HDA_CODEC_REALTEK`.
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: Every boot/probe on that laptop. Unprivileged users cannot
exploit it; they just see a dead mute LED. Independent user reports
exist (Arch forum, 2024).
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record: Mute (and mic-mute) LED does not follow mixer mute. No oops,
deadlock, or data corruption. Severity **MEDIUM** as a functional
hardware bug; still a real user-visible defect. Covered by the stable
**hardware quirk** exception.
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record:
- Benefit: high for owners of this 2020-era HP gaming laptop; enables
the LED that never worked on stock 6.18.
- Risk: very low (1 line, existing fixup, SSID-gated).
- Ratio: strongly favorable.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR:
- Hardware codec quirk (`SND_PCI_QUIRK`) on an existing driver —
explicit stable exception
- Real user-visible bug on a specific, identified laptop
- Existing `ALC285_FIXUP_HP_MUTE_LED` already used by same-family
15z-ec200 in this tree
- 1 insertion, no new APIs, no locking, no refactor
- Applied by ALSA maintainer Takashi Iwai
- Independent reports that 15-ec1xxx mute LED is broken on Linux/ALC285
- Applies cleanly to this 6.18.57 tree
AGAINST:
- Not a crash/security/corruption fix
- Author did not include Tested-by details or hda-verb dumps in the
commit (unlike some sibling LED quirks)
- Arch users did not confirm this exact fixup (they never had a model
string for it)
UNRESOLVED:
- Direct lore.kernel.org fetch was 403; discussion recovered via b4 +
LKML
- Could not independently re-test LED polarity on hardware
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? **PASS** — one SSID mapped to a long-
used HP ALC285 LED fixup; maintainer applied v1; same family already
uses it
2. Fixes a real bug that affects users? **PASS** — mute LED does not
work on 15-ec1xxx
3. Important issue? **PASS** under the hardware-quirk exception (codec
LED workaround). Not a panic, but stable routinely takes these
4. Small and contained? **PASS** — +1 line, one table
5. No new features or APIs? **PASS** — ID added to existing quirk table
6. Can apply to the local tree? **PASS** — file, enum, and neighboring
context all present on 6.18.57
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: **Hardware quirk / audio codec quirk** (`SND_PCI_QUIRK` in
Realtek HDA). Also analogous to “new device ID on an existing driver”:
the driver and fixup already exist; only the SSID is new.
Step 9.4: MAKE YOUR DECISION
This should be backported to this 6.18.57 tree. It is the standard
Realtek mute-LED ID addition: tiny, SSID-scoped, uses an existing fixup,
and restores hardware behavior for a real laptop that this tree already
supports.
===============================================================
What the commit solves, and why it matters here
===============================================================
On this 6.18 tree the Realtek ALC269-family driver already knows how to
drive HP ALC285 mute LEDs via COEF bits. The Pavilion Gaming 15-ec1xxx
simply was never listed, so probe never enables that path and the F-key
LED stays off. Adding `SND_PCI_QUIRK(0x103c, 0x87b2, ...,
ALC285_FIXUP_HP_MUTE_LED)` is the same class of stable backport as
USB/PCI/codec quirks: it does not add a driver or API, it only matches
known hardware to existing workaround code.
Risk is limited to that SSID. Benefit is restoring a user-visible LED on
a shipping laptop. The patch applies cleanly here.
Verification:
- [Phase 1] Parsed tags: author SOB Luis Banha; maintainer SOB Takashi
Iwai; msgid.link present; no Fixes/Reported-by/Cc: stable
- [Phase 1] Ignored pipeline `[ Upstream commit 775aa96c310d... ]` and
Sasha Levin SOB
- [Phase 2] Diff: +1 `SND_PCI_QUIRK` in `alc269_fixup_tbl[]` in
`sound/hda/codecs/realtek/alc269.c`
- [Phase 2] Read `alc285_fixup_hp_mute_led()` at alc269.c:1679 — COEF
mute + micmute LED setup
- [Phase 3] `git describe HEAD` / `make kernelversion`:
v6.18.57-155-gcdf239ca885b2 / 6.18.57
- [Phase 3] `git merge-base --is-ancestor 775aa96c310d HEAD`: exit 1
(upstream SHA not in this stable history, as expected)
- [Phase 3] Parent `ce2e10f2403a4` has no 0x87b2; has 15z-ec200 0x88dd
with the same fixup
- [Phase 3] `git merge-base --is-ancestor d75dba4974447 HEAD` and
`375f8426ed994 HEAD`: both 0 (related quirks exist here)
- [Phase 3] `git blame -L 6818,6822 HEAD`: 0x87b2 attributed to
candidate; neighbors from aeeb85f26c3bb
- [Phase 4] `b4 dig -c 775aa96c310d`: matched lore msgid
20260921230105.16844-1-luisbanha26@gmail.com
- [Phase 4] `b4 dig -a`: v1 only
- [Phase 4] `b4 dig -w`: tiwai, perex, linux-sound Cc’d
- [Phase 4] LKML: Takashi “Applied now. Thanks.” No NAK
- [Phase 4] Arch bbs.archlinux.org/viewtopic.php?id=296366: two users,
ALC285, dead mute LED
- [Phase 4] linux-hardware.org: 15-ec1xxx SSID 103c:87b2
- [Phase 4] lore.kernel.org direct fetch: 403; stable-list search: no
prior rejection found
- [Phase 5] Call chain: `alc269_probe()` → `snd_hda_pick_fixup(...,
alc269_fixup_tbl, ...)`
- [Phase 5] `git grep 0x87b2`: only this new quirk line
- [Phase 6] File/fixup/table all present; insertion context matches;
reverse-apply of the one-liner is clean
- [Phase 7] Subsystem: ALSA HDA Realtek, maintainer-applied
- [Phase 8] Failure mode: dead mute LED, SSID-scoped, very low
regression risk
- UNVERIFIED: hardware LED polarity not retested in this environment;
original lore HTML not fetched (403)
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 6afb35769f746..1fcf2ba795e8a 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -6822,6 +6822,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
+ SND_PCI_QUIRK(0x103c, 0x87b2, "HP Pavilion Gaming Laptop 15-ec1xxx", ALC285_FIXUP_HP_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x87b7, "HP Laptop 14-fq0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x87cb, "HP Pavilion 15-eg0xxx", ALC287_FIXUP_HP_GPIO_LED),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 15-eg3xxx (103c:8bfd)
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (56 preceding siblings ...)
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 15-ec1xxx Sasha Levin
@ 2026-10-19 13:52 ` Sasha Levin
2026-10-19 13:53 ` [PATCH AUTOSEL 6.18] ALSA: usb-audio: Release components on probe errors Sasha Levin
` (3 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:52 UTC (permalink / raw)
To: patches, stable
Cc: Jaidheer Sirigineedi, Takashi Iwai, Sasha Levin, perex, tiwai,
linux-sound, linux-kernel
From: Jaidheer Sirigineedi <jaidheer7@gmail.com>
[ Upstream commit 13dffca9043500ed6033d770b491a043fb952bc5 ]
The mute LED on the HP Pavilion Laptop 15-eg3xxx (PCI SSID 103c:8bfd,
Realtek ALC287) does not work because the machine has no entry in the
quirk table. No fixup is applied, so the mute LED is never driven, even
though the mute function itself works.
The LED is controlled via GPIO pin 4 (mask 0x10), which is exactly what
ALC287_FIXUP_HP_GPIO_LED configures. This was verified on the hardware
with hda-verb: setting the GPIO data bit lights the mute LED, and
clearing it turns the LED off.
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x10
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIRECTION 0x10
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x10 # LED on
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x00 # LED off
Add a quirk entry for 103c:8bfd using ALC287_FIXUP_HP_GPIO_LED.
Signed-off-by: Jaidheer Sirigineedi <jaidheer7@gmail.com>
Link: https://patch.msgid.link/20261002185951.33855-1-jaidheer7@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
Local tree is **6.18.57** (`v6.18.57-155-gcdf239ca885b2`). The Realtek
HDA driver, `alc269_fixup_tbl[]`, and `ALC287_FIXUP_HP_GPIO_LED` are all
present. This is a one-line SSID quirk for an existing fixup.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
Step 1.1: PARSE THE SUBJECT LINE
Record: [ALSA: hda/realtek] [Add] [mute LED quirk for HP Pavilion
15-eg3xxx PCI SSID 103c:8bfd]
Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
Record:
- Signed-off-by: Jaidheer Sirigineedi \<jaidheer7@gmail.com\> (author)
- Link:
https://patch.msgid.link/20261002185951.33855-1-jaidheer7@gmail.com
- Signed-off-by: Takashi Iwai \<tiwai@suse.de\> (ALSA maintainer)
- No Fixes:, Reported-by:, Tested-by:, Reviewed-by:, Acked-by:, or Cc:
stable (absence expected)
- Ignore: `[ Upstream commit 13dffca9043500ed6033d770b491a043fb952bc5 ]`
and Sasha Levin SOB (pipeline)
Step 1.3: ANALYZE THE COMMIT BODY TEXT
Record:
- Bug: HP Pavilion 15-eg3xxx (SSID 103c:8bfd, ALC287) has no quirk
entry, so no mute-LED fixup is applied
- Symptom: mute works, mute LED stays dead
- Root cause: LED is GPIO pin 4 (mask 0x10); `ALC287_FIXUP_HP_GPIO_LED`
already drives that GPIO
- Verification: author ran hda-verb SET_GPIO_MASK/DIRECTION/DATA 0x10 on
the machine
- Version info: none stated; bug is “missing table entry,” not a
regression from a recent commit
Step 1.4: DETECT HIDDEN BUG FIXES
Record: Not a hidden fix. It is an explicit hardware-quirk addition for
a non-working LED.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
Step 2.1: INVENTORY THE CHANGES
Record:
- File: `sound/hda/codecs/realtek/alc269.c` (+1 / -0)
- Function/table: `alc269_fixup_tbl[]`
- Scope: single-file, one-line surgical addition
Step 2.2: UNDERSTAND THE CODE FLOW CHANGE
Record:
- Before: SSID 103c:8bfd matches nothing; `snd_hda_pick_fixup()` leaves
the codec without this GPIO LED hook
- After: that SSID maps to `ALC287_FIXUP_HP_GPIO_LED`
- Path: codec probe / pre-probe only, SSID-matched
Step 2.3: IDENTIFY THE BUG MECHANISM
Record:
- Category: hardware workaround (quirk table entry)
- Mechanism: `alc287_fixup_hp_gpio_led()` calls
`alc_fixup_hp_gpio_led(codec, action, 0x10, 0)`, which sets GPIO mask
0x10 and registers a mute LED classdev. No mic-mute GPIO, no pin
rewrite, no amp change.
Step 2.4: ASSESS THE FIX QUALITY
Record:
- Obviously correct: reuses a long-lived fixup already used by Pavilion
15-eg0xxx (0x87cb, 0x87cc) in this tree
- Minimal: one `SND_PCI_QUIRK` line, table remains SSID-sorted (0x8bf0 →
0x8bfd → 0x8c15)
- Regression risk: only machines with SSID 103c:8bfd; wrong GPIO would
at worst mis-drive that LED, not other hardware. Author verified GPIO
0x10 on-device.
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
Step 3.1: BLAME THE CHANGED LINES
Record:
- Neighbor rows (0x8be5–0x8bf0, 0x8c15+) come from `aeeb85f26c3bbe`
(“ALSA: hda: Split Realtek HD-audio codec driver”, 2025-07-09)
- `ALC287_FIXUP_HP_GPIO_LED` enum and function also exist from that
split; they were not added by this commit
- The 8bfd line is new; parent `8fa1cfe41877d` has no `0x8bfd`
Step 3.2: FOLLOW THE FIXES: TAG
Record: No Fixes: tag. Not a regression from a specific commit; the
laptop never had a table entry.
Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
Record: Recent history is full of the same pattern already accepted
here, including:
- `8db3663d3c3e2` HP Pavilion 15-eg0xxx (same family, same
`ALC287_FIXUP_HP_GPIO_LED`)
- `66ab53f7fac5a` HP Pavilion 14-dv1001TU (same GPIO 0x10 / same fixup)
- Several other “Add mute LED quirk” commits on this file
Standalone; not patch X/Y.
Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
Record: Only this commit by Jaidheer Sirigineedi under
`sound/hda/codecs/realtek/`. SMTP hostname on the lore mail is
`jaidheer-eg3036tu` (Pavilion 15-eg3036tu). Takashi Iwai, ALSA
maintainer, applied it.
Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
Record: None. Needs only `ALC287_FIXUP_HP_GPIO_LED` /
`alc287_fixup_hp_gpio_led()`, both already in 6.18.57. Applies
standalone.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
Record:
- `b4 dig -c 13dffca9043500ed6033d770b491a043fb952bc5` →
https://patch.msgid.link/20261002185951.33855-1-jaidheer7@gmail.com
- `b4 dig -a`: single v1 series, no later revisions
- Thread: author patch + Takashi “Applied now. Thanks.” No NAK, no
requested changes, no stable discussion
- lore.kernel.org HTTP fetch returned 403; thread recovered via `b4 dig
-m`
Step 4.2: CHECK WHO REVIEWED THE PATCH
Record (`b4 dig -w`): To/Cc Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-kernel. Maintainer applied next day. No other review comments.
Step 4.3: SEARCH FOR THE BUG REPORT
Record: No bugzilla/syzbot link. Evidence is on-hardware hda-verb plus
the author’s own 15-eg3xxx machine. Severity from reporter: mute LED
dead; mute audio works.
Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
Record: Standalone v1. Sibling 15-eg0xxx quirk already in this tree
(`8db3663d3c3e2`). No series dependency.
Step 4.5: CHECK STABLE MAILING LIST HISTORY
Record: lore.kernel.org/stable HTTP 403. No local `git log --grep=8bfd`
hits besides this candidate. No evidence it was rejected for stable.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
Record: No function body changed. New table row consumed by
`snd_hda_pick_fixup()` in the ALC269/ALC287 probe path. Downstream:
`alc287_fixup_hp_gpio_led` → `alc_fixup_hp_gpio_led` → `alc_fixup_gpio`
/ `gpio_mute_led_set`.
Step 5.2: TRACE CALLERS
Record: `alc269_fixup_tbl` is passed at probe (`alc269.c` ~8557).
Reached when an ALC269-family Realtek codec (including ALC287) is
enumerated. Not IRQ/hot-path; once per codec init.
Step 5.3: TRACE CALLEES
Record: `alc_fixup_hp_gpio_led(..., 0x10, 0)` at PRE_PROBE sets GPIO
mask 0x10 and `snd_hda_gen_add_mute_led_cdev()`. micmute_mask is 0, so
no mic-mute LED hook.
Step 5.4: FOLLOW THE CALL CHAIN
Record: Userspace mute → LED classdev → GPIO data bit 0x10. Reachable on
this laptop whenever HDA mute LED is used. Unprivileged users can toggle
mute; they cannot affect other SSIDs.
Step 5.5: SEARCH FOR SIMILAR PATTERNS
Record: Same GPIO-0x10 / `ALC287_FIXUP_HP_GPIO_LED` pattern already used
for Pavilion 15-eg0xxx (0x87cb, 0x87cc), 14-dv1001TU (0x8987), Aero
13z-be200 (0x8bd6), and other HP SKUs.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
Record: Yes. `sound/hda/codecs/realtek/alc269.c` and
`alc269_fixup_tbl[]` exist. Parent of the candidate has no 0x8bfd.
Without this line, 103c:8bfd gets no mute-LED fixup. Introduced-as-
missing: the machine was never quirked; the driver/table have been in
6.18 since the Realtek split.
Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
Record: Clean apply. Context around 0x8bf0/0x8c15 matches. No rework
needed. (Mainline later grew extra nearby rows such as 0x8bc7; those are
not required here.)
Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
Record: No other 8bfd entry. 15-eg0xxx is already quirked with the same
fixup; that does not cover 15-eg3xxx (different SSID).
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
Record: ALSA HD-audio Realtek (`sound/hda/codecs/realtek/`). IMPORTANT
for laptop audio; PERIPHERAL in that only SSID 103c:8bfd is affected.
Config: `SND_HDA_CODEC_REALTEK` (default on typical x86
desktops/laptops).
Step 7.2: ASSESS SUBSYSTEM ACTIVITY
Record: Actively receiving per-SKU quirk additions. This is the normal,
mature way this driver enables hardware.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
Step 8.1: DETERMINE WHO IS AFFECTED
Record: Driver-specific / platform-specific: HP Pavilion 15-eg3xxx with
PCI SSID 103c:8bfd only.
Step 8.2: DETERMINE THE TRIGGER CONDITIONS
Record: Every boot on that laptop: mute LED never driven. Mute key still
works. Unprivileged user can observe the broken LED.
Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
Record: Incorrect hardware behavior (mute LED stuck off). Severity LOW
versus crash/corruption, but this is a documented hardware-quirk
exception, not a crash-class bug.
Step 8.4: CALCULATE RISK-BENEFIT RATIO
Record:
- Benefit: restores mute LED on a shipping HP Pavilion SKU; same class
of fix already shipped in this 6.18.y tree many times
- Risk: very low (1 line, existing fixup, SSID-matched)
- Ratio: favorable
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
Step 9.1: COMPILE THE EVIDENCE
FOR:
- Hardware quirk for a real laptop, hardware-verified with hda-verb
- Reuses existing `ALC287_FIXUP_HP_GPIO_LED` (GPIO 0x10), same as
Pavilion 15-eg0xxx already in this tree
- 1 line, no new API, no new driver, no locking/refcount change
- ALSA maintainer applied v1 with no objections
- Applies cleanly to 6.18.57; all callees exist
- Sibling mute-LED quirks are routinely accepted in this tree
AGAINST:
- Does not fix crash, UAF, deadlock, or data corruption
- Affects one SSID only
- No Fixes:/Cc: stable (expected; not a negative)
UNRESOLVED:
- lore.kernel.org/stable HTTP search blocked (403); no sign of a prior
rejection
Step 9.2: APPLY THE STABLE RULES CHECKLIST
1. Obviously correct and tested? PASS — existing fixup; hda-verb on
hardware; maintainer applied
2. Fixes a real bug that affects users? PASS — mute LED never driven on
this SKU
3. Important issue? PASS under the hardware-quirk exception (not a
crash-class bug)
4. Small and contained? PASS — +1 line in one table
5. No new features or APIs? PASS — table entry only
6. Can apply to the local tree? PASS — file, table, and fixup all
present; context matches
Step 9.3: CHECK FOR EXCEPTION CATEGORIES
Record: Hardware quirk / workaround (SND_PCI_QUIRK for an existing
Realtek HDA driver). This is an allowed stable exception.
Step 9.4: MAKE YOUR DECISION
This should be backported to this 6.18.57 tree. It is the standard one-
line Realtek mute-LED quirk, the target fixup already exists here, and
the only users touched are those with PCI SSID 103c:8bfd.
What it solves for stable users: on HP Pavilion 15-eg3xxx the mute key
works but the LED never lights because probe never applies the GPIO-4
LED hook. Adding 103c:8bfd → `ALC287_FIXUP_HP_GPIO_LED` enables that
existing path.
Risk vs benefit: benefit is a working LED on a real laptop; risk is a
single SSID-guarded line using a well-used helper. No dependencies
beyond code already in 6.18.
Verification:
- [Phase 1] Parsed tags: author SOB, Link to msgid, Takashi Iwai SOB; no
Fixes/Reported-by/Cc: stable
- [Phase 2] Diff: +1 `SND_PCI_QUIRK(0x103c, 0x8bfd, ...
ALC287_FIXUP_HP_GPIO_LED)` in `alc269_fixup_tbl`
- [Phase 2] Read `alc287_fixup_hp_gpio_led()` at alc269.c:1386 — calls
`alc_fixup_hp_gpio_led(..., 0x10, 0)`
- [Phase 2] Read `alc_fixup_hp_gpio_led()` in realtek.c:2223 — GPIO
setup + mute LED cdev only
- [Phase 3] `git describe HEAD` / `make kernelversion`:
v6.18.57-155-gcdf239ca885b2 / 6.18.57
- [Phase 3] `git grep 0x8bfd` on parent `8fa1cfe41877d`: not present
(bug exists without this commit)
- [Phase 3] Blame: `ALC287_FIXUP_HP_GPIO_LED` from `aeeb85f26c3bbe` (in
this tree)
- [Phase 3] Sibling 15-eg0xxx entries at alc269.c:6823–6824 use the same
fixup
- [Phase 3] `git merge-base --is-ancestor
13dffca9043500ed6033d770b491a043fb952bc5 HEAD`: not an ancestor
(upstream SHA not in this history; expected)
- [Phase 4] `b4 dig -c 13dffca9…`: lore thread found; v1 only
- [Phase 4] `b4 dig -w`: To Takashi Iwai, Jaroslav Kysela, linux-sound
- [Phase 4] `b4 dig -m`: Takashi reply “Applied now. Thanks.” No NAK
- [Phase 4] WebFetch/curl of lore.kernel.org: 403 — used b4 mbox instead
- [Phase 5] Probe path: `snd_hda_pick_fixup(..., alc269_fixup_tbl, ...)`
at alc269.c:8557
- [Phase 6] File path `sound/hda/codecs/realtek/alc269.c` exists; apply
context matches 0x8bf0/0x8c15
- [Phase 8] Failure mode: mute LED inert on one HP SKU; severity LOW,
exception category applies
- UNVERIFIED: stable@ lore search (HTTP 403)
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 0bfa64bee9d3b..a25c92834e722 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -7010,6 +7010,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8be8, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8be9, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8bf0, "HP", ALC236_FIXUP_HP_GPIO_LED),
+ SND_PCI_QUIRK(0x103c, 0x8bfd, "HP Pavilion 15-eg3xxx", ALC287_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8c15, "HP Spectre x360 2-in-1 Laptop 14-eu0xxx", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX),
SND_PCI_QUIRK(0x103c, 0x8c16, "HP Spectre x360 2-in-1 Laptop 16-aa0xxx", ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX),
SND_PCI_QUIRK(0x103c, 0x8c17, "HP Spectre x360 2-in-1 Laptop 16-aa0xxx", ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18] ALSA: usb-audio: Release components on probe errors
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (57 preceding siblings ...)
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 15-eg3xxx (103c:8bfd) Sasha Levin
@ 2026-10-19 13:53 ` Sasha Levin
2026-10-19 13:53 ` [PATCH AUTOSEL 6.18-5.10] ASoC: hdac_hdmi: Fix resource cleanup on probe failure Sasha Levin
` (2 subsequent siblings)
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:53 UTC (permalink / raw)
To: patches, stable
Cc: Cen Zhang, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Cen Zhang <zzzccc427@gmail.com>
[ Upstream commit 3213bf9885e3356fff12ac18b12d4c2fb4687734 ]
usb_audio_probe() can create USB-audio component resources before the
first interface is recorded in chip->num_interfaces. If a later probe
step fails, the error path drops chip->active and frees the card directly
when no interfaces have been registered.
Normal disconnect first releases USB-audio components in a fixed order
before the card is freed. The first-interface probe error path skipped
that sequence, so partially initialized PCM, endpoint, MIDI, media, or
mixer resources could be left for the card private_free path without their
disconnect handling having run.
Move the existing normal-disconnect component release sequence into a
helper and call it from the zero-interface probe error path before
snd_card_free(). Keep the normal disconnect ordering unchanged: PCM
streams, endpoint resources, MIDI 1.0 resources, MIDI 2.0 resources, media
device cleanup, then mixer resources.
Assisted-by: Codex:gpt-5.5
Signed-off-by: Cen Zhang <zzzccc427@gmail.com>
Link: https://patch.msgid.link/20260618170026.192212-1-zzzccc427@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
The first-interface probe error path in this 6.18 tree still skips
disconnect teardown, so live mixer/MIDI URBs can outlive card devices.
That is a real UAF window, not just cleanup.
## Phase 1: Commit message forensics
**Step 1.1:** Record: `[ALSA/usb-audio] [Release] [On first-interface
probe failure, run the normal USB-audio component disconnect sequence
before snd_card_free()]`
**Step 1.2:** Record: tags present:
- `Assisted-by: Codex:gpt-5.5`
- `Signed-off-by: Cen Zhang <zzzccc427@gmail.com>` (author)
- `Link:
https://patch.msgid.link/20260618170026.192212-1-zzzccc427@gmail.com`
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` (ALSA maintainer applied
it)
- No `Fixes:`, `Reported-by:`, `Tested-by:`, `Cc: stable` (absence
expected for this review)
- Ignore pipeline `Signed-off-by: Sasha Levin` / `[Upstream commit ...]`
**Step 1.3:** Record: `[Bug] first-interface probe can create
PCM/endpoint/MIDI/media/mixer state before chip->num_interfaces is
incremented; a later failure goes to __error_no_register and calls
snd_card_free() when num_interfaces==0. [Symptom] those objects skip the
disconnect sequence used on unplug (URB kill, endpoint release,
MIDI/media/mixer disconnect) and are left to card private_free.
[Versions] none given; code is longstanding. [Root cause] probe error
path is not equivalent to __usb_audio_disconnect().`
**Step 1.4:** Record: `[Not a disguised cleanup.] The message describes
a real teardown skip. Extracting a helper is only so the existing
disconnect sequence can be reused on that error path.`
## Phase 2: Diff analysis
**Step 2.1:** Record: `[sound/usb/card.c, ~+38/-32] [new
usb_audio_disconnect_components(); usb_audio_probe() error path;
__usb_audio_disconnect()] [single-file surgical refactor of existing
teardown + one extra call site]`
**Step 2.2:** Record:
- Hunk 1: identical PCM → endpoint → MIDI 1.0 → MIDI 2.0 → media → mixer
release moved from `__usb_audio_disconnect()` into
`usb_audio_disconnect_components()`.
- Hunk 2: `__error_no_register` with `!chip->num_interfaces` used to
call only `snd_card_free()`; it now calls the helper first.
- Hunk 3: normal disconnect still does shutdown wait +
`snd_card_disconnect()`, then the helper. Ordering of component
release is unchanged.
**Step 2.3:** Record: `[Error-path resource teardown / UAF] Probe
creates live USB resources before claiming an interface.
snd_usb_create_streams() can start MIDI 2.0 input URBs;
snd_usb_create_mixer() submits mixer interrupt URBs. Those stay live
until disconnect. On first-interface failure, snd_card_free() runs
snd_device_free_all() (UMP/rawmidi, mixer, PCM) and only then
card->private_free (snd_usb_audio_free → snd_usb_midi_v2_free_all /
endpoint kfree). Completions can still run against objects already
freed. The helper kills/disconnects them first, matching unplug.`
**Step 2.4:** Record: `[Quality: high]` The helper is the existing,
battle-tested disconnect body. Disconnect callbacks are already
idempotent (`disconnected` flags; `snd_media_stream_delete()` NULL-
guards). `[Regression risk: low]` Probe holds `register_mutex` already;
usage_count should be zero because the card is not registered. Mainline
uses `snd_refcount_sync()`; this 6.18 tree still uses
`wait_event(chip->shutdown_wait, ...)`, and the candidate as applied
here keeps that. No API change.
## Phase 3: Git history
**Step 3.1:** Record: `[Buggy error path] 61a6a108d15213 (Thomas Pfaff,
2011) — if (!chip->num_interfaces) snd_card_free(). [Disconnect
sequence] e5779998bf8b70 (2010) plus later MIDI2/media additions
(ff49d1df79aef 2023, 66354f18fe5fbb 2019). Present for the entire 6.18
lifetime.`
**Step 3.2:** Record: `[No Fixes: tag.] The skip is old, not a recent
regression.`
**Step 3.3:** Record: related commits on this tree:
- `4c16176fc11a6` “Kill MIDI 2.0 URBs before freeing endpoints” (same
author, same day) — already in this tree. Fixes MIDI2 **create-
internal** error (`snd_usb_midi_v2_free()`). It does **not** kill URBs
before `snd_card_free()` when create succeeded and a later probe step
failed.
- `5f8cf71258261` (2018) UAF on this same `num_interfaces==0` path (use-
after-free of chip->active) — shows this error path has been a real
UAF site before.
- `6d3e202670b81` resume cleanup — unrelated.
Standalone besides sharing the MIDI2 theme with 4c16176fc11a6; not patch
N/M.
**Step 3.4:** Record: `[Author] Cen Zhang, recent ALSA usb-audio/seq
contributor; not the maintainer. [Maintainer] Takashi Iwai applied it.
Sibling MIDI2 UAF fix from the same author already went to this stable
tree.`
**Step 3.5:** Record: `[Dependencies] All callees exist at v6.18:
snd_usb_stream_disconnect, snd_usb_endpoint_release,
snd_usbmidi_disconnect, snd_usb_midi_v2_disconnect_all,
snd_media_device_delete, snd_usb_mixer_disconnect. No snd_refcount_sync
requirement in this tree. Can apply standalone.`
## Phase 4: Mailing list / external
**Step 4.1:** Record: `[Lore]
https://patch.msgid.link/20260618170026.192212-1-zzzccc427@gmail.com`
via `b4 dig -c 3213bf9885e3356fff12ac18b12d4c2fb4687734`. `[Revisions]
v1 only. [Review] Takashi Iwai 2026-06-29: “Applied to for-next branch
now. Thanks.” No NAK, no requested changes, no stable nomination in-
thread.`
**Step 4.2:** Record: `[Recipients from b4 dig -w] Cen Zhang, Jaroslav
Kysela, Takashi Iwai, linux-sound, linux-kernel, baijiaju1990@gmail.com.
Subsystem maintainers were on the original To/Cc.`
**Step 4.3:** Record: `[No Reported-by / syzbot / bugzilla on this
commit.] The same-day sibling MIDI2 commit documented KASAN slab-UAF in
input_urb_complete() on a probe error path; that is the same class of
bug, different call site.`
**Step 4.4:** Record: `[Related] MIDI2 URB-kill patch (msgid
20260618170010.191433-1), submitted ~16s earlier, already in this tree.
This patch is still needed for the successful-create-then-later-probe-
fail path.`
**Step 4.5:** Record: `[stable list] Not searched successfully via
WebFetch (lore 403). b4 thread has no stable discussion. UNVERIFIED: no
evidence this was NAK’d for stable.`
## Phase 5: Code semantic analysis
**Step 5.1:** Record: `[usb_audio_disconnect_components (new),
usb_audio_probe, __usb_audio_disconnect]`
**Step 5.2:** Record: `usb_audio_probe` is `usb_audio_driver.probe` —
USB enumeration / hub_event. `__usb_audio_disconnect` is the unplug
path. The new helper is also used from that path. High-frequency driver;
CONFIG_SND_USB_AUDIO is common.
**Step 5.3:** Record: helper calls `snd_usb_stream_disconnect` (NULL
endpoint pointers), `snd_usb_endpoint_release` → `release_urbs()`,
`snd_usbmidi_disconnect` (kill MIDI1 URBs),
`snd_usb_midi_v2_disconnect_all` (set disconnected, kill/drain MIDI2
URBs), `snd_media_device_delete`, `snd_usb_mixer_disconnect`
(`usb_kill_urb` on mixer/rc URBs).
**Step 5.4:** Record: `[Reachable] Plug a USB audio/MIDI device whose
first interface creates streams/mixer/MIDI, then a later probe step
fails (bad descriptor, mixer fail, snd_card_register fail, device
yanked). No extra ioctl required. MIDI2 `start_input_streams()` runs
inside `snd_usb_midi_v2_create()` from `snd_usb_create_stream()` before
mixer/register. Mixer `usb_submit_urb(mixer->urb)` runs in mixer create
before register.`
**Step 5.5:** Record: Same-day MIDI2 free-path UAF fix; historical UAF
on this exact `num_interfaces==0` free path; other USB sound probe-error
URB leaks (caiaq, line6). Pattern is systematic: probe error must stop
URBs before freeing the card.
## Phase 6: Local tree (6.18.y)
**Step 6.1:** Record: `[Local tree] v6.18.53 (`git describe HEAD` =
v6.18.53-5049-g0f0bdc2b0dffb). `[Buggy code at v6.18] sound/usb/card.c
__error_no_register: atomic_dec(&chip->active); if
(!chip->num_interfaces) snd_card_free(chip->card);` with no component
disconnect. MIDI2 create/start-input and mixer URB submit exist at
v6.18.`
**Step 6.2:** Record: `[Backport difficulty: clean / already matching
this tree.] The only mainline delta vs 6.18 is `snd_refcount_sync()` vs
`wait_event(...)` in the disconnect wait, which this tree correctly
keeps. Helper callees and list fields (`pcm_list`, `ep_list`,
`midi_list`, `mixer_list`) are present.`
**Step 6.3:** Record: `[4c16176fc11a6 is already here]` and does not
replace this fix. No other equivalent probe-error disconnect helper.
## Phase 7: Subsystem context
**Step 7.1:** Record: `[sound/usb-audio] [IMPORTANT]` — default USB
sound driver on desktops, laptops, docks, headsets; not staging.
**Step 7.2:** Record: `[Mature driver, still active.] USB MIDI 2.0
(2023) increased the cost of skipping disconnect, because input URBs now
start at create, not at open.`
## Phase 8: Impact and risk
**Step 8.1:** Record: `[driver-specific, but a very widely used driver]`
CONFIG_SND_USB_AUDIO users; worse on MIDI 2.0 devices.
**Step 8.2:** Record: `[Trigger] first-interface usb_audio_probe()
failure after streams/mixer/MIDI construction. [Likelihood] not every
boot, but ordinary for flaky/unplug-during-enum/bad-descriptor devices.
[Unprivileged] plugging USB audio is enough; no extra privilege needed
for the URB/completion race.`
**Step 8.3:** Record: `[Failure] use-after-free / use-during-teardown
from in-flight mixer or MIDI2 URBs while snd_card_free() runs
snd_device_free_all() (UMP/rawmidi private_free, mixer kctl, then chip
private_free). Confirmed mechanism: input_urb_complete() →
snd_ump_receive(ep->ump) while UMP is an snd_device freed before chip
private_free. [Severity: HIGH]` crash or memory corruption on probe
failure; same class as the already-backported MIDI2 KASAN UAF.
**Step 8.4:** Record: `[Benefit: high] closes a real probe-error UAF
window on a common driver. [Risk: low] ~one extra call of existing
disconnect code, idempotent vs later free. [Ratio: favorable]`
## Phase 9: Synthesis
**Step 9.1:**
- FOR: real bug; first-interface probe error skips disconnect; MIDI2
URBs and mixer interrupt URBs are live then; snd_card_free frees ALSA
devices before chip private_free; helper is existing disconnect code;
small; maintainer applied v1; helpers exist in 6.18; sibling MIDI2 fix
does not cover this ordering.
- AGAINST: no Fixes/Reported-by/syzbot on this exact commit; AI-
assisted; some objects also self-disconnect in their destructors
(mixer_free, snd_usbmidi_free), so not every component crashes every
time.
- UNRESOLVED: lore.kernel.org HTTP 403 via WebFetch; no independent
stable-list thread found.
**Step 9.2:** Stable rules:
1. Obviously correct and tested? **PASS** — move-existing-sequence +
maintainer applied.
2. Real user-visible bug? **PASS** — probe-error UAF/teardown skip on
USB audio.
3. Important (crash/UAF)? **PASS** — HIGH; in-flight URB vs card free.
4. Small/contained? **PASS** — one file, ~70-line net-neutral extract +
2-line call.
5. No new features/APIs? **PASS**
6. Applies to this tree? **PASS** — bug and callees present at v6.18;
wait_event form already matches.
**Step 9.3:** Record: `[Not an exception category; it is a normal error-
path UAF/resource-teardown fix.]`
**Step 9.4:** Backport to this 6.18.y tree on technical merit.
### Why it matters here
`usb_audio_probe()` can build PCM, endpoints, MIDI (including MIDI 2.0
input URBs) and mixer status URBs before `chip->num_interfaces++`. If
that first probe fails, 6.18 only does `snd_card_free()`. ALSA then
frees rawmidi/UMP and mixer devices while USB completions can still run,
and only afterwards runs `snd_usb_audio_free()`. Unplug already stops
those components first; probe error did not.
### Risk vs benefit
Benefit is avoiding oops/UAF when USB audio probe fails. Risk is low:
the helper is the current disconnect body, and free paths already
tolerate a prior disconnect.
### Concerns
Mainline’s `snd_refcount_sync()` is not in 6.18; it must keep
`wait_event`. That is already how this tree’s disconnect path looks, so
no extra prerequisite. The earlier MIDI2 URB-kill backport is necessary
but not sufficient.
Verification:
- [Phase 1] Parsed subject/body/tags: no Fixes/Reported-by; maintainer
SOB; Codex assisted
- [Phase 2] Diff: helper extracted from `__usb_audio_disconnect`, called
from `!num_interfaces` probe error before `snd_card_free()`
- [Phase 2] Confirmed mixer URB submit at create
(`usb_submit_urb(mixer->urb)` in mixer.c); MIDI2
`start_input_streams()` during `snd_usb_midi_v2_create()`
- [Phase 2] Confirmed `snd_card` release: `snd_device_free_all()` then
`card->private_free`; UMP is a rawmidi snd_device
- [Phase 2] Confirmed `input_urb_complete()` uses `ep->ump` unless
`ep->disconnected`
- [Phase 3] `git blame` on pre-fix error path: 61a6a108d15213 (2011)
- [Phase 3] `git merge-base --is-ancestor 4c16176fc11a6 HEAD` — sibling
MIDI2 UAF fix is in this tree and does not call disconnect before
`snd_card_free()`
- [Phase 3] Historical UAF on same path: 5f8cf71258261
- [Phase 4] `b4 dig -c 3213bf9885e3356fff12ac18b12d4c2fb4687734` → msgid
20260618170026.192212-1; v1 only; Iwai applied; To/Cc linux-sound +
Iwai + Kysela
- [Phase 4] WebFetch lore/msgid.link returned 403; discussion recovered
via `b4 dig -m`
- [Phase 5] `usb_audio_probe` is the usb_driver probe; MIDI created from
`snd_usb_create_stream()`
- [Phase 6] `git describe HEAD` = v6.18.53-5049-g0f0bdc2b0dffb; `make
kernelversion` = 6.18.53
- [Phase 6] `git grep error_no_register v6.18 -- sound/usb/card.c` shows
bare `snd_card_free` with no disconnect
- [Phase 6] v6.18 has `snd_usb_midi_v2_disconnect_all` and
`snd_usb_endpoint_release`
- [Phase 8] Failure mode: UAF from live MIDI2/mixer URBs during
`snd_card_free()`, severity HIGH
- UNVERIFIED: stable@ mailing list thread (lore HTTP 403)
**YES**
sound/usb/card.c | 70 ++++++++++++++++++++++++++----------------------
1 file changed, 38 insertions(+), 32 deletions(-)
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 85249606a6b18..d8e096f71412a 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -904,6 +904,40 @@ static int try_to_register_card(struct snd_usb_audio *chip, int ifnum)
return 0;
}
+static void usb_audio_disconnect_components(struct snd_usb_audio *chip)
+{
+ struct snd_usb_stream *as;
+ struct snd_usb_endpoint *ep;
+ struct usb_mixer_interface *mixer;
+ struct list_head *p;
+
+ /* release the pcm resources */
+ list_for_each_entry(as, &chip->pcm_list, list) {
+ snd_usb_stream_disconnect(as);
+ }
+ /* release the endpoint resources */
+ list_for_each_entry(ep, &chip->ep_list, list) {
+ snd_usb_endpoint_release(ep);
+ }
+ /* release the midi resources */
+ list_for_each(p, &chip->midi_list) {
+ snd_usbmidi_disconnect(p);
+ }
+ snd_usb_midi_v2_disconnect_all(chip);
+ /*
+ * Nice to check quirk && quirk->shares_media_device and
+ * then call the snd_media_device_delete(). Don't have
+ * access to the quirk here. snd_media_device_delete()
+ * accesses mixer_list
+ */
+ snd_media_device_delete(chip);
+
+ /* release mixer resources */
+ list_for_each_entry(mixer, &chip->mixer_list, list) {
+ snd_usb_mixer_disconnect(mixer);
+ }
+}
+
/*
* probe the active usb device
*
@@ -1076,8 +1110,10 @@ static int usb_audio_probe(struct usb_interface *intf,
* decrement before memory is possibly returned.
*/
atomic_dec(&chip->active);
- if (!chip->num_interfaces)
+ if (!chip->num_interfaces) {
+ usb_audio_disconnect_components(chip);
snd_card_free(chip->card);
+ }
}
return err;
}
@@ -1090,49 +1126,19 @@ static bool __usb_audio_disconnect(struct usb_interface *intf,
struct snd_usb_audio *chip,
struct snd_card *card)
{
- struct list_head *p;
-
guard(mutex)(®ister_mutex);
if (platform_ops && platform_ops->disconnect_cb)
platform_ops->disconnect_cb(chip);
if (atomic_inc_return(&chip->shutdown) == 1) {
- struct snd_usb_stream *as;
- struct snd_usb_endpoint *ep;
- struct usb_mixer_interface *mixer;
-
/* wait until all pending tasks done;
* they are protected by snd_usb_lock_shutdown()
*/
wait_event(chip->shutdown_wait,
!atomic_read(&chip->usage_count));
snd_card_disconnect(card);
- /* release the pcm resources */
- list_for_each_entry(as, &chip->pcm_list, list) {
- snd_usb_stream_disconnect(as);
- }
- /* release the endpoint resources */
- list_for_each_entry(ep, &chip->ep_list, list) {
- snd_usb_endpoint_release(ep);
- }
- /* release the midi resources */
- list_for_each(p, &chip->midi_list) {
- snd_usbmidi_disconnect(p);
- }
- snd_usb_midi_v2_disconnect_all(chip);
- /*
- * Nice to check quirk && quirk->shares_media_device and
- * then call the snd_media_device_delete(). Don't have
- * access to the quirk here. snd_media_device_delete()
- * accesses mixer_list
- */
- snd_media_device_delete(chip);
-
- /* release mixer resources */
- list_for_each_entry(mixer, &chip->mixer_list, list) {
- snd_usb_mixer_disconnect(mixer);
- }
+ usb_audio_disconnect_components(chip);
}
if (chip->quirk_flags & QUIRK_FLAG_DISABLE_AUTOSUSPEND)
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.10] ASoC: hdac_hdmi: Fix resource cleanup on probe failure
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (58 preceding siblings ...)
2026-10-19 13:53 ` [PATCH AUTOSEL 6.18] ALSA: usb-audio: Release components on probe errors Sasha Levin
@ 2026-10-19 13:53 ` Sasha Levin
2026-10-19 13:53 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/conexant: Add NULL check for dc_mode_path Sasha Levin
2026-10-19 13:53 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Fix headset mic on ASUS Vivobook S14 S5406SA Sasha Levin
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:53 UTC (permalink / raw)
To: patches, stable
Cc: Haoxiang Li, Mark Brown, Sasha Levin, lgirdwood, perex, tiwai,
linux-sound, linux-kernel
From: Haoxiang Li <haoxiang_li2024@163.com>
[ Upstream commit 785903b7770f19ea05b8a76081dff691c56fa771 ]
hdac_hdmi_dev_probe() gets the HDA link before allocating and
initializing the HDMI codec private data. Several later error
paths return directly without dropping the link reference,
leaving the hlink refcount unbalanced.
Release the link reference on probe failures. Also turn display
power off if the failure happens after it has been enabled.
This issue was dicussed in:
https://lore.kernel.org/all/s5h1s0esk8o.wl-tiwai@suse.de/
I think the paths fixed here are probe failure paths: the device
has not been fully initialized or bound, and runtime PM suspend
cannot be relied on to balance the reference taken during probe.
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Link: https://patch.msgid.link/20260622151127.1198196-1-haoxiang_li2024@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
This is a small probe-error-path leak fix in the Intel HDMI HDAC codec.
The buggy code is present in this 6.18.53 tree, the change is surgical,
and it should be backported.
## Phase 1: Commit message forensics
**Step 1.1 — Subject**
Record: `[ASoC / hdac_hdmi] [Fix] resource cleanup on probe failure`
**Step 1.2 — Tags**
Record:
- No `Fixes:` tag (expected for this review queue)
- No `Reported-by:`, `Tested-by:`, `Reviewed-by:`, `Acked-by:`, or `Cc:
stable`
- `Link: https://patch.msgid.link/20260622151127.1198196-1-
haoxiang_li2024@163.com`
- Body also cites `https://lore.kernel.org/all/s5h1s0esk8o.wl-
tiwai@suse.de/` (Takashi Iwai, 2019)
- `Signed-off-by: Haoxiang Li` (author)
- `Signed-off-by: Mark Brown <broonie@kernel.org>` (ASoC maintainer)
- Ignore pipeline `Signed-off-by: Sasha Levin` and `[Upstream commit
785903b7770f...]`
**Step 1.3 — Body**
Record:
- **Bug:** `hdac_hdmi_dev_probe()` takes an HDAC link ref
(`snd_hdac_ext_bus_link_get`) then returns on later errors without
`snd_hdac_ext_bus_link_put`. After `snd_hdac_display_power(...,
true)`, parse failure also leaves display power held.
- **Symptom:** Unbalanced `hlink->ref_count` (link stays powered) and
possibly a stuck i915/display audio power well.
- **Root cause (author):** Probe-failure paths never bind the driver, so
runtime PM suspend cannot drop the probe-time ref.
- **Version info:** None in the message. History puts the leak in this
driver since link management was added (~v4.7).
**Step 1.4 — Hidden bug fix?**
Record: Not hidden. Explicit leak fix on error paths.
## Phase 2: Diff analysis
**Step 2.1 — Inventory**
Record:
- File: `sound/soc/codecs/hdac_hdmi.c` (+8 / −2)
- Function: `hdac_hdmi_dev_probe()`
- Scope: single-file surgical error-path fix
**Step 2.2 — Flow change**
Record (verified against v6.18.53 and the patch):
1. After `snd_hdac_ext_bus_link_get()`:
- **ENOMEM** (`devm_kzalloc` fails): was `return -ENOMEM` → now
`link_put` then return
- **`!hdac_id`:** was `return -ENODEV` → now `link_put` then return
- **`hdac_hdmi_parse_and_map_nid()` fails:** was log + `return ret`
after `snd_hdac_display_power(..., true)` → now `link_put` +
`snd_hdac_display_power(..., false)` then return
2. Success / `devm_snd_soc_register_component` path already did
`link_put`. Unchanged.
**Step 2.3 — Bug mechanism**
Record: **Error-path resource leak** (link refcount + display power
ref). `snd_hdac_ext_bus_link_get()` increments `hlink->ref_count` and
powers the link at 0→1. Matching `put` powers it down at 1→0. Probe
failure skipped that put. `snd_hdac_display_power(..., true)` sets
`display_power_status` and may call DRM `get_power`; without `false`,
that well can stay on.
**Step 2.4 — Fix quality**
Record: Obviously correct: every new `put`/`display_power(false)` is on
a path that already took the matching get/enable and does not reach the
existing success-path `put`. No API/lock/structure changes. Remaining
gap (not introduced here): if `devm_snd_soc_register_component()` fails,
`link_put` already runs but display power is still left on. That does
not make this patch wrong.
## Phase 3: Git history
**Step 3.1 — Blame**
Record:
- Link get in this probe: `b2047e996cd88` (“ASoC: hdac_hdmi: add link
management”), contained in **v4.7-rc1**. Error returns after get were
already unbalanced.
- Display power enable: `4f799e734094f0` (Takashi Iwai), contained in
**v5.0-rc1**.
- Buggy pattern has been in this file for many years, including this
6.18.y tree.
**Step 3.2 — Fixes: tag**
Record: None. Introducer is `b2047e996cd88` (link get without error-path
put). That commit is an ancestor of this tree.
**Step 3.3 — File history**
Record: Recent `hdac_hdmi.c` work is lock `guard()` conversion, enum
validation, logging. No prerequisite refactor for this fix. `git diff
v6.18.53 0754884332e60^ -- sound/soc/codecs/hdac_hdmi.c` is empty: probe
text at v6.18.53 matches the pre-patch parent.
**Step 3.4 — Author**
Record: Haoxiang Li has several ASoC probe-leak fixes here, including
`e8ea01a045708` (“ASoC: hdac_hda: Fix hlink refcount leak on component
registration failure”), which **did** carry `Fixes:` + `Cc: stable` and
is already in this tree. Same bug class, sibling driver.
**Step 3.5 — Dependencies**
Record: None. Uses existing `snd_hdac_ext_bus_link_put` /
`snd_hdac_display_power`. Standalone.
## Phase 4: Mailing list / external
**Step 4.1 — Original thread**
Record:
- `b4 dig -c 785903b7770f`: https://patch.msgid.link/20260622151127.1198
196-1-haoxiang_li2024@163.com
- Single revision (v1 only, `-a`)
- Thread: patch + Mark Brown apply to `for-7.3`. No NAK, no requested
respin.
**Step 4.2 — Recipients (`b4 dig -w`)**
Record: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Cirrus, Kuninori Morimoto, `linux-sound`, `linux-kernel`. Right
ASoC/ALSA maintainers.
**Step 4.3 — Cited 2019 discussion**
Record: MARC copy of `s5h1s0esk8o.wl-tiwai@suse.de` (2019-05-31).
Ranjani Sridharan noted hdac_hdmi had a similar unbalanced link ref.
Takashi said hdac_hdmi is different because it balances via runtime PM
(put in suspend, get in resume), and he was unsure about removal vs
suspend. He called the code “a bit too fragile.” This 2026 patch
correctly treats **probe failure** as unbound, so runtime suspend cannot
be assumed. That matches `hdmi_codec_probe()`, which documents relying
on `pm_runtime_put` only after a successful component probe.
**Step 4.4 — Series**
Record: Standalone `[PATCH]`, not `n/m`. Sibling hdac_hda leak fix sent
the same day.
**Step 4.5 — stable@**
Record: **UNVERIFIED** (lore.kernel.org returns 403 here). No stable
nomination in the saved mbox.
## Phase 5: Code semantics
**Step 5.1 — Functions**
Record: `hdac_hdmi_dev_probe()` only.
**Step 5.2 — Callers**
Record: `hdmi_driver.probe`, registered by `hdmi_init()` →
`snd_hda_ext_driver_register()`. Runs on HDAC enumeration of Intel HDMI
IDs 0x80862809–0x8086280d (Skylake / Broxton / Kaby Lake / Cannon Lake /
Gemini Lake). Boot/device-probe path, not a syscall hot path.
**Step 5.3 — Callees**
Record: `snd_hdac_ext_bus_get_hlink_by_name`,
`snd_hdac_ext_bus_link_get/put`, `snd_hdac_display_power`,
`hdac_hdmi_parse_and_map_nid` (can return `-EINVAL`/`-EIO`/`-ENOMEM` on
bad topology or alloc failure), `devm_snd_soc_register_component`.
**Step 5.4 — Reachability**
Record: Yes, if `CONFIG_SND_SOC_HDAC_HDMI` is built and the module
binds. Parse failure is a real probe error (`HDMI: failed to get afg sub
nodes`, `Bad pin/cvt setup`). Unprivileged users do not trigger it
directly; boot/bind does.
**Step 5.5 — Similar patterns**
Record: Same leak class in `hdac_hda_dev_probe` (already fixed with Cc:
stable). `hdmi_codec_probe()` still has its own error-path link_get
without put if widget map / notifier registration fails; that is **not**
this commit.
## Phase 6: This tree (6.18.53)
**Step 6.1 — Buggy code present?**
Record: **Yes.** `git describe HEAD` → `v6.18.53-5049-g0f0bdc2b0dffb`;
`Makefile` is 6.18.53. At `v6.18.53`, `hdac_hdmi_dev_probe()` gets the
link then returns on ENOMEM / `!hdac_id` / parse failure with no put
(and no display power off on parse failure). Bug introduced ~v4.7, not
after 6.18 branched.
**Step 6.2 — Backport difficulty**
Record: **Clean apply.** `patch --dry-run` of this diff onto
`v6.18.53:sound/soc/codecs/hdac_hdmi.c` succeeded. No intervening probe
rewrite.
**Step 6.3 — Related fixes already here?**
Record: No other hdac_hdmi probe-leak fix. Sibling `hdac_hda` leak fix
is already in this tree; it does not cover this file.
## Phase 7: Subsystem context
**Step 7.1**
Record: ASoC codec driver (`sound/soc/codecs/hdac_hdmi.c`).
**IMPORTANT** for Intel HDMI audio on SKL–GLK, not core mm/net.
`SND_SOC_HDAC_HDMI` is a hidden `tristate` implied by
`SND_SOC_ALL_CODECS`; this tree has no board `select SND_SOC_HDAC_HDMI`
(SOF uses `SND_SOC_HDAC_HDA`). Distros that enable all codecs still ship
the module, and it still matches those HDMI codec IDs.
**Step 7.2**
Record: File is mature (2015–); recent commits are small fixes, not a
rewrite.
## Phase 8: Impact and risk
**Step 8.1 — Who**
Record: Users of this HDMI HDAC codec (Intel SKL/BXT/KBL/CNL/GLK ASoC
HDMI), and only when **probe fails**. Not universal.
**Step 8.2 — Trigger**
Record: Failed `hdac_hdmi_dev_probe` after `link_get`: ENOMEM, ID lookup
miss, or `hdac_hdmi_parse_and_map_nid` failure. Once per failed bind,
not a hot path. Not a userspace-triggered security issue.
**Step 8.3 — Failure mode**
Record: HDAC link ref never drops → link stays powered; display power
bit/get_power may stay held → GPU/audio power well may not idle.
**Severity: MEDIUM–HIGH** (power-management leak / stuck resource, not
oops/corruption). HDMI audio already failed on that path; leftover refs
can still affect the controller and display PM.
**Step 8.4 — Risk vs benefit**
Record:
- Benefit: balances refs on real probe-error paths; prevents stuck
link/display power.
- Risk: very low (error path only, matching put/power-off, no locking
change).
- Ratio: favorable for stable.
## Phase 9: Synthesis
**Step 9.1 — Evidence**
For:
- Real unbalanced `hlink` refcount and display-power hold on probe
failure (verified in v6.18.53 source and `link_get`/`display_power`
implementations).
- Probe failure cannot rely on runtime suspend (verified: PM
enable/`pm_runtime_put` is in `hdmi_codec_probe`, after successful
bind).
- Tiny (+8/−2), obviously correct, applies cleanly here.
- ASoC maintainer applied it; 2019 maintainer thread already flagged the
fragility.
- Same-week sibling hdac_hda leak fix was treated as stable material.
Against:
- Probe-error path only; no crash/corruption/CVE.
- No `Reported-by` of a field failure.
- Display power still leaked if component registration fails (pre-
existing, incomplete).
- Driver is less central in 6.18 than in Skylake-SST days (SOF uses
hdac_hda).
Unresolved:
- Could not search lore.kernel.org/stable (HTTP 403).
- No direct evidence of how often parse-and-map fails on shipping
SKL–GLK machines.
**Step 9.2 — Stable rules**
1. Obviously correct and tested? **PASS** — mechanical matching
put/power-off; maintainer applied. No extra Tested-by.
2. Real bug affecting users? **PASS** — leftover link/display power
after failed HDMI codec probe.
3. Important (crash/security/corruption/deadlock)? **PASS** (lower end)
— not an oops, but a stuck PM ref that can keep an HDA link and
display audio power well on; same class as other probe-path leak
backports.
4. Small and contained? **PASS** — one function, 10 lines.
5. No new features/APIs? **PASS**
6. Applies to this tree? **PASS** — buggy code in 6.18.53, clean apply.
**Step 9.3 — Exception category**
Record: None (not a device ID/quirk/DT/build/doc-only change). Ordinary
error-path leak fix.
**Step 9.4 — Decision**
The leak is real in this checkout, the fix is minimal and correct, and
regression risk is confined to paths that already failed probe. That is
appropriate for 6.18.y.
### What it solves for stable users
On Intel HDMI HDAC probe failure, this tree currently leaves
`snd_hdac_ext_bus_link_get()` unmatched and can leave
`snd_hdac_display_power(..., true)` unmatched. That keeps the HDAC link
(and possibly the i915 audio power well) up for the life of the boot.
The patch drops those refs on the failing paths.
### Risk vs benefit
Benefit is restoring power/ref balance when HDMI codec init fails. Risk
is very low: no success-path or locking change.
---
Verification:
- [Phase 1] Parsed tags: no Fixes/Cc-stable/Reported-by; Link to msgid
20260622151127; Mark Brown SOB; body cites Takashi 2019 thread
- [Phase 2] Diff: +8/−2 in `hdac_hdmi_dev_probe()`; puts on ENOMEM,
!hdac_id, parse failure; display_power(false) on parse failure
- [Phase 2] Confirmed `snd_hdac_ext_bus_link_get/put` in
`sound/hda/core/ext/controller.c` power the link on 0↔1 refcount
- [Phase 2] Confirmed `snd_hdac_display_power()` in
`sound/hda/core/component.c` holds DRM get_power while bits are set
- [Phase 3] `git describe HEAD`: v6.18.53-5049-g0f0bdc2b0dffb; `make
kernelversion` / Makefile: 6.18.53
- [Phase 3] Blame: link get from `b2047e996cd88` (v4.7); display power
from `4f799e734094f0` (v5.0)
- [Phase 3] `git show v6.18.53:sound/soc/codecs/hdac_hdmi.c`: buggy
returns present; parent of candidate identical to v6.18.53 for this
file
- [Phase 3] Sibling `e8ea01a045708` (hdac_hda leak) is an ancestor of
HEAD and had Cc: stable
- [Phase 4] `b4 dig -c 785903b7770f`: v1 only; applied by Mark Brown to
for-7.3; no NAK in mbox
- [Phase 4] MARC: Takashi 2019 mail `s5h1s0esk8o.wl-tiwai@suse.de` on
runtime-PM vs hdac_hdmi link refs
- [Phase 5] `hdac_hdmi_dev_probe` is `hdmi_driver.probe`; IDs
0x80862809–0x8086280d
- [Phase 5] `hdac_hdmi_parse_and_map_nid` can return -EINVAL/-EIO and
alloc errors
- [Phase 6] `patch --dry-run` onto v6.18.53 file: success
- [Phase 6] Upstream `785903b7770f` is not an ancestor of v6.18.53 (fix
not already in the stable base)
- [Phase 8] Failure mode: stuck HDAC link / display power after failed
probe, not oops
- UNVERIFIED: lore.kernel.org WebFetch/curl 403; no stable@ archive
search
- UNVERIFIED: field frequency of `hdac_hdmi_parse_and_map_nid` failures
on 6.18 hardware
**YES**
sound/soc/codecs/hdac_hdmi.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index 2385e18127a33..1ca5e7aa42aca 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -1861,8 +1861,10 @@ static int hdac_hdmi_dev_probe(struct hdac_device *hdev)
snd_hdac_ext_bus_link_get(hdev->bus, hlink);
hdmi_priv = devm_kzalloc(&hdev->dev, sizeof(*hdmi_priv), GFP_KERNEL);
- if (hdmi_priv == NULL)
+ if (hdmi_priv == NULL) {
+ snd_hdac_ext_bus_link_put(hdev->bus, hlink);
return -ENOMEM;
+ }
snd_hdac_register_chmap_ops(hdev, &hdmi_priv->chmap);
hdmi_priv->chmap.ops.get_chmap = hdac_hdmi_get_chmap;
@@ -1871,8 +1873,10 @@ static int hdac_hdmi_dev_probe(struct hdac_device *hdev)
hdmi_priv->chmap.ops.get_spk_alloc = hdac_hdmi_get_spk_alloc;
hdmi_priv->hdev = hdev;
- if (!hdac_id)
+ if (!hdac_id) {
+ snd_hdac_ext_bus_link_put(hdev->bus, hlink);
return -ENODEV;
+ }
if (hdac_id->driver_data)
hdmi_priv->drv_data =
@@ -1897,6 +1901,8 @@ static int hdac_hdmi_dev_probe(struct hdac_device *hdev)
if (ret < 0) {
dev_err(&hdev->dev,
"Failed in parse and map nid with err: %d\n", ret);
+ snd_hdac_ext_bus_link_put(hdev->bus, hlink);
+ snd_hdac_display_power(hdev->bus, hdev->addr, false);
return ret;
}
snd_hdac_refresh_widgets(hdev);
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-5.10] ALSA: hda/conexant: Add NULL check for dc_mode_path
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (59 preceding siblings ...)
2026-10-19 13:53 ` [PATCH AUTOSEL 6.18-5.10] ASoC: hdac_hdmi: Fix resource cleanup on probe failure Sasha Levin
@ 2026-10-19 13:53 ` Sasha Levin
2026-10-19 13:53 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Fix headset mic on ASUS Vivobook S14 S5406SA Sasha Levin
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:53 UTC (permalink / raw)
To: patches, stable
Cc: wangdicheng, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: wangdicheng <wangdicheng@kylinos.cn>
[ Upstream commit 273806f38ce95c95c288a03d3de1e423cd3e5543 ]
snd_hda_add_new_path() returns NULL when no path exists between the
given NIDs, but olpc_xo_update_mic_pins() passes dc_mode_path
straight to snd_hda_activate_path() which dereferences it without
checking. Add the missing NULL guards, same as the local path
variable already has in the same function.
Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Link: https://patch.msgid.link/20260729070935.548050-2-wangdich9700@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
Connection lost, reconnecting to https://agentn.us.api5.cursor.sh
(attempt 1)...
Retry attempt 1...
# Stable backport analysis: `ALSA: hda/conexant: Add NULL check for
dc_mode_path`
Local tree: **7.3.0-rc4** (`v7.3-rc4-27-gf0100363d8c37`). Evaluation is
for this checkout only. The conexant OLPC XO path exists here; the
change is a two-site NULL guard in `olpc_xo_update_mic_pins()`.
---
## PHASE 1: COMMIT MESSAGE FORENSICS
**Step 1.1: PARSE THE SUBJECT LINE**
- Subsystem: `ALSA: hda/conexant`
- Action verb: **Add** (NULL check)
- Claimed intent: stop passing a possibly-NULL `dc_mode_path` into
`snd_hda_activate_path()`
Record: `[ALSA/hda/conexant] [add] [NULL-check dc_mode_path before
snd_hda_activate_path]`
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
- `Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>` (author)
- `Link:
https://patch.msgid.link/20260729070935.548050-2-wangdich9700@163.com`
(patch 2/2)
- `Signed-off-by: Takashi Iwai <tiwai@suse.de>` (ALSA maintainer;
applied)
- No `Fixes:`
- No `Reported-by` / `Tested-by` / `Reviewed-by` / `Acked-by`
- No `Cc: stable` (expected for this review pipeline)
- Pipeline `Signed-off-by: Sasha Levin` is absent from the real commit
and is ignored anyway
Record: Maintainer SOB only; no crash reporter, syzbot, or Fixes tag.
Msgid `-2` shows this is **patch 2/2**.
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
The body says `snd_hda_add_new_path()` can return NULL when no path
exists between the given NIDs, and `olpc_xo_update_mic_pins()` passes
`spec->dc_mode_path` to `snd_hda_activate_path()` with no check. The
local `path` variable in the same function is already NULL-checked. No
stack trace, reproducer, or version range.
Record:
- [Bug] Unchecked NULL from `snd_hda_add_new_path()` used later
- [Symptom] NULL deref / oops in `snd_hda_activate_path()`
(`path->active = enable`)
- [Version info] none in the message
- [Root cause] missing NULL guards, unlike the sibling `path` checks
**Step 1.4: DETECT HIDDEN BUG FIXES**
Not disguised. It is an explicit NULL-deref guard. Not a feature or
refactor.
Record: `[Not a hidden fix; stated NULL deref guard]`
---
## PHASE 2: DIFF ANALYSIS - LINE BY LINE
**Step 2.1: INVENTORY THE CHANGES**
- File: `sound/hda/codecs/conexant.c` (+4 / -2)
- Function: `olpc_xo_update_mic_pins()`
- Classification: single-file surgical fix
Record: `[conexant.c +4-2] [olpc_xo_update_mic_pins] [surgical]`
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Hunk 1 (`!spec->dc_enable`, default path): always called
`snd_hda_activate_path(..., dc_mode_path, false, false)` to disable the
DC path → now skipped if `dc_mode_path` is NULL.
Hunk 2 (`spec->dc_enable`): always activated the DC path → now skipped
if NULL.
Both are the normal OLPC mic-pin update path (init, jack, capture,
mixer), not a new error-handling framework.
Record: `[unconditional activate_path → NULL-guarded activate_path on
both branches]`
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Category: **memory safety / NULL pointer dereference**.
`cxt_fixup_olpc_xo()` does:
```c
spec->dc_mode_path = snd_hda_add_new_path(codec, 0x1e, 0x14, 0);
```
`snd_hda_add_new_path()` is documented to return NULL if no valid path
is found, and also returns NULL if `is_reachable_path()` fails,
`snd_array_new()` fails, or `snd_hda_parse_nid_path()` fails.
`snd_hda_activate_path()` immediately does `path->active = enable` with
no NULL check.
Record: `[NULL deref] [add_new_path NULL stored, later deref in
activate_path]`
**Step 2.4: ASSESS THE FIX QUALITY**
Obviously correct and matches the existing `if (path)` pattern in the
same function. Minimal. Skipping activate on NULL cannot activate a
missing path anyway, so behavior is “don’t oops” rather than a new
feature. Regression risk is very low: no locking, no API, no data-
structure change.
Record: `[obviously correct, 2 ifs] [regression risk: very low]`
---
## PHASE 3: GIT HISTORY INVESTIGATION
**Step 3.1: BLAME THE CHANGED LINES**
Unchecked `snd_hda_activate_path(codec, spec->dc_mode_path, ...)` and
the assignment of `dc_mode_path` come from `3a00c6605b7709` (“ALSA:
hda/conexant - Re-implement OLPC XO workarounds via fixup”), Takashi
Iwai, 2014-01-27, first contained in **v3.15-rc1**. Present as an
ancestor of this HEAD.
Record: `[3a00c6605b7709, v3.15-rc1] [code present ~12 years]`
**Step 3.2: FOLLOW THE FIXES: TAG**
No `Fixes:` tag. Introducer verified by blame as above. `git merge-base
--is-ancestor 3a00c6605b7709 HEAD` succeeded.
Record: `[no Fixes tag] [buggy code exists in this tree since v3.15]`
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Recent `conexant.c` work is headset/LED/pin quirks. Only related hit for
`dc_mode_path` is this commit. Standalone relative to later conexant
changes.
Record: `[no prerequisites in recent file history] [standalone vs later
work]`
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
wangdicheng is a regular ALSA contributor, not the subsystem maintainer.
Nearby work includes other defensive checks. Same-day series: this patch
plus `[PATCH 1/2] ALSA: hda/conexant: Fix EAPD pin array overflow`.
Record: `[regular contributor] [2/2 series; patch 1 was rejected]`
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Needs `olpc_xo_update_mic_pins`, `dc_mode_path`, and
`snd_hda_activate_path` — all present. Patch 1/2 is **not** a
dependency; Takashi NAK’d it (“No, it checks right after the increment…
overwrite won't happen”), and this tree still has the original EAPD
write-then-check order. This NULL-check applies standalone.
Record: `[no functional dependency on 1/2] [applies standalone]`
---
## PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
`b4 dig -c 273806f38ce95` matched:
https://patch.msgid.link/20260729070935.548050-2-wangdich9700@163.com
`b4 dig -a`: **v1 only** (no v2/v3). Thread saved to mbox.
Takashi on 2/2: “Applied to for-next branch now. Thanks.” No NAK, no
stable nomination, no concern about this patch.
Takashi on 1/2: explicit rejection — the claimed EAPD overflow does not
happen.
Record: `[lore msgid 20260729070935.548050-2] [v1 only] [2/2 applied;
1/2 NAK’d] [no Cc: stable in review]`
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
`b4 dig -w` recipients: `tiwai@suse.com`, `broonie@kernel.org`, `linux-
sound@`, `linux-kernel@`, author. Subsystem maintainer was To: and
applied the patch.
Record: `[Takashi Iwai applied; Mark Brown CC’d; linux-sound CC’d]`
**Step 4.3: SEARCH FOR THE BUG REPORT**
No `Reported-by`, no bugzilla, no syzbot. HTTP fetch of lore.kernel.org
returned 403; discussion recovered via `b4 dig -m` instead. No evidence
of a user-reported oops.
Record: `[no user/syzbot report found] [static/code-review style
finding]`
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
2/2 of “conexant defensive fixes”. Patch 1 was a false positive. Patch 2
does not depend on patch 1.
Record: `[series 2/2; sibling not needed and not in tree]`
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
lore.kernel.org/stable HTTP search: **UNVERIFIED** (403). No
`dc_mode_path` discussion in this tree’s git history besides this
commit.
Record: `[UNVERIFIED: stable list search via HTTP] [no in-tree stable
discussion]`
---
## PHASE 5: CODE SEMANTIC ANALYSIS
**Step 5.1: IDENTIFY KEY FUNCTIONS**
- Modified: `olpc_xo_update_mic_pins()`
- Related: `cxt_fixup_olpc_xo()`, `olpc_xo_automic()`,
`olpc_xo_capture_hook()`, `olpc_xo_dc_mode_put()`,
`olpc_xo_dc_bias_enum_put()`, `snd_hda_add_new_path()`,
`snd_hda_activate_path()`
Record: `[olpc_xo_update_mic_pins only in the diff]`
**Step 5.2: TRACE CALLERS**
`olpc_xo_update_mic_pins()` is called from:
1. `olpc_xo_automic` — `mic_autoswitch_hook`
2. `olpc_xo_capture_hook` — PCM PREPARE/CLEANUP (capture start/stop)
3. `olpc_xo_dc_mode_put` — “DC Mode Enable Switch” mixer
4. `olpc_xo_dc_bias_enum_put` — if `dc_enable`
`olpc_xo_automic` is invoked from `call_mic_autoswitch()` in generic
HDA, including `update_automute_all()` from **codec init**
(`snd_hda_gen_init` path at generic.c:6029). So a NULL `dc_mode_path`
oopses on the **default** `!dc_enable` branch during init or jack
handling, not only when DC mode is turned on.
Record: `[init, jack, capture, mixer] [reachable without enabling DC
mode]`
**Step 5.3: TRACE CALLEES**
`update_mic_pin` / `snd_hda_codec_write_cache`,
`snd_hda_get_path_from_idx`, `snd_hda_activate_path`, pin-target
helpers. The dangerous callee is `snd_hda_activate_path` → `path->active
= enable`.
Record: `[activate_path dereferences path unconditionally]`
**Step 5.4: FOLLOW THE CALL CHAIN**
Quirk `SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO)`
plus model hint `olpc-xo`. Probe sets the hook and path; gen init calls
automute; userspace capture/mixer also reach it. Unprivileged capture on
that machine can hit it if the pointer is NULL.
Record: `[userspace-reachable on OLPC XO-1.5 and model=olpc-xo] [init
also hits it]`
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Same function already NULL-checks `snd_hda_get_path_from_idx()` results.
`snd_hda_activate_path()` itself does not check NULL (generic helper;
callers must).
Record: `[inconsistent NULL check vs local path; helper assumes non-
NULL]`
---
## PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Yes. `sound/hda/codecs/conexant.c`: `dc_mode_path` on the spec,
assignment in `cxt_fixup_olpc_xo`, use in `olpc_xo_update_mic_pins`.
Introduced v3.15, long before 7.3. (Current HEAD already contains
273806f38ce95; that is the original upstream commit, not used as a
“already selected for stable” argument.)
Record: `[buggy pattern exists in this lineage; file present at
sound/hda/codecs/conexant.c] [since v3.15]`
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
On **this** 7.3-rc4 tree the path and context match the candidate diff.
Codec drivers were moved in `6014e9021b28e` (v6.17 era); that does not
block this tree. No conflicting local edits.
Record: `[clean apply on this tree]`
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
No earlier alternate fix for `dc_mode_path`. Patch 1/2 is not in the
tree (correctly, it was wrong).
Record: `[no alternate fix] [EAPD sibling correctly absent]`
---
## PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
ALSA HD-audio, Conexant codec, **OLPC XO-1.5-only** fixup. Criticality:
**PERIPHERAL** (one PCI quirk / one model hint), but still a real
shipped platform.
Record: `[ALSA HDA conexant / OLPC XO] [PERIPHERAL]`
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
conexant.c still gets headset/LED/pin quirks. The OLPC block itself has
been stable since 2014.
Record: `[driver active; OLPC XO block mature]`
---
## PHASE 8: IMPACT AND RISK ASSESSMENT
**Step 8.1: DETERMINE WHO IS AFFECTED**
OLPC XO-1.5 (`0x152d:0x0833`) and anyone forcing `model=olpc-xo` on a
Conexant codec. Not a generic conexant bug.
Record: `[driver/platform-specific; tiny population]`
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
NULL only if `snd_hda_add_new_path(0x1e, 0x14)` fails: unreachable NIDs
(wrong hardware + olpc-xo fixup) or `snd_array_new()` ENOMEM. On real
XO-1.5 the path was designed to exist; **no oops reports in ~12 years**.
If it is NULL, codec init or first jack/capture hits it on the default
`!dc_enable` branch. Unprivileged capture can trigger it once the
pointer is NULL.
Record: `[rare: ENOMEM or wrong model] [init/jack/capture] [unprivileged
if already NULL]`
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
NULL deref in `snd_hda_activate_path` → kernel oops. Not data corruption
or a security hole by itself.
Record: `[oops] [HIGH if triggered; LOW likelihood on intended
hardware]`
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
- Benefit: prevents oops on a real (if narrow) error path; same pattern
already used for `path`.
- Risk: two extra NULL tests; no API/lock/behavior change when the
pointer is valid.
- Ratio: **low benefit, very low risk**. The crash-prevention bias still
favors taking it.
Record: `[benefit: modest] [risk: very low] [favorable for a 4-line oops
guard]`
---
## PHASE 9: FINAL SYNTHESIS
**Step 9.1: COMPILE THE EVIDENCE**
FOR:
- Verified unconditional deref in `snd_hda_activate_path()`
(`path->active = enable`)
- `snd_hda_add_new_path()` documented to return NULL; return is stored
unchecked
- Default `!dc_enable` path also calls activate, including codec init
via `update_automute_all()`
- 4-line, obviously correct, matches existing `if (path)` in the same
function
- No new API/feature; no dependency on the NAK’d 1/2
- Buggy code has been in this tree’s lineage since v3.15; file exists
here
- ALSA maintainer applied it
- Crash-class failure if the pointer is NULL
AGAINST:
- No `Reported-by`, syzbot, or stack trace in 12 years
- Only OLPC XO-1.5 / `model=olpc-xo`
- Same series’ patch 1 was a false positive NAK’d by Takashi (static-
analysis/LLM-style noise)
- On intended hardware the 0x1e→0x14 path is expected to exist
- Not nominated for stable in review
UNRESOLVED:
- HTTP lore.kernel.org/stable search (403); thread itself was recovered
with `b4`
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — correct by inspection;
maintainer applied (no extra Tested-by)
2. Fixes a real bug that affects users? **PASS** — real NULL-deref
defect; user population is small
3. Important issue (crash, security, corruption, deadlock)? **PASS** —
oops if triggered (HIGH, narrow)
4. Small and contained? **PASS** — 2 if-statements, one function
5. No new features or APIs? **PASS**
6. Can apply to the local tree? **PASS** — matching file and function in
7.3-rc4
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
None (not a device ID, quirk table add, DT, build, or docs fix).
Qualifies as a normal crash-prevention bugfix.
**Step 9.4: MAKE YOUR DECISION**
The hardware audience is tiny and there is no field report, but the
defect is a real oops on a reachable init/capture path, the patch is two
NULL tests with essentially no regression surface, and it does not need
the rejected sibling. For this tree, that meets stable rules. Borderline
impact is resolved in favor of including a crash fix.
---
## What the commit solves and why it matters here
`cxt_fixup_olpc_xo()` stores `snd_hda_add_new_path(codec, 0x1e, 0x14,
0)` in `spec->dc_mode_path` and never checks it.
`olpc_xo_update_mic_pins()` later passes that pointer into
`snd_hda_activate_path()`, which writes `path->active` immediately. That
runs on codec init, jack autoswitch, and capture — even with DC mode
off. If the path is missing (ENOMEM or `model=olpc-xo` on a codec
without 0x1e→0x14), the result is an oops, not a clean skip.
Stable users of this 7.3 line who have that quirk get a 4-line guard
already used for the other path in the same function. Risk is
negligible; the only real caveat is limited hardware, which is not a
reason to leave a verified NULL deref unfixed.
---
## Verification
- [Phase 1] Parsed tags: author SOB, maintainer SOB, msgid Link
`...548050-2`; no Fixes/Reported-by/Cc stable
- [Phase 2] Diff: two `if (spec->dc_mode_path)` wrappers in
`olpc_xo_update_mic_pins()`; +4/-2
- [Phase 2] Read `snd_hda_activate_path()`: first use is `path->active =
enable` with no NULL check
- [Phase 2] Read `snd_hda_add_new_path()`: documented NULL; also NULL on
unreachable path, `snd_array_new` failure, parse failure
- [Phase 3] `git blame`: introducer `3a00c6605b7709` (2014); `git
describe --contains` → v3.15-rc1
- [Phase 3] `git merge-base --is-ancestor 3a00c6605b7709 HEAD`: yes
- [Phase 3] `git show 273806f38ce95^:sound/hda/codecs/conexant.c`:
confirmed unguarded calls before the fix
- [Phase 3] No `Fixes:` tag to follow
- [Phase 3] Author log on `sound/`: regular ALSA contributor; 2/2 series
- [Phase 4] `b4 dig -c 273806f38ce95`:
https://patch.msgid.link/20260729070935.548050-2-wangdich9700@163.com
- [Phase 4] `b4 dig -a`: v1 only
- [Phase 4] `b4 dig -w`: tiwai, broonie, linux-sound, linux-kernel
- [Phase 4] `b4 dig -m`: Takashi applied 2/2; NAK’d 1/2 EAPD overflow as
incorrect
- [Phase 4] WebFetch lore.kernel.org: 403 — discussion taken from mbox
instead
- [Phase 5] Callers of `olpc_xo_update_mic_pins`: automic, capture hook,
two mixer puts
- [Phase 5] `update_automute_all()` → `call_mic_autoswitch()` from gen
init (generic.c:6029)
- [Phase 5] Quirk: `SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5",
CXT_FIXUP_OLPC_XO)`; model `olpc-xo`
- [Phase 6] `git describe HEAD` / `make kernelversion`: v7.3-rc4 /
7.3.0-rc4
- [Phase 6] File present at `sound/hda/codecs/conexant.c`; pre-fix code
in parent of 273806f38ce95
- [Phase 6] `git merge-base --is-ancestor 273806f38ce95 HEAD`: original
commit is in this history
- [Phase 8] Failure mode: NULL deref oops; severity HIGH if hit,
population OLPC XO-1.5 / model override
- UNVERIFIED: lore.kernel.org/stable HTTP search (403)
- UNVERIFIED: whether 0x1e→0x14 is reachable on every CX codec if
someone forces `model=olpc-xo` (not required for the decision; ENOMEM
and missing-path cases are already documented in
`snd_hda_add_new_path()`)
The fix is small, surgical, and meets the stable criteria for this tree.
**YES**
sound/hda/codecs/conexant.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/hda/codecs/conexant.c b/sound/hda/codecs/conexant.c
index fe7445fabb887..56d6fbdd9b06d 100644
--- a/sound/hda/codecs/conexant.c
+++ b/sound/hda/codecs/conexant.c
@@ -457,7 +457,8 @@ static void olpc_xo_update_mic_pins(struct hda_codec *codec)
if (!spec->dc_enable) {
/* disable DC bias path and pin for port F */
update_mic_pin(codec, 0x1e, 0);
- snd_hda_activate_path(codec, spec->dc_mode_path, false, false);
+ if (spec->dc_mode_path)
+ snd_hda_activate_path(codec, spec->dc_mode_path, false, false);
/* update port B (ext mic) and C (int mic) */
/* OLPC defers mic widget control until when capture is
@@ -493,7 +494,8 @@ static void olpc_xo_update_mic_pins(struct hda_codec *codec)
update_mic_pin(codec, 0x1b, 0);
/* enable DC bias path and pin */
update_mic_pin(codec, 0x1e, spec->recording ? PIN_IN : 0);
- snd_hda_activate_path(codec, spec->dc_mode_path, true, false);
+ if (spec->dc_mode_path)
+ snd_hda_activate_path(codec, spec->dc_mode_path, true, false);
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
* [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Fix headset mic on ASUS Vivobook S14 S5406SA
[not found] <20261019135441.1420968-1-sashal@kernel.org>
` (60 preceding siblings ...)
2026-10-19 13:53 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/conexant: Add NULL check for dc_mode_path Sasha Levin
@ 2026-10-19 13:53 ` Sasha Levin
61 siblings, 0 replies; 62+ messages in thread
From: Sasha Levin @ 2026-10-19 13:53 UTC (permalink / raw)
To: patches, stable
Cc: Zhang Heng, Takashi Iwai, Sasha Levin, perex, tiwai, linux-sound,
linux-kernel
From: Zhang Heng <zhangheng@kylinos.cn>
[ Upstream commit f2d08f3651fb12634347fef2c41687a807a7dcba ]
On the ASUS Vivobook S14 S5406SA (subsystem 0x104310c4, Lunar Lake
platform) with an ALC294 codec, the headset microphone (3.5mm jack)
fails to capture any audio. Adding the ALC2XX_FIXUP_HEADSET_MIC
quirk resolves the issue and restores proper headset mic recording.
Link: https://github.com/thesofproject/linux/issues/5729
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260807125857.678297-3-zhangheng@kylinos.cn
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
I have enough to decide for this 6.12 tree: the quirk and insertion
point exist, the 0x10c4 entry does not.
===============================================================
PHASE 1: COMMIT MESSAGE FORENSICS
===============================================================
**Step 1.1: PARSE THE SUBJECT LINE**
Record: **[ALSA/hda/realtek] [Fix] [headset microphone capture on ASUS
Vivobook S14 S5406SA]**
Subsystem prefix is `ALSA: hda/realtek`. Action verb is **Fix**. Claimed
intent is restoring 3.5mm headset-mic capture on one ASUS laptop by
adding a PCI subsystem quirk.
**Step 1.2: PARSE ALL COMMIT MESSAGE TAGS**
Record:
- **Link:** https://github.com/thesofproject/linux/issues/5729 (user bug
report; later confirmed fixed by the model/quirk)
- **Link:**
https://patch.msgid.link/20260807125857.678297-3-zhangheng@kylinos.cn
(alsa-devel submission; patch 3/4)
- **Signed-off-by:** Zhang Heng \<zhangheng@kylinos.cn\> (author)
- **Signed-off-by:** Takashi Iwai \<tiwai@suse.de\> (ALSA maintainer;
applied the series)
- **Fixes:** none (expected)
- **Cc: stable:** none (expected)
- **Reported-by / Tested-by / Reviewed-by / Acked-by:** none in the
commit message
Notable: msgid `-3` shows this was patch 3 of a 4-patch batch of
independent hardware quirks, not a dependent refactor series.
**Step 1.3: ANALYZE THE COMMIT BODY TEXT**
Record:
- **Bug:** On ASUS Vivobook S14 S5406SA, PCI subsystem `0x1043:0x10c4`,
Lunar Lake + ALC294, the 3.5mm headset microphone captures silence.
Headset speakers work; internal DMIC works.
- **Symptom:** Userspace sees a “Headphones Stereo Microphone” source
that records silence; analog capture mixer controls are missing.
- **Root cause (from message + issue):** BIOS leaves headset-mic pin
0x19 as `0x411111f0` (N/A). `ALC2XX_FIXUP_HEADSET_MIC` overrides that
pin and sets `HDA_PINCFG_HEADSET_MIC`.
- **Version info in message:** Lunar Lake platform; GitHub reporter was
on 6.17, but that does not limit this tree.
**Step 1.4: DETECT HIDDEN BUG FIXES**
Record: **Not a hidden fix.** It is an explicit hardware-quirk bug fix:
one `SND_PCI_QUIRK` line. No cleanup/refactor disguise.
===============================================================
PHASE 2: DIFF ANALYSIS - LINE BY LINE
===============================================================
**Step 2.1: INVENTORY THE CHANGES**
Record:
- **File in upstream commit:** `sound/hda/codecs/realtek/alc269.c` (+1 /
−0)
- **File in this tree:** `sound/pci/hda/patch_realtek.c` (Realtek codec
not yet split)
- **Function / table:** `alc269_fixup_tbl[]`
- **Scope:** single-file, one-line surgical hardware quirk
**Step 2.2: UNDERSTAND THE CODE FLOW CHANGE**
Record:
- **Before:** SSID `0x1043:0x10c4` has no PCI quirk. `patch_alc269()`
still calls `snd_hda_pick_fixup()` on `alc269_fixup_tbl`. Existing
ASUS ALC294 *pin* quirks do not match this machine’s pin 0x12
(`0x40000000` vs required `0x90a60130`), so no headset-mic fixup is
applied. Pin 0x19 stays N/A; analog headset mic is never parsed.
- **After:** That SSID selects `ALC2XX_FIXUP_HEADSET_MIC` at PRE_PROBE.
- **Path:** codec probe / jack autoconfig only; not a hot path, error
path, or API change.
**Step 2.3: IDENTIFY THE BUG MECHANISM**
Record: **[Hardware workaround / pin-config quirk]**
In this tree `ALC2XX_FIXUP_HEADSET_MIC` is:
```10552:10555:sound/pci/hda/patch_realtek.c
[ALC2XX_FIXUP_HEADSET_MIC] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc_fixup_headset_mic,
},
```
`alc_fixup_headset_mic()` (same body as later
`alc2xx_fixup_headset_mic`) does:
1. Override pin 0x19 to `0x03a1103c` (headset mic)
2. Update coef 0x45
3. Set `spec->parse_flags |= HDA_PINCFG_HEADSET_MIC`
That matches the GitHub dump: pin 0x19 was `0x411111f0` with VREF_HIZ.
**Step 2.4: ASSESS THE FIX QUALITY**
Record: **Obviously correct and minimal.** One PCI ID, existing fixup
already used for Acer Nitro 5, ASUS Vivobook 15 X1504VAP, Gigabyte,
Huawei, Clevo, TongFang, HONOR. Regression surface is only SSID
`0x1043:0x10c4`. No locking, no API, no new code. **Regression risk:
very low.**
===============================================================
PHASE 3: GIT HISTORY INVESTIGATION
===============================================================
**Step 3.1: BLAME THE CHANGED LINES**
Record: The new line is an addition. Neighboring entries exist in this
tree at:
```11192:11193:sound/pci/hda/patch_realtek.c
SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA",
ALC256_FIXUP_ASUS_MIC),
SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ",
ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
```
The *bug* is missing pin config from BIOS, not a regression in a
specific old commit. The reusable fixup was added by `1c643c600407d`
(“Add new alc2xx-fixup-headset-mic model”, 2024-12-07), which is **in
this tree** (`git merge-base --is-ancestor 1c643c600407d HEAD`
succeeded). That is the stable backport of upstream `50db91fccea0d`
(first contained in v6.13-rc3; original SHA is **not** an ancestor of
this 6.12 branch, but the equivalent change is present).
**Step 3.2: FOLLOW THE FIXES: TAG**
Record: **No Fixes: tag.** Not applicable. The hardware never had a
working pin default for this SSID in this tree.
**Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES**
Record: `sound/pci/hda/patch_realtek.c` is actively receiving similar
one-line quirks (mute LEDs, speakers, headset mics). Recent history is
the same class of change. **No prerequisite series for this one line.**
Similar in-tree uses of `ALC2XX_FIXUP_HEADSET_MIC` include Acer Nitro 5
(`0x1025:0x1539/159c/1597`) and ASUS Vivobook 15 X1504VAP
(`0x1043:0x1e1f`).
**Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS**
Record: Zhang Heng has multiple Realtek quirk commits in this tree
(Samsung, ASUS UM6702RC, Inspur, Conexant). Regular ALSA hda
contributor; this patch was applied by maintainer Takashi Iwai. Related
same-day patches are other independent quirks (Acer Nitro ANV16-42, Acer
Gadget E10, Huawei Matebook Conexant), not dependencies.
**Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS**
Record: **Standalone.** Needs only `ALC2XX_FIXUP_HEADSET_MIC` /
`alc_fixup_headset_mic()`, both present. Series 1/4, 2/4, and 4/4 touch
different SSIDs/files. File path in the upstream diff (`alc269.c`) must
be rewritten to `patch_realtek.c` here; the hunk context around
`0x10c0`/`0x10d0` matches.
===============================================================
PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
===============================================================
**Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION**
Record:
- **Lore msgid:** `20260807125857.678297-3-zhangheng@kylinos.cn`
- **b4 mbox:** 5 messages; series is four independent quirks
(2026-08-07)
- **Revisions:** single submission (`[PATCH 3/4]`); no v2/v3 in the
thread
- **Maintainer:** Takashi Iwai: “Applied all four patches now. Thanks.”
— no NAK, no requested changes, no stable-risk comments
- Direct lore.kernel.org HTTP fetches returned 403; thread was recovered
via `b4 mbox`
**Step 4.2: CHECK WHO REVIEWED THE PATCH**
Record: **To:** tiwai@suse.com. **Cc:** linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org. Subsystem maintainer received and applied
it. `b4 dig -w` was not used (no upstream SHA in this checkout);
recipients came from the mbox.
**Step 4.3: SEARCH FOR THE BUG REPORT**
Record: GitHub thesofproject/linux#5729 (closed):
- Hardware: ASUS Vivobook S14 S5406SA, ALC294, SSID `0x104310c4`, Intel
Lunar Lake, driver `sof-audio-pci-intel-lnl`
- Symptom: headset speakers OK, headset mic silent; pin 0x19 =
`0x411111f0`
- Pierre-Louis Bossart: ALC294 config issue, not SOF
- Zhang Heng / Kailang Yang: try model `alc2xx-fixup-headset-mic`
- Reporter **confirmed** `hda_model=alc2xx-fixup-headset-mic` on the
same machine: dmesg `Headset Mic=0x19`, jack detect works, `pw-record`
captures real audio
- Also referenced Arch forum thread for the same SSID
**Step 4.4: CHECK FOR RELATED PATCHES AND SERIES**
Record: Batch of four independent hardware quirks. This patch does not
need the others. Other patches are not required for this SSID to work.
**Step 4.5: CHECK STABLE MAILING LIST HISTORY**
Record: lore.kernel.org/stable search returned HTTP 403. **UNVERIFIED**
whether someone already asked stable@ for this specific commit. No in-
tree evidence it was rejected.
===============================================================
PHASE 5: CODE SEMANTIC ANALYSIS
===============================================================
**Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF**
Record: No function body changed. Touches `alc269_fixup_tbl[]`. Runtime
effect is via `alc_fixup_headset_mic()` selected as
`ALC2XX_FIXUP_HEADSET_MIC`.
**Step 5.2: TRACE CALLERS**
Record:
- `HDA_CODEC_ENTRY(0x10ec0294, "ALC294", patch_alc269)` at line 13992
- `patch_alc269()` → `snd_hda_pick_fixup(..., alc269_fixup_tbl,
alc269_fixups)` at 12583–12584
- Called at codec probe (HDA/SOF HDA generic), not IRQ/syscall hot path
- Impact surface: **only** PCI subsystem `0x1043:0x10c4`
**Step 5.3: TRACE CALLEES**
Record: `alc_fixup_headset_mic` → `snd_hda_apply_pincfgs`,
`alc_update_coef_idx`, sets `HDA_PINCFG_HEADSET_MIC`. Same pattern
already used on other laptops in this file.
**Step 5.4: FOLLOW THE CALL CHAIN**
Record: Plug headset → HDA jack parse/probe → if quirk matches, pin 0x19
becomes a headset mic. **Reachable from userspace** on that laptop
(PipeWire/ALSA capture). Reporter confirmed it.
**Step 5.5: SEARCH FOR SIMILAR PATTERNS**
Record: Same `ALC2XX_FIXUP_HEADSET_MIC` already applied to multiple
vendors in `alc269_fixup_tbl`. This is the standard pattern for “BIOS
left headset mic pin as 0x411111f0”.
===============================================================
PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE
===============================================================
**Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?**
Record: **Yes.** This tree is **6.12.111** (`pending-6.12`, `git
describe HEAD` = `p-6.12-3-g710455e2077bb`). Makefile: VERSION=6
PATCHLEVEL=12 SUBLEVEL=111.
- Quirk `0x1043:0x10c4` / “S5406SA” is **absent** (`git grep` found no
matches).
- Realtek driver, ALC294 `patch_alc269`, `ALC2XX_FIXUP_HEADSET_MIC`, and
Lunar Lake SOF (`sound/soc/sof/intel/pci-lnl.c`) **are present**.
- The machine is a 2024/2025 Lunar Lake laptop; 6.12 is an LTS that runs
that hardware.
**Step 6.2: CHECK FOR BACKPORT COMPLICATIONS**
Record: **Minor path remap, otherwise clean.** Upstream hunk is against
`sound/hda/codecs/realtek/alc269.c`; here the table is
`sound/pci/hda/patch_realtek.c`. Context lines `0x10c0` then `0x10d0`
match exactly. Enum name is the same. **Expected difficulty: trivial
backport** (standard for HD-audio quirks on 6.12).
**Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE**
Record: Subject grep for S5406SA / this title found nothing. Pin quirks
for ASUS ALC294 do not match this pin dump (0x12 is `0x40000000`, not
`0x90a60130`). **No existing fix for this SSID.**
===============================================================
PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
===============================================================
**Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY**
Record: **[sound/pci/hda Realtek codec] [IMPORTANT]** — common laptop
audio, not mm/core, but HD-audio quirks are a large fraction of stable
backports. Affects users of this ASUS model.
**Step 7.2: ASSESS SUBSYSTEM ACTIVITY**
Record: **Active but mature quirk table.** Recent commits are almost all
device-specific `SND_PCI_QUIRK` additions — the same class as this
patch.
===============================================================
PHASE 8: IMPACT AND RISK ASSESSMENT
===============================================================
**Step 8.1: DETERMINE WHO IS AFFECTED**
Record: **Driver/hardware-specific** — only ASUS SSID `0x1043:0x10c4`
(Vivobook S14 S5406SA, ALC294). Other machines unchanged.
**Step 8.2: DETERMINE THE TRIGGER CONDITIONS**
Record: **Every use of the 3.5mm headset mic** on that laptop. Not a
race. Unprivileged user hits it by recording from the headset. Internal
DMIC still works, so some users workaround; headset-mic users do not.
**Step 8.3: DETERMINE THE FAILURE MODE SEVERITY**
Record: **[Headset analog capture silently fails] [MEDIUM functional /
HIGH for affected hardware]** — not a panic/UAF, but the combo-jack mic
is unusable, which is exactly what hardware-quirk stable exceptions
cover. Confirmed by a real user; second report on Arch for the same
SSID.
**Step 8.4: CALCULATE RISK-BENEFIT RATIO**
Record:
- **Benefit:** High for owners of this laptop on 6.12 LTS (headset mic
works without a modprobe model override).
- **Risk:** Very low — one table entry, existing fixup, SSID-matched,
maintainer-applied, user-tested.
- **Ratio:** Strongly favors backport.
===============================================================
PHASE 9: FINAL SYNTHESIS
===============================================================
**Step 9.1: COMPILE THE EVIDENCE**
**FOR:**
- Real, user-confirmed hardware bug (GitHub #5729; model param proven on
the same machine)
- Classic HD-audio PCI quirk — stable exception category
- One line, existing `ALC2XX_FIXUP_HEADSET_MIC` already in 6.12
- ALC294 and Lunar Lake SOF support exist here
- Isolated to one SSID; no API/feature
- Applied by Takashi Iwai; no NAKs
- Insertion context `0x10c0`/`0x10d0` matches this file
**AGAINST:**
- Upstream path is `alc269.c`; this tree still uses `patch_realtek.c`
(trivial remap)
- Not a crash/security issue (quirks are still accepted)
- Original patch had no Cc: stable (not a negative per the rules)
**UNRESOLVED:**
- lore.kernel.org HTTP 403; stable@ discussion not fetched (thread
recovered via b4)
- No upstream SHA in this checkout for `b4 dig -c`
**Step 9.2: APPLY THE STABLE RULES CHECKLIST**
1. Obviously correct and tested? **PASS** — same fixup already in tree;
reporter confirmed `alc2xx-fixup-headset-mic`; maintainer applied it
2. Fixes a real bug that affects users? **PASS** — silent headset-mic
capture on a shipping Lunar Lake ASUS
3. Important issue? **PASS** under the hardware-quirk exception (device
feature broken; not cosmetic)
4. Small and contained? **PASS** — +1 line
5. No new features or APIs? **PASS** — existing quirk ID only
6. Can apply to the local tree? **PASS** — needs path change to
`sound/pci/hda/patch_realtek.c`; context matches
**Step 9.3: CHECK FOR EXCEPTION CATEGORIES**
Record: **Hardware quirk/workaround** (and PCI-ID-style table addition
to an existing driver). Automatic YES class per the stable quirk rules.
**Step 9.4: MAKE YOUR DECISION**
This belongs on 6.12. The bug is present, the fixup infrastructure is
present, Lunar Lake audio is present, and the change is a one-line SSID
quirk that only enables headset-mic pin parsing on that laptop.
Verification:
- [Phase 1] Parsed subject/tags: Fix + GitHub issue + msgid 3/4; no
Fixes/Cc:stable (expected)
- [Phase 1] Body: ALC294 SSID 0x104310c4 headset mic silent; quirk
ALC2XX_FIXUP_HEADSET_MIC
- [Phase 2] Diff: +1 SND_PCI_QUIRK(0x1043, 0x10c4, ...) in
alc269_fixup_tbl
- [Phase 2] This tree implements that ID via alc_fixup_headset_mic():
pin 0x19 → 0x03a1103c + HDA_PINCFG_HEADSET_MIC
- [Phase 3] 1c643c600407d (alc2xx-fixup-headset-mic model) is in HEAD;
upstream 50db91fccea0d is not an ancestor (expected 6.12 vs 6.13)
- [Phase 3] git log --grep=S5406SA -- sound/pci/hda/: no matches; quirk
not already applied
- [Phase 3] Series 1/4–4/4 are independent quirks; 3/4 is standalone
- [Phase 4] b4 mbox 20260807125857.678297-3: Takashi Iwai applied all
four; no NAK
- [Phase 4] GitHub #5729: reporter confirmed hda_model=alc2xx-fixup-
headset-mic restores capture
- [Phase 4] lore.kernel.org WebFetch: 403 — UNVERIFIED via HTTP;
recovered via b4
- [Phase 5] ALC294 → patch_alc269 →
snd_hda_pick_fixup(alc269_fixup_tbl); caller is codec probe
- [Phase 5] ASUS ALC294 pin quirks do not match this machine (0x12 is
0x40000000)
- [Phase 6] git describe HEAD: p-6.12-3-g710455e2077bb; make
kernelversion 6.12.111
- [Phase 6] File is sound/pci/hda/patch_realtek.c; 0x10c0/0x10d0
neighbors match; 0x10c4 absent
- [Phase 6] sound/soc/sof/intel/pci-lnl.c present (Lunar Lake SOF)
- [Phase 8] Failure mode: silent analog headset mic, SSID-scoped;
severity medium functionally, high for that hardware
- UNVERIFIED: whether stable@ already discussed this commit (lore 403)
The one-line quirk is the standard stable HD-audio backport: it restores
headset-mic capture on one confirmed laptop with negligible risk.
**YES**
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 97ab2269dc472..8fdfe1bbe7aff 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -7101,6 +7101,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK),
SND_PCI_QUIRK(0x1043, 0x10a4, "ASUS TP3407SA", ALC287_FIXUP_TAS2781_I2C),
SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
+ SND_PCI_QUIRK(0x1043, 0x10c4, "ASUS Vivobook S14 S5406SA", ALC2XX_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1043, 0x10d3, "ASUS K6500ZC", ALC294_FIXUP_ASUS_SPK),
SND_PCI_QUIRK(0x1043, 0x1154, "ASUS TP3607SH", ALC287_FIXUP_TAS2781_I2C),
--
2.53.0
^ permalink raw reply related [flat|nested] 62+ messages in thread
end of thread, other threads:[~2026-10-19 14:06 UTC | newest]
Thread overview: 62+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20261019135441.1420968-1-sashal@kernel.org>
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18] ALSA: usb-audio: Add MIN_MUTE quirk for Creative Sound Blaster Play! 3 Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Fix speakers on ASUS ROG Zephyrus G14 GA403UM Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add quirk for Lenovo IdeaPad Slim 3 15ABR8 Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/conexant: Add mute LED quirk for HP ProBook 440 G5 Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add mute LED support for HP Pavilion 15-eh2xxx Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18] ALSA: hda/conexant: Add pin config quirk for Huawei Matebook Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add ALC235 support for headset mode Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-5.10] ASoC: Intel: bytcr_rt5651: Add quirk for Chuwi Hi8 with generic DMI strings Sasha Levin
2026-10-19 13:45 ` [PATCH AUTOSEL 6.18-6.12] soundwire: intel_auxdevice: Add cs42l44 to wake_capable_list Sasha Levin
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-6.12] ASoC: SOF: Intel: mtl: Power down DSP if it is left enabled in pre_fw_run() Sasha Levin
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Limit mic boost on Positivo N15RPE-S Sasha Levin
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-5.15] ALSA: hda/realtek: add missing error checks for COEF index reads in alc269 Sasha Levin
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-6.12] ASoC: rt712-sdca: Pull high JD2 to prevent from entering TV mode Sasha Levin
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Enable mute LEDs on HP Spectre x360 16-aa0xxx Sasha Levin
2026-10-19 13:46 ` [PATCH AUTOSEL 6.18-5.10] ASoC: codec: max98926: fixup invert setup mask Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-6.1] soundwire: dmi-quirks: Disable ghost Realtek on Asus Expertbook Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Fix ALC700 audio on Intel Hades Canyon Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-6.1] soundwire: dmi-quirks: Disable ghost Realtek on Asus ROG Zephyrus Duo Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-5.15] ALSA: hda/conexant: Always enable the headset-mic pin on plugin Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18] ASoC: codecs: uda1342: Leave cache-only mode before syncing Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add quirk for Acer Nitro AN515-45 Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-5.15] ALSA: usb-audio: Add native DSD support for Cambridge Audio streamers Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18] ALSA: hda: Add Lisuan HDMI controller and codec support Sasha Levin
2026-10-19 13:47 ` [PATCH AUTOSEL 6.18-6.1] ALSA: usb-audio: Rename the Audient iD14 monitor mix volume control Sasha Levin
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18] ALSA: hda: Add support for Hygon family 18h model 5h HD-Audio Sasha Levin
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-5.10] ALSA: usx2y: Stop clearing urb->hcpriv before submission Sasha Levin
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Enable mute LED on HP Laptop 15-dy0xxx Sasha Levin
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: add missing NULL check for codec->bus->pci Sasha Levin
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Add quirk for ASRock NUC BOX-358H Sasha Levin
2026-10-19 13:48 ` [PATCH AUTOSEL 6.18-6.6] ASoC: amd: acp-config: Add HVY-WXX9/M1060 DMI quirk Sasha Levin
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-6.1] ALSA: usb-audio: Add iD14 MkI to monitor-mix volume quirk Sasha Levin
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18] ALSA: hda: Force resume if acomp notified during system suspend Sasha Levin
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Add quirk for Lenovo ThinkBook G8+ Sasha Levin
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-5.15] soundwire: dmi-quirks: add a global ghost list Sasha Levin
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-6.1] soundwire: dmi-quirks: Disable ghost Realtek on Asus Zenbook Duo Sasha Levin
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add mute LED quirk for HP Victus 15-fb2xxx Sasha Levin
2026-10-19 13:49 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/intel: Add sanity check for BAR0 size Sasha Levin
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-6.1] ASoC: amd: yc: Add DMI entry for Alienware m18 R1 AMD Sasha Levin
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Limit internal mic boost on HP Pavilion 15 (103c:2164) Sasha Levin
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-5.15] ALSA: usb-audio: Add mixer mapping for MSI MAG B850M MORTAR WIFI Sasha Levin
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Fix mute LED for HP Victus 15-fa1xxx (MB 8C3F) Sasha Levin
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-6.1] ASoC: amd: yc: Add DMI quirk for Lenovo V15 G6 ARP Sasha Levin
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-5.10] ALSA: usb-audio: Skip mixer creation on M-Audio Venom Sasha Levin
2026-10-19 13:50 ` [PATCH AUTOSEL 6.18-6.1] ASoC: codecs: max98396: Unwind supplies on resume failure Sasha Levin
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18] ASoC: cs35l56: Add support for CS35L62 for SoundWire Sasha Levin
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18] ALSA: hda/realtek: Add quirk for Acer Nitro ANV16-42 headset mic Sasha Levin
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Add quirk for HP ENVY 13-aq1xxx Sasha Levin
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18-5.10] ASoC: tlv320aic26: remove keyclick sysfs file Sasha Levin
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda: Check snd_hda_power_pm construct error before executing verb Sasha Levin
2026-10-19 13:51 ` [PATCH AUTOSEL 6.18-6.6] ALSA: hda/realtek: Fix speakers on ASUS PM3406CHA Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Add quirk for Lenovo ThinkBook 16p Gen 3 ARH (21EK) Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.6] ASoC: sma1303: remove fault-check sysfs group on remove Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.1] ASoC: amd: yc: Add Lenovo ThinkPad E16 Gen 2 (21JN) to quirks Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.12] ASoC: amd: acp3x-es83xx: Add HVY-WXX9/M1060 DMI quirk Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 14-dv1001TU Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Add quirk for ASUS VivoBook M515DA/X515DAP Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 15-ec1xxx Sasha Levin
2026-10-19 13:52 ` [PATCH AUTOSEL 6.18-6.12] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 15-eg3xxx (103c:8bfd) Sasha Levin
2026-10-19 13:53 ` [PATCH AUTOSEL 6.18] ALSA: usb-audio: Release components on probe errors Sasha Levin
2026-10-19 13:53 ` [PATCH AUTOSEL 6.18-5.10] ASoC: hdac_hdmi: Fix resource cleanup on probe failure Sasha Levin
2026-10-19 13:53 ` [PATCH AUTOSEL 6.18-5.10] ALSA: hda/conexant: Add NULL check for dc_mode_path Sasha Levin
2026-10-19 13:53 ` [PATCH AUTOSEL 6.18-6.1] ALSA: hda/realtek: Fix headset mic on ASUS Vivobook S14 S5406SA Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox