Re: [PATCH] platform/x86: redmi-wmi: Add mic-mute key mapping
From: Nika Krasnova
Date: Sat Jun 20 2026 - 20:47:34 EST
On 2026-06-20 17:40, Ilya Gladyshev wrote:
> Is this a hardware mic switch that just notifies userspace, or does the
> hardware just make an assumption about the current state of the user's mic?
It's not a hardware switch: pressing the key only sends a key event;
userspace (GNOME) does the actual muting, which I've tested works.
> Because for the first case, I am a bit afraid of bad UX if the hardware
> switch and userspace state get desynchronized :)
You're right that the LED can drift out of sync with the real mute
state. The root cause is that the firmware reports an absolute state
(muted/unmuted, via the two scancodes) while KEY_MICMUTE is a toggle, so
that information is lost -- and there's no KEY_MICUNMUTE to preserve it.
That said, before this patch the key does nothing, so the mic never
mutes and the firmware's LED toggling is meaningless. With it, the key
works and the LED is correct except for an initial-alignment edge case.
I'd therefore like the keymap fix to land on its own, and address the
LED separately. I'm preparing that as a follow-up -- the LED state is
the EC field MIUT, settable through the same WMAA control device that
bitland-mifs-wmi already wraps.
--
Nika Krasnova