This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how to check video input status?

Other Parts Discussed in Thread: TVP5150

There seems to be a couple of different ways to check video input status.  I am just looking to see if there is a video input signal detected so I can toggle an led on our board.   I am using a dm365 eval board.  It seems that you should be able to read register 0x88 from the tvp5150 using i2c, but I could not get that to work at all.  We have used i2c to talk to the ioport and our eeprom, but can not talk directly to the 5150.  It also seems that there should be some useful status in the v4l2_input structure, but using the ioctl that populates the status field always seems to be 0.

 

I can use other ioctls such as VIDIOC_QUERYSTD which will tell me if I have video input, but if video is not connected the first time I call that ioctl and run in a loop, it will always return -1.  However if video is connected and I run the same test program, I can disconnect and connect the video source all day and the ioctl works well. 

 

Is there any better / more consistent way to detect video input status?

  • what platform are you using?  Reading TVP registers would be the way to go, as a matter of fact this is what VIDIOC_QUERYSTD does underneath (on our DM6446 DVSDK at least).  What type of errors are you getting using this approach?  How are you implementing reading of TVP registers (user level or driver level)?  The drivers should provide good reference code on how to read TVP registers.

  • I am implementing the i2c reads in user space and am reading the status register 0x88.  It turns out that my code was written correctly, but that the tvp5150 was being held in a reset state until the the driver was loaded and the encode progarm was ran.  So now that I know that I can successfully read the status register.  The only remaining issue is that I want to be able to read that register from boot up, so I guess I'll have to look into why the 5150 is being held in reset.