Playing Audio on a SoC DAC Output...
summary
Attempts to bit-bang a SoC DAC from Zephyr fail: a sleep loop yields ~300 µs instead of the 20 µs sample period and busy-waiting still misses timing. Moving to a codec-style buffer with interrupts produces the right tone but noisy, fragile, and interrupt-heavy. Using DMA reduces CPU load and drops interrupt frequency from ~20 µs events to ~3 ms events, producing clean 44 Hz test tones at 48 kHz sample rate. Debugging uses RAM tracing retrieved via GDB and GPIO toggles for oscilloscope timing. Examples target ST STM32F7 and Atmel ATSAM3X8E; a USB UAC2 + mpipe demo works but is DIY quality.
AI-written summary · about
chapters (17)
- 0:00Introduction to embedded audio
- 2:06Digital audio design basics
- 8:06First DAC experiment attempts
- 13:24Driver APIs and limitations
- 16:37Codec driver API exploration
- 19:34DMA for precise audio playback
- 22:02Debugging audio with tracing
- 26:19Internal vs external DACs
- 28:45Audio-ready boards overview
- 30:10Electronics and demo setup
- 31:57USB UAC2 sound card demo
- 33:42Applications and debugging with audio
- 34:03Q&A: Upstreaming DAC codec
- 35:31Q&A: Clarifying user space
- 36:13Q&A: DAC bit depth handling
- 37:38Q&A: Oversampling for DAC
- 40:08Closing remarks and thanks
