Mailing List archive

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

[linux-dvb] Re: DVB-S into Budget modification



Hi Emard and all,

At 14:42 01/01/2003 +0100, Emard wrote:

>... Are you still using the
>old driver sources? IMHO newer sources are more stable.

Yes, at the time that you wrote this, I was using a old driver; latter,
I've done some tests with a recent one.

>About Latency and stability:
>
>When you get improvement in PCI latency, here is short description
>how did I calculate right latency for each PCI card and other PCI
>devices integrated on the mainboard:
>
>Frist do lspci -vvv, spot every line like:
>        Latency: 80 (2500ns min, 2500ns max), cache line size 08
>
>You see, for this device having 2500ns min latency I've choosen latency 80.
>Simple calculation leads to this:
>2500 / 33 = 75.757575 => 80
>choose first higher latency integer divisible by 8, therefore we get 80.
>
>Why 128 For DVB cards:
>        Latency: 128 (3750ns min, 9500ns max)
>3750 / 33 = 113.636363636364 => 128
>
>Do that for all the PCI devices lspci can find.
>For other PCI devices having uspecified min/max latency, set latency 48. 
>
>Latency is maximum number of PCI clock cycles that the card is allowed
>to hold the PCI bus. When long transfer is exceeding latency time, card is 
>forced to postpone the part of transfer and if it has low or no internal 
>buffer it may loose data and packets. Depending on the driver this may 
>lead to unpredictable results. Some drivers+cards like network cards are
>resistant to such conditions, but seems that DVB isn't.

I suposse that on network cards the corrupted packets are (CRC) detected 
and the protocol retry its retransmision, which isn't possible on 
(broadcast) DVB.

>min latency in ns is card's required minimum time to transfer a complete
packet.
>max latency in ns is card's maximum allowed time other PCI devices can hold
>the PCI bus before the card will drop or loose data. 
>
>If sum of all latencies * 33ns in your system is greater that some card's
>max latency, this card may have problems. In our case sum of all your
>PCI latencies (48 + 128 + 80 etc) * 33ns should not exceed 9500 ns 
>otherwise DVB card will be deemed to loose data if all other PCI devices 
>become active in the same moment. I know it's a very tight requirement,
>almost impossible to achieve in PC with all PCI slots occupied.

Thanks by your explains!. I've had a short look to the minimun & maximun 
values for DVB cards:
>        Latency: 128 (3750ns min, 9500ns max)

.- The SAA7146 Fifo #3, used for the capture of the TS packets in the 
   DVB_budget card, is set to transfer bursts of 128 Dwords; this lead to:
   128 (Dwords) / 33 (Dwords/uSec) = 3.878 uSec = 3878 nSec.

.- The SAA7146 Fifo #3 can store 128 Dwords, which at about 5 MB/Sec of TS
   data will fill in: 128*4 (bytes) / 5 (bytes/uSec) = 102400 nSec.

The minimun latency would be a few bigger (3878/33=117.5), to transfer the 
programmed DMA burst, but the rounded-up value already cover this.

The max value is an "overkill" for the capture of the TS data, as the Fifo
can store to ten times the specified value (of course, this is so for the
adquisition of digital video, to be show on the VGA).

>Actually I have seen that I can cope with shared IRQ's (DVB+USB+NIC)
>on the same IRQ, only not (DVB+DVB) on the same. I checked interrupt
>sharing with very heavy system load and worked for me.

Good! but OTH, is possible to crash a system without any interrupt sharing.


Best regards:
--
Roberto Deza Asensio
Universidad de Navarra
Data Procesing Center
rdeza@unav.es


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



Home | Main Index | Thread Index