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.

TDA4VM: TDA4VM: How to configure the v4l2 virtual channel

Part Number: TDA4VM

Tool/software:

I am currently integrating virtual channel cameras(yuv+ir) in tda4vm. Despite following the outlined steps, I am unable to resolve the issue and am seeking professional assistance.

Please assist in resolving the issue.

  1. It has been verified that YUV video output is being channeled through /dev/video2 by utilizing the command below.

    gst-launch-1.0 v4l2src device="/dev/video2" ! video/x-raw, width=1920, height=1000, format=UYVY ! kmssink driver-name=tidss

  1. First, check the virtual channel IR video output using /dev/video2. The IR image output can be confirmed by modifying the value in fd->entry[fd->num_entries].bus.csi2.vc within the .get_frame_desc=gw5410_get_frame_desc function of the v4l2_subdev_pad_ops.

    if (gw5410_vc_id) //test flag
      fd->entry[fd->num_entries].bus.csi2.vc = gw5410_vc_id;
    else
      fd->entry[fd->num_entries].bus.csi2.vc = i;

  1. Work is in progress to set up /dev/video2 for YUV output and /dev/video3 for infrared output.

  2. When using the gst-launch command with /dev/video3, the .get_frame_desc function is not invoked.

    gst-launch-1.0 v4l2src device="/dev/video3" ! video/x-raw, width=1920, height=1000, format=UYVY ! kmssink driver-name=tidss

  1. In the ti_csi2rx_start_streaming() function, located in the j721e-csi2rx.c file, a comment "/* Find the stream to process. */" is followed by a for loop. Within this loop, the condition "r->source_pad == remote_pad->index" is not satisfied, which hinders the execution of "route = r;".

    /* Find the stream to process. */
    for (i = 0; i < routing->num_routes; i++) {
        struct v4l2_subdev_route *r = &routing->routes[i];
     
        if (!(r->flags & V4L2_SUBDEV_ROUTE_FL_ACTIVE))
            continue;
        
        if (r->source_pad != remote_pad->index)
            continue;
            
        route = r;
        break;
    }

  1. I thought it was necessary to modify the media_pipeline in media control. Upon comparing and analyzing the instances where /dev/video2 and /dev/video3 were used as arguments, I noticed differences in parts of the pipeline, yet it's unclear which sections require modification.