xref: /OK3568_Linux_fs/buildroot/package/libcamera/0001-HACK-v4l2-Bypass-API-version-check.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 28ae28a5025a4987f117444fbc15a5e4a0fbf8f5 Mon Sep 17 00:00:00 2001
2From: Jeffy Chen <jeffy.chen@rock-chips.com>
3Date: Tue, 29 Nov 2022 17:17:27 +0800
4Subject: [PATCH 1/3] HACK: v4l2: Bypass API version check
5
6Some drivers overrides it to their private versions.
7
8Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
9---
10 src/libcamera/v4l2_videodevice.cpp | 2 ++
11 1 file changed, 2 insertions(+)
12
13diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
14index 6391133..ba472f7 100644
15--- a/src/libcamera/v4l2_videodevice.cpp
16+++ b/src/libcamera/v4l2_videodevice.cpp
17@@ -583,6 +583,7 @@ int V4L2VideoDevice::open()
18 		return ret;
19 	}
20
21+#if 0 // HACK: Bypass version check
22 	if (caps_.version < KERNEL_VERSION(5, 0, 0)) {
23 		LOG(V4L2, Error)
24 			<< "V4L2 API v" << (caps_.version >> 16)
25@@ -591,6 +592,7 @@ int V4L2VideoDevice::open()
26 			<< " too old, v5.0.0 or later is required";
27 		return -EINVAL;
28 	}
29+#endif
30
31 	if (!caps_.hasStreaming()) {
32 		LOG(V4L2, Error) << "Device does not support streaming I/O";
33--
342.20.1
35
36