RK3566 Android13 OV5695摄像头调试
查看相关日志
查看设备
测试和验证 OV5695 摄像头功能的完整命令
用于从 /dev/video0 设备捕获 500 帧 1920×1080 分辨率、NV12 格式的视频数据。调用相机拍照
临时禁用 SELinux
检查相机 HAL 模块
拍摄视频
查看支持的格式
测试显示信息test_pattern
打开相机运行下面程序,可以看到
test_pattern 的参数0~3,0=相机原画,1=彩条测试,2=马赛克测试,3=花屏测试
检测链路是否正常
测试情况,点击展开更多
rk3566_tspi_1f:/ # media-ctl -d /dev/media0 -p
Opening media device /dev/media0
Enumerating entities
Found 14 entities
Enumerating pads and links
Media controller API version 0.0.157
Media device information
------------------------
driver rkisp-vir0
model rkisp0
serial
bus info
hw revision 0x0
driver version 0.0.157
Device topology
- entity 1: rkisp-isp-subdev (4 pads, 8 links)
type V4L2 subdev subtype Unknown
device node name /dev/v4l-subdev0
pad0: Sink
[fmt:SBGGR10/2592x1944
crop.bounds:(0,0)/2592x1944
crop:(0,0)/2592x1944]
<- "rkisp-csi-subdev":1 [ENABLED]
<- "rkisp_rawrd0_m":0 []
<- "rkisp_rawrd2_s":0 []
pad1: Sink
<- "rkisp-input-params":0 [ENABLED]
pad2: Source
[fmt:YUYV2X8/2592x1944
crop.bounds:(0,0)/2592x1944
crop:(0,0)/2592x1944]
-> "rkisp_mainpath":0 [ENABLED]
-> "rkisp_selfpath":0 [ENABLED]
-> "rkisp_iqtool":0 []
pad3: Source
-> "rkisp-statistics":0 [ENABLED]
- entity 6: rkisp-csi-subdev (6 pads, 5 links)
type V4L2 subdev subtype Unknown
device node name /dev/v4l-subdev1
pad0: Sink
[fmt:SBGGR10/2592x1944]
<- "rockchip-csi2-dphy1":1 [ENABLED]
pad1: Source
[fmt:SBGGR10/2592x1944]
-> "rkisp-isp-subdev":0 [ENABLED]
pad2: Source
-> "rkisp_rawwr0":0 [ENABLED]
pad3: Source
pad4: Source
-> "rkisp_rawwr2":0 [ENABLED]
pad5: Source
-> "rkisp_rawwr3":0 [ENABLED]
- entity 13: rkisp_mainpath (1 pad, 1 link)
type Node subtype V4L
device node name /dev/video0
pad0: Sink
<- "rkisp-isp-subdev":2 [ENABLED]
- entity 19: rkisp_selfpath (1 pad, 1 link)
type Node subtype V4L
device node name /dev/video1
pad0: Sink
<- "rkisp-isp-subdev":2 [ENABLED]
- entity 25: rkisp_rawwr0 (1 pad, 1 link)
type Node subtype V4L
device node name /dev/video2
pad0: Sink
<- "rkisp-csi-subdev":2 [ENABLED]
- entity 31: rkisp_rawwr2 (1 pad, 1 link)
type Node subtype V4L
device node name /dev/video3
pad0: Sink
<- "rkisp-csi-subdev":4 [ENABLED]
- entity 37: rkisp_rawwr3 (1 pad, 1 link)
type Node subtype V4L
device node name /dev/video4
pad0: Sink
<- "rkisp-csi-subdev":5 [ENABLED]
- entity 43: rkisp_iqtool (1 pad, 1 link)
type Node subtype V4L
device node name /dev/video5
pad0: Sink
<- "rkisp-isp-subdev":2 []
- entity 49: rkisp_rawrd0_m (1 pad, 1 link)
type Node subtype V4L
device node name /dev/video6
pad0: Source
-> "rkisp-isp-subdev":0 []
- entity 55: rkisp_rawrd2_s (1 pad, 1 link)
type Node subtype V4L
device node name /dev/video7
pad0: Source
-> "rkisp-isp-subdev":0 []
- entity 61: rkisp-statistics (1 pad, 1 link)
type Node subtype V4L
device node name /dev/video8
pad0: Sink
<- "rkisp-isp-subdev":3 [ENABLED]
- entity 67: rkisp-input-params (1 pad, 1 link)
type Node subtype V4L
device node name /dev/video9
pad0: Source
-> "rkisp-isp-subdev":1 [ENABLED]
- entity 73: rockchip-csi2-dphy1 (2 pads, 2 links)
type V4L2 subdev subtype Unknown
device node name /dev/v4l-subdev2
pad0: Sink
[fmt:SBGGR10/2592x1944]
<- "m00_b_ov5695 1-0036":0 [ENABLED]
pad1: Source
-> "rkisp-csi-subdev":0 [ENABLED]
- entity 76: m00_b_ov5695 1-0036 (1 pad, 1 link)
type V4L2 subdev subtype Sensor
device node name /dev/v4l-subdev3
pad0: Source
[fmt:SBGGR10/2592x1944]
-> "rockchip-csi2-dphy1":0 [ENABLED]
从media-ctl -p输出看,整个相机链路是正常的:
OV5695传感器 → CSI2 DPHY → ISP → 主路径
所有链路都显示
[ENABLED]
查找文件
快速手动更新iqfiles
C:\Users\win\Downloads>adb root
restarting adbd as root
C:\Users\win\Downloads>adb remount
remount succeeded
C:\Users\win\Downloads>adb push C:\Users\win\Videos\ov5695_TongJu_CHT842-MD.json /vendor/etc/camera/rkisp2/ov5695_TongJu_CHT842-MD.json
C:\Users\win\Videos\ov5695_TongJu_CHT842-MD.json: 1 file pushed, 0 skipped. 31.7 MB/s (251843 bytes in 0.008s)
C:\Users\win\Downloads>adb push C:\Users\win\Videos\ov5695_TongJu_CHT842-MD.json /vendor/etc/camera/rkisp2/result/ov5695_TongJu_CHT842-MD.json
C:\Users\win\Videos\ov5695_TongJu_CHT842-MD.json: 1 file pushed, 0 skipped. 34.8 MB/s (251843 bytes in 0.007s)
C:\Users\win\Downloads>adb push C:\Users\win\Videos\ov5695_TongJu_CHT842-MD.json /vendor/etc/camera/iqfiles/ov5695_TongJu_CHT842-MD.json
C:\Users\win\Videos\ov5695_TongJu_CHT842-MD.json: 1 file pushed, 0 skipped. 7.7 MB/s (251843 bytes in 0.031s)
C:\Users\win\Downloads>adb shell
rk3566_tspi_1f:/ # sync
rk3566_tspi_1f:/ # reboot
设置摄像头显示方向
android13/hardware/rockchip/camera/etc/camera/camera3_profiles_rk356x.xml
快速编译相机APP并通过ADB安装
单独编译 Camera2 模块 :
重新安装 APK :
重启设备并进行全面测试 :
解决问题
是SDK的驱动问题。更新以下补丁即可:
From ab8b0c377cc7ecf4cacc982a4ae44c4773d62926 Mon Sep 17 00:00:00 2001
From: Yu Qiaowei <cerf.yu@rock-chips.com>
Date: Wed, 29 Nov 2023 17:36:50 +0800
Subject: [PATCH] normal: fix normal API causing fd 0 to be close
Acquire_fence_fd is valid only if acquire_fence_fd > 0 and in async mode.
update to 1.10.0_[7]
Change-Id: I7d215bf6a5535c56322b3b1c075f3fb9aef00a88
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
---
core/NormalRga.cpp | 18 +++++++-----------
im2d_api/im2d_version.h | 2 +-
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/core/NormalRga.cpp b/core/NormalRga.cpp
index bbc74b3..3a38240 100644
--- a/core/NormalRga.cpp
+++ b/core/NormalRga.cpp
@@ -61,7 +61,7 @@ int get_int_property(void) {
}
static void rga_set_driver_feature(struct rgaContext *ctx) {
- if (rga_version_compare(ctx->mDriverVersion, (struct rga_version_t){ 1, 3, 0, {0} }) > 0)
+ if (rga_version_compare(ctx->mDriverVersion, (struct rga_version_t){ 1, 3, 0, {0} }) >= 0)
ctx->driver_feature |= RGA_DRIVER_FEATURE_USER_CLOSE_FENCE;
}
@@ -1476,8 +1476,9 @@ int RgaBlit(rga_info *src, rga_info *dst, rga_info *src1) {
dst->out_fence_fd = rgaReg.out_fence_fd;
- if ((rgaCtx->driver_feature & RGA_DRIVER_FEATURE_USER_CLOSE_FENCE) &&
- (dst->in_fence_fd >= 0))
+ if (rgaCtx->driver_feature & RGA_DRIVER_FEATURE_USER_CLOSE_FENCE &&
+ dst->in_fence_fd > 0 &&
+ sync_mode == RGA_BLIT_ASYNC)
close(dst->in_fence_fd);
return 0;
@@ -1781,8 +1782,9 @@ int RgaCollorFill(rga_info *dst) {
dst->out_fence_fd = rgaReg.out_fence_fd;
- if ((rgaCtx->driver_feature & RGA_DRIVER_FEATURE_USER_CLOSE_FENCE) &&
- (dst->in_fence_fd >= 0))
+ if (rgaCtx->driver_feature & RGA_DRIVER_FEATURE_USER_CLOSE_FENCE &&
+ dst->in_fence_fd > 0 &&
+ sync_mode == RGA_BLIT_ASYNC)
close(dst->in_fence_fd);
return 0;
@@ -2401,12 +2403,6 @@ int RgaCollorPalette(rga_info *src, rga_info *dst, rga_info *lut) {
return -errno;
}
- dst->out_fence_fd = rgaReg.out_fence_fd;
-
- if ((rgaCtx->driver_feature & RGA_DRIVER_FEATURE_USER_CLOSE_FENCE) &&
- (dst->in_fence_fd >= 0))
- close(dst->in_fence_fd);
-
return 0;
}
diff --git a/im2d_api/im2d_version.h b/im2d_api/im2d_version.h
index dad4b9c..02b828a 100644
--- a/im2d_api/im2d_version.h
+++ b/im2d_api/im2d_version.h
@@ -26,7 +26,7 @@
#define RGA_API_MAJOR_VERSION 1
#define RGA_API_MINOR_VERSION 10
#define RGA_API_REVISION_VERSION 0
-#define RGA_API_BUILD_VERSION 6
+#define RGA_API_BUILD_VERSION 7
#define RGA_API_SUFFIX
--
2.25.1


评论