Audio Pi by Fabio Solazzo
Based on Emu68PWM by Andreas Winkler and contributors
I developed Audio Pi as an AHI subdriver for the Raspberry Pi 3/4 analogue
audio jack on PiStorm systems running Emu68. This version works through AHI
without requiring my earlier custom Emu68 modifications.
FEATURES
- 22050 Hz and 44100 Hz nominal output modes, 16-bit stereo PCM input.
- Normal and low-latency variants at each rate.
- One physical output, Jack Audio; optional dither is a diagnostic setting.
- Hardware-paced DMA with interrupt completion where supported.
- Approximately 192 ms normal / 48 ms low-latency DMA rings; about 80 ms
for low latency on Pi 3 without arm-intc.library.
- Soft start/stop, master output gain and compatible multi-client mixing.
- A different-rate client is rejected without changing an existing stream.
- AudioPiDiag reports rate, IRQ/refill timings and buffer diagnostics.
- Complete corresponding source, build scripts and licences included.
The modes are selected by name in AHI preferences or the application's
audio requester. Their rates are fixed so that an explicit application
request does not override the selected 22050/44100 mode.
With the PWM clock/divider used by this driver, the nominal 44100 mode
reports approximately 44107 Hz to AHI; 22050 reports 22050 Hz rounded.
The analogue jack uses PWM quantisation; "16-bit" describes the PCM input,
not a true 16-bit analogue DAC. Buffering introduces finite latency.
PROJECT HISTORY AND TESTING
I started the Audio Pi project in summer 2026. In my early implementation,
I modified Emu68 to make the Raspberry Pi audio jack available through AHI.
When I later compared my work with Andreas Winkler's Emu68PWM, I noticed
similar audio interruptions and stuttering during background Workbench
activity, including opening drawers and moving windows.
While developing a modern DAW for Amiga, I used Audio Pi for intensive
audio testing, including playback during background operations, window
movement and access to drives and drawers.
I investigated DMA buffering, AHI overload protection and the supply of
audio data. I built the current functioning Audio Pi driver from Emu68PWM
4.10, adding diagnostics, selectable output rates and a simplified
jack-only interface.
In my tests on a real A1200/PiStorm with a Raspberry Pi 3 A+ (512 MB), I get
smooth, responsive playback without audible stuttering. I have also had
very good results with DigiBooster and MP3 playback. The driver retains
finite DMA buffering; applications can add their own buffering and
end-to-end latency.
REQUIREMENTS AND INSTALLATION
Pi 3 Model B/B+/A+ or Pi 4 Model B with PiStorm and a working Emu68 setup.
AHI 6 is required. Pi 3 DMA interrupts use arm-intc.library 0.3+; without
it the existing vertical-blank polling fallback is used. Pi 4 requires
the appropriate Emu68/gic400.library support (gic400.library 1.3+).
The arm-intc library is installed separately; see its upstream project:
https://github.com/flype44/arm-intc.library
Close audio applications, back up existing AHI drivers/modes/preferences,
then copy Devs/AHI/audiopi.audio and Devs/AudioModes/AudioPi to DEVS:.
Move the old Emu68PWM mode file out of DEVS:AudioModes if replacing it.
Reboot, select an Audio Pi mode in AHI preferences and save the settings.
Full instructions, rate-change notes and rollback are in AudioPi.guide
and LEGGIMI-ITA.txt. Start with 44100 Hz low latency on a tested setup.
LICENCE, CREDITS AND SUPPORT
Audio Pi modifications: Fabio Solazzo, 2026.
Original Emu68PWM: Andreas Winkler, with contributions including flype44.
Further provenance includes emu68hdmi.audio (arczi84), Circle (R. Stange),
emu68-common/reset guard (Rondoval), AHI (Martin Blom), and the original
interrupt-library authors. Original copyright notices are retained.
I distribute the modified driver under GPL-3.0-or-later. Bundled
dependency sources/headers retain their respective licences. See COPYING,
CREDITS.txt and the source tree. This is an independently maintained
derivative; it does not replace the upstream Emu68PWM package on Aminet.
Contact: fabiosolazzo.music@gmail.com
Please send me problem reports with the Pi/Emu68/AHI versions, selected
mode, AudioPiDiag output and application audio diagnostics where available.
No copyrighted samples, Workbench system files or firmware are included.
|