Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pma1 opened this issue Jun 21, 2023 · 11 comments
Closed

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

pma1 opened this issue Jun 21, 2023 · 11 comments

Comments

@pma1
Copy link

pma1 commented Jun 21, 2023

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
Copy link
Author

pma1 commented Jun 21, 2023

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

@pma1
Copy link
Author

pma1 commented Jun 21, 2023

pma1 pushed a commit to pma1/alsa-ucm-conf that referenced this issue Jun 21, 2023
Link: alsa-project#326

Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
@pseudocc
Copy link
Contributor

also affects Thinkpad Z13 Gen2, alsa-info: https://alsa-project.org/db/?f=39cf33ce78a8a553ef0218e753b64a6a4c648fe8

@perexg
Copy link
Member

perexg commented Jun 26, 2023

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
Copy link
Author

pma1 commented Jun 26, 2023

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
Copy link
Member

perexg commented Jun 26, 2023

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
Copy link
Author

pma1 commented Jun 26, 2023

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
Copy link
Member

perexg commented Jun 26, 2023

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
Copy link
Author

pma1 commented Jun 26, 2023

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
Copy link
Member

perexg commented Jun 26, 2023

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

@pma1
Copy link
Author

pma1 commented Jun 26, 2023

Yes, it is fixed by the PR #327.

@perexg perexg closed this as completed in f965063 Jun 26, 2023
sarnold pushed a commit to VCTLabs/alsa-ucm-conf that referenced this issue Nov 30, 2023
Fixes: alsa-project#327
Fixes: alsa-project#326
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants