Skip to content

J813: AVD video decoder and ISP camera on the MacBook Air M5 - #999

Merged
Acelogic merged 5 commits into
aurora-silicon:aurora-wipfrom
sithglan:j813/rb/media
Nov 6, 2026
Merged

Acelogic merged 5 commits into
aurora-silicon:aurora-wipfrom
sithglan:j813/rb/media

Conversation

@sithglan

@sithglan sithglan commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor
  • AVD: the T8142 ("Hibiscus", avd-fw v5 tier 2) variant, the CM3 state on a failed start, and FFmpeg's HEVC slice parameter layout.
  • ISP: apple_isp_hw_t8142 (ISP17a with the J813 windows, the SCL1 path) and setfile_stride_fixup for the IMX958 setfile (isp_2224_01XX.dat, from macOS; not in linux-firmware).

The camera streams NV12 at 1280x720, 1440x1080, 1080x1080 and 1920x1080 with the firmware's own auto white balance: neutral at all four sizes once the presets scale from the IMX958's full-resolution mode (sensor config 7). In the binned mode (config 10), which the smaller presets used before, the firmware keeps the setfile's default white point and the picture is magenta. The preset change is in the DT PR of this series.

Tested on the MacBook Air 13-inch M5 (J813): the nine J813 branches (nvme, platform, dts, soc, wireless, media, sound, display, gpu-m5) merged onto integration/aurora 11eccbe, built with the J813 config (7.3.0) and booted through aura's aura-try trial boot. systemd reaches running: NVMe root, the N1 Wi-Fi, the AVD and ISP drivers, PSCI cpuidle, the E/P states, CLPC/PMC and the PMP come up, the M5 GPU backend starts firmware 25G76, and drm/apple drives the panel.

Two sound findings from that boot, neither yet resolved: the installed aura predates the amp-level injection now in aura main, so macaudio disables the speakers (the card binds, but the DT this boot used carries no apple,speaker-config); and opening the microphone fails with LEAP leaf 2 did not power up: Error(110), while the same T8152 driver on the J813's current 7.1 kernel records.

Stability caveat: a second boot of the same image hung about 38 s in, just after the NTP step set off the daily fstrim/apt timers, with no panic record (no pstore). The first boot went through the same timer burst and stayed up for minutes. Until the hang is understood, the combined tree is not proven stable across reboots.

Rebased onto integration/aurora c6cc36e (2026-11-06); this branch builds with the J813 config (Image.gz and modules). Booted on the MacBook Air M5 (J813) on 2026-11-06 in the combined stack: this branch merged with the other J813 branches, built as 7.3.0-aurora-j813-rb+ (Image.gz and 65 modules), trial-booted with the t8142-j813 DTB and promoted to the configured ESP boot, where it now boots by default. NVMe root, the N1 Wi-Fi, the DCP panel at 2560x1600, the aurora GPU driver (WebGL with EXT_shader_texture_lod), the AVD and ISP nodes, AOP sound (AppleJ813 card; a 1 kHz tone played to the speakers is captured by the HPAI microphone at about -50 dBFS) and the PMP all come up; systemd reports no failed units. btcentauri still returns -16, the known pre-existing condition.

cc @Acelogic @DjDeveloperr @RyanTheTide @LiamRay10

The M5 (T8142) has a Hibiscus generation AVD with the T8140 register
layout but its own firmware tunables and H.264 buffer layout.

Signed-off-by: Thomas Glanzmann <[email protected]>
The M5 AVD (macOS CAvdMcpuHibiscus, avd-version 4) uses T8140's VP slot
layout and v5 HEVC header with the avd-fw v5 tier 2 tunables. Its H.264
co-located motion vector buffer takes 128 bytes per macroblock instead
of 64; with 64 inter frames decode with corrupted motion.

Add AVD_QUIRK_H264_MV_128 and the t8142 variant. Tested on the J813
(MacBook Air M5): H.264, HEVC Main/Main10, VP9 and AV1 decode bit-exact
against the software decoders through GStreamer v4l2codecs and FFmpeg's
V4L2 request hwaccels.

Also mark the device runtime-suspended before enabling runtime PM in
probe, so a binding after a failed CM3 boot (e.g. missing firmware)
starts from a clean state instead of an inherited runtime PM error.

Signed-off-by: Thomas Glanzmann <[email protected]>
avd_boot() returned -ETIMEDOUT without a message when the CM3 did not
raise FLAG0, which made a wrong firmware image or a missing power domain
look like a silent probe failure. Log the flag value.

Signed-off-by: Thomas Glanzmann <[email protected]>
The M5's ISP is the A18 Pro's ISP17a at another base address.

Signed-off-by: Thomas Glanzmann <[email protected]>
The J813's ISP is the A18 Pro's ISP17a: the T8140 generation with the H17
firmware ABI, its own MMIO windows (the J813 ADT's dart-isp
dapf-instance-0 ranges, including a DSID window and two new ranges), the
PMP clock and bandwidth scratch registers, the T6031 mailbox interrupt
enable and the SCL1 output path (T8142 has no BES scaler).

Its IMX958 setfile (isp_2224_01XX.dat, the one macOS's appleh16camerad
selects for sensor 0x958) keeps the lens shading row strides where H17
reads the offset's high half, as the T6040's do: setfile_stride_fixup
zeroes them on T8142 too.

The camera streams at 1280x720 and 1920x1080 (NV12). White balance stays
at the setfile's default gains: the H17 firmware's AWB is semantic AWB,
which needs the ANE.

Signed-off-by: Thomas Glanzmann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants