Re: [PATCH v14 RESEND 0/6] Merge redmi-wmi into bitland-mifs-wmi

From: Hans de Goede

Date: Wed Oct 28 2026 - 07:50:39 EST


Hi,

On 26-Oct-26 21:20, Chris Taraszka wrote:
> On Mon, 26 Oct 2026, Hans de Goede wrote:
>> Hmm, I wonder if this maybe sends some scan-code on the PS/2 atkbd
>> interface? Windows must get an event somehow ...
>
> Hi Hans,
>
> It does, but only the plain Space scancode: Fn+Space gives scan 0x39 /
> KEY_SPACE on the atkbd device, the same as Space alone, and Fn on its
> own sends nothing. So there is nothing that tells it apart from Space.

Hmm, so does Fn+space work under Windows ? If it works there, then there
must be some way to make it work under Linux...
>> Ack, this sounds like a case for calling platform_profile_cycle() if
>> platform-profile support is present.
>
> I can send a patch for that on top of Mingyou's series and my TM2424
> patches.

Ack.
>> Hmm, if the value-low toggles I wonder if the firmware also mutes
>> the mic itself ? This may need some special handling.
>
> It does not. I played a 1 kHz tone through the speakers and recorded it
> with the internal microphone while pressing mic mute, with the PipeWire
> source forced unmuted: the level stayed the same with the key's LED on.
>
> The LED is driven by the firmware and follows its own toggle state,
> which is what value_low reports. It does not follow the OS mute: muting
> the source from userspace leaves the LED off. So the two can get out of
> sync, but nothing in the audio path needs special handling.

Ok, so the value-low indicates the state of the LED, right ?

Interesting. Is there someway to manually toggle the LED like we do on
other laptops, so that we can actually sync it to the alsa-mixer
mic-mute state ?

If not then I think we need to add 2 new: KEY_MICMUTE_MUTE and
KEY_MICMUTE_UNMUTE key-codes to:

include/uapi/linux/input-event-codes.h

and send one of those depending on the state of the LED. This will
tell userspace to actually turn the mute on/off to match the LED
state, at least it will once someone takes the time to hook these
up in userspace, which is going to be a chunk of work ...

Being able to override the LED state would be much better.

For something analog (also good for the commit message to add
the new key-codes) see:

#define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */
#define KEY_TOUCHPAD_ON 0x213
#define KEY_TOUCHPAD_OFF 0x214

Where the old KEY_MICMUTE effectively is the toggle variant.

Regards,

Hans