mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-21 14:40:52 +10:00
Add AppleALC support
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
- Aids BootCamp support for EFI based installs on 2010 and older Macs
|
- Aids BootCamp support for EFI based installs on 2010 and older Macs
|
||||||
- Fix CPU Boosting on 2011 and older Macs
|
- Fix CPU Boosting on 2011 and older Macs
|
||||||
- Add basic support for Xserve2,1
|
- Add basic support for Xserve2,1
|
||||||
|
- Add AppleALC support(b24daa4 - 1.6.0 rolling - 04-09-2021), remove AppleHDA patching requirement
|
||||||
|
|
||||||
## 0.0.21
|
## 0.0.21
|
||||||
- Fix botched images in OpenCanopy
|
- Fix botched images in OpenCanopy
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class Constants:
|
|||||||
self.telemetrap_version = "1.0.0"
|
self.telemetrap_version = "1.0.0"
|
||||||
self.io80211high_sierra_version = "1.0.0"
|
self.io80211high_sierra_version = "1.0.0"
|
||||||
self.io80211mojave_version = "1.0.0"
|
self.io80211mojave_version = "1.0.0"
|
||||||
self.voodoohda_version = "296"
|
self.applealc_version = "1.6.0"
|
||||||
self.restrictevents_version = "1.0.0"
|
self.restrictevents_version = "1.0.0"
|
||||||
self.restrictevents_mbp_version = "1.0.1"
|
self.restrictevents_mbp_version = "1.0.1"
|
||||||
self.piixata_version = "1.0.0"
|
self.piixata_version = "1.0.0"
|
||||||
@@ -128,7 +128,7 @@ class Constants:
|
|||||||
@property
|
@property
|
||||||
def io80211mojave_path(self): return self.payload_kexts_path / Path(f"Wifi/IO80211Mojave-v{self.io80211mojave_version}.zip")
|
def io80211mojave_path(self): return self.payload_kexts_path / Path(f"Wifi/IO80211Mojave-v{self.io80211mojave_version}.zip")
|
||||||
@property
|
@property
|
||||||
def voodoohda_path(self): return self.payload_kexts_path / Path(f"Audio/VoodooHDA-v{self.voodoohda_version}.zip")
|
def applealc_path(self): return self.payload_kexts_path / Path(f"Acidanthera/AppleALC-v{self.applealc_version}.zip")
|
||||||
@property
|
@property
|
||||||
def piixata_path(self): return self.payload_kexts_path / Path(f"Misc/AppleIntelPIIXATA-v{self.piixata_version}.zip")
|
def piixata_path(self): return self.payload_kexts_path / Path(f"Misc/AppleIntelPIIXATA-v{self.piixata_version}.zip")
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -281,6 +281,26 @@ LegacyAudio = [
|
|||||||
"Dortania1,1"
|
"Dortania1,1"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
nvidiaHDEF = [
|
||||||
|
"MacBook5,1",
|
||||||
|
"MacBook5,2",
|
||||||
|
"MacBook6,1",
|
||||||
|
"MacBook7,1",
|
||||||
|
"MacBookAir2,1",
|
||||||
|
"MacBookAir3,1",
|
||||||
|
"MacBookAir3,2",
|
||||||
|
"MacBookPro5,1",
|
||||||
|
"MacBookPro5,2",
|
||||||
|
"MacBookPro5,3",
|
||||||
|
"MacBookPro5,4",
|
||||||
|
"MacBookPro5,5",
|
||||||
|
"MacBookPro7,1",
|
||||||
|
"Macmini3,1",
|
||||||
|
"Macmini4,1",
|
||||||
|
"iMac9,1",
|
||||||
|
"iMac10,1"
|
||||||
|
]
|
||||||
|
|
||||||
## GPU
|
## GPU
|
||||||
|
|
||||||
LegacyGPU = [
|
LegacyGPU = [
|
||||||
|
|||||||
@@ -176,15 +176,6 @@ class PatchSysVolume:
|
|||||||
self.constants.current_gpuv = [line.strip().split(": ", 1)[1] for line in current_gpu.split("\n") if line.strip().startswith(("Vendor"))][0]
|
self.constants.current_gpuv = [line.strip().split(": ", 1)[1] for line in current_gpu.split("\n") if line.strip().startswith(("Vendor"))][0]
|
||||||
self.constants.current_gpud = [line.strip().split(": ", 1)[1] for line in current_gpu.split("\n") if line.strip().startswith(("Device ID"))][0]
|
self.constants.current_gpud = [line.strip().split(": ", 1)[1] for line in current_gpu.split("\n") if line.strip().startswith(("Device ID"))][0]
|
||||||
|
|
||||||
# Start Patch engine
|
|
||||||
if self.model in ModelArray.LegacyAudio:
|
|
||||||
print("- Attempting AppleHDA Patch")
|
|
||||||
subprocess.run(f"sudo rm -R {self.mount_extensions}/AppleHDA.kext".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
|
||||||
subprocess.run(f"sudo cp -R {self.constants.applehda_path} {self.mount_extensions}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
|
||||||
subprocess.run(f"sudo chmod -Rf 755 {self.mount_extensions}/AppleHDA.kext".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
|
||||||
subprocess.run(f"sudo chown -Rf root:wheel {self.mount_extensions}/AppleHDA.kext".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
|
||||||
rebuild_required = True
|
|
||||||
|
|
||||||
if (self.model in ModelArray.LegacyGPU) and (Path(self.constants.hiddhack_path).exists()):
|
if (self.model in ModelArray.LegacyGPU) and (Path(self.constants.hiddhack_path).exists()):
|
||||||
print(f"- Detected GPU: {self.constants.current_gpuv} {self.constants.current_gpud}")
|
print(f"- Detected GPU: {self.constants.current_gpuv} {self.constants.current_gpud}")
|
||||||
if (self.constants.current_gpuv == "AMD (0x1002)") & (self.constants.current_gpud in ModelArray.AMDMXMGPUs):
|
if (self.constants.current_gpuv == "AMD (0x1002)") & (self.constants.current_gpud in ModelArray.AMDMXMGPUs):
|
||||||
|
|||||||
+13
-1
@@ -89,7 +89,7 @@ class BuildOpenCore:
|
|||||||
("MarvelYukonEthernet.kext", self.constants.marvel_version, self.constants.marvel_path, lambda: self.model in ModelArray.EthernetMarvell),
|
("MarvelYukonEthernet.kext", self.constants.marvel_version, self.constants.marvel_path, lambda: self.model in ModelArray.EthernetMarvell),
|
||||||
("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path, lambda: self.model in ModelArray.EthernetBroadcom),
|
("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path, lambda: self.model in ModelArray.EthernetBroadcom),
|
||||||
# Legacy audio
|
# Legacy audio
|
||||||
#("VoodooHDA.kext", self.constants.voodoohda_version, self.constants.voodoohda_path, lambda: self.model in ModelArray.LegacyAudio),
|
("AppleALC.kext", self.constants.applealc_version, self.constants.applealc_path, lambda: self.model in ModelArray.LegacyAudio),
|
||||||
# IDE patch
|
# IDE patch
|
||||||
("AppleIntelPIIXATA.kext", self.constants.piixata_version, self.constants.piixata_path, lambda: self.model in ModelArray.IDEPatch),
|
("AppleIntelPIIXATA.kext", self.constants.piixata_version, self.constants.piixata_path, lambda: self.model in ModelArray.IDEPatch),
|
||||||
# Hibernation Tests
|
# Hibernation Tests
|
||||||
@@ -198,6 +198,18 @@ class BuildOpenCore:
|
|||||||
print("- Setting HiDPI picker")
|
print("- Setting HiDPI picker")
|
||||||
self.config["NVRAM"]["Add"]["4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14"]["UIScale"] = binascii.unhexlify("02")
|
self.config["NVRAM"]["Add"]["4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14"]["UIScale"] = binascii.unhexlify("02")
|
||||||
|
|
||||||
|
# Audio Patch
|
||||||
|
if self.model in ModelArray.LegacyAudio:
|
||||||
|
print("- Adding audio properties")
|
||||||
|
if self.model in ModelArray.nvidiaHDEF:
|
||||||
|
hdef_path = "PciRoot(0x0)/Pci(0x8,0x0)"
|
||||||
|
else:
|
||||||
|
hdef_path = "PciRoot(0x0)/Pci(0x1b,0x0)"
|
||||||
|
# In AppleALC, MacPro3,1's original layout is already in use, forcing layout 13 instead
|
||||||
|
if self.model != "MacPro3,1":
|
||||||
|
self.config["DeviceProperties"]["Add"][hdef_path] = {"apple-layout-id": 90, "use-apple-layout-id": 1, "alc-layout-id": 13,}
|
||||||
|
else:
|
||||||
|
self.config["DeviceProperties"]["Add"][hdef_path] = {"apple-layout-id": 90, "use-apple-layout-id": 1, "use-layout-id": 1,}
|
||||||
|
|
||||||
def nvidia_patch(self):
|
def nvidia_patch(self):
|
||||||
self.constants.custom_mxm_gpu = True
|
self.constants.custom_mxm_gpu = True
|
||||||
|
|||||||
@@ -210,6 +210,24 @@
|
|||||||
<key>PlistPath</key>
|
<key>PlistPath</key>
|
||||||
<string>Contents/Info.plist</string>
|
<string>Contents/Info.plist</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Arch</key>
|
||||||
|
<string>x86_64</string>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>AppleHDA Patching</string>
|
||||||
|
<key>Enabled</key>
|
||||||
|
<false/>
|
||||||
|
<key>MaxKernel</key>
|
||||||
|
<string></string>
|
||||||
|
<key>MinKernel</key>
|
||||||
|
<string>19.0.0</string>
|
||||||
|
<key>BundlePath</key>
|
||||||
|
<string>AppleALC.kext</string>
|
||||||
|
<key>ExecutablePath</key>
|
||||||
|
<string>Contents/MacOS/AppleALC</string>
|
||||||
|
<key>PlistPath</key>
|
||||||
|
<string>Contents/Info.plist</string>
|
||||||
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
<key>Arch</key>
|
<key>Arch</key>
|
||||||
<string>x86_64</string>
|
<string>x86_64</string>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user