• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

8ch hifiberry hat dac for RPI5

Thanks Michael. Any comments on the results?
Do I understand correctly that the sinad is distortion limited and noise seems pretty decent? That is good news IMO, no complaints.
However I wonder why they use 4x meh stereo dacs instead of one of the cheap 8 channel dacs that at least on paper perform significantly better.

I agree with your comments.

Noise performance is pretty good, certainly good enough for DIY active speakers as long as you are using normal sensitivity tweeter (~90 dB) and not something crazy. HifiBerry quote 112 dB SNR which I believe they are getting straight from the PCM5102A datasheet. In the datasheet TI specify A-weighted 20-20K bandwidth. Going from unweighted to A-weighted is usually about a 2-3 dB increase and my bandwidth is a little higher. So overall I would say noise is right on spec.

I like the analog mute feature as it further reduces noise when nothing is playing.

THD+N is distortion limited. Again, HifiBerry specify -93 dB which matches the datasheet. In the datasheet TI specify a load of 10K which will be much more typical than the less than 1K load from the Cosmos. So again, I would say they are meeting spec. I don't think distortion is very audible, so I don't have an issue with performance here.

Filter does not have tons of attenuation but again if you look at the datasheet -60 dB of attenuation seems typical. The frequency response seems to match the default 8X linear phase filter.

The out-band stuff is a little funky. One of the weirder things is that 44 kHz spike is actually higher level with the analog mute engaged compared to playing a -60 dBFS tone.

As I understand it HifiBerry are using a less than ideal clocking scheme and I wonder if that is why we see some elevated skirting on the J Test / 1 kHz tones.

Overall, the value is very good. You could probably come out at under $200 for a RPi5 + PSU + FLIRC + DAC8x + HDMI/USB touchscreen and have a really nice DIY active speaker DSP system.

Michael
 
Last edited:
Are they using the usual TI/PCM Dac chips?
PXL_20240501_061053822.jpg

PXL_20240501_060846958.jpg
PXL_20240501_060916879.jpg

 

Attachments

  • pcm5102a.pdf
    1.2 MB · Views: 80
Last edited:
@MCH: That board looks simple. Those DACs have no I2C control. If that chip is EEPROM, probably just for hat identification as required by RPi specs?
 
  • Like
Reactions: MCH
@MCH: That board looks simple. Those DACs have no I2C control. If that chip is EEPROM, probably just for hat identification as required by RPi specs?
Ah it is a requirement, that makes sense. I remember the "digi" hats that would use the identification the wm8804 sends via i2c, true. Then here one needs to crank what the eeprom reports and then you are free to use the hardware you want. Well, that's convenient too if feasible. Thanks!
 
Instead of having four DACs on that board I wonder how much work it would be to design something similar but with four AES/EBU outputs...
 
Overall, the value is very good. You could probably come out at under $200 for a RPi5 + PSU + FLIRC + DAC8x + HDMI/USB touchscreen and have a really nice DIY active speaker DSP system.
Agree totally as I have built this.

I purchased an Elecrow 7 Inch HDMI Touchscreen Monitor Model: RC070P as the RPi 5 can be mounted on standoff pillars on the back saving getting a case for the RPi. The RPi5 is finicky about the HDMI cable, the ones supplied with the screen didn't work for me, I initially modified a Raspberry Pi micro HDMI to HDMI adapter cable by sanding down one side of the HDMI plug so it would plug into the HDMI socket in the rather schmic case that the Elecrow screen comes in. I then purchased a 30cm / 1 foot Duttek HDMI to Micro HDMI cable.
Elecrow supplies an acrylic board and hardware to mount the RPi on the back of the screen. Before screwing in the copper pillars that support the RPi, I filed a point on a M2.5 screw and screwed it into the holes on the acrylic board to tap the holes (make a thread) for the pillar.
The DAC8X has 3.5mm TRS sockets (stereo headphone), the 3.5mm plug to RCA cables I had interfered with the support leg on the back of Elecrow screen so I purchased Cable Creation DC 3.5mm TRS 90 degree to 2RCA Male Stereo Audio Cables.

Raspberry Pi Imager makes burning an SD card simple, I've tried both Raspberry Pi OS Lite and Desktop in 64bit, picking the desktop saves installing a desktop and browser. AFAIK the RPi doesn't load all the desktop software until you select a function from one of the menus, so RAM is not eaten by unused software. Installing CamillaDSP is straight forward using Michael's tutorial : https://www.audiosciencereview.com/forum/index.php?threads/rpi4-camilladsp-tutorial.29656/

In my opinion Raspberry Pi OS has one outstanding advantage over Ubuntu Server and that is "raspi-config". That utility lends itself to taking an image of a working SD card and easily localizing the wifi credentials and network name of that card. In other words, an SD card with CamillaDSP installed could be copied, plugged in to a different RPi5 and reconfigured using raspi-config.
 
How would one add a 2 channel ADC to a rpi with the DAC8X? USB?

Simmonds
 
How would one add a 2 channel ADC to a rpi with the DAC8X? USB?
This https://www.audiosciencereview.com/...-easier-and-cheaper.48233/page-6#post-1861036 should create 8ch playback and 8ch capture alsa cards. Then you can connect your ADC to the I2S clocks + data input lines. If your ADC requires master clock signal, it should be possible with some suitable DTS overlay but not tested yet (and probably requires a newer kernel too). Often the ADC chip would need to be configured via I2C for specific MCLK multiple etc. DAC8X uses DAC chips which require no I2C configuration (IMO the vendor likely used them for this specific reason).
 
The Dac8x boards are back in stock at HiFiBerry, so I ordered one along with their steel Pi5 case.

I also ordered an 8GB Pi5 from pishop.us. I haven't decided what kind of cooling solution to use for the Pi5 yet. I don't want to hear fan noise at the listening position.

This is for a project to to replace the electronics for a pair of NHT Xd speakers with a software crossover using camilladsp. Crossover filters would be created and tested with Acourate.

I also haven't decided on what to use for the 4 channels of dedicated amplification. Perhaps a pair of Aiyama A07s.

Also need a pair of cheap subwoofers, since I blew up the original NHT Xd subwoofer. Perhaps the Elac SUB1010 that Erin recommends.
 
I just got my dac8x in and did one short test but my voltage noise was about 4x what you measured. Did you use the standard Pi5 power supply or something better? Could it be because I'm running my ADC at a 10V limit and much higher input impedance?

Also, using a full-size hat on the pi5 isn't great for heat dissipation. I used a riser and have the default pi5 fan - which may be contributing to the noise level - but an overhead fan would have to run way faster to cool the cpu at all (and this way the fan is below the audio ground-plane).
 
Last edited:
Hi here is my DAC8X in a small case.

IMG_20240615_145929.jpg
IMG_20240615_145912.jpg

I use the Rpi5 with an active cooler (the fan has not yet started up). Because of this the Dac needs a riser and it comes quite high in the 4cm high housing.
This leaves hardly any space for the GPIO pins.
IMG_20240610_174939.jpg

I find the pcm layout of the dac8x simply unusable for a case installation. The output connections belong on the narrow side via rj45 and usba, or something to solder on or another connection. I hope hifiberry brings an improved version that can be installed more effectively in a case. Otherwise it will remain just a toy.
 
I do wonder if a blower style fan might work better with hats. A 40 mm noctua won't generate that much noise. Someone would need to design a heatsink though.

On a separate note, any idea how I would go about adding a headphone amp and line in (adc) in addition to the dac8x?
 
@tinnitus I know this won't help in your current case, but mounting RPi vertically provides a much better cooling. I mounted my RPi 4 like that in a 8cm modushop case, have some holes below and above and it works great with a small passive sink. I also connected the DAC with a custom cable (you can use a flat cable or just connect the needed pins with individual wires which is even better for airflow) so the DAC is also mounted with outputs at the back of the case.
 
How would one add a 2 channel ADC to a rpi with the DAC8X? USB?
By putting a HiFiBerry DAC + ADC on a RPi Zero 2W and running it in gadget mode as output, then on the RPi with the DAC8X use gadget mode for input. CamillaDSP runs on both. Michael has added gadget mode instructions to his tutorial.

Here is how I did it, you will need a Raspberry Pi Zero 2 W H (with 40 pin Header) for about $US16, a HiFiBerry DAC + ADC for about $US55 and a USB A to Micro USB cable for $US3 and run CamillaDSP with the RPi Zero as a USB Gadget as an input device to the RPi5. The HiFiBerry can accept plain old 2 channel analog or a dynamic mic (with extra connectors, read the HiFiBerry link). I assume that you already have the DAC8X instance running.

Setup -
This can get confusing as there are two RPi systems running CamillaDSP. The RPi Zero has the USB Gadget as it's Output (play) Device. The RPi 5 withthe DAC8X has the USB Gadget as it's Input device.
1. Follow Michael's tutorial and burn a SD card with Raspberry Pi OS Lite 64 bit Bookworm.
2. Boot the RPi Zero and determine its IP address so you can SSH in with Putty.
3. Increase the swap file on the RPi Zero - follow the instructions here https://pimylifeup.com/raspberry-pi-swap-file/
otherwise the RPi Zero will hang just doing the 'sudo apt update && sudo apt full-upgrade -y' that you should do on the first boot.
4. Power off the RPi Zero and attach the HiFiBerry DAC + ADC hat, power up and update config.txt according to the HiFiBerry instructions.
5. Install gadget mode. Here is Michael's code edited for gadget play (output) mode:
echo 'dtoverlay=dwc2' | sudo tee -a /boot/firmware/config.txt > /dev/null
echo -e 'dwc2\ng_audio' | sudo tee -a /etc/modules > /dev/null
echo 'options g_audio p_srate=44100 p_ssize=4 p_chmask=3 p_chmask=0' | sudo tee -a /etc/modprobe.d/usb_g_audio.conf > /dev/null
save and reboot.

6. Install CamillaDSP and configure the HiFiBerry as an input device.
7. In CamillaDSP configure the Output Device as USB gadget.
8. Connect to the master RPi5 and if not already done, install gadget mode and build a CamillaDSP config with the Input Device as USB Gadget.

Links:

Edited to include gadget mode for output.
2nd edit to attach RPi5 and RPi0 CamillaDSP configs, boot/firmware/config.txt & /etc/modprobe.d/usb_g_audio.conf files .
 

Attachments

  • RPi Gadget configs.zip
    3.4 KB · Views: 33
Last edited:
That seems unnecessarily complicated. Why not just use a USB audio interface with 2 analog inputs instead of turning the Zero 2W into one?

Also only one of them should be in gadget mode - the other has to be host for them to communicate.
 
That seems unnecessarily complicated. Why not just use a USB audio interface with 2 analog inputs instead of turning the Zero 2W into one?

Also only one of them should be in gadget mode - the other has to be host for them to communicate.
A RPi Zero 2W with the HiFiBerry DAC + ADC is about $US75, as Michael says in post #21 above "Overall, the value is very good. You could probably come out at under $200 for a RPi5 + PSU + FLIRC + DAC8x + HDMI/USB touchscreen and have a really nice DIY active speaker DSP system", so for around $275 you have a 2 in 8 out active speaker full DSP system. A similar spec USB Audio Interface would certainly be simpler but cost at least twice as much.
 
A RPi Zero 2W with the HiFiBerry DAC + ADC is about $US75, as Michael says in post #21 above "Overall, the value is very good.
We could do with more measurements of entry level ADCs to know how they compare. From what we've seen of the HifiBerry DACs I would expect it to be a few dB better than the very cheap Fun Generation UA-202 and comparable to entry level 2 in 2 out interfaces.
 
Why not getting some ADC I2S slave module (quite a few on Aliexpress) and hook it directly to the 2-8ch I2S master input of RPi5?
 
Back
Top Bottom