I have been looking into using RPi as a hifi music player, using an i2s DAC.
But after reading a little more into the subject, I had some worries which were confirmed by a fellow Volumio user (Ralph); namely that the potential for sound quality using RPi + i2s seems to be limited. The mentioned limitations are: 24 bit does NOT work over RPi i2s, 24-bit music will be truncated to 16bit due to DMA limitations, making 24 bit audio sound slightly worse than a CD (which is downmixed to 16bit instead of just truncated). Another issue mentioned is that these I2S dacs are tied to the internal clock and therefore have a lot of jitter, especially at 44.1khz (which happens to be the most commonly used frequency).
These seem like some pretty disqualifying findings for trying anything truely hifi with RPi+i2s dacs, assuming they are true. Yet this seems to be largely ignored on this and other forums, with people considering the combination of RPi+i2s dac to give ‘audiophile grade’ results. For me, 24bit being truncated to 16, and 44.1k sources facing excessive jitter, means that the result does not qualify as truely hifi.
I wonder if anyone else can verify these statements and if any solutions have been found for them. Or are people happily (unknowingly?) accepting excessive jitter and truncated hi-res?
Apart from the 24-bit issue, the other main thing is ofcourse the clock. I am not entirely sure how this works, the i2s connector consists of 2 clock pins and 1 data pin, so the Pi sends a clock signal to the DAC, does this mean the (probably not very accurate) Pi clock is always being used? What happens for boards that have 50mhz on-board clocks like the Sellarz 9023 (DAC-24192-ABR) board for example? Or boards with BurrBrown dacs that have builtin clocks? Does it still use the master clock from the Pi or will the clock from the DAC automatically take over (which would be asynchronous mode, I think?)
I would love to get ‘real hifi’ out of my raspberry B+ but am unsure how to proceed at this point. I currently have a pretty good USB dac connected to it, but I would like to go the i2s route, IF I can get hifi performance that way (meaning accurate timing with low jitter and true 24bit). But it worries me a little to see these issues raised but not addressed.
Can anyone shed light on this? Can these issues be overcome or is the RaspPi just not the platform for low-jitter 24bit audio?
A lot of discussion has been going for a while (and proably will continue for much longer ) but in the end most important is which way sounds the best for you.
But my personal main concern in looking for a good solutions is that at the point the digital zeros and one are converted to analog signals which feed my amplifier. In a lot of ways you can transport these zeros and ones to the chips and circuits that generate the analog signal. It is at this circuitry where any jitter pick-up on the way might influence the quality of the analog signal. The quality of this circuitry and how it handles any jitter is in my book the decive point. I would expect that a good quality DAC (stand-alone or integrated) using high quality components (like a good clock) produce a better analog signal than there cheaper counterparts. Although some RPI+ DAC’s profit of the very short path (direct I2S), I have some doubts (not yet proven nor do I have any listening experience with such a setup) if the are able to generate such a high quality analog signal as some other DAC’s can.
What is your reason to look for an alternative to you current USB setup? Are you experiencing issues with feeding the DAC over USB (as this seems to be an issue with the RPI+)? Or any audible jitter?
My current setup uses an Hifiberry Digi+ to feed my DAC using Coaxial SPDIF. I still have to try to feed my DAC over USB but have been a little reluctant to try it
Thanks. Hifiduino was helpful reading material to understand the jitter issue a little better meanwhile. The problem is that the RPi runs in master mode (and I don’t think there is an easy way to make the RPi i2s run as slave to an external clock). The RPi internal clock used for i2s is a 19.2mhz one, which can be turned to 96k or 48k pretty easily with an integer divider, but not to 44.1, causing excessive jitter especially on that popular frequency.
The following graph is telling, comparing the signal phase noise (result of jitter) of various setups. As can be seen, standard i2s solutions on the RPi, even with a low jitter Sabre DAC, perform significantly worse than a basic cd player, while the USB interface shows more potential.
As for my USB DAC, a MusicStreamer Pro, it works fine. I have not experienced any hickups so far (upto 24/96 which is the most this DAC supports). Subjectively I had the impression it sounded less good than it did connected to my laptop, but I didn’t compare enough to be sure. The reason I would rather use i2s instead is mostly because I have other uses for my USB DAC but also because I want 192khz to work, and was hoping to get a performance increase when using i2s and a nice Sabre or AKM DAC. But it looks like the Raspberry may be the limiting factor.
I have no idea where Ralf has got that information from or if it’s valid / invalid - I certainly haven’t read every line of linux code for i2s playback, and I’d be surprised in anyone else has recently. Maybe Florian knows - he wrote the i2s implementation. It’s also a moving carpet with code changes being incorporated / changed weekly. There was a point in time when 24bit was playing back as white noise (a software bug) which has been fixed many months ago, it was caused by a change elsewhere are not related to i2s playback as such.
I don’t understand the DMA discussion. DMA moves a chunk of memory contents from one location to another. It’s bit perfect.
The Pi clocks are not brilliant - we all know that and we have certainly done everything to make the best of what exists - from our boards you will see many components, if we wanted we could have just banged down the TI PCM5122 and wired it up - job done. In fact that was what our prototype was The components are there for a reason.
The PCM5122 is working in slave mode and we use the DAC’s built in PLL to sort out the clock.
We’re talking £25 devices here guys - they will never match a £10k Linn streamer, but for the small investment it’ll sound much much better than a USB DAC and make you smile knowing that you can spend the remainder of the £10k on content, nice wine and holidays.
I find the fact that we’re all able to interact with the developers (software and hardware) first hand, make suggestions, help set product directions and be part of all this massive movement just mind blowing.
Oh, and if I could get away with charging £300+ for the Pi-DAC+ I would, but where would the fun be in that?
Also, the Sabre ES9023 data sheet appears to show no built in PLL so assuming the PCM5122 or similar PLL enabled DAC will have same jitter is simply invalid.
Thanks Gordon. Let me be clear I’m not trying to be bashful, but trying to figure out the best feasible way to get low jitter performance using an RPi or similar board. It seems to be pretty tricky to get that accomplished, especially with the RPi, because of its clock limitations and USB limitations. I wrote earlier that my USB DAC worked fairly flawless although I had the impression sound was not optimal. On closer listening I did find subtle but audible imperfections in timing and ‘micro pops’. So it rings true that RPi USB (which is sharing resources with the LAN aswell) is also not without its problems, as I’ve read elsewhere.
Regarding the PCM5122, you are right, it is was not measured in that graph, and it may or may not be a better choice for this application than the ES9023, I don’t know. The ES9023 has anti-jitter mechanisms as well though, and the data sheet goes so far as to claim it to be ‘jitter-proof’, so I would not automatically assume it to be worse than the PCM5122 either. Only a comparative measurement can tell.
Getting real hifi (especially in terms of low total jitter) from a cheap board is a challenge for sure, but that’s half the fun seeing how far performance can be pushed with these cheap ingredients. I think the optimal solution would be to provide the Pi with an external clock source, although I’m not sure how feasible that is on RPi. It would probably require an amount of programming to make that happen. Another option may be to re-clock the i2s signal like here hifiduino.wordpress.com/2012/03 … ec-jitter/
I don’t get for what stands RP1. Is it RPi A/B and not A+/B+ or is a revision number? Which DAC boards were developed for RP1? I saw separete versions for A/B and A+/B+ selling around (for example from HiFiBerry).
Sellarzauio’s DAC for RPi/BBB with integrated high quality clock is asyncronous. Manufacturer stated that was tested with RPi B version and that RPi is working in slave mode over I2S. Can anyone confirm?
Very good questions, I can only hope someone else can answer… The DMA link has a proposed solution as well, I wonder if it has been incorporated yet in Volumio? Applying the fix yourself would mean having to compile the c file, which may not be up the ally of most audio enthusiasts (i would rather avoid having to do that myself aswell).
Michaelangelo, can you shed some light on this perhaps? Has this bug been fixed in Volumio? And if not, will you consider it for a next release?
Regarding that Sellarz board, I’ve been looking at it as well, it looks like a nice board. But I don’t know about it being asynchronous. Where did you read that it works asynchronous to the Pi clock?
Yeah, I was very glad when saw the sellarz dac, which seems to solve the jitter issue.
What about the 24 bit DMA problem? It’s more a software issue. Do you think it can be solved?
“24-bit issue” is already solved. You have to apply the patch (code change) provided in 2nd link in my first post in this thread. RPi distros should apply it as well (to fix it for plug’n’play oriented users).
We’re talking £25 devices here guys - they will never match a £10k Linn streamer, but for the small investment it’ll sound much much better than a USB DAC and make you smile knowing that you can spend the remainder of the £10k on content, nice wine and holidays.
You’re partially right - with a reasonable DAC (not necessarily a laboratory-quality one) and I²S connection, it’s indistinguishable fron a £10k Linn with most source material! Anyone who tells you anything else is just deluded (and desperately trying to justify his squandered £9,950!). The limiting issues are the housing of the DAC - it should be screened to prevent the analogue end of it picking up noise - and the power supply - don’t dream of using any kind of SMPSU for your DAC!
Just for fun, I recently A - B blind tested a Raspberry Pi / 9023 DAC (homebrew) against a £4k streamer (I won’t embarrass the manufacturer) and no audiophile, record producer, engineer or musician who tried the test could tell one from the other. This conclusively proves two things:
The manufacturers of high-end, high-priced hi-fi are full of BS and they’re just selling a “brand name” rather than anything particularly clever or well-made
The Raspberry Pi is a wonderful little device (if a little under-powered in these days of 4GHz processors)!
First of all; I’m not in (for flame wars). But 10k is price for audiofools or very rich persons. In such price you pay engineering for it’s outer design, custom embedded platform and it’s custom UI aside audio part (wich is the most and essentially important).
I’m 100 % sure that I can find you better and much cheaper embedded platform with more HW capabilities that has nothing to do with audio but is a essential part of streamer- I’m OK with UI (or even whole UX) from FOSS but you can develop for 8k much better one with today’s rapid development frameworks, languages and aproaches.
When we come to final and only important part for me, that’s DAC with amplification of audio signal from it’s source when is very vulnreable, you can build one that sound equally or almost equally as 10k one! And for 20 % of the price!
When someone or company is selling a brand only it’s very hard to tell because you pay a lot money for very little improvement (what’s fair and normal) and in the end we are talking about personal preferences most of the time on HQ stuff.
And yes, I’m building a compact and cheap DAC. Let’s talk about important things - how to make it better and fix the bugs.
BTW I’m planing to use it with good preamp and I’ll try to modify it (on signal path, opamp).
jitter-free does not exist in this world. It’s only a matter of how big it is. In any case it doesn’t matter, since the signal on the audio output is independent of the I2S clock.
before worrying, wait for a proof that the issue ever existed. I haven’t seen any link posted to prove the statement.