• Not Answered

About v4l2 capture drvier in dm816x-evm5_03_01_15

Board:EVM8168
EZSDK:
hdvpss v4l2 frimware name: dm816x_hdvpss_v4l2.xem3
App:saLoopBack

I have a question about v4l2 capture drvier. I try to work tvp5147 on videoin1 , but not work.

Questions
1. Video standard of tvp5147 support NTSC/PAL. 1080P,1080I and 720P is not support.
   The capture driver support NTSC/PAL input ?

2. Tvp7002 was work on videoin0. Video output format is 20-bit 4:2:2 outputs with Embedded Syncs.
   Did the capture drvier support Separate Syncs ( Embedded Sync disabled ) ?
   Beause if tvp5147 is not work, I try to work SiI1161 device.

I refered DM81xx_AM38xx_Video_Capture_Driver_User_Guide.
The following support list is V4L2 capture driver supports following features.

Supports VIP0 instance of the VPSS.
Supports TVP7002 standard Linux sub device driver.
Supports YUV422 interleaved, YUV422 semiplanar, YUV420 semiplanar and RGB888 color formats to memory.
Supports scaling and cropping for YUV formats (downscaling only)
Supports 1080P60, 1080P30, 1080I60 and 720P60 input resolutions.
Supports user pointer buffer mechanism of the V4L2 driver interface.

 

17 Replies

  • Hi,

    Answers inline

    Masaki Hayakawa
    I have a question about v4l2 capture drvier. I try to work tvp5147 on videoin1 , but not work.

    We have not tested TVP5147 with V4L2 capture driver. Although code is present. You also have to do mux settings to select between TVP7002 and TVP5147 for getting the data to VIP. Further you have to use /dev/video2 node for VIN1.

    Masaki Hayakawa
    Video standard of tvp5147 support NTSC/PAL. 1080P,1080I and 720P is not support.
       The capture driver support NTSC/PAL input ?

    Yes, We have coded capture driver keeping TVP5147 support in mind. But since its never tested it may have bugs.

    Masaki Hayakawa
    Tvp7002 was work on videoin0. Video output format is 20-bit 4:2:2 outputs with Embedded Syncs.
       Did the capture drvier support Separate Syncs ( Embedded Sync disabled ) ?
       Beause if tvp5147 is not work, I try to work SiI1161 device.

    Yes, VIP can work in discrete as well as embedded sync. But there is errata for DM816x for discrete sync of operation. Please look at advisory 1.1.10 for discrete sync. I dont think SII1161 will be able to take care of errata. So you need to work with embedded syncs only.

    Regards,

    Hardik Shah

  • In reply to HardikShah:

    Hi, Thank you for quick reply. I have two quessions.

    No.1 About video_if_mode
    In case of embedded syncs mode, tvp5147m1 supports 10-bit-bit ITU-R BT.656 4:2:2 YCbCr with embedded syncs mode only. 
    The v4l2 drvier of tvp514x is default settings.
    I tried to confirm this settings.
    The capture driver supported VPS_CAPT_VIDEO_IF_MODE_8BIT ?
    Because I confirmed camera input image on VPS_CAPT_VIDEO_IF_MODE_16BIT setting (picture1.jpg).

    I confirmed the following process.
    1. I chagned arch/arm/mach-omap2/ti81xx_fb.c
       I changed structure number one of hdvpss_capture_sdev_info.
      
       .name = "tvp514x",
      .board_info = {
       /* TODO Find the correct address
       I2C_BOARD_INFO("tvp5147m1", 0x5c),
       .platform_data = &tvp5147_pdata,
      },
       :
      .video_if_mode = VPS_CAPT_VIDEO_IF_MODE_8BIT, // for 10bit embedded syncs
     
    2.I changed drivers/ti81xx/ti81xx_main.c
      I registered two hdvpss_capture_sdev_info for tvp514x driver.

    3.The boot messege
      I could register tvp514x device with capture driver.
    tvp514x 1-005c: tvp514x 1-005c decoder driver registered !!
    tvp514x 1-005c: tvp5147m1 (Version - 0x07) found at 0xb8 (OMAP I2C adapter)
    ti81xxvin ti81xxvin: registered sub device tvp514x
    ti81xxvin ti81xxvin: TI81xx HDVPSS Capture driver initialized

    4.I executed saLoopBack
      I converted /dev/video0 to /dev/video5 for videoin1.
      I added S_INPUT, S_STD and QUERYSTD of ioctl for NTSC output.

     # echo 0 > /sys/devices/platform/vpss/graphics0/enabled
     # ./saLoopBack
     
     Nothing is HDMI Display (picture2.jpg).

    No.2 About the decrete sync mode
    Did you work the decrete sync mode on tvp7002 device ?
    Prograssive mode is work ?

    I refered errota number Advisiory 2.0.62.

    picture1.jpg

    picutre2.jpg

  • In reply to Masaki Hayakawa:

    We too are trying to use the TVP5147.

    We've repeated step one above:

    1. I chagned arch/arm/mach-omap2/ti81xx_fb.c
       I changed structure number one of hdvpss_capture_sdev_info.
      
       .name = "tvp514x",
      .board_info = {
       /* TODO Find the correct address
       I2C_BOARD_INFO("tvp5147m1", 0x5c),
       .platform_data = &tvp5147_pdata,
      },
       :
      .video_if_mode = VPS_CAPT_VIDEO_IF_MODE_16BIT, //I've left it in 16 bit

    we noticed that we needed to duplicate the structure

    struct ti81xxvin_interface tvp7002_pdata = ...

    we created

    struct ti81xxvin_interface tvp5147_pdata = ...

    We do not understand step 2

    2.I changed drivers/ti81xx/ti81xx_main.c
      I registered two hdvpss_capture_sdev_info for tvp514x driver.

    ti81xx_main.c does not exist. What file do you mean?

    Also why are you registering two devices?

    What steps did you take to register the device?

    Step 3

    We boot and insert the modules however upon inserting

    ...

    # insmod tvp514x.ko

    # insmod ti81xxvin.ko

    we get

    tvp514x 2-005c: tvp514x 2-005c decoder driver registered !!

    tvp514x 2-005c: chip id mismatch msb 0x0 lsb 0x0

    tvp514x 2-005c: Unable to detect decoder

    tvp514x 2-005c: Unable to query std

    Why do we get a  chip id mismatch?

     

    Thank you,

    Chris

  • In reply to Christopher Iacuzzo:

    Chris, you get a chip mismatch because the wrong I2C bus is being scanned. TI have hardcoded the I2C adapter number instead of making it configurable. You can see the code marked as a "TODO" in the Linux kernel source, line 2512 of file drivers/media/video/ti81xx/ti81xxvin_main.c:

       /* TODO Get the proper adapter id */
        if (cpu_is_ti814x())
            i2c_adap = i2c_get_adapter(3);
        else if (cpu_is_ti816x())
            i2c_adap = i2c_get_adapter(2);
        else
            i2c_adap = i2c_get_adapter(2);

    The TVP5147 chip is on I2C bus number 1, so simply change the relevant line to say i2c_get_adapter(1) instead. This at least makes the VPSS subsystem detect the chip, at the expense of knocking out everything on I2C bus number 2.

    The proper fix for this would probably be to implement an integer "adapter" field in the ti81xxvin_subdev_info structure. We might have to do this ourselves as TVP5147 support is essential for us. If there is interest I might put together a fork of the kernel somewhere, as it seems many people need TVP5147 support.

    Best regards,

    Peter.

  • In reply to Peter Millerchip:

    Hello Peter,

    I know I would really appreciate a copy of the working kernel for TVP5147 support as it is proving difficult to get it to work.

    -Roberto

  • In reply to Roberto Borja:

    Hi Roberto,

    My current set of kernel patches for TVP5147 are here: http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/191420.aspx

    It detects the chip and GStreamer manages to go the the PLAYING state, but it doesn't stream video properly yet - it gets the error "VPSS_FVID2: create handle is NULL" when trying to stream video from the chip. I don't know enough to fix that problem, but if you have more luck than me then please post patches!

    TI employees: Can someone PLEASE let us know why this isn't working and when you will provide support for the TVP5147?

    As an aside, I also have a set of patches that makes the TVP7002 support PAL 576i component video successfully. If anyone needs them I can post them. However, this doesn't help us as we need to support 576i composite video, and TI's lack of response on this issue is extremely worrying for us.

    Peter.

  • In reply to Peter Millerchip:

    How are you running the video to get that error? And what video are you streaming?  Sorry I took so long to reply, I had to add the patches by hand since our code didn't match up and then I ran into problems compiling everything.

  • In reply to Peter Millerchip:

    Peter Millerchip
    The proper fix for this would probably be to implement an integer "adapter" field in the ti81xxvin_subdev_info structure. We might have to do this ourselves as TVP5147 support is essential for us. If there is interest I might put together a fork of the kernel somewhere, as it seems many people need TVP5147 support.

    We are planning this. I2C adapter will be part of each subdevice, so that each subdevice can be on different I2C bus.

    Regards,

    Hardik Shah

  • In reply to HardikShah:

    Hardik: That's great news, do you know when this will be finished and available?

    Roberto: We just tried streaming from a standard SD PAL-format camera attached to the composite video input of the TVP5147. If you can get that working then please let us all know!

  • In reply to Peter Millerchip:

    Is there any timeline on when TVP5147 support will be available? There seems to be enough interest in it and TI seems to be looking at adding support for most of 2012 or so..any chance it's going to happen sometime this year?