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

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

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

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

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

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 29 guests