High amounts of THD over USB and Coax...

Raspberry Pi related support

Re: High amounts of THD over USB and Coax...

Postby tboooe » 11 May 2016, 22:50

are these results from the Digi+ SPDIF out or Pi USB out?
tboooe
 
Posts: 30
Joined: 29 Apr 2016, 23:29

Re: High amounts of THD over USB and Coax...

Postby PeteB » 11 May 2016, 22:56

To the best of my knowledge, a Pi 2 with a HiFiBerry DIGI+ does not clip or change a 0db signal in the digital domain.

However, I am not sure about the software. A software bug or a function with the wrong settings could cause that. Something like that was happening with the DAC+, and was recently fixed (I have one of each DAC+ and DIGI+).

Good job finding the problem!

edit:

@jacko, if you are still lurking here... I did note that independent THD numbers validate your prediction that "the sweet spot in terms of distortion would be at 50% even w. the DIGI". In my defense, they are so small that they (probably) would not be audible, however I think that I have lost that bet.
PeteB
 
Posts: 421
Joined: 06 Feb 2016, 05:07

Re: High amounts of THD over USB and Coax...

Postby robertzombie » 11 May 2016, 23:26

tboooe wrote:are these results from the Digi+ SPDIF out or Pi USB out?

Digi+ coax.
robertzombie
 
Posts: 39
Joined: 08 May 2016, 14:57

Re: High amounts of THD over USB and Coax...

Postby rastus » 12 May 2016, 02:18

robertzombie wrote:Digi+ coax.


Same with the DIGI+ using optical?

LoL @ PeteB, good call. I have learned, to learn from my mistakes as I make so many, I have no choice.... it's a matter of learn or.... ummm. I have downloaded this RMAA, with the manual. Upon perusing the manual I am.... freaked. I would say some time would need to be taken to correctly use this product, and I'm not sure right now I have that amount of time(being OCD). To another subject, found these and thought they may interest someone.

Batteries vs Linear Power Supply
http://www.coreaudiotechnology.com/batt ... er-supply/

Why Power Makes a Difference in Digital Audio
http://www.coreaudiotechnology.com/why- ... tal-audio/

Power Supplies and Noise
http://lhlabs.com/blog/2015/07/power-su ... and-noise/

An reflection.... could this be caused by the now infamous "jitter"? Also, are you playing a song or a single tone? Why am I thinking, "Where is Tommy right now?"

Below is some notes I've been keeping, saved from posts online. These are about the DAC, not DIGI, but is this what we're talking about here, or am I off on another tangent....

---------------------------------------------------------------
Set the Playback Boost in alsamixer to 0 dB. I have played with the alsamixer settings endlessly to try to solve this issue. The setup that seems to work for me is as follows: PCM=85, Playback=100 (0 dB), Playback Boost=0 (0 dB).

I got into a small discussion with someone from VullersTech, who sells the Pifi DAC+ which also uses the 5122. He basically told me that the PCM values from 0% to 100% corresponds to -103dB and 24dB. Since 0dB is the max volume of the chip some distortions might be possible if your hardware volume is set over 86%.

At 96%, the HiFiBerry DAC+ runs at the maximal volume that works without clipping on a full-range signal. I can't say anything about products.

I had to turn the internal volume down to about 90% in ALSA to avoid clipping.

---------------------------------------------------------------

robertzombie > Told you they were interested.
User avatar
rastus
 
Posts: 353
Joined: 21 Aug 2015, 10:29

Re: High amounts of THD over USB and Coax...

Postby PeteB » 12 May 2016, 02:56

@rastus: OCD, that describes about 96% of all audiophiles, doesn't it? ;)

You are correct about the DAC+, and I have some posts on the HiFiBerry forum site (and here) about that. I run mine with the -6db setting enabled in amixer, which is subjectively the best point with the rest of my gear.

(this is the setting you can access using "amixer sget Analogue" and set using "amixer sset Analogue 0/1")

However, I did not think this was the case with the DIGI+ (obviously there is an external DAC in the loop, but still??). And I have kept my mouth shut until Robert posted independent results, using a different DAC, different PC, different everything. And, I do not like losing bets. Anyway...

Thanks for the links, I will read them this weekend, when my brain is fresh. The internal resistance of some batteries can be an issue (something you can look up). So can noise from the circuitry inside battery banks (not so easy to find as internal resistance).
PeteB
 
Posts: 421
Joined: 06 Feb 2016, 05:07

Re: High amounts of THD over USB and Coax...

Postby rastus » 12 May 2016, 03:34

Yeah, but I have Bipolar too... so one day I love ya, the next day I hate ya, but I'm consistent (obsessed) all year round! Today's a good day, so I love ya PeteB, but watch out (and ignore me) tomorrow, LoL! Add to that the fact that I smoke too much, drink too little and love being with 'dirty' women!

Re betteries: Been having discussions with many 'engineering types' over at stereo.net.au about the Pi et all, very informative (jitter, cables' affects, and of course power supplies). Most of them, not all, are 'tube types'... very staunch, stoic even, but helpful. This I ran across there:

Is there such thing as noisy battery supply?

Of course there is. Batteries have an inherent noise figure. For a battery to produce electricity, a chemical reaction must take place. That chemical reaction produces high frequency noise. Additionally and more seriously, batteries possess an imperfect output impedance. In fact, a PROPERLY designed regulated power supply will provide superior performance to batteries. Additionally, well designed equipment enjoys a high level of PSRR (Power Supply Rejection Ratio). All that aside, batteries do make a nice, easy, quiet power supply. A PROPERLY designed active regulator is always going to be better. IOW: Avoid anything with zener diodes.


Anyway, in this particular case, I'm thinking USB, not I2C (whatever that means, my head's in a spin right now). Still, I would like Tommy in on this, see what he's got to say, I like him he makes me feel 'normal'. I mean that with the utmost sincerity too.
User avatar
rastus
 
Posts: 353
Joined: 21 Aug 2015, 10:29

Re: High amounts of THD over USB and Coax...

Postby tboooe » 12 May 2016, 04:52

robertzombie wrote:
My question, therefore, is: In a playback situation, does the Pi clip when it is delivering full volume


Please excuse the noob question but where do we go from here? Is there a solution to this issue?
tboooe
 
Posts: 30
Joined: 29 Apr 2016, 23:29

Re: High amounts of THD over USB and Coax...

Postby rastus » 12 May 2016, 05:36

tboooe wrote:Please excuse the noob question but where do we go from here? Is there a solution to this issue?


As we don't as yet know the actual cause of the 'issue'... the question really is: Is there an issue, or is it the test conditions. So, for now, we are here... not going anywhere. And as robertzombie has said, someone needs to replicate the test, maybe even under different circumstances (hardware). I would (and I am) keep an eye on this space.

Edit: I'm wondering if the USB cable has a ferrite bead (choke) on it? Or not? And if not, then try one... EMI suppression and all that jive. Forgive me, one of 'those' days, lots of good ideas (but may not necessarily be on topic).
User avatar
rastus
 
Posts: 353
Joined: 21 Aug 2015, 10:29

Re: High amounts of THD over USB and Coax...

Postby robertzombie » 12 May 2016, 07:38

I just want to re-cap here to make sure everyone is on the same page. Not sure why the Hifi Berry DAC+ keeps getting mentioned as I don't own one.

The RMAA test file is a series of tones and pulses that tests the frequency response, dynamic range, noise floor, THD, stereo separation, and IMD of a digital playback device (e.g. a DAC, CD player, iPod, soundcard). Anything that performs a digital to analogue conversion and has analogue outputs.

Archimago has proved that, as long as the digital device streaming the digital data (laptop, CD player, music streamer) to one externally connected DAC is bit-perfect, "the sound of the DAC of course does not change based on the streaming device since they're all feeding the same (bit-perfect) data". My laptop can send the RMAA test file over USB to my DAC (Rega DAC-R) and the test file will be accurately recreated when captured by my recording software. The only limitations being those imposed by my DAC, not the appliance used to serve up the digital information. I can do the same test with my CD Player, feeding the DAC via coaxial, and get the same results. If I were to swap the DAC, I would get different results.

When I connect the Pi to the DAC (with software volume control disabled) over either USB, or Coaxial from my Digi+, an issue occurs whereby the digital signal appears to be peak limited. This results in the THD and IMD test signal being truncated, thus causing the 15% THD results. If the Pi were rendering the digital information correctly, the DAC would give the same output as with any other digital renderer. The only reason why the DAC's output would change is if there were a change in the digital data it receives. I have shown that this issue occurs independently of the HiFi Berry product. I have also replicated the exact same results with: my USB drive unplugged from the Pi, using ethernet, wifi with ethernet unplugged, with wifi and bluetooth disabled, different power supply, various bit depths and sample rates, and with Volumio as well as RuneAudio. The issue must surely reside at the Pi's i2s stage or earlier.

I have found that, by enabling software volume control and setting the Pi's volume to 89%, the issue with the altered test signal goes away and the results in RMAA look normal for my DAC. However, by doing this you are essentially removing 2 bits of resolution from the signal. Using the RMAA 16/44 test with the Pi at 87% (the sweet-spot, see results up-thread) gives a dynamic range output of 85 dB which is the equivalent of 14 bits. Disable the volume mixer (so output is 100%) and you get ~16 bits of resolution, but 15% THD.

So, my question is: Is the Pi doing something at the i2s (or earlier) rendering stage that results in a clipped signal? I would be inclined at this point to say 'yes' as, to repeat what I wrote earlier, the analogue output of a single file from a single DAC should be exactly the same - regardless of the device used to render the digital information to it - so long as that rendering device is operating in a bit-perfect fashion.
Last edited by robertzombie on 12 May 2016, 09:27, edited 3 times in total.
robertzombie
 
Posts: 39
Joined: 08 May 2016, 14:57

Re: High amounts of THD over USB and Coax...

Postby hondagx35 » 12 May 2016, 09:24

Hi robertzombie,

I have found that, by enabling software volume control and setting the Pi's volume to 89%, the issue with the altered test signal goes away and the results in RMAA look normal for my DAC.

Please take a bottle beer or wine (doesn't matter) and think about your statement.

I like this thread and hope it will continue.

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

support RuneAudio Donate with PayPal

PreviousNext

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 1 guest