very HQ stereo analog audio input for Raspberry Pi - any options?

Although this thread has remained dormant since 2017 I am happy to say that I have finally found the product I was originally looking for.

It's an ADC+DAC combo implemented in a Raspberry pi HAT from HiFiBerry:
HiFiBerry DAC+ ADC | HiFiBerry
The cost is very reasonable: US$50 plus shipping by post (about 2 weeks to the US). I also found them for sale on Amazon with a steep markup, but available in a couple of days.

attachment.php


I have one of these on order currently. Should take a couple of weeks to reach me. When I get it I will load it on a Pi and test it out (measure the real-world performance).

The HAT is built around the Burr-Brown PCM5122. The specs look promising (see link below) and HiFiBerry has a good reputation.
Datasheet DAC+ ADC | HiFiBerry
Scroll down to the section titled "SPECIFICATIONS" for all the details. I am not sure if this is the measured specs, or (more likely) the codec MFG's specs for the chip. That's why I want to measure it for myself.

The board offers both unbalanced inputs (via 3mm audio jack) and balanced inputs (via header pins). There are a couple of different input gain settings to choose from.

This will open up some doors for using the Pi as a "DSP box". There have been several good DACs available for the Pi but few very good ADC options that didn't use USB.

NOTE: You may need to update the kernel in order to use the ADC (requires 4.18.12 or later). I just compiled the kernel as part of a related project described HERE, and updated to 4.19.23-v7+. At some point, the kernel supplied with Raspbian will be sufficient, but for now you can follow the directions posted in the thread at the link above - see post #2.
 

Attachments

  • HiFiBerry_DAC-ADC.png
    HiFiBerry_DAC-ADC.png
    630.9 KB · Views: 2,418
Last edited:

It seems that it a possible solution, but hacking it together like the peteronion web page details seems a bit tricky. I think the HiFiBerry HAT is a much safer and user friendly ADC option. The difference in price is small compared to the effort to get the Audiophonics board working, and I don't have a good way to test to make sure that sync is not dropping, etc.
 
looking forward to your review of the HiFiBerry board Charlie....
I am very keen if it does indeed perform as we have been searching for ...:)

I'm a bit wary , however, having spent several hours over many months trying to debug a HiFiBerry Digi+Pro card.....drivers?...o/s...?
power supply..?.... only to find an intermittent cold solder join on the 5V input !!!
If only the board had a power led then life would have been much more restful...

ymmv....:)
 
I finally managed to do some kind of testing on the HifiBerry DAC+ADC HAT. For this I performed a loopback test using the analog output --> analog input of the HAT under kernel 4.19.23-v7+. This was possible on the Pi using the software "JAAA" (JACK and ALSA Audio Analyzer). It's a basic FFT analyzer plus a signal generator.

After some initial testing I was a little perplexed at what I was seeing, so I sent an email to HifiBerry and got a response back within a few hours explaining a few things. While the board has a maximum input and output voltage of 2.1Vrms, the designer told me that he had optimized the performance for about 0.5-0.7Vrms. I also had failed to see in the documentation (they call it the "datasheet") that "typical" distortion levels of about -90dB or slightly better could be expected for those signal levels.

I went back and made a series of measurement that help to explain what you can expect from this board. These are provided in the attached screen shots. They are the spectrum for a 1kHz test tone at various output levels. The level is shown in the bottom right hand corner as well as in the top line in red text at the upper right hand corner of the spectrum window. The highest distortion peak was always 3rd order. JAAA allows you to monitor two peaks in real time and displays their level and the DEL, or difference. It's this difference that is the distortion level (see lowest line of red text).

Here is a summary table for the 1kHz test versus level, for 3rd order distortion only:
Code:
LEVEL......Vrms........DISTORTION...% distortion
-30dB......0.066......-92.68dB......0.0023%
-20dB......0.210......-90.11dB......0.0031%
-17dB......0.296......-87.94dB......0.0040%
-14dB......0.419......-85.70dB......0.0051%
-11dB......0.592......-82.80dB......0.0072%
 -8dB......0.836......-81.50dB......0.0084%
 -4dB......1.325......-77.65dB......0.0131%
 -1dB......1.872......-73.80dB......0.0204%
Distortion starts rising by around 2dB for each 3dB increase in level beginning around 0.2Vrms. For all but the highest levels, 3rd order dominated and this is a reasonable approximation of THD. In all cases the noise floor remained below -120dB.

This seems to be a nice Pi HAT for the DIYer, providing both stereo INPUT and stereo OUTPUT for only US$50. Combined with some IIR DSP on the Pi, a pair could make a nice active crossover for a 2-way system. Additional USB DACs could provide additional output channels as needed.

Please see attached screenshots of the spectrums collected for these measurements.
 

Attachments

  • HifiBerry DAC-ADC -30dB.png
    HifiBerry DAC-ADC -30dB.png
    29.9 KB · Views: 548
  • HifiBerry DAC-ADC -20dB.png
    HifiBerry DAC-ADC -20dB.png
    29.5 KB · Views: 549
  • HifiBerry DAC-ADC -17dB.png
    HifiBerry DAC-ADC -17dB.png
    29.9 KB · Views: 88
  • HifiBerry DAC-ADC -14dB.png
    HifiBerry DAC-ADC -14dB.png
    29.8 KB · Views: 81
  • HifiBerry DAC-ADC -11dB.png
    HifiBerry DAC-ADC -11dB.png
    29.7 KB · Views: 106
  • HifiBerry DAC-ADC -8dB.png
    HifiBerry DAC-ADC -8dB.png
    30.2 KB · Views: 99
  • HifiBerry DAC-ADC -4dB.png
    HifiBerry DAC-ADC -4dB.png
    30.7 KB · Views: 100
  • HifiBerry DAC-ADC -1dB.png
    HifiBerry DAC-ADC -1dB.png
    30.6 KB · Views: 132
In addition to the distortion measurements above, I want to stress that the noise floor of the DAC+ADC HAT is pretty low, making the S/N better than 120dB. After I made these measurements I threw on a USB (self powered) pro audio interface and while its distortion was lower the noise floor was higher.

As long as you keep the signal levels on the low side of consumer level the HiFiBerry HAT should be a great audio I/O solution, even when using high sensitivity CD+horn tweeters.
 
^^ The noise floor or SNR really isn't below -120 dB, only the levels of single frequency components in FFT are below that level ("FFT noise floor"). The SNR is ratio of signal power to noise power. Compare the results to SB Live! RMAA measurements here for an example, the fft noise floor is there close to -130 dB but the noise level is about 102 dB:
RightMark Audio Analyzer test: Sound Blaster Live! 24-bit
 
Analog to Digital solutions

Stumbled into this thread looking for some quality DIY hardware to get a vinyl record converted into a FLAC lossless audio file, 24 bit 44.1 kHz is pretty standard.

I was thinking I'd go from the turntable > phono pre-amp (Elekit TU-8500 tube preamp) > RCA to 3.5mm jack on a laptop. But that's an analog signal, so the ADC is happening inside the laptop, which as I understand, sucks. Like the DAC inside laptops also suck. Quality is what I'm going for here.

Taking a peek at this legwork I did below, am I barking up the right tree here? I'm leaning towards that Scarlett.

$160 Focus Scarlett 2i2

SoundBlaster X-Fi HD $110 which also has a phono pre-amp input. That eliminates another step.

I looked into that Audiophonics ADC solution, but it's not as much of a solution as more down-the-rabbit-hole. Fun, but a rabbit hole.
 
I like that ADC AK5572 - worth looking into. There are loads of "adc" things on tindie! Neat. I wonder if one of the others might work with a RaspberryPI that will hit that 24bit 96kHz (oops, I meant 96kHz, not 44.1kHz I put above) requirement.

The AD-convert you linked is $105, plus the $18 for the other thing, we're at $121 - close to the $160 for the Scarlett 2i2. Would this solution be higher quality? I don't know what chip the 2i2 uses.



EVGA Nu Audio $250

Good review of the Scarlett 2i2 at audiosciencereview
 
There is now another option for "very high quality" audio input (analog audio): the MOTU M2 or M4. These are relatively new offerings from MOTU that are bus powered USB devices. They have very good performance and only cost $169 and $219 respectively. Either of these could make a very nice high performance audio input for the Pi.

I have an M4 and can confirm that it is recognized by the OS under ALSA, using the latest Raspberry Pi OS version (from May 2020) that uses kernel 5.4.x.
 
Without the second patch (implicit FB quirk) people will get glitches in duplex recording. Their interval can be tens of seconds (depends on difference of the host USB clock and the master clock in Motu), hardly noticeable while listening, but reliable to ruin precise FFT measurements with long-term averaging.

It's easy to test - several minutes of recorded spectrogram in sox will show the glitches right away.
 
For a capable and (used) affordable Linux USB option the Novation 24/96 device works well. Recognised ootb on Linux Distros and Raspberry Pi..:)
Amazon.com: Novation Audiohub 2x4 Combined Audio Interface and USB 2.0 Hub: Musical Instruments
Although it is promoted as a DJ device it performs admirably in my LP ripping chain.
Bought used for US/$ 24.00 :)
Great monitoring options..FocusRite internals, and tested in a Linux active crossover application.
Pulseaudio Crossover Rack - multi-way crossover design & implementation with linux
 
Last edited:
For a capable and (used) affordable Linux USB option the Novation 24/96 device works well.

This is no longer made by Novation, and seems to be no longer available for purchase (your amazon link is sold out, for example).

Any interface that fits the "very high quality" level should have clear audio specs for THD, distortion, input and output levels, etc.etc. This product has absolutely no specs that I could find anywhere. It was marketed for DJ or light road use. I would not consider it a serious audio interface.

There are lots of gadgets like this that work under Linux as ADC/DAC but few are "very high quality", especially on the ADC side. For example, the Focusrite Scarlett line is very good and works under Linux but not in the "top tier".