From aa44e98dc23eec452d4d16a86e047d5f91a4440f Mon Sep 17 00:00:00 2001 From: lushifex Date: Wed, 8 Jun 2016 14:24:16 +0800 Subject: [PATCH] Vlv2DeviceRefCodePkg&Vlv2TbltDevicePkg:Add setup option of LPE Audio. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex Reviewed-by: David Wei --- Vlv2DeviceRefCodePkg/AcpiTablesPCAT/GloblNvs.asl | 3 ++- Vlv2DeviceRefCodePkg/AcpiTablesPCAT/Pch.asl | 12 +++++++++--- Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PchLpss.asl | 7 +++++-- Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c | 3 ++- Vlv2TbltDevicePkg/Include/Guid/SetupVariable.h | 3 ++- Vlv2TbltDevicePkg/Include/Protocol/GlobalNvsArea.h | 3 ++- .../PlatformSetupDxe/SouthClusterConfig.vfi | 11 ++++++++++- Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni | 4 +++- Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni | 5 ++++- 9 files changed, 39 insertions(+), 12 deletions(-) diff --git a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/GloblNvs.asl b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/GloblNvs.asl index 8702110d02..9f949e1764 100644 --- a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/GloblNvs.asl +++ b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/GloblNvs.asl @@ -5,7 +5,7 @@ ;* Family of Customer Reference Boards. *; ;* *; ;* *; -;* Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved *; +;* Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved *; ; ; This program and the accompanying materials are licensed and made available under ; the terms and conditions of the BSD License that accompanies this distribution. @@ -349,5 +349,6 @@ Field(GNVS,AnyAcc,Lock,Preserve) DIDX, 32, //(793) Device ID for eDP device IOT, 8, //(794) MinnowBoard Max JP1 is configured for MSFT IOT project. BATT, 8, //(795) The Flag of RTC Battery Prensent. + LPAD, 8, //(796) } diff --git a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/Pch.asl b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/Pch.asl index 506b1710a2..8a5a6a38d4 100644 --- a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/Pch.asl +++ b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/Pch.asl @@ -5,7 +5,7 @@ ;* Family of Customer Reference Boards. *; ;* *; ;* *; -;* Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved *; +;* Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved *; ; ; This program and the accompanying materials are licensed and made available under ; the terms and conditions of the BSD License that accompanies this distribution. @@ -139,7 +139,10 @@ scope (\_SB) { If (LAnd(LAnd(LEqual(LPEE, 2), LEqual(LPED, 0)), LEqual(OSEL, 0))) { - Return (0xF) + If(LEqual(LPAD, 1)) + { + Return (0xF) + } } Return (0x0) } @@ -218,7 +221,10 @@ scope (\_SB) { If (LAnd(LAnd(LEqual(LPEE, 2), LEqual(LPED, 0)), LEqual(OSEL, 1))) { - Return (0xF) + If(LEqual(LPAD, 1)) + { + Return (0xF) + } } Return (0x0) } diff --git a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PchLpss.asl b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PchLpss.asl index 3e61e7925b..a636440002 100644 --- a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PchLpss.asl +++ b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PchLpss.asl @@ -5,7 +5,7 @@ ;* Family of Customer Reference Boards. *; ;* *; ;* *; -;* Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved *; +;* Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved *; ; ; This program and the accompanying materials are licensed and made available under ; the terms and conditions of the BSD License that accompanies this distribution. @@ -605,7 +605,10 @@ Device(I2C2) { If (LEqual(LPEE, 2)) { // LPE enable/disable - Return(0xF) + If (LEqual(LPAD, 1)) + { + Return(0xF) + } } Return(0) } diff --git a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c index 0f536de7f7..db1b5a5eeb 100644 --- a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c +++ b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under @@ -1051,6 +1051,7 @@ AcpiPlatformEntryPoint ( mGlobalNvsArea.Area->BatteryChargingSolution = GLOBAL_NVS_DEVICE_DISABLE; mGlobalNvsArea.Area->ISPDevSel = mSystemConfiguration.ISPDevSel; mGlobalNvsArea.Area->LpeEnable = mSystemConfiguration.Lpe; + mGlobalNvsArea.Area->LpeAudioReportedByDSDT = mSystemConfiguration.LpeAudioReportedByDSDT; if (mSystemConfiguration.ISPEn == 0) { mGlobalNvsArea.Area->ISPDevSel = GLOBAL_NVS_DEVICE_DISABLE; diff --git a/Vlv2TbltDevicePkg/Include/Guid/SetupVariable.h b/Vlv2TbltDevicePkg/Include/Guid/SetupVariable.h index e2a88758f2..d9ac9f79e1 100644 --- a/Vlv2TbltDevicePkg/Include/Guid/SetupVariable.h +++ b/Vlv2TbltDevicePkg/Include/Guid/SetupVariable.h @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under @@ -1309,6 +1309,7 @@ typedef struct { UINT8 SdCardRemovable; // ACPI reporting MMC/SD media as: removable/non-removable UINT8 GpioWakeCapability; UINT8 RtcBattery; + UINT8 LpeAudioReportedByDSDT; } SYSTEM_CONFIGURATION; #pragma pack() diff --git a/Vlv2TbltDevicePkg/Include/Protocol/GlobalNvsArea.h b/Vlv2TbltDevicePkg/Include/Protocol/GlobalNvsArea.h index b7fb022118..8f9948c2f8 100644 --- a/Vlv2TbltDevicePkg/Include/Protocol/GlobalNvsArea.h +++ b/Vlv2TbltDevicePkg/Include/Protocol/GlobalNvsArea.h @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under @@ -472,6 +472,7 @@ typedef struct { UINT32 DIDX; // 793 Device ID for eDP device UINT8 MicrosoftIoT; // (794)JP1 pins are for Microsoft IoT project. UINT8 RtcBattery; // (795) The Flag of RTC Battery Present. + UINT8 LpeAudioReportedByDSDT; // (796) } EFI_GLOBAL_NVS_AREA; #pragma pack () diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/SouthClusterConfig.vfi b/Vlv2TbltDevicePkg/PlatformSetupDxe/SouthClusterConfig.vfi index a6a99be2b2..ce93500f6f 100644 --- a/Vlv2TbltDevicePkg/PlatformSetupDxe/SouthClusterConfig.vfi +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/SouthClusterConfig.vfi @@ -1,6 +1,6 @@ // /** @file // -// Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are licensed and made available under @@ -790,6 +790,15 @@ form formid = AZALIA_OPTIONS_FORM_ID, option text = STRING_TOKEN(STR_LPE_ACPI_MODE), value=2, flags=0 | RESET_REQUIRED; endoneof; + grayoutif NOT ideqval Setup.Lpe == 0x2; + oneof varid = Setup.LpeAudioReportedByDSDT, + prompt = STRING_TOKEN(STR_LPE_REPORTED_BY_DSDT_PROMPT), + help = STRING_TOKEN(STR_LPE_REPORTED_BY_DSDT_HELP), + option text = STRING_TOKEN(STR_DISABLE), value=0, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; + option text = STRING_TOKEN(STR_ENABLE), value=1, flags=RESET_REQUIRED; + endoneof; + endif; + subtitle text = STRING_TOKEN(STR_NULL_STRING); suppressif ideqval Setup.AzaliaDs == 0x1; oneof varid = Setup.PchAzalia, diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni b/Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni index fb521e331a..4604df4d77 100644 --- a/Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni @@ -1,6 +1,6 @@ // /** @file // -// Copyright (c) 2013 - 2015 Intel Corporation. All rights reserved +// Copyright (c) 2013 - 2016 Intel Corporation. All rights reserved // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at @@ -453,4 +453,6 @@ #string STR_RTC_BATTERY_NOT_PRESENT #language uqi "\x0182" #string STR_RTC_BATTERY_PRESENT #language uqi "\x0183" #string STR_RTC_BATTERY_HELP #language uqi "\x0184" +#string STR_LPE_REPORTED_BY_DSDT_PROMPT #language uqi "\x0185" +#string STR_LPE_REPORTED_BY_DSDT_HELP #language uqi "\x0186" diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni b/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni index da01ecbcec..284d5befae 100644 --- a/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni @@ -1,5 +1,5 @@ // /** @file -// Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at @@ -726,6 +726,9 @@ #string STR_RTC_BATTERY_NOT_PRESENT #language en-US "Not Present" #string STR_RTC_BATTERY_HELP #language en-US "RTC Battery is Present or Not Present" +#string STR_LPE_REPORTED_BY_DSDT_PROMPT #language en-US "LPE Audio Reported By DSDT" +#string STR_LPE_REPORTED_BY_DSDT_HELP #language en-US "Recommended solution is to keep option disabled and expose LPE Audio device with an EFI application that updates the SSDT" + // // PCI Express // -- 2.39.2