Audio: needs two new drivers #23

Closed
opened 2026-08-27 23:22:27 +00:00 by tiagoagueda · 0 comments
Owner

Resolved for the part that matters, 2026-08-28. Full write-up:
43-audio-and-dma.md.

This issue was wrong in both directions, and the corrections are more interesting than the
original text.

The blocker was not an audio driver — the A80 had no DMA engine at all

sun6i-dma.c had no sun9i compatible, drivers/dma/ had no sun9i anything, and
sun9i-a80.dtsi had no DMA controller node. Every ASoC playback path is dmaengine-based, so
no amount of codec work could ever have produced a sound. Now working: 114 420 transfers on
one channel, 0 failures, 74 MB/s
, and 83 200 across all 53 virtual channels.

The one non-obvious part: the A80 numbers its DRAM DRQ endpoint 0, not 1, and mainline
hardcodes DRQ_SDRAM 1. Against the wrong port every transfer simply never completes.

S/PDIF needed no new driver

Only a variant entry in sun4i-spdif. The BSP groups sun9i with the A83T and H3 for every
register-layout difference, and mainline's A80 CCU already had CLK_SPDIF, CLK_BUS_SPDIF
and RST_BUS_SPDIF — nobody had pointed a node at them. The card registers and
speaker-test plays a full period; pll-audio moves to 122.88 MHz and the spdif clock to
exactly 24.576 MHz.

I2S is off the table

[s_i2s1] in the fex looks live (daudio_used = 1) but is an unedited reference-design
block: its pin list is verbatim the manual's default, and its PM04 is bt_wake — which
working Bluetooth proves. R_DAUDIO1 is not routed on this board.

Correction to this issue's own text

Mainline's AC100 MFD does instantiate an ac100-codec cell with
of_compatible = "x-powers,ac100-codec". Nothing binds to it, which is why the outcome is
"RTC only" — but a codec driver would have a device waiting for it, and no MFD change is
needed.

What is left

Split out rather than left vague here:

  • the AC100 analog codec — the remaining real work, and unnecessary for a headless host
  • verifying S/PDIF physically reaches a connector
  • HDMI audio, still blocked on #22

⚠️ Nothing has been submitted upstream. See 42-upstreaming.md.

**Resolved for the part that matters, 2026-08-28.** Full write-up: [43-audio-and-dma.md](43-audio-and-dma.md). This issue was wrong in both directions, and the corrections are more interesting than the original text. ### The blocker was not an audio driver — the A80 had no DMA engine at all `sun6i-dma.c` had no sun9i compatible, `drivers/dma/` had no sun9i anything, and `sun9i-a80.dtsi` had no DMA controller node. Every ASoC playback path is dmaengine-based, so no amount of codec work could ever have produced a sound. Now working: **114 420 transfers on one channel, 0 failures, 74 MB/s**, and 83 200 across all 53 virtual channels. The one non-obvious part: the A80 numbers its **DRAM DRQ endpoint 0, not 1**, and mainline hardcodes `DRQ_SDRAM 1`. Against the wrong port every transfer simply never completes. ### S/PDIF needed no new driver Only a variant entry in `sun4i-spdif`. The BSP groups sun9i with the A83T and H3 for every register-layout difference, and mainline's A80 CCU already had `CLK_SPDIF`, `CLK_BUS_SPDIF` and `RST_BUS_SPDIF` — nobody had pointed a node at them. The card registers and `speaker-test` plays a full period; `pll-audio` moves to 122.88 MHz and the spdif clock to exactly 24.576 MHz. ### I2S is off the table `[s_i2s1]` in the fex looks live (`daudio_used = 1`) but is an unedited reference-design block: its pin list is verbatim the manual's default, and its PM04 is `bt_wake` — which working Bluetooth proves. R_DAUDIO1 is not routed on this board. ### Correction to this issue's own text Mainline's AC100 MFD *does* instantiate an `ac100-codec` cell with `of_compatible = "x-powers,ac100-codec"`. Nothing binds to it, which is why the outcome is "RTC only" — but a codec driver would have a device waiting for it, and no MFD change is needed. ### What is left Split out rather than left vague here: - the AC100 analog codec — the remaining real work, and unnecessary for a headless host - verifying S/PDIF physically reaches a connector - HDMI audio, still blocked on #22 --- ⚠️ **Nothing has been submitted upstream.** See [42-upstreaming.md](42-upstreaming.md).
tiagoagueda 2026-08-27 23:22:27 +00:00
Sign in to join this conversation.
No description provided.