Linux Media Controller development
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Alessandro Baldi <baldovic@virgilio.it>,
	Sean Young <sean@mess.org>, Sasha Levin <sashal@kernel.org>,
	mchehab@kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH AUTOSEL 6.18-5.10] media: imon: Add iMON VFD HID OEM v1.2 key mappings
Date: Mon, 31 Aug 2026 09:23:39 -0400	[thread overview]
Message-ID: <20260831133314.4125787-191-sashal@kernel.org> (raw)
In-Reply-To: <20260831133314.4125787-1-sashal@kernel.org>

From: Alessandro Baldi <baldovic@virgilio.it>

[ Upstream commit d97d13c24d7893abcfb80d38630ce74daaa1434c ]

Add Vol+/Vol-/Mute panel button mappings for iMON VFD HID OEM v1.2.
This version differs in the codes that generate the
KEY_VOLUMEUP, KEY_VOLUMEDOWN and KEY_MUTE events.

Signed-off-by: Alessandro Baldi <baldovic@virgilio.it>
Signed-off-by: Sean Young <sean@mess.org>
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: media: imon: Add iMON VFD HID OEM v1.2 key
mappings

**Local tree:** Linux 6.18.43 (`git describe HEAD` →
`v6.18.43-1-gc7f0dac02d232`)

---

## PHASE 1: COMMIT MESSAGE FORENSICS

### Step 1.1: PARSE THE SUBJECT LINE
**Record:** `[media: imon]` `[Add]` — Add key mappings for iMON VFD HID
OEM v1.2 panel buttons (Vol+/Vol-/Mute).

### Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
**Record:**
- **Fixes:** — not present (expected for manual review)
- **Reported-by:** — none
- **Tested-by:** — none
- **Reviewed-by:** — none
- **Acked-by:** — none
- **Link:** — none
- **Cc: stable@vger.kernel.org:** — not present (expected)
- **Signed-off-by:** Alessandro Baldi `<baldovic@virgilio.it>` (author)
- **Signed-off-by:** Sean Young `<sean@mess.org>` (media subsystem
  maintainer — strong quality signal)

No syzbot, no bugzilla links, no multiple reporters.

### Step 1.3: ANALYZE THE COMMIT BODY TEXT
**Record:**
- **Bug:** iMON VFD HID OEM v1.2 firmware sends different hardware
  scancodes for Vol+, Vol-, and Mute than other variants already mapped
  in `imon_OEM_VFD`.
- **Symptom:** Panel volume/mute buttons on v1.2 hardware produce no
  useful input events (lookup returns `KEY_RESERVED`).
- **Root cause:** Missing entries in the `imon_OEM_VFD.key_table` for
  scancodes `0x0a`, `0x0b`, `0x0c` (with `0xffee` suffix applied at
  lookup time).
- **Version info:** Specific to "iMON VFD HID OEM v1.2" variant of USB
  device `0x15c2:0x0036`.

### Step 1.4: DETECT HIDDEN BUG FIXES
**Record:** Not disguised as cleanup. This is an explicit hardware-
variant key-mapping fix. Functionally equivalent to a hardware quirk:
same USB ID, different firmware scanc## Phase 1: Commit Message
Forensics

### Step 1.1: Subject Line
**Record:** `[media: imon]` `[Add]` — Add iMON VFD HID OEM v1.2 key
mappings for Vol+/Vol-/Mute panel buttons.

### Step 1.2: Commit Message Tags
**Record:**
- **Fixes:** — not present (expected for manual review)
- **Reported-by:** — none
- **Tested-by:** — none
- **Reviewed-by:** — none
- **Acked-by:** — none
- **Link:** — none
- **Cc: stable@vger.kernel.org** — none
- **Signed-off-by:** Alessandro Baldi `<baldovic@virgilio.it>` (author)
- **Signed-off-by:** Sean Young `<sean@mess.org>` (media maintainer;
  pipeline Sasha Levin SOB ignored per instructions)

Notable: maintainer sign-off from Sean Young, but no fuzzer report, user
bug report, or explicit stable nomination.

### Step 1.3: Commit Body Analysis
**Record:**
- **Bug:** iMON VFD HID OEM v1.2 panel buttons send different hardware
  codes for `KEY_VOLUMEUP`, `KEY_VOLUMEDOWN`, and `KEY_MUTE` than other
  variants already mapped in `imon_OEM_VFD`.
- **Symptom:** Volume+/Volume-/Mute panel buttons produce no useful
  input events on v1.2 hardware.
- **Root cause:** Missing entries in the `imon_OEM_VFD.key_table` for
  the v1.2 scancodes (`0x0a`, `0x0b`, `0x0c` with `0xffee` suffix
  pattern).
- **Version info:** Targets a specific hardware/firmware variant (v1.2),
  not a kernel regression.

### Step 1.4: Hidden Bug Fix Detection
**Record:** Not a disguised crash/leak/race fix. This is explicit
hardware-variant keymap completion — functionally a hardware
quirk/workaround for a device revision that uses different scancodes.

---

## Phase 2: Diff Analysis

### Step 2.1: Change Inventory
**Record:**
- **File:** `drivers/media/rc/imon.c` (+4 lines including comment, +3
  mapping entries)
- **Function/structure:** `imon_OEM_VFD.key_table` static data only
- **Scope:** Single-file, surgical data-table addition

### Step 2.2: Code Flow Change
**Record:**
- **Before:** `imon_panel_key_lookup()` walks `imon_OEM_VFD.key_table`;
  v1.2 Vol+/Vol-/Mute scancodes (`0x000000000a00ffee`,
  `0x000000000b00ffee`, `0x000000000c00ffee`) match nothing → returns
  `KEY_RESERVED`.
- **After:** Those scancodes map to `KEY_VOLUMEUP`, `KEY_VOLUMEDOWN`,
  `KEY_MUTE`.
- **Path affected:** 8-byte panel button packets (`len == 8 && buf[7] ==
  0xee`) on USB device `0x15c2:0x0036` using `imon_OEM_VFD`.

### Step 2.3: Bug Mechanism
**Record:** **Category:** Hardware quirk / incomplete keymap for
hardware variant. **Mechanism:** Same USB ID and driver, but v1.2
firmware emits different panel scancodes than existing table entries;
unmatched codes are dropped as `KEY_RESERVED`.

### Step 2.4: Fix Quality
**Record:** Obviously correct pattern — mirrors existing volume/mute
entries already in the same table. Minimal diff, no logic changes.
**Regression risk:** Very low; only adds new lookup entries without
altering existing mappings.

---

## Phase 3: Git History Investigation

### Step 3.1: Blame / Introduction
**Record:** In this shallow 6.18.43 checkout (~50 commits),
`imon_OEM_VFD` and its volume mappings are present at base commit
`a112b91dd6349`. Full upstream introduction history is not available in
this checkout. The **missing v1.2 mappings are confirmed absent** in the
current tree.

### Step 3.2: Fixes: Tag
**Record:** N/A — no `Fixes:` tag.

### Step 3.3: Related File History
**Record:** `git log --oneline -20 -- drivers/media/rc/imon.c` shows
only one commit in this shallow tree (`a112b91dd6349`), which is not
informative for upstream history. No evidence this is part of a multi-
patch series from local history.

### Step 3.4: Author Context
**Record:** No commits from Alessandro Baldi found in this checkout.
Sean Young (Signed-off-by) is the media/RC maintainer — strong subsystem
credibility signal.

### Step 3.5: Dependencies
**Record:** **Standalone.** No prerequisites; only adds rows to an
existing table in existing driver code. No new structures or APIs
required.

---

## Phase 4: Mailing List and External Research

### Step 4.1: Original Patch Discussion
**Record:** `b4 dig` requires `-c COMMITISH`; no commit hash was
provided and subject-only search is unsupported. **Could not retrieve
lore thread.**

### Step 4.2: Reviewers
**Record:** `b4 dig -w` not possible without commit hash. Sean Young SOB
in commit message indicates maintainer involvement.

### Step 4.3: Bug Report
**Record:** No `Reported-by:` or `Link:` tags. No external bug report
verified.

### Step 4.4: Related Patches / Series
**Record:** Appears standalone; no series indicators in subject or diff.

### Step 4.5: Stable List History
**Record:** Not searched (lore blocked by bot protection on fetch).
Precedent exists for imon stable backports (e.g., 3.17-stable picked up
imon RC protocol fix for broken remote functionality on `15c2:0034`).

---

## Phase 5: Code Semantic Analysis

### Step 5.1: Key Functions
**Record:** Modified data: `imon_OEM_VFD`. Affected runtime functions:
`imon_panel_key_lookup()`, called from `imon_incoming_packet()`; table
also used by `imon_init_idev()` to register supported keys.

### Step 5.2: Callers
**Record:** `imon_panel_key_lookup()` called from
`imon_incoming_packet()` when processing 8-byte panel packets (`buf[7]
== 0xee`). Triggered by physical panel button presses on supported iMON
USB devices during normal driver operation.

### Step 5.3: Callees
**Record:** Simple linear table scan; returns `KEY_RESERVED` on miss. No
allocation, locking, or I/O in lookup itself.

### Step 5.4: Reachability
**Record:** **Userspace-reachable** via panel button input on
`USB_DEVICE(0x15c2, 0x0036)` bound to `imon_OEM_VFD`. Common HTPC/media-
center use case for this hardware.

### Step 5.5: Similar Patterns
**Record:** Same table already contains multiple variant-specific
volume/mute mappings (standard OEM, MCE VFD `0xffdc`, knob values). v1.2
entries follow established pattern.

---

## Phase 6: Cross-Reference Against Local Tree (6.18.43)

### Step 6.1: Buggy Code Present?
**Record:** **YES.** Tree is `6.18.43` (`git describe`:
`v6.18.43-1-gc7f0dac02d232`). `imon_OEM_VFD` exists at lines 267–310
with volume mappings for other variants but **without** v1.2 entries
(`0x0a/0x0b/0x0c`). USB ID `0x15c2:0x0036` → `imon_OEM_VFD` at line
392–393.

### Step 6.2: Backport Complications
**Record:** **Clean apply expected.** Insertion point is clearly between
existing OEM volume entries and MCE VFD section — matches current file
layout exactly.

### Step 6.3: Related Fixes Already Present?
**Record:** `grep` for `0x000000000a00ffee` and `OEM v1.2` — **not
found**. Fix is not already in this tree.

---

## Phase 7: Subsystem Context

### Step 7.1: Subsystem / Criticality
**Record:** `drivers/media/rc/imon.c` — media RC/input driver.
**Criticality: PERIPHERAL** (niche HTPC front-panel hardware).

### Step 7.2: Subsystem Activity
**Record:** Mature, low-churn driver in this tree. imon support has been
stable for many years; this is variant-specific table maintenance.

---

## Phase 8: Impact and Risk Assessment

### Step 8.1: Who Is Affected
**Record:** Users of SoundGraph iMON OEM VFD (`15c2:0036`) with HID OEM
**v1.2** firmware — specifically panel Vol+/Vol-/Mute buttons. Config:
`CONFIG_RC_CORE` / imon USB driver.

### Step 8.2: Trigger Conditions
**Record:** Pressing panel volume/mute buttons on v1.2 hardware.
**Common** for affected users every time they use those buttons.
Unprivileged physical access; not a security vector.

### Step 8.3: Failure Mode Severity
**Record:** Unmapped keys → `KEY_RESERVED` → buttons do nothing.
**Severity: LOW** — functional impairment only; no oops, hang,
corruption, or security impact.

### Step 8.4: Risk-Benefit
**Record:**
- **Benefit:** Restores basic panel functionality for v1.2 owners;
  aligns with stable rules' explicit acceptance of **hardware quirk**
  fixes.
- **Risk:** Minimal — 3 table entries, no behavior change for existing
  mappings.
- **Ratio:** Moderate benefit for a small user population, very low
  risk.

---

## Phase 9: Final Synthesis

### Step 9.1: Evidence Summary

**FOR backport:**
- Fixes a real, user-visible hardware issue (non-working volume/mute
  buttons)
- Tiny, obviously correct, maintainer-signed
- Fits stable rules' **hardware quirk** category
  (`Documentation/process/stable-kernel-rules.rst`)
- Same pattern as existing variant-specific entries in the same table
- Applies cleanly to 6.18.43; driver and device ID already present
- Zero regression risk for users without v1.2 hardware

**AGAINST backport:**
- Not crash/security/corruption/deadlock
- Niche hardware with small user base
- No user/fuzzer bug report in commit message
- Completes support for a variant rather than fixing a kernel regression
- Mailing list review not verified (no commit hash for `b4 dig`)

**Unresolved:** Original lore discussion and whether a user/distro filed
a bug report.

### Step 9.2: Stable Rules Checklist
1. Obviously correct and tested? **PASS** — standard keymap pattern;
   maintainer SOB
2. Fixes real bug affecting users? **PASS** — broken panel buttons on
   v1.2 hardware
3. Important issue? **PASS (borderline)** — hardware quirk per stable-
   kernel-rules.rst; not crash-level but explicitly listed acceptable
   category
4. Small and contained? **PASS** — 3 entries, one file
5. No new features/APIs? **PASS** — data-only quirk entries
6. Can apply to local tree? **PASS** — code present, clean insertion
   point

### Step 9.3: Exception Category
**Record:** **Hardware quirk/workaround** — v1.2 firmware revision uses
different panel scancodes for the same USB device already supported by
`imon_OEM_VFD`.

### Step 9.4: Decision Rationale

For **Linux 6.18.43**, the driver, device ID, and `imon_OEM_VFD` table
all exist; v1.2 volume/mute scancodes are missing, so affected users'
buttons are silently ignored. The fix is a minimal hardware-variant
keymap addition — the same class of change stable trees routinely accept
as hardware quirks. Severity is low (no stability/security impact), but
benefit is clear for affected HTPC users and risk is negligible.

---

## Verification

- **[Phase 1]** Parsed subject, tags, body from provided commit message
- **[Phase 1]** Confirmed no Reported-by/Fixes/Link/Cc: stable tags
- **[Phase 2]** Diff: +3 keymap entries + comment in
  `imon_OEM_VFD.key_table`
- **[Phase 2]** Read `imon_panel_key_lookup()` at lines 1300–1316
- **[Phase 2]** Read `imon_incoming_packet()` panel path at lines
  1599–1602
- **[Phase 3]** `git describe HEAD` → `v6.18.43-1-gc7f0dac02d232`;
  Makefile → 6.18.43
- **[Phase 3]** `git blame -L 267,310 drivers/media/rc/imon.c` — table
  present (shallow history limits introduction date)
- **[Phase 3]** `git log --grep` / `-S` searches — no candidate commit
  in this tree
- **[Phase 4]** `b4 dig` — failed (no commit hash provided; `-q` not
  supported)
- **[Phase 4]** lore.kernel.org fetch — blocked by bot protection
- **[Phase 4]** Web search — found prior imon stable backport precedent
  (3.17-stable RC protocol fix)
- **[Phase 5]** `grep imon_OEM_VFD` — device `0x15c2:0x0036` uses this
  table
- **[Phase 5]** Traced call chain: panel button →
  `imon_incoming_packet()` → `imon_panel_key_lookup()`
- **[Phase 6]** Read `imon_OEM_VFD` at lines 267–310 — v1.2 mappings
  absent
- **[Phase 6]** `grep 0x000000000a00ffee` — not in tree
- **[Phase 7]** Read `Documentation/process/stable-kernel-rules.rst` —
  hardware quirk explicitly acceptable
- **[Phase 8]** Confirmed failure mode is `KEY_RESERVED` (no crash) via
  lookup code
- **UNVERIFIED:** Original mailing list review thread; whether bug was
  reported by users; exact kernel version that first introduced
  `imon_OEM_VFD` (shallow clone)

**YES**

 drivers/media/rc/imon.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index 48534bb52e4d0..4f974b88628f0 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -290,6 +290,10 @@ static const struct imon_usb_dev_descr imon_OEM_VFD = {
 		{ 0x000100000000ffeell, KEY_VOLUMEUP },
 		{ 0x010000000000ffeell, KEY_VOLUMEDOWN },
 		{ 0x000000000100ffeell, KEY_MUTE },
+		/* iMON VFD HID OEM v1.2 */
+		{ 0x000000000a00ffeell, KEY_VOLUMEUP },
+		{ 0x000000000b00ffeell, KEY_VOLUMEDOWN },
+		{ 0x000000000c00ffeell, KEY_MUTE },
 		/* 0xffdc iMON MCE VFD */
 		{ 0x00010000ffffffeell, KEY_VOLUMEUP },
 		{ 0x01000000ffffffeell, KEY_VOLUMEDOWN },
-- 
2.53.0


  parent reply	other threads:[~2026-08-31 13:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260831133314.4125787-1-sashal@kernel.org>
2026-08-31 13:22 ` [PATCH AUTOSEL 6.18] media: v4l2-common: Always register clock with device-specific name Sasha Levin
2026-08-31 13:23 ` [PATCH AUTOSEL 6.18] media: chips-media: wave5: Release m2m_ctx after Instance Removed from List Sasha Levin
2026-08-31 13:23 ` [PATCH AUTOSEL 6.18-5.10] media: rc: mceusb: Add support for 04eb:e033 Sasha Levin
2026-08-31 13:23 ` [PATCH AUTOSEL 6.18-6.12] media: chips-media: wave5: Add range checks for dec_output_info Sasha Levin
2026-08-31 13:23 ` Sasha Levin [this message]
2026-08-31 13:24 ` [PATCH AUTOSEL 6.18-5.10] media: dm1105: fix missing error check for dma_alloc_coherent Sasha Levin
2026-08-31 13:25 ` [PATCH AUTOSEL 6.18-6.12] media: chips-media: wave5: Fix Reports from Kernel Lock Validator Sasha Levin
2026-08-31 13:26 ` [PATCH AUTOSEL 6.18-6.1] media: video-i2c: use vb2_video_unregister_device on driver removal Sasha Levin
2026-08-31 13:28 ` [PATCH AUTOSEL 6.18] media: platform: cros-ec: Add Kulnex and Moxoe to the match table Sasha Levin
2026-08-31 13:29 ` [PATCH AUTOSEL 6.18-5.10] media: em28xx-video: fix missing res_free() on init_usb_xfer failure Sasha Levin
2026-08-31 13:29 ` [PATCH AUTOSEL 6.18-6.12] media: qcom: camss: avoid format string warning Sasha Levin
2026-08-31 13:30 ` [PATCH AUTOSEL 6.18] media: qcom: camss: vfe-340: Proper client handling Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260831133314.4125787-191-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=baldovic@virgilio.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=sean@mess.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox