Like most Google TV / Android TV sets, my \\\*\\\*TCL 65C9K\\\*\\\* (MediaTek MT5896, firmware V670, Google TV 14) passes through E-AC3 Atmos fine
and passes through TrueHD Atmos from an external HDMI box, but strips Atmos metadata on TrueHD from internal apps (Moonfin, Jellyfin, Kodi, Plex, Emby, etc.), outputting Dolby Surround instead.
After rooting the TV via the HDMI service UART / U-Boot console + Magisk and tracing the audio subsystem live, I found a 100% software, reversible bypass that delivers bit-exact lossless Dolby TrueHD Atmos over eARC directly from internal Android TV apps; no HDMI source needed, no DSP firmware patching, and no boot/DTBO modifications.
How it works
- On stock firmware, internal `AUDIO_FORMAT_DOLBY_TRUEHD` is sent to the TV's MS12 decoder (`DEC-R2`), which strips Atmos objects,
while `AUDIO_FORMAT_IEC61937` is artificially blocked in `/system/lib/libaudioclient.so` for any app other than `/system/bin/mediaserver`.
- The breakthrough: even while idle on Android right from a cold boot (with Digital Audio Out = Pass through), `DEC-R2`
continuously writes silent 61,440-byte IEC61937/MAT 2.0 bursts into the SE DSP Non-PCM DDR ring (`0x2249C000..0x22640000`, `28 × 61,440` bytes = `560 ms`) every `20.000 ms`, and `SE DSP` continuously streams that ring over eARC TX (`0x951115 = 0x25`).
- Instead of fighting or patching the closed DSP firmware, we completely bypass `DEC-R2` and inject the untouched TrueHD Atmos MAT 2.0 bursts directly into that live DDR ring right after `DEC-R2` writes each silent slot and before `SE DSP` reads it.
What's in the Magisk module (`/data/adb/modules/tcl_earc_mat_bypass/`)
Kernel driver (\\\`tcl\\_earc\\_mat.ko\\\` → \\\`/dev/earc\\_mat\\_bypass\\\`): 32-frame (\\\`640 ms\\\`) lock-free SPSC jitter buffer + dedicated
\\\`kthread\\\` (\\\`0.25 ms\\\` hrtimer polling) locked to \\\`DEC-R2\\\`'s 20.000 ms cadence.
2. Audio HAL shim (\\\`audio.primary.merak.so\\\`): Wraps the stock vendor HAL in-place and intercepts both:
\\- \\\`AUDIO\\_FORMAT\\_IEC61937\\\` (192 kHz 7.1 MAT — e.g. Kodi \\\`AudioTrack (IEC)\\\`), and
\\- \\\`AUDIO\\_FORMAT\\_DOLBY\\_TRUEHD\\\` (raw TrueHD — e.g. Moonfin, Jellyfin, Plex, Emby, Stremio, ExoPlayer), packing raw TrueHD access units
on-the-fly (\\\`24 AUs → 61,440-byte\\\` bit-exact MAT 2.0 bursts) with \\\`CLOCK\\_MONOTONIC\\\` timestamps for A/V lip-sync.
\\- All other streams (PCM, AC3, E-AC-3, DTS, UI) go untouched to the stock HAL.
3. Audio policy XML + \\\`libaudioclient.so\\\` patch: Enables \\\`direct\\_iec61937 output\\\` on \\\`HDMI EARC\\\` (keeping all dynamic EDID profiles
intact) and removes TCL's 5 hardcoded \\\`/system/bin/mediaserver\\\` IEC61937 package blocks.
Verified results (from cold boot, zero HDMI)
- Moonfin (real TrueHD Atmos movie, play/pause/seek/resume): \\\`1,829\\\` MAT frames delivered with \\\*\\\*\\\`underruns=0, already\\_ready=0,
relocks=0` — soundbar locks cleanly onto Dolby Atmos with A/V sync.
- AudioProbe (`ENCODING_IEC61937`, 192 kHz 7.1, `direct=true`): 505` frames, `underruns=0, already_ready=0, relocks=0` — clean
Dolby Atmos.
- 30-second full `truehd.iec` test: `1,499` frames in `29.979 s`, zero drops.
Source code & porting to other TCL / MediaTek TVs
Because the DDR ring address (`0x2249C000`), kernel `MODVERSIONS` CRCs, and `libaudioclient.so` offsets are model/firmware-specific,
the repo includes all open-source C code, the Magisk module template, a Python CRC extractor & XML`libaudioclient.so` patcher
(`tools/patch_tcl_audio_stack.py`), and a step-by-step Porting Guide (\\\`docs/earc-mat-bypass-porting-guide.md\\\`) explaining how to
find the exact addresses on other MT5896 / Pentonic TCL models (no proprietary binaries committed):
GitHub: https://github.com/saitatter/tcl-earc-passthrough-research
*(Requires root/Magisk. Tested on TCL 65C9K / MT5896 / V670 with a TCL Q85H Pro soundbar over eARC. Happy to answer questions or help
anyone porting it to other MediaTek TCL models!)\\\*