-
Notifications
You must be signed in to change notification settings - Fork 1k
Adding codec support
vit9696 edited this page Mar 10, 2016
·
13 revisions
This task is fairly simple and requires no programming skills. In short you are meant to edit a few plists, copy the necessary files, and rebuild the kernel extension using Xcode.
All the data to be possibly edited exists in Resources folder, and each supported codec is meant to lie in its subfolder with an arbitrary suitable name.
- Vendors.plist file is meant to contain all the necessary hardware manufacturers and their ids as an associative array. You will unlikely need to edit this.
- Kexts.plist file is meant to contain all the necessary kext information possibly used for patching. It also is an associative array with kext dictionaries containing:
- Id — CFBundleIdentifier from the kext's Info.plist;
- Paths — Possible kext locations in an array.
- CodecLookup.plist file is meant to let AppleALC detect your codecs by providing the IORegistry lookup paths. All the paths are prefixed, therefore PCI will match PCI0, for example.
- Tree — array containing the IORegistry path starting from IOService:/PCI/AppleACPIPlatformExpert, its last key is meant to contain IOHDACodecVendorID and IOHDACodecRevisionID properties;
- layoutNum — Tree path index containing layout-id property starting from 0.
Each codec must contain an Info.plist file describing the necessary changes AppleALC is to make. The other files in the folder may include layout/platform data mentioned in Info.plist. Info.plist should include:
- Vendor — Vendor name string from Vendors.plist;
- CodecID — Codec identifier (lower 2 bytes of IOHDACodecVendorID);
- CodecName — Human readable codec name for logging;
- Revisions — Supported codec revisions (IOHDACodecRevisionID values) in an array (optional, omit for no revision check)
- Author — Human readable modification author (optional);
- Files — All the files possibly needed for injection:
- Platforms — platform variants (optional):
- Id — matching layout-id number;
- Device - matching device-id number (optional);
- Path — file path in the codec directory;
- MinKernel — minimal suitable major kernel version (optional, see
uname -r
shell command); - MaxKernel — maximum suitable major kernel version (optional).
- Layouts — layout variants (optional):
- Id — matching layout-id number;
- Device - matching device-id number (optional);
- Path — file path in the codec directory;
- MinKernel — minimal suitable major kernel version (optional);
- MaxKernel — maximum suitable major kernel version (optional).
- Platforms — platform variants (optional):
- Patches — all the binary patches possibly needed for applying in an array (optional):
- Count — number of required replacements;
- Find — what to look for;
- Replace — what to replace with;
- Name — kext name from Kexts.plist;
- Device - matching device-id number (optional);
- MinKernel — minimal suitable major kernel version (optional);
- MaxKernel — maximum suitable major kernel version (optional).
- Check if your codec vendor is present in Vendors.plist and add it if necessary.
- Check if the kexts you plan to patch are present in Kexts.plist and add them if necessary.
- Check the paths of IOHDACodecVendorID/IOHDACodecRevisionID/layout-id for your codec in the IORegistry and add them to CodecLookup.plist if necessary.
- Create a codec folder in Resources and copy the necessary layouts and platforms inside.
- Create an Info.plist file filled with the necessary information structured accordingly to the previous section
- Rebuild the kext