Hi,
Now I use the uvc usb camera as capture device and connect to OMAP_L138 usb port.
First I add the uvc driver chice when make menuconfig and when load the kernel I use the v4l2 demo to capture and save a figure,but it is stopped at the ioctl command of VIDIOC_STREAMON .
The follws is my log sessions and the v4l2 capture demo,could you help me find the mistake I made or could you tell me that Does the OMAPL138 support the uvc usb camera .
U-Boot 2010.12 (Dec 23 2011 - 11:22:43) I2C: ready DRAM: 128 MiB MMC: davinci: 0 SF: Detected M25P64 with page size 256, total 8 MiB In: serial Out: serial Err: serial ARM Clock : 300000000 Hz DDR Clock : 132000000 Hz Net: Ethernet PHY: GENERIC @ 0x00 DaVinci-EMAC Hit any key to stop autoboot: 0 SF: Detected M25P64 with page size 256, total 8 MiB 8192 KiB M25P64 at 0:0 is now current device ## Booting kernel from Legacy Image at c0700000 ... Image Name: Linux-2.6.37 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2437028 Bytes = 2.3 MiB Load Address: c0008000 Entry Point: c0008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK Starting kernel ... Uncompressing Linux... done, booting the kernel. Linux version 2.6.37 (root@ubuntu) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #1 PREEMPT Fri Nov 14 01:03:39 PST 2014 CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177 CPU: VIVT data cache, VIVT instruction cache Machine: DaVinci DA850/OMAP-L138/AM18x EVM Memory policy: ECC disabled, Data cache writeback DaVinci da850/omap-l138/am18x variant 0x1 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 24320 Kernel command line: console=ttyS2,115200n8 noinitrd root=/dev/nfs/ nfsroot=192.168.1.41:/home/ouyang/L138filesys,nolock ip=192.168.1.144:192.168.1.41:255.255.255.0 ::eth0:off rw mem=32M@0Xc0000000 mem=64M@0xc4000000 rootdelay=5 PID hash table entries: 512 (order: -1, 2048 bytes) Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 32MB 64MB = 96MB total Memory: 92224k/92224k available, 6080k reserved, 0K highmem Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) DMA : 0xff000000 - 0xffe00000 ( 14 MB) vmalloc : 0xc8800000 - 0xfea00000 ( 866 MB) lowmem : 0xc0000000 - 0xc8000000 ( 128 MB) modules : 0xbf000000 - 0xc0000000 ( 16 MB) .init : 0xc0008000 - 0xc0032000 ( 168 kB) .text : 0xc0032000 - 0xc04b8000 (4632 kB) .data : 0xc04b8000 - 0xc04eb6c0 ( 206 kB) SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 Preemptable hierarchical RCU implementation. RCU-based detection of stalled CPUs is disabled. Verbose stalled-CPUs detection is disabled. NR_IRQS:245 Console: colour dummy device 80x30 Calibrating delay loop... 149.50 BogoMIPS (lpj=747520) pid_max: default: 32768 minimum: 301 Security Framework initialized Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok DaVinci: 144 gpio irqs regulator: core version 0.5 regulator: dummy: NET: Registered protocol family 16 WARNING: both McASP and McBSP are enabled, but they share pins. Only McASP will work. If you want McBSP support, disable McASP. WARNING: both McASP and UART1_AFE are enabled, but they share pins. Disable one of them. da850_evm_init: eHRPWM module 0 cannot be used since it is being used by MII interface da850_evm_init: eHRPWM module1 outputA cannot be used since it is being used by LCD da850_evm_init: eHRPWM module1 outputB cannot be used since it is being used by spi1 bio: create slab <bio-0> at 0 SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb pca953x 1-0020: failed reading register i2c-gpio i2c-gpio.1: using pins 20 (SDA) and 21 (SCL) Advanced Linux Sound Architecture Driver Version 1.0.23. Bluetooth: Core ver 2.15 NET: Registered protocol family 31 Bluetooth: HCI device and connection manager initialized Bluetooth: HCI socket layer initialized Switching to clocksource timer0_1 musb-hdrc: version 6.0, host, debug=0 musb-hdrc musb-hdrc: dma type: dma-cppi41 Waiting for USB PHY clock good... musb-hdrc musb-hdrc: MUSB HDRC host driver musb-hdrc musb-hdrc: new USB bus registered, assigned bus number 1 usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: MUSB HDRC host driver usb usb1: Manufacturer: Linux 2.6.37 musb-hcd usb usb1: SerialNumber: musb-hdrc hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected musb-hdrc musb-hdrc: USB Host mode controller at fee00000 using DMA, IRQ 58 NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 4096 (order: 3, 32768 bytes) TCP bind hash table entries: 4096 (order: 2, 16384 bytes) TCP: Hash tables configured (established 4096 bind 4096) TCP reno registered UDP hash table entries: 256 (order: 0, 4096 bytes) UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) NET: Registered protocol family 1 RPC: Registered udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. EMAC: MII PHY configured, RMII PHY will not be functional McBSP:Probed McBSP1 JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc. msgmni has been set to 180 io scheduler noop registered (default) da8xx_lcdc da8xx_lcdc.0: GLCD: Found Sharp_LK043T1DG01 panel Console: switching to colour frame buffer device 60x34 Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a AR7 serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a AR7 serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a AR7 console [ttyS2] enabled brd: module loaded at24 1-0050: 32768 byte 24c256 EEPROM (writable) ahci ahci: forcing PORTS_IMPL to 0x1 ahci ahci: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode ahci ahci: flags: ncq sntf pm led clo only pmp pio slum part ccc scsi0 : ahci_platform ata1: SATA max UDMA/133 mmio [mem 0x01e18000-0x01e19fff] port 0x100 irq 67 spi_davinci spi_davinci.1: DMA: supported spi_davinci spi_davinci.1: DMA: RX channel: 18, TX channel: 19, event queue: 0 m25p80 spi1.0: m25p64 (8192 Kbytes) Creating 6 MTD partitions on "m25p80": 0x000000000000-0x000000010000 : "UBL" 0x000000010000-0x000000090000 : "U-Boot" 0x000000090000-0x0000000a0000 : "U-Boot-Env" 0x0000000a0000-0x000000320000 : "Kernel" 0x000000320000-0x000000720000 : "Filesystem" 0x0000007f0000-0x000000800000 : "MAC-Address" Read MAC addr from SPI Flash: ff:ff:ff:ff:ff:ff spi_davinci spi_davinci.1: Controller at 0xfef0e000 davinci_mdio davinci_mdio.0: davinci mdio revision 1.5 davinci_mdio davinci_mdio.0: detected phy mask fffffffe davinci_mdio.0: probed davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver SMSC LAN8710/LAN8720 console [netcon0] enabled netconsole: network logging started ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver ohci ohci.0: DA8xx OHCI ohci ohci.0: new USB bus registered, assigned bus number 2 Waiting for USB PHY clock good... ohci ohci.0: irq 59, io mem 0x01e25000 usb usb2: New USB device found, idVendor=1d6b, idProduct=0001 usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb2: Product: DA8xx OHCI usb usb2: Manufacturer: Linux 2.6.37 ohci_hcd usb usb2: SerialNumber: ohci.0 hub 2-0:1.0: USB hub found hub 2-0:1.0: 1 port detected Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0 ata1: SATA link down (SStatus 0 SControl 300) omap_rtc: RTC power up reset detected i2c /dev entries driver Linux media interface: v0.10 lirc_dev: IR Remote Control driver registered, major 251 IR NEC protocol handler initialized IR RC5(x) protocol handler initialized IR RC6 protocol handler initialized IR JVC protocol handler initialized IR Sony protocol handler initialized IR RC5 (streamzap) protocol handler initialized IR LIRC bridge handler initialized Linux video capture interface: v2.00 usbcore: registered new interface driver uvcvideo USB Video Class driver (v1.0.0) watchdog watchdog: heartbeat 60 sec Bluetooth: HCI UART driver ver 2.2 Bluetooth: HCI H4 protocol initialized Bluetooth: HCILL protocol initialized cpuidle: using governor ladder cpuidle: using governor menu davinci_mmc: probe of davinci_mmc.0 failed with error -16 davinci_mmc davinci_mmc.1: Using DMA, 4-bit mode usbcore: registered new interface driver usbhid usbhid: USB HID core driver 1-0018 supply IOVDD not found, using dummy regulator 1-0018 supply DVDD not found, using dummy regulator 1-0018 supply AVDD not found, using dummy regulator 1-0018 supply DRVDD not found, using dummy regulator asoc: tlv320aic3x-hifi <-> davinci-mcasp.0 mapping ok ALSA device list: #0: DA850/OMAP-L138 EVM nf_conntrack version 0.5.0 (1441 buckets, 5764 max) ip_tables: (C) 2000-2006 Netfilter Core Team TCP cubic registered NET: Registered protocol family 17 Bluetooth: L2CAP ver 2.15 Bluetooth: L2CAP socket layer initialized Bluetooth: SCO (Voice Link) ver 0.6 Bluetooth: SCO socket layer initialized Bluetooth: RFCOMM TTY layer initialized Bluetooth: RFCOMM socket layer initialized Bluetooth: RFCOMM ver 1.11 Bluetooth: BNEP (Ethernet Emulation) ver 1.3 Bluetooth: BNEP filters: protocol multicast Bluetooth: HIDP (Human Interface Emulation) ver 1.2 deviceless supply cvdd not found, using dummy regulator davinci_emac_probe: using random MAC addr: 32:a8:63:5c:8f:e2 omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800) usb 2-1: new full speed USB device using ohci and address 2 davinci_mdio davinci_mdio.0: resetting idled controller net eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=0:00, id=7c0f1) usb 2-1: not running at top speed; connect to a high speed hub usb 2-1: New USB device found, idVendor=2b16, idProduct=6689 usb 2-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0 usb 2-1: Product: doccamera uvcvideo: Found UVC 1.00 device doccamera (2b16:6689) input: doccamera as /devices/platform/ohci.0/usb2/2-1/2-1:1.0/input/input0 IP-Config: Guessing netmask 255.255.255.0 IP-Config: Gateway not on directly connected network. Waiting 5sec before mounting root device... PHY: 0:00 - Link is Up - 100/Full VFS: Mounted root (nfs filesystem) on device 0:13. Freeing init memory: 168K INIT: version 2.86 booting Please wait: booting... Starting udev udevd (627): /proc/627/oom_adj is deprecated, please use /proc/627/oom_score_adj instead. udev: starting version 141 Root filesystem already rw, not remounting Caching udev devnodes Populating dev cachemv: cannot rename '/tmp/devices': No such file or directory logger: mount: mount point /proc/bus/usb does not exist ALSA: Restoring mixer settings... NOT configuring network interfaces: / is an NFS mount Fri Dec 23 12:42:00 UTC 2011 INIT: Entering runlevel: 5 Starting system message bus: dbus. Starting Dropbear SSH server: NET: Registered protocol family 10 dropbear. Starting telnet daemon. Starting network benchmark server: netserver. Starting syslogd/klogd: done Starting thttpd. CMEMK module: built on Nov 5 2014 at 21:52:13 Reference Linux version 2.6.37 File /home/ouyang/OMAPL138DVSDK/linuxutils_2_26_02_05/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c CMEM Range Overlaps Kernel Physical - allowing overlap CMEM phys_start (0xc2000000) overlaps kernel (0xc0000000 -> 0xc6000000) allocated heap buffer 0xc9000000 of size 0x1200000 heap fallback enabled - will try heap if pool buffer is not available cmemk initialized DSPLINK Module (1.65.01.05_eng) created on Date: Nov 5 2014 Time: 22:03:57 _____ _____ _ _ | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_ | | _| .'| . | . | | __| _| . | | | -_| _| _| |__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_| |___| |___| Arago Project http://arago-project.org arago ttyS2 Arago 2011.06 arago ttyS2 arago login: root root@arago:~# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 002: ID 2b16:6689 root@arago:~# ls /dev block ptyp7 tty44 bus ram0 tty45 char random tty46 cmem rfkill tty47 console rtc tty48 cpu_dma_latency rtc0 tty49 dm365mmap shm tty5 dsplink snd tty50 fb tty tty51 fb0 tty0 tty52 full tty1 tty53 i2c-1 tty10 tty54 initctl tty11 tty55 input tty12 tty56 kmem tty13 tty57 kmsg tty14 tty58 log tty15 tty59 mem tty16 tty6 mtd0 tty17 tty60 mtd0ro tty18 tty61 mtd1 tty19 tty62 mtd1ro tty2 tty63 mtd2 tty20 tty7 mtd2ro tty21 tty8 mtd3 tty22 tty9 mtd3ro tty23 ttyS0 mtd4 tty24 ttyS1 mtd4ro tty25 ttyS2 mtd5 tty26 ttyp0 mtd5ro tty27 ttyp1 mtdblock0 tty28 ttyp2 mtdblock1 tty29 ttyp3 mtdblock2 tty3 ttyp4 mtdblock3 tty30 ttyp5 mtdblock4 tty31 ttyp6 mtdblock5 tty32 ttyp7 network_latency tty33 udev_network_queue network_throughput tty34 urandom null tty35 v4l ptmx tty36 vcs pts tty37 vcs1 ptyp0 tty38 vcs2 ptyp1 tty39 vcsa ptyp2 tty4 vcsa1 ptyp3 tty40 vcsa2 ptyp4 tty41 video0 ptyp5 tty42 watchdog ptyp6 tty43 zero root@arago:~# cd /usr/share/ti/usbcamera/ root@arago:/usr/share/ti/usbcamera# ls camera_cap camera_test cap_test luvcview root@arago:/usr/share/ti/usbcamera# ./camera_test Open video0 successed Capability Informations: driver: uvcvideo card: doccamera bus_info: usb-ohci.0-1 version: 00010000 capabilities: 04000001 Stream Format Informations: type: 1 width: 640 height: 480 pixelformat: MJPG field: 1 bytesperline: 0 sizeimage: 614400 colorspace: 8 priv: 0 raw_date: � Frame buffer 0: address=0x4034c000, length=614400 Frame buffer 1: address=0x40440000, length=614400 uvcvideo: Failed to submit URB 0 (-28). VIDIOC_STREAMON failed (-1) ohci ohci.0: leak ed ff013080 (#81) state 2
Thanks very much.
Ouyang,