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.

Problem in Video Capture for component input

Other Parts Discussed in Thread: TVP7002, TLC59108

Hi experts

I tried to run capture_encode_a8host_debug.xv5T for both composite and component but in vain.

I am facing a similar issue like 

http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/318186.aspx for which the issue is not yet resolved.

Instead of composite, based on the suggestions provided in the above link, I had tried component input as well, the issue remains the same. 

Hence, I had followed the steps provided in this link

http://processors.wiki.ti.com/index.php/TI81XX_PSP_VIDEO_CAPTURE_Driver_User_Guide for v4l2 capture.

and tried saLoopBack example

I get this error

root@dm814x-evm:/usr/bin# ./saLoopBack
failed to open capture device
Error in opening capture device for channel 0

saLoopBack tries to perform this functionality

/* Divert fbdev to dvo2 so that it does not do blending with display*/
system ("echo 1:dvo2 > /sys/devices/platform/vpss/graphics0/nodes");
/* Open the capture driver. Query the resolution from the capture driver
*/
ret = initCapture();
if (ret < 0) {
printf("Error in opening capture device for channel 0\n");
return ret;

Can someone throw light on this?

My lsmod data is this

root@dm814x-evm:/lib/modules/2.6.37/kernel/drivers/media/video# lsmod
Module Size Used by
tvp7002 6429 0
bufferclass_ti 4950 0
omaplfb 10794 0
pvrsrvkm 155618 2 bufferclass_ti,omaplfb
tlc59108 1545 0
ti81xxhdmi 17685 0
ti81xxfb 21979 2
vpss 74936 3 omaplfb,ti81xxhdmi,ti81xxfb
syslink 1133911 0
ipv6 214095 14

 

 

  • Hello,

    Subha Viswanathan said:
    I tried to run capture_encode_a8host_debug.xv5T for both composite and component but in vain.

    You should use a component input.

    What is the software release that you are using here? What is the command which you are using to execute the capture_encode demo? Are you using EVM or custom board?

    Please provide a debug log :

    http://processors.wiki.ti.com/index.php/OMX_Viewing_Media_Controller_Traces

    Subha Viswanathan said:

    Hence, I had followed the steps provided in this link

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_VIDEO_CAPTURE_Driver_User_Guide for v4l2 capture.

    and tried saLoopBack example

    When you are using saLoopBack demo have you load the load-hd-v4l2-firmware.sh?

    Best Regards,

    Margarita

  • Thanks for your reply. Please find my inputs inline.

    1. You should use a component input.

    [Subha] Yes Iam using Component Input (J10,J9,J8)

    2. What is the software release that you are using here? What is the command which you are using to execute the capture_encode demo? Are you using EVM or custom board?

    [Subha] Iam using DM814x Evaluation Module Board. The software version  is EZSDK 5_05_02_00 for the DM814x.

    These are the steps I followed before calling capture_encode

    /etc/init.d/matrix-gui-e stop

    /etc/init.d/pvr-init stop

    insmod /lib/modules/2.6.37/kernel/drivers/media/video/tvp7002
    .ko

    insmod /lib/modules/2.6.37/kernel/drivers/media/video/ti81xx/
    ti81xxvin.ko
    tvp7002 3-005d: tvp7002 found @ 0x5d (OMAP I2C adapter)
    omap_i2c omap_i2c.3: controller timed out
    omap_i2c omap_i2c.3: controller timed out
    omap_i2c omap_i2c.3: controller timed out
    omap_i2c omap_i2c.3: controller timed out
    omap_i2c omap_i2c.3: controller timed out
    tvp7002 3-005d: TVP7002 read error -110
    tvp7002: probe of 3-005d failed with error -110
    ti81xxvin ti81xxvin: Error registering v4l2 subdevice

     

    root@dm814x-evm:/lib/modules/2.6.37/kernel/drivers/media/video/ti81xx# lsmod
    Module                  Size  Used by
    ti81xxvin              20591  0
    tvp7002                 6429  0
    bufferclass_ti          4950  0
    omaplfb                10794  0
    pvrsrvkm              155618  2 bufferclass_ti,omaplfb
    tlc59108                1545  0
    ti81xxhdmi             17685  0
    ti81xxfb               21979  2
    vpss                   74936  4 ti81xxvin,omaplfb,ti81xxhdmi,ti81xxfb
    syslink              1133911  0
    ipv6                  214095  14

    3. When you are using saLoopBack demo have you load the load-hd-v4l2-firmware.sh?

    [Subha] I tried running  ./load-hd-v4l2-firmware.sh start.

    It hangs and I have to reset the board. Please find the attached video_capture.txt.. The  Bootup logs  does not Load "load-hd-v4l2-firmware.sh" but runs "load-hd-firmware.sh"

    4.Please provide a debug log :

    http://processors.wiki.ti.com/index.php/OMX_Viewing_Media_Controller_Traces

    [Subha] I  will send you in the next reply.

    Video_Capture.rtf
  • Hello,

    Steps to run capture encode  demo:

    root@dm814x-evm:~# /etc/init.d/matrix-gui-e stop
    Stopping Matrix GUI application.
    root@dm814x-evm:~# /etc/init.d/pvr-init stop
    Stopping PVR
    root@dm814x-evm:~# cd /usr/share/ti/ti-omx/
    root@dm814x-evm:/usr/share/ti/ti-omx# ./capture_encode_a8host_debug.xv5T < ... >

    Steps to run saLoopBack demo:

    root@dm814x-evm:~# /etc/init.d/matrix-gui-e stop
    Stopping Matrix GUI application.
    root@dm814x-evm:~# /etc/init.d/pvr-init stop
    Stopping PVR

    root@dm814x-evm:cd /usr/share/ti/ti-media-controller-utils/
    root@dm814x-evm:/usr/share/ti/ti-media-controller-utils# ./load-hd-firmware.sh stop

    root@dm814x-evm:/usr/share/ti/ti-media-controller-utils# ./load-hd-v4l2-firmware.sh start

    ./saLoopback

    Best Regards,

    Margarita

  • I tried your steps for saLoopBack

    The following is the error in saLoopback

    root@dm814x-evm:/usr/share/ti/ti-media-controller-utils# find / -iname saLoopBac
    k
    /usr/bin/saLoopBack
    root@dm814x-evm:/usr/share/ti/ti-media-controller-utils# cd /usr/bin
    root@dm814x-evm:/usr/bin# ./saLoopBack
    Driver Name: ti81xxvin
    Driver bus info: TI81xx Platform
    Driver is capable of doing capture
    sh: can't create /sys/devices/platform/vpss/display0/enabled: nonexistent directory
    saLoopBack:
     Mode set is 0
    Setting DV Preset failed

    Note, as you had mentioned stopping the load_hd_firmware.sh and starting load-hd-v4l2-firmware.sh was successful

    I am trying to capture the Video from "Settopbox component out" out into the component input of the EVM Board. saLoopBack does not talk about which output connection (composite??) I need to connect to check in the TV.

  • Hello,

    V4L2 nodes are:

    • V4L2 display nodes are /dev/video1, /dev/video2, /dev/video3
    • V4L2 capture nodes are /dev/video0, /dev/video4, /dev/video5 and /dev/video6.
    /dev/video1  -- => video0 -- => vcompmux  -- => hdmi_venc(display0)-> on_Chip_Hdmi output
    
    /dev/video2  -- => video1 -- => hdcompmux -- => dvo2_venc(display1)-> LCD Pannel or external dispaly device
    
    /dev/video3  -- => video2 -- =>   sdmux   -- => sd_venc(display2)-> SVIDEO output

    In saLoopBackc you have:

    /* device node to be used for capture */
    #define CAPTURE_DEVICE        "/dev/video0"
    #define CAPTURE_NAME        "Capture"
    /* device node to be used for display */
    #define DISPLAY_DEVICE        "/dev/video1"
    #define DISPLAY_NAME        "Display"

    Best Regards,

    Margarita

    
    

  • hi Margarita,

    i follow the steps and i can't make saLoopBack work. The error is something like:error in setting up buffers .can you help me?

    Best Regards!

    wang

  • Hello,

    Could you provide me the steps that you are executing before to run the saLoopBack demo?

    Could you provide information about resolution, how the video source is connected to the EVM etc.

    Could you post me the error which you are seeing in the console when you are executing the saLoopBack demo?

    Best Regards,

    Margarita

  • Hello,

    I'm so sorry that i cannot show my steps in detail,here is the printed message:

    Driver bus info: TI81xx Platform
    Driver is capable of doing capture
    saLoopBack:
    Mode set is 1080P60
    I2C No Ack

    Driver Name:
    Driver bus info: 锟?
    @@`
    =============================================================
    Capture Format:
    =============================================================
    fmt.type = 1
    fmt.width = 1920
    fmt.height = 1080
    fmt.pixelformat = 1448695129
    fmt.bytesperline = 3840
    fmt.sizeimage = 4147200
    =============================================================
    =============================================================
    Display Format:
    =============================================================
    fmt.type = 2
    fmt.width = 1920
    fmt.height = 1080
    fmt.pixelformat = 1448695129
    fmt.bytesperline = 3840
    fmt.sizeimage = 4147200
    =============================================================
    VPSS_GRPX : (0)- region(1920x1080) out of frame(800x480).
    Error writing variable information.
    : Invalid argument
    Error in setting up of Buffers

    i wanna know the correct configuration of running the video examples. i cannot find the diretion in the video and Vpss capture driver guides,what shall i do?

    Thanks  

  • Hello,

    It seems like display is set for 800X480 resolution(probably you tried to run it on LCD).


    You could try :

    1. In case you want to run it on LCD, change the resolution 1080P60 mode.

    2. In case you want to run it on HDMI, you should :

    root@dm814x-evm:~# cd /usr/share/ti/ti-media-controller-utils/
    root@dm814x-evm:/usr/share/ti/ti-media-controller-utils# ./change_display.sh hdmi
    ==== Changing default display to HDMI ====
    ==== Please reboot your board NOW! ====
    root@dm814x-evm:/usr/share/ti/ti-media-controller-utils# reboot

    root@dm814x-evm:~# /etc/init.d/matrix-gui-e stop
    Stopping Matrix GUI application.
    root@dm814x-evm:~# /etc/init.d/pvr-init stop
    Stopping PVR
    root@dm814x-evm:~# cd /usr/share/ti/ti-media-controller-utils/
    root@dm814x-evm:/usr/share/ti/ti-media-controller-utils# ./load-hd-firmware.sh stop
    root@dm814x-evm:/usr/share/ti/ti-media-controller-utils# ./load-hd-v4l2-firmware.sh start
    root@dm814x-evm:cd

    root@dm814x-evm:./saLoopBack

    Let me know if you need further details.

    Best Regards,

    Margarita

  • Hello,

    Thanks for your reply! i will test it later.

    By the way,could you give me some suggestions of learning the ioctl() function?

    Best Regards.

    Wang

  • Hello,

    user4183457 said:
    Thanks for your reply! i will test it later.

    Let me know the results.

    user4183457 said:
    By the way,could you give me some suggestions of learning the ioctl() function?

    Probably any book for Video For Linux Two will help you.

    I am not sure what you mean by learning this function.

    Best Regards,

    Margarita

  • Hello,

    i do follow the steps you offered yesterday,and i met the same error.Does that mean i need a video source which provide 800*480 resolution? Or i may modify the display part in the saLoopBack.c?

    Waiting!

    Thanks

    Wang

  • Hi Wang,

     

    Are you setting up the input buffer/frame buffer enough for 1080p frame? This has to be setup while inserting fbdev driver to the Kernel..

    Please make sure that the frame buffer size is enough for the display resolution. Otherwise it will give this error.

     

    Rgds,

    Brijesh

  • Hi Brijesh,

    Do you mean the index :insmod ti81xxfb.ko vram=0:40M,1:1M,2:1M 》? if not ,how can I set up the buffer size?

    Thanks a lot!

    Wang

  • Yes,

     

    Please see you have reserved 1MB for both the graphics 1 and 2, so if you are using grpx1 or 2 instance (fb1 or fb2), the memory will be insufficient for 1080p resolution. For Graphics0, fb0, memory is sufficient.

    Please check in the application which fb node, graphics layer, that you are using.

     

    Rgds,

    Brijesh