I'm trying to capture video from analog cam, connected to OMAP-L138 LCDK via composite-in.
When I'm executing vpif application as vpif_mmap_loopback -m 1 -p 0 the following error appears
______________________________________________________________________________
VIDIOC_S_INPUT
: Invalid argument
Error in opening capture device for channel 0
______________________________________________________________________________
I've decide to debug program and source of the problem is in tvp function tvp514x_s_routing
As I undrstand vpif_mmap_loopback -m 1 -p 0 calls vpif_capture driver to set correct video input. In function vpif_s_input vpif driver calls tvp514x_s_routing through v4l2_subdev_call. And when tvp tries to sync up with input, it cannot do it, because when it's checking REG_STATUS1, it don't coincident with lock_mask.
Lock_mask is 00001110. It means that values in 1,2 and 3 bits in REG_STATUS1 should be set in 1, but register number 3, that I have, always set in 0. And cause of this input can't be set correctly.
Debug log and some code listing are attached below.
In this code try_count = 5, LOCK_RETRY_DELAY= 200.
In code we can see, that if sync_lock_status & lock_mask=00001110, than it's ok, because Color subcarrier, Vertical sync and Horizontal sync is locked.
But in debug prints we can see, that register number 3 =0, and therefore, Color subcarrier don't locked.
How can I fix this problem?
(Please visit the site to view this file)