[coreboot-gerrit] Patch set updated for coreboot: ec/lenovo/h8: Fix mute LEDs

Alexander Couzens (lynxis@fe80.eu) gerrit at coreboot.org
Tue Feb 28 15:54:21 CET 2017


Alexander Couzens (lynxis at fe80.eu) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18329

-gerrit

commit 50dd089d7e3031fda55c016eca22b8249cb25f9f
Author: Nicola Corna <nicola at corna.info>
Date:   Sat Feb 11 14:52:24 2017 +0100

    ec/lenovo/h8: Fix mute LEDs
    
    thinkpad_acpi expects a SSMS method to turn on/off the mute LED
    and a MMTS method to turn on/off the microphone mute LED. With
    these methods implemented the driver can correctly sync the LEDs
    with the corresponding statuses.
    
    There seems to be two different bits to mute the audio in the
    Lenovo H8 EC:
     * AMUT, used internally (for example to disable the audio before
        entering S3).
     * ALMT, controllable by the OS, which also toggles the mute LED
        (if present).
    
    Tested on a X220T and on a X201.
    
    Change-Id: I578f95f9619a53fd35f8a8bfe5564aeb6c789212
    Signed-off-by: Nicola Corna <nicola at corna.info>
---
 src/ec/lenovo/h8/acpi/ec.asl | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/src/ec/lenovo/h8/acpi/ec.asl b/src/ec/lenovo/h8/acpi/ec.asl
index 497dde4..b8350ad 100644
--- a/src/ec/lenovo/h8/acpi/ec.asl
+++ b/src/ec/lenovo/h8/acpi/ec.asl
@@ -39,8 +39,11 @@ Device(EC)
 				DKR2, 1,	/* Dock register 2 */
 		Offset (0x2a),
 				EVNT, 8,	/* write will trigger EC event */
+		Offset (0x30),
+				    , 6,
+				ALMT, 1,	/* Audio Mute + LED */
 		Offset (0x3a),
-				AMUT, 1,	/* Audio Mute */
+				AMUT, 1,	/* Audio Mute (internal use) */
 				    , 3,
 				BTEB, 1,
 				WLEB, 1,
@@ -362,6 +365,23 @@ Device(EC)
 		{
 			Return (TBSW << 3)
 		}
+		/* Mute audio */
+		Method (SSMS, 1, NotSerialized)
+		{
+			Store(Arg0, ALMT)
+		}
+		/* Control mute microphone LED */
+		Method (MMTS, 1, NotSerialized)
+		{
+			If (Arg0)
+			{
+				TLED(0x8E)
+			}
+			Else
+			{
+				TLED(0x0E)
+			}
+		}
 		/* Version */
 		Method (MHKV, 0, NotSerialized)
 		{



More information about the coreboot-gerrit mailing list