A hardware DAC/amplifier outputs sound the moment it is powered, with no driver required — so what does the software side need to actually play audio?
Attribution: Originally by Luo Zong (罗总), Rockchip, published on the WeChat public account "罗总开发笔记" on 2026-08-25. Original URL: mp.weixin.qq.com/s/CqBo2NonYYGqC99ojL--4Q. Series: How to Write Your Own CODEC Driver, Part 2 (DAC playback). Copyright remains with the original author; republished with authorization.
Canonical annotated version → Tech Notes · Part 2: DAC Playback (full translation + Bestom engineering annotation).
Many DAC chips (e.g. the TI PCM5102A) need no control interface at all: connect the I2S data line and apply power, and it outputs sound — it has an internal PLL and doesn't even need MCLK. This article shows how to build the full playback chain on Rockchip Linux using a dummy-codec to drive such "zero-control" DACs:
- Direction: declare a playback DAI stream (
.playback), and the sound card creates/dev/snd/pcmC0D0p. This is the opposite of the previous PDM capture article (capture /pcmC0D0c). - Driver: the dummy-codec's
.playbackcapability declaration is just a placeholder — zero lines of driver code. A real chip driver (e.g.pcm5102a.c) must declare its capabilities strictly per the datasheet. - DTS three-piece set: Codec DAI (dummy-codec placeholder) → CPU DAI (enable
&i2s0+ pinmux) → Machine (multicodecs-cardassembles the sound card). Swap PDM for I2S and capture for playback, and it works the same. - Verify:
cat /proc/asound/cards→ls /dev/snd/→aplay -D hw:0,0 ...; the data path is wav → ring buffer → DMA → I2S → DAC → speaker.
/* dummy-codec playback capability declaration (kernel-6.1) */
struct snd_soc_dai_driver dummy_dai = {
.name = "dummy_codec",
.playback = {
.stream_name = "Dummy Playback",
.channels_min = 1, .channels_max = 384,
.rates = SNDRV_PCM_RATE_CONTINUOUS,
.formats = SNDRV_PCM_FMTBIT_S16_LE | ... ,
},
};
BesTom relevance · our audio platforms are built on the same framework
This note's dummy-codec + I2S three-piece DTS is exactly the framework behind BesTom's RK2108D (M08D Module), RK2118 (flagship vehicle audio, with 40 GOPS Audio-NPU), and RK962 (wireless audio) mass-production audio solutions. On top of it we add: microphone-array beamforming, low-power voice wake (RT-Thread), HiFi DSP front-end processing, and whole-board delivery for voice recorders / smart speakers / vehicle audio.
Read full Tech Notes version → Original (Luo Zong · WeChat, zh) Copyright © Luo Zong (罗总), Rockchip. Republished with authorization.