Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Patch: fidbirq() with recovery after lost intr



Marian Durkovic writes:
 >    looking deeper into IRQ handler for NOVA cards I've realized that it's
 > unnecessary complicated and lacks the functionality to recover after lost
 > interrupt athough it's supported by hardware. 
 > 

But that is not the reason for using the DMA pointer.
The fidb IRQ is caused by a change in the field state input, not 
the end of DMA transfer of one field. 
It can happen that the DMA for one field is not yet finished when the 
field interrupt is called. In this case some old data at the end of the 
last field is passed down to the software filter.

It probably depends on many factors if and how often this occurs:
processor speed, PCI hardware on board, DMA configuration and if
other SAA DMA are running, etc.
But it definitely does happen and caused corrupted data in the past
until I put the "unnecessary" stuff in there.
Btw., besides the code for handling the missed old buffer, your fidbirq() is 
the same as our initial code without the DMA buffer checking.

The extra time from IRQ to tasklet in case of the Convergence driver 
also might mask this case a little bit. There it might only happen
on very fast and otherwise idle systems.


 >    The card always provides access to two most recent half-buffers, which 
 > means that if we miss one interrupt, we can always recover by outputting 
 > the missing half-buffer in the next interrupt.

Here a similar thing can happen. Since the DMA already could have written to 
the missed older half-buffer you are now passing some new bytes mixed
with old bytes to the filters. Sorry, if you missed the IRQ it is too
late. You would have to add more buffers. 


Ralph


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index