Repository navigation
Camera on the M3 MacBook Air (J613) with 26.6.2 firmware - #119
Closed
scottjones wants to merge 2 commits into
Closed
scottjones wants to merge 2 commits into
scottjones wants to merge 2 commits into
Conversation
m1n1 sets apple,firmware-version and apple,firmware-compat to 26.6.2 on a 13" M3 MacBook Air (J613) whose stub runs macOS 26.6.2 (25G83) OS firmware. The driver did not know that version, so fw_compat was unknown and isp_cmd_ch_set_file_load() sent the 32-bit CH_SET_FILE_LOAD record. The 26.6.2 firmware reads the 64-bit layout: it took the setfile address from the wrong fields and faulted on it (FFW_Platform_Catch, far 0x3c00101c000, the data surface at 0x101c000 with garbage above it), and every later command timed out. Recognise 26.6.2, which orders after 14.7, so the 64-bit record is used. That is the only place the driver compares fw_compat. Tested on J613 (system firmware 27.0, OS firmware 26.6.2): the setfile loads in about 1 ms instead of faulting. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Scott Jones <[email protected]>
With the 26.6.2 firmware recognised, the J613 IMX558 streams once two more things change for that firmware: - Setfile: use 1925_03, the header version 0x21 IMX558 setfile in the 26.6.2 (25G83) appleh16camerad, as the H17 firmware already does. 1925_03 is what this was tested with; 1921_01 crashed the firmware before the CH_SET_FILE_LOAD fix and was not retried after it. - Temporal filter: do not enable MBNR, the temporal filter or motion history. This firmware runs them through the neural engine (it logs "MLVNR ... aneclient not ready"). With them enabled, the sensor streams, but every frame stays in the temporal filter's input queue: the firmware reports "Raw output buffer unavailable" and "Host metadata unavailable", delivers nothing, and asserts in CVideoFlowH15Cmd.cpp line 714 when the stream is stopped. With them off, frames reach the host. H17 and older firmware are unchanged. Tested on J613 (system firmware 27.0, OS firmware 26.6.2, m1n1 with an ISP heap for T8122 on 26.6.2): 1920x1080 NV12 at 30 fps, exposed and in colour with the setfile; two streams in a row, with the firmware stopped and booted again in between. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Scott Jones <[email protected]>
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.
Drafted with an AI assistant (Claude Code); I reviewed it before opening. The commits carry
Assisted-by: Claude:claude-opus-5-5.The FaceTime camera on the 13" M3 Air (J613) streams on 26.6.2 OS firmware with these two driver changes, plus an ISP heap in m1n1 (not part of this PR, see below). Background and logs are in #117.
Commits
fw_compatwas unknown andisp_cmd_ch_set_file_load()sent the 32-bitCH_SET_FILE_LOADrecord. The 26.6.2 firmware reads the 64-bit layout and faulted on the address it found there (FFW_Platform_Catch, far0x3c00101c000); every later command timed out. Recognising 26.6.2 (after 14.7) selects the 64-bit record. That is the onlyfw_compatcomparison in the driver.1925_03, the header version 0x21 IMX558 setfile in the 26.6.2 (25G83)appleh16camerad, as the H17 path already does.MLVNR ... aneclient not ready). With them on, the sensor streams, but every frame stays in the temporal filter's input queue (Raw output buffer unavailable,Host metadata unavailable), nothing is delivered, and the firmware asserts inCVideoFlowH15Cmd.cppline 714 when the stream stops.H17 and older firmware take the same paths as before.
Tested (J613)
The Mac runs system firmware 27.0 and OS firmware 26.6.2, with m1n1
aurora17-5plus a T8122 + 26.6.2 ISP heap. The kernel is 2026.10.11.15, and this branch's two commits were built asapple-isp.koon that base with the release config and toolchain.ISP firmware-compat: 26.6.2, sensor0x558detected,/dev/video1with the IMX558 presetsisp_1925_03XX.datloads in about 1 msTo narrow it down I also tried resident firmware (as on T8140) and allocating the 0x5240-byte capture metadata the firmware reports in
CH_INFO_GET. Neither is needed. Re-enabling the temporal filter stages brings the stall and the assert back.On
integration/aurora(cadfb30a) both commits apply cleanly, checkpatch is clean, anddrivers/media/platform/apple/ispcompiles with the release config. I didn't do a full kernel build there.Not in this PR
isp_init()only has aheap_topforV14_7, so it fails withisp: unsupported firmwareand the ISP node stays disabled. On J613 the 26.6.2 firmware segments end at iova0xdf0000, and the 14.7 value of0x1000000works, giving a 2112 KiB heap.isp_1925_03XX.datisn't in the firmware the installer currently extracts for the M3 Air; upstream's collection scans onlyappleh13camerad. Without it the driver streams uncalibrated (setfile ... not loaded, streaming without calibration), and the picture is dark. The extended collection in Add MacBook Neo installation and native Recovery setup omarchy-mac-installer#57 (MacBook Neo only so far) would cover J613/J615 too.never received magic number from firmware/firmware did not suspend, stopping it, and the firmware rejects command0xc021while applying the setfile. Neither affects the next stream.🤖 Generated with Claude Code