完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
Platform: RK3288
OS: Android 6.0 Kernel: 3.10.92 Kernel层: 打开UVC的宏 CONFIG_USB_VIDEO_CLASS=y 这个宏一般默认是配好的. 编译下载插上u*** camera开机之后应该会有类似如下log: [ 3.612836] u*** 3-1: New USB device found, idVendor=058f, idProduct=3822 [ 3.612857] u*** 3-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0 [ 3.612867] u*** 3-1: Product: USB 2.0 HD Camera [ 3.614985] uvcvideo: Found UVC 1.00 device USB 2.0 HD Camera (058f:3822) [ 3.622648] input: USB 2.0 HD Camera as /devices/ff540000.u***/u***3/3-1/3-1:1.0/input/input3 查看设备是否注册成功: shell@rk3288:/ $ ls /dev/video* /dev/video0 /dev/video1 /dev/video_state video0是CIF camera, video1就是UVC Camera了. HAL层: 系统默认只支持1颗Camera, 所以第二颗即使驱动注册成功,上层也无法识别到, 因此修改如下: int camera_device_open(const hw_module_t* module, const char* name, hw_device_t** device) { ...... if (name != NULL) { cameraid = atoi(name); if(cameraid > gCamerasNumber) { LOGE("camera service provided cameraid out of bounds, " "cameraid = %d, num supported = %d", cameraid, gCamerasNumber); rv = -EINVAL; goto fail; } /*Kris, Support two cameras. {*/ #if 0 if(gCamerasOpen >= CAMERAS_SUPPORTED_SIMUL_MAX) { LOGE("maximum number(%d) of cameras already open",gCamerasOpen); rv = -EUSERS; goto fail; } #endif /*Kris, Support two cameras. }*/ ...... }这样就可以了! 注意: RK3288目前不支持高清类型的也就是说mjpeg数据格式的UVC Camera,需要用YUYV格式的. 最快的区分方法是查看HAL层log, code会读取数据格式并打印出来. 01-01 12:03:15.420 216 578 D CameraHal: CameraHal(121): it is a uvc camera! 01-01 12:03:15.420 216 578 D CameraHal: Calling process is: com.android.camera2 01-01 12:03:15.465 216 578 D CameraHal: cameraCreate(374): Camera driver: uvcvideo Driver version: 3.10.0 CameraHal version: 1.55.2 01-01 12:03:15.465 216 578 D CameraHal: cameraCreate(381): mCamDriverSupportFmt: fmt = 1448695129,index = 0 01-01 12:03:15.465 216 578 D CameraHal: cameraCreate(419): cameraCreate(419): mCamDriverPreviewFmt(YUYV) is cameraHal and camera driver is also supported!! 01-01 12:03:15.465 216 578 D CameraHal: cameraCreate(421): mCamDriverPreviewFmt = 1448695129 01-01 12:03:15.465 216 578 D CameraHal: cameraCreate(427): cameraCreate(427): Current driver is uvcvideo, v4l2 memory is V4L2_MEMORY_MMAP |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1348 浏览 1 评论
synopsys 的design ware:DW_fpv_div,浮点数除法器,默认32位下,想提升覆盖率(TMAX),如果用功能case去提升覆盖率呢?
1391 浏览 1 评论
RK3588 GStreamer调试四路鱼眼摄像头四宫格显示报错
2970 浏览 1 评论
【飞凌嵌入式OK3576-C开发板体验】RKNN神经网络-YOLO图像识别
254 浏览 0 评论
【飞凌嵌入式OK3576-C开发板体验】SSH远程登录网络配置及CAN通讯
1336 浏览 0 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-3 00:20 , Processed in 0.584394 second(s), Total 73, Slave 56 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号