Audio: AC100 analog codec driver #41

Open
opened 2026-08-28 06:15:57 +00:00 by tiagoagueda · 1 comment
Owner

Split out of #23, which is otherwise resolved.

The X-Powers AC100's codec half has no ASoC driver anywhere in mainline. The MFD already
instantiates the cell — of_compatible = "x-powers,ac100-codec" — so a driver would bind
with no MFD change.

Reference exists and is GPLv2: the vendor's sound/soc/codecs/ac100.c, 5515 lines, with
depends on ARCH_SUN9IW1 && MFD_AC100, so it is A80-specific rather than generic sunxi code.

What makes this large rather than small:

  • it is 3.4-era ASoC and would be a rewrite, not a port
  • the digital link is DAUDIO0 at 0x06002000, and sun4i-i2s has no sun9i variant — so
    this is genuinely two drivers
  • the analog output path runs through audio_pa_ctrl on PL01, which the fex claims three
    times (led1, audio_pa_ctrl, s_uart_rx). Driving an amplifier enable on a guess is a
    bad trade; see 39-ir-and-leds.md

Not needed for the headless role. S/PDIF works and is the appliance-appropriate output.
This is here so the scope is recorded, not because it is on the path.

See 43-audio-and-dma.md.

Split out of #23, which is otherwise resolved. The X-Powers AC100's codec half has no ASoC driver anywhere in mainline. The MFD already instantiates the cell — `of_compatible = "x-powers,ac100-codec"` — so a driver would bind with no MFD change. **Reference exists and is GPLv2:** the vendor's `sound/soc/codecs/ac100.c`, 5515 lines, with `depends on ARCH_SUN9IW1 && MFD_AC100`, so it is A80-specific rather than generic sunxi code. What makes this large rather than small: - it is 3.4-era ASoC and would be a rewrite, not a port - the digital link is DAUDIO0 at `0x06002000`, and `sun4i-i2s` has **no sun9i variant** — so this is genuinely two drivers - the analog output path runs through `audio_pa_ctrl` on **PL01**, which the fex claims three times (`led1`, `audio_pa_ctrl`, `s_uart_rx`). Driving an amplifier enable on a guess is a bad trade; see [39-ir-and-leds.md](39-ir-and-leds.md) **Not needed for the headless role.** S/PDIF works and is the appliance-appropriate output. This is here so the scope is recorded, not because it is on the path. See [43-audio-and-dma.md](43-audio-and-dma.md).
Author
Owner

Confirmed against the mirror, and the scope is exactly as this issue states.

The Sunchip CX-A99 mainline support table lists the AC100 as three separate pieces:

part mainline driver DT compatible
container (MFD) mfd/ac100.c x-powers,ac100
real-time clock rtc/rtc-ac100.c x-powers,ac100-rtc
audio codec no x-powers,ac100-codec

So the MFD and RTC halves are upstream and only the codec is missing - which is what this issue
says - and the device-tree compatible string to target is already reserved:
x-powers,ac100-codec
. Linux mainlining history corroborates it: the AC100 mfd and RTC
drivers landed together with the AXP806 work for the Cubietruck Plus and the A83T dev board, and
no codec followed.

That is worth knowing before starting, because it means a codec driver should bind to the
existing MFD rather than being a standalone device, and the binding name is not ours to choose.

It also means this is not A80-specific work: the same codec sits on A83T and A64 boards, so a
driver has more than one user and a better case upstream than most of what is in this tracker.


From a deep pass over the offline linux-sunxi.org mirror (a80/linux-sunxi.org/wiki-backup, 4095 pages, snapshot 2026-08-29). linux-sunxi.org content is CC BY-SA; the pages named above are the attribution.

Confirmed against the mirror, and the scope is exactly as this issue states. The **Sunchip CX-A99** mainline support table lists the AC100 as three separate pieces: | part | mainline driver | DT compatible | |---|---|---| | container (MFD) | `mfd/ac100.c` | `x-powers,ac100` | | real-time clock | `rtc/rtc-ac100.c` | `x-powers,ac100-rtc` | | **audio codec** | **no** | `x-powers,ac100-codec` | So the MFD and RTC halves are upstream and only the codec is missing - which is what this issue says - and **the device-tree compatible string to target is already reserved: `x-powers,ac100-codec`**. `Linux mainlining history` corroborates it: the AC100 mfd and RTC drivers landed together with the AXP806 work for the Cubietruck Plus and the A83T dev board, and no codec followed. That is worth knowing before starting, because it means a codec driver should bind to the existing MFD rather than being a standalone device, and the binding name is not ours to choose. It also means this is not A80-specific work: the same codec sits on A83T and A64 boards, so a driver has more than one user and a better case upstream than most of what is in this tracker. --- *From a deep pass over the offline linux-sunxi.org mirror (`a80/linux-sunxi.org/wiki-backup`, 4095 pages, snapshot 2026-08-29). linux-sunxi.org content is CC BY-SA; the pages named above are the attribution.*
Sign in to join this conversation.
No description provided.