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.

TDA4VH-Q1: V4l2 DQBUF, select timeout

Part Number: TDA4VH-Q1

Hi TI members,

When I was debugging my camera driver(the pipeline: ar0220AT & ub953 & ub960), I executed the following command

v4l2-ctl -d /dev/video8——set-fmt-video=width=1820,height=940,pixelformat=RGGB——stream-mmap=3——stream-skip=4——stream-to=/home/root/ar0220/test.bin——stream-count=1——stream-poll

But a select timeout error occurred. Which module is the problem and how to solve it?

And if not add the stream-poll option, it will get stuck in the dqbuf.

I added a new camera driver and enabled the corresponding device tree in boot, such as vision_app, fpdlink_fusion, sensor.

I can now confirm that the frame count for the camera and deserializer (ub960) is increasing. But the program will stay stuck in dqbuf.

I'm wondering what should I do to debug.

Do you have any idea?

Best regards,

Zheng

  • Hi Zheng,

    What SDK and which version are you using?

    Thank you,

    Fabiana Jaimes

  • Hi Jaimes,
        The sdk I use is sdk-8.6-vh.
  • Hi,

    I'd like to update you on something new.

    When I enabled tpg for the serializer ub953, it worked fine with the default tpg configuration. But when I change the format to raw12, the same problem occurs.

  • Hi Zheng,

    Could you share me the device configuration using the media-ctl?

    I believe you are trying to stream a single channel right?

    Have you configured the format to RGGB in the ser and des using media-ctl?

    Regards,

    Nikhil

  • Hi,

    Thanks for your nice help. So far I've learned the format I need to configured to BA12 with your help. The problem has now been solved.

    The reason for asking this question is to know if the TDA4-VH board supports my camera (AR0220AT, format: bayer_grbg12). So far I have been able to successfully obtain the image through the V4L2 command.

    But it's not quite clear how to display it on the monitor.

    I have tried the following command.

    gst-launch-1.0 v4l2src device=/dev/video8 num_buffers=240 ! capsfilter caps=video/x-bayer,width=640,height=480,format=SGRBG12 ! videoconvert ! avimux ! filesink location=output.avi
    The following error was reported.

    WARNING: erroneous pipeline: could not link v4l2src0 to capsfilter0

    And I learned from processor-sdk-linux-j784s4 that there are the following commands.

    gst-launch-1.0 v4l2src io-mode=dmabuf device=/dev/video2 ! video/x-bayer,width=1920,height=1080,format=bggr ! tiovxisp sensor-name=SENSOR_SONY_IMX219_RPI dcc-isp-file=/opt/imaging/imx219/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/imx219/dcc_2a.bin sink_0::device=/dev/v4l-subdev2 ! video/x-raw,format=NV12 ! v4l2h264enc output-io-mode=dmabuf-import extra-controls="controls,h264_i_frame_period=60" ! rtph264pay ! udpsink port=5000 host=<ip_address>
    So how do I get the relevant bin file or is there an easier way for me to see my video footage.

    Regards,

    Zheng

  • Hi Zheng,

    I hope the gstreamer command mentioned at the end of this FAQ should resolve your issue.

    (39) [FAQ] TDA4VM: Run Capture - Display usecase on Linux in SDK - Processors forum - Processors - TI E2E support forums

    Please check and let me know if it does.

    Regards,

    Nikhil

  • Hi Nikhil,

    I have tried the command you mentioned.

    If I don't adjust the image size and format of the camera, I can get a very blurry and strange image on the screen.

    If I adjust the format and size to fit the ar0220 camera, I will be stuck in the dqbuf.

    I tried changing the snesor name to SENSOR_ONSEMI_AR0220_UB953_MARS and got an error "Invalid sensor name".

    That's all I've got so far.

    Looking forward to your reply

    Regards,

    Zheng

  • Hi Zheng,

    Have you pointed to the DCC file for your sensor? 
    Could you please share the command that you are using?

    Regards,

    Nikhil

  • Hi Nikhil,

    gst-launch-1.0 v4l2src device=/dev/video8 ! queue leaky=2 ! video/x-bayer, width=640, height=480, format=grbg12 ! tiovxisp sink_0::device=/dev/v4l-subdev7 sensor-name=AR0220-UB953_MARS dcc-isp-file=/home/root/ar0220/dcc_viss.bin sink_0::dcc-2a-file=/home/root/ar0220/dcc_2a.bin format-msb=11 ! video/x-raw, format=NV12 ! tiovxldc dcc-file=//home/root/ar0220/dcc_ldc.bin sensor-name=AR0220-UB953_MARS ! video/x-raw, format=NV12, width=640, height=480 ! kmssink sync=false driver-name=tidss

    The DCC file is for ar0233. Because I successfully displayed with the DCC file for 0233 on the rtos side.

    Regards,

    Zheng

  • Hi Zheng,

    gst-launch-1.0 v4l2src device=/dev/video8 ! queue leaky=2 ! video/x-bayer, width=1920, height=1280, format=grbg12 ! tiovxisp sink_0::device=/dev/v4l-subdev7 sensor-name=AR0220-UB953_MARS dcc-isp-file=/home/root/ar0220/dcc_viss.bin sink_0::dcc-2a-file=/home/root/ar0220/dcc_2a.bin format-msb=11 ! video/x-raw, format=NV12 ! tiovxldc dcc-file=//home/root/ar0220/dcc_ldc.bin sensor-name=AR0220-UB953_MARS ! video/x-raw, format=NV12, width=1920, height=1080 ! kmssink sync=false driver-name=tidss

    May I know what is the output that you are seeing for the above? 

    Assuming sensor outputs 1920 x 1280 present at /dev/video8 and subdev7?

    Are you sure that the format output from sensor is grbg12?

    Regards,

    Nikhil

  • Hi Nikhil,

    Yes, I'm sure the format output from sensor is grbg12. 

    There are some new situation updates, when I configured the camera resolution to 960x948, the following command was used to display normally.

    gst-launch-1.0 v4l2src device=/dev/video8 ! queue leaky=2 ! video/x-bayer,width=1920,height=948,format=grbg12 ! tiovxisp sink_0::device=/dev/v4l-subdev7 sensor-name=SENSOR_ONSEMI_AR0233_UB953_MARS dcc-isp-file=/opt/imaging/ar0220/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/ar0220/dcc_2a.bin format-msb=11 ! video/x-raw, format=NV12 ! tiovxldc dcc-file=/opt/imaging/ar0220/dcc_ldc.bin sensor-name=SENSOR_ONSEMI_AR0233_UB953_MARS ! video/x-raw, format=NV12, width=960, height=474 ! kmssink sync=false driver-name=tidss
    If I change the resolution entered in the command 1920x948 to 960x948, or any width other than 960, the whole program will stuck.

    I think this is due to the fact that the dcc file of ar0233 only supports 1920x1280 resolution. So I would like to ask how I can modify the xml file of ar0233 so that the dcc file generated by these xml files can support other resolutions, such as 1828x948 or 1440x900.

    Regards,

    Zheng

  • Hi Zheng,

    I shall let the DCC tuning expert respond to this. 
    Please await for their response

    Regards,

    Nikhil

  • I think this is due to the fact that the dcc file of ar0233 only supports 1920x1280 resolution. So I would like to ask how I can modify the xml file of ar0233 so that the dcc file generated by these xml files can support other resolutions, such as 1828x948 or 1440x900.

    Hi Zheng,

    Are you working on AR0220 or AR0233?

    You may use the python script below to create DCC xml files for your sensor at different resolution -- e2e.ti.com/.../faq-default-dcc-profile-generation-tool-for-tda4-am6xa-isp-vpac

  • Hi,

    I'm working on AR0220. But I need to configure the sensor name to SENSOR_ONSEMI_AR0233_UB953_MARS for it to work properly. Or I'll get a 'Invalid sensor name' error.

    With your nice help, now I have created DCC files which support the resolution I need. But the video is gray.

    This is config file.

    The command I use is as below.

    gst-launch-1.0 v4l2src device=/dev/video8 ! queue leaky=2 ! video/x-bayer,width=1800,height=920,format=grbg12 ! tiovxisp sink_0::device=/dev/v4l-subdev7 sensor-name=SENSOR_ONSEMI_AR0233_UB953_MARS dcc-isp-file=/opt/imaging/ar0220/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/ar0220/dcc_2a.bin format-msb=11 ! video/x-raw, format=NV12 ! tiovxldc dcc-file=/opt/imaging/ar0220/dcc_ldc.bin sensor-name=SENSOR_ONSEMI_AR0233_UB953_MARS ! video/x-raw, format=NV12, width=1800, height=920 ! kmssink sync=false driver-name=tidss

    Do you have any idea on this issue?

    Regards,

    Zheng

  • But the video is gray.

    Hi Zheng,

    I suppose you mean the output image is black and white (monochrome).
    I believe you would always get gray output if you use the python code before SDK 8.6.

    Could you confirm if you use the latest python code on git -- https://git.ti.com/cgit/processor-sdk/imaging/tree/tools/default_DCC_profile_gen?h=main
    T
    hat should be the same as SDK 9.0 and you shall get color output.