Inter-sample Overs. How well does your DAC handle it?

boxerfan88

Well-known member
When playing loud, recently I started to notice intermittent audio distortion/dropout. This didn't affect the previous R2R DAC but more obvious with ESS DAC. After much observation and diagnosis, I kind of traced it to inter-sample overs.

Digging more into the topic of inter-sample overs, it opened a huge can of worms. Not all DACs can handle inter-sample overs well.

Let's start with an old blog from Benchmark.



Intersample_Overs_26cfdc13-3eeb-4e90-af6d-0871d3eeda8d.png


As strange as it sounds, audio that "goes to 11" is hidden in between digital samples. This is especially true when the recorded samples just reach "10". Digital systems take a snapshot of the audio signal thousands of times per second. These snapshots or "samples" represent the audio signal at an instant in time. In between successive samples, the audio is always changing. Digital sampling systems often miss short audio peaks which occur between these samples. These peaks often "go to 11", but are entirely missed by the sampling system.
 

Audio

Administrator
Staff member
This is why we need higher sampling rates like 96KHz and 192KHz, and not just 44KHz.

(Audio)
 

boxerfan88

Well-known member
This is why we need higher sampling rates like 96KHz and 192KHz, and not just 44KHz.

(Audio)


Indeed.

I detected inter-sample overs artefact after upsampling to 176k, and started to hear very intermittent distortion/odd artefacts/click/pops from the ESS 8ch DAC. This started my journey to troubleshoot and understand the root cause which led me to dig deep into inter-sample overs. The Benchmark blog really open my eyes into the issue. Their early DACs couldn't handle inter-sample overs well as the DAC will clip, and they have improved their subsequent DACs to handle inter-sample overs better.

Interestingly when I remove the upsampling, the artefact seem to go away...
 
Last edited:

boxerfan88

Well-known member
To share more what I found during the deep dive...

I compared the behavior of the ESS DAC with my R2R DAC. My observation is that I didn't detect much click/pops for the problematic tracks when I used my Soekris R2R DAC. The issue is quite subtle and intermittent ... it's so hard to catch & troubleshoot.

Further research on the web, I found out that my Soekris R2R DAC has approximately +10dB of headroom. That's probably why I never really heard the artefacts on the R2R DAC when intersample overs happen.

The "Clip" LED is very sensitive, light up when there is just a single sample that overflows. The dac1541 volume control goes up to +10 dB, I believe it's a good thing to be able to add gain as some material need it, but I added the "Clip" LED so there is no doubts.
The levels in the dac1541 is set so that 0 db is actually digital -1 dB, to leave a little headroom for the digital filters, the different filters will have more or less ringing. If you're really sensitive you can just stop with the volume control at -1 or -2 to avoid any clipping by the filters.

No wonder the R2R 24-bit DAC, it has four 27-bit R2R strings. These extra bits provide the headroom to handle inter-sample overs.
Nice engineering indeed.
 
Last edited:

boxerfan88

Well-known member
Interesting resources if you want to deep dive into inter-sample overs.

https://www.reddit.com/r/audiophile/comments/7akd5k




[ Warning! Do not play the test file through your system!! It may blow your tweeters!!! ]
[ Test file is only suitable for offline analysis or electronic analysis without speakers involved. ]
 

tachyons

Active member
The intermittent clicks and pops at higher sampling frequencies are unlikely to be caused by inter-sample overs. Inter-sample overs typically lead to distortion or clipping issues, but not to intermittent clicks and pops. A more likely cause is buffer size overload.
 

boxerfan88

Well-known member
During my research, I came across this test ...


Gosh ... I was shocked ... the Pontus 2 DAC handled inter-sample overs in an extremely bad way.

The Pontus 2 is susceptible to intersample overs, and unfortunately, in a particularly bad way. Usually in the presence of intersample overs, a DAC will simply clip. However the Pontus 2 does not clip, but instead when a sample value reaches above the maximum, it ‘wraps around’ to the minimum negative value, causing a huge sudden transient which will be very audible and may appear as crackling/popping.


Typical inter-sample overs DAC behavior that clip.

image-26.png


Pontus 2 behavior.

image-25.png


Shocking!
 

boxerfan88

Well-known member
The intermittent clicks and pops at higher sampling frequencies are unlikely to be caused by inter-sample overs. Inter-sample overs typically lead to distortion or clipping issues, but not to intermittent clicks and pops. A more likely cause is buffer size overload.

You have a good point, the click and pops might be caused by buffer under-run. Something for me to investigate further.
 

tachyons

Active member
I have a spare Gustard X26 Pro equipped with dual ES9038Pro chips. Would you like to try it out to see if it exhibits the same issue? This could help confirm whether it's related to the ESS chip. Additionally, comparing DACs can be quite intriguing. I also believe I have a master clock available. You can test the effects of an external clock; whether the results are good or bad, they will enrich your hands-on experience and often provide interesting insights compared to theoretical knowledge. Just send me a pm to arrange this.
 

boxerfan88

Well-known member
I have a spare Gustard X26 Pro equipped with dual ES9038Pro chips. Would you like to try it out to see if it exhibits the same issue? This could help confirm whether it's related to the ESS chip.

Thank you for your very generous offer. Unfortunately my system is now setup in a way that requires multi-channel DAC (3 ch used) therefore a stereo DAC won’t work in my setup. I’ve also dismantled the analog crossover therefore my stereo R2R DAC is not used. If I change my mind, I’ll pm u. Thanks once again for your offer.
 

boxerfan88

Well-known member
The intermittent clicks and pops at higher sampling frequencies are unlikely to be caused by inter-sample overs. Inter-sample overs typically lead to distortion or clipping issues, but not to intermittent clicks and pops. A more likely cause is buffer size overload.

You have a good point, the click and pops might be caused by buffer under-run. Something for me to investigate further.

Thank you for the suggestion.

I went and tweaked foobar advanced settings and bumped up WASAPI hardware level buffer from 20ms to 50ms.

2024-01-25-20-50-43-Preferences-Advanced.png


I think it is better ... need to monitor some more...
 

Spunky

Active member
Isn't the DAC converting digital into Analog?
So a 20khz signal would be sampled 2x by a 40Hz sampling rate (using just round numbers) and convert into 2 sets of digital data collected and stored.
Correct me if I'm wrong here.

So if your source data was done in 40kHz, and if you try to use a 80khz (again, round number) DAC, the DAC will use some algorithm to fill in the missing data (additional 2 sets)?
 

boxerfan88

Well-known member

Using the above chart that I posted earlier ... your question about how does the DAC "fill in the missing data" is what I am trying to learn/understand.

Let's assume digital 0dBFS is supposed to be 2V analog.

From what I have researched and posted earlier, there are a few possible DAC behaviors:
  • The DAC has sufficient headroom and does some magic internally to be able to produce analog voltage above the supposedly analog maximum of 2V.
  • The DAC has no headroom and therefore clips the analog output voltage at 2V.
  • The DAC goes mad and flips to negative/opposite rail (like the Pontus 2 example posted above).

For the DACs that I own, based on my research and runtime operation:
  • Soekris 1541 R2R DAC has 3 bits of headroom (internally the DAC engine is 27-bit, used to process 24-bit stream)
  • Topping DM7 ESS9038 DAC -- I am still trying to figure out it's behavior.

This is a very interesting topic for me at the moment, to learn more about inter-sample overs.
 

boxerfan88

Well-known member
To learn what was happening during upsampling, I generated square wave 16bit 44100 ksps test files.
First file was near the digital maximum -0.01dBFS (peak) where the peak has not reached the digital limit. Second file was at -3dBFS (peak).
I pushed both through the foobar SoX upsampler to generate the 176ksps copy.

I opened all 4 files in Audacity ... take a look:

2024-01-26-14-11-34-Settings.png


See what happened:
  • First is the 16bit 44.1ksps -0.01dBFS(peak) 3dBFS(rms) file ... no red lines means no sample hit the digital maximum.
  • Second is the 176ksps upsampled copy ... see all the red lines ... the output smashed against the digital maximum.

  • Third is the 16bit 44.1ksps -3dBFS(peak) 0dBFS(rms) file
  • Fourth is the 176ksps upsampled copy ... no red lines ... the upsampled file did not hit the roof.

We can deduce from the above observation that:
  • the ringing artefact from upsampling can cause the result to smash against the roof (digital maximum)
  • to reduce the risk of smashing against the roof (digital maximum), it is good to attenuate the source signal a little bit before pumping it through an upsampler
  • from the earlier post #9, in the video we can see that particular file/signal/content can trigger up to +4.6dB of overshoot!
Many DACs these days are upsampling DACs ... question is ... how does it behave when the DAC encounters inter-sample overs...

Very interesting learning for me... hopefully this sharing helps you too...
 
Last edited:

tachyons

Active member
If intersample peaks occur when a digital signal (normalized to full scale at 0 dBFS) is converted back to an analog signal, and if the DAC has sufficient headroom—above the standard 2V, say around 2.4V—it can reproduce these intersample peaks without causing distortion or clipping. However, the mere presence of undistorted intersample peaks is not ideal. These peaks can deviate from the true character of the original analog signal, indicating a discrepancy in the digital representation.
 

tachyons

Active member
Isn't the DAC converting digital into Analog?
So a 20khz signal would be sampled 2x by a 40Hz sampling rate (using just round numbers) and convert into 2 sets of digital data collected and stored.
Correct me if I'm wrong here.

So if your source data was done in 40kHz, and if you try to use a 80khz (again, round number) DAC, the DAC will use some algorithm to fill in the missing data (additional 2 sets)?
The most common method is linear interpolation, which simply computes straight-line segments between known points. From an information theory standpoint, "information" in a signal is related to its content that is unpredictable or not already known. Since the new samples in upsampling are predictable (derived from existing samples), they don't add new information in this sense.
 

tachyons

Active member
In theory, digital signal processing seems straightforward, but the real-world application is more complex. Adhering to the Nyquist-Shannon criterion by sampling at twice the signal frequency isn't always sufficient. This is especially true for signals near full scale with high-frequency content, where intersample peaks can still occur. In practice, filters come with their own set of limitations, such as non-ideal frequency and phase responses, leading to inaccuracies in signal reconstruction. To combat these real-world challenges, techniques like oversampling and upsampling are employed. They facilitate the use of digital filters with gentler slopes, which are beneficial. Gentler filter slopes help reduce phase distortions and other artifacts, ensuring a more faithful representation of the original signal.
 

boxerfan88

Well-known member
Start of weekend ... so got time to R&D ... hee hee.

I went searching for tracks in my library with true peaks > 1.00.

This foobar search filter will flag them out: (%replaygain_track_peak% GREATER 1)

Just grabbed one track and upsampled it 4 times to 176k. See what happened?

2024-01-26-20-12-55-04-Melanie-Thornton-Love-How-You-Love-Me-Radio-Version.png


Damn jia lat. See all the red clipping lines...
 

boxerfan88

Well-known member
More R&D... I put in a preamp before the upsampler ... and tried -1dB gain, as well as -2dB gain ...

2024-01-26-20-28-42-04-Melanie-Thornton-Love-How-You-Love-Me-Radio-Version.png


Much better result ... still clips a little bit... but should be okay lah.

Key learning for tonight: if wanna upsample -- better apply between -1dB and -3dB gain before upsampling ...

Thankfully foobar2000 internally operates in 32-bit floating point mode, so any gain reduction won't lose much.
 
Last edited:
Top