Qonfused / ASUS-ZenBook-Duo-14-UX481-Hackintosh

OpenCore configuration for the ASUS ZenBook Duo 14" (UX481FA/FL)
https://github.com/Qonfused/ASUS-ZenBook-Duo-14-UX481-Hackintosh
BSD 3-Clause "New" or "Revised" License
29 stars 1 forks source link

[Kernel/FB] Fix HDMI audio #51

Closed Qonfused closed 3 months ago

Qonfused commented 4 months ago

It's possible that HDMI audio does not work due to an unset power well state. This was discovered from a check that looks for the presence of a connector flag (from the internal display, oddly enough).

This check was found in AppleIntelFramebufferController::getPowerWellState: https://github.com/acidanthera/WhateverGreen/blob/c5a5f507f54a6ff1d17e048fb9456302ef2a3702/WhateverGreen/kern_fb.hpp#L138-L142:

0x100 // Activates Power Well 2 usage (SKL_PW_CTL_IDX_PW_2)
0x80  // Activates MISC IO power well (SKL_DISP_PW_MISC_IO)

I've previously encountered this in https://github.com/Qonfused/ASUS-ZenBook-Duo-14-UX481-Hackintosh/issues/4#issuecomment-1483911815, which brings some related points to this issue (as both audio and DDI_B lanes are within the power domain of PW2).

For HDMI (digital audio), the suggested fix is to change the connector flags for the internal display (con0) from 98000000 to 98010000:

framebuffer-con0-alldata | Data | <00000800 02000000 98010000>
framebuffer-con0-enable  | Data | <01000000>