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.

Getting 816x_RDK's McFW to use the EVM's TVP7002 (not just RDK's TVP5158)

Other Parts Discussed in Thread: TVP5158, TVP7002

I've been struggling to get video-in workign on the 8161EVM and have noticed that the DRV-RDK's McFW (Multi-Channel-Framework) "usecases" only supports the TVP5158 (as found on the UDWorks RDK board) and not the TVP7002 found on the EVM.

If this is true, then it would appear that without re-writing a major part of McFW to speak I2C to the 7002, it is not capable of running on the EVM.

Perhaps someone here could confirm / deny this? 

  • David,

    DVR RDK has not been validated on 8161EVM. It has been validated only on selected DM81xx EVMs / DVRs having TVP5158. You are correct that there needs a modification to validate this on EVMs with TVP7002. The modification is not very complex and you have examples of other devices to refer.

    I request you to have a look at dvr_rdk\mcfw\src_linux\devices and dvr_rdk\mcfw\src_linux\osa\src\osa_i2c.c This will give you idea how i2c is used from A8 to control  devices similar to TVP7002.

     

     

  • Thank you Yogesh for your pointer to the examples. I had found the short app note, but the code in "mcfw/src_linux/devices/" is certainly helpful. 

    Also, my apologies for the minor typo, I am using a revG 816x EVM (not a 8161) with the "I/O Daughter Card". Closer inspection shows that the "I/O" card has some TVP7002's on it and a search of the forums seem to highlight that only the TVP5158 is supported "out of the box" with something called the "VS expansion card" or the dvr-rdk hardware (which we've been using so far without issue).

  • OK. Not an issue. I was bit worried about this unknown part 8161 :-).

  • Hi David,

    I intend to do same things, and I also want to work with RDK on DM8168 EVM platform with tvp7002. The thing is that it seems that the source code (RDK 3.0) already have the driver to work with tvp7002, and that there is some preparations for it to work, but I do not know if it was tested on any platform (which has tvp7002). Anyway, If you have some progress with this task, please update in the forum, I will also give my updates for the Netra's community...

    Thanks,

    Ran

  • Hi Ran,

    Agreed. Although the McFW source-base  (/mcfw/src_linux/devices/src/devices.c) has some skeleton for the TVP7002 (DEVICE_VID_DEV_TVP7002_DRV) there is no device (i.e. /mcfw/src_linux/devices/tvp7002) present even thought the 818x_EVM's 'i/o expantion card' has a 2x TVP7002!?  Reading one of the AppNote's, it seems that a I2C driver will have to be written.

    Regards,
    --Leon

  • Yes,

    I2C driver needs to be written for TVP7002, since MCFW is designed for VS expansion card it doesnt support  TVP7002, you will be able to find datasheet for TVP7002 here and there is open source driver of TVP70002 available in Linux kernel at $kernel/drivers/media/video/tvp7002.c. you can take reference of that as well.

  • Hi,

    Did anyone able to capture using TVP7002 video decoder chip on DVR-RDK for DM8168 EVM ?

    Thanks in advance,

    Shabbir Limdiwala

  • Hi Shabbir,

     

    Well Capture link in RDK does support TVP7002, may be few changes are required and also you will need to set the TVP7002 register in the RDK code. You can also follow below link

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/239401/837933.aspx#837933

     

    Regards,

    Brijesh Jadav

  • Hi Brijesh,

    I am using DVR-RDK3.50.00.05. My base board is DM8168 EVM.

    I have configured TVP7002 from A8 though i2c. We have verified that 16 bit, embedded sync 720p video is coming on VIP0 capture port.

    Now I want to run capture->display demo provided in DVR-RDK. So what are the changes i need to make in this demo to capture 720p video ?

    Do I need to make any change in capture driver (BIOS Source) or change in application would be enough ?

    Thanks,

    Shabbir Limdiwala

  • Hi Shabbir,

     

    There is no need to change hte BIOS driver, driver already supports interface for configuring Video port for 16bit embedded sync format. So You just need to provide this configuration from the application.

     

    Regards,

    Brijesh Jadav

     

  • Hi Brijesh,

    You mean to say I don't need make any changes in DVRRDK_03.50.00.05/ti_tools/hdvpss/dvr_rdk_hdvpss/packages/ti/psp/vps/drivers/capture ? right ?

    Do I need to modified DVRRDK_03.50.00.05/dvr_rdk/mcfw/src_bios6/links_m3vpss/capture this code which may be applications running on bios6 ?

    Thanks,

    Shabbir Limdiwala

  • Hi Shabbir,

     

    You are right for the both the questions...

     

    Regards,

    Brijesh Jadav

  • Hi Shabir,

    Did you succeed with capturing 16-bit of tvp7002, with RDK ? If yes - can you post the changes you've made ?

    We are on point where we try to use RDK 3.5 on custom board using FPGA, and we struggle on it.

    Any ideas for debug or changes that should be made are appreciated,

     

    Ran

  • Hi Ran,

    No change required in capture driver or any bios6 source for capture. You have to make sure that you are getting YUV frames in 16-bit embedded sync mode on capture port (VIP0 or VIP1). You have to make few changes in MCFW application like,

    1. Set enableConfigExtVideoDecoder to FALSE

    2. Make sure SYSTEM_USE_VIDEO_DECODER is undefined

    3. capturePrm.numVipInst

    4. pCaptureInstPrm->vipInstId

    5. pCaptureInstPrm->videoDecoderId (any other than SYSTEM_DEVICE_VID_DEC_TVP5158_DRV)

    6. pCaptureInstPrm->standard

    7. Comment all tvp5158 configuration

    Regards,

    Shabbir Limdiwala

  • Dear Yogesh:

           I am trying to use TVP7002 with DVR RDK. My base board is DM8168EVM with DRVVRD4.0

          as mentioned above , I tried to implement the device for tvp7002 in McFW , Just like tvp5158, I re_write the following methods:

           Device_Handle Device_tvp7002Create(UInt32 drvId,
                                         UInt32 instId,
                                         Ptr createArgs,
                                         Ptr createStatusArgs);
           Int32 Device_tvp7002Delete(Device_Handle handle, Ptr deleteArgs);
           Int32 Device_tvp7002Control(Device_Handle handle,
                                    UInt32 cmd,
                                    Ptr cmdArgs,
                                    Ptr cmdStatusArgs);

        I found the three methods is implemented in tvp5158, and are seem to be used by A8 to create the device.

       In the demo  " 6: VCAP + VENC + VDEC + VDIS  - Progressive HD+SD Encode + Decode  " which mainly  start with  dvr_rdk/mcfw/src_linux/mcfw_api/usecases/ti816x/multichhdsd_vcap_venc_vdis.c ,  I hava changed these tvp5158 devices to tvp7002 like:

     UInt32 tvp_i2c_addr = Device_getVidDecI2cAddr(DEVICE_VID_DEC_TVP5158_DRV,0);

     ----> UInt32 tvp_i2c_addr = Device_getVidDecI2cAddr(DEVICE_VID_DEC_TVP7002_DRV,0);

      here is the run log:

    ThreadName:Vdis_hdmiControlThread_0,ThreadID:635
     [host] HDMI Ctrl :Initialized
     
     Enable file write (YES - y / NO - n) :
     
     File write DISABLED !!!
     
    ------------   set the  ipcBitsSetFileExtension: h264 ----------
    [HOST]
    ThreadName:VcapVencVdecVdis_ipcBitsRecvFxn,ThreadID:636


     AUDIO: Do you enable Audio <Y/N>: n
     [FBDEV]
     [FBDEV] FB: Starting !!!
     [FBDEV] FB: Opened device [/dev/fb0] (fd=24) !!!
     [FBDEV]
     [FBDEV] Fix Screen Info
     [FBDEV] ---------------
     [FBDEV] Line Length - 2560
     [FBDEV] Physical Address = 8e600000
     [FBDEV] Buffer Length = 8388608
     [FBDEV]
     [FBDEV]
     [FBDEV] Var Screen Info
     [FBDEV] ---------------
     [FBDEV] Xres - 1280
     [FBDEV] Yres - 720
     [FBDEV] Xres Virtual - 1280
     [FBDEV] Yres Virtual - 720
     [FBDEV] Bits Per Pixel - 16
     [FBDEV] Pixel Clk - 6734
     [FBDEV] Rotation - 0
     [FBDEV]
     [FBDEV]
     [FBDEV] Reg Params Info
     [FBDEV] ---------------
     [FBDEV] region 0, postion 0 x 0, prioirty 1
     [FBDEV] first 1, last 1
     [FBDEV] sc en 0, sten en 0
     [FBDEV] tran en 0, type 0, key 0
     [FBDEV] blend 0, alpha 0
     [FBDEV] bb en 0, alpha 0
     [FBDEV]
     [FBDEV]
     [FBDEV] ### BUF SIZE = 1843200 Bytes !!!
     [FBDEV]
     [FBDEV]
     [FBDEV] Fix Screen Info
     [FBDEV] ---------------
     [FBDEV] Line Length - 2560
     [FBDEV] Physical Address = 8e600000
     [FBDEV] Buffer Length = 8388608
     [FBDEV]
     [FBDEV]
     [FBDEV] Var Screen Info
     [FBDEV] ---------------
     [FBDEV] Xres - 1280
     [FBDEV] Yres - 720
     [FBDEV] Xres Virtual - 1280
     [FBDEV] Yres Virtual - 720
     [FBDEV] Bits Per Pixel - 16
     [FBDEV] Pixel Clk - 6734
     [FBDEV] Rotation - 0
     [FBDEV]
     [FBDEV]
     [FBDEV] Reg Params Info
     [FBDEV] ---------------
     [FBDEV] region 0, postion 0 x 0, prioirty 1
     [FBDEV] first 1, last 1
     [FBDEV] sc en 0, sten en 0
     [FBDEV] tran en 0, type 0, key 0
     [FBDEV] blend 0, alpha 0
     [FBDEV] bb en 0, alpha 0
     [FBDEV]
     [FBDEV]
     [FBDEV] ### BUF SIZE = 1843200 Bytes !!!
     [FBDEV]
     [FBDEV] grpx_fb_draw ...
     [FBDEV] grpx_fb_draw ... Done !!!
     [FBDEV] FB: Start DONE !!!
     [FBDEV]
    [HOST]
    ThreadName:Scd_bitsWriteMain_0,ThreadID:637

    ********* Entered usecase HdSdDvr <816x> Cap/Enc/Dec/Dis

     ------------- trying to detectBoard ---------
     2811: MCFW  : CPU Revision [ES2.0] !!!
     -------------  Board - detected   --------
    twl_i2c_addr = 0x0 , tvp_i2c_addr = 0x5d
    status = -1 DEVICE_TW2968_REG_DEVICE_ID not found
    status = 0 regValue[0] = 0x67 , regValue[1] = 0x20

    TVP_CHIP_ID_READ:0x6720


    multich_hdsddvr_get_videodecoder_device_id = DEVICE_VID_DEC_TVP7002_DRV( 1025 )
    VCAP: DEVICE-0 (0x5d): Chip ID 0x7002, Rev 0x0002, Firmware 0x0000 !!!
    VCAP: DEVICE-0 (0x5d): Detected video (0x0@0Hz, 93) !!!
    VCAP: DEVICE-1 (0x00): Device not found !!!
    VCAP: DEVICE-2 (0x5c): Chip ID 0x7002, Rev 0x0002, Firmware 0x0000 !!!
    VCAP: DEVICE-2 (0x5c): Detected video (0x0@0Hz, 93) !!!
    VCAP: DEVICE-3 (0x00): Device not found !!!

    status = -1 multich_hdsddvr_configure_extvideodecoder_prm() ---- done
    -----------set  Capture Link  --------change    pCaptureInstPrm->videoDecoderId  = 1025;
     [m3vpss ]  16612: CAPTURE: Create in progress !!!
     [m3vpss ]  16642: CAPTURE: VIP0 PortA capture mode is [ 8-bit, Non-mux Embedded Sync] !!!
     [m3vpss ] CAPTURE:Create args numBufsPerCh[4] < min[6]Overriding create args
     [m3vpss ]  UTILS: DMA: Allocated CH (TCC) = 58 (58)
     [m3vpss ]  UTILS: DMA: 0 of 4: Allocated PaRAM = 58 (0x49004740)
     [m3vpss ]  UTILS: DMA: 1 of 4: Allocated PaRAM = 64 (0x49004800)
     [m3vpss ]  UTILS: DMA: 2 of 4: Allocated PaRAM = 65 (0x49004820)
     [m3vpss ]  UTILS: DMA: 3 of 4: Allocated PaRAM = 66 (0x49004840)
     [m3vpss ] CAPTURE::HEAPID:0    USED:328
     [m3vpss ] CAPTURE::HEAPID:4    USED:29030400
     [m3vpss ]  16759: CAPTURE: Create Done !!!
     [m3vpss ]  16760: SELECT_0: OUT QUE0: OUT CH0: IN CH0: 1920 x 1080, pitch = (3840, 3840) [PROGRESSIVE] [NON-TILED  ]
     [m3vpss ]  16761: SELECT_0: OUT QUE0: OUT CH1: IN CH1: 0 x 0, pitch = (0, 0) [INTERLACED ] [NON-TILED  ]
     [m3vpss ]  16761: SELECT_0: OUT QUE1: OUT CH0: IN CH2: 0 x 0, pitch = (0, 0) [INTERLACED ] [NON-TILED  ]
     [m3vpss ]  16761: SELECT_0: OUT QUE1: OUT CH1: IN CH3: 0 x 0, pitch = (0, 0) [INTERLACED ] [NON-TILED  ]
     [m3vpss ]  16761: SELECT_0: OUT QUE1: OUT CH2: IN CH4: 0 x 0, pitch = (0, 0) [INTERLACED ] [NON-TILED  ]
     [m3vpss ]  16761: SELECT_0: OUT QUE1: OUT CH3: IN CH5: 0 x 0, pitch = (0, 0) [INTERLACED ] [NON-TILED  ]
     [m3vpss ]  16761: SELECT_0: OUT QUE1: OUT CH4: IN CH6: 0 x 0, pitch = (0, 0) [INTERLACED ] [NON-TILED  ]
     [m3vpss ]  16762: SELECT_0: OUT QUE1: OUT CH5: IN CH7: 0 x 0, pitch = (0, 0) [INTERLACED ] [NON-TILED  ]
     [m3vpss ]  16762: SELECT_0: OUT QUE1: OUT CH6: IN CH8: 0 x 0, pitch = (0, 0) [INTERLACED ] [NON-TILED  ]
     [m3vpss ]  16762: SELECT_0: OUT QUE1: OUT CH7: IN CH9: 0 x 0, pitch = (0, 0) [INTERLACED ] [NON-TILED  ]
     [m3vpss ]  16762: SELECT   : Create Done !!!
     [m3vpss ]  16766: DUP:  0: Format: PROGRESSIVE, 1920 x 1080
     [m3vpss ]  16766: DUP:  1: Format: INTERLACED , 0 x 0
     [m3vpss ]  16767: DUP   : Create Done !!!
     [m3vpss ]  16768: DEI    : Create in progress !!!
     [m3vpss ] DEI: Ch 0, Outformat is PROGRESSIVE
     [m3vpss ]  16788: DEI: OUT0:  0: Format: PROGRESSIVE, 0xaffcbc80, 960 x 540, 4 frames
     [m3vpss ] DEI: Ch 1, Outformat is PROGRESSIVE
     [m3vpss ] !!!XDC RUNTIME ASSERT FAILED
     [m3vpss ] xdc.runtime.Error @ ti.sdo.ipc.heaps.HeapMemMP: line 573:
     [m3vpss ] assertion failure: A_zeroBlock: Cannot allocate size 0

     

    question1:  TVP_CHIP_ID_READ:0x6720  , why is not 0x7002?

         I have set blow:

            tvp_i2c_addr = Device_getVidDecI2cAddr(DEVICE_VID_DEC_TVP7002_DRV,0);

           numRegs = 0;
           regAddr[numRegs] =DEVICE_TVP7002_REG_HPLL_DIVIDER_MSB;
           regValue[numRegs] = 0;
           numRegs++;

           regAddr[numRegs] = DEVICE_TVP7002_REG_HPLL_DIVIDER_LSB;
           regValue[numRegs] = 0;
           numRegs++;

           status = OSA_i2cRead8(&i2cHandle, tvp_i2c_addr, regAddr, regValue, numRegs);

          if (status == 0)

                     {

                           chipId = ( ( UInt32 ) regValue[0] << 8 ) | regValue[1];
                           printf("\nTVP_CHIP_ID_READ:0x%x\n",chipId);  

                     }

       question2: why it comes to "Device not found !!!"?