Hi everybody:
I am trying to use TVP7002 with DVR RDK. My base board is DM8168EVM with DVRRDK04.01.00.02
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 !!!"?
maybe i shold reset some values about tvp7002?
Did anyone implement the method for capture with tvp7002 in the demo? could you give me some advice?