Determining the frequency offset
ASSI
Stromeko at nexgo.de
Sun Nov 3 08:43:03 UTC 2019
Achim Gratz via devel writes:
> I have been experimenting with determining the frequency offset via the
> MONOTONIC_RAW clock. At the moment I've implemented that as a Perl
> script although it should eventually go into some sort of pps-raw device
> driver that timestamps the incoming PPS pulses.
After a long expedition through the Linux kernel sources it turns out
that the lowest level timestamping facility in the kernel already
provides both the raw and real timer counts via ktime_get_snapshot,
which means that it is in principle unnecessary to make multiple
transitions to and from user space to get that data. The PPS subsystem
does actually work with dual timestamps as well (although only
internally, these get not exposed via the PPS API or sysfs). However,
that facility is unfortunately tied to CONFIG_NTP_PPS (PPS kernel
consumer / hardpps) which most modern systems never define because it is
incompatible with a tickless kernel (hardpps never made the transition
to periodic timer triggered vs. tick triggered).
It seems worthwile to a) try and disentangle dual timestamps from
hardpps in the kernel config, then b) provide userspace access to dual
timestamps. Does anybody have experience with Linux kernel development
and can comment on how one would get started? The necessary changes
would be neatly confined to the PPS subsystem I think.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada
More information about the devel
mailing list