HDMI audio #44
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#44
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?
Now plausible, where before it was blocked twice over.
The HDMI controller reports an I2S input:
CONFIG0_ID = 0xbf, andHDMI_CONFIG0_I2S = 0x10isset. Its DMA DRQ ports match the A31's —
HDMI_DDC 13,HDMI_AUDIO 14— and DMA now works(43-audio-and-dma.md), which was the thing that made all audio impossible
before.
dw-hdmihas the audio pieces (dw-hdmi-i2s-audio,dw-hdmi-ahb-audio); which applies hereneeds checking against what this instance exposes.
⚠️ Depends on #22. There is no picture yet, and it would be odd to chase HDMI audio before
the video path carries a frame. Recorded so the scope is known, not because it is next.
See 44-hdmi.md.
Raised from P4 to P3: HDMI now produces a picture (#22), so the audio path is testable rather than theoretical.
CONFIG0_IDbit 4 says the controller has an I2S input and the DMA DRQ ports match the A31's, and DMA works.Working and audible, 2026-08-28 - confirmed by ear on the soundbar at 48 kHz.
Closing; the one remaining limitation is #52.
Correction to this issue's body
Neither exists on sun9i. Both sit inside
#ifndef CONFIG_ARCH_SUN9Iin the BSP'sinclude/linux/dma/sunxi-dma.h, guarded to sun8iw1 only.What it actually needed
CONFIG3_IDreads0x00- no AHB audio DMA and no GP audio - so the transmitter has an I2Sinput and nothing else, and something has to feed it. That something is DAUDIO1 at
0x06002400 on DRQ 4, which is what the vendor's
sunxi-hdmiaudio.cdrives on sun9i. Itwrites no routing register anywhere, so the link is internal and fixed.
Register file is the A83T's, but sun9i is the one SoC with no
DRQSRC_DAUDIO_1_RX, sosun4i-i2sneeded a variant with the capture stream dropped.Two faults stood between "the card plays" and "you can hear it"
Both read back as perfectly configured hardware:
pll-audio's M divider was modelled with a zero offset when the hardware divides byM + 1, so every audio clock on the SoC ran 1.04x slow - S/PDIF included - while
clk_summaryreported the exact rate that was asked for. Fixed.dw_hdmi_i2s_hw_params()hardcodesHDMI_AUD_INPUTCLKFS_64FSand ignoresmclk-fs,while
sun4i-i2stakes the slot width from the sample format - so S16_LE produced a32 fs bit clock, half what the transmitter counts, and 16-bit playback was silent while
24-bit worked. Fixed by pinning
dai-tdm-slot-width = <32>in the DT.The transmitter's own automatic CTS counter found both, and was dismissed as
"does not add up" for several hours before being believed. It reads 148500 now, the textbook
value for 1080p60 at 48 kHz.
Still open
#52 - the 44.1 kHz clock family is 9.5% slow and silent. A 44.1 kHz track has to be
resampled to 48 kHz to play. Multichannel and non-PCM passthrough are untested; the sink
advertises 8-channel LPCM and only stereo has been used.
See
47-hdmi-audio-cec.md.