Linards
Member
Hi, Guys!
A short intro:
I have been following ASR for last 4 years, since friend of mine showed this forum and somewhat initiated my journey in all-things-related-to-audio. 1 month ago, I decided to buy TOPPING E2X2 audio interface due to its quite good ADC (up to 110 SINAD) to make some basic, practical measurements. (More info on E2X2: https://www.audiosciencereview.com/...ds/topping-e2x2-audio-interface-review.49127/)
First “gadget” I decided to test is built-in 3.5 mm (headphone) output of Raspberry Pi (RPI) 4B when used as a DAC.
If you are rolling your eyes already, hear me out.
My motivation is simple – I couldn’t find detailed measurements of it. Since RPI streamers + DACs are still quite popular, in any audio forum a natural suggestion to newcomers planning such system will be to use dedicated I2S (usually hat) DAC or USB DAC, because audio from RPI headphone output is bad and by using dedicated DAC will be much improved.
But what is bad? How to quantify it? And what exactly will be improved with a dedicated DAC?
1. Let’s start by looking-up available information on internet
RPI 4B was released in June 2019. https://en.wikipedia.org/wiki/Raspberry_Pi
In RPI 4 datasheet, it reads (https://datasheets.raspberrypi.com/rpi4/raspberry-pi-4-datasheet.pdf):
“5.5 Audio and Composite (TV Out)
The Pi4B supports near-CD-quality analogue audio output and composite TV-output via a 4-ring TRS ’A/V’ jack.
The analog audio output can drive 32 Ohm headphones directly.”
“Near-CD-quality” from RPI headphone output sounds awesome! Maybe bad audio from it is just a myth?
RPI 4B uses Broadcom BCM2711 ARM System-on-a-Chip (SoC) https://www.raspberrypi.com/documentation/computers/processors.html.
One can find also some additional information about its peripherals here: https://datasheets.raspberrypi.com/bcm2711/bcm2711-peripherals.pdf. It has been reported long ago that analog audio in RPI headphone is achieved by Pulse Width Modulation (PWM) driver that nominally runs at 100 MHz (agrees to datasheet above) and using RC low-pass filter in the output. https://forums.raspberrypi.com/viewtopic.php?t=8684 Some newer reports suggest that PWM can be clocked at 250 MHz. https://forums.raspberrypi.com/viewtopic.php?t=176121.
Following math is frequently used (in forums) to estimate potential audio quality:
PWM frequency = Sample rate x 2^(bits)
Taking sample rate of CD quality 44.1 kHz and nominal PWM clock 100 MHz leads to roughly 11-bit resolution. Perhaps additional bit is lost if using PWM in stereo mode.
PWM clock from 100 to 250 MHz would give roughly another bit at 44.1 kHz.
Using these estimates, we are looking at bitrate of 441kbps or so. Just from bitrate perspective it seems to be sufficient for lossy streaming (e.g. Spotify). Does it translate to “Near-CD-quality”? I will let you decide on that one in poll.
2. Measurement set-up, instrumentation, software and tests
RPI 4B with original 5.1V power supply was used. Volumio 3.631 operating system was installed on SD card.
Tests using TOPPING E2X2 and Multitone Analyzer (MA) v1.1.7 software were done by generating appropriate .wav files and copying them to streamer (only exception was single channel tone generated in REW. Don’t know why MA always generated signal in both channels…). As frequency and level sweeps would take quite a lot manual work, I am too lazy to do them.
Appropriate test file was played and volume was adjusted using Volumio web-interface (Mixer Type: Hardware). Signal from RPI’s 3.5 mm headphone output was connected through RCA splitter to oscilloscope using additional BNC-RCA adapters or connected to E2X2 interface’s ADC using RCA to XLR cable. E2X2 was connected to PC using provided USB cable.
Following tests were performed using MA and E2X2:
- 1kHz sine: 44.1 kHz / 24bit signal, FFT: 256K / 16 AVG (TH+N, SFDR)
- Stereo Crosstalk L -> R @ 1kHz: 44.1 kHz / 24bit signal (REW), FFT: 256K / 16 AVG
- Frequency response: log-chirp 44.1 kHz / 24 bit signal, FFT: 64K / 8 AVG
- Cut-off filter FR: log-chirp 192 kHz / 24 bit signal, FFT: 256K / 16 AVG
- Multitione : 32 AP Tone, 192 kHz / 24bit signal, FFT: 1M / 8 AVG
- JTest 24: 48 kHz / 24bit signal, FFT: 256K / 16 AVG
- IMD STMPTE: 44.1 kHz / 24bit signal, FFT: 265K / 16 AVG
- IMD CCIF 19k/20k: 192 kHz / 24bit signal, FFT: 265K / 16AVG
3. Oscilloscope measurements: 1 kHz sine
Let’s start with 100% volume measurement. One can clearly see that signal is strongly clipped, nowhere near the sine. Obviously signal amplitude is strictly limited to roughly 500mV. If you play this sound on your system, you will hear a horrible distortion.
Playing around with volume in Volumio it visually appears that more precisely clipping amplitude is at 480mV. Thus, maximum signal with no (visual) clipping was at volume 85%, giving amplitude of 472mV and RMS of 0.33V. To give a perspective this is only 15% of 2.1V or roughly decrease by -16dB. This is quite low, and one can expect insufficient volumes.
Probably I could have done measurements at 85% volume, but I decreased it 5% more to 80%, giving amplitude of 400mV and RMS of 0.275V, which was used in all further measurements. This was “motivated” by Max Volume Level setting in Volumio interface (steps by 10%) that I used to limit clipping and also that I simply forgot that I found this “better regime” when I was working with MA. Sorry… :/
4. Measurements with Multitone Analyser and TOPPING E2X2 ADC
Here are 1kHz FFT’s with 100% volume. Plain and simple – don’t ever use it!
Here are 1kHz FFT’s with 80% volume. And we have SINAD of 56.1 dB! 50 Hz mains is leaking into signal at -85dBr or so. Overall, THD seems to be much bigger problem than noise.
Obviously, SINAD is very poor by today’s standards and Amir’s DAC chart, but, believe it or not, it is not dead last!
Let’s examine stereo crosstalk at 1kHz. It seems to be -68dBr signal from left to right channel, which is a lot.
Frequency response for lower frequencies is tolerable <-1dB (some is due to ADC), higher frequencies roll-off way too fast.
By looking at low-pass filter response, one can see -2dB attenuation at 20kHz, -4dB at 21kHz (which slightly disagrees with picture above) and -60dB or so at 22kHz. Attenuation rises to -37dB or so going further – probably nothing good.
Multitone test shows huge problems with frequencies >1kHz, by adding 20dB to noise. Some 50 – 60dB of distortion-free range is obtained which translates to 9 – 10 bits.
Nothing to brag about in jitter test. On the other hand – it seems to be not the biggest issue either.
Oh, dear! Intermodulation is very high in both STMPTE and CCIF tests. I guess, this along with THD causes huge rise of noise for frequencies > 1kHz in Multitone test.
5. Concluding remarks
Probably nobody expected miracles of RPIs 3.5 mm headphone output. And indeed – there is none. It does what it supposed to do for the money (you don’t pay) – delivers some sound out of it.
It seems that the biggest limitation is its low output voltage. You should limit output signal not to exceed 0.48V amplitude (around 0.33V RMS for sine), otherwise clipping will occur. If you are using Volumio, never exceed 85% volume or set max limit at 80% (0.4V amplitude, 0.275V RMS) to be safe.
Depending on your audio system and capabilities of amp/speakers, you can find yourself short of volume in some cases (e.g. large, noisy rooms). For desktop or small room use – it should be enough.
Frequency response is not great. Decent DACs have it almost perfectly flat. Higher frequencies seem to rolls-off too quick. Good news – not everyone hears them, especially in realistic (ambient noise) environment.
Intermodulation distortion… better not to mention.
SINAD is in "very poor" category, 56.1 dB. However, it is amusing to see it in the same picture with some DAC measurements of products from companies like Hegel, NAD and PS audio.
You can expect around 9 to 10 bits of quite clean dynamic range, which, I guess, would translate to roughly to 400kbps of bitrate at 44.1 kHz. Something that could be enough for lossy audio? Perhaps.
As always - it all depends on what is the goal / expectation of the system you want to use it in.
I am sitting here at my desk in a studio type living-room, hooked RPI to small JBL monitors and listening to music. As long as I don't clip it, sound quality is not distracting.
Cat is running and playing around. Plenty of noises are coming from kitchen side. Is this all “Near-CD-quality”?
Probably not…
Should it always be?
I will let you decide on that one.
P.s.
Looking forward for your reasonable critique and suggestions. Cheers!
Last edited: