记录USB摄像头的几个问题
2016-09-13 11:28
309 查看
usb 1-1.2: device not accepting address 44, error -62
hub 1-1:1.0: unable to enumerate USB device on port 2
1.1 使用同一个usb摄像头,在电脑端可以输出:
<–the 0 image format information–>
description:YUYV 4:2:2
pixelformat:YUYV
discrete-framesize 0:640x480
discrete-framesize 1:800x600
discrete-framesize 2:1280x960
discrete-framesize 3:1600x1200
可以正常拍摄4种类型的照片,
但在开发板上却只有:
<–the 0 image format information–>
description:YUV 4:2:2 (YUYV)
pixelformat:YUYV
discrete-framesize 0:320x240
可以正常拍320*240,但摄像高像素会自动校正为320*240,
使用另一款摄像头,只有:
<–the 0 image format information–>
description:YUV 4:2:2 (YUYV)
pixelformat:YUYV
discrete-framesize 0:320x240
discrete-framesize 1:160x120
两种,但拍摄320x240会阻塞,如果使用非阻塞模式就超时退出,在电脑上却有:
description:YUYV 4:2:2
pixelformat:YUYV
discrete-framesize 0:640x480
discrete-framesize 1:352x288
discrete-framesize 2:320x240
discrete-framesize 3:176x144
discrete-framesize 4:160x120
,
后来检查发现是开发板上的USB host 是1.1的,虚拟机模拟去掉USB2.0的支持,也一样出现阻塞情况。但emun出来的分辨率却一样有多种,应该是模拟环境还是有差异吧。
这是在虚拟机上支持usb2.0 host时测试的摄像头dmesg:
当虚拟机去掉2.0的支持时dmesg如下 :
ehci_hcd被unregister了,下面来看在开发板上的测试,
这是在开发板上usb1.0 host上测试的摄像头dmesg:
可以看到,一个用的是ehci和uhci,开发板使用ohci,2440上没有ehci,所以无法处理高速接口。
linux USB HOST之EHCI和OHCI
hub 1-1:1.0: unable to enumerate USB device on port 2
1.1 使用同一个usb摄像头,在电脑端可以输出:
<–the 0 image format information–>
description:YUYV 4:2:2
pixelformat:YUYV
discrete-framesize 0:640x480
discrete-framesize 1:800x600
discrete-framesize 2:1280x960
discrete-framesize 3:1600x1200
可以正常拍摄4种类型的照片,
但在开发板上却只有:
<–the 0 image format information–>
description:YUV 4:2:2 (YUYV)
pixelformat:YUYV
discrete-framesize 0:320x240
可以正常拍320*240,但摄像高像素会自动校正为320*240,
使用另一款摄像头,只有:
<–the 0 image format information–>
description:YUV 4:2:2 (YUYV)
pixelformat:YUYV
discrete-framesize 0:320x240
discrete-framesize 1:160x120
两种,但拍摄320x240会阻塞,如果使用非阻塞模式就超时退出,在电脑上却有:
description:YUYV 4:2:2
pixelformat:YUYV
discrete-framesize 0:640x480
discrete-framesize 1:352x288
discrete-framesize 2:320x240
discrete-framesize 3:176x144
discrete-framesize 4:160x120
,
后来检查发现是开发板上的USB host 是1.1的,虚拟机模拟去掉USB2.0的支持,也一样出现阻塞情况。但emun出来的分辨率却一样有多种,应该是模拟环境还是有差异吧。
这是在虚拟机上支持usb2.0 host时测试的摄像头dmesg:
[19140.761165] usb 2-1: new high-speed USB device number 6 using ehci_hcd [19140.936202] usb 2-1: New USB device found, idVendor=0c45, idProduct=6340 [19140.936208] usb 2-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0 [19140.936211] usb 2-1: Product: USB 2.0 Camera [19140.936214] usb 2-1: Manufacturer: Sonix Technology Co., Ltd. [19140.942108] uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0c45:6340) [19140.960841] input: USB 2.0 Camera as /devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb2/2-1/2-1:1.0/input/input19 [19140.989601] 6:3:1: cannot get freq at ep 0x84
当虚拟机去掉2.0的支持时dmesg如下 :
[29118.682694] ehci_hcd 0000:02:03.0: remove, state 4 [29118.682710] usb usb1: USB disconnect, device number 1 [29118.682713] usb 1-1: USB disconnect, device number 7 [29118.698928] ehci_hcd 0000:02:03.0: USB bus 1 deregistered [29130.499683] usb 2-2.2: new high-speed USB device number 5 using uhci_hcd [29130.644298] usb 2-2.2: New USB device found, idVendor=0c45, idProduct=6340 [29130.644304] usb 2-2.2: New USB device strings: Mfr=2, Product=1, SerialNumber=0 [29130.644307] usb 2-2.2: Product: USB 2.0 Camera [29130.644310] usb 2-2.2: Manufacturer: Sonix Technology Co., Ltd. [29130.652422] uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0c45:6340) [29130.671720] input: USB 2.0 Camera as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0/input/input11 [29130.697580] 5:3:1: cannot get freq at ep 0x84 [29130.832372] 5:3:1: cannot get freq at ep 0x84 [29130.887303] 5:3:1: cannot get freq at ep 0x84
ehci_hcd被unregister了,下面来看在开发板上的测试,
这是在开发板上usb1.0 host上测试的摄像头dmesg:
hub 1-1:1.0: debounce: port 3: total 100ms stable 100ms status 0x100 hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0008 hub 1-1:1.0: port 3, status 0101, change 0001, 12 Mb/s hub 1-1:1.0: debounce: port 3: total 100ms stable 100ms status 0x101 usb 1-1.3: new full-speed USB device number 66 using s3c2410-ohci usb 1-1.3: skipped 1 descriptor after configuration usb 1-1.3: skipped 5 descriptors after interface usb 1-1.3: skipped 1 descriptor after endpoint usb 1-1.3: skipped 5 descriptors after interface usb 1-1.3: skipped 1 descriptor after endpoint usb 1-1.3: skipped 4 descriptors after interface usb 1-1.3: skipped 2 descriptors after interface usb 1-1.3: skipped 1 descriptor after endpoint usb 1-1.3: default language 0x0409 usb 1-1.3: udev 66, busnum 1, minor = 65 usb 1-1.3: New USB device found, idVendor=0c45, idProduct=6340 usb 1-1.3: New USB device strings: Mfr=2, Product=1, SerialNumber=0 usb 1-1.3: Product: USB 2.0 Camera usb 1-1.3: Manufacturer: Sonix Technology Co., Ltd. usb 1-1.3: usb_probe_device usb 1-1.3: configuration #1 chosen from 1 choice usb 1-1.3: adding 1-1.3:1.0 (config #1, interface 0) uvcvideo 1-1.3:1.0: usb_probe_interface uvcvideo 1-1.3:1.0: usb_probe_interface - got id uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0c45:6340) input: USB 2.0 Camera as /devices/platform/s3c2410-ohci/usb1/1-1/1-1.3/1-1.3:1.0/input/input7 evbug: Connected device: input7 (USB 2.0 Camera at usb-s3c24xx-1.3/button) usb 1-1.3: adding 1-1.3:1.1 (config #1, interface 1) usb 1-1.3: adding 1-1.3:1.2 (config #1, interface 2) snd-usb-audio 1-1.3:1.2: usb_probe_interface snd-usb-audio 1-1.3:1.2: usb_probe_interface - got id 66:3:1: cannot get freq at ep 0x84 usb 1-1.3: adding 1-1.3:1.3 (config #1, interface 3) hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0008
可以看到,一个用的是ehci和uhci,开发板使用ohci,2440上没有ehci,所以无法处理高速接口。
linux USB HOST之EHCI和OHCI
相关文章推荐
- php安装gd库扩展
- 再次研究几个动态库方面的编程
- Ubuntu下使用Git_5
- SublimeText3常用快捷键和优秀插件
- CentOS 7通过Firewall开放防火墙端口
- web magic 爬取京东 一个爬虫实现
- MySQL 8.0 DMR 发布,废弃了 MyISAM 存储引擎
- MySQL 8.0 DMR 发布,废弃了 MyISAM 存储引擎
- 完美世界2017c++游戏开发:笔试题+面试题
- 五,Java集合类(3)——List接口及其实现类
- 57. Insert Interval
- Codeforces Round #370 (Div. 2) B. Memory and Trident 水题
- 优化UITableViewCell高度计算的那些事
- ios开发Base64编码以及加密相关学习
- 转 内存池技术的原理与实现
- ZooKeeper 安装
- Android_AlarmManage及定时发送短信
- Thinkphp使用PHPMailer发送邮件
- 一头扎进设计模式-代理模式
- vim多窗口使用技巧