On Monday 29 August 2005 01:49, Boleslaw Ciesielski wrote: > I am playing (again :-) with CC on PVR-350 (NTSC). I am seeing garbled > (but not completely) output from vbi with 0.3.7k. > > This does not happen with 0.2.0rc3k. > > dmesg output is at the end. What other info should I provide to help > debug this?
If you run vbi with /dev/vbi4, is the output correct? If so, then the CC data is captured correctly, otherwise the capturing is wrong. It looks very much like a problem I have occasionally where all the data is there but in the wrong order. I've posted a message some time ago about this but nobody could reproduce this. I've copied that message below together with the patch. If you can also try to test with that patch? (the patch should also apply to 0.3.7k) Original message: I see weird things when I try to playback an mpeg containing recorded closed caption VBI data. I checked that the data in the mpeg file is in transmission order, but what I get out seems to be randomized. It's all there, but in the wrong order. I cannot reproduce this with PAL teletext or WSS VBI data, it's coming in at the correct order. Can someone with a PVR350 in NTSC country test the following for me? - Download ivtv-0.3.7g (see my upload message just now) - Apply attached patch to ivtv-irq.c - Compile and install - Tune to a channel containing close captions - Set up VBI embedding: ivtvctl -b cc -w cc -x 1 - Go to the test directory and run: vbi /dev/vbi4 - In another console run: cat /dev/video0 >/dev/video16 (10-15 seconds is enough) Now check the kernel log. It is the offset value at the end that concerns me. It is the offset in the memory area the VBI data from the MPEG file is placed by the firmware. It should be increasing until a certain point and then jump back to the beginning. Instead, what I see is this: offset 0x0019d068 offset 0x0019e8a8 offset 0x0019eeb8 offset 0x0019e298 offset 0x0019fad8 offset 0x001a00e8 offset 0x0019f4c8 offset 0x001a06f8 offset 0x001a1318 offset 0x001a1928 offset 0x001a0d08 offset 0x001a2548 offset 0x001a2b58 offset 0x001a1f38 offset 0x001a3778 offset 0x001a3168 offset 0x001a4398 offset 0x001a49a8 Note that many offsets are out-of-order. And it is not hard to imagine what that does to your closed captions. Can anyone verify this?
--- ivtv-irq.c~ 2005-08-20 17:39:10.000000000 +0200 +++ ivtv-irq.c 2005-08-20 17:39:28.000000000 +0200 @@ -827,7 +827,7 @@ size = ivtv_read_reg(itv->dec_mem + itv->vbi_dec_start + 4); size += 8; pts_stamp = 0; - IVTV_DEBUG_DMA( + IVTV_INFO( "DMA/VBI-Reinsertion type 0x%08x, size 0x%08x, offset 0x%08x\n", streamtype, size, offset); }