So to start, we'll need a couple things:
- Onboard audio output
- USB DACs will not work
- GPU audio out is a hit or miss
- AudioDxe in both EFI/OC/Drivers and UEFI -> Drivers
- Binary Resources
- Add the Resources folder to EFI/OC, just like we did with the OpenCore GUI section
- For those running out of space, OCEFIAudio_VoiceOver_Boot.wav is all that's required for the Boot-Chime
- Debug version of OpenCore with logging enabled
Settings up NVRAM:
- NVRAM -> Add -> 7C436110-AB2A-4BBB-A880-FE41995C9F82:
- SystemAudioVolume | Data | 0x46
- This is the boot-chime and screen reader volume, note it's in hexadecimal so would become 70 in decimal
Setting up UEFI -> Audio:
- AudioCodec:
- Codec address of Audio controller
- To find yours:
- Check IORegistryExplorer -> HDEF -> AppleHDAController -> IOHDACodecDevice and see the IOHDACodecAddress property
- ex: 0x0
- Can also check via terminal(Note if multiple show up, use the vendor ID to find the right device)l:
- ioreg -rxn IOHDACodecDevice | grep VendorID // List all possible devices
ioreg -rxn IOHDACodecDevice | grep IOHDACodecAddress // Grab the codec address
- Audio Device:
- PciRoot of audio controller
- Run gfxutilto find the path:
- /path/to/gfxutil -f HDEF
- ex: PciRoot(0x0)/Pci(0x1f,0x3)
- AudioOut:
- The specific output of your Audio controller, easiest way to find the right one is to go through each one(from 0 to N - 1)
- ex: 2
- You can find all the ones for your codec in the OpenCore debug logs:
06:065 00:004 OCAU: Matching PciRoot(0x0)/Pci(0x1F,0x3)/VenMsg(A9003FEB-D806-41DB-A491-5405FEEF46C3,00000000)...
06:070 00:005 OCAU: 1/2 PciRoot(0x0)/Pci(0x1F,0x3)/VenMsg(A9003FEB-D806-41DB-A491-5405FEEF46C3,00000000) (5 outputs) - Success
- AudioSupport:
- MinimumVolume:
- Volume level from 0 to 100
- To not blow the speakers, set it to 70
- Note boot-chime will not play if MinimumVolume is higher than SystemAudioVolume that we set back in the NVRAM section
- PlayChime:
- VolumeAmplifier:
- The Volume amplification, value will differ depending on your codec
- Formula is as follows:
- (SystemAudioVolume * VolumeAmplifier)/100 = Raw Volume(but cannot exceed 100)
- ex: (70 x VolumeAmplifier)/100 = 100 -> (100 x 100) / 70 = VolumeAmplifier = 142.9(we'll round it to 143 for simplicity)