Geschafft! Apple CarPlay im digitalen Kombiinstrument des Touareg CR – MH2p P2869

  • Hi Predator0 (and scheibandreas),

    thanks a lot for sharing the logs — I had a look at your cl_probe.log and clusterd.log, and I think we just found the exact causes behind the map-only flicker!

    First, the good news from your log: the incoming H.264 stream itself is completely clean (6,982 frames over ~440s, badnal=0, steady ~15.8 fps / ~63 ms per frame). Your log shows the older v19.3-based pipeline, and you were actually right to look closely at IDR refreshes — combined with a few rendering/buffer-sync bugs in the older cl_render (src/cl_render/cluster.c), which we just fixed in v21.0 / v21.0.1:

    1. Mid-stream SPS/PPS + IDR refcount reset (cb_begin_sequence): Your log shows periodic idr 1 requests every ~30.7s, and each IDR arrives with an op1 (SPS/PPS avcC) header. In the older cluster.c, cb_begin_sequence() unconditionally reset g_dec.surf_refcount[i] = 0 on every sequence header, even for decoder surfaces still in use. In v21.0+ this is guarded with if (g_dec.num_surfaces == 0).

    2. 50 ms heartbeat colliding with the ~15.8 fps (~63 ms/frame) stream: Older cluster.c re-posted the last buffer whenever no new frame arrived for >50 ms. Since the CarPlay cluster stream runs at ~15.8 fps (~63 ms per frame), that 50 ms heartbeat constantly collided with real frames. In v21.0+ this was raised to 250 ms.

    3. Unsynchronized 2D blit before screen_post_window: Previously screen_post_window() was called right after screen_blit() without waiting for the 2D blit to finish (cl_flush_blits_idle() / SCREEN_WAIT_IDLE), so the compositor could scan out an unfinished buffer or the HW decoder could reuse the YV12 surface too early.

    4. Front-buffer wrap-around on burst frames: Added cl_pick_next_pidx() (never blit into g_last_posted_pidx) plus a 20 ms burst throttle (g_batch_deferred) so queued frames after jitter/IDR can't lap the buffer ring and overwrite the live front buffer.

    Since your car is on EU P2869 (Touarego fork), please don't flash my CN P2878 release package directly — but scheibandreas can port those exact fixes straight from src/cl_render/cluster.c in v21.0.1.

    Also, quick update for everyone following the repo — I've just released v21.0.1 with a few more things that might be useful for your P2869 port:

    - Wired CarPlay iAP2 fix (v21.0.1): Fixed a double 6-byte header skip in src/cluster-probe/wired/rg_core.inc (important for wired CarPlay HUD/lane guidance — I noticed Cinemo wired iAP2 is active in your dio_cluster.log too).

    - Steering-wheel OK double-tap map switch (VW_HUD_4_OkMapSwitch): Double-press OK within 2s to toggle instantly between CarPlay map and stock VW map (handy for pACC / quick switch back without uninstalling).

    - v21.0 visual & telemetry overhaul: Larger bold telemetry cards with sport bars, symmetrical 295px navigation card (with standby mode), and 43 real DSI channels (direct TPMS, pitch/roll, GNSS altitude, ZF 8HP65A D1–D8 gear ratio readout).

    - Shared HMI popup filter (VWPopupFilter, Bundle 98) & ModKit clean-unit mount / touareg_netd security & stability fixes.

    Full source and changelog are up at:

    GitHub - a78c7/touareg-cn-carplay-mods: 国行途锐(MH2p P版通刷) CarPlay 改装合集:全屏 + 无线 + Android Auto + 导航上HUD + 仪表地图 + 大字运动信息框与导航卡 + 手机无线控制台/SSH,单U盘免拆刷入
    国行途锐(MH2p P版通刷) CarPlay 改装合集:全屏 + 无线 + Android Auto + 导航上HUD + 仪表地图 + 大字运动信息框与导航卡 + 手机无线控制台/SSH,单U盘免拆刷入 - a78c7/touareg-cn-carplay-mods
    github.com

    Would love to hear if porting those cluster.c sync/heartbeat fixes clears up the flicker on P2869!

    Best regards,
    a78c7

  • Hi a78c7

    Thank you for your effort. Can you advise if its possible to view Google satellite imagery in digital cockpit? In an earlier post, another user posted a screenshot of satellite imagery being shown from a user in China but that wasn't Google Maps or Apple maps.

  • Hi a78c7, thanks for the info on the new update.

    Since you advise against flashing your package directly onto the P2869: Is there currently a ready-to-use installation package to use Android Auto (via USB) on the P2869? I have absolutely no programming knowledge and cannot build or modify any code myself. I just need a finished file that I can easily install.

    One quick question regarding the HUD: You mentioned a fix in the new update that is supposed to be important for the HUD. Has there been any progress on the missing turn arrows, so they might be displayed in the Head-up Display in the future (even with Android Auto)?

    Regards