Thinkpad Z16 Gen2 Mic mute LED not switching on when press F4
pma1 opened this issue · 11 comments
The mic and sound output works fine.
alsamixer can switch on/off the F4/Mic-mute LED automatically.
But when press Fn+F4, the mic-mute led is not working.
/sys/class/sound/ctl-led/mic/card1# cat list
129
numid=129,iface=MIXER,name='Capture Switch'
also affects Thinkpad Z13 Gen2, alsa-info: https://alsa-project.org/db/?f=39cf33ce78a8a553ef0218e753b64a6a4c648fe8
For Thinkpads, the ACPI driver should send KEY_MICMUTE (input subsystem) - see https://github.com/torvalds/linux/blob/master/drivers/platform/x86/thinkpad_acpi.c . This should be implemented for other platforms, too. The muting is implemented in gnome (window manager) / sound server.
In other words, this is not related to the sound subsystem at all.
Mic mute LED on ThinkPad also rely on snd_ctl_led:
sound/pci/hda/thinkpad_helper.c
ucm2 uses "Mic ACP LED Capture Switch" on Thinkpad AMD platform.
There are similar issue #100 and #136
https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1849#note_1210933
From your description, the LED and sound volume control (Mic ACP LED Capture Switch) connection works correctly. And the mentioned problems should be resolved. Please, do not try to mix different things. The key press event must be handled somewhere, so you should check the source and route of this event for your platform.
This is new AMD platform Pink Sardine, it enables new driver of DMIC sound/soc/amd/ps/ps-mach.c.
Without ucm2 conf:
1, Fallback profile is getting loaded and capture endpoint name is not listed as "Digital Microphone".
2, Mic Mute Led button is not reflected with Mute status.
It is just like the enablement of yellow carp and renoir
Sorry for the misunderstanding.
I see, but which driver handles the Fn+F4 key press event on this platform ? There are separate things:
- LED driver
- audio control to LED driver mapping
- hardware key press (mute mic) input driver (for example: the thinkpad_acpi driver for Thinkpad's, Dell WMI driver for Dell laptops) - both are related to integrated EC (embedded controller)
If something is missing for 3) you should fix this corresponding driver.
The Fn+F4 generate ACPI event:
button/f20 F20 00000080 00000000 K
It's mapped in udev hwdb.d/60-keyboard.hwdb as KEY_MICMUTE.
The "Mic ACP LED Capture Switch" is not in /sys/class/sound/ctl-led/mic/card1/list
OSD will be shown when switch Fn+F4.
I didn't see anything wrong in driver.