Skip to content

media: apple: ave: T8142 (M5) hardware encoder, enabled on J815 - #1803

Merged
DjDeveloperr merged 6 commits into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/t8142-ave
Nov 13, 2026
Merged

DjDeveloperr merged 6 commits into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/t8142-ave

Conversation

@m0d16l14n1

Copy link
Copy Markdown

Hardware H.264/HEVC encoding on the M5, on the 26A428 command layout the M5 Pro/Max (T6050) driver already speaks.

  1. dt-bindings: apple,t8142-ave, laid out as the A18 Pro's encoder (codec, mailbox and coprocessor windows, five power domains, two DARTs).
  2. Driver: iBoot preloads the M5's build of the 26A428 firmware (AppleAVE2FW_H17G 9013.45.1, the version T6050 runs): TEXT 0x154000 with CRC 8a3784bd, DATA 0x12c000. The IPSW's H17D image reproduces T6050's known 87279429 the same way. Its TEXT CRC selects 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.
  3. ave: say why a 26A428 session is refused: the layout is qualified only at 30 fps with three B-frames, and a refused session used to log only 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.)
  4. t8142.dtsi: encoder at 0x281100000 (the A18 Pro's moved from 0x285000000), IRQs 1099/1093/1092/1095/1094, DART + CPUDART at +0x80000/+0xa0000 on IRQ 1096, and the VENC power tree (VENC_SYS +0x298 above DMA, PIPE4, PIPE5, ME0, ME1). All disabled.
  5. t8142-j815.dts: enabled.

Tested on J815 (first encodes on an M5): firmware CRCs match, coprocessor starts, DARTs clean before and after.

  • v4l2-ctl with video_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.
  • ffmpeg h264_v4l2m2m -profile:v 66 (Baseline): 150 frames, decodes.

Needs the boot loader hand-off: aurora-silicon/aura#215 (apple,t8142-ave in ave_compatibles and 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

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 DjDeveloperr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
DjDeveloperr merged commit 6df7569 into aurora-silicon:integration/aurora Nov 13, 2026
2 checks passed
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