Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1158999imm; Fri, 15 Jun 2018 12:12:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKJXakcmbKDlZJ+q5f2Dg3aRaQYa0MYk1HallKs75DeXghlT17TJ3vbrbQZayYZsbxfrPjp X-Received: by 2002:a62:67c5:: with SMTP id t66-v6mr3316986pfj.20.1529089923432; Fri, 15 Jun 2018 12:12:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529089923; cv=none; d=google.com; s=arc-20160816; b=yVgPvjqV+n0HAFKW9+cOXZRNRTsdEgZpdSvmSirH3SSEkrevN85UqFbqzu6/opQdiR fQTc8IHAlNcPaB/LNvCx64GM4PlkPyOYSNvZ5rNfCmTL79koqKjtt4Xq/HNiojSmFSZT YsLbqWrHPwVczjFntqs2I5GbA8byK7aOX1+WtIx1x6pkjYE33kL6C8vzzwJKaTsD5evC a5KzBjKuu9T/DVu+uqTqVyYvd3mxZoP6tcF0MGl6YqbgFve7XbJA4T7rnYgJVWtOcgup AfkrMfIiEm2Tz7zqwATeaH9lvPYU31wbjII0l6ZceDSPS/aEE+u2MtVTkv1FE57oKEXS gqLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=UeI+DsSZ1K9mje934RlzOP7AAnZ6O+MsXja7HmwZxlE=; b=AK5MgnPtdbqX1eR+O/7k8RiI4ny4Pkk6C656nocOrVrH3aiBNqehadWQq/Wy+B1lMc i3bX4lAL/p/g+4aF+TQu4bZxCPsf7GgP7xiwxPmde7KCylO3D9UNJi7WlUGzaG0HUxtq XPHPwwvVqvcKOcTw7N8A8+YOgrgh4CQOJ60kbmc91QR1A6m59vJOn/Bzuwh4GtWKUNmu /3gRyLEC+DqVLcwfAYOIL0NPqyznb1BAXzN53FKzT8NwL3AipGl+pBWRPwl40ctoPoGo 9Holl3R7yl7MFzzNCtuANaaIlxgdiznKAusHBCoLE4CJ6ovJuAJBOkBNoJYDnlX3KdFu hNog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jVHRhOYP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3-v6si8835854pls.119.2018.06.15.12.11.49; Fri, 15 Jun 2018 12:12:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jVHRhOYP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966118AbeFOTKG (ORCPT + 99 others); Fri, 15 Jun 2018 15:10:06 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:40039 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965052AbeFOTKC (ORCPT ); Fri, 15 Jun 2018 15:10:02 -0400 Received: by mail-wr0-f196.google.com with SMTP id l41-v6so10882278wre.7; Fri, 15 Jun 2018 12:10:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UeI+DsSZ1K9mje934RlzOP7AAnZ6O+MsXja7HmwZxlE=; b=jVHRhOYPBi+JWt/HqRyyg7R6L49f9s1cSdXd0I3ERikW37Eh6dN7osr51nGf4DYxGb yesJxYRpIc6gU1iHxPTo0poKbBVuB+0CHBv569YzhR0Zm2r37oZVj17Tbf+phsqatG3M NsawLBjNXr9F3tSAD9n7+mT61l2iecZHxL4qXisyjyXytrqNPyGPkkAeL+EKckWgCkQO yTJ/HTXO0IByQYPpYxcBaA1qa24HC00LucMXx8GXibp3yqRgKwpkeBxtBzr8U7GKi9AA J1o9t6/z2ulixNyY3ylybXk7wWz2K5QsZChcMX1Kb7zD5lJ8zaAVpYm335bLgwLo/kab haig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=UeI+DsSZ1K9mje934RlzOP7AAnZ6O+MsXja7HmwZxlE=; b=ud5Gpjez1XZ+bFzkGXuaVLI1qYcwi3ShvSjUbiPjWku3KqVg/xxag611t+mr8rEOrN 2IjQgXtbXlKuYykwCWW39JAODTlOw5S7cuGtidTF1EyFPbMSPRURFGtyxjAojlWUSyMO H1+8Wn2SFk2dWF0sxcsbhJshh25sgIJ5kp3m26HPkPCt1SIXbD6DpyxWnySAVnZg94H+ 9VnX6q5i54reYYURCLWQz79uOolNoQaSisl451JUNQIQFLfiMFJ63WoGpUyoIXI2AxlP 7f9VBK7PtpnXGXUCnqde/wYTehDIwSRrTzt8+nvbAe277eNCXX2TgOAzyeRQfpUqxurK /GpQ== X-Gm-Message-State: APt69E3ix88k64VWHEdhEW6u09vBkv1UmEq8Sm7q3IwAKqTzF/JSZnPC Hu8jMCIw9tXYqACdKh+ADP8= X-Received: by 2002:adf:f98a:: with SMTP id f10-v6mr2653884wrr.105.1529089801032; Fri, 15 Jun 2018 12:10:01 -0700 (PDT) Received: from pali ([2a02:2b88:2:1::5cc6:2f]) by smtp.gmail.com with ESMTPSA id j4-v6sm8007963wrr.47.2018.06.15.12.09.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jun 2018 12:10:00 -0700 (PDT) Date: Fri, 15 Jun 2018 21:09:59 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Takashi Iwai Cc: Henrique de Moraes Holschuh , ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: ThinkPad T480s & LED_MUTE, LED_MICMUTE Message-ID: <20180615190959.pqipwnm6a3tf3lxc@pali> References: <20180608111057.4wxpg7m7nm7suf6n@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sak2akqrac45d545" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --sak2akqrac45d545 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Friday 15 June 2018 14:51:47 Takashi Iwai wrote: > On Fri, 08 Jun 2018 13:10:57 +0200, > Pali Roh=C3=A1r wrote: > >=20 > > Hi! With up-to-date thinkpad_acpi.ko driver on ThinkPad T480s I'm seeing > > a strange behavior of LEDs which are integrated into mic mute (Fn+F4) > > and mute (Fn+F1) keys. > >=20 > > When thinkpad_acpi.ko is not loaded, then mute key is working fine. When > > pressed, it correctly generates KEY_MUTE on AT Translated Set 2 keyboard > > input device and also turn on/of mute led. But when micmute key is > > pressed then, nothing happen. No key event is reported and also led is > > not turned on/off. > >=20 > > On the other hand, when thinkpad_acpi.ko is loaded, then both buttons > > mute and micmute correctly generates input events; mute via AT keyboard > > and micmute via ThinkPad Extra Buttons. But led is not changed. When > > thinkpad_acpi.ko is loaded it turn off both leds (mute and micmute) and > > leds after pressing any of those buttons, leds are not turned on again. > >=20 > > When thinkpad_acpi.ko is unloaded, then pressing mute button again start > > switching led on/off. > >=20 > > So it seems that some init sequence of thinkpad_acpi.ko breaks mute led. > > And fini sequence of thinkpad_acpi.ko makes mute led working again. >=20 > Usually the mute LED on Thinkpad is triggered from HD-audio driver > (sound/pci/hda/thinkpad_helper.c), and it's a soft-bound via > symbol_request(tpacpi_led_set). I thought thinkpad_acpi is > auto-loaded when the module gets bound. >=20 > A possible explanation would be that TPT480s has neither IBM0068, > LEN0068 nor LEN0268 ACPI HIDs, hence the driver is not auto-loaded. I have Debian Stretch kernel (4.9) which does not have LEN0268 alias for thinkpad_acpi.ko. So thinkpad_acpi.ko is not loaded automatically. But I have put thinkpad_acpi into /etc/modules and it is now automatically loaded at boot. I also compiled upstream version of thinkpad_acpi.ko, loaded it in Stretch kernel, but it behaves in same way. Maybe... there could be a problem that thinkpad_acpi.ko must be already loaded when sound subsystem is doing initialization? If yes, this could explain it as /etc/modules is loaded at later stage and manually loading of new version of thinkpad_acpi.ko at runtime does not help when sound subsystem is already running. > (In HD-audio driver side, the ACPI ID is checked and the mute LED > control is applied only to these three IDs, too.) > Meanwhile, when you load thinkpad_acpi, it does still recognize some > device and initialize it. By the initialization, it goes out of BIOS > control, and the OS control is expected... This is my wild guess. >=20 >=20 > BTW, the reason we have no LED class for these is that we don't want > to confuse users by providing multiple ways to access to the single > stuff. We've had already the mute LED control from the audio driver > since long time ago, we don't want to drop and enforce the user-space > solution (that is anyway flakier than in kernel in most cases). If possible... I would prefer swapped LED behavior: turn led on when microphone is turned on AND turn led off when microphone is turned off. Because current behavior is to have turned led off when microphone is on which seems a bit strange. Also microphone is in majority of time not used and when is not used it is (or should be) turned off. On the other hand e.g. CAPSLOCK led is turned on when CAPSLOCK is enabled (and not opposite) -- which matches uses, it is not used in majority of time. >=20 > thanks, >=20 > Takashi --=20 Pali Roh=C3=A1r pali.rohar@gmail.com --sak2akqrac45d545 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQS4VrIQdKium2krgIWL8Mk9A+RDUgUCWyQPBQAKCRCL8Mk9A+RD UrtHAJkB5cAenB0sM6BVqgbhZriVYxEaVgCfSNUzJoOmk94jtUKPt0UeA7uh8ws= =EwWa -----END PGP SIGNATURE----- --sak2akqrac45d545--