I2S line measurement - diyAudio
Go Back   Home > Forums > Source & Line > Digital Source
Home Forums Rules Articles diyAudio Store Gallery Wiki Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

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
Thread Tools Search this Thread
Old 22nd May 2012, 07:08 PM   #1
diyAudio Member
Join Date: May 2012
Default I2S line measurement

Hi Guys

I'm working on a student project to graduate: a USB to I2S converter (ie a USB PC sound card).

I'm using a 32-bit microcontroller for the USB interface with 2 crystals (one for the USB, the other for the I2C sampling frequency), the microcontroller has a builtin I2S output.
I have to resample the audio flow (coming from the usb) to the I2S output, but it means i'm introducing noise to the "real" signals. The I2S is connected to a DAC.

I want to measure the SNR and THD on the I2S signals (comparing to known audio signal i'll stream on the USB), but i haven't found a good and cheap system (sound card or scope) to record the I2S signals to something i can analyse on a PC (and compare to the original file).

Do you have any idea what i can use?

Kind regards and thanks for your help
  Reply With Quote
Old 22nd May 2012, 08:08 PM   #2
qusp is offline qusp  Australia
diyAudio Member
qusp's Avatar
Join Date: Oct 2009
Location: Brisbane, Australia
not going to find a cheap, fast logic analyzer and FFT/spectrum analyzer i'm afraid, this particular measurement demands some of the fastest and most advanced measurement kit available, someone here may come up with an idea, as i'm certainly not an expert in this field; but unless I misunderstand what you want to do, then I think its impossible on a small budget and without some serious background knowledge to isolate what noise is from what source, as you will need to know exactly what the influence of the gear taking the measurement has; kind of a chicken and the egg thing.

you are looking to isolate the phase noise, which is just one element of what is popularly called jitter. recording the i2s will introduce its own jitter from the recording interface, its power supply, its clock and then again writing it to memory as well will all accumulate jitter as well as any buffer probably effectively removing some

or you are looking to compare the 2 audio files? i2s is not a format like wav or mp3 and cannot be stored as a file, so you would need some sort of logic analyzer to read it and compare the data integrity as well as noise in the frequency and time domains, while isolating the noise sources that are from the measurement gear. thats one hell of a project you have there

Last edited by qusp; 22nd May 2012 at 08:12 PM.
  Reply With Quote
Old 22nd May 2012, 08:40 PM   #3
diyAudio Member
Join Date: May 2012
i'm looking to compare the 2 audio files: the one read on the PC (PCM format), send to the USB, and the one resampled to the I2S output (PCM to I2S). That is why i need to "record" the I2S digital signals and store the PCM - i just need to figure out how :-)
  Reply With Quote
Old 22nd May 2012, 08:55 PM   #4
JensH is offline JensH  Denmark
diyAudio Member
Join Date: Jul 2009
You could get/make an I2S to SPDIF converter, e.g. with Cirrus Logic's CS8406. The SPDIF signal can then be fed to a PC sound card with an SPDIF input. If the sound card has an ASIO driver you can get the I2S bit stream into the PC with no changes to the data.
  Reply With Quote
Old 23rd May 2012, 04:15 PM   #5
kevinkr is offline kevinkr  United States
diyAudio Moderator
kevinkr's Avatar
Join Date: Sep 2004
Location: Boston, Massachusetts
Blog Entries: 6
Originally Posted by JensH View Post
You could get/make an I2S to SPDIF converter, e.g. with Cirrus Logic's CS8406. The SPDIF signal can then be fed to a PC sound card with an SPDIF input. If the sound card has an ASIO driver you can get the I2S bit stream into the PC with no changes to the data.
The conversion process however will add some jitter which is one of the things he was probably trying to measure in the I2S stream.

Perhaps National Instruments LabView could be useful, still need a very good data acquisition board. Take a look here: Engineering Education Resources with LabVIEW ? National Instruments Academic
The problem I see is the very good data acquisition card required and the steep learning curve for using LabView effectively. (Powerful computer required)
"To argue with a person who has renounced the use of reason is like administering medicine to the dead." - Thomas Paine
  Reply With Quote
Old 23rd May 2012, 05:54 PM   #6
JensH is offline JensH  Denmark
diyAudio Member
Join Date: Jul 2009
It is not really a conversion process. It just transfers the bits, without any change, from the I2S bus to the PC. Then it can be recorded and used for comparison with the original signal. I think this is what poudoucou is trying to do.
Of course, if you want to measure jitter, that is something completely different.
  Reply With Quote
Old 23rd May 2012, 06:01 PM   #7
diyAudio Member
Join Date: Mar 2008
Don't know what kind of uC you're using but here's an idea. How about writing bits of audio that have been converted to i2c to the flash memory of the uC(or an external one if you need a lot of data). You could put uC in the debugging mode and read data back on your PC. Then use matlab/octave to process the file and calculate noise/error numbers.

No need to use expensive lab equipment in this scenario.
  Reply With Quote
Old 27th March 2014, 05:05 PM   #8
diyAudio Member
Jam Master Jay's Avatar
Join Date: Mar 2014
Finally, how did you measure the i2s signal? There is no other way than the spdif converter? There are many guys who blame this technic for much jitter, is that good fore measurement?
  Reply With Quote
Old 29th March 2014, 07:32 PM   #9
Julf is offline Julf  Europe
diyAudio Member
Join Date: Oct 2011
Location: Amsterdam, The Netherlands
So, just to be clear, you want to record the digital data coming out of the i2s, and compare it to the original data coming from the USB?

Do you realize the actual data will be exactly the same?

There is no "resampling" going on.

Any possible effects would be due to jitter, not actual data content.
  Reply With Quote


Hide 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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
I2S and digital signal path - in-line resistors? zxgravediggerxz Digital Line Level 63 30th March 2015 09:32 AM
Analogue to I2S & PC to I2S Cube2 Class D 6 20th April 2012 02:57 PM
Left-justified I2S to Philips I2S Converter curva Digital Line Level 23 19th February 2009 01:50 PM
i2s/DSD over longer distances: line drivers to spare NeoY2k Digital Line Level 8 3rd October 2008 12:05 PM
Direct Wiring a DDDAC USB-->I2S to a P3A DAC I2S DIN input dkj7a Digital Source 1 26th March 2006 05:46 PM

New To Site? Need Help?

All times are GMT. The time now is 12:25 AM.

vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Copyright 1999-2017 diyAudio

Content Relevant URLs by vBSEO 3.3.2