From 96e58974545d17d3a0c7c712ab85136a459ccb57 Mon Sep 17 00:00:00 2001
From: Koi <83289881+isKoi@users.noreply.github.com>
Date: Mon, 5 Feb 2024 22:06:50 +0800
Subject: [PATCH] add ALC287 for Legion 5 Pro(R9000p) (#890)
---
Resources/ALC287/Info.plist | 16 +
Resources/ALC287/Platforms13.xml | 219 ++++
Resources/ALC287/layout13.xml | 1107 +++++++++++++++++
Resources/PinConfigs.kext/Contents/Info.plist | 18 +
4 files changed, 1360 insertions(+)
create mode 100644 Resources/ALC287/Platforms13.xml
create mode 100644 Resources/ALC287/layout13.xml
diff --git a/Resources/ALC287/Info.plist b/Resources/ALC287/Info.plist
index 40e1a7ed4e..bd8f7e583b 100755
--- a/Resources/ALC287/Info.plist
+++ b/Resources/ALC287/Info.plist
@@ -26,6 +26,14 @@
Path
layout21.xml.zlib
+
+ Comment
+ ALC287 for Legion 5 Pro(R9000p)
+ Id
+ 13
+ Path
+ layout13.xml.zlib
+
Platforms
@@ -43,6 +51,14 @@
Path
Platforms21.xml.zlib
+
+ Comment
+ ALC287 for Legion 5 Pro(R9000p)
+ Id
+ 13
+ Path
+ Platforms13.xml.zlib
+
Patches
diff --git a/Resources/ALC287/Platforms13.xml b/Resources/ALC287/Platforms13.xml
new file mode 100644
index 0000000000..81ce31c701
--- /dev/null
+++ b/Resources/ALC287/Platforms13.xml
@@ -0,0 +1,219 @@
+
+ CommonPeripheralDSP
+
+
+ DeviceID
+ 0
+ DeviceType
+ Headphone
+
+
+ DeviceID
+ 0
+ DeviceType
+ Microphone
+
+
+ PathMaps
+
+
+ PathMap
+
+
+
+
+
+ Amp
+
+ Channels
+
+
+ Bind
+ 1
+ Channel
+ 1
+
+
+ Bind
+ 2
+ Channel
+ 2
+
+
+ MuteInputAmp
+
+ PublishMute
+
+ PublishVolume
+
+ VolumeInputAmp
+
+
+ NodeID
+ 8
+
+
+ NodeID
+ 35
+
+
+ Boost
+ 3
+ NodeID
+ 18
+
+
+
+
+
+
+
+
+ Amp
+
+ Channels
+
+
+ Bind
+ 1
+ Channel
+ 1
+
+
+ Bind
+ 2
+ Channel
+ 2
+
+
+ MuteInputAmp
+
+ PublishMute
+
+ PublishVolume
+
+ VolumeInputAmp
+
+
+ NodeID
+ 9
+
+
+ NodeID
+ 34
+
+
+ Boost
+ 3
+ NodeID
+ 25
+
+
+
+
+
+
+
+
+ Amp
+
+ MuteInputAmp
+
+ PublishMute
+
+ PublishVolume
+
+ VolumeInputAmp
+
+
+ NodeID
+ 20
+
+
+ Amp
+
+ Channels
+
+
+ Bind
+ 1
+ Channel
+ 1
+
+
+ Bind
+ 2
+ Channel
+ 2
+
+
+ MuteInputAmp
+
+ PublishMute
+
+ PublishVolume
+
+ VolumeInputAmp
+
+
+ NodeID
+ 2
+
+
+
+
+
+
+ Amp
+
+ MuteInputAmp
+
+ PublishMute
+
+ PublishVolume
+
+ VolumeInputAmp
+
+
+ NodeID
+ 33
+
+
+ Amp
+
+ Channels
+
+
+ Bind
+ 1
+ Channel
+ 1
+
+
+ Bind
+ 2
+ Channel
+ 2
+
+
+ MuteInputAmp
+
+ PublishMute
+
+ PublishVolume
+
+ VolumeInputAmp
+
+
+ NodeID
+ 3
+
+
+
+
+
+ PathMapID
+ 212
+
+
+
diff --git a/Resources/ALC287/layout13.xml b/Resources/ALC287/layout13.xml
new file mode 100644
index 0000000000..bae86bc64a
--- /dev/null
+++ b/Resources/ALC287/layout13.xml
@@ -0,0 +1,1107 @@
+
+ LayoutID
+ 13
+ PathMapRef
+
+
+ CodecID
+
+ 283902599
+
+ Headphone
+
+ Inputs
+
+ Mic
+ LineIn
+
+ IntSpeaker
+
+ LineIn
+
+ MuteGPIO
+ 1342242841
+ SignalProcessing
+
+ SoftwareDSP
+
+ DspFunction0
+
+ FunctionInfo
+
+ DspFuncInstance
+ 0
+ DspFuncName
+ DspNoiseReduction
+ DspFuncProcessingIndex
+ 0
+
+ ParameterInfo
+
+ 1
+ 0
+ 2
+ 1
+ 3
+ 0
+ 4
+ -1063256063
+ 5
+ O7qJwvAsd8IxFYLCNC+Iwgh8h8JYT3zCTGxtwjCQbMLsb3/C58KIwmIAjcKqEZTCM22Xwr5/k8L6Q5DCUXiPwhlqksKOQ5TCQS2XwkCYnMLSmqPCbK+owlyQq8I0AazCbnGnwkmOosLZX6HCVuujwsbgqMLF76vCmNaswvjzqsKJLarC9luqwvxyqcLWr6XCdkajwulQpMJs1afCbmCqwqbpqcIaSKrCSrmpwjv+p8KjIqjCVkOowh9WqMLun6nCudimwvISp8K686rC+KqowpS1psL0aqnCrv6rwti3qcJ6XqfC0Hemws04psKaw6fCJrOqwoMorMLbHq3CF8GswgJLr8Ku2a/C01aswjRirMLYuq3C2TSwwuZ1ssLUerPC3H60wrzAtMJG97HCSAuxwu5wscKSarPCQGK1woYFtcIw7LHCOMuxwiKZs8K8YrXC6nO4ws5cu8KCa73CJjG+wqekvMK9RLnC4/a2wuKBt8Jy/LfCLty7wk/ovsICsr7ChC7Awtobw8LCI8PCqfnDwuBGxcK65MTCf1jFwr65x8KDesrC7cHKwkXiysI+5c3Cqh/Rwhmf0cImvtPClErXwmrF18JUfdvCNi7fwty43cL+WdvCuqrawiIL3cKCR+HCYPDnwqQ67MLYserCshHowl7L6MK2guzCsvrvwu4o8cJyfv7C
+
+ PatchbayInfo
+
+
+ DspFunction1
+
+ FunctionInfo
+
+ DspFuncInstance
+ 1
+ DspFuncName
+ DspEqualization32
+ DspFuncProcessingIndex
+ 1
+
+ ParameterInfo
+
+ 1
+ 0
+ 9
+ 0
+ Filter
+
+
+ 2
+ 0
+ 3
+ 0
+ 4
+ 0
+ 5
+ 1
+ 6
+ 1120623594
+ 7
+ 1060439283
+ 8
+ -1069504319
+
+
+ 2
+ 0
+ 3
+ 3
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1134130816
+ 7
+ 1068239080
+ 8
+ -1073964333
+
+
+ 2
+ 0
+ 3
+ 4
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1143149396
+ 7
+ 1069838081
+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3
+ 7
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1138536183
+ 7
+ 1094714319
+ 8
+ -1069046873
+
+
+ 2
+ 1
+ 3
+ 9
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1134823262
+ 7
+ 1088568216
+ 8
+ -1073319056
+
+
+ 2
+ 1
+ 3
+ 10
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1140763936
+ 7
+ 1095878445
+ 8
+ -1066910782
+
+
+ 2
+ 1
+ 3
+ 11
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1150711009
+ 7
+ 1082220668
+ 8
+ -1072251010
+
+
+ 2
+ 1
+ 3
+ 22
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1169045837
+ 7
+ 1080998247
+ 8
+ -1076100424
+
+
+ 2
+ 1
+ 3
+ 23
+ 4
+ 0
+ 5
+ 6
+ 6
+ 1174718752
+ 7
+ 1074226939
+ 8
+ -1065842737
+
+
+ 2
+ 1
+ 3
+ 24
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1174256827
+ 7
+ 1091118565
+ 8
+ -1065842737
+
+
+
+ PatchbayInfo
+
+ InputPort0
+
+ PortInstance
+ 0
+ PortWidth
+ 1
+ SourceFuncInstance
+ 0
+ SourcePortIndex
+ 0
+
+ InputPort1
+
+ PortInstance
+ 1
+ PortWidth
+ 1
+ SourceFuncInstance
+ 0
+ SourcePortIndex
+ 1
+
+
+
+ DspFunction2
+
+ FunctionInfo
+
+ DspFuncInstance
+ 2
+ DspFuncName
+ DspGainStage
+ DspFuncProcessingIndex
+ 2
+
+ ParameterInfo
+
+ 1
+ 0
+ 2
+ 1065353216
+ 3
+ 1065353216
+
+ PatchbayInfo
+
+ InputPort0
+
+ PortInstance
+ 0
+ PortWidth
+ 1
+ SourceFuncInstance
+ 1
+ SourcePortIndex
+ 0
+
+ InputPort1
+
+ PortInstance
+ 1
+ PortWidth
+ 1
+ SourceFuncInstance
+ 1
+ SourcePortIndex
+ 1
+
+
+
+ DspFunction3
+
+ FunctionInfo
+
+ DspFuncInstance
+ 3
+ DspFuncName
+ DspClientGainAdjustStage
+ DspFuncProcessingIndex
+ 3
+
+ ParameterInfo
+
+ 1
+ 1
+ 2
+ 0
+ 3
+ 1082130432
+ 4
+ 1103626240
+ 5
+ 1
+ 6
+ 1082130432
+ 7
+ 3
+ 8
+ 0
+
+ PatchbayInfo
+
+ InputPort0
+
+ PortInstance
+ 0
+ PortWidth
+ 1
+ SourceFuncInstance
+ 2
+ SourcePortIndex
+ 0
+
+ InputPort1
+
+ PortInstance
+ 1
+ PortWidth
+ 1
+ SourceFuncInstance
+ 2
+ SourcePortIndex
+ 1
+
+
+
+
+
+
+ Mic
+
+ MuteGPIO
+ 1342242842
+ SignalProcessing
+
+ SoftwareDSP
+
+ DspFunction0
+
+ FunctionInfo
+
+ DspFuncInstance
+ 0
+ DspFuncName
+ DspNoiseReduction
+ DspFuncProcessingIndex
+ 0
+
+ ParameterInfo
+
+ 1
+ 0
+ 2
+ 1
+ 3
+ 0
+ 4
+ -1063256063
+ 5
+ O7qJwvAsd8IxFYLCNC+Iwgh8h8JYT3zCTGxtwjCQbMLsb3/C58KIwmIAjcKqEZTCM22Xwr5/k8L6Q5DCUXiPwhlqksKOQ5TCQS2XwkCYnMLSmqPCbK+owlyQq8I0AazCbnGnwkmOosLZX6HCVuujwsbgqMLF76vCmNaswvjzqsKJLarC9luqwvxyqcLWr6XCdkajwulQpMJs1afCbmCqwqbpqcIaSKrCSrmpwjv+p8KjIqjCVkOowh9WqMLun6nCudimwvISp8K686rC+KqowpS1psL0aqnCrv6rwti3qcJ6XqfC0Hemws04psKaw6fCJrOqwoMorMLbHq3CF8GswgJLr8Ku2a/C01aswjRirMLYuq3C2TSwwuZ1ssLUerPC3H60wrzAtMJG97HCSAuxwu5wscKSarPCQGK1woYFtcIw7LHCOMuxwiKZs8K8YrXC6nO4ws5cu8KCa73CJjG+wqekvMK9RLnC4/a2wuKBt8Jy/LfCLty7wk/ovsICsr7ChC7Awtobw8LCI8PCqfnDwuBGxcK65MTCf1jFwr65x8KDesrC7cHKwkXiysI+5c3Cqh/Rwhmf0cImvtPClErXwmrF18JUfdvCNi7fwty43cL+WdvCuqrawiIL3cKCR+HCYPDnwqQ67MLYserCshHowl7L6MK2guzCsvrvwu4o8cJyfv7C
+
+ PatchbayInfo
+
+
+ DspFunction1
+
+ FunctionInfo
+
+ DspFuncInstance
+ 1
+ DspFuncName
+ DspEqualization32
+ DspFuncProcessingIndex
+ 1
+
+ ParameterInfo
+
+ 1
+ 0
+ 9
+ 0
+ Filter
+
+
+ 2
+ 0
+ 3
+ 0
+ 4
+ 0
+ 5
+ 1
+ 6
+ 1120623594
+ 7
+ 1060439283
+ 8
+ -1069504319
+
+
+ 2
+ 0
+ 3
+ 3
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1134130816
+ 7
+ 1068239080
+ 8
+ -1073964333
+
+
+ 2
+ 0
+ 3
+ 4
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1143149396
+ 7
+ 1069838081
+ 8
+ -1072785033
+
+
+ 2
+ 0
+ 3
+ 5
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1161109679
+ 7
+ 1093706804
+ 8
+ -1069580896
+
+
+ 2
+ 0
+ 3
+ 7
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1138536183
+ 7
+ 1094714319
+ 8
+ -1069046873
+
+
+ 2
+ 0
+ 3
+ 9
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1134823262
+ 7
+ 1088568216
+ 8
+ -1073319056
+
+
+ 2
+ 0
+ 3
+ 10
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1140763936
+ 7
+ 1095878445
+ 8
+ -1066910782
+
+
+ 2
+ 0
+ 3
+ 11
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1150711009
+ 7
+ 1082220668
+ 8
+ -1072251010
+
+
+ 2
+ 0
+ 3
+ 22
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1169045837
+ 7
+ 1080998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
+ 3
+ 24
+ 4
+ 0
+ 5
+ 4
+ 6
+ 1174256827
+ 7
+ 1091118565
+ 8
+ -1065842737
+
+
+
+ PatchbayInfo
+
+ InputPort0
+
+ PortInstance
+ 0
+ PortWidth
+ 1
+ SourceFuncInstance
+ 0
+ SourcePortIndex
+ 0
+
+ InputPort1
+
+ PortInstance
+ 1
+ PortWidth
+ 1
+ SourceFuncInstance
+ 0
+ SourcePortIndex
+ 1
+
+
+
+ DspFunction2
+
+ FunctionInfo
+
+ DspFuncInstance
+ 2
+ DspFuncName
+ DspGainStage
+ DspFuncProcessingIndex
+ 2
+
+ ParameterInfo
+
+ 1
+ 0
+ 2
+ 1065353216
+ 3
+ 1065353216
+
+ PatchbayInfo
+
+ InputPort0
+
+ PortInstance
+ 0
+ PortWidth
+ 1
+ SourceFuncInstance
+ 1
+ SourcePortIndex
+ 0
+
+ InputPort1
+
+ PortInstance
+ 1
+ PortWidth
+ 1
+ SourceFuncInstance
+ 1
+ SourcePortIndex
+ 1
+
+
+
+ DspFunction3
+
+ FunctionInfo
+
+ DspFuncInstance
+ 3
+ DspFuncName
+ DspClientGainAdjustStage
+ DspFuncProcessingIndex
+ 3
+
+ ParameterInfo
+
+ 1
+ 1
+ 2
+ 0
+ 3
+ 1082130432
+ 4
+ 1103626240
+ 5
+ 1
+ 6
+ 1082130432
+ 7
+ 3
+ 8
+ 0
+
+ PatchbayInfo
+
+ InputPort0
+
+ PortInstance
+ 0
+ PortWidth
+ 1
+ SourceFuncInstance
+ 2
+ SourcePortIndex
+ 0
+
+ InputPort1
+
+ PortInstance
+ 1
+ PortWidth
+ 1
+ SourceFuncInstance
+ 2
+ SourcePortIndex
+ 1
+
+
+
+
+
+
+ Outputs
+
+ Headphone
+ IntSpeaker
+
+ PathMapID
+ 212
+
+
+
diff --git a/Resources/PinConfigs.kext/Contents/Info.plist b/Resources/PinConfigs.kext/Contents/Info.plist
index 1ebc4977f7..4a5416ab27 100755
--- a/Resources/PinConfigs.kext/Contents/Info.plist
+++ b/Resources/PinConfigs.kext/Contents/Info.plist
@@ -4666,6 +4666,24 @@
WakeVerbReinit
+
+ AFGLowPowerState
+ AwAAAA==
+ Codec
+ ALC287 for Legion 5 Pro(R9000p)
+ CodecID
+ 283902599
+ ConfigData
+ ASccQAEnHQEBJx6gAScfkAE3HPABNx0AATceAAE3H0ABRxwQAUcdAQFHHhcBRx+QAUcMAgF3HPABdx0AAXceAAF3H0ABhxzwAYcdAAGHHgABhx9AAZccMAGXHRABlx6BAZcfAwGnHPABpx0AAaceAAGnH0ABtxzwAbcdAAG3HgABtx9AAdcc8AHXHQAB1x4AAdcfQAHnHPAB5x0AAeceAAHXH0ACFxwgAhcdEAIXHiECFx8DAhcMAg==
+ FuncGroup
+ 1
+ LayoutID
+ 13
+ WakeConfigData
+ AhcMAg==
+ WakeVerbReinit
+
+
AFGLowPowerState
AwAAAA==