登录 注册
当前位置:主页 > 资源下载 > 33 > wen_ov5640_r16_20161114_1744后插入UVC可以打开ov5640和USB摄像头.7z下载

wen_ov5640_r16_20161114_1744后插入UVC可以打开ov5640和USB摄像头.7z下载

  • 更新:2024-10-25 18:56:44
  • 大小:739KB
  • 推荐:★★★★★
  • 来源:网友上传分享
  • 类别:Android - 移动开发
  • 格式:7Z

资源介绍

wen_ov5640_r16_20161114_1744后插入UVC可以打开ov5640和USB摄像头.7z 20161114全志R16配置为前ov5640后UVC的双摄像头 1、 Z:\home\wwt\uvc_r16_project\android\device\softwinner\astar-evb20\configs\camera.cfg 修改: number_of_camera = 1 为: number_of_camera = 2 如果不改这里,兄弟,你在camera这个APP里面是绝对看不到前后摄像头的切换选项的!!!!^_ 修改ov5640的分辨率: used_preview_size = 1 key_support_preview_size = 640x480 key_default_preview_size = 640x480 used_picture_size = 1 key_support_picture_size = 640x480 key_default_picture_size = 640x480 为(根据你驱动里面的摄像头的寄存器配置分辨率而实际修改): used_preview_size = 1 key_support_preview_size = 2592x1936, 2048x1536, 1600x1200, 1280x960, 1280x960, 1024x768, 1920x1080 ,1280x720, 800x600, 640x480 key_default_preview_size = 640x480 used_picture_size = 1 key_support_picture_size = 2592x1936, 2048x1536, 1600x1200, 1280x960, 1280x960, 1024x768, 1920x1080 ,1280x720, 800x600, 640x480 key_default_picture_size = 640x480 2、 Z:\home\wwt\uvc_r16_project\android\device\softwinner\astar-evb20\astar_evb20.mk #include device/softwinner/polaris-common/prebuild/google/products/gms_minimal.mk 注释掉这里干掉Google Play。可以不改。 3、这里讲UVC配置为模块了,请注意UVC所需要的模块的加载顺序。 Z:\home\wwt\uvc_r16_project\android\device\softwinner\astar-evb20\init.sun8i.rc 默认为: #csi module insmod /system/vendor/modules/videobuf-core.ko insmod /system/vendor/modules/videobuf-dma-contig.ko insmod /system/vendor/modules/cam_detect.ko # insmod /system/vendor/modules/actuator.ko # insmod /system/vendor/modules/ad5820_act.ko insmod /system/vendor/modules/cci.ko insmod /system/vendor/modules/vfe_os.ko insmod /system/vendor/modules/vfe_subdev.ko insmod /system/vendor/modules/gc0307.ko # insmod /system/vendor/modules/ov2035.ko insmod /system/vendor/modules/vfe_v4l2.ko 修改为: #csi module # /dev/video0 ov5640 insmod /system/vendor/modules/videobuf-core.ko insmod /system/vendor/modules/videobuf-dma-contig.ko #insmod /system/vendor/modules/cam_detect.ko insmod /system/vendor/modules/cci.ko insmod /system/vendor/modules/vfe_os.ko insmod /system/vendor/modules/vfe_subdev.ko insmod /system/vendor/modules/ov5640.ko insmod /system/vendor/modules/vfe_v4l2.ko # /dev/video1 uvc insmod /system/vendor/modules/videobuf2-core.ko insmod /system/vendor/modules/videobuf2-memops.ko insmod /system/vendor/modules/videobuf2-vmalloc.ko insmod /system/vendor/modules/uvcvideo.ko 4、 Z:\home\wwt\uvc_r16_project\lichee\tools\pack\chips\sun8iw5p1\configs\default\env.cfg 推荐修改: bootdelay=0 为: bootdelay=3 5、不用修改: Z:\home\wwt\uvc_r16_project\lichee\tools\pack\chips\sun8iw5p1\configs\evb-20\sys_config.fex ;-------------------------------------------------------------------------------- ;vip (video input port) configuration ;vip_used: 0:disable 1:enable ;vip_mode: 0:sample one interface to one buffer 1:sample two interface to one buffer ;vip_dev_qty: The quantity of devices linked to capture bus ; ;vip_define_sensor_list: If you want use sensor detect function, please set vip_define_sensor_list = 1, and ; verify that file /system/etc/hawkview/sensor_list_cfg.ini is properly configured! ; ;vip_dev(x)_pos: sensor position, "rear" or "front", if vip_define_sensor_list = 1,vip_dev(x)_pos must be configured! ; ;vip_dev(x)_isp_used 0:not use isp 1:use isp ;vip_dev(x)_fmt: 0:yuv 1:bayer raw rgb ;vip_dev(x)_stby_mode: 0:not shut down power at standby 1:shut down power at standby ;vip_dev(x)_vflip: flip in vertical direction 0:disable 1:enable ;vip_dev(x)_hflip: flip in horizontal direction 0:disable 1:enable ;vip_dev(x)_iovdd: camera module io power handle string, pmu power supply ;vip_dev(x)_iovdd_vol: camera module io power voltage, pmu power supply ;vip_dev(x)_avdd: camera module analog power handle string, pmu power supply ;vip_dev(x)_avdd_vol: camera module analog power voltage, pmu power supply ;vip_dev(x)_dvdd: camera module core power handle string, pmu power supply ;vip_dev(x)_dvdd_vol: camera module core power voltage, pmu power supply ;vip_dev(x)_afvdd: camera module vcm power handle string, pmu power supply ;vip_dev(x)_afvdd_vol: camera module vcm power voltage, pmu power supply ;x indicates the index of the devices which are linked to the same capture bus ;fill voltage in uV, e.g. iovdd = 2.8V, vip_devx_iovdd_vol = 2800000 ;fill handle string as below: ;axp22_eldo3 ;axp22_dldo4 ;axp22_eldo2 ;fill handle string "" when not using any pmu power supply ;-------------------------------------------------------------------------------- [csi0] vip_used = 1 vip_mode = 0 vip_dev_qty = 1 vip_define_sensor_list = 0 vip_csi_pck = port:PE00<2> vip_csi_mck = port:PE01<2> vip_csi_hsync = port:PE02<2> vip_csi_vsync = port:PE03<2> vip_csi_d0 = port:PE04<2> vip_csi_d1 = port:PE05<2> vip_csi_d2 = port:PE06<2> vip_csi_d3 = port:PE07<2> vip_csi_d4 = port:PE08<2> vip_csi_d5 = port:PE09<2> vip_csi_d6 = port:PE10<2> vip_csi_d7 = port:PE11<2> vip_csi_sck = port:PE12<2> vip_csi_sda = port:PE13<2> vip_dev0_mname = "ov5640" vip_dev0_pos = "rear" vip_dev0_lane = 1 vip_dev0_twi_id = 2 vip_dev0_twi_addr = 0x78 vip_dev0_isp_used = 0 vip_dev0_fmt = 0 vip_dev0_stby_mode = 1 vip_dev0_vflip = 0 vip_dev0_hflip = 0 vip_dev0_iovdd = "axp22_dldo3" vip_dev0_iovdd_vol = 2800000 vip_dev0_avdd = "" vip_dev0_avdd_vol = 2800000 vip_dev0_dvdd = "" vip_dev0_dvdd_vol = 1800000 vip_dev0_afvdd = "" vip_dev0_afvdd_vol = 2800000 vip_dev0_power_en = vip_dev0_reset = port:PE14<1><0> vip_dev0_pwdn = port:PE15<1><1> vip_dev0_flash_en = vip_dev0_flash_mode = vip_dev0_af_pwdn = [usbc1] usb_used = 1 usb_drv_vbus_gpio = port:PD12<1><0><0> usb_restrict_gpio = usb_host_init_state = 1 usb_restric_flag = 0 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 编译内核之后, rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. dragonboard 2. linux 3. tina Choice: 0 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. bell-one 1. evb 2. evb-20 3. evb-rtl8723bs 4. sc3813r Choice: 2 rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ ./build.sh 配置USB摄像头为模块(也可以选择*直接编译进内核): rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ cd linux-3.4/ rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee/linux-3.4$ make ARCH=arm menuconfig Device Drivers ---> <*> Multimedia support ---> [*] Video capture adapters ---> 修改: [ ] V4L USB devices ---> 为: [*] V4L USB devices ---> 修改: < > USB Video Class (UVC) (NEW) 为 USB Video Class (UVC) rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ cd linux-3.4/ rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee/linux-3.4$ cd .. rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ ./build.sh rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/lichee$ cd ../android/ rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/android$ source build/envsetup.sh including device/softwinner/bellone-sc3813r/vendorsetup.sh including device/softwinner/astar-evb20/vendorsetup.sh including device/softwinner/r16-bell-one/vendorsetup.sh including device/softwinner/astar-evb/vendorsetup.sh including device/softwinner/polaris-common/vendorsetup.sh including device/lge/mako/vendorsetup.sh including device/lge/hammerhead/vendorsetup.sh including device/samsung/manta/vendorsetup.sh including device/generic/x86/vendorsetup.sh including device/generic/mips/vendorsetup.sh including device/generic/armv7-a-neon/vendorsetup.sh including device/asus/tilapia/vendorsetup.sh including device/asus/deb/vendorsetup.sh including device/asus/grouper/vendorsetup.sh including device/asus/flo/vendorsetup.sh including sdk/bash_completion/adb.bash rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/android$ lunch You're building on Linux Lunch menu... pick a combo: 1. aosp_arm-eng 2. aosp_x86-eng 3. aosp_mips-eng 4. vbox_x86-eng 5. bellone_sc3813r-eng 6. astar_evb20-eng 7. r16_bell_one-eng 8. astar_evb-eng 9. aosp_mako-userdebug 10. aosp_hammerhead-userdebug 11. aosp_manta-userdebug 12. mini_x86-userdebug 13. mini_mips-userdebug 14. mini_armv7a_neon-userdebug 15. aosp_tilapia-userdebug 16. aosp_deb-userdebug 17. aosp_grouper-userdebug 18. aosp_flo-userdebug Which would you like? [aosp_arm-eng] 6 ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=4.4.2 TARGET_PRODUCT=astar_evb20 TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a-neon TARGET_CPU_VARIANT=cortex-a7 HOST_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty HOST_BUILD_TYPE=release BUILD_ID=KVT49L OUT_DIR=out ============================================ rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/android$ extract-bsp rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/android$ make -j12 rootroot@cm-System-Product-Name:/home/wwt/uvc_r16_project/android$ pack 编译好系统之后,刷机之后请注意先让开发板的Android4.4启动完成之后再插入USB摄像头。 全志R16的android4.4启动之后再插入USB摄像头。 这个配置就可以设置 ov5640为后置摄像头:/dev/video0 UVC为前置摄像头:/dev/video1 如果接上USB摄像头再启动,android是被: ov5640为前置摄像头,有设备节点/dev/video1,打开失败。 UVC为后置摄像头:/dev/video0 原因未知。 参考资料: http://blog.****.net/u010257920/article/details/49925807 A20 linux(dragonboard)同时使用Parallel CSI Camera及UVC http://blog.****.net/guoyihoney/article/details/46966603 A20平台增加camera http://blog.****.net/it_fish_man/article/details/17395469 Android usb camera设备添加 http://blog.****.net/zmnqazqaz/article/details/49535531 RK3288 uvc摄像头调试 http://blog.****.net/edsam49/article/details/8886543 USB Camera在android车机上应用前景及初试小结