Anssi Hannula wrote:
Klaus Schmidinger wrote:
...
When I load the kfir driver with

  insmod kfir.ko vidinput=0 vidrate=3000000 debug=0 streamtype=4

so that I get a Transport Stream, and then open the /dev/video device
for reading, I get a perfectly ok TS. However, if I close /dev/video
and open it again, the video resulting from the TS shows block
artefacts at the bottom of the screen. Every time I repeat this
close/open procedure, the area that is distorted grows further
up, until after some 5 or so cycles the entire screen is full
of artefacts (and there are also sound distortions).

Only rmmod/insmod of kfir.ko fixes this, which means that I have
to unload/load the driver before every recording.

Does anybody (Anssi?) have any idea what might be the cause for this?


Well, let's try to see if some device initializing helps. Apply the attached patch (assigns some initialization functions to ioctl's), and between /dev/video openings use the kfirtester.c:


./kfirtester /dev/video0 a b c d e f g h

Every letter runs the initialization function assigned to that letter, so if the stream is ok after the command, take some letter off and open the device to see if the stream is still ok. Continue until found what is the letter(s) required for correct stream. This way we see in what function is the required initialization routine in.

First I had to add a pair of braces to make it compile (see below).

Then I did as you suggested, but even the full "a b c d e f g h" didn't
help. The picture was always black after that (no data at all).

I then called kfirtester with each letter separately (each test after an
rmmod/insmod sequence), but none of them helped.

Just for clarity: my test sequence was always

  switch VDR away from the kfir channel
  rmmod kfir
  insmod kfir.ko vidinput=0 vidrate=3000000 debug=1 streamtype=4
  switch VDR to the kfir channel
  --> picture ok
  switch VDR away from the kfir channel
  switch VDR to the kfir channel
  --> artefacts
  switch VDR away from the kfir channel
  ./kfirtester [ with various parameters ]
  switch VDR to the kfir channel
  --> no picture at all

Anything else I might test?

Klaus

------------------------------------------------------------------------

--- kfir/driver/kfir.c 2005-02-19 17:17:38.000000000 +0200
+++ kfir-debug-disto/driver/kfir.c 2005-02-19 17:24:43.000000000 +0200
@@ -2492,28 +2492,42 @@ static int kfir_do_ioctl(struct inode *i
}
case VIDIOCSWIN:
- return -EINVAL;
+ InitParams(kfir);
+ return 0;
case VIDIOCGWIN:
- return -EINVAL;

I had to insert a '{' here...

+               u32 val;
+               /* Disable PLX PCI interrupt */
+               val = rplxl(PLX9054_INT_CNTRL_STS);
+               val &= ~PCI_INT_ENABLE;
+               wplxl(PLX9054_INT_CNTRL_STS, val);
+       
+               return 0;

...and a '}' here to make it compile.

case VIDIOCCAPTURE:
- return -EINVAL;
+ AlteraLoadMicro(kfir);
+
+ return 0;
...

_______________________________________________ mpeg2 mailing list mpeg2@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/mpeg2

Reply via email to