zongfan-shao / linux

1 stars 1 forks source link

linux免驱USB摄像头内核配置 #24

Open zongfan-shao opened 5 years ago

zongfan-shao commented 5 years ago

Device Drivers ---> <> Multimedia support ---> <> Video For Linux [ ] Enable Video For Linux API 1 (DEPRECATED) [] Video capture adapters ---> [] V4L USB devices ---> <> USB Video Class (UVC) [] UVC input events device support

zongfan-shao commented 5 years ago

除了第一步必须,其他的对应链接https://blog.csdn.net/qq_26093511/article/details/78763824 Step1 在drivers/media/usb/uvc/uvc_driver.c中添加以下内容 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO, .idVendor = 0x1E4E, .idProduct = 0x0109, .bInterfaceClass = USB_CLASS_VIDEO, .bInterfaceSubClass = 1, .bInterfaceProtocol = 0, .driver_info = UVC_QUIRK_PROBE_MINMAX },

其中 .idVendor = 0x1E4E, .idProduct = 0x0109, 对应我们使用的USB摄像头的VID和PID。

Step2: make menuconfig

  1. 进入 USB support

Device Drivers ---> [*] USB support ---> 如图配置:

  1. 选中 Multimedia support

Device Drivers ---> <*> Multimedia support ---> 如图配置:

  1. 再进入 Media USB Adapters

Device Drivers ---> <> Multimedia support ---> <>Media USB Adapters --->

如图配置

注:如果你不想编译成模块,可以把 UVC 这一项改为*,之后就不用 insmod 了

4 进入 V4L platform devices

Device Drivers ---> <> Multimedia support ---> <>V4L platform devices --->

如图配置

Step3 make uImage

USB摄像头无法正常使用.docx