Repository navigation
Native installer reads the macOS 27 speaker tuning; camera and AMKOR Bluetooth extraction - #101
Merged
Merged
Conversation
Add the IMX958 2224 setfile and the H17 IMX558 1925 setfile to the legacy extractor, and register 2224 in the native converter. Search both usr/sbin and usr/libexec for h13/h16 camera daemons and retain their flattened fallback inputs for device-local firmware updates. Copy only each setfile's published source length, then zero its alignment padding. This avoids reading the object after J700's short 1925 file. Reject conflicting inputs and cover extraction, truncation, padding and archive interoperability with synthetic data. Document that the existing raw factory archive preserves iCCl but the ISP upload ABI remains unknown. Setfile identities and lengths are public driver interoperability facts; no vendor or per-module calibration bytes are included. Assisted-by: LLM Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macOS 27 has no shared Tunings/DeviceDSPDatabase.plist. Each Mac's entry is in AID<n>/DSP/DSPDatabase.plist, so a fresh native install on macOS 27 left the speaker tuning out. NativeAudioTuningInputs now selects the database as the Python collector has since #100: the folder's own DSPDatabase.plist when it exists, the shared database otherwise. A folder database that holds exactly the AID<n> key goes into the bundle as DeviceDSPDatabase.plist byte for byte; anything else is reduced to that key. Mode names are not normalised. The built-in speaker modes' Path references are followed: references under AID<n>/ must be in the folder, references under Common/ are collected as shared files, and anything else, a traversal, a link or a missing file fails the collection. DRC/loudness-manager.plist is collected only when it lists this AID. The manifest gains the same device_dsp_database_source, shared_files and loudness_manager records the Python writer emits; schema stays 2. Tests build synthetic Tunings trees shaped like both layouts. Assisted-by: LLM Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
M4 Pro and M4 Max Macs carry a BCM4388C2 from AMKOR or USI. The Python
collector knew only MUR, USI and GEN, so it warned "Unable to determine
vendor" and dropped every AMKOR .bin and .ptb, and a Mac with an AMKOR
module got no Bluetooth firmware from asahi_firmware.update. The native
collector already maps AMKOR to "a". Map it the same way.
Found rebuilding the J616s vendorfw from its own macOS 27 firmware: the
hand-assembled set had brcmbt4388c2-apple,hostomel-a.{bin,ptb} and the
Python rebuild did not.
Assisted-by: LLM
Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Native installer: macOS 27 speaker tuning
NativeAudioTuningInputsread only the sharedTunings/DeviceDSPDatabase.plist. macOS 27 doesn't have that file, so a fresh native install on macOS 27 left the speaker tuning out. It now chooses the database the same way the Python collector has since #100:AID<n>/DSP/DSPDatabase.plistwhen the folder has one, and the shared database otherwise.AID<n>key, it goes into the bundle asDeviceDSPDatabase.plistbyte for byte. Anything else is reduced to that key. Mode names are not normalised.Pathreferences:AID<n>/must be in the folder;Common/becomeshared_files;DRC/loudness-manager.plistis collected only when it lists this AID.device_dsp_database_source,shared_filesandloudness_manager, the same records the Python writer emits. The schema stays at 2. When there is no loudness manager, the key is left out instead of being written as null, the same wayspeaker_idis already handled.The tests in
NativeAudioTuningLayoutTestsuse synthetic trees shaped like both layouts. No Apple data is involved.Extraction gaps found by rebuilding the J616s vendorfw from its own macOS
Ryan asked that the J616s's hand-built
vendorfw/be replaced with the output of the installer's own extraction. I booted macOS 27 (26A428) once withasahi-bless --nextand ran theasahi_firmwarecollections there, in the layoutStubInstaller.collect_firmwarewrites. Then I rebuiltvendorfwon Linux withupdate_firmwareand compared it with the hand-built set by path and hash. Two gaps showed up, and both are fixed here:isp_2224_01XX.dat(IMX958), and the H16 daemon now lives inusr/libexec. The fix is the commit from draft firmware: extract H17 camera tuning from current daemon locations #71, rebased ontomain, with a conflict instub.pyresolved so that the camera daemons andaudio-tuning/both go into the fallback archive.AMKOR, so it dropped every AMKOR module's.bin/.ptb.brcmbt4388c2-apple,hostomel-a.*was missing. It now maps AMKOR toa, asBroadcomFirmware.bluetoothalready does. New test:tests/test_bluetooth.py.The other differences from the hand-built set are expected, not gaps:
hostomel-{ID,X0,X2,X3}Wi-Fi names collapse into the board-wide name, because macOS 27's per-SKU files are identical. Both collectors prune the same way, and brcmfmac falls back to the board name.avd-fw-v5-t1.binis open firmware. The kernel package ships it in/usr/lib/firmware/updates/<release>/, and that copy takes precedence anyway.Tests
swift test --filter 'NativeAudioTuning|NativeInstallationFinishingTests|NeoFirmwareConversionTests'ran 38 tests, 0 failures.swift-format lint --strictis clean on the changed files.pytest testsgave 78 passed.Hardware (J616s, fleet16)
asahi/(withall_firmware.tar.gzand the kernelcache) and avendorfw/rebuilt byupdate_firmware. The hand-builtvendorfwwas backed up first and swapped out withRENAME_EXCHANGE.install-linux.sh --verifyfound the AID35 bundle complete and matching the ESP, with 0 SELinux denials.install-linux.sh --dry-runwith the collected tarball reports "identical".🤖 Generated with Claude Code