Repository navigation
media: apple: ave: T8142 (M5) hardware encoder, enabled on J815 - #1803
Merged
DjDeveloperr merged 6 commits intoNov 13, 2026
Merged
Conversation
The M5 (T8142) has one AVE encoder laid out as the A18 Pro's: codec, mailbox and coprocessor windows, five power domains, two DARTs. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
With the macOS 27.0 stub, iBoot preloads the M5's build of the 26A428 encoder firmware (AppleAVE2FW_H17G, version 9013.45.1, the version the M5 Pro and Max run): TEXT 0x154000, DATA 0x12c000, TEXT CRC 8a3784bd (the IPSW's H17D image gives T6050's known 87279429 the same way). Select the 26A428 command layout for it: one AppleAVE2 kext builds the commands for every chip on that firmware. The chip identity is AppleAVE2's soc-id table (the ADT's ave soc-id is "t8142"): device 27, generation 16. The 26A428 firmware carries the same device table, and on T6050, device 28 in both, the traced boot configuration and handshake name that number, so T8142 boots as device 27, device type 27. AVE_SVECtrl gives generations 12 to 23 one SVE register block, so the idle word at mailbox +0x118 is cleared before the start as on T6050. The coprocessor is the A18 Pro's. Tested on a J815 (macOS 27.0 stub, aura Stage 2): the firmware CRCs match, the coprocessor starts, and with three B-frames (the 26A428 qualification) H.264 Main and HEVC Main 1280x720 encode 60 frames each (v4l2-ctl, 0.2 s / 0.4 s), and ffmpeg's h264_v4l2m2m encodes 150 frames of H.264 Baseline; all decode with ffprobe, DARTs clean before and after. 26A428 has no MCTF layout, so the temporal filter node stays absent. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
The 26A428 layout (T6050, T8142) is only qualified at 30 fps with three B-frames; other sessions fail with EOPNOTSUPP and only "cannot set up a session: -95" in the log (J815 boot 3328091f, ffmpeg's default -bf 0). Log the layout, the requested frame rate and the B-frame setting. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
From the J815 ADT: ave at 0x281100000 (the A18 Pro's encoder moved from 0x285000000), IRQs 1099/1093/1092/1095/1094, its two DARTs (DART and CPUDART) at +0x80000/+0xa0000 on IRQ 1096, and the VENC power tree (VENC_SYS +0x298 above VENC_DMA, PIPE4, PIPE5, ME0 and ME1 at +0x8000.. +0x8020, ME1 under ME0). All disabled; the boot loader hands over the preloaded firmware. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
The VENC power tree, both encoder DARTs and the encoder. The boot loader hands over the preloaded firmware, or disables the node when the ADT has no preload. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
DjDeveloperr
approved these changes
Nov 13, 2026
DjDeveloperr
left a comment
There was a problem hiding this comment.
Approve: the T8142 variant, compatible and TEXT CRC are new entries, and the 26A428 layout is selected by that CRC. On existing SoCs the only change is the info line when a counted layout refuses a session. Merging after a fresh CI run (the AVE files and t8142-j815.dts changed on the base since the last run).
DjDeveloperr
merged commit Nov 13, 2026
6df7569
into
aurora-silicon:integration/aurora
2 checks passed
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.
Hardware H.264/HEVC encoding on the M5, on the 26A428 command layout the M5 Pro/Max (T6050) driver already speaks.
apple,t8142-ave, laid out as the A18 Pro's encoder (codec, mailbox and coprocessor windows, five power domains, two DARTs).ave_layout_26a428. Chip identity from AppleAVE2's soc-id table and the firmware's own device table: t8142 = device 27, generation 16 (T6050 = 28, as traced). Generation 16 shares T6050's SVE block, so mailbox +0x118 is cleared before the start as on T6050.cannot set up a session: -95. It now logs the layout, the frame rate and the B-frame setting asked for. (ffmpeg's v4l2m2m wrapper always sets B_FRAMES 0, which is how we hit it.)Tested on J815 (first encodes on an M5): firmware CRCs match, coprocessor starts, DARTs clean before and after.
v4l2-ctlwithvideo_b_frames=3: H.264 Main 1280x720, 60 frames in 0.2 s; HEVC Main 1280x720, 60 frames in 0.4 s. Both decode with ffprobe.h264_v4l2m2m -profile:v 66(Baseline): 150 frames, decodes.Needs the boot loader hand-off: aurora-silicon/aura#215 (
apple,t8142-aveinave_compatiblesand the remap list). Without it, the node stays disabled.Related: #1597 (T6050), #1677 (T6041, merged), #1489 (T8132, open) add their own rows to the same tables. This is rebased on today's integration/aurora (after #1677 and #1747); the CRC list and the layout check keep every entry.
Not covered: 26A428 has no MCTF layout, so there is no temporal-filter node; no ProRes.
Part of the J815 (MacBook Air 15-inch, M5, T8142) bring-up: board results are summarised in discussion #135. Tested on a J815 with a macOS 27.0 stub (firmware 27.0) through aura Stage 2.
Assisted-by: Claude Opus 5.5