In both chips, the cx25840 and saa7115, sometimes upon module load (usually after a boot), the digitizer won't work unless you do this. It really won't work unless you either do this or cold boot, the Windows driver has this exact same problem but they dont' fix it there :-), you have to cold reboot. It is very rare, happens on systems with 4-8 video inputs alot more frequently.

Yes the cx25840 was just a crude hack, that was the only way to get it to always work for me on systems that did this very often. The reason it checked for 0 was a kludge to get botht the saa7115 to make it work when out of sync only, and the cx25840 always since with it the sync seemed to not be as easy to get to at that time (when accessing the registers was still completely mucked up until Tyler helped me fix that).

Thanks,
Chris

Hans Verkuil wrote:

On Saturday 08 October 2005 22:24, Tyler Trafford wrote:
Hans Verkuil wrote:
On Saturday 08 October 2005 21:21, Tyler Trafford wrote:
Can anyone see what's the point of this cx25840 ioctl?  Especially it's
usage in ivtv-fileops...
Well, it's used by the VIDIOC_G_TUNER ioctl. It is actually never called
in ivtv-fileops, that code is only used by the saa7115 boards.
Are you sure you're not thinking of DECODER_GET_STATUS instead of
DECODER_GET_VIDEO_STATUS?

Darn, you're right. Let's see if I can understand the code:

If ivtv_read cannot read any data for over 6 seconds, then it tries to reset the digitizer in case there is a sync issue (can this ever happen?).

It first looks if it has to reset the digitizer, which is done by a DECODER_GET_STATUS call, except for the cx25840-based cards where it assumes that it always has to reset. This could be a leftover from a time when DECODER_GET_STATUS wasn't yet implemented in the cx25840 driver. If it has to reset it calls DECODER_GET_VIDEO_STATUS for the cx25840 which basically does the same as DECODER_GET_STATUS. The result is checked against zero (which cannot happen as DECODER_GET_VIDEO_STATUS only returns 1 or 2!). ivtv_reset_digitizer() assumes 0 means no digitizer sync. Mysteriously it then only resets if there is a digitizer sync (except for the saa7115 where it always resets). Conclusion: drop DECODER_GET_VIDEO_STATUS and use the same code path for both saa7115 and cx25840. Personally I think the whole code can probably be removed. If you haven't had data for 6 seconds then I think it's safe to assume that resetting a digitizer isn't going to make much difference. To me it looks like a hack from the olden days when men where men and the ivtv driver didn't work :-)

Perhaps Chris can shed some light on the evolution of this piece of code?

        Hans



--
===
Chris Kennedy
[EMAIL PROTECTED]


_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel

Reply via email to