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.

DM365 VPFE <-----> TVP5158 in 16 bit bt.1120 mode

Other Parts Discussed in Thread: TVP5158

I am attempting to forward-port the TVP5158 driver from DVSDK 3.x to 4.02.  Unfortunately, this has been a near complete re-write.

If the following doesn't make sense, please let me know so that I can attempt to explain further.  

I would like to use a TVP5158 in YCbCr 4:2:2 mode with the DM365 vpfe module.  From what I have read, I think that I should be able to use the TVP5158 in 16 bit mode to produce 2x8 bit samples fed into the DM365 VPFE, assuming that it is configured correctly.  I have CCDCFG configured as follows:

8bits/pixel

Y/C swapped

Y8POS is odd

REC656IF is 0x03 (error correction enabled and REC656 interface enabled)

MODESET:

  VDPOL negative

  INPMOD 1 (YCbCr 16-bit)

Everything looks fine on the capture -- I can detect all 4 configured channels and I can see if there is a video source attached.  Unfortunately, I'm only seeing 720 bytes per line instead of 1440.  The realistic looking image data appears as follows:

0000000 7f80 8080 7f80 807f 807f 817f 817f 817e
0000010 817e 807f 807f 817f 807e 807e 807e 807e
0000020 807f 807f 817f 817e 8180 817f 817f 817e
0000030 817f 817e 817f 807e 817e 807e 807e 817e
0000040 817d 817e 817f 817f 8180 8181 7f80 7f7d
0000050 837c 867c 857d 8479 8473 8473 8277 7c79
0000060 7c74 8074 8179 807d 7f7f 807f 7f80 7f80
0000070 7e7f 807d 827e 827e 8380 8281 8183 8184
0000080 8183 8183 8183 8283 8283 8381 8380 8380
0000090 8281 8083 7f83 7f83 7f81 7f7f 807d 817d
00000a0 817c 817e 817f 8180 8181 8281 8181 8181

The second half of the image, though, looks like this:
00002d0 00ff 9d00 8080 8080 8080 8080 8080 8080
00002e0 8080 8080 8080 8080 8080 8080 8080 8080
*
00003b0 8080 8080 8080 8080 8080 8080 0000 0000
00003c0 0000 0000 0000 0000 0000 0000 0000 0000
*
0000590 0000 0000 0000 0000 0000 0000
000059c

Either I'm not understanding how 16 bit mode works and I should just stick with 8 bit or I've made a mistake somewhere along the line deep down in V4L2 land.  Any ideas?  Is what I am trying to do crazy?