在我的笔记本上,我有一个USB摄像头,SD卡上的32位Ubuntu 10.04运行和闪存上的Android Jelly Bean。
Ubuntu无法识别相机(即使是USB端口),因为它出于某种原因不提供任何电源。如果我在有源USB端口和相机USB端口之间连接电线,则dmesg会识别我的USB端口和相机。
但是,如果我取出SD卡,我的笔记本电脑就会启动Android JB。它也无法识别连接相机的USB端口。但是当我启动相机应用程序时,USB会以某种方式获得电源并开始工作! Android的摄像头服务有一些技巧可以为USB端口供电。
有人对此有所了解吗?
(如果可能,我在哪里可以找到包含相机应用程序执行的操作的源代码?)
编辑:
$ lsusb
Bus 003 Device 002: ID 04d9:2ba0 Holtek Semiconductor, Inc.
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 013: ID 1e4e:0102
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp.
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ lsusb
Bus 003 Device 002: ID 04d9:2ba0 Holtek Semiconductor, Inc.
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp.
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ dmesg | tail
[ 483.790202] uvcvideo: Found UVC 1.00 device USB2.0 Camera (1e4e:0102)
[ 483.797666] input: USB2.0 Camera as /devices/pci0000:00/0000:00:04.0/usb1/1-1/1-1:1.0/input/input4
[ 484.608278] usb 1-1: USB disconnect, device number 8
[ 486.123368] usb 1-1: new high speed USB device number 9 using ehci_hcd
[ 486.258975] usb 1-1: device descriptor read/all, error -71
[ 486.320237] hub 1-0:1.0: unable to enumerate USB device on port 1
[ 486.896696] usb 1-1: new high speed USB device number 11 using ehci_hcd
[ 487.040213] uvcvideo: Found UVC 1.00 device USB2.0 Camera (1e4e:0102)
[ 487.047682] input: USB2.0 Camera as /devices/pci0000:00/0000:00:04.0/usb1/1-1/1-1:1.0
/input/input5
[ 491.890035] usb 1-1: USB disconnect, device number 11