Sound quality limitations of Raspberry Pi + I2S DACs

Diy? Low-budget? Esoterics? Let's discuss about DACS!

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

Sound quality limitations of Raspberry Pi + I2S DACs

Postby phalanger » Wed Jan 07 2015 15:44

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?
Random avatar
phalanger
Sunday DIYer
Sunday DIYer
 
Posts: 18
Joined: Mon Jan 05 2015 14:32

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


Sound quality limitations of Raspberry Pi + I2S DACs

Postby PatrickB » Thu Jan 08 2015 08:32

phalanger wrote: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?)
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.

I guess you have read http://volumio.org/raspberry-pi-i2s-dac-sounds-so-good/ and I agree with the fact that an as short as possible path should be looked at.

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.

phalanger wrote: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?
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 ;)
Raspberry PI B+ with Hifiberry Digi+ (Audio-GD DAC) and NAD A/V receiver with Dali speakers.
Also working on a Pi 3A+ connected over USB to in-car DSP
User avatar
PatrickB
Objectivist
Objectivist
 
Posts: 359
Joined: Thu Jan 01 2015 20:52
Location: The Netherlands


Sound quality limitations of Raspberry Pi + I2S DACs

Postby phalanger » Thu Jan 08 2015 13:39

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.

Image

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.
Random avatar
phalanger
Sunday DIYer
Sunday DIYer
 
Posts: 18
Joined: Mon Jan 05 2015 14:32


Sound quality limitations of Raspberry Pi + I2S DACs

Postby gswg » Thu Jan 08 2015 20:41

FYI As posted on the other website/ blog....


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.

Gordon
Random avatar
gswg
Audiophile
Audiophile
 
Posts: 114
Joined: Wed Jan 01 2014 17:53


Sound quality limitations of Raspberry Pi + I2S DACs

Postby phalanger » Fri Jan 09 2015 17:21

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 https://hifiduino.wordpress.com/2012/03 ... ec-jitter/
Random avatar
phalanger
Sunday DIYer
Sunday DIYer
 
Posts: 18
Joined: Mon Jan 05 2015 14:32


Sound quality limitations of Raspberry Pi + I2S DACs

Postby matijaudio » Tue Jan 13 2015 19:05

Useful links: https://hifiduino.wordpress.com/2014/11/13/raspberry-pi-b-digital-audio/ and http://www.raspberrypi.org/forums/viewtopic.php?f=44&t=8496

Conclusion from first link:
The current method of generating the clocks for digital audio in the RPi are far from perfect. The best clocks are obtained by integer division of the external clock and works for 48K and 96K sample rates and only if the DAC can accept 40fs or 80fs. For anything else, the clocks are derived from the 500MHz PLL through fractional division as explained above. It has been reported that the 500MHz clock itself is derived from the 19.2MHz external clock through a clock multiplier.

However imperfect as these clocks might be, there are a good number of DAC boards that have been developed and reported to work well with the RP1. As these products are being developed by audio fanatics, we can expect continuous improvements and enhanced approaches to better clock generation such as external reclocking and slave configurations.

For additional info, you can check the Raspberry Pi I2S discussion thread here: second link from my post


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).

Did anyone tried with this DAC board? http://www.ebay.com/itm/DAC-24192-ABR-I2S-Input-DAC-Ultra-Low-Noise-Regulation-Low-Phase-Noise-Clock-/331262327691?pt=LH_DefaultDomain_0&hash=item4d20c5fb8b I'm looking forward to do it but I'm concerned about DMA limitation to 16 bit.
Random avatar
matijaudio
Sunday DIYer
Sunday DIYer
 
Posts: 20
Joined: Tue Jan 13 2015 18:01


Sound quality limitations of Raspberry Pi + I2S DACs

Postby matijaudio » Wed Jan 14 2015 09:10

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?

I found in this topic a post in which user reports that is working well on B+, even on 1.5 Volumio after patch: http://volumio.org/forum/list-i2s-dacs-for-raspberry-t1103-20.html

What is all about DMA limitation? Is this a problem specific to a model version or hardware revision?

EDIT: My link contains the explanation for DMA "limitation" that is a bug: http://www.raspberrypi.org/forums/viewtopic.php?f=44&t=8496&start=575

Read from this post down:
by plugh » Sat Aug 30, 2014 9:01 pm


Can anyone confirm that this fix works or does Volumio has it?
Random avatar
matijaudio
Sunday DIYer
Sunday DIYer
 
Posts: 20
Joined: Tue Jan 13 2015 18:01


Sound quality limitations of Raspberry Pi + I2S DACs

Postby phalanger » Thu Jan 15 2015 19:03

matijaudio wrote: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?

I found in this topic a post in which user reports that is working well on B+, even on 1.5 Volumio after patch: http://volumio.org/forum/list-i2s-dacs-for-raspberry-t1103-20.html

What is all about DMA limitation? Is this a problem specific to a model version or hardware revision?

EDIT: My link contains the explanation for DMA "limitation" that is a bug: http://www.raspberrypi.org/forums/viewtopic.php?f=44&t=8496&start=575

Read from this post down:
by plugh » Sat Aug 30, 2014 9:01 pm


Can anyone confirm that this fix works or does Volumio has it?


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?
Random avatar
phalanger
Sunday DIYer
Sunday DIYer
 
Posts: 18
Joined: Mon Jan 05 2015 14:32


Sound quality limitations of Raspberry Pi + I2S DACs

Postby matijaudio » Thu Jan 15 2015 19:14

phalanger wrote:
matijaudio wrote: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?

I found in this topic a post in which user reports that is working well on B+, even on 1.5 Volumio after patch: http://volumio.org/forum/list-i2s-dacs-for-raspberry-t1103-20.html

What is all about DMA limitation? Is this a problem specific to a model version or hardware revision?

EDIT: My link contains the explanation for DMA "limitation" that is a bug: http://www.raspberrypi.org/forums/viewtopic.php?f=44&t=8496&start=575

Read from this post down:
by plugh » Sat Aug 30, 2014 9:01 pm


Can anyone confirm that this fix works or does Volumio has it?


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?


Patching Volumio is easy task if you are familiar with basics of posix system administration: http://jungels.net/articles/diff-patch-ten-minutes.html

I have reply from sellarzaudio:
Dear xxxxxx,

Hello,

It is not dificult to wire. It was tested with RPi B

RPi B(P5) ---> DAC-24192-ABR
1. 5V ---> P/S_IN V+
3. PCM Clock ---> BCK
4. PCM FS ---> LRCK
6. PCM DATA ---> DATA
7. GND ---> P/S GND
8. GND ---> I2S_INPUT GND
-----------------------------------------------------------------------
BBB(P9) ---> DAC-24192-ABR
Pin 1(GND) ---> P/S GND
Pin 2(GND) ---> I2S_INPUT GND
Pin 5(5V) ---> P/S_IN V+
Pin 28 ---> DATA
Pin 29 ---> LRCK
Pin 31 ---> BCK

DAC-24192-ABR has a high quality clock and is a asynchronous DAC. RPi works well in slave over I2S.
DAC-24192-ABR was not tested with UDOO platform, but if UDOO has I2S output, I think that it works well with UDOO.

Best Regards,

- sellarzaudiotechnology
Random avatar
matijaudio
Sunday DIYer
Sunday DIYer
 
Posts: 20
Joined: Tue Jan 13 2015 18:01


Sound quality limitations of Raspberry Pi + I2S DACs

Postby ramilacaponi » Thu Jan 15 2015 20:00

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?

These look like asynchoronous to:

Curryman DAC
http://www.minidsp.com/products/minidsp ... an-i2s-dac

DACBERRY3
http://tekdevice.com/chapter2/index.php ... uct_id=111

Audiophonics I-Sabre DAC ES9023 Raspberry Pi A+ B+ / I2S
http://www.audiophonics.fr/fr/kits-modu ... -9341.html
Random avatar
ramilacaponi
Fresh off the boat
Fresh off the boat
 
Posts: 4
Joined: Tue Jan 06 2015 15:33

Next

Return to DACs

Who is online

Users browsing this forum: No registered users and 0 guests