Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Digital Line Level DACs, Digital Crossovers, Equalizers, etc.

Solving the intersample DAC clipping problem for about ten euros
Solving the intersample DAC clipping problem for about ten euros
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 13th February 2018, 03:53 PM   #11
Tam Lin is offline Tam Lin  United States
diyAudio Member
 
Join Date: May 2010
Location: North Texas
Quote:
Originally Posted by MarcelvdG View Post
On what do you base your assumption that 3.7 clipped samples per second are inaudible, while a slight increase in a minus one hundred something dB noise floor would be a problem?

and to mention that the BCK inversion is optional; it improves hold time at the expense of set-up time, but is not required according to the I2S standard.
On what do you base your assumption that intersample clipping always adds exactly 3.7 clipped samples per second and that they are audible in all cases?

You've cut the available dynamic range in half. You've changed a 16-bit DAC into a 15-bit DAC. You've added quantization noise to every sample. The typical CMOS input gate adds 1-15pf to the net it's on. PCB traces, etc. add more. That added capacitance is a low-pass filter that slows the clock signal, increases the propagation delay, and slows rise times. That hardly matters with data, especially at digital audio data rates, but is surely matters with a clock. Increased prop delay means increased skew. Slowed rise time means the signal spends more time in the no-man's-land between zero and one, which increases the uncertainty of exactly when clock edge happens and that is jitter.

If removing intersample noise with this circuit is so important, a very simple circuit change will solve the potential jitter problem. Add a buffer to the BCLK tap. E.g., Si53365.

A better way, if you are using S/PDIF, is a simple mod to the S/PDIF receiver to it right shift the data one or two bits with sign extension. Such a circuit, implemented as a drop-in replacement for a CS8412, was posted on the Audio Note forum a few years back.
  Reply With Quote
Old 13th February 2018, 08:20 PM   #12
MarcelvdG is offline MarcelvdG  Netherlands
diyAudio Member
 
Join Date: Mar 2003
Location: Haarlem, the Netherlands
Quote:
Originally Posted by Tam Lin View Post
On what do you base your assumption that intersample clipping always adds exactly 3.7 clipped samples per second and that they are audible in all cases?
I don't assume that. It is just a practical example, see the link I gave earlier:
Intersample Overs in CD Recordings - Benchmark Media Systems, Inc.

I have no idea whether the clipping is audible. I could well imagine it is, though, because I know from practical experience that sound soon gets very ugly when you hard clip it.

Now could you please answer my question?

Quote:
Originally Posted by Tam Lin View Post
You've cut the available dynamic range in half. You've changed a 16-bit DAC into a 15-bit DAC. You've added quantization noise to every sample.
The circuit is meant for modern oversampling DACs with an interface of 24 bits or more. The extra quantization noise will then be at -140 dBFS or less. As DAC manufacturers compete on price and dynamic range, most of these DACs have dynamic ranges far in excess of what is needed for normal domestic listening, so I don't consider a 6 dB loss a big deal.

Quote:
Originally Posted by Tam Lin View Post
The typical CMOS input gate adds 1-15pf to the net it's on. PCB traces, etc. add more. That added capacitance is a low-pass filter that slows the clock signal, increases the propagation delay, and slows rise times. That hardly matters with data, especially at digital audio data rates, but is surely matters with a clock. Increased prop delay means increased skew. Slowed rise time means the signal spends more time in the no-man's-land between zero and one, which increases the uncertainty of exactly when clock edge happens and that is jitter.

If removing intersample noise with this circuit is so important, a very simple circuit change will solve the potential jitter problem. Add a buffer to the BCLK tap. E.g., Si53365.
Thanks for the suggestion, it is the first constructive contribution you made to this thread. If anyone wants to use a buffer, please check that its delay doesn't introduce hold time issues. If it does, data and LRCK also need to be slightly delayed.

Quote:
Originally Posted by Tam Lin View Post
A better way, if you are using S/PDIF, is a simple mod to the S/PDIF receiver to it right shift the data one or two bits with sign extension. Such a circuit, implemented as a drop-in replacement for a CS8412, was posted on the Audio Note forum a few years back.
That's functionally the same as what I propose, so how is it better? In any case, if you are so worried about jitter, don't use S/PDIF.
  Reply With Quote
Old 13th February 2018, 08:32 PM   #13
MarcelvdG is offline MarcelvdG  Netherlands
diyAudio Member
 
Join Date: Mar 2003
Location: Haarlem, the Netherlands
Quote:
Originally Posted by xx3stksm View Post
The attached are recent music files ripped from CD. You can easily find several clipped sample points(0dBFS). Their usual maximum level is almost -0.3dBFS(97%) which has a good chance to have intersample overs though it depends on the oversampling process. DAC manufacturer has no responsibility for this because they can't predict what music files are played by a customer. A customer must recognize the probability.

No oversampling filter, which means NOS, is one solution. DSD stream is another one which inherently no need to have an oversampling filter. Some people say DSD has quiet sound like high sample rate files. I'm sure DSD is free from intersample overs but not sure it can have quiet sound because DSD has much quantization noise from 20kHz.
Thanks for the measured data!

I think it would be fairly easy for oversampling DAC chip manufacturers to solve the issue. All they have to do is add a controllable input attenuator and a filter clipping indicating bit. They could then still measure the DR and SINAD values at maximum volume, in order not to get worse datasheet values than the competition. The set maker will then have to do practical tests to find a sensible setting, or even make it controllable for the end user.

The worst-case overshoot of a filter is the sum of the absolute values of the coefficients divided by the sum of the coefficients. For the interpolation chain of my valve DAC that boils down to something between 10 dB and 11 dB. Hence, an input attenuator with a control range of the order of 12 dB would suffice.
  Reply With Quote
Old 13th February 2018, 10:20 PM   #14
Tam Lin is offline Tam Lin  United States
diyAudio Member
 
Join Date: May 2010
Location: North Texas
Quote:
Originally Posted by MarcelvdG View Post
Now could you please answer my question?
I know it is not audible because, as a programmer, I can put any hypothetical digital audio question to a real world test. I can create any kind and quantity of intersample clipping I choose and listen to the effect. Why don't you do that instead of speculating and fixing problems that don't need fixing.

If the samples are coming from a PC, the proper way to deal with intersample clipping is to use replay gain. As part of its analysis, replay gain upsamples to discover the true analog peak and calculates the gain adjustment accordingly.
  Reply With Quote
Old 13th February 2018, 10:38 PM   #15
TNT is offline TNT  Sweden
diyAudio Member
 
Join Date: Apr 2003
Location: Sweden
Quote:
Originally Posted by Tam Lin View Post
If the samples are coming from a PC, the proper way to deal with intersample clipping is to use replay gain. As part of its analysis, replay gain upsamples to discover the true analog peak and calculates the gain adjustment accordingly.
So there is a problem after all...

//
__________________
More distortion to the people!
  Reply With Quote
Old 13th February 2018, 10:50 PM   #16
MarcelvdG is offline MarcelvdG  Netherlands
diyAudio Member
 
Join Date: Mar 2003
Location: Haarlem, the Netherlands
Quote:
Originally Posted by Tam Lin View Post
I know it is not audible because, as a programmer, I can put any hypothetical digital audio question to a real world test. I can create any kind and quantity of intersample clipping I choose and listen to the effect. Why don't you do that instead of speculating and fixing problems that don't need fixing.
Because I don't believe that my ears are a reference for the rest of the world and mainly because I find it extremely inelegant to drive a system with a very large dynamic range into hard clipping for no sensible reason. When you want to record something on a 50 dB dynamic range cassette recorder, allowing occasional soft clipping may make sense, but with hard clipping 100+ dB digital systems? Get real!

In any case, no-one has to build my circuit. Anyone who likes to listen to hard clipped music because they worry more about whether the noise floor is at -104 dB or at -110 dB than about gross distortion, can just go ahead.

Quote:
Originally Posted by Tam Lin View Post
If the samples are coming from a PC, the proper way to deal with intersample clipping is to use replay gain. As part of its analysis, replay gain upsamples to discover the true analog peak and calculates the gain adjustment accordingly.
Yep, that's a good approach if the signal comes from a PC.
  Reply With Quote
Old 14th February 2018, 04:43 AM   #17
xx3stksm is offline xx3stksm  Japan
diyAudio Member
 
xx3stksm's Avatar
 
Join Date: Jun 2017
Location: Hokkaido(north area)
Solving the intersample DAC clipping problem for about ten euros
I did software simulation from 44.1kHz to 88.2kHz. The target is recent "loudness war " files which I posted before. This is my first try which means no special selection. But I found three intersample overs in five minutes files!

My software, which probably uses 32-bit floating point, can calculate precise value even if overflow occurs. One intersample overs is about 100.106. This is a little bit higher than 100 but has a disastrous result.
Most digital filter usually doesn't have overflow protection. More than 100 means from max positive value to max negative value(from 0x7fffff to 0x800000).

My digital filter doesn't have overflow protection(limiter) but has 0.5dB headroom. In this case, no overflow occurs. 0.5dB headroom is usually sufficient from my experience. But "loudness war" files have a chance to break my fire wall and make overflow.
Attached Images
File Type: jpg ovs2.jpg (358.3 KB, 183 views)
File Type: jpg ovs1.jpg (403.3 KB, 151 views)
File Type: jpg ovs3.jpg (70.5 KB, 152 views)
  Reply With Quote
Old 14th February 2018, 05:41 AM   #18
MarcelvdG is offline MarcelvdG  Netherlands
diyAudio Member
 
Join Date: Mar 2003
Location: Haarlem, the Netherlands
Again thanks for the measurements! Benchmark Media found worse overshoots. In

Intersample Overs in CD Recordings - Benchmark Media Systems, Inc.

they show a track that goes to +1.49 dBFS and in

Audio That Goes to 11 - Benchmark Media Systems, Inc.

they mention that after checking 5000 CDs, they even found one that goes to +3.1 dB. (Which means that my circuit wastes only 2.92 dB of dynamic range, not 6.02 dB .)
  Reply With Quote
Old 14th February 2018, 06:12 AM   #19
xx3stksm is offline xx3stksm  Japan
diyAudio Member
 
xx3stksm's Avatar
 
Join Date: Jun 2017
Location: Hokkaido(north area)
Solving the intersample DAC clipping problem for about ten euros
It's reasonable they can find +3.1dBFS in 5000 CDs because even my first try is +0.1dBFS. .

I'm sure intersample overs is not a particular thing. My interest is whether digital filter in a DAC chip has overflow limiter or not. As long as more than 0dBFs signal results in clipped signal(with overflow limiter), It matters little at least from my standard. I'm not sure it is audible or not If without the limiter.
  Reply With Quote
Old 14th February 2018, 06:23 AM   #20
xx3stksm is offline xx3stksm  Japan
diyAudio Member
 
xx3stksm's Avatar
 
Join Date: Jun 2017
Location: Hokkaido(north area)
Solving the intersample DAC clipping problem for about ten euros
From your link to Benchmark Media Systems, a usual commercial DAC has the limiter. But it doesn't make sense to me. The existence of the limiter means they know a chance of intersample overs. If so, why do they take some protection method?  There is some method which doesn't cost much, IMHO.
  Reply With Quote

Reply


Solving the intersample DAC clipping problem for about ten eurosHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help solving problem on new 2A3 build jmillerdoc Tubes / Valves 54 13th February 2010 04:19 PM
PC sound output clipping problem hajame Digital Source 3 29th April 2008 05:39 AM
clipping problem maxpou Solid State 4 26th January 2008 01:49 PM
solving hum problem using external mic with camcorder David94114 Analog Line Level 0 14th March 2007 08:40 AM
Problem w/Clipping new 2 car audio need help bmxkris Car Audio 2 4th April 2005 06:27 PM


New To Site? Need Help?

All times are GMT. The time now is 01:51 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 14.29%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Copyright ©1999-2018 diyAudio
Wiki