summaryrefslogtreecommitdiff
path: root/Platform/BroxtonPlatformPkg/Common/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Platform/BroxtonPlatformPkg/Common/Library')
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf2
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspScPolicyInitLib.c11
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/HdaVerbTables.c175
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/HdaVerbTables.h30
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf1
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiScPolicyUpdate.c48
6 files changed, 6 insertions, 261 deletions
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf
index 8c1648d760..593984c406 100644
--- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf
+++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspPolicyInitLib.inf
@@ -87,6 +87,8 @@
gPlatformModuleTokenSpaceGuid.PcdBoardVbtFileGuid
gPlatformModuleTokenSpaceGuid.PcdMaxPkgCState
gPlatformModuleTokenSpaceGuid.PcdeMMCHostMaxSpeed
+ gPlatformModuleTokenSpaceGuid.PcdHdaVerbTablePtr
+ gPlatformModuleTokenSpaceGuid.HdaVerbTableEntryNum
[Ppis]
gSiPolicyPpiGuid ## CONSUMES
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspScPolicyInitLib.c b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspScPolicyInitLib.c
index 1a6666ebc1..f9055db209 100644
--- a/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspScPolicyInitLib.c
+++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiFspPolicyInitLib/PeiFspScPolicyInitLib.c
@@ -152,7 +152,6 @@ PeiFspScPolicyInit (
BOOLEAN FlashProtectionEnabled;
SC_POLICY_PPI *ScPolicy;
SC_FLASH_PROTECTION_CONFIG *FlashProtectionConfig;
- SC_HDAUDIO_CONFIG *HdaConfig;
UINTN HeciBaseAddress;
UINT32 SecMode;
@@ -363,13 +362,11 @@ PeiFspScPolicyInit (
FspsUpd->FspsConfig.Mmt = SystemConfiguration->ScHdAudioMmt;
FspsUpd->FspsConfig.Hmt = SystemConfiguration->ScHdAudioHmt;
FspsUpd->FspsConfig.HdAudioIoBufferOwnership = SystemConfiguration->ScHdAudioIoBufferOwnership;
+ FspsUpd->FspsConfig.HdaVerbTableEntryNum = PcdGet8(HdaVerbTableEntryNum);
+ FspsUpd->FspsConfig.HdaVerbTablePtr = (UINT32)PcdGet64(PcdHdaVerbTablePtr);
+
+ FspsUpd->FspsConfig.HdAudioDspUaaCompliance = 1;
- Status = GetConfigBlock ((VOID *) ScPolicy, &gHdAudioConfigGuid, (VOID *) &HdaConfig);
- ASSERT_EFI_ERROR (Status);
- if (!EFI_ERROR (Status)) {
- FspsUpd->FspsConfig.HdaVerbTableEntryNum = HdaConfig->VerbTableEntryNum;
- FspsUpd->FspsConfig.HdaVerbTablePtr = HdaConfig->VerbTablePtr;
- }
FspsUpd->FspsConfig.BiosCfgLockDown = SystemConfiguration->ScHdAudioBiosCfgLockDown;
FspsUpd->FspsConfig.HDAudioPwrGate = SystemConfiguration->ScHdAudioPwrGate;
FspsUpd->FspsConfig.HDAudioClkGate = SystemConfiguration->ScHdAudioClkGate;
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/HdaVerbTables.c b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/HdaVerbTables.c
deleted file mode 100644
index 6cd068e418..0000000000
--- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/HdaVerbTables.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/** @file
- Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
-
- 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
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include "HdaVerbTables.h"
-
-HDAUDIO_VERB_TABLE HdaVerbTableAlc662 = {
- //
- // VerbTable: (Realtek ALC662)
- // Revision ID = 0xff
- // Codec Verb Table for IOTG CRB boards
- // Codec Address: CAd value (0/1/2)
- // Codec Vendor: 0x10EC0662
- //
- {
- 0x10EC0662, // Vendor ID / Device ID
- 0xFF, // Revision ID
- 0xFF, // SDI number, 0xFF matches any SDI.
- 15 * 4 // Number of data DWORDs following the header.
- },
- {
- //
- // Realtek Semiconductor Corp.
- //
- // Realtek High Definition Audio Configuration - Version : 5.0.2.6
- // Realtek HD Audio Codec : ALC662-VD
- // PCI PnP ID : PCI\VEN_8086&DEV_2668&SUBSYS_72708086
- // HDA Codec PnP ID : HDAUDIO\FUNC_01&VEN_10EC&DEV_0662&SUBSYS_80860000
- // The number of verb command block : 15
- //
- // NID 0x12 : 0x40130000
- // NID 0x14 : 0x01014010
- // NID 0x15 : 0x01011012
- // NID 0x16 : 0x01016011
- // NID 0x18 : 0x01A19030
- // NID 0x19 : 0x02A19040
- // NID 0x1A : 0x0181303F
- // NID 0x1B : 0x0221401F
- // NID 0x1C : 0x411111F0
- // NID 0x1D : 0x4045E601
- // NID 0x1E : 0x01441120
- //
- //
- // HDA Codec Subsystem ID Verb-table
- // HDA Codec Subsystem ID : 0x80860000
- //
- 0x00172000,
- 0x00172100,
- 0x00172286,
- 0x00172380,
-
- //
- // Pin Widget Verb-table
- // Widget node 0x01 :
- //
- 0x0017FF00,
- 0x0017FF00,
- 0x0017FF00,
- 0x0017FF00,
-
- //
- // Pin widget 0x12 - DMIC
- //
- 0x01271C00,
- 0x01271D00,
- 0x01271E13,
- 0x01271F40,
-
- //
- // Pin widget 0x14 - FRONT (Port-D)
- //
- 0x01471C10,
- 0x01471D40,
- 0x01471E01,
- 0x01471F01,
-
- //
- // Pin widget 0x15 - SURR (Port-A)
- //
- 0x01571C12,
- 0x01571D10,
- 0x01571E01,
- 0x01571F01,
-
- //
- // Pin widget 0x16 - CEN/LFE (Port-G)
- //
- 0x01671C11,
- 0x01671D60,
- 0x01671E01,
- 0x01671F01,
-
- //
- // Pin widget 0x18 - MIC1 (Port-B)
- //
- 0x01871C30,
- 0x01871D90,
- 0x01871EA1,
- 0x01871F01,
-
- //
- // Pin widget 0x19 - MIC2 (Port-F)
- //
- 0x01971C40,
- 0x01971D90,
- 0x01971EA1,
- 0x01971F02,
-
- //
- // Pin widget 0x1A - LINE1 (Port-C)
- //
- 0x01A71C3F,
- 0x01A71D30,
- 0x01A71E81,
- 0x01A71F01,
-
- //
- // Pin widget 0x1B - LINE2 (Port-E)
- //
- 0x01B71C1F,
- 0x01B71D40,
- 0x01B71E21,
- 0x01B71F02,
-
- //
- // Pin widget 0x1C - CD-IN
- //
- 0x01C71CF0,
- 0x01C71D11,
- 0x01C71E11,
- 0x01C71F41,
-
- //
- // Pin widget 0x1D - BEEP-IN
- //
- 0x01D71C01,
- 0x01D71DE6,
- 0x01D71E45,
- 0x01D71F40,
-
- //
- // Pin widget 0x1E - S/PDIF-OUT
- //
- 0x01E71C20,
- 0x01E71D11,
- 0x01E71E44,
- 0x01E71F01,
-
- //
- // Widget node 0x20 :
- //
- 0x02050004,
- 0x02040001,
- 0x02050004,
- 0x02040001,
-
- //
- // Widget node 0x20 - 1 :
- //
- 0x02050005,
- 0x02040080,
- 0x02050001,
- 0x0204A9B8
- }
-};
-
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/HdaVerbTables.h b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/HdaVerbTables.h
deleted file mode 100644
index 64a42bc2cb..0000000000
--- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/HdaVerbTables.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/** @file
- Header file for HDA Verb Tables.
-
- Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
-
- 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
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef _HDA_VERBTABLES_H_
-#define _HDA_VERBTABLES_H_
-
-#include <Ppi/ScPolicy.h>
-
-enum HDAUDIO_CODEC_SELECT {
- HdaCodecPlatformOnboard = 0,
- HdaCodecExternalKit = 1
-};
-
-extern HDAUDIO_VERB_TABLE HdaVerbTableAlc298;
-extern HDAUDIO_VERB_TABLE HdaVerbTableAlc662;
-
-#endif // _HDA_VERBTABLES_H_
-
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf
index d5f0a1b8df..acb5a84bbf 100644
--- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf
+++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf
@@ -25,7 +25,6 @@
PeiScPolicyUpdate.c
PeiCpuPolicyUpdatePreMem.c
PeiCpuPolicyUpdate.c
- HdaVerbTables.c
[Packages]
MdePkg/MdePkg.dec
diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiScPolicyUpdate.c b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiScPolicyUpdate.c
index d9a991ca64..b260c3518e 100644
--- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiScPolicyUpdate.c
+++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiPolicyUpdateLib/PeiScPolicyUpdate.c
@@ -18,7 +18,6 @@
#include <Library/MemoryAllocationLib.h>
#include <Library/HobLib.h>
#include <Library/PcdLib.h>
-#include "HdaVerbTables.h"
#include <Guid/PlatformInfo.h>
#include <Library/PeiScPolicyLib.h>
#include <Library/HeciMsgLib.h>
@@ -71,43 +70,6 @@ InternalAddVerbTable (
}
-STATIC
-VOID
-InstallPlatformVerbTables (
- IN SC_HDAUDIO_CONFIG *HdaConfig,
- IN UINT16 BoardId,
- IN UINTN CodecType
- )
-{
- UINT8 VerbTableEntryNum;
- UINT32 VerbTableArray[32];
- UINT32 *VerbTablePtr;
-
- VerbTableEntryNum = 0;
-
- //
- // left switch cases defined which can be PlatformInfo or stepping
- //
- if (CodecType == HdaCodecPlatformOnboard) {
- //
- // Add onboard verb table. If we use a board that uses a different one, we need to split this code to board specific
- // location.
- //
- InternalAddVerbTable (&VerbTableEntryNum, VerbTableArray, &HdaVerbTableAlc662);
- } else {
- DEBUG ((DEBUG_INFO, "HD-Audio Warning: External codec kit selected or platform verb table not found, installing all!\n"));
- }
-
- HdaConfig->VerbTableEntryNum = VerbTableEntryNum;
-
- VerbTablePtr = (UINT32 *) AllocateZeroPool (sizeof (UINT32) *VerbTableEntryNum);
- CopyMem (VerbTablePtr, VerbTableArray, sizeof (UINT32) *VerbTableEntryNum);
- HdaConfig->VerbTablePtr = (UINT32) VerbTablePtr;
-
- return;
-}
-
-
/**
Check it's eMMC boot path or not.
@@ -549,16 +511,6 @@ UpdatePeiScPolicy (
HdaConfig->ResetWaitTimer = 300;
//
- // Install Verb Table
- //
- if (SystemConfiguration.ScHdAudio) {
- //
- // set default to on board
- //
- InstallPlatformVerbTables (HdaConfig, BoardId, HdaCodecPlatformOnboard);
- }
-
- //
// Update GMM config
//
GmmConfig->Enable = SystemConfiguration.Gmm;