From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: "Jorge Núñez Granero" <eljorge199525@gmail.com>
Cc: platform-driver-x86@vger.kernel.org,
Corentin Chary <corentin.chary@gmail.com>,
"Luke D . Jones" <luke@ljones.dev>,
Denis Benato <denis.benato@linux.dev>,
Hans de Goede <hansg@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/x86: asus-wmi: add speaker mute LED
Date: Fri, 18 Sep 2026 21:23:56 +0300 (EEST) [thread overview]
Message-ID: <bb67adac-99e0-7b2e-0aae-d9df92f09959@linux.intel.com> (raw)
In-Reply-To: <20260918180954.56382-1-eljorge199525@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4015 bytes --]
On Fri, 18 Sep 2026, Jorge Núñez Granero wrote:
> Some ASUS laptops (e.g. the ExpertBook B3405CCA) have a mute LED on the
> F1 key next to the mic mute LED on F4. The mic mute LED is already
> driven through WMI device 0x00040017, but the speaker mute LED is not
> known to the driver, so it never lights up under Linux while the
> firmware does light it under Windows.
>
> The DSDT of the B3405CCA exposes device 0x0004001C in the same LED
> group with the presence bit set, and calling DEVS(0x0004001C, 1/0)
> turns the F1 key LED on and off.
>
> Register it as "platform::mute" with the "audio-mute" default trigger,
> mirroring the existing mic mute LED, so that the snd-ctl-led speaker
> mode drives it automatically. Only registered when the firmware
> reports the device as present, so nothing changes on other models.
>
> Tested on an ASUS ExpertBook B3405CCA (BIOS 307): DSTS reports the
> device present and DEVS 1/0 toggles the LED.
>
> Signed-off-by: Jorge Núñez Granero <eljorge199525@gmail.com>
Thanks for the patch, but I've already queued another patch to this effect
into the review-ilpo-next branch (from where it will eventually
propagate to the for-next branch).
--
i.
> ---
> drivers/platform/x86/asus-wmi.c | 24 ++++++++++++++++++++++
> include/linux/platform_data/x86/asus-wmi.h | 1 +
> 2 files changed, 25 insertions(+)
>
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index a650904..60bbd10 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -262,6 +262,7 @@ struct asus_wmi {
> struct led_classdev lightbar_led;
> int lightbar_led_wk;
> struct led_classdev micmute_led;
> + struct led_classdev mute_led;
> struct led_classdev camera_led;
> struct workqueue_struct *led_workqueue;
> struct work_struct tpd_led_work;
> @@ -2054,6 +2055,16 @@ static int micmute_led_set(struct led_classdev *led_cdev,
> return err < 0 ? err : 0;
> }
>
> +static int mute_led_set(struct led_classdev *led_cdev,
> + enum led_brightness brightness)
> +{
> + int state = brightness != LED_OFF;
> + int err;
> +
> + err = asus_wmi_set_devstate(ASUS_WMI_DEVID_MUTE_LED, state, NULL);
> + return err < 0 ? err : 0;
> +}
> +
> static enum led_brightness camera_led_get(struct led_classdev *led_cdev)
> {
> struct asus_wmi *asus;
> @@ -2084,6 +2095,7 @@ static void asus_wmi_led_exit(struct asus_wmi *asus)
> led_classdev_unregister(&asus->wlan_led);
> led_classdev_unregister(&asus->lightbar_led);
> led_classdev_unregister(&asus->micmute_led);
> + led_classdev_unregister(&asus->mute_led);
> led_classdev_unregister(&asus->camera_led);
>
> if (asus->led_workqueue)
> @@ -2181,6 +2193,18 @@ static int asus_wmi_led_init(struct asus_wmi *asus)
> goto error;
> }
>
> + if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_MUTE_LED)) {
> + asus->mute_led.name = "platform::mute";
> + asus->mute_led.max_brightness = 1;
> + asus->mute_led.brightness_set_blocking = mute_led_set;
> + asus->mute_led.default_trigger = "audio-mute";
> +
> + rv = led_classdev_register(&asus->platform_device->dev,
> + &asus->mute_led);
> + if (rv)
> + goto error;
> + }
> +
> if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_CAMERA_LED)) {
> asus->camera_led.name = "asus::camera";
> asus->camera_led.max_brightness = 1;
> diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h
> index b5ed8c8..6cb2e58 100644
> --- a/include/linux/platform_data/x86/asus-wmi.h
> +++ b/include/linux/platform_data/x86/asus-wmi.h
> @@ -54,6 +54,7 @@
> #define ASUS_WMI_DEVID_LED5 0x00020015
> #define ASUS_WMI_DEVID_LED6 0x00020016
> #define ASUS_WMI_DEVID_MICMUTE_LED 0x00040017
> +#define ASUS_WMI_DEVID_MUTE_LED 0x0004001C
>
> /* Disable Camera LED */
> #define ASUS_WMI_DEVID_CAMERA_LED_NEG 0x00060078 /* 0 = on (unused) */
>
prev parent reply other threads:[~2026-09-18 18:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 18:09 Jorge Núñez Granero
2026-09-18 18:23 ` Ilpo Järvinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bb67adac-99e0-7b2e-0aae-d9df92f09959@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=corentin.chary@gmail.com \
--cc=denis.benato@linux.dev \
--cc=eljorge199525@gmail.com \
--cc=hansg@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luke@ljones.dev \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®