This guide helps you configure the HiFiBerry Studio ADC (high-resolution analog-to-digital converter) on a Raspberry Pi running DietPi. It details hardware installation, configuration steps, mixer setup, and permission fixes, focusing on ensuring the non-root dietpi
user has uninterrupted access to audio devices.
Log in to your Pi (via SSH or console).
Open /boot/config.txt
:
sudo nano /boot/config.txt
Add this line:
dtoverlay=hifiberry-adc
Save and reboot explicitly to apply:
sudo reboot
dietpi
Has AccessBefore verifying device detection, ensure the dietpi
user can access audio devices:
Add dietpi
to the audio
group:
sudo usermod -aG audio dietpi
Reboot again to apply changes:
sudo reboot
Post-login, verify group membership:
groups dietpi
You should see something like:
dietpi : dietpi audio
This step is crucial because sound devices under /dev/snd/*
are owned by root:audio
with 660
permissions—only members of the audio
group can access them.(HiFiBerry)
After the second reboot, as the dietpi
user, run:
arecord -l
You should now see the HiFiBerry Studio ADC listed as a capture device—for example, “card 0: sndrpihifiberry” etc.
Depending on your input type, apply the correct ALSA mixer configuration:
Balanced Mic Input (e.g., XLR):
amixer sset "ADC Left Input" "{VIN1P, VIN1M}[DIFF]"
amixer sset "ADC Right Input" "{VIN2P, VIN2M}[DIFF]"
amixer sset ADC 40db
Unbalanced Line‑level Input:
amixer sset "ADC Left Input" "VINL1[SE]"
amixer sset "ADC Right Input" "VINR1[SE]"
amixer sset ADC 0db
Consider that you may need to add amixer -c 1
if you have more than one graphic card installed.
Adjust the gain appropriately—higher for mic-level sources, lower for line-level.(DietPi, HiFiBerry, HiFiBerry)
If you want to avoid specifying hw:0,0 every time, you can override ALSA’s default PCM by creating ~/.asoundrc
:
pcm.!default {
type hw
card 0
}
ctl.!default {
type hw
card 0
}
This forces ALSA to use the HiFiBerry card directly instead of routing through dsnoop.
While the steps above configure the HiFiBerry Studio ADC directly through ALSA, some users experience quirks such as initialization bugs, exclusive-device locks, or compatibility issues when multiple applications try to access the card at the same time.
To avoid these pitfalls, we recommend setting up PipeWire on DietPi and letting it handle the HiFiBerry ADC. PipeWire provides: • Multi-client access — multiple apps (e.g., InterScribe agent + monitoring tools) can record simultaneously without conflicts. • Improved compatibility — avoids many ALSA device quirks that HiFiBerry cards can show. • PulseAudio/ALSA/JACK bridging — most applications work out of the box with no changes. • Lower latency and better reliability for real-time use cases.
👉 See the companion guide: PipeWire on DietPi Headless Raspberry Pi + HiFiBerry ADC for full setup instructions.
If you only need single-app exclusive capture, ALSA alone may be enough. But for most use cases, especially production deployments, PipeWire is strongly recommended.
In rare scenarios, arecord
may fail unless the audio output subsystem is "woken up" first. If you encounter issues, try:
aplay -l && arecord -l
Running aplay -l
first may “activate” the driver for capture.(DietPi)
Step | Action |
---|---|
1⃣ | Attach Studio ADC HAT onto Raspberry Pi |
2⃣ | Add dtoverlay=hifiberry-adc in /boot/config.txt |
3⃣ | Reboot system: sudo reboot |
4⃣ | Add dietpi to audio group: sudo usermod -aG audio dietpi |
5⃣ | Reboot again: sudo reboot |
6⃣ | Verify group: groups dietpi |
7⃣ | Detect device: arecord -l |
8⃣ | Configure mixer with amixer for input type |
9⃣ | (If needed) Run aplay -l before arecord -l as a workaround |
aplay -l
before arecord -l
can help with some initialization bugs.(HiFiBerry, balenaForums)We respect your privacy. We respect your privacy.
TLDR: We use cookies for language selection, theme, and analytics. Learn more. TLDR: We use cookies for language selection, theme, and analytics. Learn more