S/PDIF+HDMI: DTS passthrough untested - ffmpeg's spdif muxer emits no IEC 61937 bursts #78
Labels
No labels
blocked-physical
cleanup
hardware
infra
kernel
P1-critical
P2-high
P3-normal
P4-later
reliability
security
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tiagoagueda/a80#78
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Split out of #42, which is fixed and closed. This is not that bug.
What works
AC-3 passthrough works, confirmed by ear and by measurement: the receiver displays Dolby
Digital, drain 47998 frames/s against 48000 expected, 180 s elapsed for a 179.9 s track, IEC 61937
carried with
NONAUDIO=1.What does not
DTS locks and then sounds wrong - the receiver displays DTS, and the audio is described as
filtered, as though the top end has been removed. It fails identically across every variable we
changed:
FCTL.TXIMfixdca, and a reference DTS stream copied without re-encodingTXIM=1- the vendor's own configurationEvery transport measurement was exact in every case: correct carrier rate, correct drain rate,
elapsed time matching the source duration,
NONAUDIOset, zero xruns.What that leaves
Since AC-3 passes through the identical path, and DTS fails with two independent encoders
including a genuine reference stream, this is neither the S/PDIF driver nor the encoder.
⚠️ An assumption worth revisiting first. The ELD quoted early in #42 - LPCM / AC-3 / DTS, 8
channels - was read from card 0, the HDMI sink. It says nothing about whatever is connected to
the optical output. Its DTS capability was assumed and never checked. If the optical device
handles DTS poorly, or not at all, that alone explains everything here.
Also worth noting: the board's previous Android firmware reportedly showed DTS-over-optical
glitching - a different failure from this one, but it suggests DTS on this path has a history.
Suggested next steps, cheap first
source. That is a five-minute check and may end the issue.
known-good source - burst period and
Pcdata type are the obvious candidates.identically for working and broken streams (see
59-spdif-txim.md).P4-later: AC-3 covers the practical passthrough case, and this is very likely not our bug.
Cause found: the stream has no IEC 61937 burst preambles
Not the board, not either sink, not the DTS encoder. ffmpeg's
-f spdifmuxer never wrapped theDTS frames in bursts.
Scanning the muxer's output for the IEC 61937 preamble finds nothing at all:
The payload is byte-swapped correctly and the frames are laid down on a perfect 512-frame period,
but there is no
Pa/Pbsync, noPcdata type and noPdlength anywhere.That explains every symptom precisely. A DTS decoder scanning for its own
7FFE8001sync finds it,on time, every 512 frames - so the receiver locks and displays "DTS". Without
Pc/Pdit hasno burst framing, mis-assembles frame boundaries and loses the upper subbands, which is heard as a
low-pass. AC-3 was unaffected because ffmpeg's AC-3 path does emit proper bursts.
What eliminated everything else
-c:a copy, fails identicallyAlso varied without effect, for the record: the
FCTL.TXIMfix (before and after), 1411.2 kbps(100% link use) vs 768 kbps (50%), 44.1 kHz vs 48 kHz, and 32-bit-expanded vs raw 16-bit carriage.
Every transport measurement was exact in every case - correct carrier rate, correct drain rate,
elapsed matching source duration,
NONAUDIOset, zero xruns.Two capabilities confirmed on the way
control accepts the non-audio flag and carries a fuller channel status than the S/PDIF path
(
AES0=0x06 AES1=0x00 AES2=0x00 AES3=0x01, i.e. bitstream plus a 48 kHz rate field).So this board does DTS passthrough as far as anyone has tested it - we simply never fed it a
correctly framed DTS stream.
To actually verify DTS
Produce a properly wrapped stream and replay. Options, cheapest first:
builds the bursts itself rather than relying on the muxer.
so this looks like a codec-specific gap rather than a broken muxer.
Pa=0xF872 Pb=0x4E1F Pc=11(DTS Type I, 512 samples - whichmatches the 512-frame period measured above) and
Pd= payload length in bits.Reduced to P4-later and reframed: this is not a board defect, and the board is not blocked on
it. Detail in
59-spdif-txim.md.S/PDIF: DTS passthrough decodes but sounds filtered (AC-3 is fine)to S/PDIF+HDMI: DTS passthrough untested - ffmpeg's spdif muxer emits no IEC 61937 bursts