jerrycui
发表于 2021-12-14 17:37:14
zyk 发表于 2021-12-14 17:36
有下载SDK,编译过内核吗
也下载过,也编译过,都不能用。用的这修版本rk356x_linux_release_20211019
上边的两个我用的都是官方的固件,没动过。
zyk
发表于 2021-12-14 17:44:07
本帖最后由 zyk 于 2021-12-14 17:47 编辑
也可以。烧回buildroot的固件,然后驱动kernel/drivers/media/i2c/xc7160.c添加一下这句 xc7160->isp_out_colorbar = true;
static int __xc7160_start_stream(struct xc7160 *xc7160)
{
int ret;
struct device *dev = &xc7160->client->dev;
#ifdef FIREFLY_DEBUG
xc7160_check_isp_reg(xc7160);
#endif // DEBUG
/*if the application doesn't call xxx_set_fmt, we initial isp and sensorhere*/
if(xc7160->initial_status != true){
xc7160_global_regs = xc7160->cur_mode->isp_reg_list;
sc8238_global_regs = xc7160->cur_mode->sensor_reg_list;
camera_isp_sensor_initial(xc7160);
}
+ xc7160->isp_out_colorbar = true;
if(xc7160->isp_out_colorbar == true){
dev_info(dev, "colorbar on !!!\n");
ret = xc7160_write_array(xc7160->client, xc7160_colorbar_on_regs);
}else
ret = xc7160_write_array(xc7160->client, xc7160_stream_on_regs);
if(ret)
dev_err(dev, "xc7160 write stream or colorbar regs failed\n");
之后编译内核烧写,看一下能否输出彩条
jerrycui
发表于 2021-12-14 18:00:14
zyk 发表于 2021-12-14 17:44
也可以。烧回buildroot的固件,然后驱动kernel/drivers/media/i2c/xc7160.c添加一下这句 xc7160->isp_out_c ...
加过后,仍然不行,还请指教,谢谢。
C:\Users\admin>adb shell
#
#
#
# demsg | grep xc7
/bin/sh: demsg: not found
# dmesg | grep xc7
[ 2.122416] xc7160 4-001b: T-chip firefly camera driver version: 00.01.02
[ 2.122658] xc7160 4-001b: Failed to get power-gpios, maybe no use
[ 2.122716] xc7160 4-001b: Looking up avdd-supply from device tree
[ 2.122724] xc7160 4-001b: Looking up avdd-supply property in node /i2c@fe5d0000/XC7160b@1b failed
[ 2.122751] xc7160 4-001b: 4-001b supply avdd not found, using dummy regulator
[ 2.122807] xc7160 4-001b: Linked as a consumer to regulator.0
[ 2.122819] xc7160 4-001b: Looking up dovdd-supply from device tree
[ 2.122826] xc7160 4-001b: Looking up dovdd-supply property in node /i2c@fe5d0000/XC7160b@1b failed
[ 2.122843] xc7160 4-001b: 4-001b supply dovdd not found, using dummy regulator
[ 2.122878] xc7160 4-001b: Looking up dvdd-supply from device tree
[ 2.122885] xc7160 4-001b: Looking up dvdd-supply property in node /i2c@fe5d0000/XC7160b@1b failed
[ 2.122899] xc7160 4-001b: 4-001b supply dvdd not found, using dummy regulator
[ 2.122950] xc7160 4-001b: could not get default pinstate
[ 2.122962] xc7160 4-001b: could not get sleep pinstate
[ 2.122980] xc7160 4-001b: Success to get xc7160 endpoint data lanes, dts uses 4 lanes
[ 2.122989] xc7160 4-001b: xc7160 num data lanes is 4
[ 2.142055] xc7160 4-001b: isp chip is xc7160
[ 2.142428] rockchip-csi2-dphy csi2-dphy0: dphy0 matches m00_b_xc7160 4-001b:bus type 4
[ 4.751891] xc7160 4-001b: isp chip is xc7160
[ 4.788564] xc7160 4-001b: isp chip is xc7160
[ 4.821910] xc7160 4-001b: isp chip is xc7160
[ 5.572141] xc7160 4-001b: isp chip is xc7160
[ 5.611973] xc7160 4-001b: isp chip is xc7160
#
#
#
# v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=1920,he
ight=1080,pixelformat='NV12' --stream-mmap=4
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture Multiplanar:
Width/Height : 1920/1080
Pixel Format : 'NV12' (Y/CbCr 4:2:0)
Field : None
Number of planes: 1
Flags :
Colorspace : Default
Transfer Function : Default
YCbCr/HSV Encoding: Default
Quantization : Full Range
Plane 0 :
Bytes per Line : 1920
Size Image : 3110400
^C
# uname -a
Linux RK356X 4.19.206 #16 SMP Tue Dec 14 17:50:04 CST 2021 aarch64 GNU/Linux
#
#
#
zyk
发表于 2021-12-14 18:02:01
dmesg|grep colorbar 看一下,好像没有看见打印彩条
jerrycui
发表于 2021-12-14 18:03:42
zyk 发表于 2021-12-14 18:02
dmesg|grep colorbar 看一下,好像没有看见打印彩条
# uname -a
Linux RK356X 4.19.206 #16 SMP Tue Dec 14 17:50:04 CST 2021 aarch64 GNU/Linux
#
#
#
# dmesg|grep colorbar
[ 63.577044] xc7160 4-001b: colorbar on !!!
#
zyk
发表于 2021-12-14 18:07:16
我这边试了linux和Android的固件都可以出图
#
# v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=1920,he
ight=1080,pixelformat='NV12' --stream-mmap=4
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture Multiplanar:
Width/Height : 1920/1080
Pixel Format : 'NV12' (Y/CbCr 4:2:0)
Field : None
Number of planes: 1
Flags :
Colorspace : Default
Transfer Function : Default
YCbCr/HSV Encoding: Default
Quantization : Full Range
Plane 0 :
Bytes per Line : 1920
Size Image : 3110400
idx: 0 seq: 1 bytesused: 3110400 ts: 25.431010
idx: 1 seq: 2 bytesused: 3110400 ts: 25.464393 delta: 33.383 ms
idx: 2 seq: 3 bytesused: 3110400 ts: 25.497672 delta: 33.279 ms
idx: 3 seq: 4 bytesused: 3110400 ts: 25.531001 delta: 33.329 ms
idx: 0 seq: 12 bytesused: 3110400 ts: 26.025495 delta: 494.494 ms fps: 18.50dropped: 7
idx: 1 seq: 13 bytesused: 3110400 ts: 26.058810 delta: 33.315 ms fps: 19.11
idx: 2 seq: 14 bytesused: 3110400 ts: 26.092090 delta: 33.280 ms fps: 19.66
idx: 3 seq: 15 bytesused: 3110400 ts: 26.125519 delta: 33.429 ms fps: 20.16
idx: 0 seq: 16 bytesused: 3110400 ts: 26.158809 delta: 33.290 ms fps: 20.61
idx: 1 seq: 17 bytesused: 3110400 ts: 26.192125 delta: 33.316 ms fps: 21.02
idx: 2 seq: 18 bytesused: 3110400 ts: 26.225438 delta: 33.313 ms fps: 21.40
idx: 3 seq: 19 bytesused: 3110400 ts: 26.258768 delta: 33.330 ms fps: 21.75
idx: 0 seq: 20 bytesused: 3110400 ts: 26.292127 delta: 33.359 ms fps: 22.06
idx: 1 seq: 21 bytesused: 3110400 ts: 26.325430 delta: 33.303 ms fps: 22.36
手头上有多余的板子吗,没有建议你走一下售后。把板子和摄像头模组寄过来分析一下,写明让软件工程师处理
jerrycui
发表于 2021-12-14 18:12:55
zyk 发表于 2021-12-14 18:07
我这边试了linux和Android的固件都可以出图
手头上有多余的板子吗,没有建议你走一下售后。把板子和摄像 ...手头就这一块板子,摄像头新买的。
给个联系方式,寄过去分析下吧。
zyk
发表于 2021-12-15 08:51:32
联系售后,你可以把帖子发给售后看一下。到时候你把单号私发给我
jerrycui
发表于 2021-12-16 08:51:38
zyk 发表于 2021-12-15 08:51
联系售后,你可以把帖子发给售后看一下。到时候你把单号私发给我
快递已发,单号:SF1139344208697, 请注意查收 ,谢谢。
zyk
发表于 2021-12-16 09:10:56
jerrycui 发表于 2021-12-16 08:51
快递已发,单号:SF1139344208697, 请注意查收 ,谢谢。
好的