Measurements of the XMOS USB AUDIO 2.0 ref. Card

XCore Project reviews, ideas, videos and proposals.
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Measurements of the XMOS USB AUDIO 2.0 ref. Card

Post by lilltroll »

So I was a little curius about the prestanda of the card regarding Audio quality.

OS: Win 7 Pro
Win driver: Thesycon: Winows USB Audio 2.0 driver_20091222_0.22 BETA
Firmware: 1.3 from XMOS

Setup: Analog stereo bypass with 3.5mm tele cable from line-out to line-in.
Power supply: USB, Nothing else conected to the card.

Testprogram: Sirp.exe @ 48 kHz with a 524288 long FFT window. Output level: -1dB FS
Tech info: http://www.tolvan.com/sirp/SirpUsersGuide.htm

Black line: Frequency response, red to green line 2:nd to 5:th harmonic.
0.01 % dist ~ -80 dB dist. The program only analyse the harmonic components of the nonlinear distortion.

PS: The card doesn't really like 0dB FS, the dist is rapidly increasing above -1 dB FS. DS
XMOS 48kHz -1dBFs.png
You do not have the required permissions to view the files attached to this post.
Last edited by lilltroll on Sat Dec 26, 2009 1:08 am, edited 1 time in total.


Probably not the most confused programmer anymore on the XCORE forum.
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

If anyone had trouble understanding the previous picture, consider this on.
In this example I use a tone-gerator running under Windows, creating a perfect 1 kHz sine-wave at -1 dB FS (Full Scale).

At the line in, a real time spectrum analyser examines the results, also in Windows. If we compare the fundamental 64.8 dB with the 3:rd harmonic (3 k Hz) -22.7 dB, we can calculate that the 3:rd harmonic is 87.4 dB lower than the fundamental.
If you calculated this for every harmonic and for every frequency, you could plot a graph with the result. Thats exatly what is seen in the first picture, where the blue line shows ~0.0042% dist at 1 kHz (I can zoom in) which is equal to 20*log10(0.01*0.0042) = - 87.5 dB :!:

Please understand that I do not need any extra hardware (OK, I need a short 3.5 mm tele cable) to performe these tests. I only examine the errors in the CODEC DAC->DSP->ADC loop
You do not have the required permissions to view the files attached to this post.
Probably not the most confused programmer anymore on the XCORE forum.
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

Finally we check the data sheet of the CODEC:

At 997 Hz (ref. 0dB FS) the total harmonic dist. + noise is about 87 dB for the DAC and the ADC running in 16 bits mode.

87 dB on DAC + 87 dB on ADC would create something ~84 dB in total.
But on the other hand, I only measured the most significant 3:rd partial in the example.
If I add the to most significant partials, the second and the third one I get harmonic dist. of -85 dB. All the other partials are much weaker, so maybe they will add an extra dB to the result.

Conclusion: The HW design seems to be good enought for 16-bits data, without degenerating the prestanda of the CODEC. But what about > 16 bit data ? :arrow:
Probably not the most confused programmer anymore on the XCORE forum.
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

Lets change the sampling freq. to 192 kHz but still in 16 bit mode.
Usually you get more dist for frequencies above 20 kHz due to the large slew rate.
This time the patials are only shown in dB, and only frequencies above 100 Hz.
The fundamental is normalized to 0 dB @ 1 kHz.

XMOS 192kHz -1dBFs.png
Below 10 kHz, all patials are below 87 dB. :D
You do not have the required permissions to view the files attached to this post.
Probably not the most confused programmer anymore on the XCORE forum.
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

A spectra in 192 kHz without sidelobes artifacts this time due to windowing.

(It's a question of having the correct periodtime of the testsignal - if a multiple of the period can fit the FFT, sidelobes can be avoided)
You do not have the required permissions to view the files attached to this post.
Last edited by lilltroll on Fri Feb 12, 2010 11:48 am, edited 1 time in total.
Probably not the most confused programmer anymore on the XCORE forum.
User avatar
andrew
Experienced Member
Posts: 114
Joined: Fri Dec 11, 2009 10:22 am

Post by andrew »

nice graph
lurcher
Member
Posts: 14
Joined: Sun Jan 24, 2010 5:53 pm

Post by lurcher »

In this example I use a tone-gerator running under Windows, creating a perfect 1 kHz sine-wave at -1 dB FS (Full Scale).
You may find you get better and more representative results if you apply dither.
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

lurcher wrote:
In this example I use a tone-gerator running under Windows, creating a perfect 1 kHz sine-wave at -1 dB FS (Full Scale).
You may find you get better and more representative results if you apply dither.
To apply "digital" generated dither to the output signal I have to start MATLAB and write some rows of code :geek:

As I understand it - the USB data is transfered as 16-bits data from the USB-XMOS-buffer to the CODEC. What about if I used the 24:th LSB from the CODEC-ADC and add it as the 17:th LSB bit to the 16 bit data before I cast it to 16 bits ?



At least I did apply dither to the "simulated" filter measurements in the other thread.
Probably not the most confused programmer anymore on the XCORE forum.
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

So lets create a sin with a nice periodtime and round it off to 24 bit data, then analyse the result with a FFT.
No dither.png
If I instead add some white rectangular distributed noise (prior quantization) with an maximum amplitud as ½ LSB I get this result.
Dither.png
In the first picture we might believe that we have a lot of higher harmonics of distortion in the converter - but we may be misstaken because it is also quantisation-noise there at the same frequensis!

Hmm - and I have to start MATLAB on the same computer that has the soundcard connected to it.
You do not have the required permissions to view the files attached to this post.
Probably not the most confused programmer anymore on the XCORE forum.
lurcher
Member
Posts: 14
Joined: Sun Jan 24, 2010 5:53 pm

Post by lurcher »

As I understand it - the USB data is transfered as 16-bits data from the USB-XMOS-buffer to the CODEC. What about if I used the 24:th LSB from the CODEC-ADC and add it as the 17:th LSB bit to the 16 bit data before I cast it to 16 bits ?
That should work as long as there is no periodic nature to the noise.