+ Improve the state machine logging in the time server so we have some
visibility into why it is doing the things it is doing.
+ Also, reject sync responses we receive from IP addresses which are
not our current master. Given the poor quality of the AAH WiFi
network right now, we are thrashing a whole lot and can actually get
into a state where this starts to happen. Its easy to check and
reject invalid responses, so do so.
Change-Id: I2318be3998c7f9f77bb25588d935f54394976875
Before HW came in, when doing SW clock recovery, gain had been set to
produce a correction expressed in PPM from [-100, 100] PPM. The HW
local clock HAL has been spec'ed to take a drive range from MIN_INT_16
to MAX_INT_16. This changes the PID recovery loop to use a range from
MIN_INT_16 to MAX_INT_16, and adjusts the P and I gains to be the same
as they were before, but adjusted for the scale change.
Change-Id: Ia636fd1bc6c5c1117ddfdc5289c51286cb874c23
Change the definition of the panic threshold for the time sync service
to take the round trip time of the packet producing the discipline
action into account. The idea here is that, in the worst case, the
error in the measurement of the clock sync error might be as high as
the round trip time of the packet used to measure the error. If a
packet says we are 50mSec fast, its RTT is 75mSec, then we could be
anywhere from 25mSec slow to 125mSec fast.
This change basically makes it so that the error measurement must be
greater than the RTT + the fixed panic threshold before we panic. IOW
we don't panic unless we absolutely sure that our error must be
greater than the fixed panic threshold. Also, lower the current value
of the panic threshold from 50mSec down to 20. Now that the
definition takes into account the RTT, we can afford to be much
tighter in our definition of the fixed panic threshold.
Change-Id: Id801f6b59545ee52d59944dfa3d545d108f88b0e
Client's of Masters who disappear before the client has processed even
one timesync response should not enter the Ronin state. Since they
have never synced to the old Master's timeline, by becoming Ronin they
run the risk of defeating other new Ronin's in the master election,
even though they don't have any idea what time it is on the old
Master's timeline and therefore are unsuitable to serve as the new
Master. Instead, they should transition to the Initial state, where
other new Ronins (who do know what time it is) have the chance to step
in and serve as master of the old timeline. If there are no other
Ronin who can do the job, then the old timeline is dead and by
transitioning to Initial, a new one will be generated.
Change-Id: Iaa95313bfe68a971be2764e252ebf4b34313013d
Signed-off-by: John Grossman <johngro@google.com>
This is a common time service used by Tungsten for synchronizing
distributed playback.
This is a squashed merge from master-tungsten of the following changes:
commit 43be3231034ff8537fdd84422a7954780038671f
Author: John Grossman <johngro@google.com>
Date: Mon Jun 27 18:59:12 2011 -0700
Move libaah_rtp over from the vendor directory.
Also move factor PipeEvent out into utils.
Change-Id: Id3877c66efe22d771cf3ef4877107e431b828e37
commit a148e2674b1d3cb73289b82b85c333f0a66824a9
Author: John Grossman <johngro@google.com>
Date: Mon Jun 20 17:02:24 2011 -0700
Move the A@H time service into frameworks/base
Change-Id: I5c570cde70e8931e205516cb33517585804ce841
commit 86c94c7d6780fcfa4e1146325706fb78bc30544c
Author: Jason Simmons <jsimmons@google.com>
Date: Mon Jun 20 15:44:31 2011 -0700
Update the service manager UID table to match the new name of the common clock service
Change-Id: I5a65e84e8dff743c69d182e9851e58fc68791564
commit 6ab14c34be8c1b10b1258bdebbba1e52743ff5b9
Author: Jason Simmons <jsimmons@google.com>
Date: Fri Jun 3 18:19:40 2011 -0700
Add tungsten_timesrv to init.rc
Change-Id: I851aa990612440e1df1af992ed6e4d64b54a4951
Change-Id: Id832a0a00d447aa562bb7476902799bfa5bbda8d
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: John Grossman <johngro@google.com>