alsa-project/alsa-ucm-conf

Thinkpad Z16 Gen2 Mic mute LED not switching on when press F4

pma1 opened this issue · 11 comments

pma1 commented

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

pma1 commented

numid=129,iface=MIXER,name='Capture Switch'

perexg commented

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.

pma1 commented

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

perexg commented

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.

pma1 commented

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.

perexg commented

I see, but which driver handles the Fn+F4 key press event on this platform ? There are separate things:

  1. LED driver
  2. audio control to LED driver mapping
  3. 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.

pma1 commented

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.

perexg commented

Sorry, my bad - I overlooked the pull request. So PR #327 resolves this issue, right ?

pma1 commented

Yes, it is fixed by the PR #327.