Hi Andrew,
Thank you very much.
My custom board has 2 ADV7282A-M video decoders. When I run v4l2-ctl –list-devices:
v4l2-ctl --list-devices
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
/dev/media0
vi-output, adv7180 10-0020 (platform:tegra-capture-vi:1):
/dev/video1
vi-output, adv7180 9-0021 (platform:tegra-capture-vi:2):
/dev/video0
When I run media-ctl /dev/media0 -p:
media-ctl /dev/media0 -p
Media controller API version 5.15.148
Media device information
driver tegra-camrtc-ca
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 5.15.148
Device topology
entity 1: 13e00000.host1x:nvcsi@15a00000- (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Sink
← “adv7180 10-0020”:0 [ENABLED]
pad1: Source
→ “vi-output, adv7180 10-0020”:0 [ENABLED]
entity 4: 13e00000.host1x:nvcsi@15a00000- (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Sink
← “adv7180 9-0021”:0 [ENABLED]
pad1: Source
→ “vi-output, adv7180 9-0021”:0 [ENABLED]
entity 7: adv7180 9-0021 (1 pad, 1 link)
type V4L2 subdev subtype Decoder flags 0
device node name /dev/v4l-subdev2
pad0: Source
[fmt:UYVY8_2X8/736x480@1001/30000 field:none colorspace:smpte170m]
→ “13e00000.host1x:nvcsi@15a00000-”:0 [ENABLED]
entity 9: vi-output, adv7180 9-0021 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
← “13e00000.host1x:nvcsi@15a00000-”:1 [ENABLED]
entity 23: adv7180 10-0020 (1 pad, 1 link)
type V4L2 subdev subtype Decoder flags 0
device node name /dev/v4l-subdev3
pad0: Source
[fmt:UYVY8_2X8/736x480@1001/30000 field:none colorspace:smpte170m]
→ “13e00000.host1x:nvcsi@15a00000-”:0 [ENABLED]
entity 25: vi-output, adv7180 10-0020 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video1
pad0: Sink
← “13e00000.host1x:nvcsi@15a00000-”:1 [ENABLED]
The ADV7282A-M that is connected to CAM1 available at /dev/video0 and the ADV7282A-M that is connected to CAM0 is /dev/video1.
I am now able to get live video from /dev/video0 of my sources using gst-launch-1.0 -evvv v4l2src device=/dev/video0 ! ‘video/x-raw, framerate=60/1, format=UYVY’ !videoconvert ! autovideosink –eos-on-shutdown. When I run the same command with /dev/video0, I get a green screen. I think this could be due to the lane polarity fix not happening in my overlay? (attached)
For both video0 and video1 I get some errors here:
v4l2-ctl -d /dev/video0 --stream-mmap --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_REQBUFS returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_STREAMON returned 0 (Success)
cap dqbuf: 0 seq: 0 bytesused: 706560 ts: 462.893376 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 1 bytesused: 706560 ts: 462.910059 delta: 16.683 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 2 bytesused: 706560 ts: 462.926741 delta: 16.682 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 3 bytesused: 706560 ts: 462.943423 delta: 16.682 ms (error, ts-monotonic, ts-src-eof)
v4l2-ctl -d /dev/video0 --stream-mmap --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_REQBUFS returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_STREAMON returned 0 (Success)
cap dqbuf: 0 seq: 0 bytesused: 706560 ts: 462.893376 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 1 bytesused: 706560 ts: 462.910059 delta: 16.683 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 2 bytesused: 706560 ts: 462.926741 delta: 16.682 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 3 bytesused: 706560 ts: 462.943423 delta: 16.682 ms (error, ts-monotonic, ts-src-eof)
My driver is also attached here, but note that when I run the gst command for video1 or video0, the corresponding ADV7282A-M starts to output data (confirmed by oscilloscope), but the CLKP/N lines traces look like nothing is happening.
My questions are as follows:
-
Is the green screen issue indicative of the data lane swapping issue ( I have seen this in other forum posts related to CAM0 vs CAM1 device trees)? If so, do I just need to add a mode0 to each ADV7282A-M in the dts file? I tried briefly but it caused a crash on boot.
-
Based on the fact that I am able to see video using gst-launch-1.0, does this imply that the clock signals are actually working and that it is a measurement/scope limitation issue? Does gst-launch have some built in clock reconstruction? Is there another video viewing method I should use to test this thoery? I think the v4l2-ctl –stream-mmap result might be important here but I’m not sure.
Basically I am wondering if I need to fix the device tree, figure out if the driver is incorrectly configuring the clock, or both.
Thank you,
Michael
adv7180.txt (49.1 KB)
dual_overlay.txt (9.2 KB)