mirror of
https://github.com/outbackdingo/OpCore-Simplify.git
synced 2026-08-25 14:53:06 +00:00
Add required audio controller check
This commit is contained in:
@@ -235,7 +235,7 @@ class ConfigProdigy:
|
||||
|
||||
return dict(sorted(igpu_properties.items(), key=lambda item: item[0]))
|
||||
|
||||
def select_audio_codec_layout(self, hardware_report, config=None):
|
||||
def select_audio_codec_layout(self, hardware_report, config=None, controller_required=False):
|
||||
try:
|
||||
for device_properties in config["DeviceProperties"]["Add"].values():
|
||||
if device_properties.get("layout-id"):
|
||||
@@ -260,6 +260,9 @@ class ConfigProdigy:
|
||||
if not codec_id:
|
||||
return None, None
|
||||
|
||||
if controller_required and not audio_controller_properties:
|
||||
return None, None
|
||||
|
||||
available_layouts = codec_layouts.data.get(codec_id)
|
||||
|
||||
recommended_authors = ("Mirone", "InsanelyDeepak", "Toleda", "DalianSky")
|
||||
@@ -355,7 +358,7 @@ class ConfigProdigy:
|
||||
"model": gpu_name
|
||||
})
|
||||
elif kext.name == "AppleALC":
|
||||
selected_layout_id, audio_controller_properties = self.select_audio_codec_layout(hardware_report)
|
||||
selected_layout_id, audio_controller_properties = self.select_audio_codec_layout(hardware_report, controller_required=True)
|
||||
|
||||
if selected_layout_id and audio_controller_properties:
|
||||
add_device_property(audio_controller_properties.get("PCI Path"), {"layout-id": selected_layout_id})
|
||||
|
||||
Reference in New Issue
Block a user