Hi All,
I wanto drive a single TVP5158 on my board and I used the driver from UDWorks dm368 dvr design.
The following is my board test output:
root@/dvr/common# ./mcvip_test.out
Multi Channel Video Input Port (MCVIP) Capture Demo, (c) Texas Instruments 2009
USAGE: ./mcvip_test.out <videoSystem> <i2c Mode>
videoSystem = NTSC (default) or PAL
i2c Mode = WinVCC or DM6467 (default)
CLK Hz,
ARM Hz = 432000000
DDR Hz = 340000000
VPSS Hz = 340000000
IMCOP Hz = 340000000
=========Video Standard Status : 81 ============
BUILD DATE: Oct 24 2011 TIME: 17:06:47
===========================
MCVIP Main Menu (NTSC mode)
===========================
1: Start - 2Ch D1 - Port A (BT656 )
2: Start - 2Ch D1 - Port B (BT656 )
3: Start - 4Ch D1 (BT656 )
4: Start - 4Ch Half-D1 (BT656 )
5: Start - 4Ch CIF (BT656 )
6: Start - 4Ch D1 (BT1120)
7: Start - 4Ch Half-D1 (BT1120)
8: Start - 8Ch Half-D1 (BT656 )
9: Start - 8Ch CIF (BT656 )
a: Start - 4Ch Half-D1 + D1 (BT656 )
b: Start - 4Ch CIF + D1 (BT656 )
c: Start - 8Ch CIF + D1 (BT656 )
s [AWDEOC]: set module flag
0: Exit
Enter Choice : 3
MCVIP: Starting. Please wait !!!
MCVIP: Capture Starting !!!
============GetChInfo[720x480]===========
CAPTURE: Alloc info: numCh=4 numBuf=16, bufSize=706560, allocSize=11304960
============GetChInfo[720x480]===========
============GetChInfo[720x480]===========
============GetChInfo[720x480]===========
============GetChInfo[720x480]===========
MCVIP: Encode Starting (ch=4, 704x480 704x480 704x480 704x480 0x0)!!!
===========DRV_faceDetectOpen()===============
Reg:0x1c40038 : 399
Reg & 0x04 : 1
==============================================
MCVIP: Writer Starting !!!
WRITER: Allocating memory 506880x4
WRITER: Creating buffer 1980KB 704x480
WRITER: Allocating memory 506880x4
WRITER: Creating buffer 1980KB 704x480
WRITER: Allocating memory 506880x4
WRITER: Creating buffer 1980KB 704x480
WRITER: Allocating memory 506880x4
WRITER: Creating buffer 1980KB 704x480
CMEM_STAT cached_size=0(0.00MB) noncached_size=41184000(39.28MB) cnt=16
idx= 0 nocache virtadd=0x40a85000 phyadd=0x88000000 size=11304960B(11040.00KB)
idx= 1 nocache virtadd=0x41d4d000 phyadd=0x88ac8000 size=3091200B(3018.75KB)
idx= 2 nocache virtadd=0x42040000 phyadd=0x88dbb000 size=3091200B(3018.75KB)
idx= 3 nocache virtadd=0x42333000 phyadd=0x890ae000 size=3091200B(3018.75KB)
idx= 4 nocache virtadd=0x42626000 phyadd=0x893a1000 size=3091200B(3018.75KB)
idx= 5 nocache virtadd=0x42919000 phyadd=0x89694000 size=3091200B(3018.75KB)
idx= 6 nocache virtadd=0x4340c000 phyadd=0x89987000 size=1520640B(1485.00KB)
idx= 7 nocache virtadd=0x4399a000 phyadd=0x89cb6000 size=1520640B(1485.00KB)
idx= 8 nocache virtadd=0x43cc8000 phyadd=0x89fe3000 size=1520640B(1485.00KB)
idx= 9 nocache virtadd=0x43ff6000 phyadd=0x8a310000 size=1520640B(1485.00KB)
idx=10 nocache virtadd=0x44324000 phyadd=0x8a63d000 size= 76800B(75.00KB)
idx=11 nocache virtadd=0x44337000 phyadd=0x8a650000 size= 153600B(150.00KB)
idx=12 nocache virtadd=0x44b5d000 phyadd=0x8a676000 size=2027520B(1980.00KB)
idx=13 nocache virtadd=0x44d4c000 phyadd=0x8a865000 size=2027520B(1980.00KB)
idx=14 nocache virtadd=0x44f3b000 phyadd=0x8aa54000 size=2027520B(1980.00KB)
idx=15 nocache virtadd=0x4512a000 phyadd=0x8ac43000 size=2027520B(1980.00KB)
MCVIP: Capture Enable !!!
MCVIP: TVP5158 init in progress for stage 0
MCVIP: TVP5158 init done !!!
+ MCVIP_getBufn
MCVIP: Start DONE !!!
MCVIP: Timeout, could not dequeue capture buffer
MCVIP: Timeout, could not dequeue capture buffer
MCVIP: Timeout, could not dequeue capture buffer
The first question is about the DM368 reg 0x01c40038 :
on udworks dvr , the value is 0x391, on my board it is : 0x399, why? the bit3 ~ bit1 is read only said by dm368 datasheet.
The second question is why the MCVIP driver gives could not dequeue the capture buffer?
Thanks.