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 Capture one D1 frame using tvp5147 on TMDXEVM8168?

Other Parts Discussed in Thread: TVP5147, TVP7002

the platform is:

ezsdk_dm816x-evm_5_03_01_15_setuplinux

TMDXEVM8168 Rev D

on the I/O daughter card, I saw one tvp5147 video decoder, but I can't find any info useful about tvp5147 in the ezsdk.

video caputre is pacakged into several OMX components, VFCC, CTRL...

in file "omx_vfcc.h"

...

/*******************************************************************************
* Enumerated Types
*******************************************************************************/
/**
* @brief OMX_VIDEO_CAPTURE_HWPORT_ID : Enumerates capture ports that can be
* controlled by the VFCC component
* @ param OMX_VIDEO_CaptureHWPortUnUsed : Unspecified hw port
* @ param OMX_VIDEO_CaptureHWPortVIP0_PORTA : VIP0_PORTA
* @ param OMX_VIDEO_CaptureHWPortVIP0_PORTB : VIP0_PORTB, Valid only for 8 bit
* @ param OMX_VIDEO_CaptureHWPortVIP1_PORTA : VIP1_PORTA
* @ param OMX_VIDEO_CaptureHWPortVIP1_PORTB : VIP1_PORTB, Valid only for 8 bit
* @ param OMX_VIDEO_CaptureHWPortALL_PORTS : All ports. This is used in a
* special case for applications
* such as VS.
* @ param OMX_VIDEO_CaptureHWPortTIExtensions : Reserved region for
* introducing
* TI Standard Extensions
* @ param OMX_VIDEO_CaptureHWPortVendorStartUnused : Reserved region for
* introducing Vendor
* Extensions
* @ param OMX_VIDEO_CaptureHWPortMax : Indicates the max. value
* available.
*
*/
typedef enum OMX_VIDEO_CAPTURE_HWPORT_ID
{
OMX_VIDEO_CaptureHWPortUnUsed = 0x00000000,
OMX_VIDEO_CaptureHWPortVIP1_PORTA,
OMX_VIDEO_CaptureHWPortVIP1_PORTB,
OMX_VIDEO_CaptureHWPortVIP2_PORTA,
OMX_VIDEO_CaptureHWPortVIP2_PORTB,
OMX_VIDEO_CaptureHWPortALL_PORTS,
OMX_VIDEO_CaptureHWPortTIExtensions = 0x6F000000,
OMX_VIDEO_CaptureHWPortVendorStartUnused = 0x7F000000,
OMX_VIDEO_CaptureHWPortMax = 0x7FFFFFFF
} OMX_VIDEO_CAPTURE_HWPORT_ID;

/**
* @brief OMX_VIDEO_CAPTURE_HWPORT_CAPT_MODE : H/W Capture Mode
* @ param OMX_VIDEO_CaptureModeUnused : Unspecified hw port
* @ param OMX_VIDEO_CaptureModeSC_NON_MUX : Single channel non-mux
* @ param OMX_VIDEO_CaptureModeMC_LINE_MUX : Multi channel line mux
* @ param OMX_VIDEO_CaptureModeMC_PEL_MUX : Multi channel pixel mux
* @ param OMX_VIDEO_CaptureModeSC_DISCRETESYNC : Single channel
* Discrete sync
* @ param OMX_VIDEO_CaptureModeMC_LINE_MUX_SPLIT_LINE: Line Mux, split line
* @ param OMX_VIDEO_CaptureModeTIExtensions : Reserved region for
* introducing
* TI Standard Extensions
* @ param OMX_VIDEO_CaptureModeVendorStartUnused : Reserved region for
* introducing Vendor
* Extensions
* @ param OMX_VIDEO_CaptureModeMax : Indicates the max. value
* available.
*
*/
typedef enum OMX_VIDEO_CAPTURE_HWPORT_CAPT_MODE
{
OMX_VIDEO_CaptureModeUnused = 0x00000000,
OMX_VIDEO_CaptureModeSC_NON_MUX,
OMX_VIDEO_CaptureModeMC_LINE_MUX,
OMX_VIDEO_CaptureModeMC_PEL_MUX,
OMX_VIDEO_CaptureModeSC_DISCRETESYNC,
OMX_VIDEO_CaptureModeMC_LINE_MUX_SPLIT_LINE,
OMX_VIDEO_CaptureModeSC_DISCRETESYNC_ACTVID_VSYNC,
OMX_VIDEO_CaptureModeSC_DISCRETESYNC_ACTVID_VBLK = OMX_VIDEO_CaptureModeSC_DISCRETESYNC,
OMX_VIDEO_CaptureModeTIExtensions = 0x6F000000,
OMX_VIDEO_CaptureModeVendorStartUnused = 0x7F000000,
OMX_VIDEO_CaptureModeMax = 0x7FFFFFFF
} OMX_VIDEO_CAPTURE_HWPORT_CAPT_MODE;

/**
* @brief OMX_VIDEO_CAPTURE_HWPORT_VIF_MODE : Video Interface Mode
* @ param OMX_VIDEO_CaptureVifModeUnused : Unspecified Vif Mode
* @ param OMX_VIDEO_CaptureVifMode_08BIT : 8 bit interface mode
* @ param OMX_VIDEO_CaptureVifMode_16BIT : 16 bit interface mode
* @ param OMX_VIDEO_CaptureVifMode_24BIT : 24 bit interface mode
* @ param OMX_VIDEO_CaptureModeTIExtensions : Reserved region for
* introducing TI Standard
* Extensions
* @ param OMX_VIDEO_CaptureModeVendorStartUnused : Reserved region for
* introducing Vendor
* Extensions
* @ param OMX_VIDEO_CaptureModeMax: Indicates the max. value available.
*
*/
typedef enum OMX_VIDEO_CAPTURE_HWPORT_VIF_MODE
{
OMX_VIDEO_CaptureVifModeUnused = 0x00000000,
OMX_VIDEO_CaptureVifMode_08BIT,
OMX_VIDEO_CaptureVifMode_16BIT,
OMX_VIDEO_CaptureVifMode_24BIT,
OMX_VIDEO_CaptureVifModeTIExtensions = 0x6F000000,
OMX_VIDEO_CaptureVifModeVendorStartUnused = 0x7F000000,
OMX_VIDEO_CaptureVifModeMax = 0x7FFFFFFF
} OMX_VIDEO_CAPTURE_HWPORT_VIF_MODE;

/**
* @brief OMX_VIDEO_CAPTURE_SCANTYPE : Video Scan Mode
* @ param OMX_VIDEO_CaptureScanTypeUnused: Unspecified Scan Mode
* @ param OMX_VIDEO_CaptureScanTypeProgressive: Progressive scan
* @ param OMX_VIDEO_CaptureScanTypeInterlaced: Interlaced scan
* @ param OMX_VIDEO_CaptureScanTypeTIExtensions : Reserved region for
* introducing
* TI Standard Extensions
* @ param OMX_VIDEO_CaptureScanTypeVendorStartUnused : Reserved region for
* introducing Vendor
* Extensions
* @ param OMX_VIDEO_CaptureScanTypeMax: Indicates the max. value available.
*
*/

typedef enum OMX_VIDEO_CAPTURE_SCANTYPE
{
OMX_VIDEO_CaptureScanTypeUnused = 0x00000000,
OMX_VIDEO_CaptureScanTypeProgressive,
OMX_VIDEO_CaptureScanTypeInterlaced,
OMX_VIDEO_CaptureScanTypeTIExtensions = 0x6F000000,
OMX_VIDEO_CaptureScanTypeVendorStartUnused = 0x7F000000,
OMX_VIDEO_CaptureScanTypeMax = 0x7FFFFFFF
} OMX_VIDEO_CAPTURE_SCANTYPE;
...
in file "omx_ctrl.h"
...
/*******************************************************************************
* Enumerated Types
*******************************************************************************/
/**
* @brief OMX_CTRL_VID_DECODER_ID : Defines the supported video decoders
* The below names will be renamed in future releases as some of the
* driver names & interfaces will be changed in future
*
* @ param OMX_VID_DEC_SII9135_DRV: SIL video decoder for 1080P60 capture
* @ param OMX_VID_DEC_TVP7002_DRV: TVP7002 video decoder for 1080i60 capture
* @ param OMX_VID_DEC_TVP5158_DRV: TVP5158 video decoder for muxed capture
*
*/
typedef enum OMX_CTRL_VID_DECODER_ID {
OMX_VID_DEC_Unused = 0x00000000,
OMX_VID_DEC_SII9135_DRV,
OMX_VID_DEC_TVP7002_DRV,
OMX_VID_DEC_TVP5158_DRV,
OMX_VID_DEC_TIExtensions = 0x6F000000,
OMX_VID_DEC_VendorStartUnused = 0x7F000000,
OMX_VID_DEC_Max = 0x7FFFFFFF
} OMX_CTRL_VID_DECODER_ID;

/******************************************************************************/
/**
* @brief OMX_CTRL_VIDEO_DECODER_STD : Defines the supported video decoder
* standards
* The below names will be renamed in future releases as some of the
* driver names & interfaces will be changed in future
*
* @ param OMX_VIDEO_DECODER_STD_AUTO_DETECT: Auto detect the standard
* @ param OMX_VIDEO_DECODER_STD_MUX_4CH_D1 : 4 ch D1 capture
* @ param OMX_VIDEO_DECODER_STD_1080P_60 : 1 ch 1080P60 capture, to be used
* when capturing via TVP 7002
* @ param OMX_VIDEO_DECODER_STD_1080I_60 : 1 ch 1080I60 capture, to be used
* when capturing via TVP_7002
*
*/
typedef enum OMX_CTRL_VIDEO_DECODER_STD {
OMX_VIDEO_DECODER_STD_Unused = 0x00000000,
OMX_VIDEO_DECODER_STD_AUTO_DETECT,
OMX_VIDEO_DECODER_STD_1080P_60,
OMX_VIDEO_DECODER_STD_1080I_60,
OMX_VIDEO_DECODER_STD_MUX_4CH_D1,
OMX_VIDEO_DECODER_STD_720P_60,
OMX_VIDEO_DECODER_STD_TIExtensions = 0x6F000000,
OMX_VIDEO_DECODER_STD_VendorStartUnused = 0x7F000000,
OMX_VIDEO_DECODER_STD_Max = 0x7FFFFFFF
} OMX_CTRL_VIDEO_DECODER_STD;

/******************************************************************************/
/**
* @brief OMX_CTRL_VIDEO_DECODER_SYSTEM_STD : Defines the supported video
* decoder system standards
* The below names will be renamed in future releases as some of the
* driver names & interfaces will be changed in future
*
* @ param OMX_VIDEO_DECODER_VIDEO_SYSTEM_NTSC:
Interlaced, NTSC system, 720x240 per field
* @ param OMX_VIDEO_DECODER_VIDEO_SYSTEM_PAL:
Interlaced, PAL system, 720x288 per field
* @ param OMX_VIDEO_DECODER_VIDEO_SYSTEM_AUTO_DETECT:
Auto-detect NTSC or PAL system
*/
typedef enum OMX_CTRL_VIDEO_DECODER_SYSTEM_STD {
OMX_VIDEO_DECODER_VIDEO_SYSTEM_NTSC = 0x00000000,
OMX_VIDEO_DECODER_VIDEO_SYSTEM_PAL,
OMX_VIDEO_DECODER_VIDEO_SYSTEM_AUTO_DETECT
} OMX_CTRL_VIDEO_DECODER_SYSTEM_STD;
...
There are " OMX_VID_DEC_TVP5158_DRV" and the corresponding "OMX_VIDEO_DECODER_STD_MUX_4CH_D1", where is the
single D1 Composite Video Capture "tvp5147"?

How could I control the tvp5147 chips on the I/O daughter Card?
  • I cancelled the matrix-gui-e shellscript, as following:

    cd /etc/init.d
    mv matrix-gui-e ~matrix-gui-e
    and after linux bootup
    run
    modprobe ti81xxvin
    but there are many errors:
    
    
    root@dm816x-evm:~# modprobe ti81xxvin
    tvp7002 2-005d: tvp7002 found @ 0x5d (OMAP I2C adapter)
    omap_i2c omap_i2c.2: controller timed out
    tvp7002 2-005d: Rev. 02 detected.
    omap_i2c omap_i2c.2: controller timed out
    tvp7002 2-005d: Write: retry ... 0
    omap_i2c omap_i2c.2: controller timed out
    tvp7002 2-005d: Write: retry ... 0
    Unable to handle kernel NULL pointer dereference at virtual address 00000002
    pgd = cacdc000
    [00000002] *pgd=8ace3031, *pte=00000000, *ppte=00000000
    Internal error: Oops: 17 [#1]
    last sysfs file: /sys/module/tvp7002/initstate
    Modules linked in: tvp7002 ti81xxvin(+) bufferclass_ti omaplfb pvrsrvkm ti81xxhdmi ti81xxfb vpss syslink ipv6
    CPU: 0 Not tainted (2.6.37 #1)
    PC is at vps_ti816x_select_video_decoder+0x28/0xac
    LR is at ti81xxvin_probe+0x3e4/0x50c [ti81xxvin]
    pc : [<c005cb10>] lr : [<bf208f88>] psr: a0000013
    sp : cacb9dd8 ip : cacb9e08 fp : cacb9e04
    r10: bf20a200 r9 : bf20a200 r8 : 00000004
    r7 : c04b227c r6 : 00000000 r5 : 00000000 r4 : 00000000
    r3 : c04e3c58 r2 : 0000000c r1 : 00000000 r0 : cacb9ddc
    Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
    Control: 10c5387d Table: 8acdc019 DAC: 00000015
    Process modprobe (pid: 1380, stack limit = 0xcacb82e8)
    Stack: (0xcacb9dd8 to 0xcacba000)
    9dc0: cacb9e04 cacb9de8
    9de0: c0280a1c c0095b54 cacdb280 cbfe9c00 bf20a1f0 00000000 cacb9e44 cacb9e08
    9e00: bf208f88 c005caf4 00000000 00000001 c04c9aa8 c04b2138 cacb9e34 c04b2140
    9e20: c04b2140 bf20a030 cac37780 c04c9aa8 cacb8000 00000000 cacb9e54 cacb9e48
    9e40: c01e0758 bf208bb0 cacb9e74 cacb9e58 c01df6c4 c01e0744 c04b2140 c04b2174
    9e60: bf20a030 cac37780 cacb9e94 cacb9e78 c01df7ec c01df600 00000000 c01df784
    9e80: bf20a030 cac37780 cacb9ebc cacb9e98 c01dee70 c01df790 cc81bfb8 cc865730
    9ea0: c0190698 00000000 bf20a0cc bf20a030 cacb9ecc cacb9ec0 c01df4e8 c01dee2c
    9ec0: cacb9efc cacb9ed0 c01de748 c01df4d4 bf209c8e cacb9ee0 00000000 bf20a0cc
    9ee0: bf20a030 4022c000 bf20d000 00000000 cacb9f24 cacb9f00 c01dfb24 c01de6a0
    9f00: 00000000 bf20a0cc 0001b438 4022c000 bf20d000 cacb8000 cacb9f34 cacb9f28
    9f20: c01e0a44 c01dfa80 cacb9f44 cacb9f38 bf20d014 c01e0a04 cacb9f7c cacb9f48
    9f40: c003a3d8 bf20d00c bf20a0cc 0001b438 4022c000 c0044f48 00000000 bf20a0cc
    9f60: 0001b438 4022c000 c0044f48 00000000 cacb9fa4 cacb9f80 c0097440 c003a314
    9f80: c00c2a50 c00c2968 0001b070 0001b438 00000000 00000080 00000000 cacb9fa8
    9fa0: c0044da0 c00973b0 0001b070 0001b438 4022c000 00008cac 0001b438 0001ac94
    9fc0: 0001b070 0001b438 00000000 00000080 0001b088 beba1c64 00000000 beba1c64
    9fe0: 0001b470 beba194c 0000b678 401c57d4 60000010 4022c000 00000000 00000000
    Backtrace:
    [<c005cae8>] (vps_ti816x_select_video_decoder+0x0/0xac) from [<bf208f88>] (ti81xxvin_probe+0x3e4/0x50c [ti81xxvin])
    r6:00000000 r5:bf20a1f0 r4:cbfe9c00
    [<bf208ba4>] (ti81xxvin_probe+0x0/0x50c [ti81xxvin]) from [<c01e0758>] (platform_drv_probe+0x20/0x24)
    [<c01e0738>] (platform_drv_probe+0x0/0x24) from [<c01df6c4>] (driver_probe_device+0xd0/0x190)
    [<c01df5f4>] (driver_probe_device+0x0/0x190) from [<c01df7ec>] (__driver_attach+0x68/0x8c)
    r7:cac37780 r6:bf20a030 r5:c04b2174 r4:c04b2140
    [<c01df784>] (__driver_attach+0x0/0x8c) from [<c01dee70>] (bus_for_each_dev+0x50/0x84)
    r7:cac37780 r6:bf20a030 r5:c01df784 r4:00000000
    [<c01dee20>] (bus_for_each_dev+0x0/0x84) from [<c01df4e8>] (driver_attach+0x20/0x28)
    r6:bf20a030 r5:bf20a0cc r4:00000000
    [<c01df4c8>] (driver_attach+0x0/0x28) from [<c01de748>] (bus_add_driver+0xb4/0x234)
    [<c01de694>] (bus_add_driver+0x0/0x234) from [<c01dfb24>] (driver_register+0xb0/0x13c)
    [<c01dfa74>] (driver_register+0x0/0x13c) from [<c01e0a44>] (platform_driver_register+0x4c/0x60)
    r9:cacb8000 r8:bf20d000 r7:4022c000 r6:0001b438 r5:bf20a0cc
    r4:00000000
    [<c01e09f8>] (platform_driver_register+0x0/0x60) from [<bf20d014>] (ti81xxvin_init+0x14/0x1c [ti81xxvin])
    [<bf20d000>] (ti81xxvin_init+0x0/0x1c [ti81xxvin]) from [<c003a3d8>] (do_one_initcall+0xd0/0x1a4)
    [<c003a308>] (do_one_initcall+0x0/0x1a4) from [<c0097440>] (sys_init_module+0x9c/0x1bc)
    [<c00973a4>] (sys_init_module+0x0/0x1bc) from [<c0044da0>] (ret_fast_syscall+0x0/0x30)
    r7:00000080 r6:00000000 r5:0001b438 r4:0001b070
    Code: e3a01000 e3a0200c e24b0028 e5935004 (e1d560b2)
    ---[ end trace 45492278940e3446 ]---
    Segmentation fault
    
    
    Who can help me?
  • Hi,

    It seems you are loading wrong Media controller binary. You should be loading media controller binary with V4L2 support.

    Regards,

    Hardik Shah

  • HardikShah:

        I want to know whether there were tvp5147 controlling code on the hdvpss's M3 side on this "TMDXEVM8168 REV.D" board?

        I can't see any clue about tvp5147 in the code I could see.

        On the cotexA8 linux, I want's just a demo which could capture one channel of video(which may be D1, 1080P(component), 1080P(HDMI)), and encode&decode(H.264 would be nice), finally display this channel video on according display interface. Could you give me some advice?

  • Hi,

    You can use tvp7002 input with 720P60, 1080P60 or 1080i60 inputs. We have saLoopBack example displaying capture+display functionality.You will be able to fine more details in capture driver userguide @ http://processors.wiki.ti.com/index.php/TI81XX_Video_Capture_Driver_User_Guide

    Regards,

    Hardik Shah

  • HardikShah:

      after read "http://processors.wiki.ti.com/index.php/TI81XX_Video_Capture_Driver_User_Guide", I have one problem.

      Since there was "tvp7002.ko", and this KO did the register inialization work on the cotex A8 side, why HDVPSS still want to control tvp7002 through the I2C? and vice versa.

  • Hi,

    We have two software stacks for HDVPSS. One uses V4L2 drivers for controlling HDVPSS this stack initializes TVP7002 using tvp7002.ko. Other stack uses Media controller binary for controlling HDVPSS hardware. In this stack tvp7002 is control through Media controller binary. Media controller binary exposes features which cant be exposed by V4L2 because of its framework limitation.

    Regards,

    Hardik Shah

  • HardikShah

    The version of the ezsdk we used is "ezsdk_dm816x-evm_5_03_01_15_setuplinux", 
    and I extract the file "EZSDK/filesystem/ezsdk-dm816x-evm-rootfs.tar.gz". 
    Under the extracted directory, run "find . -name *.xem3", I get the output:  
    ./usr/share/ti/ti-media-controller-utils/dm816x_hdvpss.xem3
    ./usr/share/ti/ti-media-controller-utils/dm816x_hdvpss_v4l2.xem3
    ./usr/share/ti/ti-media-controller-utils/dm816x_hdvicp.xem3

     It seems that I should load the "dm816x_hdvpss_v4l2.xem3" if 
    I want to use ti81xxvin.ko to capture video. 
    Is it right?
    About the file "dm816x_hdvicp.xem3", 
    I want to know whether it also run on the CotexM3 same as the "dm816x_hdvpss.xem3"?
    The requirement of us is still that:
    capture one channel video (CVBS/COMPONENT/VGA/HDMI), 
    and encode&decode, 
    finally display onto the according interface. 
    And now, I found one tvp5147 on the daughter board, 
    but I can't find any clue about tvp5147 in the code of EZSDK.


  • HardikShah
    I close matrix-gui-e as past, and change the "/etc/init.d/load-hd-firmware.sh"
    ...
    firmware_loader $HDVPSS_ID /usr/share/ti/
    ti-media-controller-utils/dm816x_hdvpss_v4l2.xem3 start
    ...
    and run:
    modprobe tvp7002
    modprobe ti81xxvo
    modprobe ti81xxvin
    and still got following output:
    tvp7002 2-005d: tvp7002 found @ 0x5d (OMAP I2C adapter)
    tvp7002 2-005d: Rev. 00 detected.
    tvp7002 2-005d: Unknown revision detected.
    omap_i2c omap_i2c.2: controller timed out
    tvp7002 2-005d: Write: retry ... 0
    omap_i2c omap_i2c.2: controller timed out
    tvp7002 2-005d: Write: retry ... 1
    omap_i2c omap_i2c.2: controller timed out
    tvp7002 2-005d: Write: retry ... 2
    omap_i2c omap_i2c.2: controller timed out
    tvp7002 2-005d: Write: retry ... 3
    omap_i2c omap_i2c.2: controller timed out
    tvp7002 2-005d: Write: retry ... 4
    tvp7002 2-005d: TVP7002 write error -110
    tvp7002: probe of 2-005d failed with error -110
    ti81xxvin ti81xxvin: Error registering v4l2 subdevice
    anything wrong? 
  • Have same problem with unloading firmware for omx and loading firmware for v4l2. Did you solved it?

  • Hello,

    You should add -i2c 0 :

    HDVPSS_ID=2

    firmware_loader $HDVPSS_ID /usr/share/ti/ti-media-controller-utils/dm816x_hdvpss_v4l2.xem3 start -i2c 0

    Best Regards,

    Margarita

  • Hi,

       About the original question of how to capture from the TVP5147 In the DM8168-EVM we got it working with V4L2, you can find more info here:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/326172/1170437.aspx#1170437

    -David