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.

CVBS input capture issue - EVM3530/3730 board

Other Parts Discussed in Thread: TVP5146M2, TVP5146, DM3730

We want to capture Composite video signal connected to CVBS input. Our board is TI's EVM3530/3730 Rev D (hynix) processor module on Mistral EVM main board (Rev G).
Kernel is configured as per "UserGuideOmap35xCaptureDriver PSP 04.02.00.07" document. config file is attached.
We tried with both saUserPtrLoopback and saMmapLoopback sample applications to capture composite video signal but failed.
It appears that camera input is selected by default.
Do we need to set three GPIOs (T2_GPIO2, T2_GPIO8, GPIO_157) to select the video input options before we run those sample applications ?
Is there any userspace pinmux utility available so that we can set/reset those GPIO pins as per need ?

SDK     : AM37xSDK_05_02_00_00
kernel  : psp04.02.00.07 (kernel 2.6.37)

root@am37x-evm:~# saUserPtrLoopback -i 0 -s 0

Media: Opened Media Device
Enumerating media entities
[1]:OMAP3 ISP CCP2
[2]:OMAP3 ISP CCP2 input
[3]:OMAP3 ISP CSI2a
[4]:OMAP3 ISP CSI2a output
[5]:OMAP3 ISP CCDC
[6]:OMAP3 ISP CCDC output
[7]:OMAP3 ISP preview
[8]:OMAP3 ISP preview input
[9]:OMAP3 ISP preview output
[10]:OMAP3 ISP resizer
[11]:OMAP3 ISP resizer input
[12]:OMAP3 ISP resizer output
[13]:OMAP3 ISP AEWB
[14]:OMAP3 ISP AF
[15]:OMAP3 ISP histogram
[17]:tvp514x 3-005c
[17]:tvp514x 3-005c
Total number of entities: 17
Enumerating links/pads for entities
pads for entity 1=(0 INPUT) (1 OUTPUT)
[1:1]===>[5:0]  INACTIVE

pads for entity 2=(0 OUTPUT)
[2:0]===>[1:0]  INACTIVE

pads for entity 3=(0 INPUT) (1 OUTPUT)
[3:1]===>[4:0]  INACTIVE
[3:1]===>[5:0]  IN[  190.862670] tvp514x 3-005c: tvp5146m2 (Version - 0x03) found at 0xb8 (OMAP I2C adapter)
ACTIVE

pads for entity 4=(0 INPUT)

pads for entity 5=(0 INPUT) (1 OUTPUT) (2 OUTPUT)
[5:1]===>[6:0]  INACTIVE
[5:2]===>[7:0]  INACTIVE
[5:1]===>[10:0] INACTIVE
[5:2]===>[13:0] ACTIVE
[5:2]===>[14:0] ACTIVE
[5:2]===>[15:0] ACTIVE

pads for entity 6=(0 INPUT)

pads for entity 7=(0 INPUT) (1 OUTPUT)
[7:1]===>[9:0]  INACTIVE
[7:1]===>[10:0] INACTIVE

pads for entity 8=(0 OUTPUT)
[8:0]===>[7:0]  INACTIVE

pads for entity 9=(0 INPUT)

pads for entity 10=(0 INPUT) (1 OUTPUT)
[10:1]===>[12:0]        INACTIVE

pads for entity 11=(0 OUTPUT)
[11:0]===>[10:0]        INACTIVE

pads for entity 12=(0 INPUT)

pads for entity 13=(0 INPUT)

pads for entity 14=(0 INPUT)

pads for entity 15=(0 INPUT)

pads for entity 17=(0 OUTPUT)
[17:0]===>[5:0] INACTIVE

pads for entity 17=(0 OUTPUT)
[17:0]===>[5:0] INACTIVE

Enabling link [tvp5146]===>[ccdc]
[tvp514x]===>[ccdc]     enabled
Enabling link [ccdc]===>[video_node]
[ccdc]===>[video_node]  enabled
Capture: Current Input: camera
Capture: Input changed to: camera
Capture: Current standard: PAL

Mem-Allocator: Opened Channel
Display: Number of requested buffers = 6
Display: Init done successfully


Display: Opened Channel
Display: Capable of streaming
Displ[  191.322692] DMA transaction error with device 0
ay: Number of requested buffers = 4
Display: Init done successfully

successfully format is set on all pad [WxH] - [720x576]
Capture: Capable of streaming
Capture: Number of requested buffers = 6
VIDIOC_QBUF: Bad address

Media: Opened Media Device
Resetting all links...


root@am37x-evm:~# saMmapLoopback -i 0

Media: Opened Media Device
Enumerating media entities
[1]:OMAP3 ISP CCP2
[2]:OMAP3 ISP CCP2 input
[3]:OMAP3 ISP CSI2a
[4]:OMAP3 ISP CSI2a output
[5]:OMAP3 ISP CCDC
[6]:OMAP3 ISP CCDC output
[7]:OMAP3 ISP preview
[8]:OMAP3 ISP preview input
[9]:OMAP3 ISP preview output
[10]:OMAP3 ISP resizer
[11]:OMAP3 ISP resizer input
[12]:OMAP3 ISP resizer output
[13]:OMAP3 ISP AEWB
[14]:OMAP3 ISP AF
[15]:OMAP3 ISP histogram
[17]:tvp514x 3-005c
[17]:tvp514x 3-005c
Total number of entities: 17
Enumerating links/pads for entities
pads for entity 1=(0 INPUT) (1 OUTPUT)
[1:1]===>[5:0]  INACTIVE

pads for entity 2=(0 OUTPUT)
[2:0]===>[1:0]  INACTIVE

pads for entity 3=(0 INPUT) (1 OUTPUT)
[3:1]===>[4:0]  INACTIVE
[3:1]===>[5:0]  INACTIVE

pads for entity 4=(0 INPUT)

pads for entity 5=(0 INPUT) (1 OUTPUT) (2 OUTPUT)
[5:1]===>[6:0]  INACTIVE
[5:2]===>[7:0]  INACTIVE
[5:1]===>[10:0] INACTIVE
[5:2]===>[13:0] ACTIVE
[5:2]===>[14:0] ACTIVE
[5:2]===>[15:0] ACTIVE

pads for entity 6=(0 INPUT)

pads for entity 7=(0 INPUT) (1 OUTPUT)
[7:1]===>[9:0]  INACTIVE
[7:1]===>[10:0] INACTIVE

pads for entity 8=(0 OUTPUT)
[8:0]===>[7:0]  INACTIVE

pads for entity 9=(0 INPUT)

pads for entity 10=(0 INPUT) (1 OUTPUT)
[10:1]===>[12:0]        INACTIVE

pads for entity 11=(0 OUTPUT)
[11:0]===>[10:0]        INACTIVE

pads for entity 12=(0 INPUT)

pads for entity 13=(0 INPUT)

pads for entity 14=(0 INPUT)

pads for entity 15=(0 INPUT)

pads for entity 17=(0 OUTPUT)
[17:0]===>[5:0] INACTIVE

pads for entity 17=(0 OUTPUT)
[17:0]===>[5:0] INACTIVE

Enabling link [TVP514x]===>[ccdc]
[TVP514x]===>[ccdc]     enabled
Enabling link [ccdc]===>[video_node]
[ccdc]===>[video_node]  enabled
Capture: Current Input: camera
Capture: Input changed to: camera
Capture: Current standard: PAL
failed to open /dev/v4l-subdev9

Media: Opened Media Device
Resetting all links...

  • Avijit,

    Can you share the kernel boot log and your bootargs? It would help us in identifying the root cause of the issue.

    Thanks.

     

  • Anuj,

    I have pasted bootargs here and attached dmesg log.

    U-Boot 2010.06 (Jul 06 2011 - 14:01:34)

    OMAP34xx/35xx-GP ES2.1, CPU-OPP2 L3-165MHz
    OMAP3 EVM board + LPDDR/NAND
    I2C:   ready
    DRAM:  256 MiB
    NAND:  HW ECC [Kernel/FS layout] selected
    512 MiB
    In:    serial
    Out:   serial
    Err:   serial
    Read back SMSC id 0x92200000
    Die ID #1b2a00029ff80000015f02690c018013
    Net:   smc911x-0
    Hit any key to stop autoboot:  0
    OMAP3_EVM #
    OMAP3_EVM # pri
    bootdelay=10
    baudrate=115200
    loadaddr=0x82000000
    usbtty=cdc_acm
    console=ttyO0,115200n8
    dieid#=1b2a00029ff80000015f02690c018013
    ethact=smc911x-0
    bootcmd=tftpboot 0x80000000 uImage; bootm
    bootfile=uImage
    ipaddr=10.135.0.32
    serverip=10.135.0.13
    nfshost=10.135.0.13
    bootargs=mem=256M console=ttyO0,115200n8 noinitrd ip=dhcp rw root=/dev/nfs, nfsroot=10.135.0.13:/home/avijit/elfs/target/mistral_am35x-37x/workdir/dev_rootfs_ti_37, nolock mpura
    te=1000 vram=10M omapfb.vram=0:4M,1:3M,2:3M omap_vout.vid1_static_vrfb_alloc=y omapfb.mode=dvi:800x600MR-32@60 omapdss.def_disp=dvi consoleblank=0
    stdin=serial
    stdout=serial
    stderr=serial

  • Can you check the correct device node for TVP5146 device? Please note that device node gets created dynamically based on the number of devices/modules available in the system at given point of time.

     

    Thanks,

    Vaibhav

  • Got it working with dvsdk_4_00_00_17 / PSP_03.00.01.06 (kernel 2.6.32 ) with the same Mistral board. Regarding device node, I will look into it and get back to you soon.

    Regards,

    Avijit



  • Avijit,

    Could you please test this loopback example with the pre-built binaries released in SDK5.02/PSP_04.02.00.07?

    SDK 5.02: http://software-dl.ti.com/dsps/dsps_public_sw/am_bu/sdk/AM37xSDK/latest/index_FDS.html

    Regards, Punya

  • Hi Punya,

    We tried with pre-built binary from  /AM37xSDK_05_02_00_00/filesystem/usr/bin/saMmapLoopback path.

    Also tried with our local build from /AM37xSDK_05_02_00_00/example-applications/av-examples-1.0/ path.

    As because it is working fine with the dvsdk_4_00_00_17 (PSP_03.00.00.05), so the issue is kept on lower priority.

    We are currently working on graphics and video plane blending  applications.

    Thank you

    Regards,

    Avijit

     

  • Hi,

        I have met with the same issue, I developed under dvsdk_dm3730_04_03_00_06 and similar with DM3730EVM board.

    Best regards

    everest.zhang

  • You have to use correct device node for tvp5146 decoder driver, I would recommend you to refer sysfs entries to conform the device node attached and use it in the application.

    in case of saMmapLoopback.c and saUserptrLoopback.c, if I remember correctly, it has been created and tested considering both sensor and tvp5146 input available on the board. you will find the code-snippet

    /* Default to tvp5146 */
    if (media->input_source != 0)
        strcpy(subdev, "/dev/v4l-subdev8");
    else
        strcpy(subdev, "/dev/v4l-subdev9");

    Can you change it "subdev8", i believe you do not have subdev9 in your usecase?

    Thanks,

    Vaibhav

  • Hi Vaibhav,

        Thank for your input.

        I have fixed this issue partly last night. My modification is: "#define IMG_HEIGHT_PAL  576" in the file of saMmapLoopback.c, I don't know why the default value is 574.

        Now I can see video loopback from DVI monitor, but I found the brightness or contrast is very low, the video loopback looks very dark, and I compared with  the old version dvsdk_dm3730_04_02_00_06, all tvp514x's register settings are the same values, the old version looks very good. I don't know whether there are some other place I need to adjust.

        In addition, if I use saUserPtrLoopback example, system will print the followings error information and run fail:

    Media: Opened Media Device
    Enumerating media entities
    [1]:OMAP3 ISP CCP2
    [2]:OMAP3 ISP CCP2 input
    [3]:OMAP3 ISP CSI2a
    [4]:OMAP3 ISP CSI2a output
    [5]:OMAP3 ISP CCDC
    [6]:OMAP3 ISP CCDC output
    [7]:OMAP3 ISP preview
    [8]:OMAP3 ISP preview input
    [9]:OMAP3 ISP preview output
    [10]:OMAP3 ISP resizer
    [11]:OMAP3 ISP resizer input
    [12]:OMAP3 ISP resizer output
    [13]:OMAP3 ISP AEWB
    [14]:OMAP3 ISP AF
    [15]:OMAP3 ISP histogram
    [17]:tvp514x 2-005d
    [17]:tvp514x 2-005d
    Total number of entities: 17
    Enumerating links/pads for entities
    pads for entity 1=(0 INPUT) (1 OUTPUT)
    [1:1]===>[5:0]  INACTIVE

    pads for entity 2=(0 OUTPUT)
    [2:0]===>[1:0]  INACTIVE

    pads for entity 3=(0 INPUT) (1 OUTPUT)
    [3:1]===>[4:0]  INACTIVE
    [3:1]===>[5:0]  INACTIVE

    pads for entity 4=(0 INPUT)

    pads for entity 5=(0 INPUT) (1 OUTPUT) (2 OUTPUT)
    [5:1]===>[6:0]  ACTIVE
    [5:2]===>[7:0]  INACTIVE
    [5:1]===>[10:0] INACTIVE
    [5:2]===>[13:0] ACTIVE
    [5:2]===>[14:0] ACTIVE
    [5:2]===>[15:0] ACTIVE

    pads for entity 6=(0 INPUT)

    pads for entity 7=(0 INPUT) (1 OUTPUT)
    [7:1]===>[9:0]  INACTIVE
    [7:1]===>[10:0] INACTIVE

    pads for entity 8=(0 OUTPUT)
    [8:0]===>[7:0]  INACTIVE

    pads for entity 9=(0 INPUT)

    pads for entity 10=(0 INPUT) (1 OUTPUT)
    [10:1]===>[12:0]        INACTIVE

    pads for entity 11=(0 OUTPUT)
    [11:0]===>[10:0]        INACTIVE

    pads for entity 12=(0 INPUT)

    pads for entity 13=(0 INPUT)

    pads for entity 14=(0 INPUT)

    pads for entity 15=(0 INPUT)

    pads for entity 17=(0 OUTPUT)
    [17:0]===>[5:0] ACTIVE

    pads for entity 17=(0 OUTPUT)
    [17:0]===>[5:0] ACTIVE

    Enabling link [tvp5146]===>[ccdc]
    [tvp514x]===>[ccdc]     enabled
    Enabling link [ccdc]===>[video_node]
    [ccdc]===>[video_node]  enabled
    Capture: Current Input: camera
    [49535.526428] tvp514x 2-005d: tvp5146m2 (Version - 0x03) found at 0xba (OMAP I2C adapter)
    Capture: Input changed to: camera
    Capture: Current standard: PAL

    Mem-Allocator: Opened Channel
    Display: Number of requested buffers = 6
    Display: Init done successfully


    Display: Opened Channel
    Display: Capable of streaming
    Display: Number of requested buffers = 6
    Display: Init done successfully

    successfully format is set on all pad [WxH] - [720x576]
    Capture: Capable of streaming
    Capture: Number of requested buffers = 6
    VIDIOC_QBUF: Bad address

    Media: Opened Media Device
    Resetting all links...

     

    Best regards

    everest.zhang