Support request regarding the problem we encountered while capturing analog video without analog camera module

Hi,
Considering our observations given below, how can we capture analog camera video over FPGA instead of analog camera module in our development/test environment as seen in Figure-4, Scenario#3.
We would be very pleased if you could give us technical support on this matter.

Best regards,

Emrah Aytore.

We set up the environment that includes the analog cemara adapter/module and the toradex apalis evaluation board as described at
How to use Analogue Camera Adapter on Embedded Linux”.
[upload|R4S5nM/UaAMm+Ab9M1RmhYTSPv4=]
Figure-1 Setup environment recommended by Toradex (running)

We can successfully perform the following operations using gtstreamer pipelines for Toradex test environment:

  1. We can create and test pipelines for video capture and record operations using gst-launch-1.0. We did not observe any GStreamer error on terminal screen.
  2. We can display analog video on HDMI output from /dev/video0 using IPU0/CSI0 and /dev/video1 using OPV5640 CSI camera on IPU0/CSI1
  3. When we applied to the v4l2-ctl —all command from embedded linux terminal, we did not observe any error on terminal screen.
  4. When we applied to the dmesg |grep adv7280 command from embedded linux terminal, we observed that ADV7280 was detected properly.

In our project, we want to capture analog video data from FPGA board connected to the analog video camera interface instead of the Toradex Analog Camera Module.
FPGA drives the ADV780 decoder which is connected to it, sends the output of the video decoder data to the Toradex Apalis evaluation board.
Therefore, we don’t need to use ADV7280 driver in Toradex Aplis evaluation board.
For this purpose, we tried different scenarious in our development environment but we couldn’t succeed to the capture and display the analog camera on HDMI output.

Scenario#1: (ADV7280 I2C Enabled in device tree)

  1. Test setup for camera interface is prepared as replacing ANALOG CAMERA MODULE with FPGA.
  2. 1Video signals generated by FPGA were compared with the real test environment’s signals and no visible difference was observed between them.
  3. FPGA behaved like ADV7280 about I2C communication. We put slave I2C interface in FPGA same as ADV7280.
  4. When we applied to the dmesg |grep adv7280 command from embedded linux terminal, we observed that ADV7280 was detected properly.
    [upload|wqvKJ7w0bUKI+Zz6l6VQh+mCnYg=]
    Figure-2 Scenario#1

Scenario-2: (ADV7280 I2C Disabled in device tree)

  1. As seem in Figure-3, Analog Camera Module is initialized with Toradex Apalis Ixora Board, and its video signals are applied to the Toradex Apalis Evaluation board video interface.
  2. We applied the transmitted video output of the analog adaptor module to the Toradex Apalis Evaluation board.
    [upload|F67FxxrPSYL9jvgqnUOFlEBpfTs=]
    Figure-3 Scenario#2

Scenario#3: (ADV7280 I2C Disabled in device tree)

  1. We applied the transmitted video output of the FPGA TPG to the Toradex Apalis Evaluation board.
    [upload|VU5LDjO6iswYao9Yv8IgSy30Bwc=]
    Figure-4 Scenario#3

For all scenarios,
When we applied to the v4l2-ctl —all command from embedded linux terminal,
we observed that the following error on linux terminal screeen:
ERROR: unrecognized srd: ffffff (PAL=ff, NTSC=b0000)

When we applied to the following GStreamer pipeline to capture analog video,
gst-launch-1.0 imxv4l2videosrc device=/dev/video0 ! autovideosink

we observed that the following GStreamer error on Linux terminal:
…/…/…/…/gstreamer-1.8.3/libs/gst/base/gstbasesrc.c(3354): gst_base_src_start (): /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0

Dear @emrahayt12

Looking at our example device tree imx6dl-colibri-cam-eval-v3.dts you see that the node v4l2_cap_0 and the node adv7280 are related and both pointing to a common CSI and IPU. v4l2-ctl on the other side requires an I2C video decoding device to get all the necessary information about the incoming data stream on the parallel camera interface. This is also the reason why scenario #2 and #3 didn’t work, because v4l2-ctl doesn’t work without having a known video decoding I2C device.

I would focus on scenario #1 here. It seems like your I2C communication didn’t work as expected and I would recommend to check why. Remember that the Kernel expects to have a direct communication to the ADV7280 and therefore you really must meet the exact implementation required by the driver adv7280.c. If you struggle to meet any implementation, you could also change the Kernel driver to your needs. And if you don’t know what’s wrong, you could enable Kernel debugging and debug the mentioned driver. You may also first want to check what dmesg tells you. For some reasons, your Kernel doesn’t know the format of the stream and therefore applications like v4l2-ctl or GStreamer are failing.

Are you able to read and write to the ADV7280 over I2C? Could you check that communication? And if it is still not working, could you also append the full dmesg-log, the used kernel-config and your device tree files for the next question?

Best regards
Diego