summaryrefslogtreecommitdiff
path: root/Platform/BroxtonPlatformPkg/Board/LeafHill
diff options
context:
space:
mode:
Diffstat (limited to 'Platform/BroxtonPlatformPkg/Board/LeafHill')
-rw-r--r--Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c7
-rw-r--r--Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf5
-rw-r--r--Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/HdaVerbTables.c145
-rw-r--r--Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/HdaVerbTables.h38
4 files changed, 194 insertions, 1 deletions
diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c
index 4bd93d1670..ca49dfe0fd 100644
--- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c
@@ -22,6 +22,7 @@
#include <Ppi/BoardInitSignalling.h>
#include "BoardInit.h"
#include "BoardInitMiscs.h"
+#include "HdaVerbTables.h"
EFI_STATUS
EFIAPI
@@ -136,6 +137,12 @@ LeafHillPostMemInitCallback (
PcdSet8 (PcdeMMCHostMaxSpeed, (UINT8) (SystemConfiguration.ScceMMCHostMaxSpeed));
//
+ // HDA audio verb table
+ //
+ PcdSet64 (PcdHdaVerbTablePtr, (UINT64) (UINTN) &HdaVerbTableAlc662);
+ PcdSet8(HdaVerbTableEntryNum, 1);
+
+ //
// Add init steps here
//
//
diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf
index 0f11b1c11e..5154235f8d 100644
--- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf
@@ -31,6 +31,7 @@
PlatformInfoHob.c
BoardGpios.c
BoardGpios.h
+ HdaVerbTables.c
[LibraryClasses]
PeiServicesLib
@@ -64,7 +65,9 @@
gPlatformModuleTokenSpaceGuid.PcdSueCreek
gPlatformModuleTokenSpaceGuid.PcdMaxPkgCState
gPlatformModuleTokenSpaceGuid.PcdeMMCHostMaxSpeed
-
+ gPlatformModuleTokenSpaceGuid.PcdHdaVerbTablePtr
+ gPlatformModuleTokenSpaceGuid.HdaVerbTableEntryNum
+
[Guids]
gEfiPlatformInfoGuid
gEfiAuthenticatedVariableGuid
diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/HdaVerbTables.c b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/HdaVerbTables.c
new file mode 100644
index 0000000000..9a911fe2ca
--- /dev/null
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/HdaVerbTables.c
@@ -0,0 +1,145 @@
+/** @file
+ HD Audio Verb Table.
+
+ Copyright (c) 2017, 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 = {
+ {
+ 0x10EC0662, // Vendor ID / Device ID
+ 0xFF, // Revision ID
+ 0xFF, // SDI number, 0xFF matches any SDI.
+ 15 * 4 // Number of data DWORDs following the header.
+ },
+ {
+
+ 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/Board/LeafHill/BoardInitPostMem/HdaVerbTables.h b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/HdaVerbTables.h
new file mode 100644
index 0000000000..74a20e37e4
--- /dev/null
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/HdaVerbTables.h
@@ -0,0 +1,38 @@
+/** @file
+ HD Audio Verb Table header file.
+ This file includes package header files, library classes.
+
+ Copyright (c) 2017, 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_
+
+#pragma pack (push,1)
+
+
+typedef struct {
+ UINT32 VendorDeviceId; ///< Codec Vendor/Device ID
+ UINT8 RevisionId; ///< Revision ID of the codec. 0xFF matches any revision.
+ UINT8 SdiNo; ///< SDI number, 0xFF matches any SDI.
+ UINT16 DataDwords; ///< Number of data DWORDs following the header.
+} HDA_VERB_TABLE_HEADER;
+
+typedef struct {
+ HDA_VERB_TABLE_HEADER VerbTableHeader;
+ UINT32 VerbTableData[];
+} HDAUDIO_VERB_TABLE;
+#pragma pack (pop)
+
+extern HDAUDIO_VERB_TABLE HdaVerbTableAlc662;
+
+#endif // _HDA_VERBTABLES_H_