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.

Capture video on DM8148 with V4l2

Other Parts Discussed in Thread: TVP5147, TVP5147M1

Hello everyone!


I'm trying to capture video from composite input and just video component is working! Capture video is supported only on /dev/video0 node? In the documentation I read that capture video is possible from /dev/video0 /dev/video4 /dev/video5 and /dev/video6! 

Other question is that i can't find slaveloader program!


I'm using PSP04.04.00.01

  • No, Composite video input is not supported, you will have to add it.

    Regards,

    Brijesh

  • Hello,

    If you are using EZSDK you should follow this user guide to add the external decoder:

    processors.wiki.ti.com/.../DM81xx_AM38xx_Adding_External_Decoders_to_V4L2_Capture_Driver

    If you are using TVP5147, the TVP5147 driver is already avaiable as a part of Linux kernel under $Kernel/driver/media/tvp514x.c. You just need to hook this up to V4L2 capture driver.



    EZSDK has different M3 firmware and utility to load M3 with PSP.

    ./slaveloader startup VPSS-M3 ti814x_hdvpss_1G.xem3 is the usage of PSP.

    You could find the slaveloader in syslink folder/ packages/ti/syslink/samples/hlos/slaveloader


    EZSDK uses the below command for loading the firmwares:

    ./firmware_loader 2 dm814x_hdvpss.xem3 start
    or in case of v4l2 usage:
    firmware_loader 2 /usr/share/ti/ti-media-controller-utils/dm814x_hdvpss_v4l2.xem3 start -i2c 0

    If you want to use only V4L2 capture + V4L2 display + fbdev than ti814x_hdvpss_1G.xem3 is fine, if you want to use encode/decode or any of OpenMax components you need to use dm814x_hdvpss_v4l2.xem3



    BR
    Margarita
  • Brijesh Jadav,

    I did the changes needed for add an external decoder (tvp5147) on dm8148 board according with the patches that I found for board dm8168.

    So, I got the following error (image attached).  I dont know how solve it! Please, help me!

  • Hi,

    This crashes while connecting your TVP driver to Vin. please put some debug prints to check why it is crashing.

    Rgds,
    Brijesh
  • Hi Brijesh,


    Now decoder was registered as v4l2 sub device. I'm trying to capture video with an application example but I got the message:

    ""VPSS_FVID2: create handle is NULL""

    I think that the decoder configuration in struct ti81xxvin_subdev_info are wrong: Below you can see how i configured it:

    .name    = TVP5147_INST0,
            .board_info = {
                I2C_BOARD_INFO("tvp5147m1", 0x5c),
                .platform_data = &tvp5147_pdata,
            },
            .i2c_adapter = 3,
            .vip_port_cfg = {
                .ctrlChanSel = VPS_VIP_CTRL_CHAN_SEL_15_8,
                .ancChSel8b = VPS_VIP_ANC_CH_SEL_DONT_CARE,
                .pixClkEdgePol = VPS_VIP_PIX_CLK_EDGE_POL_RISING,
                .invertFidPol = 0,
                .embConfig = {
                    .errCorrEnable = 1,
                    .srcNumPos = VPS_VIP_SRC_NUM_POS_DONT_CARE,
                    .isMaxChan3Bits = 0,
                },
                .disConfig = {
                    .fidSkewPostCnt = 0,
                    .fidSkewPreCnt = 0,
                    .lineCaptureStyle =
                        VPS_VIP_LINE_CAPTURE_STYLE_DONT_CARE,
                    .fidDetectMode =
                        VPS_VIP_FID_DETECT_MODE_DONT_CARE,
                    .actvidPol = VPS_VIP_POLARITY_DONT_CARE,
                    .vsyncPol =  VPS_VIP_POLARITY_DONT_CARE,
                    .hsyncPol = VPS_VIP_POLARITY_DONT_CARE,
                }
            },
            .video_capture_mode =
               VPS_CAPT_VIDEO_CAPTURE_MODE_SINGLE_CH_NON_MUX_EMBEDDED_SYNC,
            .video_if_mode = VPS_CAPT_VIDEO_IF_MODE_8BIT,
            .input_data_format = FVID2_DF_YUV420P,

    Regards,

    Tailan Mendes

  • it seems create params are wrong. please check them..

    Rgds,
    Brijesh
  • Hi Brijesh,

    Do you think that it could be a problem with the camera??

    Regards,

    Tailan

  • One more detail, this message ("VPSS_FVID2: create handle is NULL") occurs when I send the command VIDIOC_STREAMON