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.

How to setting TVP5158 2-Ch Line-Interleaved Mode

Other Parts Discussed in Thread: TVP5158, TVP7002

Dear Sir,

How to setting TVP5158 2-Ch Line-Interleaved Mode?

  • I am also curious on the settings for 2-CH, I am using the TVP5158 with the DM6467T and I have no idea on how they got the values for the 2-CH D1 mode on the MCVIP driver.

  • Hi Hyun,

    I have looked at that but I get this error that I can't figure out:

    ///////////////////////////////////////////////////BEGIN CODE/////////////////////////////////////////////////////////////

    root@dm6467t-evm:/opt/mcvip# ./mcvip_test.out NTSC WinVCC C1 no

    Multi Channel Video Input Port (MCVIP) Capture Demo, (c) Texas Instruments 2009

    USAGE: ./mcvip_test.out <videoSystem> <i2c Mode> <Cascade Mode> <Audio Mode>

    videoSystem = NTSC (default) or PAL
    i2c Mode = WinVCC or DM6467 (default)
    Cascade Mode = C1 (default), C2, C3 or C4
    Audio Mode = audio

    ===========================
    MCVIP Main Menu (NTSC mode)
    ===========================

    00: Start - 2Ch D1 - Port A (BT656 )
    01: Start - 2Ch D1 - Port B (BT656 )
    02: Start - 4Ch D1 (BT656 )
    03: Start - 4Ch Half-D1 (BT656 )
    04: Start - 4Ch CIF (BT656 )
    05: Start - 4Ch D1 (BT1120)
    06: Start - 4Ch Half-D1 (BT1120)
    07: Start - 8Ch Half-D1 (BT656 )
    08: Start - 8Ch CIF (BT656 )
    09: Start - 4Ch Half-D1 + D1 (BT656 )
    0a: Start - 4Ch CIF + D1 (BT656 )
    0b: Start - 8Ch CIF + D1 (BT656 )
    0c: Start - 4Ch Half-D1 CIF progressive (BT656 )
    0d: Start - 4Ch Half-D1 CIF progressive (BT1120)
    0e: Start - 8Ch Half-D1 CIF progressive (BT656 )
    10: Start - 2Ch D1 - Port A (BT656 ) CROP
    11: Start - 2Ch D1 - Port B (BT656 ) CROP
    12: Start - 4Ch D1 (BT656 ) CROP
    13: Start - 4Ch Half-D1 (BT656 ) CROP
    14: Start - 4Ch CIF (BT656 ) CROP
    15: Start - 4Ch D1 (BT1120) CROP
    16: Start - 4Ch Half-D1 (BT1120) CROP
    17: Start - 8Ch Half-D1 (BT656 ) CROP
    18: Start - 8Ch CIF (BT656 ) CROP
    19: Start - 4Ch Half-D1 + D1 (BT656 ) CROP
    1a: Start - 4Ch CIF + D1 (BT656 ) CROP
    1b: Start - 8Ch CIF + D1 (BT656 ) CROP
    1c: Start - 4Ch Half-D1 CIF progressive (BT656 ) CROP
    1d: Start - 4Ch Half-D1 CIF progressive (BT1120) CROP
    1e: Start - 8Ch Half-D1 CIF progressive (BT656 ) CROP

    x: Exit

    Enter Choice : 00

    input: 00
    MCVIP: Starting. Please wait !!!
    -----In vpif_open()-----
    -----In vpif_querycap()-----
    -----In vpif_enum_input()-----
    -----In vpif_enum_input()-----
    -----In vpif_s_input()-----
    -----In vpif_map_sub_device_to_input()-----
    subdev mapped: tvp5158
    vpif_capture.c: vpif_map_subdevice_input result: tvp5158
    vcmInputID: 0
    --------setup_vpif_input_path(0, tvp5158)------
    ----------Reached val |= TVP7002_INPUT--------
    ch->curr_subdev_info->name: tvp5158
    ch_curr_sd_index: 0
    -----In vpif_s_std()-----
    -----In vpif_update_std_info()-----
    -----In vpif_config_format()-----
    -----In tvp5158_setstd()-----
    Found a match: TVP5158_NTSC_06
    width: 720-----In vpif_s_fmt_vid_cap()-----

    height: 1050
    bytesperline: 73-----In vpif_check_format()-----
    6
    pixelformat: 1498831189
    fiel-----In vpif_release()-----
    d: 4
    sizeimage: 1545600
    ERROR (mcvip_v4l2.c|MCVIP_v4l2Create|159): Error setting input video format
    ERROR (capture_tsk.c|CAPTURE_tskCreate|90): MCVIP_create()
    ERROR (main.c|UI_sysStart|41): CAPTURE_create()
    MCVIP: System Exiting !!!
    MCVIP: Bye Bye !!!

    CMEM Error: CMEM_exit() already called, check stderr output for earlier CMEM failure messages (possibly version mismatch).

    //////////////////////////////////////////////////////////////END CODE///////////////////////////////////////////////////////

    I put alot of printk's in my vpif_capture.c. As you can see when it calls the ioctl(fd, VIDIOC_S_FMT, &fmt)  located in mcfip_v4l2.c it fails. That is why I ask where are you getting these values from for the NTSC_STD's (2-CH, 4-CH D1, ect....)?

    Eager for help!

    - Mark