mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 22:20:53 +10:00
Add Modern Audio patch set foundation for macOS 26. Note that this requires PSPKG update, which needs to be done in PSPKG.
This commit is contained in:
@@ -41,6 +41,7 @@ from .hardware.misc import (
|
|||||||
gmux,
|
gmux,
|
||||||
keyboard_backlight,
|
keyboard_backlight,
|
||||||
legacy_audio,
|
legacy_audio,
|
||||||
|
modern_audio,
|
||||||
pcie_webcam,
|
pcie_webcam,
|
||||||
t1_security,
|
t1_security,
|
||||||
usb11,
|
usb11,
|
||||||
@@ -127,10 +128,12 @@ class HardwarePatchsetDetection:
|
|||||||
legacy_wireless.LegacyWireless,
|
legacy_wireless.LegacyWireless,
|
||||||
modern_wireless.ModernWireless,
|
modern_wireless.ModernWireless,
|
||||||
|
|
||||||
|
legacy_audio.LegacyAudio,
|
||||||
|
modern_audio.ModernAudio,
|
||||||
|
|
||||||
display_backlight.DisplayBacklight,
|
display_backlight.DisplayBacklight,
|
||||||
gmux.GraphicsMultiplexer,
|
gmux.GraphicsMultiplexer,
|
||||||
keyboard_backlight.KeyboardBacklight,
|
keyboard_backlight.KeyboardBacklight,
|
||||||
legacy_audio.LegacyAudio,
|
|
||||||
pcie_webcam.PCIeFaceTimeCamera,
|
pcie_webcam.PCIeFaceTimeCamera,
|
||||||
t1_security.T1SecurityChip,
|
t1_security.T1SecurityChip,
|
||||||
usb11.USB11Controller,
|
usb11.USB11Controller,
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
"""
|
||||||
|
modern_audio.py: Modern Audio patch set for macOS 26
|
||||||
|
"""
|
||||||
|
|
||||||
|
from ..base import BaseHardware, HardwareVariant
|
||||||
|
|
||||||
|
from ...base import PatchType
|
||||||
|
|
||||||
|
from .....constants import Constants
|
||||||
|
|
||||||
|
from .....datasets.os_data import os_data
|
||||||
|
|
||||||
|
|
||||||
|
class ModernAudio(BaseHardware):
|
||||||
|
|
||||||
|
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||||
|
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||||
|
|
||||||
|
|
||||||
|
def name(self) -> str:
|
||||||
|
"""
|
||||||
|
Display name for end users
|
||||||
|
"""
|
||||||
|
return f"{self.hardware_variant()}: Modern Audio"
|
||||||
|
|
||||||
|
|
||||||
|
def present(self) -> bool:
|
||||||
|
"""
|
||||||
|
AppleHDA was outright removed in macOS 26, so this patch set is always present if OS requires it
|
||||||
|
"""
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def native_os(self) -> bool:
|
||||||
|
"""
|
||||||
|
- Everything before macOS Tahoe 26 is considered native
|
||||||
|
"""
|
||||||
|
return self._xnu_major < os_data.tahoe.value
|
||||||
|
|
||||||
|
|
||||||
|
def hardware_variant(self) -> HardwareVariant:
|
||||||
|
"""
|
||||||
|
Type of hardware variant
|
||||||
|
"""
|
||||||
|
return HardwareVariant.MISCELLANEOUS
|
||||||
|
|
||||||
|
|
||||||
|
def _modern_audio_patches(self) -> dict:
|
||||||
|
"""
|
||||||
|
Patches for Modern Audio
|
||||||
|
"""
|
||||||
|
return {
|
||||||
|
"Modern Audio": {
|
||||||
|
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||||
|
"/System/Library/Extensions": {
|
||||||
|
"AppleHDA.kext": "26.0 Beta 1",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def patches(self) -> dict:
|
||||||
|
"""
|
||||||
|
Patches for modern audio
|
||||||
|
"""
|
||||||
|
if self.native_os() is True:
|
||||||
|
return {}
|
||||||
|
|
||||||
|
return self._modern_audio_patches()
|
||||||
Reference in New Issue
Block a user