SPDIF data capture... Bit (a lot) imperfect.... I need your brains...

garylkoh

WBF Technical Expert (Speakers & Audio Equipment)
Sep 6, 2010
5,599
225
1,190
Seattle, WA
www.genesisloudspeakers.com
2. Conversion of 44.1 to 88.2 or 96 both involve the same exact process of interpolation. It just turns out that 88.2 can be done with higher accuracy since it is an even multiple of 44.1. Whether that matters is another debate :).

Amir, is the conversion from 16bit to 24bit relevant?

I've been conducting some listening tests, and going from 16/44.1 to 24/96 is to my ears an obvious degradation. 16/44.1 to 16/176.4 sounds best to me.

I use SoX to convert off-line (not real time) and then comparing the files directly using an M2Tech Young DAC.
 

DonH50

Member Sponsor & WBF Technical Expert
Jun 22, 2010
3,952
312
1,670
Monument, CO
Not Amir, but FWIWFM. All IMO.

Presumably changing from 16- to 24-bit resolution would do no more than piddle the lsb of the 16-bit signal, any new information added by the conversion process is going to be a small effect.

Changing the sample rate implies a change in filters as well, and interpolating between samples means adding new frequency content by the SRC. Way more variables...
 

Idiocratease

New Member
Jan 19, 2011
25
0
0
UK
Progress

If you are recording digital out from the RME into digital Lexicon, jitter is a non-issue.
This is pretty much equal to transferring a file from one HD to another.
Only and only if the bits are converted to analog, jitter is an issue.

Your best bet is probably
A file, call it WAV1
Play and record it digital, call it WAV2

If your system is bit perfect ,after a time align WAV1 and WAV2 must be bit identical.

ASIO/WASAPI (exclusive mode) are bit transparent protocols, they don’t alter the bits so what the media player is sending is exactly the same what is received by the audio device.
This obvious doesn’t rule out that either the audio device or the recorder does some DSP in hardware or if applicable its own software.

Vincent/Amir, I have made some progress in understanding some of the differences I have mentioned.

System Refresher:

Media PC (quad core, high spec), Win 7 64bit, , J River Media Player, RME 9652 Soundcard.
Oppo DVD player (with it's own SPDIF). HDMI output from the DVD player going to an Aten VC880 Audio deembedder which give a SPDIF output (for SACD's etc).
Lexicon Omega breakout box USB soundcard into a Dell dual core laptop (latency checked and confirmed to handle Audio without dropouts)

Recent Observation - DVD player sounds better than media player using the same material (CD vs lossless file off the HDD).

Method
1) I have got Audio DiffMaker working ok with baseline material as reported earlier.

2) tracked down a problem with the Lexicon Omega -working with ASIO - suspect it was internally resampling to 48kHz then dropping back to 44kHz for writing. Switched drivers, and have pretty smooth baseline when subtracting A.wav - A control.wav. This is done with multiple controls (2 - 3) so reproducible. When I say pretty smooth baseline, see later....

3) Comparing files captured from RME SPDIF ex ASIO, WASAPI, and KStreaming drivers in J River (all with the bit-perfect blue window on), I see no difference between them when using Audio DiffMaker. The subtraction is baseline flat.

4) I have sampled the Oppo dvd player SPDIF and the ATEN HDMI de-embedder into both the Lexicon Omega, and into the RME soundcard on my media PC (RME clock slaved Oppo/Aten).

5) I captured data from the DVD player's SPDIF, and also the SPDIF from the DVD player via HDMI into the ATEN VC880 into both with the Lexicon Omega to the laptop, and the RME soundcard on my PC.

6) Subtracting wav files derived from the Oppo DVD SPDIF from the SPDIF from the RME/media PC, I could not get a flat baseline, but it was not far off. When using the SPDIF signal derived from the ATEN/HDMI, there were many more problems... This lead to an unexpected finding...

7) Carefully looking at the files I find that the SPDIF derived from the HDMI/Aten is phase inverted!!! I have a phase switch on my DAC and I have compared the sound from the Oppo SPDIF vs the Oppo HDMI/Aten SPDIF, and with phase correction they sound the same. Not sure if it's the Aten doing the phase inversion, or the HDMI path in the Oppo DVD player (I have emailed ATEN for clarification)...

8) The phase inverted sound is smoother than the normal phase, quite nice and in large part explains why I noticed the CD sounding sweeter from the DVD player (and hence prompted me to write and re-investigate).

9) Nearly smooth baseline.... I have measured the error on 200,000 samples (multiple files!) at the start of each of the files and I see:-

a) 0.61 bit error on both the L & R channel (so >1bit error in total per cycle) when using the Lexicon Omega to sample the RME soundcard. This error is present at the same level when using ASIO, WASAPI and Kernel Streaming.
b) The same 0.61 reading the SPDIF from both the Oppo and Aten into the Lexicon Omega
c) 0.23% bit error on both the L & R channel when reading the Oppo and Aten SPDIF into the RME 9652 soundcard.

Comment: Assuming there is no write error from the DVD player or the Aten, then there is 0.23 bit error on average from the RME soundcard read. I will assume that there is probably similar from the output - I don't know if this is a good assumption, but it's the best I can do which explains the audible observations that the PC does not sound as good as the DVD player.

Conclusion

1) The main differences in sound has been tracked down to an unexpected phase inversion in the path from the DVD player to the DAC

2) There is a slight difference in quality of sound from the Media PC vs the CD player, even when the phase is corrected (Positive phase does not always sound best mind), and seems likely that this is tied up in the approx 0.23 bit error per channel (i.e. total ~0.46 bit error per cycle), which is likely to be present on the SPDIF write also.

3) Within the accuracy of the equipment to hand I am not able to determine if there are any differences in the error rate from the different drivers. Nonetheless, they do have slight differences to my ear.

That's it. I can put a link in for the files if anyone is interest, but I have done with this....

Amir, you were right, the read is a very difficult thing to do.... well with cheap stuff anyway :)
 

Idiocratease

New Member
Jan 19, 2011
25
0
0
UK
One last test I thought I would do....

Rip the original CD track directly to wav, and compare this to i) the capture from my RME soundcard (for media PC), ii) the capture of the DVD player SPDIF, and iii) the DVD--> HDMI --> ATEN SPDIF.

The order in the enclose screen shot is ASIO/RME output, ATEN SPDIF, Oppo DVD SPDIF:

https://dl.dropbox.com/u/2078309/Audio/Comparison with Ripperd Wav.jpg

The results: only the SPDIF from the Oppo DVD player reproduces the wav file exactly. By far the most different if via the HDMI system, but to be honest I am not concerned about this as is sounds fine (phase inversion issue noted) and I suppose there is quite some format system in place to be able to move CD/SACD/DVD-A/DTS etc via the HDMI pipe. The absolute values are no so important as the relative integrity, which my ears are ok with.

What is a concern is a small but clear difference between the lossless wma --> ASIOdriver --> RME soundcard SPDIF. This is supposed to be lossless and via a bit perfect route.

Finally, just to be absolutely sure, I have just double checked that the source wma file I have been using. i.e. does it actually convert losslessly to the original wav? And it does!

So one think I can conclude 100% is that the path from wma --> the PCM coming out of the SPDIF is not lossless on my PC, despite all settings to the contrary..

I am sure this is exactly the source of the "A graininess in the treble, a kind on noisy myst, and a grittiness around the edges of vocals" which I mention earlier in the post thread. Cheers, Alan
 
Last edited:

Vincent Kars

WBF Technical Expert: Computer Audio
Jul 1, 2010
860
1
0
It looks like you are able to record bit perfect otherwise none of your testing would have yielded zero differences.
The problem is one can configure ones system to be “bit perfect” but it doesn’t guarantee it will be such in practice.
One cannot rule out any component to do “something e.g. if one uses WASAPI the path from the media player to the driver of the sound card is transparent but the driver of the soundcard or the DSP chip on the soundcard can do all kind of thinks altering the bits.
It might even be that this behavior is not configurable.

Anyway, yours is a very interesting and highly educational experiment as it clearly demonstrates that bit perfect by settings and measured bit perfect are not necessarily identical.
Thanks for sharing
 

Idiocratease

New Member
Jan 19, 2011
25
0
0
UK
It looks like you are able to record bit perfect otherwise none of your testing would have yielded zero differences.
The problem is one can configure ones system to be “bit perfect” but it doesn’t guarantee it will be such in practice.
One cannot rule out any component to do “something e.g. if one uses WASAPI the path from the media player to the driver of the sound card is transparent but the driver of the soundcard or the DSP chip on the soundcard can do all kind of thinks altering the bits.
It might even be that this behavior is not configurable.

Anyway, yours is a very interesting and highly educational experiment as it clearly demonstrates that bit perfect by settings and measured bit perfect are not necessarily identical.
Thanks for sharing

Vincent, Thanks for the comment above. I have some good news too! :)

I have also a Creative X-Fi Titanium card, which has a bit-matched options (the reason why I bought it originally). Despite the Creative X-Fi being a Win 7 certified card, I had playback problems with it. Not sure if this was Win 7, J River or the Creative Drivers, but I ditched this card for the RME 9652 Hammerfall a couple of years ago. Anyway, I though I would give it another go, and I am pleased to say multiple software/driver updates must have cured the playback issues with this card, as it works smoothly now.

I slaved the clock on the RME card to the X-Fi and sampled the music I'd been using for all these tests. So then comparing the sample with the 'CD ripped to wav' original, it was absolutely perfect. More importantly, the sound is obviously right, it's identical to the Oppo CD output.

So finally, I am sure this is correct bit perfect output. Again, my DAC has a buffer, so I am not hearing the clock from the Oppo DVD player, nor the Creative Card. If I switched off the buffer, I would expect there might be differences, but I have not bothered with this.

What was the problem before? Not sure, maybe something wrong with the RME drivers, or maybe my card is dying (worn out caps, or some other component starting to fail). What's sure is that the sound had deteriorated, and this work has determined that I was getting at least 0.46bit error on average per cycles, and I am 100% sure that this was audible in my system (hence all this effort).

However, on testing the Creative X-Fi's ability to read bit-perfect from the Oppo DVD, despite there being a 'bit-match' option, the data was no where near bit perfect! I am supposing the bit-match record option with the X-Fi card is no more than ensuring the sample rate and bit depth are matched to the source... I am guessing the real problem is that the X-Fi does not slave it's clock. I will need to get another card which I can slave the clock... Anyway, this is a minor issue, as CD's are ripped in software, and I will only needed to sampling via a card for SACD's. Will get to it eventually.

I would like to say THANKS to yourself and the others... I certainly would not have got to the bottom of this without your link to Audio DiffMaker:

http://libinst.com/Audio DiffMaker.htm

And if anyone else is going to have a go at this, I would recommend checking the info I put here which will help people get the right settings to subtract wave files accurately to get a flat baseline:-

https://dl.dropbox.com/u/2078309/Aud...0DiffMaker.odp

Cheers,

Alan
 
Last edited:

Idiocratease

New Member
Jan 19, 2011
25
0
0
UK
For anyone who wants to use Audio Diff Maker, you might also find useful, the files I used to confirm baseline (mentioned above)....

1) This is the original file (~5sec silence, then 15 sec Music): https://dl.dropbox.com/u/2078309/Audio/01 AE ASIO 44_16.wav

2) This is the above file with some silence pasted in with Nero Wave Editor: https://dl.dropbox.com/u/2078309/Audio/01 AE ASIO 44_16 time shift.wav

3) This is with a small amount of silence added in using a hex editor (just in case nero was 'doing something else'):
https://dl.dropbox.com/u/2078309/Audio/01 AE ASIO 44_16 bin edit time ext.wav

If you can get a flat baseline with these, all's ok to go ahead and measure data from your system.

If you want to write out data from a wave file into a text file for viewing in eg excel, you can use this demo of cooledit:-

https://dl.dropbox.com/u/2078309/Audio/ce2000_1.1.exe

It's a 30 day full functioning demo.


Cheers,

Alan
 
Last edited:

Idiocratease

New Member
Jan 19, 2011
25
0
0
UK
When working thought this I have eliminated the rme 9652 which was causing errors, and re-implemented a creative x-fi, and was very pleased with the improvement, to the point where I wrote above that it was identical to the cd/DAC combination. Part of this was relief on removing the problems I had observed, but on closer listening, I was sure that there is a slight veiling.

I spent some time looking into alternative cards, and finally came on the Asus Xonar stx card. This has phenomenally good reviews and astonishing s/n of 124dB in it's DAC section. I reasoned that this card should have really sorted out the digital transportation issues/drivers ect to get such good s/n levels in th card.

So I bought one. I am only using the spdif into my DAC, so not using the cards internal dac, and it's a truly fantastic spdif. The clarity is superb, and confirms that even though the creative card x-fi titanium in 'bit perfect' mode was significantly better than my rme 9652, it was still not givign 100% bit perfect. Should mention that I think my rme card was going faulty, so don't what to bad-mouth rme in general.

Asus do comment on the efforts required to make their asio driver work bit perfect, and i for one believe they have achieved it. I cannot measure this at the moment, as I need to get a similarly spec'ed card to read, and sadly th xonar stx does not have an spdif in. But I don't think this is necessary, as you can hear it's perfect!!

I recommend to anyone using a pci/pci-e based card to drive a DAC, to give the asus xonar st or stx a try.. I don't think you will be disappointed.
 

amirm

Banned
Apr 2, 2010
15,813
38
0
Seattle, WA
Amir, is the conversion from 16bit to 24bit relevant?

I've been conducting some listening tests, and going from 16/44.1 to 24/96 is to my ears an obvious degradation. 16/44.1 to 16/176.4 sounds best to me.
In theory, if you are interpolating it is better to let the final result be higher resolution than the source. This is so because the math can create fractional values (e.g. if done in floating point) and therefore leaving them there is better.

In practice, I have had conflicting experiences. In Windows audio stack, you can set the output to be 24 bit. When I do this, half the time I think it does better but other times it makes things worse. I have no explanation for why. It could be placebo, or it could be something we don't understand. As a result, I often switch back and forth on a per-clip basis.
 

About us

  • What’s Best Forum is THE forum for high end audio, product reviews, advice and sharing experiences on the best of everything else. This is THE place where audiophiles and audio companies discuss vintage, contemporary and new audio products, music servers, music streamers, computer audio, digital-to-analog converters, turntables, phono stages, cartridges, reel-to-reel tape machines, speakers, headphones and tube and solid-state amplification. Founded in 2010 What’s Best Forum invites intelligent and courteous people of all interests and backgrounds to describe and discuss the best of everything. From beginners to life-long hobbyists to industry professionals, we enjoy learning about new things and meeting new people, and participating in spirited debates.

Quick Navigation

User Menu

Steve Williams
Site Founder | Site Owner | Administrator
Ron Resnick
Site Co-Owner | Administrator
Julian (The Fixer)
Website Build | Marketing Managersing