[Asterisk-Dev] why not disable clock when using multiple Zaptel cards?

Peter Svensson psvasterisk at psv.nu
Fri Nov 26 11:58:45 MST 2004


On Fri, 26 Nov 2004, Andrew Kohlsmith wrote:

> If I have a pair of T100Ps, or a TDM400P and a X101P, or any combination of 
> Zaptel cards in a system why on earth does the zaptel driver not disable the 
> timer interrupt for all but one card and use that single timer for clocking 
> everything in the system?

There are two periodic timers that we need to not mix up when talking. One 
is the line clock of the T1/E1 interface. It ticks at a multiple of 8*8 kHz 
(the sampling rate of the phone system) times the number of channels in 
the line (25 or 32 if I remember correctly). This timing is handled by the 
hardware on the interface card. If the card is a multiport TE410P then all 
the spans are clocked from the same source. The source is normally a PSTN 
span. 

The other timing is the 1kHz interrupt generated once 8 bytes are received 
from each channel. This allos the zaptel driver to do something with the 
data once received. 

For the first timing (the line timing) this must be distributed between 
the spans that are to share a common timing source. At the moment this 
seems only to be possible within a card. It may be possible to write a 
software PLL to lock the internally generated timing on one card to the 
pstn derived timing of another. 

I think the second timing currently causes 1kHz worth of interrupts per 
card in the system. Perhaps it would be possible to collect the data from 
all the cards from within the same interrupt handler. I don't know. Thay 
may lessen the load somewhat.

> IIRC there are problems discussed where having two Zaptel cards in a system 
> can cause issues when bridging between them since the timing is off, and 
> using one timer for all Zaptel cards certainly seems like it would be more 
> efficient and eliminate this problem.   Am I missing something obvious?

You missed the point that the high frequency timing needs to get from one 
card to the next. Since no cable interconnects them a pll of some sort is 
probably needed, if this is at all possible. 

Or, you can loop a cable from one span on one card to a span on another 
card. That loses you on port on each card of course, just to get the 
timing between the cards.

Peter





More information about the asterisk-dev mailing list