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.

CVBS Video Loopback on DM3730 - Kernel 2.6.37

Other Parts Discussed in Thread: DM3730, ADS7846, TVP5146M2, TVP5146

Hi,

I am working on DM3730 Mistral EVM.
I am trying to run the video loopback application from composite input(CVBS) to LCD output.
I am using DVSDK_4306 - Linux 2.6.37

For this, I am running the following application from the filesystem:
/usr/share/ti/ti-dmai-apps/video_loopback_copy_dm3730.x470MV -O lcd -I composite

When I run this application, I see the following error messages:
Capture: Current Input: camera
VIDIOC_S_INPUT: Invalid argument
Capture: Input changed to: camera
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
.
.
.

Please find the complete boot message below:


OMAP3_EVM # print
bootcmd=if mmc init; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run nandboot; fi; fi; else run nandboot; fi
bootdelay=10
baudrate=115200
bootfile=uImage
loadaddr=0x82000000
usbtty=cdc_acm
console=ttyO0,115200n8
mmcargs=setenv bootargs console=${console} root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait omap_vout.vid1_static_vrfb_alloc=y
nandargs=setenv bootargs console=${console} root=/dev/mtdblock4 rw rootfstype=jffs2
loadbootscript=fatload mmc 0 ${loadaddr} boot.scr
bootscript=echo Running bootscript from mmc ...; source ${loadaddr}
loaduimage=fatload mmc 0 ${loadaddr} uImage
mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${loadaddr}
nandboot=echo Booting from nand ...; run nandargs; onenand read ${loadaddr} 280000 400000; bootm ${loadaddr}
stdin=serial
stdout=serial
stderr=serial
dieid#=219800011ff0000001592f350100301d
ethact=smc911x-0

Environment size: 909/131068 bytes
OMAP3_EVM # boot
mmc1 is available
reading boot.scr

302 bytes read
Running bootscript from mmc ...
## Executing script at 82000000
reading uImage

3289936 bytes read
## Booting kernel from Legacy Image at 80200000 ...
Image Name: Arago/2.6.37-psp04.02.00.07.sdk/
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3289872 Bytes = 3.1 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[ 0.000000] Linux version 2.6.37 (a0876316@bangdvsdkdev01) (gcc version 4.3.3 (GCC) ) #1 Thu Dec 22 23:02:19 IST 2011
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
[ 0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: OMAP3 EVM
[ 0.000000] Reserving 4194304 bytes SDRAM for VRAM
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] OMAP3630 ES1.1 (l2cache iva sgx neon isp 192mhz_clk )
[ 0.000000] SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x10000
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 45312
[ 0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw ip=off mem=55M@0x80000000 mpurate=1000 omap_vout.vid1_static_vrfb_alloc=y omapfb.vram=0:4M mem=128M@0x88000000 rootwait
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Memory: 55MB 124MB = 179MB total
[ 0.000000] Memory: 167756k/167756k available, 19636k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
[ 0.000000] vmalloc : 0xd0800000 - 0xf8000000 ( 632 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .init : 0xc0008000 - 0xc003f000 ( 220 kB)
[ 0.000000] .text : 0xc003f000 - 0xc06254ec (6042 kB)
[ 0.000000] .data : 0xc0626000 - 0xc07e8560 (1802 kB)
[ 0.000000] NR_IRQS:409
[ 0.000000] Clocking rate (Crystal/Core/MPU): 26.0/400/1000 MHz
[ 0.000000] omap_hwmod: i2c1: softreset failed (waited 10000 usec)
[ 0.000000] omap_hwmod: i2c2: softreset failed (waited 10000 usec)
[ 0.000000] omap_hwmod: i2c3: softreset failed (waited 10000 usec)
[ 0.000000] Reprogramming SDRC clock to 400000000 Hz
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
[ 0.000000] Total of 96 interrupts on 1 active controller
[ 0.000000] GPMC revision 5.0
[ 0.000000] Trying to install interrupt handler for IRQ402
[ 0.000000] Trying to install interrupt handler for IRQ403
[ 0.000000] Trying to install interrupt handler for IRQ404
[ 0.000000] Trying to install interrupt handler for IRQ405
[ 0.000000] Trying to install interrupt handler for IRQ406
[ 0.000000] Trying to install interrupt handler for IRQ407
[ 0.000000] Trying to install interrupt handler for IRQ408
[ 0.000000] Trying to install type control for IRQ409
[ 0.000000] Trying to set irq flags for IRQ409
[ 0.000000] OMAP clockevent source: GPTIMER1 at 32768 Hz
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[ 0.000000] ... MAX_LOCKDEP_SUBCLASSES: 8
[ 0.000000] ... MAX_LOCK_DEPTH: 48
[ 0.000000] ... MAX_LOCKDEP_KEYS: 8191
[ 0.000000] ... CLASSHASH_SIZE: 4096
[ 0.000000] ... MAX_LOCKDEP_ENTRIES: 16384
[ 0.000000] ... MAX_LOCKDEP_CHAINS: 32768
[ 0.000000] ... CHAINHASH_SIZE: 16384
[ 0.000000] memory used by lock dependency info: 3951 kB
[ 0.000000] per task-struct memory footprint: 2304 bytes
[ 0.000000] Calibrating delay loop... 998.84 BogoMIPS (lpj=3899392)
[ 0.000000] pid_max: default: 32768 minimum: 301
[ 0.000000] Security Framework initialized
[ 0.000000] Mount-cache hash table entries: 512
[ 0.000000] CPU: Testing write buffer coherency: ok
[ 0.000000] regulator: core version 0.5
[ 0.000000] regulator: dummy:
[ 0.000000] NET: Registered protocol family 16
[ 0.000000] OMAP GPIO hardware version 2.5
[ 0.000000] OMAP GPIO hardware version 2.5
[ 0.000000] OMAP GPIO hardware version 2.5
[ 0.000000] OMAP GPIO hardware version 2.5
[ 0.000000] OMAP GPIO hardware version 2.5
[ 0.000000] OMAP GPIO hardware version 2.5
[ 0.000000] omap_mux_init: Add partition: #1: core, flags: 0
[ 0.000000] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] WARNING: at arch/arm/mach-omap2/clock.c:438 omap2_clk_switch_mpurate_at_boot+0x80/0xb4()
[ 0.000000] clock: dpll1_ck: unable to set MPU rate to 1000: -22
[ 0.000000] Modules linked in:
[ 0.000000] [<c004faf0>] (unwind_backtrace+0x0/0xec) from [<c00790c4>] (warn_slowpath_common+0x4c/0x64)
[ 0.000000] [<c00790c4>] (warn_slowpath_common+0x4c/0x64) from [<c0079170>] (warn_slowpath_fmt+0x30/0x40)
[ 0.000000] [<c0079170>] (warn_slowpath_fmt+0x30/0x40) from [<c00138ac>] (omap2_clk_switch_mpurate_at_boot+0x80/0xb4)
[ 0.000000] [<c00138ac>] (omap2_clk_switch_mpurate_at_boot+0x80/0xb4) from [<c00138ec>] (omap3xxx_clk_arch_init+0xc/0x3c)
[ 0.000000] [<c00138ec>] (omap3xxx_clk_arch_init+0xc/0x3c) from [<c003f3c8>] (do_one_initcall+0xc8/0x198)
[ 0.000000] [<c003f3c8>] (do_one_initcall+0xc8/0x198) from [<c000869c>] (kernel_init+0x98/0x150)
[ 0.000000] [<c000869c>] (kernel_init+0x98/0x150) from [<c004ad10>] (kernel_thread_exit+0x0/0x8)
[ 0.000000] ---[ end trace 1b75b31a2719ed1c ]---
[ 0.000000] OMAP DMA hardware revision 5.0
[ 0.078796] bio: create slab <bio-0> at 0
[ 0.082275] regulator: vwl1271: 1800 mV
[ 0.085998] SCSI subsystem initialized
[ 0.094757] usbcore: registered new interface driver usbfs
[ 0.095672] usbcore: registered new interface driver hub
[ 0.096313] usbcore: registered new device driver usb
[ 0.112854] omap_i2c omap_i2c.1: bus 1 rev4.0 at 2600 kHz
[ 0.120666] twl4030: PIH (irq 7) chaining IRQs 368..375
[ 0.120788] twl4030: power (irq 373) chaining IRQs 376..383
[ 0.122436] twl4030: gpio (irq 368) chaining IRQs 384..401
[ 0.134429] regulator: VIO: 1800 mV normal standby
[ 0.136352] regulator: VMMC1: 1850 <--> 3150 mV at 3000 mV normal standby
[ 0.138305] regulator: VDAC: 1800 mV normal standby
[ 0.140106] regulator: VAUX2_4030: 2800 mV normal standby
[ 0.141998] regulator: VPLL2: 1800 mV normal standby
[ 0.143859] regulator: VSIM: 1800 <--> 3000 mV at 1800 mV normal standby
[ 0.145782] regulator: VAUX3: 2800 mV normal standby
[ 0.146636] omap_device: omap_i2c.1: new worst case deactivate latency 0: 30517
[ 0.146881] omap_i2c omap_i2c.2: bus 2 rev4.0 at 400 kHz
[ 0.159637] omap_i2c omap_i2c.3: bus 3 rev4.0 at 400 kHz
[ 0.163879] Advanced Linux Sound Architecture Driver Version 1.0.23.
[ 0.166442] Bluetooth: Core ver 2.15
[ 0.167022] NET: Registered protocol family 31
[ 0.167022] Bluetooth: HCI device and connection manager initialized
[ 0.167114] Bluetooth: HCI socket layer initialized
[ 0.168823] Switching to clocksource 32k_counter
[ 0.252807] musb-hdrc: version 6.0, otg (peripheral+host), debug=0
[ 0.253082] musb-hdrc musb-hdrc.0: dma type: dma-inventra
[ 0.253784] musb-hdrc musb-hdrc.0: USB OTG mode controller at fa0ab000 using DMA, IRQ 92
[ 0.255218] NET: Registered protocol family 2
[ 0.255615] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.256774] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.257019] TCP bind hash table entries: 8192 (order: 6, 360448 bytes)
[ 0.259552] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.259613] TCP reno registered
[ 0.259643] UDP hash table entries: 128 (order: 1, 12288 bytes)
[ 0.259826] UDP-Lite hash table entries: 128 (order: 1, 12288 bytes)
[ 0.260467] NET: Registered protocol family 1
[ 0.261505] RPC: Registered udp transport module.
[ 0.261505] RPC: Registered tcp transport module.
[ 0.261535] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.262207] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.264984] omap_device: omap_i2c.1: new worst case activate latency 0: 61035
[ 0.267150] omap3evm camera init done successfully...
[ 0.267669] omap-iommu omap-iommu.0: isp registered
[ 0.268249] AM37x/DM37x Linux PSP version 04.02.00.07 (OMAP3EVM)
[ 0.371826] VFS: Disk quotas dquot_6.5.2
[ 0.371917] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.373718] JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.374359] msgmni has been set to 327
[ 0.378326] io scheduler noop registered
[ 0.378326] io scheduler deadline registered
[ 0.378479] io scheduler cfq registered (default)
[ 0.442626] OMAP DSS rev 2.0
[ 0.442962] OMAP DISPC rev 3.0
[ 0.443054] OMAP VENC rev 2
[ 0.443817] OMAP DSI rev 1.0
[ 0.773437] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.779266] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
[ 1.612915] console [ttyO0] enabled
[ 1.617858] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
[ 1.626251] omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
[ 1.634643] omap_uart.3: ttyO3 at MMIO 0x49042000 (irq = 80) is a OMAP UART3
[ 1.671539] brd: module loaded
[ 1.688842] loop: module loaded
[ 1.698242] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 1.705108] omap2-nand driver initializing
[ 1.709960] NAND device: Manufacturer ID: 0xad, Chip ID: 0xbc (Hynix )
[ 1.716888] Creating 5 MTD partitions on "omap2-nand.0":
[ 1.722442] 0x000000000000-0x000000080000 : "X-Loader-NAND"
[ 1.734588] 0x000000080000-0x0000001c0000 : "U-Boot-NAND"
[ 1.745056] 0x0000001c0000-0x000000280000 : "Boot Env-NAND"
[ 1.755615] 0x000000280000-0x000000780000 : "Kernel-NAND"
[ 1.767639] 0x000000780000-0x000020000000 : "File System - NAND"
[ 2.017730] OneNAND driver initializing
[ 2.022064] omap2-onenand omap2-onenand: Cannot request GPMC CS
[ 2.028442] omap2-onenand: probe of omap2-onenand failed with error -16
[ 2.038269] smsc911x: Driver version 2008-10-21.
[ 2.048095] smsc911x-mdio: probed
[ 2.052032] eth0: attached PHY driver [SMSC LAN8700] (mii_bus:phy_addr=ffffffff:01, irq=-1)
[ 2.062225] net eth0: MAC Address: 00:50:c2:7e:96:63
[ 2.068572] usbcore: registered new interface driver asix
[ 2.074676] usbcore: registered new interface driver cdc_ether
[ 2.081298] usbcore: registered new interface driver net1080
[ 2.087738] usbcore: registered new interface driver cdc_subset
[ 2.094390] usbcore: registered new interface driver zaurus
[ 2.100311] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 3.114257] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
[ 3.121398] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
[ 3.129699] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
[ 3.145599] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
[ 3.152191] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 3.159332] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.166931] usb usb1: Product: OMAP-EHCI Host Controller
[ 3.172515] usb usb1: Manufacturer: Linux 2.6.37 ehci_hcd
[ 3.178161] usb usb1: SerialNumber: ehci-omap.0
[ 3.186523] hub 1-0:1.0: USB hub found
[ 3.190551] hub 1-0:1.0: 3 ports detected
[ 3.224365] Initializing USB Mass Storage driver...
[ 3.230072] usbcore: registered new interface driver usb-storage
[ 3.236389] USB Mass Storage support registered.
[ 3.241821] usbcore: registered new interface driver usbtest
[ 3.247863] g_ether gadget: using random self ethernet address
[ 3.253997] g_ether gadget: using random host ethernet address
[ 3.261596] usb0: MAC de:fc:ed:60:01:fc
[ 3.265686] usb0: HOST MAC 06:0b:2c:0a:49:1b
[ 3.270172] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[ 3.277160] g_ether gadget: g_ether ready
[ 3.281372] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
[ 3.287139] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 2
[ 3.295867] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 3.303039] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.310607] usb usb2: Product: MUSB HDRC host driver
[ 3.315795] usb usb2: Manufacturer: Linux 2.6.37 musb-hcd
[ 3.321472] usb usb2: SerialNumber: musb-hdrc.0
[ 3.328765] hub 2-0:1.0: USB hub found
[ 3.332794] hub 2-0:1.0: 1 port detected
[ 3.340759] mice: PS/2 mouse device common for all mice
[ 3.348968] input: TWL4030 Keypad as /devices/platform/omap/omap_i2c.1/i2c-1/1-004a/twl4030_keypad/input/input0
[ 3.366729] ads7846 spi1.0: touchscreen, irq 335
[ 3.373535] input: ADS7846 Touchscreen as /devices/platform/omap2_mcspi.1/spi1.0/input/input1
[ 3.387817] input: twl4030_pwrbutton as /devices/platform/omap/omap_i2c.1/i2c-1/1-0049/twl4030_pwrbutton/input/input2
[ 3.402069] twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0
[ 3.408935] twl_rtc twl_rtc: Power up reset detected.
[ 3.415008] twl_rtc twl_rtc: Enabling TWL-RTC.
[ 3.421325] i2c /dev entries driver
[ 3.429565] Linux media interface: v0.10
[ 3.434143] Linux video capture interface: v2.00
[ 3.441070] omap3isp supply VDD_CSIPHY1 not found, using dummy regulator
[ 3.448181] omap3isp supply VDD_CSIPHY2 not found, using dummy regulator
[ 3.455596] omap3isp omap3isp: Revision 15.0 found
[ 3.460876] omap-iommu omap-iommu.0: isp: version 1.1
[ 3.533935] mt9t111 2-003c: Unable to detectmt9t111sensor
[ 3.544708] isp_register_subdev_group: Unable to register subdev mt9t111
[ 3.553100] tvp514x 3-005c: tvp514x 3-005c decoder driver registered !!
[ 3.564056] tvp514x 3-005c: tvp5146m2 (Version - 0x03) found at 0xb8 (OMAP I2C adapter)
[ 3.579376] usbcore: registered new interface driver uvcvideo
[ 3.585449] USB Video Class driver (v1.0.0)
[ 3.590087] omap_device: omap_wdt.-1: new worst case activate latency 0: 30517
[ 3.599151] OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
[ 3.605468] omap_device: omap_wdt.-1: new worst case deactivate latency 0: 30517
[ 3.613800] Bluetooth: HCI UART driver ver 2.2
[ 3.618499] Bluetooth: HCI H4 protocol initialized
[ 3.623535] Bluetooth: HCILL protocol initialized
[ 3.636505] mmci-omap-hs.1 supply vmmc_aux not found, using dummy regulator
[ 3.649383] usbcore: registered new interface driver usbhid
[ 3.655273] usbhid: USB HID core driver
[ 3.661834] usbcore: registered new interface driver snd-usb-audio
[ 3.671966] OMAP3 EVM SoC init
[ 3.676849] omap_device: omap_i2c.1: new worst case deactivate latency 0: 61035
[ 3.772003] asoc: twl4030-hifi <-> omap-mcbsp-dai.1 mapping ok
[ 3.783691] ALSA device list:
[ 3.786895] #0: omap3evm
[ 3.789703] oprofile: hardware counters not available
[ 3.795013] oprofile: using timer interrupt.
[ 3.799621] nf_conntrack version 0.5.0 (2621 buckets, 10484 max)
[ 3.807250] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 3.813354] TCP cubic registered
[ 3.816741] Initializing XFRM netlink socket
[ 3.821380] NET: Registered protocol family 17
[ 3.826141] NET: Registered protocol family 15
[ 3.831390] Bluetooth: L2CAP ver 2.15
[ 3.835266] Bluetooth: L2CAP socket layer initialized
[ 3.840606] Bluetooth: SCO (Voice Link) ver 0.6
[ 3.845367] Bluetooth: SCO socket layer initialized
[ 3.850891] Bluetooth: RFCOMM TTY layer initialized
[ 3.856018] Bluetooth: RFCOMM socket layer initialized
[ 3.861450] Bluetooth: RFCOMM ver 1.11
[ 3.865386] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 3.870941] Bluetooth: BNEP filters: protocol multicast
[ 3.876434] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 3.884094] Registering the dns_resolver key type
[ 3.889495] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 3.901672] ThumbEE CPU extension supported.
[ 3.917602] Power Management for TI OMAP3.
[ 3.922515] sr_init: No PMIC hook to init smartreflex
[ 3.928253] smartreflex smartreflex.0: omap_sr_probe: SmartReflex driver initialized
[ 3.936889] smartreflex smartreflex.1: omap_sr_probe: SmartReflex driver initialized
[ 3.949066] SmartReflex Class3 initialized
[ 3.983917] clock: disabling unused clocks to save power
[ 3.991394] platform mpu.0: omap_voltage_scale: Already at the requestedrate 1000000000
[ 4.094055] twl_rtc twl_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[ 4.102844] omap_vout omap_vout: Buffer Size = 3686400
[ 4.121337] omap_vout omap_vout: : registered and initialized video device 16
[ 4.128906] omap_vout omap_vout: Buffer Size = 3686400
[ 4.136077] omap_vout omap_vout: : registered and initialized video device 17
[ 4.147491] Waiting for root device /dev/mmcblk0p2...
[ 4.169097] mmc0: new high speed SDHC card at address b368
[ 4.176818] mmcblk0: mmc0:b368 USD 3.75 GiB
[ 4.186645] mmcblk0: p1 p2
[ 4.269927] EXT3-fs: barriers not enabled
[ 10.545654] kjournald starting. Commit interval 5 seconds
[ 10.917144] EXT3-fs (mmcblk0p2): using internal journal
[ 10.922698] EXT3-fs (mmcblk0p2): recovery complete
[ 10.931701] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[ 10.939361] VFS: Mounted root (ext3 filesystem) on device 179:2.
[ 10.945800] Freeing init memory: 220K
INIT: version 2.86 booting
Please wait: booting...
Starting udev
[ 11.718750] udevd (735): /proc/735/oom_adj is deprecated, please use /proc/735/oom_score_adj instead.
Remounting root file system...
Caching udev devnodes
Populating dev cachemv: cannot rename '/tmp/devices': No such file or directory
ALSA: Restoring mixer settings...
No state is present for card omap3evm
Found hardware: "" "" "" "" ""
Hardware is initialized using a generic method
Configuring network interfaces... No state is present for card omap3evm
[ 27.751403] net eth0: SMSC911x/921x identified at 0xd0884000, IRQ: 336
eth0 no wireless extensions.

udhcpc (v1.13.2) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
done.
Setting up IP spoofing protection: rp_filter.
Fri Dec 23 00:34:00 UTC 2011
INIT: Entering runlevel: 5
Starting system message bus: dbus.
Starting Dropbear SSH server: dropbear.
Starting telnet daemon.
Starting network benchmark server: netserver.
Starting syslogd/klogd: done
Starting thttpd.
Starting PVR
[ 41.609100]
[ 41.609130] =============================================
[ 41.616302] [ INFO: possible recursive locking detected ]
[ 41.621948] 2.6.37 #1
[ 41.624328] ---------------------------------------------
[ 41.629943] pvrsrvinit/2142 is trying to acquire lock:
[ 41.635314] (psPVRSRVMutex){+.+.+.}, at: [<bf00bbc8>] PVRMMapRegisterArea+0x14/0x68 [pvrsrvkm]
[ 41.644561]
[ 41.644561] but task is already holding lock:
[ 41.650634] (psPVRSRVMutex){+.+.+.}, at: [<bf00eb34>] PVRSRV_BridgeDispatchKM+0x20/0x16c [pvrsrvkm]
[ 41.660247]
[ 41.660247] other info that might help us debug this:
[ 41.667083] 1 lock held by pvrsrvinit/2142:
[ 41.671447] #0: (psPVRSRVMutex){+.+.+.}, at: [<bf00eb34>] PVRSRV_BridgeDispatchKM+0x20/0x16c [pvrsrvkm]
[ 41.681518]
[ 41.681518] stack backtrace:
[ 41.686096] [<c004faf0>] (unwind_backtrace+0x0/0xec) from [<c00a91ac>] (__lock_acquire+0xf98/0x18d0)
[ 41.695648] [<c00a91ac>] (__lock_acquire+0xf98/0x18d0) from [<c00a9bb8>] (lock_acquire+0xd4/0xf4)
[ 41.704925] [<c00a9bb8>] (lock_acquire+0xd4/0xf4) from [<c047375c>] (mutex_lock_nested+0x5c/0x2d8)
[ 41.714324] [<c047375c>] (mutex_lock_nested+0x5c/0x2d8) from [<bf00bbc8>] (PVRMMapRegisterArea+0x14/0x68 [pvrsrvkm])
[ 41.725433] [<bf00bbc8>] (PVRMMapRegisterArea+0x14/0x68 [pvrsrvkm]) from [<bf00e944>] (OSAllocPages_Impl+0x68/0xa4 [pvrsrvkm])
[ 41.737426] [<bf00e944>] (OSAllocPages_Impl+0x68/0xa4 [pvrsrvkm]) from [<bf0052e8>] (BM_ImportMemory+0xe4/0x290 [pvrsrvkm])
[ 41.749145] [<bf0052e8>] (BM_ImportMemory+0xe4/0x290 [pvrsrvkm]) from [<bf009b0c>] (RA_Alloc+0xb4/0x288 [pvrsrvkm])
[ 41.760131] [<bf009b0c>] (RA_Alloc+0xb4/0x288 [pvrsrvkm]) from [<bf004cb0>] (BM_Alloc+0xa8/0x280 [pvrsrvkm])
[ 41.770477] [<bf004cb0>] (BM_Alloc+0xa8/0x280 [pvrsrvkm]) from [<bf00aac0>] (AllocDeviceMem+0x80/0x108 [pvrsrvkm])
[ 41.781402] [<bf00aac0>] (AllocDeviceMem+0x80/0x108 [pvrsrvkm]) from [<bf00afd8>] (_PVRSRVAllocDeviceMemKM+0x80/0x158 [pvrsrvkm])
[ 41.793670] [<bf00afd8>] (_PVRSRVAllocDeviceMemKM+0x80/0x158 [pvrsrvkm]) from [<bf015190>] (PVRSRVAllocDeviceMemBW+0x9c/0x1a0 [pvrsrvkm])
[ 41.806701] [<bf015190>] (PVRSRVAllocDeviceMemBW+0x9c/0x1a0 [pvrsrvkm]) from [<bf012d24>] (BridgedDispatchKM+0xd4/0x12c [pvrsrvkm])
[ 41.819152] [<bf012d24>] (BridgedDispatchKM+0xd4/0x12c [pvrsrvkm]) from [<bf00ec28>] (PVRSRV_BridgeDispatchKM+0x114/0x16c [pvrsrvkm])
[ 41.831756] [<bf00ec28>] (PVRSRV_BridgeDispatchKM+0x114/0x16c [pvrsrvkm]) from [<c0116cf8>] (do_vfs_ioctl+0x4e0/0x54c)
[ 41.842956] [<c0116cf8>] (do_vfs_ioctl+0x4e0/0x54c) from [<c0116db4>] (sys_ioctl+0x50/0x74)
[ 41.851684] [<c0116db4>] (sys_ioctl+0x50/0x74) from [<c0049cc0>] (ret_fast_syscall+0x0/0x3c)
[ 41.901855] CMEMK module: built on Dec 22 2011 at 23:52:43
[ 41.907684] Reference Linux version 2.6.37
[ 41.912139] File /datalocal/DVSDK43_HPDL380G7/arago-tmp/work/dm37x-evm-arago-linux-gnueabi/ti-linuxutils-1_2_26_02_05-r102d/linuxutils_2_26_02_05/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
[ 41.930938] CMEM Range Overlaps Kernel Physical - allowing overlap
[ 41.937438] CMEM phys_start (0x83700000) overlaps kernel (0x80000000 -> 0x8b300000)
[ 41.946868] allocated heap buffer 0xd2000000 of size 0x2200000
[ 41.953002] heap fallback enabled - will try heap if pool buffer is not available
[ 41.960876] cmemk initialized
[ 42.061828] DSPLINK Module (1.65.01.05_eng) created on Date: Dec 22 2011 Time: 23:55:34
[ 42.868041] SDMAK module: built on Dec 22 2011 at 23:52:50
[ 42.873870] Reference Linux version 2.6.37
[ 42.878326] File /datalocal/DVSDK43_HPDL380G7/arago-tmp/work/dm37x-evm-arago-linux-gnueabi/ti-linuxutils-1_2_26_02_05-r102d/linuxutils_2_26_02_05/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c
numid=49,iface=MIXER,name='HeadsetL Mixer AudioL1'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=46,iface=MIXER,name='HeadsetR Mixer AudioR1'
; type=BOOLEAN,access=rw------,values=1
: values=on
Simple mixer control 'Headset',0
Capabilities: pvolume penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 3
Mono:
Front Left: Playback 1 [33%] [-6.00dB]
Front Right: Playback 1 [33%] [-6.00dB]
Starting Matrix GUI application.

_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|

Arago Project http://arago-project.org dm37x-evm ttyO0

Arago 2011.06 dm37x-evm ttyO0

dm37x-evm login: root
root@dm37x-evm:~# /usr/share/ti/ti-dmai-apps/video_loopback_copy_dm3730.x470MV -
O lcd -I composite

Media: Opened Media Device
Enumerating media entities
[1]:OMAP3 ISP CCP2
[2]:OMAP3 ISP CCP2 input
[3]:OMAP3 ISP CSI2a
[4]:OMAP3 ISP CSI2a output
[5]:OMAP3 ISP CCDC
[6]:OMAP3 ISP CCDC output
[7]:OMAP3 ISP preview
[8]:OMAP3 ISP preview input
[9]:OMAP3 ISP preview output
[10]:OMAP3 ISP resizer
[11]:OMAP3 ISP resizer input
[12]:OMAP3 ISP resizer output
[13]:OMAP3 ISP AEWB
[14]:OMAP3 ISP AF
[15]:OMAP3 ISP histogram
[17]:tvp514x 3-005c
[17]:tvp514x 3-005c
Total number of entities: 17
Enumerating links/pads for entities
pads for entity 1=(0 INPUT) (1 OUTPUT)
[1:1]===>[5:0] INACTIVE

pads for entity 2=(0 OUTPUT)
[2:0]===>[1:0] INACTIVE

pads for entity 3=(0 INPUT) (1 OUTPU[ 72.254028] tvp514x 3-005c: tvp5146m2 (Version - 0x03) found at 0xb8 (OMAP I2C adapter)
T)
[3:1]===>[4:0] INACTIVE
[3:1]===>[5:0] INACTIVE

pads for entity 4=(0 INPUT)

pads for entity 5=(0 INPUT) (1 OUTPUT) (2 OUTPUT)
[5:1]===>[6:0] INACTIVE
[5:2]===>[7:0] INACTIVE
[5:1]===>[10:0] INACTIVE
[5:2]===>[13:0] ACTIVE
[5:2]===>[14:0] ACTIVE
[5:2]===>[15:0] ACTIVE

pads for entity 6=(0 INPUT)

pads for entity 7=(0 INPUT) (1 OUTPUT)
[7:1]===>[9:0] INACTIVE
[7:1]===>[10:0] INACTIVE

pads for entity 8=(0 OUTPUT)
[8:0]===>[7:0] INACTIVE

pads for entity 9=(0 INPUT)

pads for entity 10=(0 INPUT) (1 OUTPUT)
[10:1]===>[12:0] INACTIVE

pads for entity 11=(0 OUTPUT)
[11:0]===>[10:0] INACTIVE

pads for entity 12=(0 INPUT)

pads for entity 13=(0 INPUT)

pads for entity 14=(0 INPUT)

pads for entity 15=(0 INPUT)

pads for entity 17=(0 OUTPUT)
[17:0]===>[5:0] INACTIVE

pads for entity 17=(0 OUTPUT)
[17:0]===>[5:0] INACTIVE

Enabling link [tvp5146]===>[ccdc]
[tvp514x]===>[ccdc] enabled
Enabling link [ccdc]===>[video_node]
[ccdc]===>[video_node] enabled
Capture: Current Input: camera
VIDIOC_S_INPUT: Invalid argument
Capture: Input changed to: camera
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Inval
root@dm37x-evm:~#

The same application with DVSDK_4206(Linux 2.6.32) is working fine.

Please let me know if you need more info on the same.

Regards,

Bharath S

OMAP3_EVM # print
bootcmd=if mmc init; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run nandboot; fi; fi; else run nandboot; fi
bootdelay=10
baudrate=115200
bootfile=uImage
loadaddr=0x82000000
usbtty=cdc_acm
console=ttyO0,115200n8
mmcargs=setenv bootargs console=${console} root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait omap_vout.vid1_static_vrfb_alloc=y
nandargs=setenv bootargs console=${console} root=/dev/mtdblock4 rw rootfstype=jffs2
loadbootscript=fatload mmc 0 ${loadaddr} boot.scr
bootscript=echo Running bootscript from mmc ...; source ${loadaddr}
loaduimage=fatload mmc 0 ${loadaddr} uImage
mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${loadaddr}
nandboot=echo Booting from nand ...; run nandargs; onenand read ${loadaddr} 280000 400000; bootm ${loadaddr}
stdin=serial
stdout=serial
stderr=serial
dieid#=219800011ff0000001592f350100301d
ethact=smc911x-0

Environment size: 909/131068 bytes
OMAP3_EVM # boot
mmc1 is available
reading boot.scr

302 bytes read
Running bootscript from mmc ...
## Executing script at 82000000
reading uImage

3289936 bytes read
## Booting kernel from Legacy Image at 80200000 ...
   Image Name:   Arago/2.6.37-psp04.02.00.07.sdk/
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3289872 Bytes = 3.1 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Linux version 2.6.37 (a0876316@bangdvsdkdev01) (gcc version 4.3.3 (GCC) ) #1 Thu Dec 22 23:02:19 IST 2011
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: OMAP3 EVM
[    0.000000] Reserving 4194304 bytes SDRAM for VRAM
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] OMAP3630 ES1.1 (l2cache iva sgx neon isp 192mhz_clk )
[    0.000000] SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x10000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 45312
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw ip=off mem=55M@0x80000000 mpurate=1000  omap_vout.vid1_static_vrfb_alloc=y omapfb.vram=0:4M mem=128M@0x88000000 rootwait
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 55MB 124MB = 179MB total
[    0.000000] Memory: 167756k/167756k available, 19636k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
[    0.000000]     vmalloc : 0xd0800000 - 0xf8000000   ( 632 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .init : 0xc0008000 - 0xc003f000   ( 220 kB)
[    0.000000]       .text : 0xc003f000 - 0xc06254ec   (6042 kB)
[    0.000000]       .data : 0xc0626000 - 0xc07e8560   (1802 kB)
[    0.000000] NR_IRQS:409
[    0.000000] Clocking rate (Crystal/Core/MPU): 26.0/400/1000 MHz
[    0.000000] omap_hwmod: i2c1: softreset failed (waited 10000 usec)
[    0.000000] omap_hwmod: i2c2: softreset failed (waited 10000 usec)
[    0.000000] omap_hwmod: i2c3: softreset failed (waited 10000 usec)
[    0.000000] Reprogramming SDRC clock to 400000000 Hz
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
[    0.000000] Total of 96 interrupts on 1 active controller
[    0.000000] GPMC revision 5.0
[    0.000000] Trying to install interrupt handler for IRQ402
[    0.000000] Trying to install interrupt handler for IRQ403
[    0.000000] Trying to install interrupt handler for IRQ404
[    0.000000] Trying to install interrupt handler for IRQ405
[    0.000000] Trying to install interrupt handler for IRQ406
[    0.000000] Trying to install interrupt handler for IRQ407
[    0.000000] Trying to install interrupt handler for IRQ408
[    0.000000] Trying to install type control for IRQ409
[    0.000000] Trying to set irq flags for IRQ409
[    0.000000] OMAP clockevent source: GPTIMER1 at 32768 Hz
[    0.000000] Console: colour dummy device 80x30
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000000] ... MAX_LOCK_DEPTH:          48
[    0.000000] ... MAX_LOCKDEP_KEYS:        8191
[    0.000000] ... CLASSHASH_SIZE:          4096
[    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384
[    0.000000] ... MAX_LOCKDEP_CHAINS:      32768
[    0.000000] ... CHAINHASH_SIZE:          16384
[    0.000000]  memory used by lock dependency info: 3951 kB
[    0.000000]  per task-struct memory footprint: 2304 bytes
[    0.000000] Calibrating delay loop... 998.84 BogoMIPS (lpj=3899392)
[    0.000000] pid_max: default: 32768 minimum: 301
[    0.000000] Security Framework initialized
[    0.000000] Mount-cache hash table entries: 512
[    0.000000] CPU: Testing write buffer coherency: ok
[    0.000000] regulator: core version 0.5
[    0.000000] regulator: dummy: 
[    0.000000] NET: Registered protocol family 16
[    0.000000] OMAP GPIO hardware version 2.5
[    0.000000] OMAP GPIO hardware version 2.5
[    0.000000] OMAP GPIO hardware version 2.5
[    0.000000] OMAP GPIO hardware version 2.5
[    0.000000] OMAP GPIO hardware version 2.5
[    0.000000] OMAP GPIO hardware version 2.5
[    0.000000] omap_mux_init: Add partition: #1: core, flags: 0
[    0.000000] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: at arch/arm/mach-omap2/clock.c:438 omap2_clk_switch_mpurate_at_boot+0x80/0xb4()
[    0.000000] clock: dpll1_ck: unable to set MPU rate to 1000: -22
[    0.000000] Modules linked in:
[    0.000000] [<c004faf0>] (unwind_backtrace+0x0/0xec) from [<c00790c4>] (warn_slowpath_common+0x4c/0x64)
[    0.000000] [<c00790c4>] (warn_slowpath_common+0x4c/0x64) from [<c0079170>] (warn_slowpath_fmt+0x30/0x40)
[    0.000000] [<c0079170>] (warn_slowpath_fmt+0x30/0x40) from [<c00138ac>] (omap2_clk_switch_mpurate_at_boot+0x80/0xb4)
[    0.000000] [<c00138ac>] (omap2_clk_switch_mpurate_at_boot+0x80/0xb4) from [<c00138ec>] (omap3xxx_clk_arch_init+0xc/0x3c)
[    0.000000] [<c00138ec>] (omap3xxx_clk_arch_init+0xc/0x3c) from [<c003f3c8>] (do_one_initcall+0xc8/0x198)
[    0.000000] [<c003f3c8>] (do_one_initcall+0xc8/0x198) from [<c000869c>] (kernel_init+0x98/0x150)
[    0.000000] [<c000869c>] (kernel_init+0x98/0x150) from [<c004ad10>] (kernel_thread_exit+0x0/0x8)
[    0.000000] ---[ end trace 1b75b31a2719ed1c ]---
[    0.000000] OMAP DMA hardware revision 5.0
[    0.078796] bio: create slab <bio-0> at 0
[    0.082275] regulator: vwl1271: 1800 mV 
[    0.085998] SCSI subsystem initialized
[    0.094757] usbcore: registered new interface driver usbfs
[    0.095672] usbcore: registered new interface driver hub
[    0.096313] usbcore: registered new device driver usb
[    0.112854] omap_i2c omap_i2c.1: bus 1 rev4.0 at 2600 kHz
[    0.120666] twl4030: PIH (irq 7) chaining IRQs 368..375
[    0.120788] twl4030: power (irq 373) chaining IRQs 376..383
[    0.122436] twl4030: gpio (irq 368) chaining IRQs 384..401
[    0.134429] regulator: VIO: 1800 mV normal standby
[    0.136352] regulator: VMMC1: 1850 <--> 3150 mV at 3000 mV normal standby
[    0.138305] regulator: VDAC: 1800 mV normal standby
[    0.140106] regulator: VAUX2_4030: 2800 mV normal standby
[    0.141998] regulator: VPLL2: 1800 mV normal standby
[    0.143859] regulator: VSIM: 1800 <--> 3000 mV at 1800 mV normal standby
[    0.145782] regulator: VAUX3: 2800 mV normal standby
[    0.146636] omap_device: omap_i2c.1: new worst case deactivate latency 0: 30517
[    0.146881] omap_i2c omap_i2c.2: bus 2 rev4.0 at 400 kHz
[    0.159637] omap_i2c omap_i2c.3: bus 3 rev4.0 at 400 kHz
[    0.163879] Advanced Linux Sound Architecture Driver Version 1.0.23.
[    0.166442] Bluetooth: Core ver 2.15
[    0.167022] NET: Registered protocol family 31
[    0.167022] Bluetooth: HCI device and connection manager initialized
[    0.167114] Bluetooth: HCI socket layer initialized
[    0.168823] Switching to clocksource 32k_counter
[    0.252807] musb-hdrc: version 6.0, otg (peripheral+host), debug=0
[    0.253082] musb-hdrc musb-hdrc.0: dma type: dma-inventra
[    0.253784] musb-hdrc musb-hdrc.0: USB OTG mode controller at fa0ab000 using DMA, IRQ 92
[    0.255218] NET: Registered protocol family 2
[    0.255615] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.256774] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.257019] TCP bind hash table entries: 8192 (order: 6, 360448 bytes)
[    0.259552] TCP: Hash tables configured (established 8192 bind 8192)
[    0.259613] TCP reno registered
[    0.259643] UDP hash table entries: 128 (order: 1, 12288 bytes)
[    0.259826] UDP-Lite hash table entries: 128 (order: 1, 12288 bytes)
[    0.260467] NET: Registered protocol family 1
[    0.261505] RPC: Registered udp transport module.
[    0.261505] RPC: Registered tcp transport module.
[    0.261535] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.262207] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.264984] omap_device: omap_i2c.1: new worst case activate latency 0: 61035
[    0.267150] omap3evm camera init done successfully...
[    0.267669] omap-iommu omap-iommu.0: isp registered
[    0.268249] AM37x/DM37x  Linux PSP version 04.02.00.07 (OMAP3EVM)
[    0.371826] VFS: Disk quotas dquot_6.5.2
[    0.371917] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.373718] JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.374359] msgmni has been set to 327
[    0.378326] io scheduler noop registered
[    0.378326] io scheduler deadline registered
[    0.378479] io scheduler cfq registered (default)
[    0.442626] OMAP DSS rev 2.0
[    0.442962] OMAP DISPC rev 3.0
[    0.443054] OMAP VENC rev 2
[    0.443817] OMAP DSI rev 1.0
[    0.773437] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.779266] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
[    1.612915] console [ttyO0] enabled
[    1.617858] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
[    1.626251] omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
[    1.634643] omap_uart.3: ttyO3 at MMIO 0x49042000 (irq = 80) is a OMAP UART3
[    1.671539] brd: module loaded
[    1.688842] loop: module loaded
[    1.698242] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.705108] omap2-nand driver initializing
[    1.709960] NAND device: Manufacturer ID: 0xad, Chip ID: 0xbc (Hynix )
[    1.716888] Creating 5 MTD partitions on "omap2-nand.0":
[    1.722442] 0x000000000000-0x000000080000 : "X-Loader-NAND"
[    1.734588] 0x000000080000-0x0000001c0000 : "U-Boot-NAND"
[    1.745056] 0x0000001c0000-0x000000280000 : "Boot Env-NAND"
[    1.755615] 0x000000280000-0x000000780000 : "Kernel-NAND"
[    1.767639] 0x000000780000-0x000020000000 : "File System - NAND"
[    2.017730] OneNAND driver initializing
[    2.022064] omap2-onenand omap2-onenand: Cannot request GPMC CS
[    2.028442] omap2-onenand: probe of omap2-onenand failed with error -16
[    2.038269] smsc911x: Driver version 2008-10-21.
[    2.048095] smsc911x-mdio: probed
[    2.052032] eth0: attached PHY driver [SMSC LAN8700] (mii_bus:phy_addr=ffffffff:01, irq=-1)
[    2.062225] net eth0: MAC Address: 00:50:c2:7e:96:63
[    2.068572] usbcore: registered new interface driver asix
[    2.074676] usbcore: registered new interface driver cdc_ether
[    2.081298] usbcore: registered new interface driver net1080
[    2.087738] usbcore: registered new interface driver cdc_subset
[    2.094390] usbcore: registered new interface driver zaurus
[    2.100311] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.114257] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
[    3.121398] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
[    3.129699] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
[    3.145599] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
[    3.152191] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.159332] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.166931] usb usb1: Product: OMAP-EHCI Host Controller
[    3.172515] usb usb1: Manufacturer: Linux 2.6.37 ehci_hcd
[    3.178161] usb usb1: SerialNumber: ehci-omap.0
[    3.186523] hub 1-0:1.0: USB hub found
[    3.190551] hub 1-0:1.0: 3 ports detected
[    3.224365] Initializing USB Mass Storage driver...
[    3.230072] usbcore: registered new interface driver usb-storage
[    3.236389] USB Mass Storage support registered.
[    3.241821] usbcore: registered new interface driver usbtest
[    3.247863] g_ether gadget: using random self ethernet address
[    3.253997] g_ether gadget: using random host ethernet address
[    3.261596] usb0: MAC de:fc:ed:60:01:fc
[    3.265686] usb0: HOST MAC 06:0b:2c:0a:49:1b
[    3.270172] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[    3.277160] g_ether gadget: g_ether ready
[    3.281372] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
[    3.287139] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 2
[    3.295867] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    3.303039] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.310607] usb usb2: Product: MUSB HDRC host driver
[    3.315795] usb usb2: Manufacturer: Linux 2.6.37 musb-hcd
[    3.321472] usb usb2: SerialNumber: musb-hdrc.0
[    3.328765] hub 2-0:1.0: USB hub found
[    3.332794] hub 2-0:1.0: 1 port detected
[    3.340759] mice: PS/2 mouse device common for all mice
[    3.348968] input: TWL4030 Keypad as /devices/platform/omap/omap_i2c.1/i2c-1/1-004a/twl4030_keypad/input/input0
[    3.366729] ads7846 spi1.0: touchscreen, irq 335
[    3.373535] input: ADS7846 Touchscreen as /devices/platform/omap2_mcspi.1/spi1.0/input/input1
[    3.387817] input: twl4030_pwrbutton as /devices/platform/omap/omap_i2c.1/i2c-1/1-0049/twl4030_pwrbutton/input/input2
[    3.402069] twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0
[    3.408935] twl_rtc twl_rtc: Power up reset detected.
[    3.415008] twl_rtc twl_rtc: Enabling TWL-RTC.
[    3.421325] i2c /dev entries driver
[    3.429565] Linux media interface: v0.10
[    3.434143] Linux video capture interface: v2.00
[    3.441070] omap3isp supply VDD_CSIPHY1 not found, using dummy regulator
[    3.448181] omap3isp supply VDD_CSIPHY2 not found, using dummy regulator
[    3.455596] omap3isp omap3isp: Revision 15.0 found
[    3.460876] omap-iommu omap-iommu.0: isp: version 1.1
[    3.533935] mt9t111 2-003c: Unable to detectmt9t111sensor
[    3.544708] isp_register_subdev_group: Unable to register subdev mt9t111
[    3.553100] tvp514x 3-005c: tvp514x 3-005c decoder driver registered !!
[    3.564056] tvp514x 3-005c: tvp5146m2 (Version - 0x03) found at 0xb8 (OMAP I2C adapter)
[    3.579376] usbcore: registered new interface driver uvcvideo
[    3.585449] USB Video Class driver (v1.0.0)
[    3.590087] omap_device: omap_wdt.-1: new worst case activate latency 0: 30517
[    3.599151] OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
[    3.605468] omap_device: omap_wdt.-1: new worst case deactivate latency 0: 30517
[    3.613800] Bluetooth: HCI UART driver ver 2.2
[    3.618499] Bluetooth: HCI H4 protocol initialized
[    3.623535] Bluetooth: HCILL protocol initialized
[    3.636505] mmci-omap-hs.1 supply vmmc_aux not found, using dummy regulator
[    3.649383] usbcore: registered new interface driver usbhid
[    3.655273] usbhid: USB HID core driver
[    3.661834] usbcore: registered new interface driver snd-usb-audio
[    3.671966] OMAP3 EVM SoC init
[    3.676849] omap_device: omap_i2c.1: new worst case deactivate latency 0: 61035
[    3.772003] asoc: twl4030-hifi <-> omap-mcbsp-dai.1 mapping ok
[    3.783691] ALSA device list:
[    3.786895]   #0: omap3evm
[    3.789703] oprofile: hardware counters not available
[    3.795013] oprofile: using timer interrupt.
[    3.799621] nf_conntrack version 0.5.0 (2621 buckets, 10484 max)
[    3.807250] ip_tables: (C) 2000-2006 Netfilter Core Team
[    3.813354] TCP cubic registered
[    3.816741] Initializing XFRM netlink socket
[    3.821380] NET: Registered protocol family 17
[    3.826141] NET: Registered protocol family 15
[    3.831390] Bluetooth: L2CAP ver 2.15
[    3.835266] Bluetooth: L2CAP socket layer initialized
[    3.840606] Bluetooth: SCO (Voice Link) ver 0.6
[    3.845367] Bluetooth: SCO socket layer initialized
[    3.850891] Bluetooth: RFCOMM TTY layer initialized
[    3.856018] Bluetooth: RFCOMM socket layer initialized
[    3.861450] Bluetooth: RFCOMM ver 1.11
[    3.865386] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    3.870941] Bluetooth: BNEP filters: protocol multicast
[    3.876434] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    3.884094] Registering the dns_resolver key type
[    3.889495] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    3.901672] ThumbEE CPU extension supported.
[    3.917602] Power Management for TI OMAP3.
[    3.922515] sr_init: No PMIC hook to init smartreflex
[    3.928253] smartreflex smartreflex.0: omap_sr_probe: SmartReflex driver initialized
[    3.936889] smartreflex smartreflex.1: omap_sr_probe: SmartReflex driver initialized
[    3.949066] SmartReflex Class3 initialized
[    3.983917] clock: disabling unused clocks to save power
[    3.991394] platform mpu.0: omap_voltage_scale: Already at the requestedrate 1000000000
[    4.094055] twl_rtc twl_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[    4.102844] omap_vout omap_vout: Buffer Size = 3686400
[    4.121337] omap_vout omap_vout: : registered and initialized video device 16
[    4.128906] omap_vout omap_vout: Buffer Size = 3686400
[    4.136077] omap_vout omap_vout: : registered and initialized video device 17
[    4.147491] Waiting for root device /dev/mmcblk0p2...
[    4.169097] mmc0: new high speed SDHC card at address b368
[    4.176818] mmcblk0: mmc0:b368 USD   3.75 GiB 
[    4.186645]  mmcblk0: p1 p2
[    4.269927] EXT3-fs: barriers not enabled
[   10.545654] kjournald starting.  Commit interval 5 seconds
[   10.917144] EXT3-fs (mmcblk0p2): using internal journal
[   10.922698] EXT3-fs (mmcblk0p2): recovery complete
[   10.931701] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[   10.939361] VFS: Mounted root (ext3 filesystem) on device 179:2.
[   10.945800] Freeing init memory: 220K
INIT: version 2.86 booting
Please wait: booting...
Starting udev
[   11.718750] udevd (735): /proc/735/oom_adj is deprecated, please use /proc/735/oom_score_adj instead.
Remounting root file system...
Caching udev devnodes
Populating dev cachemv: cannot rename '/tmp/devices': No such file or directory
ALSA: Restoring mixer settings...
No state is present for card omap3evm
Found hardware: "" "" "" "" ""
Hardware is initialized using a generic method
Configuring network interfaces... No state is present for card omap3evm
[   27.751403] net eth0: SMSC911x/921x identified at 0xd0884000, IRQ: 336
eth0      no wireless extensions.

udhcpc (v1.13.2) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
done.
Setting up IP spoofing protection: rp_filter.
Fri Dec 23 00:34:00 UTC 2011
INIT: Entering runlevel: 5
Starting system message bus: dbus.
Starting Dropbear SSH server: dropbear.
Starting telnet daemon.
Starting network benchmark server: netserver.
Starting syslogd/klogd: done
Starting thttpd.
Starting PVR
[   41.609100] 
[   41.609130] =============================================
[   41.616302] [ INFO: possible recursive locking detected ]
[   41.621948] 2.6.37 #1
[   41.624328] ---------------------------------------------
[   41.629943] pvrsrvinit/2142 is trying to acquire lock:
[   41.635314]  (psPVRSRVMutex){+.+.+.}, at: [<bf00bbc8>] PVRMMapRegisterArea+0x14/0x68 [pvrsrvkm]
[   41.644561] 
[   41.644561] but task is already holding lock:
[   41.650634]  (psPVRSRVMutex){+.+.+.}, at: [<bf00eb34>] PVRSRV_BridgeDispatchKM+0x20/0x16c [pvrsrvkm]
[   41.660247] 
[   41.660247] other info that might help us debug this:
[   41.667083] 1 lock held by pvrsrvinit/2142:
[   41.671447]  #0:  (psPVRSRVMutex){+.+.+.}, at: [<bf00eb34>] PVRSRV_BridgeDispatchKM+0x20/0x16c [pvrsrvkm]
[   41.681518] 
[   41.681518] stack backtrace:
[   41.686096] [<c004faf0>] (unwind_backtrace+0x0/0xec) from [<c00a91ac>] (__lock_acquire+0xf98/0x18d0)
[   41.695648] [<c00a91ac>] (__lock_acquire+0xf98/0x18d0) from [<c00a9bb8>] (lock_acquire+0xd4/0xf4)
[   41.704925] [<c00a9bb8>] (lock_acquire+0xd4/0xf4) from [<c047375c>] (mutex_lock_nested+0x5c/0x2d8)
[   41.714324] [<c047375c>] (mutex_lock_nested+0x5c/0x2d8) from [<bf00bbc8>] (PVRMMapRegisterArea+0x14/0x68 [pvrsrvkm])
[   41.725433] [<bf00bbc8>] (PVRMMapRegisterArea+0x14/0x68 [pvrsrvkm]) from [<bf00e944>] (OSAllocPages_Impl+0x68/0xa4 [pvrsrvkm])
[   41.737426] [<bf00e944>] (OSAllocPages_Impl+0x68/0xa4 [pvrsrvkm]) from [<bf0052e8>] (BM_ImportMemory+0xe4/0x290 [pvrsrvkm])
[   41.749145] [<bf0052e8>] (BM_ImportMemory+0xe4/0x290 [pvrsrvkm]) from [<bf009b0c>] (RA_Alloc+0xb4/0x288 [pvrsrvkm])
[   41.760131] [<bf009b0c>] (RA_Alloc+0xb4/0x288 [pvrsrvkm]) from [<bf004cb0>] (BM_Alloc+0xa8/0x280 [pvrsrvkm])
[   41.770477] [<bf004cb0>] (BM_Alloc+0xa8/0x280 [pvrsrvkm]) from [<bf00aac0>] (AllocDeviceMem+0x80/0x108 [pvrsrvkm])
[   41.781402] [<bf00aac0>] (AllocDeviceMem+0x80/0x108 [pvrsrvkm]) from [<bf00afd8>] (_PVRSRVAllocDeviceMemKM+0x80/0x158 [pvrsrvkm])
[   41.793670] [<bf00afd8>] (_PVRSRVAllocDeviceMemKM+0x80/0x158 [pvrsrvkm]) from [<bf015190>] (PVRSRVAllocDeviceMemBW+0x9c/0x1a0 [pvrsrvkm])
[   41.806701] [<bf015190>] (PVRSRVAllocDeviceMemBW+0x9c/0x1a0 [pvrsrvkm]) from [<bf012d24>] (BridgedDispatchKM+0xd4/0x12c [pvrsrvkm])
[   41.819152] [<bf012d24>] (BridgedDispatchKM+0xd4/0x12c [pvrsrvkm]) from [<bf00ec28>] (PVRSRV_BridgeDispatchKM+0x114/0x16c [pvrsrvkm])
[   41.831756] [<bf00ec28>] (PVRSRV_BridgeDispatchKM+0x114/0x16c [pvrsrvkm]) from [<c0116cf8>] (do_vfs_ioctl+0x4e0/0x54c)
[   41.842956] [<c0116cf8>] (do_vfs_ioctl+0x4e0/0x54c) from [<c0116db4>] (sys_ioctl+0x50/0x74)
[   41.851684] [<c0116db4>] (sys_ioctl+0x50/0x74) from [<c0049cc0>] (ret_fast_syscall+0x0/0x3c)
[   41.901855] CMEMK module: built on Dec 22 2011 at 23:52:43
[   41.907684]   Reference Linux version 2.6.37
[   41.912139]   File /datalocal/DVSDK43_HPDL380G7/arago-tmp/work/dm37x-evm-arago-linux-gnueabi/ti-linuxutils-1_2_26_02_05-r102d/linuxutils_2_26_02_05/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
[   41.930938] CMEM Range Overlaps Kernel Physical - allowing overlap
[   41.937438] CMEM phys_start (0x83700000) overlaps kernel (0x80000000 -> 0x8b300000)
[   41.946868] allocated heap buffer 0xd2000000 of size 0x2200000
[   41.953002] heap fallback enabled - will try heap if pool buffer is not available
[   41.960876] cmemk initialized
[   42.061828] DSPLINK Module (1.65.01.05_eng) created on Date: Dec 22 2011 Time: 23:55:34
[   42.868041] SDMAK module: built on Dec 22 2011 at 23:52:50
[   42.873870]   Reference Linux version 2.6.37
[   42.878326]   File /datalocal/DVSDK43_HPDL380G7/arago-tmp/work/dm37x-evm-arago-linux-gnueabi/ti-linuxutils-1_2_26_02_05-r102d/linuxutils_2_26_02_05/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c
numid=49,iface=MIXER,name='HeadsetL Mixer AudioL1'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=46,iface=MIXER,name='HeadsetR Mixer AudioR1'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
Simple mixer control 'Headset',0
  Capabilities: pvolume penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 3
  Mono:
  Front Left: Playback 1 [33%] [-6.00dB]
  Front Right: Playback 1 [33%] [-6.00dB]
Starting Matrix GUI application.

 _____                    _____           _         _   
|  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
|     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
|__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
              |___|                    |___|            

Arago Project http://arago-project.org dm37x-evm ttyO0

Arago 2011.06 dm37x-evm ttyO0

dm37x-evm login: root
root@dm37x-evm:~# /usr/share/ti/ti-dmai-apps/video_loopback_copy_dm3730.x470MV -
O lcd -I composite

Media: Opened Media Device
Enumerating media entities
[1]:OMAP3 ISP CCP2
[2]:OMAP3 ISP CCP2 input
[3]:OMAP3 ISP CSI2a
[4]:OMAP3 ISP CSI2a output
[5]:OMAP3 ISP CCDC
[6]:OMAP3 ISP CCDC output
[7]:OMAP3 ISP preview
[8]:OMAP3 ISP preview input
[9]:OMAP3 ISP preview output
[10]:OMAP3 ISP resizer
[11]:OMAP3 ISP resizer input
[12]:OMAP3 ISP resizer output
[13]:OMAP3 ISP AEWB
[14]:OMAP3 ISP AF
[15]:OMAP3 ISP histogram
[17]:tvp514x 3-005c
[17]:tvp514x 3-005c
Total number of entities: 17
Enumerating links/pads for entities
pads for entity 1=(0 INPUT) (1 OUTPUT) 
[1:1]===>[5:0]	INACTIVE 

pads for entity 2=(0 OUTPUT) 
[2:0]===>[1:0]	INACTIVE 

pads for entity 3=(0 INPUT) (1 OUTPU[   72.254028] tvp514x 3-005c: tvp5146m2 (Version - 0x03) found at 0xb8 (OMAP I2C adapter)
T) 
[3:1]===>[4:0]	INACTIVE 
[3:1]===>[5:0]	INACTIVE 

pads for entity 4=(0 INPUT) 

pads for entity 5=(0 INPUT) (1 OUTPUT) (2 OUTPUT) 
[5:1]===>[6:0]	INACTIVE 
[5:2]===>[7:0]	INACTIVE 
[5:1]===>[10:0]	INACTIVE 
[5:2]===>[13:0]	ACTIVE
[5:2]===>[14:0]	ACTIVE
[5:2]===>[15:0]	ACTIVE

pads for entity 6=(0 INPUT) 

pads for entity 7=(0 INPUT) (1 OUTPUT) 
[7:1]===>[9:0]	INACTIVE 
[7:1]===>[10:0]	INACTIVE 

pads for entity 8=(0 OUTPUT) 
[8:0]===>[7:0]	INACTIVE 

pads for entity 9=(0 INPUT) 

pads for entity 10=(0 INPUT) (1 OUTPUT) 
[10:1]===>[12:0]	INACTIVE 

pads for entity 11=(0 OUTPUT) 
[11:0]===>[10:0]	INACTIVE 

pads for entity 12=(0 INPUT) 

pads for entity 13=(0 INPUT) 

pads for entity 14=(0 INPUT) 

pads for entity 15=(0 INPUT) 

pads for entity 17=(0 OUTPUT) 
[17:0]===>[5:0]	INACTIVE 

pads for entity 17=(0 OUTPUT) 
[17:0]===>[5:0]	INACTIVE 

Enabling link [tvp5146]===>[ccdc]
[tvp514x]===>[ccdc]	enabled
Enabling link [ccdc]===>[video_node]
[ccdc]===>[video_node]	enabled
Capture: Current Input: camera
VIDIOC_S_INPUT: Invalid argument
Capture: Input changed to: camera
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Invalid argument
VIDIOC_ENUMSTD: Inval
root@dm37x-evm:~# 

  • Hi Bharath,

    I read in the last rows in your description that the demo works fine with the previous dvsdk (4.02.06) therefore I compare the sources of video_loopback_copy in both dvsdk version and I discover that there are no differences. Have you made some changes in the source code?

    BR

    Tsvetolin Shulev

  • Hi Tsvetolin Shulev,

    Thanks for your fast response.

    I have not made any changes in the source code of the both.

    Regards,

    Bharath S

  • Hi Bharath,

    Could you make the following tests:

    1. Try to start video_loopback_copy from dvsdk-4.02 under dvsdk-4.03

    2. Try to start video_loopback_copy from dvsdk-4.03 under dvsdk-4.02

    Share the results please.

    BR

    Tsvetolin Shulev

  • Hi Tsvetolin Shulev,

    Please find the results of the above mentioned tests:
    1. starting video_loopback_copy from dvsdk-4.02 under dvsdk-4.03:
    root@dm37x-evm:/usr/share/ti/ti-dmai-apps# /usr/share/ti/ti-dmai-apps/video_loopback_copy_dm3730.x470MV -O lcd -I composite
    Failed to detect capture video standard

    2. starting video_loopback_copy from dvsdk-4.03 under dvsdk-4.02:
    root@dm37x-evm:/usr/share/ti/ti-dmai-apps# /usr/share/ti/ti-dmai-apps/video_loopback_copy_dm3730.x470MV -O lcd -I composite
    Failed to detect capture video standard

    As we can see, getting the same error message on both.

    Please find below some more debug information:

    With dvsdk_4206(Linux kernel 2.6.32):

    root@dm37x-evm:/dev# ls -l video*
    crw-rw-rw- 1 root video 81, 0 Mar 24 23:26 video0
    crw-rw-rw- 1 root video 81, 1 Jan 1 2000 video1
    crw-rw-rw- 1 root video 81, 2 Jan 1 2000 video2
    root@dm37x-evm:/dev# cat /sys/class/video4linux/video0/name
    omap3/tvp514x//
    root@dm37x-evm:/dev# cat /sys/class/video4linux/video1/name
    omap_vout
    root@dm37x-evm:/dev# cat /sys/class/video4linux/video2/name
    omap_vout


    With dvsdk_4306(Linux kernel 2.6.37):

    root@dm37x-evm:/dev# ls -l video*
    crw-rw-rw- 1 root video 81, 1 Jan 1 2000 video0
    crw-rw-rw- 1 root video 81, 3 Jan 1 2000 video1
    crw-rw-rw- 1 root video 81, 5 Jan 1 2000 video2
    crw-rw-rw- 1 root video 81, 7 Jan 1 2000 video3
    crw-rw-rw- 1 root video 81, 8 Jan 1 2000 video4
    crw-rw-rw- 1 root video 81, 10 Jan 1 2000 video5
    crw-rw-rw- 1 root video 81, 11 Jan 1 2000 video6
    crw-rw-rw- 1 root video 81, 16 Jan 1 2000 video7
    crw-rw-rw- 1 root video 81, 17 Jan 1 2000 video8
    root@dm37x-evm:/dev# cat /sys/class/video4linux/video0/name
    OMAP3 ISP CCP2 input
    root@dm37x-evm:/dev# cat /sys/class/video4linux/video1/name
    OMAP3 ISP CSI2a output
    root@dm37x-evm:/dev# cat /sys/class/video4linux/video2/name
    OMAP3 ISP CCDC output
    root@dm37x-evm:/dev# cat /sys/class/video4linux/video3/name
    OMAP3 ISP preview input
    root@dm37x-evm:/dev# cat /sys/class/video4linux/video4/name
    OMAP3 ISP preview output
    root@dm37x-evm:/dev# cat /sys/class/video4linux/video5/name
    OMAP3 ISP resizer input
    root@dm37x-evm:/dev# cat /sys/class/video4linux/video6/name
    OMAP3 ISP resizer output
    root@dm37x-evm:/dev# cat /sys/class/video4linux/video7/name
    omap_vout
    root@dm37x-evm:/dev# cat /sys/class/video4linux/video8/name
    omap_vout

    root@dm37x-evm:/dev# ls -l v4l*
    crw-rw-rw- 1 root video 81, 0 Jan 1 2000 v4l-subdev0
    crw-rw-rw- 1 root video 81, 2 Jan 1 2000 v4l-subdev1
    crw-rw-rw- 1 root video 81, 4 Jan 1 2000 v4l-subdev2
    crw-rw-rw- 1 root video 81, 6 Jan 1 2000 v4l-subdev3
    crw-rw-rw- 1 root video 81, 9 Jan 1 2000 v4l-subdev4
    crw-rw-rw- 1 root video 81, 12 Jan 1 2000 v4l-subdev5
    crw-rw-rw- 1 root video 81, 13 Jan 1 2000 v4l-subdev6
    crw-rw-rw- 1 root video 81, 14 Jan 1 2000 v4l-subdev7
    crw-rw-rw- 1 root video 81, 15 Jan 1 2000 v4l-subdev8

    v4l:
    drwxr-xr-x 2 root root 220 Jan 1 2000 by-path

    root@dm37x-evm:/dev# cat /sys/class/video4linux/v4l-subdev0/name
    OMAP3 ISP CCP2
    root@dm37x-evm:/dev# cat /sys/class/video4linux/v4l-subdev1/name
    OMAP3 ISP CSI2a
    root@dm37x-evm:/dev# cat /sys/class/video4linux/v4l-subdev2/name
    OMAP3 ISP CCDC
    root@dm37x-evm:/dev# cat /sys/class/video4linux/v4l-subdev3/name
    OMAP3 ISP preview
    root@dm37x-evm:/dev# cat /sys/class/video4linux/v4l-subdev4/name
    OMAP3 ISP resizer
    root@dm37x-evm:/dev# cat /sys/class/video4linux/v4l-subdev5/name
    OMAP3 ISP AEWB
    root@dm37x-evm:/dev# cat /sys/class/video4linux/v4l-subdev6/name
    OMAP3 ISP AF
    root@dm37x-evm:/dev# cat /sys/class/video4linux/v4l-subdev7/name
    OMAP3 ISP histogram
    root@dm37x-evm:/dev# cat /sys/class/video4linux/v4l-subdev8/name
    tvp514x 3-005c

    Can you please explain me why there are only 3 video nodes in kernel 2.6.32 whereas kernel 2.6.37 has 9 video nodes under /dev?
    Also what does v4l-subdev0-8 device nodes represent? I cannot see these nodes in Kernel 2.6.32.
    The kernel 2.6.32 is having omap34xxcam.c and omap34xxcam.h camera driver files. However, in the Kernel 2.6.37 the omap34xxcam.c/omap34xxcam.h files are not
    available.
    How does the camera and V4L2 framework differ from 2.6.32 and 2.6.37?

    Regards,
    Bharath S

  • Hi, 

    Gentle Remainder.

    Can anyone please reply to my queries in above post?

    Thanks in advance.

    Regards,

    Bharath S

  • Hi,

    This is to inform you that the above issue is resolved.

    There was a small change in the application required.

    Please find the attached working saMmaploopback.c.

    /*
     * saMmapLoopback.c
     *
     * Application used to do NTSC loopback in MMAP memory mode
     *
     * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
     *
     * Author: Vaibhav Hiremath <hvaibhav@ti.com>
     *
     *  Redistribution and use in source and binary forms, with or without
     *  modification, are permitted provided that the following conditions
     *  are met:
     *
     *    Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     *    Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the
     *    distribution.
     *
     *    Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     *
    */
    
    
    #include <stdio.h>
    #include <fcntl.h>
    #include <string.h>
    #include <stdlib.h>
    #include <unistd.h>
    #include <getopt.h>
    
    #include <sys/types.h>
    #include <sys/ioctl.h>
    #include <sys/mman.h>
    #include <sys/time.h>
    
    #include <linux/media.h>
    #include <linux/v4l2-mediabus.h>
    #include <linux/v4l2-subdev.h>
    #include <linux/videodev.h>
    #include <linux/videodev2.h>
    
    
    #define CONFIG_OMAP3530 1
    
    /* structure used to store information of the buffers */
    struct buf_info {
    	int index;
    	unsigned int length;
    	char *start;
    };
    
    struct media_dev {
    	/* Media device */
    	int media_fd;
    	/* either tvp5146 or mt9t111 */
    	int input_source;
    	/* All entities */
    	struct media_entity_desc entity[20];
    	/* Entities we do care about */
    	int video;	/* Streaming entity */
    	int ccdc;
    	int tvp5146;
    	int mt9t111;
    
    	/* Total number of entities */
    	unsigned int num_entities;
    };
    
    struct capture_dev {
    	int capture_fd;
    
    	struct v4l2_format capture_fmt;
    	struct v4l2_buffer capture_buf;
    
    	int tvp_input;	/* Only applicable for tvp5146 */
    
    	unsigned int num_bufs;
    	/* Width and height for current input */
    	unsigned int width;
    	unsigned int height;
    };
    
    struct display_dev {
    	int display_fd;
    
    	struct v4l2_format display_fmt;
    	struct v4l2_buffer display_buf;
    
    	unsigned int num_bufs;
    	/* Width and height for current input */
    	unsigned int width;
    	unsigned int height;
    };
    
    /* Changing the following will result in different number of buffers used */
    #if defined (CONFIG_AM3517)
    #define CAPTURE_DEVICE		"/dev/video0"
    #define DISPLAY_DEVICE		"/dev/video1"
    #elif defined (CONFIG_OMAP3530)
    #define CAPTURE_DEVICE		"/dev/video2"
    #define DISPLAY_DEVICE		"/dev/video7"
    #define MEDIA_DEVICE		"/dev/media0"
    
    /* Media entity names */
    #define ENTITY_VIDEO_CCDC_OUT_NAME	"OMAP3 ISP CCDC output"
    #define ENTITY_CCDC_NAME		"OMAP3 ISP CCDC"
    #define ENTITY_TVP514X_NAME		"tvp514x 3-005c"
    #define ENTITY_MT9T111_NAME		"mt9t111 2-003c"
    #endif
    
    #define NUM_BUFFERS     	3
    #define CAPTURE_MAX_BUFFER	NUM_BUFFERS
    #define DISPLAY_MAX_BUFFER	NUM_BUFFERS
    #define CAPTURE_NAME		"Capture"
    #define DISPLAY_NAME		"Display"
    #define MEDIA_NAME		"Media"
    
    /* number of frames to be captured and displayed */
    #define MAXLOOPCOUNT		1000
    
    #define DEF_PIX_FMT		V4L2_PIX_FMT_UYVY
    #define IMG_WIDTH_PAL_NTSC	720
    #define IMG_HEIGHT_NTSC		480
    #define IMG_HEIGHT_PAL		574
    
    #define IMG_WIDTH_VGA		640
    #define IMG_HEIGHT_VGA		480
    
    /* capture_buff_info and display_buff_info stores buffer information of capture
       and display respectively. */
    static struct buf_info capture_buff_info[CAPTURE_MAX_BUFFER];
    static struct buf_info display_buff_info[DISPLAY_MAX_BUFFER];
    
    /* Function declaration */
    static int  open_video_dev(const char *dev, int *capture_fd);
    
    /*
     * Media-Controller Framework:
     *	Setup the Links and formats.
     */
    #if defined (CONFIG_OMAP3530)
    static int media_device_open(struct media_dev *media)
    {
    	/* Open the Media device */
    	media->media_fd = open((const char *) MEDIA_DEVICE, O_RDWR);
    	if (media->media_fd  <= 0) {
    		printf("Cannot open = %s device\n", MEDIA_DEVICE);
    		return -1;
    	}
    	printf("\n%s: Opened Media Device\n", MEDIA_NAME);
    	return 0;
    }
    
    static void media_device_close(int media_fd)
    {
    	/* Close the Media device */
    	close(media_fd);
    }
    
    static int enumerate_all_entities(struct media_dev *media)
    {
    	int ret, index;
    
    	printf("Enumerating media entities\n");
    	index = 0;
    	do {
    		memset(&media->entity[index], 0, sizeof(struct media_entity_desc));
    		media->entity[index].id = index | MEDIA_ENTITY_ID_FLAG_NEXT;
    		ret = ioctl(media->media_fd, MEDIA_IOC_ENUM_ENTITIES, &media->entity[index]);
    		if (ret < 0) {
    			break;
    		} else {
    			if (!strcmp(media->entity[index].name, ENTITY_VIDEO_CCDC_OUT_NAME))
    				media->video =  media->entity[index].id;
    			else if (!strcmp(media->entity[index].name, ENTITY_TVP514X_NAME))
    				media->tvp5146 =  media->entity[index].id;
    			else if (!strcmp(media->entity[index].name, ENTITY_MT9T111_NAME))
    				media->mt9t111 =  media->entity[index].id;
    			else if (!strcmp(media->entity[index].name, ENTITY_CCDC_NAME))
    				media->ccdc =  media->entity[index].id;
    			printf("[%d]:%s\n", media->entity[index].id, media->entity[index].name);
    		}
    		index++;
    	} while (ret == 0);
    
    	if ((ret < 0) && (index <= 0)) {
    		printf("Failed to enumerate entities OR no entity registered - %d\n",
    				ret);
    		return ret;
    	}
    	media->num_entities = index;
    	printf("Total number of entities: %d\n", media->num_entities);
    
    	return 0;
    }
    
    
    static int reset_media_links(struct media_dev *media)
    {
    	struct media_link_desc link;
    	struct media_links_enum links;
    	int ret, index, i;
    
    	/* Open the Media device */
    	ret  = media_device_open(media);
    	if (ret < 0)
    		return ret;
    
    	printf("Resetting all links...\n");
    	for(index = 0; index < media->num_entities; index++) {
    		links.entity = media->entity[index].id;
    		links.pads = malloc(sizeof( struct media_pad_desc) * media->entity[index].pads);
    		links.links = malloc(sizeof(struct media_link_desc) * media->entity[index].links);
    		ret = ioctl(media->media_fd, MEDIA_IOC_ENUM_LINKS, &links);
    		if (ret < 0) {
    			printf("Error while enumeration links/pads - %d\n", ret);
    			break;
    		} else {
    			for(i = 0; i < media->entity[index].links; i++) {
    				link.source.entity = links.links->source.entity;
    				link.source.index = links.links->source.index;
    				link.source.flags = MEDIA_PAD_FLAG_OUTPUT;
    				link.sink.entity = links.links->sink.entity;
    				link.sink.index = links.links->sink.index;
    				link.sink.flags = MEDIA_PAD_FLAG_INPUT;
    				link.flags = (link.flags & ~MEDIA_LINK_FLAG_ENABLED) |
    					(link.flags & MEDIA_LINK_FLAG_IMMUTABLE);
    				ret = ioctl(media->media_fd, MEDIA_IOC_SETUP_LINK, &link);
    				if(ret)
    					break;
    				links.links++;
    			}
    		}
    	}
    	media_device_close(media->media_fd);
    	return 0;
    }
    
    static int setup_media_links(struct media_dev *media)
    {
    	struct media_link_desc link;
    	struct media_links_enum links;
    	int ret, index, i, input;
    
    	printf("Enumerating links/pads for entities\n");
    	for(index = 0; index < media->num_entities; index++) {
    		links.entity = media->entity[index].id;
    		links.pads = malloc(sizeof( struct media_pad_desc) * media->entity[index].pads);
    		links.links = malloc(sizeof(struct media_link_desc) * media->entity[index].links);
    		ret = ioctl(media->media_fd, MEDIA_IOC_ENUM_LINKS, &links);
    		if (ret < 0) {
    			printf("Error while enumeration links/pads - %d\n", ret);
    			break;
    		} else {
    			if(media->entity[index].pads)
    				printf("pads for entity %d=", media->entity[index].id);
    			for(i = 0 ; i < media->entity[index].pads; i++) {
    				printf("(%d %s) ", links.pads->index,
    						(links.pads->flags & MEDIA_PAD_FLAG_INPUT) ?
    						"INPUT" : "OUTPUT");
    				links.pads++;
    			}
    			printf("\n");
    			for(i = 0; i < media->entity[index].links; i++) {
    				printf("[%d:%d]===>[%d:%d]",
    						links.links->source.entity,
    						links.links->source.index,
    						links.links->sink.entity,
    						links.links->sink.index);
    				if(links.links->flags & MEDIA_LINK_FLAG_ENABLED)
    					printf("\tACTIVE\n");
    				else
    					printf("\tINACTIVE \n");
    				links.links++;
    			}
    			printf("\n");
    		}
    	}
    
    	if (media->input_source != 0)
    		input = media->mt9t111;
    	else
    		input = media->tvp5146;
    
    	printf("Enabling link [tvp5146]===>[ccdc]\n");
    	memset(&link, 0, sizeof(link));
    
    	link.flags |=  MEDIA_LINK_FLAG_ENABLED;
    	link.source.entity = input;
    	link.source.index = 0;	/* Only 1 pad */
    	link.source.flags = MEDIA_PAD_FLAG_OUTPUT;
    
    	link.sink.entity = media->ccdc;
    	link.sink.index = 0; /* Sink pad of CCDC, 0 */
    	link.sink.flags = MEDIA_PAD_FLAG_INPUT;
    
    	ret = ioctl(media->media_fd, MEDIA_IOC_SETUP_LINK, &link);
    	if(ret) {
    		printf("failed to enable link between tvp514x and ccdc\n");
    		return ret;
    	} else {
    		printf("[tvp514x]===>[ccdc]\tenabled\n");
    	}
    	/* Enable 'ccdc===>memory' link */
    	printf("Enabling link [ccdc]===>[video_node]\n");
    	memset(&link, 0, sizeof(link));
    
    	link.flags |=  MEDIA_LINK_FLAG_ENABLED;
    	link.source.entity = media->ccdc;
    	link.source.index = 1; /* Source pad of CCDC: 1 */
    	link.source.flags = MEDIA_PAD_FLAG_OUTPUT;
    
    	link.sink.entity = media->video;
    	link.sink.index = 0;
    	link.sink.flags = MEDIA_PAD_FLAG_INPUT;
    
    	ret = ioctl(media->media_fd, MEDIA_IOC_SETUP_LINK, &link);
    	if(ret)
    		printf("failed to enable link between ccdc and video node\n");
    	else
    		printf("[ccdc]===>[video_node]\tenabled\n");
    
    	return ret;
    }
    
    static int set_subdev_format(struct media_dev *media,
    				struct capture_dev *capture)
    {
    	struct v4l2_subdev_format fmt;
    	int tvp_fd, ccdc_fd, ret;
    	char subdev[20];
    
    	/* TODO: Should be having some mechanism to select subdev */
    	ccdc_fd = open("/dev/v4l-subdev2", O_RDWR);
    	if(ccdc_fd == -1) {
    		printf("failed to open %s\n", "/dev/v4l-subdev2");
    		return -1;
    	}
    	memset(&fmt, 0, sizeof(fmt));
    	fmt.pad = 0;
    	fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE;
    	fmt.format.code = V4L2_MBUS_FMT_UYVY8_2X8;
    	fmt.format.width = capture->width;
    	fmt.format.height = capture->height;
    	fmt.format.colorspace = V4L2_COLORSPACE_SMPTE170M;
    	fmt.format.field = V4L2_FIELD_INTERLACED;
    	ret = ioctl(ccdc_fd, VIDIOC_SUBDEV_S_FMT, &fmt);
    	if(ret) {
    		printf("failed to set format on pad %x\n", fmt.pad);
    	}
    
    	memset(&fmt, 0, sizeof(fmt));
    	fmt.pad = 1;
    	fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE;
    	fmt.format.code = V4L2_MBUS_FMT_UYVY8_2X8;
    	fmt.format.width = capture->width;
    	fmt.format.height = capture->height;
    	fmt.format.colorspace = V4L2_COLORSPACE_SMPTE170M;
    	fmt.format.field = V4L2_FIELD_INTERLACED;
    	ret = ioctl(ccdc_fd, VIDIOC_SUBDEV_S_FMT, &fmt);
    	if(ret) {
    		printf("failed to set format on pad %x\n", fmt.pad);
    		return ret;
    	}
    
    	/* Default to tvp5146 */
    	if (media->input_source == 0)
    		strcpy(subdev, "/dev/v4l-subdev8");
    	else
    		strcpy(subdev, "/dev/v4l-subdev9");
    
    	tvp_fd = open(subdev, O_RDWR);
    	if(tvp_fd == -1) {
    		printf("failed to open %s\n", subdev);
    		return -1;
    	}
    
    	memset(&fmt, 0, sizeof(fmt));
    	fmt.pad = 0;
    	fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE;
    	fmt.format.code = V4L2_MBUS_FMT_UYVY8_2X8;
    	fmt.format.width = capture->width;
    	fmt.format.height = capture->height;
    	fmt.format.colorspace = V4L2_COLORSPACE_SMPTE170M;
    	fmt.format.field = V4L2_FIELD_INTERLACED;
    
    	ret = ioctl(tvp_fd, VIDIOC_SUBDEV_S_FMT, &fmt);
    	if(ret) {
    		printf("failed to set format on pad %x\n", fmt.pad);
    		return ret;
    	}
    
    	printf("successfully format is set on all pad [WxH] - [%dx%d]\n",
    			capture->width, capture->height);
    	return ret;
    }
    #endif
    
    static int  open_video_dev(const char *dev, int *capture_fd)
    {
    	/* Open the capture device */
    	*capture_fd  = open((const char *) dev, O_RDWR);
    	if (*capture_fd  <= 0) {
    		printf("Cannot open = %s device\n", dev);
    		return -1;
    	}
    	return 0;
    }
    
    static void close_video_dev(int capture_fd)
    {
    	/* close the device */
    	close(capture_fd);
    }
    
    /*
     * Currently only return width and height.
     */
    static int get_current_capture_format(int input_src, struct capture_dev *capture)
    {
    	struct v4l2_input input;
    	v4l2_std_id std_id;
    	struct v4l2_standard standard;
    	int index;
    
    	/* In case of MT9T111 we only support VGA resoltion */
    	if (input_src != 0) {
    		capture->width = IMG_WIDTH_VGA;
    		capture->height = IMG_HEIGHT_VGA;
    		return 0;
    	}
    
    	/* Get any active input */
    	if (ioctl(capture->capture_fd, VIDIOC_G_INPUT, &index) < 0) {
    		perror("VIDIOC_G_INPUT");
    	}
    
    	/* Enumerate input to get the name of the input detected */
    	memset(&input, 0, sizeof(struct v4l2_input));
    	input.index = index;
    	if (ioctl(capture->capture_fd, VIDIOC_ENUMINPUT, &input) < 0) {
    		perror("VIDIOC_ENUMINPUT");
    	}
    
    	printf("%s: Current Input: %s\n", CAPTURE_NAME, input.name);
    
    	index = capture->tvp_input;
    
    	if (ioctl(capture->capture_fd, VIDIOC_S_INPUT, &index) < 0) {
    		perror("VIDIOC_S_INPUT");
    	}
    	memset(&input, 0, sizeof(struct v4l2_input));
    	input.index = index;
    	if (ioctl(capture->capture_fd, VIDIOC_ENUMINPUT, &input) < 0) {
    		perror("VIDIOC_ENUMINPUT");
    	}
    	printf("%s: Input changed to: %s\n", CAPTURE_NAME, input.name);
    
    
    	/* Detect the standard in the input detected */
    	if (ioctl(capture->capture_fd, VIDIOC_QUERYSTD, &std_id) < 0) {
    		perror("VIDIOC_QUERYSTD");
    	}
    
    	/* Get the standard*/
    	if (ioctl(capture->capture_fd, VIDIOC_G_STD, &std_id) < 0) {
    		/* Note when VIDIOC_ENUMSTD always returns EINVAL this
    		   is no video device or it falls under the USB exception,
    		   and VIDIOC_G_STD returning EINVAL is no error. */
    		perror("VIDIOC_G_STD");
    	}
    	memset(&standard, 0, sizeof(standard));
    	standard.index = 0;
    	while (1) {
    		if (ioctl(capture->capture_fd, VIDIOC_ENUMSTD, &standard) < 0) {
    			perror("VIDIOC_ENUMSTD");
    		}
    
    		/* Store the name of the standard */
    		if (standard.id & std_id) {
    			printf("%s: Current standard: %s\n",
    					CAPTURE_NAME, standard.name);
    			break;
    		}
    		standard.index++;
    	}
    
    	capture->width = IMG_WIDTH_PAL_NTSC;
    	if (!strcmp((char *)standard.name, "PAL"))
    		capture->height = IMG_HEIGHT_PAL;
    	else
    		capture->height = IMG_HEIGHT_NTSC;
    
    	return 0;
    }
    
    /*
     * This function initializes capture device. It selects an active input
     * and detects the standard on that input. It then allocates buffers in the
     * driver's memory space and mmaps them in the application space.
     */
    static int capture_prepare_streaming(struct capture_dev *capture)
    {
    	struct v4l2_capability capability;
    	struct v4l2_requestbuffers reqbuf;
    	struct v4l2_buffer buf;
    	struct v4l2_format *fmt = &capture->capture_fmt;
    	int ret, i, j;
    
    	/* Check if the device is capable of streaming */
    	ret = ioctl(capture->capture_fd, VIDIOC_QUERYCAP, &capability);
    	if (ret < 0) {
    		perror("VIDIOC_QUERYCAP");
    		return ret;
    	}
    	if (capability.capabilities & V4L2_CAP_STREAMING) {
    		printf("%s: Capable of streaming\n", CAPTURE_NAME);
    	} else {
    		printf("%s: Not capable of streaming\n", CAPTURE_NAME);
    		return -1;
    	}
    
    	fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    	ret = ioctl(capture->capture_fd, VIDIOC_G_FMT, fmt);
    	if (ret < 0) {
    		perror("VIDIOC_G_FMT");
    		return ret;
    	}
    
    	fmt->fmt.pix.width = capture->width;
    	fmt->fmt.pix.height = capture->height;
    	fmt->fmt.pix.pixelformat = DEF_PIX_FMT;
    
    	fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    	ret = ioctl(capture->capture_fd, VIDIOC_S_FMT, fmt);
    	if (ret < 0) {
    		perror("VIDIOC_S_FMT");
    		return ret;
    	}
    
    	ret = ioctl(capture->capture_fd, VIDIOC_G_FMT, fmt);
    	if (ret < 0) {
    		perror("VIDIOC_G_FMT");
    		return ret;
    	}
    
    	if (fmt->fmt.pix.pixelformat != DEF_PIX_FMT) {
    		printf("%s: Requested pixel format not supported\n", CAPTURE_NAME);
    		return -1;
    	}
    
    	/* Buffer allocation
    	 * Buffer can be allocated either from capture driver or
    	 * user pointer can be used
    	 */
    	/* Request for MAX_BUFFER input buffers. As far as Physically contiguous
    	 * memory is available, driver can allocate as many buffers as
    	 * possible. If memory is not available, it returns number of
    	 * buffers it has allocated in count member of reqbuf.
    	 * HERE count = number of buffer to be allocated.
    	 * type = type of device for which buffers are to be allocated.
    	 * memory = type of the buffers requested i.e. driver allocated or
    	 * user pointer */
    	reqbuf.count = capture->num_bufs;
    	reqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    	reqbuf.memory = V4L2_MEMORY_MMAP;
    	ret = ioctl(capture->capture_fd, VIDIOC_REQBUFS, &reqbuf);
    	if (ret < 0) {
    		perror("Cannot allocate memory");
    		return ret;
    	}
    	/* Store the number of buffers actually allocated */
    	capture->num_bufs = reqbuf.count;
    	printf("%s: Number of requested buffers = %d\n", CAPTURE_NAME,
    			capture->num_bufs);
    
    	memset(&buf, 0, sizeof(buf));
    
    	/* Mmap the buffers
    	 * To access driver allocated buffer in application space, they have
    	 * to be mmapped in the application space using mmap system call */
    	for (i = 0; i < (capture->num_bufs); i++) {
    		buf.type = reqbuf.type;
    		buf.index = i;
    		buf.memory = reqbuf.memory;
    		ret = ioctl(capture->capture_fd, VIDIOC_QUERYBUF, &buf);
    		if (ret < 0) {
    			perror("VIDIOC_QUERYCAP");
    			capture->num_bufs = i;
    			goto ERROR;
    		}
    
    
    		capture_buff_info[i].length = buf.length;
    		capture_buff_info[i].index = i;
    		capture_buff_info[i].start = mmap(NULL, buf.length,
    				PROT_READ | PROT_WRITE, MAP_SHARED, capture->capture_fd,
    				buf.m.offset);
    
    		if (capture_buff_info[i].start == MAP_FAILED) {
    			printf("Cannot mmap = %d buffer\n", i);
    			capture->num_bufs = i;
    			goto ERROR;
    		}
    
    		memset((void *) capture_buff_info[i].start, 0x80,
    				capture_buff_info[i].length);
    		/* Enqueue buffers
    		 * Before starting streaming, all the buffers needs to be
    		 * en-queued in the driver incoming queue. These buffers will
    		 * be used by thedrive for storing captured frames. */
    		ret = ioctl(capture->capture_fd, VIDIOC_QBUF, &buf);
    		if (ret < 0) {
    			perror("VIDIOC_QBUF");
    			capture->num_bufs = i + 1;
    			goto ERROR;
    		}
    	}
    
    	printf("%s: Init done successfully\n\n", CAPTURE_NAME);
    	return 0;
    
    ERROR:
    	for (j = 0; j < capture->num_bufs; j++)
    		munmap(capture_buff_info[j].start,
    				capture_buff_info[j].length);
    	return -1;
    }
    
    /*
     * This function initializes display device. It sets output and standard for
     * LCD. These output and standard are same as those detected in capture device.
     * It, then, allocates buffers in the driver's memory space and mmaps them in
     * the application space
     */
    static int display_prepare_streaming(struct display_dev *display)
    {
    	int ret, i, j;
    	struct v4l2_requestbuffers reqbuf;
    	struct v4l2_buffer buf;
    	struct v4l2_capability capability;
    	struct v4l2_control control;
    	struct v4l2_format *fmt = &display->display_fmt;
    
    	/* Open the video display device */
    	display->display_fd = open((const char *) DISPLAY_DEVICE, O_RDWR);
    	if (display->display_fd <= 0) {
    		printf("Cannot open = %s device\n", DISPLAY_DEVICE);
    		return -1;
    	}
    	printf("\n%s: Opened Channel\n", DISPLAY_NAME);
    
    	/* Check if the device is capable of streaming */
    	if (ioctl(display->display_fd, VIDIOC_QUERYCAP, &capability) < 0) {
    		perror("VIDIOC_QUERYCAP");
    		goto ERROR;
    	}
    
    	if (capability.capabilities & V4L2_CAP_STREAMING)
    		printf("%s: Capable of streaming\n", DISPLAY_NAME);
    	else {
    		printf("%s: Not capable of streaming\n", DISPLAY_NAME);
    		goto ERROR;
    	}
    
    	/* Rotate by 90 degree so that 480x640 resolution will become 640x480 */
    
            control.id = V4L2_CID_ROTATE;
            control.value = 0;
    	ret = ioctl(display->display_fd, VIDIOC_S_CTRL, &control);
    	if (ret < 0) {
    		perror("VIDIOC_S_CTRL");
    		goto ERROR;
    	}
    
    	/* Get the format */
    	fmt->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
    	ret = ioctl(display->display_fd, VIDIOC_G_FMT, fmt);
    	if (ret < 0) {
    		perror("VIDIOC_G_FMT");
    		goto ERROR;
    	}
    
    	fmt->fmt.pix.width = display->width;
    	fmt->fmt.pix.height = display->height;
    	fmt->fmt.pix.pixelformat = DEF_PIX_FMT;
    	fmt->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
    	ret = ioctl(display->display_fd, VIDIOC_S_FMT, fmt);
    	if (ret < 0) {
    		perror("VIDIOC_S_FMT");
    		goto ERROR;
    	}
    
    	ret = ioctl(display->display_fd, VIDIOC_G_FMT, fmt);
    	if (ret < 0) {
    		perror("VIDIOC_G_FMT");
    		goto ERROR;
    	}
    
    		if (fmt->fmt.pix.pixelformat != DEF_PIX_FMT) {
    			printf("%s: Requested pixel format not supported\n",
    					CAPTURE_NAME);
    			goto ERROR;
    		}
    
    	/* Buffer allocation
    	 * Buffer can be allocated either from capture driver or
    	 * user pointer can be used
    	 */
    	/* Request for MAX_BUFFER input buffers. As far as Physically contiguous
    	 * memory is available, driver can allocate as many buffers as
    	 * possible. If memory is not available, it returns number of
    	 * buffers it has allocated in count member of reqbuf.
    	 * HERE count = number of buffer to be allocated.
    	 * type = type of device for which buffers are to be allocated.
    	 * memory = type of the buffers requested i.e. driver allocated or
    	 * user pointer */
    	reqbuf.count = display->num_bufs;
    	reqbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
    	reqbuf.memory = V4L2_MEMORY_MMAP;
    	ret = ioctl(display->display_fd, VIDIOC_REQBUFS, &reqbuf);
    	if (ret < 0) {
    		perror("Cannot allocate memory");
    		goto ERROR;
    	}
    	/* Store the numbfer of buffers allocated */
    	display->num_bufs = reqbuf.count;
    	printf("%s: Number of requested buffers = %d\n", DISPLAY_NAME,
    	       display->num_bufs);
    
    	memset(&buf, 0, sizeof(buf));
    
    	/* Mmap the buffers
    	 * To access driver allocated buffer in application space, they have
    	 * to be mmapped in the application space using mmap system call */
    	for (i = 0; i < display->num_bufs; i++) {
    		/* Query physical address of the buffers */
    		buf.type = reqbuf.type;
    		buf.index = i;
    		buf.memory = reqbuf.memory;
    		ret = ioctl(display->display_fd, VIDIOC_QUERYBUF, &buf);
    		if (ret < 0) {
    			perror("VIDIOC_QUERYCAP");
    			display->num_bufs = i;
    			goto ERROR1;
    		}
    
    		/* Mmap the buffers in application space */
    		display_buff_info[i].length = buf.length;
    		display_buff_info[i].index =  i;
    		display_buff_info[i].start = mmap(NULL, buf.length,
    				PROT_READ | PROT_WRITE, MAP_SHARED, display->display_fd,
    				buf.m.offset);
    
    		if (display_buff_info[i].start == MAP_FAILED) {
    			printf("Cannot mmap = %d buffer\n", i);
    			display->num_bufs = i;
    			goto ERROR1;
    		}
    		memset((void *) display_buff_info[i].start, 0x80,
    		       display_buff_info[i].length);
    
    		/* Enqueue buffers
    		 * Before starting streaming, all the buffers needs to be
    		 * en-queued in the driver incoming queue. These buffers will
    		 * be used by thedrive for storing captured frames. */
    		ret = ioctl(display->display_fd, VIDIOC_QBUF, &buf);
    		if (ret < 0) {
    			perror("VIDIOC_QBUF");
    			display->num_bufs = i + 1;
    			goto ERROR1;
    		}
    	}
    	printf("%s: Init done successfully\n\n", DISPLAY_NAME);
    	return 0;
    
    ERROR1:
    	for (j = 0; j < display->num_bufs; j++)
    		munmap(display_buff_info[j].start,
    			display_buff_info[j].length);
    ERROR:
    	close(display->display_fd);
    	return -1;
    }
    
    static void usage(void)
    {
    	printf("Usage: saMmapLoopback [-i <tvp input>] [-h help]");
    	printf("\t[-i <S-Vid/CVBS>]	: 0: CVBS 1 - S-Video\n");
    }
    static int timeval_subtract(struct timeval *result, struct timeval *x,
    		                     struct timeval *y)
    {
    	/* Perform the carry for the later subtraction by updating y.
    	 * */
    	if (x->tv_usec < y->tv_usec) {
    		int nsec = (y->tv_usec - x->tv_usec) /
    			1000000 + 1;
    		y->tv_usec -= 1000000 *	nsec;
    		y->tv_sec += nsec;
    	}
    	if (x->tv_usec - y->tv_usec > 1000000) {
    		int nsec = (x->tv_usec - y->tv_usec) /
    			1000000;
    		y->tv_usec += 1000000 * nsec;
    		y->tv_sec -= nsec;
    	}
    
    	/* Compute the time remaining to wait.
    	   tv_usec is certainly positive. */
    	result->tv_sec = x->tv_sec - y->tv_sec;
    	result->tv_usec = x->tv_usec - y->tv_usec;
    
    	/* Return 1 if result is
    	 * negative. */
    	return x->tv_sec < y->tv_sec;
    }
    
    int main(int argc, char *argv[])
    {
    	char shortoptions[] = "s:l:n:i:h:";
    	int i = 0, ret = 0, a, c, index;
    	unsigned int loop_cnt = MAXLOOPCOUNT;
    	struct media_dev media;
    	struct capture_dev capture;
    	struct display_dev display;
    	struct timeval before, after, result;
    
    	memset(&media, 0, sizeof(struct media_dev));
    	memset(&capture, 0, sizeof(struct capture_dev));
    	memset(&display, 0, sizeof(struct display_dev));
    
    	/* Setup default init for all devices */
    	/* Media */
    	media.input_source = 0;	/* default to tvp5146 */
    	/* Capture */
    	capture.num_bufs = CAPTURE_MAX_BUFFER;
    	/* Display */
    	display.num_bufs = DISPLAY_MAX_BUFFER;
    
    	for (;;) {
    		c = getopt_long(argc, argv, shortoptions, (void *) NULL,
    				&index);
    		if (-1 == c)
    			break;
    		switch (c) {
    			case 0:
    				break;
    			case 's':
    			case 'S':
    				media.input_source = atoi(optarg);
    				break;
    			case 'l':
    			case 'L':
    				loop_cnt = atoi(optarg);
    				break;
    			case 'n':
    			case 'N':
    				capture.num_bufs = display.num_bufs = atoi(optarg);
    				break;
    			case 'i':
    			case 'I':
    				capture.tvp_input = atoi(optarg);
    				break;
    			case 'h':
    			case 'H':
    			default:
    				usage();
    				exit(1);
    		}
    
    	}
    	for(i = 0; i < capture.num_bufs; i++) {
    		capture_buff_info[i].start = NULL;
    	}
    	for(i = 0; i < display.num_bufs; i++) {
    		display_buff_info[i].start = NULL;
    	}
    	/*
    	 * Initialization section
    	 * In case of Media-Controller compliant device: Setup Links
    	 * Initialize capture and display devices.
    	 * Here one capture channel is opened and input and standard is
    	 * detected on that channel.
    	 * Display channel is opened with the same standard that is detected at
    	 * capture channel.
    	 * */
    #if defined (CONFIG_OMAP3530)
    	/* Open the Media device */
    	ret  = media_device_open(&media);
    	if (ret < 0)
    		return ret;
    
    	ret = enumerate_all_entities(&media);
    	if (ret < 0)
    		goto err_0;
    
    	/* Setup Links */
    	ret = setup_media_links(&media);
    	if (ret < 0)
    		goto err_0;
    
    	media_device_close(media.media_fd);
    #endif
    	/* Open the capture device */
    	ret = open_video_dev((const char *)CAPTURE_DEVICE, &capture.capture_fd);
    	if (ret < 0)
    		goto err_1;
    
    	ret = get_current_capture_format(media.input_source, &capture);
    	if (ret < 0)
    		goto err_1;
    
    	/* Make width/height capture = display*/
    	display.width = capture.width;
    	display.height = capture.height;
    
    #if defined (CONFIG_OMAP3530)
    	/*
    	 * Now set the detected format at each pad
    	 */
    	ret = set_subdev_format(&media, &capture);
    	if (ret < 0)
    		goto err_2;
    #endif
    	ret = capture_prepare_streaming(&capture);
    	if(ret < 0)
    		goto err_3;
    
    	/* open display channel */
    	ret = display_prepare_streaming(&display);
    	if(ret < 0) {
    		printf("Error in opening display device\n");
    		goto err_4;
    	}
    
    	/* run section
    	 * STEP2:
    	 * Here display and capture channels are started for streaming. After
    	 * this capture device will start capture frames into enqueued
    	 * buffers and display device will start displaying buffers from
    	 * the qneueued buffers */
    
    	/* Start Streaming. on display device */
    	a = V4L2_BUF_TYPE_VIDEO_OUTPUT;
    	ret = ioctl(display.display_fd, VIDIOC_STREAMON, &a);
    	if (ret < 0) {
    		perror("VIDIOC_STREAMON");
    		goto err_4;
    	}
    	printf("%s: Stream on...\n", DISPLAY_NAME);
    
    	/* Start Streaming. on capture device */
    	a = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    	ret = ioctl(capture.capture_fd, VIDIOC_STREAMON, &a);
    	if (ret < 0) {
    		perror("VIDIOC_STREAMON");
    		goto err_4;
    	}
    	printf("%s: Stream on...\n", CAPTURE_NAME);
    
    	/* Set the display buffers for queuing and dqueueing operation */
    	display.display_buf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
    	display.display_buf.index = 0;
    	display.display_buf.memory = V4L2_MEMORY_MMAP;
    
    	/* Set the capture buffers for queuing and dqueueing operation */
    	capture.capture_buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    	capture.capture_buf.index = 0;
    	capture.capture_buf.memory = V4L2_MEMORY_MMAP;
    
    	/* One buffer is dequeued from display and capture channels.
    	 * Capture buffer will be copied to display buffer.
    	 * All two buffers are put back to respective channels.
    	 * This sequence is repeated in loop.
    	 * After completion of this loop, channels are stopped.
    	 */
    	gettimeofday(&before, NULL);
    	for (i = 0; i < loop_cnt; i++) {
    		int h;
    		unsigned char *cap_ptr, *dis_ptr;
    		/* Dequeue display buffer */
    		ret = ioctl(display.display_fd, VIDIOC_DQBUF, &display.display_buf);
    		if (ret < 0) {
    			perror("VIDIOC_DQBUF");
    			goto err_4;
    		}
    
    		/* Dequeue capture buffer */
    		ret = ioctl(capture.capture_fd, VIDIOC_DQBUF, &capture.capture_buf);
    		if (ret < 0) {
    			perror("VIDIOC_DQBUF");
    			goto err_4;
    		}
    
    		cap_ptr = (unsigned char*)capture_buff_info[capture.capture_buf.index].start;
    		dis_ptr = (unsigned char*)display_buff_info[display.display_buf.index].start;
    		for (h = 0; h < display.height; h++) {
    			memcpy(dis_ptr, cap_ptr, display.width * 2);
    			cap_ptr += capture.width * 2;
    			dis_ptr += display.width * 2;
    		}
    
    		ret = ioctl(capture.capture_fd, VIDIOC_QBUF, &capture.capture_buf);
    		if (ret < 0) {
    			perror("VIDIOC_QBUF");
    			goto err_4;
    		}
    
    		ret = ioctl(display.display_fd, VIDIOC_QBUF, &display.display_buf);
    		if (ret < 0) {
    			perror("VIDIOC_QBUF");
    			goto err_4;
    		}
    	}
    	gettimeofday(&after, NULL);
    
    	a = V4L2_BUF_TYPE_VIDEO_OUTPUT;
    	ret = ioctl(display.display_fd, VIDIOC_STREAMOFF, &a);
    	if (ret < 0) {
    		perror("VIDIOC_STREAMOFF");
    		goto err_4;
    	}
    	printf("\n%s: Stream off!!\n", DISPLAY_NAME);
    
    	a = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    	ret = ioctl(capture.capture_fd, VIDIOC_STREAMOFF, &a);
    	if (ret < 0) {
    		perror("VIDIOC_STREAMOFF");
    		goto err_4;
    	}
    	printf("%s: Stream off!!\n", CAPTURE_NAME);
    
    	printf("\nLoopback Successful\n\n");
    	printf("Timing Analysis:\n");
    	printf("----------------\n");
    	printf("Before Time:\t%lu %lu\n",before.tv_sec, before.tv_usec);
    	printf("After Time:\t%lu %lu\n",after.tv_sec, after.tv_usec);
    	timeval_subtract(&result, &after, &before);
    	printf("Result Time:\t%ld %ld\n",result.tv_sec, result.tv_usec);
    	printf("Calculated Frame Rate:\t%ld Fps\n\n", loop_cnt/result.tv_sec);
    
    err_4:
    	/* Un-map the buffers */
    	for (i = 0; i < display.num_bufs; i++) {
    		munmap(display_buff_info[i].start,
    		       display_buff_info[i].length);
    		display_buff_info[i].start = NULL;
    	}
    
    	/* Close the file handle */
    	close(display.display_fd);
    err_3:
    	/* Un-map the buffers */
    	for (i = 0; i < capture.num_bufs; i++) {
    		munmap(capture_buff_info[i].start,
    		       capture_buff_info[i].length);
    		capture_buff_info[i].start = NULL;
    	}
    err_2:
    	/* Close the file handle */
    	close_video_dev(capture.capture_fd);
    err_1:
    #if defined (CONFIG_OMAP3530)
    	/*TODO: Must reset the media before exiting here */
    	reset_media_links(&media);
    err_0:
    	media_device_close(media.media_fd);
    #endif
    	return 0;
    }
    

    Regards,

    Bharath S