Using the TI-DVSDK 4_02_00_06 SDK and a leopardboard 365 (v1.5) I successfully wrote a C application (modeled after encodedecode dmai example) that would capture and encode composite video from the LI-VI365 video capture board. The software built, and was installed onto a 1GB SD card. I took that SD out of one leopard board, inserted it into a second leopard (v1.4). On the second leopard my software always hangs waiting for the first video frame ( ioctl VIDIOC_DQBUF ). I added some printks into the kernel source code, and it looks like VDINT0 and VDINT1 are not firing on the second board.
I noticed the working leopard is stamped v1.5. The non working leopard is stamped v1.4. I can't find a data sheet for v1.4 to see what's changed. Is there any reason why the LI-DV365 wouldn't work on v1.4?
Attached is the output of the board that does not work. I added the bootarg vpfe_capture.debug=1 and vpfe_capture.interface=0. i also added some additional printks to the davinci/vpfe_capture.c and videobuf-core.c files. My output is usually encapsulated in ***'s.
Any help would be appreciated,
Joe
---- BOOT ARGS
console=ttyS0,115200n8 root=/dev/mmcblk0p2 rw ip=off mem=54M video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,4050K dm365_imp.oper_mode=0 davinci_capture.device_type=1 vpfe_capture.cont_bufsize=6291456 davinci_enc_mngr.ch0_output=COMPONENT davinci_enc_mngr.ch0_mode=480P-60 vpfe_capture.interface=0 vpfe_capture.debug=1 rootwait
------- BOOT LOG
U-Boot 2010.12-rc2 (May 31 2012 - 10:26:20)
Cores: ARM 297 MHzDDR: 243 MHzI2C: readyDRAM: 128 MiBNAND: 256 MiBMMC: davinci: 0, davinci: 1Bad block table found at page 131008, version 0x01Bad block table found at page 130944, version 0x01nand_bbt: ECC error while reading bad block tableNAND read from offset 3c0000 failed -74*** Warning - readenv() failed, using default environment
Net: Ethernet PHY: GENERIC @ 0x00DaVinci-EMACHit any key to stop autoboot: 0reading boot.scr
478 bytes read## Executing script at 80600000reading uImage
2146856 bytes read## Booting kernel from Legacy Image at 80700000 ... Image Name: Linux-2.6.32.17-davinci1 Created: 2012-05-31 15:31:04 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2146792 Bytes = 2 MiB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK Loading Kernel Image ... OKOK
Starting kernel ...
Uncompressing Linux............................................................................................................................................done, booting the kernel.Linux version 2.6.32.17-davinci1 (jpulver@haunty) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #15 PREEMPT Thu May 31 11:30:53 EDT 2012CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177CPU: VIVT data cache, VIVT instruction cacheMachine: DM365 LeopardMemory policy: ECC disabled, Data cache writebackDaVinci dm36x_rev1.2 variant 0x8Built 1 zonelists in Zone order, mobility grouping off. Total pages: 13716Kernel command line: console=ttyS0,115200n8 root=/dev/mmcblk0p2 rw ip=off mem=54M video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,4050K dm365_imp.oper_mode=0davinci_capture.device_type=1 vpfe_capture.cont_bufsize=6291456 davinci_enc_mngr.ch0_output=COMPONENT davinci_enc_mngr.ch0_mode=480P-60 vpfe_capture.interface=0 vpfe_capture.debug=1 rootwaitPID hash table entries: 256 (order: -2, 1024 bytes)Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)Memory: 54MB = 54MB totalMemory: 50076KB available (4024K code, 392K data, 144K init, 0K highmem)SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1Hierarchical RCU implementation.NR_IRQS:245Console: colour dummy device 80x30Calibrating delay loop... 147.86 BogoMIPS (lpj=739328)Mount-cache hash table entries: 512CPU: Testing write buffer coherency: okDaVinci: 8 gpio irqsNET: Registered protocol family 16davinci_serial_init:97: failed to get UART2 clockbio: create slab <bio-0> at 0DM365 IPIPE initialized in Continuous modeSCSI subsystem initializedusbcore: registered new interface driver usbfsusbcore: registered new interface driver hubusbcore: registered new device driver usbvpss vpss: dm365_vpss vpss probedvpss vpss: dm365_vpss vpss probe successdm365_afew_hw_initch0 default output "COMPONENT", mode "480P-60"VPBE Encoder Initializedcfg80211: Using static regulatory domain infocfg80211: Regulatory domain: US (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm) (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm) (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)cfg80211: Calling CRDA for country: USLogicPD encoder initializedSwitching to clocksource timer0_1musb_hdrc: version 6.0, cppi-dma, host, debug=0musb_hdrc: USB Host mode controller at fec64000 using DMA, IRQ 12musb_hdrc musb_hdrc: MUSB HDRC host drivermusb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1usb usb1: configuration #1 chosen from 1 choicehub 1-0:1.0: USB hub foundhub 1-0:1.0: 1 port detectedNET: Registered protocol family 2IP route cache hash table entries: 1024 (order: 0, 4096 bytes)TCP established hash table entries: 2048 (order: 2, 16384 bytes)TCP bind hash table entries: 2048 (order: 1, 8192 bytes)TCP: Hash tables configured (established 2048 bind 2048)TCP reno registeredNET: Registered protocol family 1RPC: Registered udp transport module.RPC: Registered tcp transport module.RPC: Registered tcp NFSv4.1 backchannel transport module.JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.msgmni has been set to 97alg: No test for stdrng (krng)io scheduler noop registeredio scheduler anticipatory registered (default)davincifb davincifb.0: dm_osd0_fb: Initial window configuration is invalid.Console: switching to colour frame buffer device 90x36davincifb davincifb.0: dm_osd0_fb: 720x576x16@0,0 with framebuffer size 4050KBdavincifb davincifb.0: dm_vid0_fb: 0x0x16@0,0 with framebuffer size 1020KBdavincifb davincifb.0: dm_osd1_fb: 720x480x4@0,0 with framebuffer size 675KBdavincifb davincifb.0: dm_vid1_fb: 0x0x16@0,0 with framebuffer size 1020KBDM365 IPIPEIF probedimp serializer initializeddavinci_previewer initializeddavinci_resizer initializedSerial: 8250/16550 driver, 2 ports, IRQ sharing disabledserial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550Aconsole [ttyS0] enabledserial8250.0: ttyS1 at MMIO 0x1d06000 (irq = 41) is a 16550Abrd: module loadedconsole [netcon0] enablednetconsole: network logging startedInitializing USB Mass Storage driver...usbcore: registered new interface driver usb-storageUSB Mass Storage support registered.usbcore: registered new interface driver usbtestmice: PS/2 mouse device common for all micei2c /dev entries driverLinux video capture interface: v2.00ths7303 1-002c: chip found @ 0x58 (DaVinci I2C adapter)vpfe_initvpfe-capture: vpss clock vpss_master enabledvpfe-capture vpfe-capture: v4l2 device registeredvpfe-capture vpfe-capture: video device registeredLeopard: switch to tvp5146 SD video inputtvp514x 1-005d: tvp514x 1-005d decoder driver registered !!vpfe-capture vpfe-capture: v4l2 sub device tvp5146 registeredvpfe_register_ccdc_device: DM365 ISIFDM365 ISIF is registered with vpfe.af major#: 252, minor# 0AF Driver initializedaew major#: 251, minor# 0AEW Driver initializedTrying to register davinci display video device.layer=c20ad400,layer->video_dev=c20ad570Trying to register davinci display video device.layer=c20ad800,layer->video_dev=c20ad970davinci_init:DaVinci V4L2 Display Driver V1.0 loadedwatchdog watchdog: heartbeat 60 secdavinci_mmc davinci_mmc.0: Using DMA, 4-bit modeusbcore: registered new interface driver usbhidusbhid: v2.6:USB HID core driverAdvanced Linux Sound Architecture Driver Version 1.0.21.No device for DAI tlv320aic3xNo device for DAI davinci-i2sasoc: tlv320aic3x <-> davinci-i2s mapping okALSA device list: #0: DaVinci EVM (tlv320aic3x)TCP cubic registeredNET: Registered protocol family 17lib80211: common routines for IEEE802.11 driversdavinci_emac_probe: using random MAC addr: be:e0:29:41:af:2eemac-mii: probedWaiting for root device /dev/mmcblk0p2...mmc0: host does not support reading read-only switch. assuming write-enable.mmc0: new high speed SDHC card at address 1234mmcblk0: mmc0:1234 SA04G 3.68 GiB mmcblk0: p1 p2kjournald starting. Commit interval 5 secondsEXT3 FS on mmcblk0p2, internal journalEXT3-fs: mounted filesystem with writeback data mode.VFS: Mounted root (ext3 filesystem) on device 179:2.Freeing init memory: 144KINIT: version 2.86 bootingPlease wait: booting...Starting udevRemounting root file system...NET: Registered protocol family 10ALSA: Restoring mixer settings...Configuring network interfaces... done.Setting up IP spoofing protection: rp_filter.Thu Mar 24 20:06:00 UTC 2011INIT: Entering runlevel: 5Starting system message bus: dbus.Starting Dropbear SSH server: dropbear.Starting syslogd/klogd: doneCMEMK module: built on Mar 27 2012 at 11:14:12 Reference Linux version 2.6.32 File /home/jpulver/ti-dvsdk_dm365-evm_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.callocated heap buffer 0xc5000000 of size 0x4400000heap fallback enabled - will try heap if pool buffer is not availableCMEM Range Overlaps Kernel Physical - allowing overlapCMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x83600000)cmemk initializedIRQK module: built on Mar 27 2012 at 11:14:20 Reference Linux version 2.6.32 File /home/jpulver/ti-dvsdk_dm365-evm_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/irq/src/module/irqk.cirqk initializedEDMAK module: built on Mar 27 2012 at 11:14:24 Reference Linux version 2.6.32 File /home/jpulver/ti-dvsdk_dm365-evm_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/edma/src/module/edmak.c/etc/init.d/rc: line 172: /etc/rc5.d/S99rtpavserver: Permission denied
_____ _____ _ _| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_| | _| .'| . | . | | __| _| . | | | -_| _| _||__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_| |___| |___|
Arago Project http://arago-project.org dm365-leopard ttyS0
Arago 2011.02 dm365-leopard ttyS0
dm365-leopard login: rootPassword: EXT3 FS on mmcblk0p2, internal journalLogin timed out after 60 seconds
dm365-leopard login: davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124vpfe-capture vpfe-capture:***vpfe_open***
***ccdc_set_image_window[0 (0)]( t0, l0, w640,h480)******vpfe-capture vpfe-capture: IPIPE Chainedvpfe-capture vpfe-capture: Resizer presentvpfe-capture vpfe-capture: second output presentvpfe-capture vpfe-capture:***vpfe_s_inpupt***Leopard: switch to tvp5146 SD video inputtvp514x 1-005d: tvp5146 (Version - 0x03) found at 0xba (DaVinci I2C adapter)tvp514x 1-005d: Reg(0x00): 0x05tvp514x 1-005d: Reg(0x01): 0x0Ftvp514x 1-005d: Reg(0x02): 0x00tvp514x 1-005d: Reg(0x03): 0x00tvp514x 1-005d: Reg(0x05): 0x10tvp514x 1-005d: Reg(0x06): 0x00tvp514x 1-005d: Reg(0x07): 0x00tvp514x 1-005d: Reg(0x08): 0x02tvp514x 1-005d: Reg(0x09): 0x80tvp514x 1-005d: Reg(0x0A): 0x80tvp514x 1-005d: Reg(0x0B): 0x80tvp514x 1-005d: Reg(0x0C): 0x00tvp514x 1-005d: Reg(0x0D): 0x00tvp514x 1-005d: Reg(0x0E): 0x0Etvp514x 1-005d: Reg(0x10): 0x80tvp514x 1-005d: Reg(0x11): 0x80tvp514x 1-005d: Reg(0x12): 0x80tvp514x 1-005d: Reg(0x14): 0x80tvp514x 1-005d: Reg(0x16): 0x55tvp514x 1-005d: Reg(0x17): 0x00tvp514x 1-005d: Reg(0x18): 0x25tvp514x 1-005d: Reg(0x19): 0x03tvp514x 1-005d: Reg(0x1A): 0x00tvp514x 1-005d: Reg(0x1B): 0x00tvp514x 1-005d: Reg(0x1C): 0x40tvp514x 1-005d: Reg(0x1D): 0x00tvp514x 1-005d: Reg(0x1E): 0x04tvp514x 1-005d: Reg(0x1F): 0x00tvp514x 1-005d: Reg(0x20): 0x07tvp514x 1-005d: Reg(0x21): 0x00tvp514x 1-005d: Reg(0x22): 0x01tvp514x 1-005d: Reg(0x23): 0x00tvp514x 1-005d: Reg(0x24): 0x15tvp514x 1-005d: Reg(0x25): 0x00tvp514x 1-005d: Reg(0x32): 0x0Ctvp514x 1-005d: Reg(0x33): 0x00tvp514x 1-005d: Reg(0x34): 0x11tvp514x 1-005d: Reg(0x35): 0xEEtvp514x 1-005d: Reg(0x36): 0xAFtvp514x 1-005d: Reg(0x37): 0xFFtvp514x 1-005d: Reg(0x38): 0xFFtvp514x 1-005d: Reg(0x39): 0x01
***ccdc_set_image_window[0 (0)]( t0, l0, w640,h480)******vpfe-capture vpfe-capture:***vpfe_g_inpupt***vpfe-capture vpfe-capture:***vpfe_s_std***
***ccdc_set_image_window[0 (0)]( t0, l0, w640,h480)******vpfe-capture vpfe-capture: width = 736, height = 480, bpp = 1vpfe-capture vpfe-capture: adjusted width = 736, height = 480, bpp = 1, bytesperline = 736, sizeimage = 529920vpfe-capture vpfe-capture: width = 736, height = 480, bpp = 1vpfe-capture vpfe-capture: adjusted width = 736, height = 480, bpp = 1, bytesperline = 736, sizeimage = 529920vpfe-capture vpfe-capture:***vpfe_videobuf_setup***vpfe-capture vpfe-capture:***vpfe_videobuf_prepare***vpfe-capture vpfe-capture:***vpfe_videobuf_prepare***vpfe-capture vpfe-capture:***vpfe_videobuf_prepare***vpfe-capture vpfe-capture:***vpfe_videobuf_prepare***vpfe-capture vpfe-capture:***vpfe_streamon***vpfe-capture vpfe-capture:***vpfe_videobuf_queue***vpfe-capture vpfe-capture:***vpfe_videobuf_queue***vpfe-capture vpfe-capture:***vpfe_videobuf_queue***vpfe-capture vpfe-capture:***vpfe_videobuf_queue***vpfe-capture vpfe-capture:***streamon - attach irq***vpfe-capture vpfe-capture:***attach_irq vpfe_capture0 vpfe_isr***vpfe-capture vpfe-capture:***streamon - outi***vpfe-capture vpfe-capture:***vpfe_dqbuf***vpfe-capture vpfe-capture:***calling videobuf_dqbuf***
***videobuf_dqbuf: blocking 0
***videobuf_dqbuf: lock
***videobuf_dqbuf: stream_next_buffer
----