Kernel 打开 UVC Camera 驱动


kernel/linux-4.9/arch/arm64/configs/xxxx_defconfig
kernel/linux-4.9/arch/arm64/configs/xxxx_extra_modem_defconfig

内核配置开关如下:

CONFIG_VIDEO_V4L2_SUBDEV_API=y
CONFIG_USB_VIDEO_CLASS=y
CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_V4L_PLATFORM_DRIVERS=y

在这里插入图片描述


禁止Android Camera

# frameworks/av/services/camera/libcameraservice$ git diff .
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index 2bf42b6..2b0346b 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -1286,6 +1286,18 @@ Status CameraService::connectHelper(const sp<CALLBACK>& cameraCb, const String8&
             (halVersion == -1) ? "default" : std::to_string(halVersion).c_str(),
             static_cast<int>(effectiveApiLevel));
 
+    // 20201016 disable android camea +++
+    if(clientName8 == "com.huawei.dmsdpdevice") {
+        ALOGI("com.huawei.dmsdpdevice is forbid, ID \"%s\"", cameraId.string());
+        return STATUS_ERROR_FMT(ERROR_CAMERA_IN_USE,
+            "com.huawei.dmsdpdevice is forbid, ID \"%s\"",
+            cameraId.string());
+    }
+    // 20201016 disable android camea +++
已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页