Mailing List archive

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

[linux-dvb] Re: Patch for problem with multiple NOVA cards



I applied your patch to the DVB/ tree in CVS. Michael, can you please review and apply this to the dvb-kernel/ tree?

thanks,

Holger



Marian Durkovic wrote:
Hi all,


   seems I've found the reason for this problem. The fidbirq() function had
some checks which incorrectly moved the pointer back. This resulted in
outputting the same TS packets twice. Moreover, for stability reasons it's
much better to read the actual field position from the card instead of
setting it from within fidbirq(). Please find the patch below.


	With kind regards,

		M.


--------------------------------------------------------------------------
----                                                                  ----
----   Marian Durkovic                       network  manager         ----
----                                                                  ----
----   Slovak Technical University           Tel: +421 2 524 51 301   ----
----   Computer Centre, Nam. Slobody 17      Fax: +421 2 524 94 351   ----
----   812 43 Bratislava, Slovak Republic    E-mail: md@bts.sk        ----
----                                                                  ----
--------------------------------------------------------------------------


On Fri, Jan 17, 2003 at 10:36:12AM +0100, Marian Durkovic wrote:

Hi all,


 recently I've upgraded to the new driver from CVS. However, there seems
to be some problem when using multiple NOVA cards in one server.

 Although the PC has plenty of CPU cycles, the vls application complains
about discontinuities in TS packets from the driver:

libdvbpsi error (PSI decoder): TS discontinuity (received 5, expected 6)
libdvbpsi error (PSI decoder): TS discontinuity (received 10, expected 11)
libdvbpsi error (PSI decoder): TS discontinuity (received 11, expected 12)
libdvbpsi error (PSI decoder): TS discontinuity (received 13, expected 14)

meaning that the application gets the same packet twice.

Seems like the driver has some problem, when it receives interrupts from
multiple cards at the same time (or very close together).

When trying to use some older drivers, I've found that the problem appeared
somewhere between driver builds 20020630 and 20020731. In other words,
OLDSTRUCT driver 20020630 or older does not have this problem.


--- av7110.c.orig Fri Jan 17 14:56:10 2003
+++ av7110.c Mon Jan 20 16:10:38 2003
@@ -715,7 +715,7 @@
av7110->tsf=0;
av7110->ttbp=0;
- saa7146_write(saa->mem, DD1_INIT, 0x02000680);
+ saa7146_write(saa->mem, DD1_INIT, 0x020006c0);
saa7146_write(saa->mem, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
saa7146_write(saa->mem, BRS_CTRL, 0x60000000);
@@ -896,6 +896,7 @@
u8 *mem=(u8 *)(av7110->saa->grabbing);
int num;
u32 dmapos;
+ int field=0x80&saa7146_read(av7110->saa_mem, PSR);
dmapos=saa7146_read(av7110->saa_mem, PCI_VDP3);
dmapos-=(dmapos%188);
@@ -903,9 +904,7 @@
if (dmapos >= TS_BUFLEN)
return;
- if (av7110->tsf) {
- if (av7110->ttbp>TS_BUFLEN/2)
- av7110->ttbp=TS_BUFLEN/2;
+ if (field) {
mem+=av7110->ttbp;
if (dmapos<0x20000) {
num=1024-av7110->ttbp/188;
@@ -915,7 +914,7 @@
av7110->ttbp=dmapos;
}
} else {
- if (av7110->ttbp>1000*188 && av7110->ttbp<1024*188) {
+ if (av7110->ttbp) {
if (av7110->feeding)
dvb_dmx_swfilter_packets(&av7110->demux, mem+av7110->ttbp,
@@ -925,12 +924,6 @@
av7110->ttbp=dmapos;
}
- av7110->tsf^=1;
- saa7146_write(av7110->saa_mem, DD1_INIT, 0x02000600|(av7110->tsf ? 0x40:0x80));
- saa7146_write(av7110->saa_mem, MC2, - (MASK_09 | MASK_25 | MASK_10 | MASK_26));
-
- // FIXME: use bottom half or tasklet
if (av7110->feeding && mem[0]==0x47)
dvb_dmx_swfilter_packets(&av7110->demux, mem, num);
}




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



Home | Main Index | Thread Index