Add audio kext selection for macOS Tahoe 26

This commit is contained in:
Hoang Hong Quan
2025-08-30 16:28:18 +07:00
parent fcfd0ba2b6
commit 8390d0654c
2 changed files with 20 additions and 6 deletions

View File

@@ -88,13 +88,13 @@ class OCPE:
self.u.head("OpenCore Legacy Patcher Warning")
print("")
print("1. OpenCore Legacy Patcher is the only solution to enable dropped GPU and Broadcom WiFi")
print(" support in newer macOS versions.")
print(" support in newer macOS versions, as well as to bring back AppleHDA for macOS Tahoe 26.")
print("")
print("2. OpenCore Legacy Patcher disables macOS security features including SIP and AMFI, which may")
print(" lead to issues such as requiring full installers for updates, application crashes, and")
print(" system instability")
print(" system instability.")
print("")
print("3. OpenCore Legacy Patcher is not officially supported by any Hackintosh community.")
print("3. OpenCore Legacy Patcher is not officially supported for Hackintosh community.")
print("")
print("\033[91mImportant:\033[0m")
print("Please consider these risks carefully before proceeding.")
@@ -364,7 +364,7 @@ class OCPE:
if not self.ac.ensure_dsdt():
self.ac.select_acpi_tables()
self.ac.select_acpi_patches(customized_hardware, disabled_devices)
self.k.select_required_kexts(customized_hardware, macos_version, needs_oclp, self.ac.patches)
needs_oclp = self.k.select_required_kexts(customized_hardware, macos_version, needs_oclp, self.ac.patches)
self.s.smbios_specific_options(customized_hardware, smbios_model, macos_version, self.ac.patches, self.k)
elif option < 7:
try:
@@ -377,7 +377,7 @@ class OCPE:
macos_version = self.select_macos_version(hardware_report, native_macos_version, ocl_patched_macos_version)
customized_hardware, disabled_devices, needs_oclp = self.h.hardware_customization(hardware_report, macos_version)
smbios_model = self.s.select_smbios_model(customized_hardware, macos_version)
self.k.select_required_kexts(customized_hardware, macos_version, needs_oclp, self.ac.patches)
needs_oclp = self.k.select_required_kexts(customized_hardware, macos_version, needs_oclp, self.ac.patches)
self.s.smbios_specific_options(customized_hardware, smbios_model, macos_version, self.ac.patches, self.k)
elif option == 3:
self.ac.customize_patch_selection()

View File

@@ -121,7 +121,19 @@ class KextMaestro:
for codec_properties in hardware_report.get("Sound", {}).values():
if codec_properties.get("Device ID") in codec_layouts.data:
selected_kexts.append("AppleALC")
if self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("25.0.0"):
print("\n\033[93mNote:\033[0m Since macOS Tahoe 26 DP2, Apple has removed AppleHDA kext and uses the Apple T2 chip for audio management.")
print("To use AppleALC, you must rollback AppleHDA. Alternatively, you can use VoodooHDA.")
print("")
print("1. \033[1mAppleALC\033[0m - Requires AppleHDA rollback with OpenCore Legacy Patcher")
print("2. \033[1mVoodooHDA\033[0m - Lower audio quality, manual injection to /Library/Extensions")
print("")
kext_option = self.utils.request_input("Select audio kext for your system (default: AppleALC): ").strip() or "1"
if kext_option == "1":
needs_oclp = True
selected_kexts.append("AppleALC")
else:
selected_kexts.append("AppleALC")
if "AMD" in hardware_report.get("CPU").get("Manufacturer") and self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("21.4.0") or \
int(hardware_report.get("CPU").get("CPU Count")) > 1 and self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("19.0.0"):
@@ -374,6 +386,8 @@ class KextMaestro:
for name in selected_kexts:
self.check_kext(kext_data.kext_index_by_name.get(name), macos_version, "Beta" in os_data.get_macos_name_by_darwin(macos_version))
return needs_oclp
def install_kexts_to_efi(self, macos_version, kexts_directory):
for kext in self.kexts:
if kext.checked: