[LAU] Testing sync with 2 sound cards

Mark Knecht markknecht at gmail.com
Mon Mar 3 13:54:25 EST 2008


On Mon, Mar 3, 2008 at 8:58 AM, Kevin Cosgrove <kevinc at cosgroves.us> wrote:
>
>  On 2 March 2008 at 10:23, Joe Hartley <jh at brainiac.com> wrote:
>
>  > What's the best way to ensure that the cards are actually in sync?
>  > I've recorded an hour of a metronome in Ardour with the signal split
>  > to an input on each card and saw no drift between the tracks.  I then
>  > played them back and heard no drift even after 30 minutes, but I have
>  > a feeling that this isn't necessarily a valid way of testing.
>
>  Your test method seems to be closest to what you'll do in actual use.
>  In that light it seems pretty valid to me.
>

At first clush it sounded OK to me also, but after a minute I decided
that it isn't likely to find single bit failures. If there is a slow
drift between the two cards what might happen over time would be one
card (the master) would record all the data but the slave card might
skip a byte.

>  Another way to test the system is to record a sine wave, maybe 1kHz
>  but other frequencies are good too.  When you're done recording, then
>  run an FFT on the result and look for frequencies other than 1kHz.
>  If you use a large signal size, then you might end up seeing
>  distortion products in the frequency spectrum.  Certainly you'll see
>  some noise that's broadly distributed.  Some of that noise will be
>  due to clock jitter.  Of that noise, some could be due to an increase
>  in clock jitter when using an external sync versus using the internal
>  clock.  You could do a comparison.

I think this sounds like a better solution. I would personally look
for a way to treat the audio information as data, calculate the the
expected data from each card and then do a comparison of input and
output data mathematically. I would not personally want to trust
either my eyes or ears in this area. Let the operation of the hardware
speak for itself.

In all likelihood, there are going to be small phase shift differences
between the cards. The inputs won't be perfectly in sync even if they
are coming from the same sine wave generator. I would probably doing
something like a standard deviation comparison between the input and
two outputs. If the data looks identical, within some some deviation
amount, then most likely everything is working OK. On the other hand
if there is a single byte getting dropped or added once in awhile then
it will show up doing this sort of analysis very quickly.

If you don't want to do it in C or some programming language then you
can likely do it in Open Office or Excel.

Hope this idea helps,
Mark

>
>  Anyway, I think your system is probably sound.  But, you could test
>  it more if it makes you happy.
>
>  Do let us know what you find out please.
>
>  Thanks....
>
>  --
>  Kevin
>
>
>  _______________________________________________
>  Linux-audio-user mailing list
>  Linux-audio-user at lists.linuxaudio.org
>  http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
>



More information about the Linux-audio-user mailing list