Skip to content

Restore the MediaTek no-video fix: 16 KB RX URBs via devourer + heap RX ring#107

Open
josephnef wants to merge 3 commits into
masterfrom
restore-mtk-16k-fix
Open

Restore the MediaTek no-video fix: 16 KB RX URBs via devourer + heap RX ring#107
josephnef wants to merge 3 commits into
masterfrom
restore-mtk-16k-fix

Conversation

@josephnef

@josephnef josephnef commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Fixes the #6 regression reported 2026-07-19 (no video on MediaTek devices came back on master builds).

Root cause

#104 bumped the devourer submodule (bbc738573f1cb4, ~3.5 months) past the transport split that deleted RtlUsbAdapter.cpp. @floppyhammer's fix (devourer #19, shipped here via #97) had two halves:

  • device-side USB RX aggregation capped ≤16 KB — survived the refactor
  • host-side bulk-IN reads capped at 16 KB — lost: the new async RX ring posts 32 KB URBs

Some MediaTek xhci/usbfs stacks (Dimensity 810, Helio G99, MT6765) never complete a bulk-IN read larger than 16 KB — LIBUSB_ERROR_TIMEOUT forever, zero RX, no video. #104 was the first Android build of the async ring (its own description warned it was untested on hardware); the reports came straight back.

Changes

Status

🤖 Generated with Claude Code

…RX ring

Fixes the #6 regression reported on 2026-07-19. PR #104 bumped devourer
past the transport split that deleted RtlUsbAdapter.cpp: the device-side
half of floppyhammer's fix (16 KB RX aggregation caps) survived, but the
host side regressed from 16 KB reads to 32 KB URBs — the exact transfer
shape some MediaTek xhci/usbfs stacks (Dimensity 810, Helio G99, MT6765)
never complete: LIBUSB_ERROR_TIMEOUT forever, zero RX, no video.

- devourer submodule -> b7c50ec (OpenIPC/devourer#317, merged master):
  16 KB URBs on all 11ac generations + matching Jaguar2/3 aggregation
  caps, tracked in OpenIPC/devourer#314. Bench-validated at delivery
  parity on RTL8812AU / RTL8812BU / RTL8812EU.
- WfbngLink.cpp: cfg.usb.rx_zerocopy = false — keep the RX ring on plain
  heap buffers; the dev-mem zerocopy path is unvalidated on Android vendor
  kernels and every previously working Android build shipped the heap path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@josephnef
josephnef force-pushed the restore-mtk-16k-fix branch from de87388 to 3f3f25a Compare July 20, 2026 11:05
@josephnef
josephnef marked this pull request as ready for review July 20, 2026 11:06
The APK build only compiles the devourer library source; devourer's
reference/* submodules are vendor kernel drivers used solely by its
extraction tooling and hardware tests, never by the build. Recursing into
them clones eight extra repos on every build and — since devourer master
now pins reference/rtl8852cu at a commit not present on its remote — fails
the checkout outright. wfb-ng has no nested submodules, so submodules:true
fetches exactly what the build needs (devourer + wfb-ng).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PixelPilot vendors devourer's source list by hand (it can't add_subdirectory
devourer — that resolves libusb via pkg-config, absent in the NDK build), so
new devourer files must be mirrored here. The bump to b7c50ec pulled in two
sources the compiled J1+J3 device classes now reference, causing link-time
undefined symbols:

  - src/LaCapture.cpp                  (LaCapture::run / ctor — la_capture())
  - src/jaguar3/PhydmRuntimeJaguar3.cpp (PhydmRuntimeJaguar3::tick)

Both are self-contained (own headers + RtlAdapter, no excluded-group deps).
Iqk8814a.cpp stays out — 8814 support isn't compiled here (no
DEVOURER_HAVE_8814), so nothing references it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant