How much audio quality do I lose by using TOSLINK SPDIF?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
ASRC is before DA conversion. I do not understand - how does it affect FFT bin position? Thanks.
Without a proper window function to remove spectral leakage, the FFT will be pants unless the sampling rate is a precise multiple of the waveform frequency.

Just use the right FFT window - A flattop window for measuring peak height accurately (most spectrum analyzer instruments use their own custom flattop window for instance), The Hann (aka Hanning) window will do for most other tasks. Rectangular window is the same as no window function.

If you want to understand more you will have to delve into the mathematics of discrete Fourier transforms, but there are some good tutorials about.


The key insight is that the Fourier transform assumes the input sample vector repeats exactly forever and measures the spectrum of that repeated waveform. If the start and end of your sample vector don't match up seamlessly, you have to use a window function to reduce the impact.
 
Last edited:
I understand the FFT windows, but thanks a lot for detailed explanation, it's always useful.

What I do not understand is how a DAC clock behind ASRC ends up clocking ADC too. I do not know in which device it would be the case. Usually I2S output and I2S input of some controller (XMOS, I2S device in RPi, PCI sound controller) would be clocked by the same clock, but this is before ASRC. I do not know of a device with some input clocked with A -> ASRC with clock B -> DAC + ADC clocked with B - in such case the playback would run in different pace than capture which is difficult to synchronize - basically behaving as two different audio devices with independent clocks.
 
At least I hope that we can agree on that any jitter added by toslink due to it's limited BW is compleatly removed if the incoming data is stored in a memory and klocked out "later" with an other (local) clock than the spdif one. Wrt tp bit faults, I did a test recently - I played a .wav file worth 10 minutes and stored it on the receiving computer. Using a file comparision tool, I could see that after taking away som initial headers etc, there where no bit faults. Zero.

In order to understand if toslink may work for you, you need to understand the whole clocking regime in your DAC. Not just the receiver chip, or the DAC chip - the system.

//

This is precisely what something like the WM8804/WM8805 series of receivers does.
 
Member
Joined 2017
Paid Member
real performance

I measured the real performance of TOSLINK(CS8416). The recovered clock has jitter with the normal distribution(1st pic): -2ns to 2ns. The FFT isn't ideal, of course(pic.2). But the FFT doesn't mean the inherent flaw of the optical interface. SPDIF has a burst clock in the preamble for clock recovery, and the receiver doesn't have an Xtal oscillator for PLL. I'm sure both are the fatal failure to have excellent clock recovery.

In my setup(from transport to DAC), the interface is optical but not in SPDIF. My protocol has a continuous clock for precise clock recovery, and the receiver on the DAC has Xtal for the 48kHz family. The input through optical cable is jittery(pic.3). But the recovered clock is far better than SPDIF. Besides optical one, you can't have perfect isolation up to HF. The floating capacitor decreases the isolation at HF even if you use a transformer.
 

Attachments

  • cs8416_jitter.jpg
    cs8416_jitter.jpg
    241.6 KB · Views: 122
  • CS8416.jpg
    CS8416.jpg
    223.3 KB · Views: 127
  • tek00122.jpg
    tek00122.jpg
    118.6 KB · Views: 252
  • Ad9717_X.jpg
    Ad9717_X.jpg
    222.1 KB · Views: 120
phofman, TNT, Not saying optical toslink is perfect in any way, just saying it's one of the lesser evils in digital audio transmission.
AES is also high on the list, but it's not always available.
If I have to choose between coax, optical and HDMI I know which one I'll use for connectivity.

Edit:
Especially since most modern sources are inherently noisy.
 
Last edited:
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.