1、默认SDK配置UVC驱动
diff --git a/kernel/arch/arm/configs/rv1126_defconfig b/kernel/arch/arm/configs/rv1126_defconfig
index 3f380ed..ceb035e 100755
--- a/kernel/arch/arm/configs/rv1126_defconfig
+++ b/kernel/arch/arm/configs/rv1126_defconfig
@@ -210,6 +210,10 @@ CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_CONTROLLER=y
CONFIG_VIDEO_V4L2_SUBDEV_API=y
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_USB_VIDEO_CLASS=y
+CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
+CONFIG_USB_GSPCA=m
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_VIDEO_ROCKCHIP_CIF=y
CONFIG_VIDEO_ROCKCHIP_ISP=y
2.使用v4l2-ctl查看列表
[root@ROCKEMD:/]# v4l2-ctl --list-devices
rkisp-statistics (platform: rkisp):
/dev/video14
/dev/video15
/dev/video16
/dev/video26
/dev/video27
/dev/video28
rkispp_input_params (platform: rkispp):
/dev/video34
/dev/video35
/dev/video41
/dev/video42
rkcif (platform:rkcif_mipi_lvds):
/dev/video4
rkisp_mainpath (platform:rkisp-vir0):
/dev/video5
/dev/video6
/dev/video7
/dev/video8
/dev/video9
/dev/video10
/dev/video11
/dev/video12
/dev/video13
rkisp_mainpath (platform:rkisp-vir1):
/dev/video17
/dev/video18
/dev/video19
/dev/video20
/dev/video21
/dev/video22
/dev/video23
/dev/video24
/dev/video25
rkispp_input_image (platform:rkispp-vir0):
/dev/video29
/dev/video30
/dev/video31
/dev/video32
/dev/video33
rkispp_input_image (platform:rkispp-vir1):
/dev/video36
/dev/video37
/dev/video38
/dev/video39
/dev/video40
USB IR Camera: USB IR Camera (usb-ffe00000.usb-1.1):
/dev/video43
/dev/video44
USB RGB Camera: USB RGB Camera (usb-ffe00000.usb-1.2):
/dev/video45
/dev/video46
Failed to open /dev/video0: No such device
[root@ROCKEMD:/]#
3、生成两个video**修改如下
diff --git a/kernel/drivers/media/usb/uvc/uvc_driver.c b/kernel/drivers/media/usb/uvc/uvc_driver.c
old mode 100644
new mode 100755
index 07b7eed..ec9e947
--- a/kernel/drivers/media/usb/uvc/uvc_driver.c
+++ b/kernel/drivers/media/usb/uvc/uvc_driver.c
@@ -2066,7 +2066,7 @@ static int uvc_register_terms(struct uvc_device *dev,
/* Register a metadata node, but ignore a possible failure,
* complete registration of video nodes anyway.
*/
- uvc_meta_register(stream);
+ //uvc_meta_register(stream);
term->vdev = &stream->vdev;
}
修改后查看效果
USB IR Camera: USB IR Camera (usb-ffe00000.usb-1.1):
/dev/video43
USB RGB Camera: USB RGB Camera (usb-ffe00000.usb-1.2):
/dev/video44
技术交流群: 微信号