[ntp:questions] refclock_wwv + linux + soundcard = Yum (was Re: Audio refclock+linux+soundcard = yuck)

Tim Shoppa shoppa at trailing-edge.com
Wed Oct 1 23:50:04 UTC 2003


shoppa at trailing-edge.com (Tim Shoppa) wrote in message news:<bec993c8.0310011037.5d384aac at posting.google.com>...
> I've done some research and the magic word for the day is
> "SNDCTL_DSP_SETFRAGMENT".  It sets the size of the individual
> ring buffers

This appears to have done the magic.  I added the lines

  tmp = (16<<16)+6; /* 16 fragments, each fragment is 2^6 bytes */
  ioctl(fd,SNDCTL_DSP_SETFRAGMENT, &tmp);

To audio.c to set the fragment size to 64 bytes (I'm using the Sun
Solaris default as the model here).  The results show complete
success as far as eliminating jitter goes:

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+GPS_HP(0)       .GPS.            0 l   31   64  377    0.000    0.054   0.649
oPPS(0)          .PPS.            0 l   63   64  377    0.000    0.031   0.010
-WWV_AUDIO(0)    .WV20.           0 l   25   64  376    0.000   -9.853   0.055
+cudns.cit.corne 192.5.41.40      2 u   47   64  377   24.733   -1.474 149.568
xlouie.udel.edu  128.175.60.175   2 u   44   64  337   35.145   15.942 197.337
 nomad.trailing- 63.73.218.130    2 u  341 1024  377    0.236   21.472   0.004

I have to put a little effort in calibrating the fudge offset for WWV and WWVH.

A more thorough patch (rather than the quick hack here) would check
return values, set the mask based on the audio_init call, etc.  That


Tim.



More information about the questions mailing list