After applying the patch, the problem still remains. I did the following
test:
VBI alone: Does not freeze.
VBI and YUV: Did not freeze:
VBI and PCM: Did freeze.
The VBI and PCM combination freezes after 2-3 minutes. The combination
VBI,PCM and YUV freezes within a couple of seconds.
Regards,
Dieter
On 7/18/07, Hans Verkuil <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I increased the amount of enc_yuv_buffers to 4MB and changed the thread
> priority. Works perfect now. Thanks for the hint!
> One problem is remaining, related to DMA TIMEOUT. Changing pci latency
did
> not help. Default all devices are running on a latency of 64. I set the
> latency for the pvr to 96 but the problem still remains. What happens is
> that when using VBI together with the YUV and PCM encoders (MPEG encoder
> is
> not used on ivtv0), the driver stops delivering data. Reinsert of the
> modules does not work and the 30 seconds cold start is necessary.
>
> Might it be that there is some problem in the driver when a VBI and a
PCM
> DMA are together in progress ?
Please apply the attached patch to the kernel 2.6.22, I fixed a problem
when multiple streams (e.g. VBI and YUV) were opened at the same time. (I
hope it applies cleanly, BTW. I didn't check that). Alternatively,
checkout the v4l-dvb repository from www.linuxtv.org and use that.
I'm not certain whether this will fix your specific problem, but it's good
to try that first.
If it doesn't help, then I need some additional information: does it only
happen with VBI+PCM+YUV capture, or also with some other combination of
streams? (e.g. VBI only, VBI+YUV, PCM+YUV, etc). And does it always stop
so quickly? From the log it looks like it stalls within a second.
The VBI+YUV+PCM combination is quite unusual and rarely (if ever) tested,
so there just might be some race condition here. Normally DMA timeouts
indicate the dreaded DMA engine crash of the card about which I cannot do
anything, but in this case I can't rule out a driver problem.
Regards,
Hans
>
> It is easy to reproduce the situation so I enabled the debug on 511 and
> see
> below:
>
> Jul 17 22:19:12 www kernel: ivtv0 irq: ENC START VBI CAP
> Jul 17 22:19:12 www kernel: ivtv0 dma: DMA encoder VBI: 0x0000ccc0 bytes
> at
> 0x003183b0
> Jul 17 22:19:12 www kernel: ivtv0 dma: start DMA for encoder VBI
> Jul 17 22:19:12 www kernel: ivtv0 irq: ENC DMA COMPLETE 3 2
> Jul 17 22:19:12 www kernel: ivtv0 dma: DMA encoder VBI completed
(3183b0)
> Jul 17 22:19:12 www kernel: ivtv0 ioctl: read 51840 bytes from encoder
VBI
> Jul 17 22:19:12 www kernel: ivtv0 info: read 51840 from encoder VBI, got
> 51840
> Jul 17 22:19:12 www kernel: ivtv1 irq: ENC START CAP 1: 004c4b00
00065400
> Jul 17 22:19:12 www kernel: ivtv1 dma: DMA encoder YUV: 0x00097e00 bytes
> at
> 0x004c4b00
> Jul 17 22:19:12 www kernel: ivtv1 dma: start DMA for encoder YUV
> Jul 17 22:19:12 www kernel: ivtv0 irq: ENC START CAP 2: 0005f664
0000120c
> Jul 17 22:19:12 www kernel: ivtv0 dma: DMA encoder PCM audio: 0x00001200
> bytes at 0x0005f670
> Jul 17 22:19:12 www kernel: ivtv0 dma: start DMA for encoder PCM audio
> Jul 17 22:19:12 www kernel: ivtv0 irq: ENC DMA COMPLETE 3 2
> Jul 17 22:19:12 www kernel: ivtv0 dma: DMA encoder PCM audio completed
> (5f670)
> Jul 17 22:19:12 www kernel: ivtv0 info: read 1024 from encoder PCM
audio,
> got 1024
> Jul 17 22:19:12 www kernel: ivtv0 ioctl: read 1024 bytes from encoder
PCM
> audio
> Jul 17 22:19:12 www kernel: ivtv0 info: read 1024 from encoder PCM
audio,
> got 1024
> Jul 17 22:19:12 www kernel: ivtv0 ioctl: read 1024 bytes from encoder
PCM
> audio
> Jul 17 22:19:12 www kernel: ivtv0 info: read 1024 from encoder PCM
audio,
> got 1024
> Jul 17 22:19:12 www kernel: ivtv0 ioctl: read 1024 bytes from encoder
PCM
> audio
> Jul 17 22:19:12 www kernel: ivtv0 info: read 1024 from encoder PCM
audio,
> got 1024
> Jul 17 22:19:12 www kernel: ivtv0 ioctl: read 1024 bytes from encoder
PCM
> audio
> Jul 17 22:19:12 www kernel: ivtv0 irq: ENC START CAP 1: 0055f700
00065400
> Jul 17 22:19:12 www kernel: ivtv0 dma: DMA encoder YUV: 0x00097e00 bytes
> at
> 0x0055f700
> Jul 17 22:19:12 www kernel: ivtv0 dma: start DMA for encoder YUV
> Jul 17 22:19:12 www kernel: ivtv1 irq: ENC DMA COMPLETE 3 1
> Jul 17 22:19:12 www kernel: ivtv1 dma: DMA encoder YUV completed
(4c4b00)
> Jul 17 22:19:12 www kernel: ivtv1 info: read 414720 from encoder YUV,
got
> 414720
> Jul 17 22:19:12 www kernel: ivtv1 ioctl: read 207360 bytes from encoder
> YUV
> Jul 17 22:19:12 www kernel: ivtv1 info: read 207360 from encoder YUV,
got
> 207360
> Jul 17 22:19:12 www kernel: ivtv1 ioctl: read 414720 bytes from encoder
> YUV
> Jul 17 22:19:12 www kernel: ivtv0 irq: ENC DMA COMPLETE 3 1
> Jul 17 22:19:12 www kernel: ivtv0 dma: DMA encoder YUV completed
(55f700)
> Jul 17 22:19:12 www kernel: ivtv0 ioctl: read 414720 bytes from encoder
> YUV
> Jul 17 22:19:12 www kernel: ivtv0 info: read 414720 from encoder YUV,
got
> 414720
> Jul 17 22:19:12 www kernel: ivtv0 ioctl: read 207360 bytes from encoder
> YUV
> Jul 17 22:19:12 www kernel: ivtv0 info: read 207360 from encoder YUV,
got
> 207360
> Jul 17 22:19:12 www kernel: ivtv0 irq: ENC START VBI CAP
> Jul 17 22:19:12 www kernel: ivtv0 dma: DMA encoder VBI: 0x0000ccc0 bytes
> at
> 0x00325080
> Jul 17 22:19:12 www kernel: ivtv0 dma: start DMA for encoder VBI
> (What
> happened whit this one?)
> Jul 17 22:19:12 www kernel: ivtv0 irq: ENC START CAP 2: 00060880
0000120c
> Jul 17 22:19:12 www kernel: ivtv0 dma: DMA encoder PCM audio: 0x00001200
> bytes at 0x0006088c
> Jul 17 22:19:12 www kernel: ivtv0 irq: ENC DMA COMPLETE 3 2
> Jul 17 22:19:12 www kernel: ivtv0 dma: DMA encoder PCM audio completed
> (6088c)
> Jul 17 22:19:12 www kernel: ivtv0 dma: start DMA for encoder PCM audio
> Jul 17 22:19:12 www kernel: ivtv1 irq: ENC START CAP 1: 0055f700
00065400
> Jul 17 22:19:12 www kernel: ivtv1 dma: DMA encoder YUV: 0x00097e00 bytes
> at
> 0x0055f700
> Jul 17 22:19:12 www kernel: ivtv1 dma: start DMA for encoder YUV
> Jul 17 22:19:12 www kernel: ivtv0 irq: ENC START CAP 1: 005fa300
00065400
> Jul 17 22:19:12 www kernel: ivtv0 dma: DMA encoder YUV: 0x00097e00 bytes
> at
> 0x005fa300
> Jul 17 22:19:12 www kernel: ivtv1 irq: ENC DMA COMPLETE 3 1
> Jul 17 22:19:12 www kernel: ivtv1 dma: DMA encoder YUV completed
(55f700)
> Jul 17 22:19:12 www kernel: ivtv1 info: read 414720 from encoder YUV,
got
> 414720
> Jul 17 22:19:12 www kernel: ivtv1 ioctl: read 207360 bytes from encoder
> YUV
> Jul 17 22:19:12 www kernel: ivtv1 info: read 207360 from encoder YUV,
got
> 207360
> Jul 17 22:19:12 www kernel: ivtv1 ioctl: read 414720 bytes from encoder
> YUV
> Jul 17 22:19:12 www kernel: ivtv0 ioctl: read 414720 bytes from encoder
> YUV
> Jul 17 22:19:12 www kernel: ivtv0 irq: ENC START VBI CAP
> Jul 17 22:19:12 www kernel: ivtv0 dma: DMA encoder VBI: 0x0000ccc0 bytes
> at
> 0x002fea10
> Jul 17 22:19:12 www kernel: ivtv1 irq: ENC START CAP 1: 005fa300
00065400
> Jul 17 22:19:12 www kernel: ivtv1 dma: DMA encoder YUV: 0x00097e00 bytes
> at
> 0x005fa300
> Jul 17 22:19:12 www kernel: ivtv1 dma: start DMA for encoder YUV
> Jul 17 22:19:12 www kernel: ivtv1 irq: ENC DMA COMPLETE 3 1
> Jul 17 22:19:12 www kernel: ivtv1 dma: DMA encoder YUV completed
(5fa300)
> Jul 17 22:19:12 www kernel: ivtv1 info: read 414720 from encoder YUV,
got
> 414720
> Jul 17 22:19:12 www kernel: ivtv1 ioctl: read 207360 bytes from encoder
> YUV
> Jul 17 22:19:12 www kernel: ivtv1 info: read 207360 from encoder YUV,
got
> 207360
> Jul 17 22:19:12 www kernel: ivtv1 ioctl: read 414720 bytes from encoder
> YUV
> Jul 17 22:19:12 www kernel: ivtv0 irq: ENC START VBI CAP
> Jul 17 22:19:12 www kernel: ivtv0 dma: DMA encoder VBI: 0x0000ccc0 bytes
> at
> 0x0030b6e0
> Jul 17 22:19:12 www kernel: ivtv1 irq: ENC START CAP 1: 00694f00
00065400
> Jul 17 22:19:12 www kernel: ivtv1 dma: DMA encoder YUV: 0x00097e00 bytes
> at
> 0x00694f00
> Jul 17 22:19:12 www kernel: ivtv1 dma: start DMA for encoder YUV
> Jul 17 22:19:12 www kernel: ivtv0: DMA TIMEOUT 00000001 3
>
> Best regards!
>
>
> On 7/17/07, Hans Verkuil <[EMAIL PROTECTED]> wrote:
>>
>> > Hello!
>> >
>> > A couple of days I exchanged my old TV capture card with a PVR-500
and
>> the
>> > first results are quite promising! I am using kernel 2.6.22.1 with
the
>> > integrated ivtv driver and have only one PVR-500 card installed
>> > ([EMAIL PROTECTED] 512MB).
>> >
>> > I read from /dev/video32 and perform a HM12 to YUV decoding (didn't
>> get
>> > yuv-fixup parameter to work. I do it in the application).
>>
>> yuv-fixup no longer exists: you should always do it in the application.
>>
>> But why are you capturing /dev/video32? Why not the MPEG stream from
>> /dev/video0? It's an MPEG card after all.
>
>
> I am using ivtv0 for watching TV and want to have the quality before
> the MPEG compression takes place. Ivtv1 is used for Picture-In-Picture
> and MPEG capture in my application.
>
>> Sometimes shows
>> > "YUV stream buffers are full" up in the kernel log file. There is a
>> single
>> > thread reading the RAW video and it happens often when another thread
>> is
>> > changing the frequency of the tuner. How can I detect this situation
>> and
>> > recover (that it happens is another problem...)?
>>
>> The number of buffers allocated for raw YUV is limited, so even if your
>> reader thread is blocked for just a few frames you will get this
>> message.
>> One solution is to increase the buffers allocated for YUV capture (run
>> modinfo ivtv to see help on the module options), another is to increase
>> the priority of the reader thread.
>>
>> At the moment there is no way to detect this particular error, I'll see
>> if
>> that can be improved. Basically when the buffers are full the driver
>> should throw away a full YUV frame, not a partial YUV frame. That way
>> you
>> would just get dropped frames.
>>
>> Regards,
>>
>> Hans
>>
>> > The read on /dev/video32
>> > does not return an error for this and the RAW video data returned
from
>> the
>> > read does not continue at the pixel/plane coordinate before the error
>> > appeared. When this happens the HM12 to YUV decoding produces garbage
>> as
>> > the
>> > data decoded is received in the wrong planes (assuming data
>> corresponds
>> to
>> > Y, but receiving UV,etc...)
>> >
>> > Best regards!
>> > _______________________________________________
>> > ivtv-users mailing list
>> > [email protected]
>> > http://ivtvdriver.org/mailman/listinfo/ivtv-users
>>
>>
>>
>> _______________________________________________
>> ivtv-users mailing list
>> [email protected]
>> http://ivtvdriver.org/mailman/listinfo/ivtv-users
>>
> _______________________________________________
> ivtv-users mailing list
> [email protected]
> http://ivtvdriver.org/mailman/listinfo/ivtv-users
_______________________________________________
ivtv-users mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-users
_______________________________________________
ivtv-users mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-users