Hi team,
We are working on “JetPack_4.5.1_Linux_JETSON_XAVIER_NX_DEVKIT” with
TI DS90UB954 and TI DS90UB953 evk’s with ar0521 camera. at serializer side we are
connected the ar0521 camera with two diff data lines. camera drivers loaded without any
errors(detected camera i2c addresses) and created the /dev/video0 node. but while trying to
record the video using below command i m facing one error. please check the below log.
kernel verison: 4.9.201
ser/deser linux drivers got from below link:
https://github.com/InES-HPMM/FPD-LinkIII_ds90ub95x
connections:
---------------csi2,i2c-------------fpd-link----------csi2,i2c
xavier board-----> deserializer-------->serializer----->camera
Log:
target board:~$ ffmpeg -f video4linux2 -input_format yuyv422 -framerate 30 -video_size 1280x720 -i /dev/video0 file.mkv
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
[video4linux2,v4l2 @ 0x55aed96640] The driver changed the time per frame from 1/30 to 1/100
[video4linux2,v4l2 @ 0x55aed96640] Dequeued v4l2 buffer contains corrupted data (1843200 bytes).
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 0.000000, bitrate: 1474560 kb/s
Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1280x720, 1474560 kb/s, 100 fps, 100 tbr, 1000k tbn, 1000k tbc
File 'file.mkv' already exists. Overwrite ? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[video4linux2,v4l2 @ 0x55aed96640] Dequeued v4l2 buffer contains corrupted data (1843200 bytes).
Last message repeated 30 times
[video4linux2,v4l2 @ 0x55aed96640] Dequeued v4l2 buffer contains corrupted data (1843200 bytes).
Last message repeated 32 times
[video4linux2,v4l2 @ 0x55aed96640] Dequeued v4l2 buffer contains corrupted data (1843200 bytes).
Last message repeated 32 times
[video4linux2,v4l2 @ 0x55aed96640] Dequeued v4l2 buffer contains corrupted data (1843200 bytes).
Last message repeated 32 times
[video4linux2,v4l2 @ 0x55aed96640] Dequeued v4l2 buffer contains corrupted data (1843200 bytes).
Last message repeated 32 times
Finishing stream 0:0 without any data written to it.14:32:22.77 bitrate= -0.0kbits/s speed=N/A
[libx264 @ 0x55aed9a2d0] using cpu capabilities: ARMv8 NEON
[libx264 @ 0x55aed9a2d0] profile High 4:2:2, level 4.2, 4:2:2 8-bit
[libx264 @ 0x55aed9a2d0] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, matroska, to 'file.mkv':
Metadata:
encoder : Lavf57.83.100
Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv422p, 1280x720, q=-1--1, 100 fps, 1k tbn, 100 tbc
Metadata:
encoder : Lavc57.107.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 0 fps=0.0 q=0.0 Lsize= 1kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
> Blockquote
Please find the attached devicetree for ser/deser and camera ar0521.Processing: ser_deser_ar0521_devicetree.txt…
I can say that we can communicate with serializer from deserializer by below points.
→ I can able to make the serializer gpios high and low using driver register conf.
→ Able to detect i2c addresses, which are connected at serializer end.
→ Able to load the kernel drivers of detected i2c addresses(tca6424 and ar0521 camera) at serializer.
→ tca6424(IO expander) is working fine without any errors.
devicetree for ser/deser and camera:
ser/deser dts:
ds90ub954_a@30 {
compatible = "ti,ds90ub954";
reg = <0x30>;
csi-lane-count = <2>;
csi-lane-speed = <800>;
status = "okay";
i2c_address_s0: num-alias-pairs0 {list-cells = <2>;};
serializers {
num-channels = <1>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
serializer@0 {
rx-channel=<0>;
i2c-address=<0x18>;
csi-lane-count = <2>;
i2c-pass-through-all;
virtual-channel-map = <0x0>;
gpio3-output-enable = <1>;
gpio3-control = <0x9>;
i2c-slave = <&i2c_address_s0 0x42 0x22>;
slave-alias = <&i2c_address_s0 0x21 0x11>;
status = "okay";
};
};
};
camera:
ar0521_cam0: ecam_ar0521_a@42 {
compatible = "nvidia,ar0521";
/* I2C device address */
reg = <0x42>;
/* V4L2 device node location */
devnode = "video0";
status = "okay";
/* Physical dimensions of sensor */
physical_w = "3.680";
physical_h = "2.760";
sensor_model = "ar0521";
//Default use_sensor_mode_id is false
/*use_sensor_mode_id = "false";*/
camera_mipi_lanes = <2>;
disable-framesync;
mode0 { /* AR0521_MODE_640x480_75FPS */
mclk_khz = "48000";
num_lanes = "2";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "yes";
dpcm_enable = "false";
cil_settletime = "0";
dynamic_pixel_bit_depth = "16";
csi_piPreformatted textxel_bit_depth = "16";
mode_type = "yuv";
active_w = "640";
active_h = "480";
/* pixel_t = "uyvy";*/
pixel_phase = "uyvy";
readout_orientation = "0";
line_length = "2000";
inherent_gain = "1";
mclk_multiplier = "18";
pix_clk_hz = "1200000000";
min_gain_val = "0";
max_gain_val = "48"; /* 10.66x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "1"; /* 2.0 fps */
max_framerate = "75"; /* 21.0 fps */
step_framerate = "1";
default_framerate = "21000000"; /* 21.0 fps */
min_exp_time = "1"; /* us */
max_exp_time = "43000000"; /* us */
embedded_metadata_height = "0";
};