From nobody Mon Apr 29 12:00:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1515651661543794.1664462546642; Wed, 10 Jan 2018 22:21:01 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2087322227599; Wed, 10 Jan 2018 22:15:46 -0800 (PST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8EA182220D204 for ; Wed, 10 Jan 2018 22:15:44 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jan 2018 22:20:57 -0800 Received: from zwei4-mobl1.ccr.corp.intel.com ([10.239.193.21]) by FMSMGA003.fm.intel.com with ESMTP; 10 Jan 2018 22:20:55 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=david.wei@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,343,1511856000"; d="scan'208";a="18341070" From: zwei4 To: edk2-devel@lists.01.org Date: Thu, 11 Jan 2018 14:20:51 +0800 Message-Id: <20180111062051.11404-1-david.wei@intel.com> X-Mailer: git-send-email 2.14.1.windows.1 Subject: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] DMIC NHLT Entry. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Customize DMIC NHLT entry for boards. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: zwei4 --- .../Board/AuroraGlacier/BoardInitPostMem/BoardInit.c | 5 +++++ .../Board/AuroraGlacier/BoardInitPostMem/BoardInitPostMem.inf | 3 ++- .../Board/BensonGlacier/BoardInitPostMem/BoardInit.c | 7 +++++= +- .../Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf | 3 ++- .../Board/LeafHill/BoardInitPostMem/BoardInit.c | 9 +++++= ++-- .../Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf | 3 ++- .../Board/MinnowBoard3/BoardInitPostMem/BoardInit.c | 7 +++++= +- .../Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf | 3 ++- .../PlatformSettings/PlatformSetupDxe/SouthClusterConfig.vfi | 6 +++--- Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec | 8 +++++= +-- Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/ScInit/Dxe/ScHda.c | 6 +++++- .../BroxtonSiPkg/SouthCluster/ScInit/Dxe/ScInitDxe.inf | 4 +++- 12 files changed, 49 insertions(+), 15 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPostM= em/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitP= ostMem/BoardInit.c index 2f33bfe21..5ede1f114 100644 --- a/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPostMem/Boar= dInit.c +++ b/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPostMem/Boar= dInit.c @@ -144,6 +144,11 @@ AuroraGlacierPostMemInitCallback ( PcdSet8(HdaEndpointI2sRenderHPVirtualBusId, 1); // I2S2 PcdSet8(HdaEndpointI2sCaptureVirtualBusId, 1); // I2S2 =20 + // + // DMIC + // + PcdSet8(NhltEndpointDmic, (UINT8) SystemConfiguration.ScHdAudioNhltEndpo= intDmic); + // // Add init steps here // diff --git a/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPostM= em/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/B= oardInitPostMem/BoardInitPostMem.inf index f47cb4f28..ec30b262c 100644 --- a/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPostMem/Boar= dInitPostMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/AuroraGlacier/BoardInitPostMem/Boar= dInitPostMem.inf @@ -72,7 +72,8 @@ gEfiBxtTokenSpaceGuid.HdaEndpointI2sRenderSKPVirtualBusId gEfiBxtTokenSpaceGuid.HdaEndpointI2sRenderHPVirtualBusId gEfiBxtTokenSpaceGuid.HdaEndpointI2sCaptureVirtualBusId - + gEfiBxtTokenSpaceGuid.NhltEndpointDmic + =20 [Guids] gEfiPlatformInfoGuid gEfiAuthenticatedVariableGuid diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostM= em/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitP= ostMem/BoardInit.c index aabb350e8..deb36c610 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/Boar= dInit.c +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/Boar= dInit.c @@ -1,7 +1,7 @@ /** @file Board Init driver. =20 - Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
=20 This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -143,6 +143,11 @@ BensonGlacierPostMemInitCallback ( PcdSet8(HdaEndpointI2sRenderSKPVirtualBusId, 1); // I2S2 PcdSet8(HdaEndpointI2sRenderHPVirtualBusId, 1); // I2S2 PcdSet8(HdaEndpointI2sCaptureVirtualBusId, 1); // I2S2 + =20 + // + // DMIC + // + PcdSet8(NhltEndpointDmic, (UINT8) SystemConfiguration.ScHdAudioNhltEndpo= intDmic); =20 // // Add init steps here diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostM= em/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/B= oardInitPostMem/BoardInitPostMem.inf index c7499b564..53fa6756f 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/Boar= dInitPostMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/Boar= dInitPostMem.inf @@ -2,7 +2,7 @@ # Board detected module for Intel(R) Atom(TM) x5 Processor Series. # It will detect the board ID. # -# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the B= SD License @@ -72,6 +72,7 @@ gEfiBxtTokenSpaceGuid.HdaEndpointI2sRenderSKPVirtualBusId gEfiBxtTokenSpaceGuid.HdaEndpointI2sRenderHPVirtualBusId gEfiBxtTokenSpaceGuid.HdaEndpointI2sCaptureVirtualBusId + gEfiBxtTokenSpaceGuid.NhltEndpointDmic =20 [Guids] gEfiPlatformInfoGuid diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/Bo= ardInit.c b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/Boa= rdInit.c index fdf2c7eaa..fdd6b4de6 100644 --- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit= .c +++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit= .c @@ -1,7 +1,7 @@ /** @file Board Init driver. =20 - Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
=20 This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -150,7 +150,12 @@ LeafHillPostMemInitCallback ( PcdSet8(HdaEndpointI2sRenderSKPVirtualBusId, 5); //I2S6 PcdSet8(HdaEndpointI2sRenderHPVirtualBusId, 5); //I2S6 PcdSet8(HdaEndpointI2sCaptureVirtualBusId, 5); //I2S6 - =20 + + // + // DMIC + // + PcdSet8(NhltEndpointDmic, (UINT8) SystemConfiguration.ScHdAudioNhltEndpo= intDmic); + =20 // // Add init steps here // diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/Bo= ardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPo= stMem/BoardInitPostMem.inf index 9b6b3c93d..b66e33332 100644 --- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit= PostMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit= PostMem.inf @@ -3,7 +3,7 @@ # # It will detect the board ID. # -# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the B= SD License @@ -72,6 +72,7 @@ gEfiBxtTokenSpaceGuid.HdaEndpointI2sRenderSKPVirtualBusId gEfiBxtTokenSpaceGuid.HdaEndpointI2sRenderHPVirtualBusId gEfiBxtTokenSpaceGuid.HdaEndpointI2sCaptureVirtualBusId + gEfiBxtTokenSpaceGuid.NhltEndpointDmic =20 [Guids] gEfiPlatformInfoGuid diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMe= m/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPos= tMem/BoardInit.c index 666a0bfdf..bc342230c 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/Board= Init.c +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/Board= Init.c @@ -1,7 +1,7 @@ /** @file Board Init driver. =20 - Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
=20 This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -156,6 +156,11 @@ MinnowBoard3PostMemInitCallback ( PcdSet8(HdaEndpointI2sRenderHPVirtualBusId, 0); // I2S1 PcdSet8(HdaEndpointI2sCaptureVirtualBusId, 0); // I2S1 =20 + // + // DMIC + // + PcdSet8(NhltEndpointDmic, (UINT8) SystemConfiguration.ScHdAudioNhltEndpo= intDmic); + // // Add init steps here // diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMe= m/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/Boa= rdInitPostMem/BoardInitPostMem.inf index 9cf90c637..863a0c358 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/Board= InitPostMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/Board= InitPostMem.inf @@ -2,7 +2,7 @@ # Board detected module for Intel(R) Atom(TM) x5 Processor Series. # It will detect the board ID. # -# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the B= SD License @@ -68,6 +68,7 @@ gEfiBxtTokenSpaceGuid.HdaEndpointI2sRenderSKPVirtualBusId gEfiBxtTokenSpaceGuid.HdaEndpointI2sRenderHPVirtualBusId gEfiBxtTokenSpaceGuid.HdaEndpointI2sCaptureVirtualBusId + gEfiBxtTokenSpaceGuid.NhltEndpointDmic =20 [Guids] gEfiPlatformInfoGuid diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSe= tupDxe/SouthClusterConfig.vfi b/Platform/BroxtonPlatformPkg/Common/Platform= Settings/PlatformSetupDxe/SouthClusterConfig.vfi index f45d47a82..7f90f8faf 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/= SouthClusterConfig.vfi +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/= SouthClusterConfig.vfi @@ -1,7 +1,7 @@ // /** @file // South Cluster Setup formset. // -// Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.
+// Copyright (c) 1999 - 2018, 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 @@ -2765,8 +2765,8 @@ form formid =3D HDAUDIO_OPTIONS_FORM_ID, oneof varid =3D Setup.ScHdAudioNhltEndpointDmic, prompt =3D STRING_TOKEN(STR_HDA_NHLT_ENDPOINT_DMIC), help =3D STRING_TOKEN(STR_HDA_NHLT_ENDPOINT_DMIC_HELP), - option text =3D STRING_TOKEN(STR_DISABLE), value =3D 0, flags = =3D DEFAULT | RESET_REQUIRED; - option text =3D STRING_TOKEN(STR_HDA_DMIC_2CH), value =3D 1, fl= ags =3D RESET_REQUIRED; + option text =3D STRING_TOKEN(STR_DISABLE), value =3D 0, flags = =3D RESET_REQUIRED; + option text =3D STRING_TOKEN(STR_HDA_DMIC_2CH), value =3D 1, fl= ags =3D DEFAULT | RESET_REQUIRED; option text =3D STRING_TOKEN(STR_HDA_DMIC_4CH), value =3D 2, fl= ags =3D RESET_REQUIRED; endoneof; =20 diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec b/Silicon/Bro= xtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec index a28765f23..2a2fcbf9a 100644 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/BroxtonSiPkg.dec @@ -5,7 +5,7 @@ # DSC and EDK II INF files to generate AutoGen.c and AutoGen.h files # for the EDK II build infrastructure. # -# Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the B= SD License @@ -332,7 +332,8 @@ gEfiBxtTokenSpaceGuid.PcdSetCoreCount|0|UINT32|0x10000223 gEfiBxtTokenSpaceGuid.PcdVtdGfxBaseAddress|0xFED64000|UINT32|0x10000224 gSiPkgTokenSpaceGuid.PcdForceVolatileVariable|FALSE|BOOLEAN|0x30000012 - =20 + + ## I2S Audio Configuration ## Blue Tooth Render gEfiBxtTokenSpaceGuid.HdaEndpointBtRenderVirtualBusId|0x0F|UINT8|0x80000= 001 @@ -345,6 +346,9 @@ ## Headphone Capture gEfiBxtTokenSpaceGuid.HdaEndpointI2sCaptureVirtualBusId|0x0F|UINT8|0x800= 00005 =20 + ## DMIC + gEfiBxtTokenSpaceGuid.NhltEndpointDmic|0x01|UINT8|0x80000006 + =20 [PcdsFeatureFlag] gBxtRefCodePkgTokenSpaceGuid.PcdCeAtaSupport|FALSE|BOOLEAN|0x12 gBxtRefCodePkgTokenSpaceGuid.PcdMmcSdMultiBlockSupport|TRUE|BOOLEAN|0x13 diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/ScInit/Dxe/ScHda.= c b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/ScInit/Dxe/ScHda.c index 4600b5326..9c411732b 100644 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/ScInit/Dxe/ScHda.c +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/ScInit/Dxe/ScHda.c @@ -1,7 +1,7 @@ /** @file Initializes the HD-Audio Controller and Codec. =20 - Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.
=20 This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -266,12 +266,16 @@ ConfigureHdaAtBoot ( Status =3D GetConfigBlock ((VOID *) ScPolicy, &gHdAudioConfigGuid, (VOID= *) &HdaConfig); ASSERT_EFI_ERROR (Status); =20 + // + // Workaround: Restore HdaConfig because FSP may set them into incorrect= value.=20 + // if ((HdaConfig->IoBufferOwnership =3D=3D ScHdaIoBufOwnerHdaLinkI2sPort) = || \ (HdaConfig->IoBufferOwnership =3D=3D ScHdaIoBufOwnerI2sPort)) { =20 HdaConfig->DspEndpointBluetooth =3D TRUE; HdaConfig->DspEndpointI2sSkp =3D TRUE; HdaConfig->DspEndpointI2sHp =3D TRUE; } + HdaConfig->DspEndpointDmic =3D PcdGet8(NhltEndpointDmic); =20 DEBUG ((DEBUG_INFO, "------------------ HD-Audio Config ----------------= --\n")); DEBUG ((DEBUG_INFO, " HDA Enable =3D %x\n", HdaConfig-= >Enable)); diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/ScInit/Dxe/ScInit= Dxe.inf b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/ScInit/Dxe/ScInitDxe= .inf index 5b31b18fa..7c4d8f544 100644 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/ScInit/Dxe/ScInitDxe.inf +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/ScInit/Dxe/ScInitDxe.inf @@ -1,7 +1,7 @@ ## @file # SC Initialization driver # -# Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the B= SD License @@ -98,6 +98,8 @@ gPlatformModuleTokenSpaceGuid.PcdFlashIbbRegionSize gPlatformModuleTokenSpaceGuid.PcdFlashObbRegionMappedBase gPlatformModuleTokenSpaceGuid.PcdFlashObbRegionSize + =20 + gEfiBxtTokenSpaceGuid.NhltEndpointDmic =20 [Depex] gEfiSmmControl2ProtocolGuid --=20 2.14.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel