Author: tzafrir
Date: Sat Jul 28 18:24:52 2007
New Revision: 2795

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2795
Log:
master_sync.diff from #9645 .

This one works well. It is currently being delayed is its approach may 
be improved (e.g: don't call the span function on every tick).

Modified:
    team/tzafrir/patches/zaptel-base.c
    team/tzafrir/patches/zaptel.h
    team/tzafrir/patches/zconfig.h

Modified: team/tzafrir/patches/zaptel-base.c
URL: 
http://svn.digium.com/view/zaptel/team/tzafrir/patches/zaptel-base.c?view=diff&rev=2795&r1=2794&r2=2795
==============================================================================
--- team/tzafrir/patches/zaptel-base.c (original)
+++ team/tzafrir/patches/zaptel-base.c Sat Jul 28 18:24:52 2007
@@ -7016,6 +7016,14 @@
                                spin_unlock_irqrestore(&chans[x]->lock, flags);
                        }
                }
+#ifdef ZAPTEL_SYNC_TICK
+               for (x=0;x<maxspans;x++) {
+                       struct zt_span  *s = spans[x];
+
+                       if (s && s->sync_tick)
+                               s->sync_tick(s, s == master);
+               }
+#endif
                spin_unlock_irqrestore(&bigzaplock, flagso);                    
        }
 #endif

Modified: team/tzafrir/patches/zaptel.h
URL: 
http://svn.digium.com/view/zaptel/team/tzafrir/patches/zaptel.h?view=diff&rev=2795&r1=2794&r2=2795
==============================================================================
--- team/tzafrir/patches/zaptel.h (original)
+++ team/tzafrir/patches/zaptel.h Sat Jul 28 18:24:52 2007
@@ -1402,6 +1402,11 @@
        /* Opt: Enable maintenance modes */
        int (*maint)(struct zt_span *span, int mode);
 
+#ifdef ZAPTEL_SYNC_TICK
+       /* Opt: send sync to spans */
+       int (*sync_tick)(struct zt_span *span, int is_master);
+#endif
+
        /* ====  Channel Callback Operations ==== */
        /* Opt: Set signalling type (if appropriate) */
        int (*chanconfig)(struct zt_chan *chan, int sigtype);

Modified: team/tzafrir/patches/zconfig.h
URL: 
http://svn.digium.com/view/zaptel/team/tzafrir/patches/zconfig.h?view=diff&rev=2795&r1=2794&r2=2795
==============================================================================
--- team/tzafrir/patches/zconfig.h (original)
+++ team/tzafrir/patches/zconfig.h Sat Jul 28 18:24:52 2007
@@ -184,4 +184,10 @@
  */
 /* #define FXSFLASH */
 
+/*
+ * Enable sync_tick() calls. Allows low-level drivers to synchronize
+ * their internal clocks to the zaptel master clock.
+ */
+#define ZAPTEL_SYNC_TICK
+
 #endif


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to