diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4729acc46..d739e491c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@
- Aids BootCamp support for EFI based installs on 2010 and older Macs
- Fix CPU Boosting on 2011 and older Macs
- Add basic support for Xserve2,1
+- Add AppleALC support(b24daa4 - 1.6.0 rolling - 04-09-2021), remove AppleHDA patching requirement
## 0.0.21
- Fix botched images in OpenCanopy
diff --git a/Resources/Constants.py b/Resources/Constants.py
index 9d2170db0..3e53de749 100644
--- a/Resources/Constants.py
+++ b/Resources/Constants.py
@@ -23,7 +23,7 @@ class Constants:
self.telemetrap_version = "1.0.0"
self.io80211high_sierra_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_mbp_version = "1.0.1"
self.piixata_version = "1.0.0"
@@ -128,7 +128,7 @@ class Constants:
@property
def io80211mojave_path(self): return self.payload_kexts_path / Path(f"Wifi/IO80211Mojave-v{self.io80211mojave_version}.zip")
@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
def piixata_path(self): return self.payload_kexts_path / Path(f"Misc/AppleIntelPIIXATA-v{self.piixata_version}.zip")
@property
diff --git a/Resources/ModelArray.py b/Resources/ModelArray.py
index 72c528072..316a07bee 100644
--- a/Resources/ModelArray.py
+++ b/Resources/ModelArray.py
@@ -281,6 +281,26 @@ LegacyAudio = [
"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
LegacyGPU = [
diff --git a/Resources/SysPatch.py b/Resources/SysPatch.py
index 756262681..06bdd3f14 100644
--- a/Resources/SysPatch.py
+++ b/Resources/SysPatch.py
@@ -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_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()):
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):
diff --git a/Resources/build.py b/Resources/build.py
index d5d2adcbe..bc26b4cd3 100644
--- a/Resources/build.py
+++ b/Resources/build.py
@@ -89,7 +89,7 @@ class BuildOpenCore:
("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),
# 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
("AppleIntelPIIXATA.kext", self.constants.piixata_version, self.constants.piixata_path, lambda: self.model in ModelArray.IDEPatch),
# Hibernation Tests
@@ -198,6 +198,18 @@ class BuildOpenCore:
print("- Setting HiDPI picker")
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):
self.constants.custom_mxm_gpu = True
diff --git a/payloads/Config/v0.6.8/config.plist b/payloads/Config/v0.6.8/config.plist
index ceac1fa39..056eec840 100644
--- a/payloads/Config/v0.6.8/config.plist
+++ b/payloads/Config/v0.6.8/config.plist
@@ -210,6 +210,24 @@
PlistPath
Contents/Info.plist
+
+ Arch
+ x86_64
+ Comment
+ AppleHDA Patching
+ Enabled
+
+ MaxKernel
+
+ MinKernel
+ 19.0.0
+ BundlePath
+ AppleALC.kext
+ ExecutablePath
+ Contents/MacOS/AppleALC
+ PlistPath
+ Contents/Info.plist
+
Arch
x86_64
diff --git a/payloads/Kexts/Acidanthera/AppleALC-v1.6.0.zip b/payloads/Kexts/Acidanthera/AppleALC-v1.6.0.zip
new file mode 100644
index 000000000..143ca6ca1
Binary files /dev/null and b/payloads/Kexts/Acidanthera/AppleALC-v1.6.0.zip differ