[asterisk-dev] M9645: provide zaptel master timing to spans

Matthew Fredrickson creslin at digium.com
Wed May 2 10:43:03 MST 2007


On May 2, 2007, at 11:23 AM, Andrew Kohlsmith wrote:

> On Wednesday 02 May 2007 10:41 am, Tzafrir Cohen wrote:
>>> What do you think of expanding the patch to disable interrupts on
>>> subsequent cards?
>
>> That approach helps for multiple cards that are driven by the same
>> driver. What about a system with two different card types?
>
> Why would it matter?  All zaptel cards do work on a 1ms interval.  The 
> wct4xx
> driver does more than the wcfxo for sure, but the interrupt timing and
> structure is the same.
>
> I took a (very) quick look at wcfxo.c, wct1xxp.c and wct4xxp/base.c.  
> When you
> get an interrupt, couldn't you simply chain through their respective
> handlers?  I don't see any reason why not.

Because if you're dealing with a DMA'd buffer, the data in the buffer 
could be in an inconsistent state.  For example, if you ran zt_receive 
on your buffer, and the data in the buffer hasn't changed yet, you get 
your old data twice, because your card's timing isn't in 
synchronization with the master card's timing.  The same thing happens 
with zt_transmit and transmit buffers.  You can potentially skip data 
if you update your transmit data before the card has transmitted the 
last data.

Matthew Fredrickson



More information about the asterisk-dev mailing list