Hi NV:
While using ORIN NANO to light up the mipi camera OX08B40, I found that I was able to preview the image directly using argus_camera, as shown below:
However, when I used v4l2-CTL to print the frame rate, I found that v4l2 couldn’t grab the stream. The following commands are used:
v4l2-ctl --verbose --set-fmt-video=width=3840,height=2160 --set-ctrl bypass_mode=0,sensor_mode=0 --stream-mmap -d /dev/video1
The printed information is as follows:
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 3840/2160
Pixel Format : 'RG12' (12-bit Bayer RGRG/GBGB)
Field : None
Bytes per Line : 7680
Size Image : 16588800
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
VIDIOC_REQBUFS returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_STREAMON returned 0 (Success)
cap dqbuf: 0 seq: 0 bytesused: 16588800 ts: 90.859628 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 1 bytesused: 16588800 ts: 90.892950 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 2 bytesused: 16588800 ts: 90.926272 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 3 bytesused: 16588800 ts: 90.959595 delta: 33.323 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 4 bytesused: 16588800 ts: 91.092883 delta: 133.288 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 5 bytesused: 16588800 ts: 91.126205 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 6 bytesused: 16588800 ts: 91.159527 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 7 bytesused: 16588800 ts: 91.192849 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 8 bytesused: 16588800 ts: 91.226171 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 9 bytesused: 16588800 ts: 91.259493 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 10 bytesused: 16588800 ts: 91.292815 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 11 bytesused: 16588800 ts: 91.326137 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 12 bytesused: 16588800 ts: 91.359459 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 13 bytesused: 16588800 ts: 91.392781 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 14 bytesused: 16588800 ts: 91.426103 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 15 bytesused: 16588800 ts: 91.459425 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 16 bytesused: 16588800 ts: 91.492747 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 17 bytesused: 16588800 ts: 91.526069 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 18 bytesused: 16588800 ts: 91.559391 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 19 bytesused: 16588800 ts: 91.592713 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 20 bytesused: 16588800 ts: 91.626035 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 21 bytesused: 16588800 ts: 91.659357 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 22 bytesused: 16588800 ts: 91.692679 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 23 bytesused: 16588800 ts: 91.726001 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 24 bytesused: 16588800 ts: 91.759323 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 25 bytesused: 16588800 ts: 91.792645 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 26 bytesused: 16588800 ts: 91.825967 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 27 bytesused: 16588800 ts: 91.859289 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 28 bytesused: 16588800 ts: 91.892611 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 29 bytesused: 16588800 ts: 91.925933 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 30 bytesused: 16588800 ts: 91.959255 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 31 bytesused: 16588800 ts: 91.992577 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 32 bytesused: 16588800 ts: 92.025900 delta: 33.323 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 33 bytesused: 16588800 ts: 92.059222 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 34 bytesused: 16588800 ts: 92.092544 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 35 bytesused: 16588800 ts: 92.125866 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 36 bytesused: 16588800 ts: 92.159188 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 37 bytesused: 16588800 ts: 92.192510 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 38 bytesused: 16588800 ts: 92.225832 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 39 bytesused: 16588800 ts: 92.259154 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 40 bytesused: 16588800 ts: 92.292476 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 41 bytesused: 16588800 ts: 92.325798 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 42 bytesused: 16588800 ts: 92.359120 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 43 bytesused: 16588800 ts: 92.392442 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 44 bytesused: 16588800 ts: 92.425764 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 45 bytesused: 16588800 ts: 92.459086 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 46 bytesused: 16588800 ts: 92.492408 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 47 bytesused: 16588800 ts: 92.525730 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 48 bytesused: 16588800 ts: 92.559052 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 49 bytesused: 16588800 ts: 92.592374 delta: 33.322 ms (error, ts-monotonic, ts-src-eof)
The dmesg information is as follows:
[ 72.538325] ox08b40 9-0036: probing v4l2 sensor at addr 0x36
[ 72.538447] ox08b40 9-0036: mclk name not present, assume sensor driven externally
[ 72.538453] ox08b40 9-0036: avdd, iovdd and/or dvdd reglrs. not present, assume sensor powered independently
[ 72.538662] ox08b40 9-0036: tegracam sensor driver:ox08b40_0_v2.0.6
[ 72.538731] tegra-camrtc-capture-vi tegra-capture-vi: subdev ox08b40 9-0036 bound
[ 72.539327] ox08b40 9-0036: sensor_power_on: power on
[ 72.543610] ox08b40 9-0036: sensor_open:
[ 72.645398] ox08b40 9-0036: detected ox08b40_0 sensor
[ 72.645750] ox08b40 10-0036: probing v4l2 sensor at addr 0x36
[ 72.645850] ox08b40 10-0036: mclk name not present, assume sensor driven externally
[ 72.645854] ox08b40 10-0036: avdd, iovdd and/or dvdd reglrs. not present, assume sensor powered independently
[ 72.645942] ox08b40 10-0036: tegracam sensor driver:ox08b40_1_v2.0.6
[ 72.646023] tegra-camrtc-capture-vi tegra-capture-vi: subdev ox08b40 10-0036 bound
[ 72.646903] ox08b40 10-0036: sensor_power_on: power on
[ 72.651684] ox08b40 10-0036: sensor_open:
[ 72.753445] ox08b40 10-0036: detected ox08b40_1 sensor
[ 74.230131] start_addr=(0x20000), end_addr=(0x40000), buffer_size=(0x20000), smp_number_max=(16384)
[ 74.894711] ox08b40 10-0036: sensor_power_on: power on
[ 74.904071] ox08b40 10-0036: sensor5 set mode in 0!!!
[ 75.306973] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 1, flags: 0, err_data 64
[ 75.340221] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 2, flags: 0, err_data 64
[ 75.373543] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 3, flags: 0, err_data 64
[ 75.406872] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 4, flags: 0, err_data 64
[ 75.473457] ox08b40 10-0036: sensor_start_streaming:
[ 75.540205] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 8, flags: 0, err_data 64
[ 75.573471] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 9, flags: 0, err_data 64
[ 75.606820] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 10, flags: 0, err_data 64
[ 75.640118] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 11, flags: 0, err_data 64
[ 75.673445] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 12, flags: 0, err_data 64
[ 75.706764] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 13, flags: 0, err_data 64
[ 75.740087] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 14, flags: 0, err_data 64
[ 75.773421] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 15, flags: 0, err_data 64
[ 75.806737] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 16, flags: 0, err_data 64
[ 75.840050] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 17, flags: 0, err_data 64
[ 75.873471] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 18, flags: 0, err_data 64
[ 75.906744] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 19, flags: 0, err_data 64
[ 75.940096] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 20, flags: 0, err_data 64
[ 75.973395] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 21, flags: 0, err_data 64
[ 76.006689] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 22, flags: 0, err_data 64
[ 76.040033] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 23, flags: 0, err_data 64
[ 76.073364] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 24, flags: 0, err_data 64
[ 76.106661] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 25, flags: 0, err_data 64
[ 76.139969] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 26, flags: 0, err_data 64
[ 76.173281] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 27, flags: 0, err_data 64
[ 76.206635] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 28, flags: 0, err_data 64
[ 76.239929] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 29, flags: 0, err_data 64
[ 76.273269] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 30, flags: 0, err_data 64
[ 76.306854] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 31, flags: 0, err_data 64
[ 76.340157] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 32, flags: 0, err_data 64
[ 76.373203] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 33, flags: 0, err_data 64
[ 76.406612] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 34, flags: 0, err_data 64
[ 76.439851] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 35, flags: 0, err_data 64
[ 76.473173] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 36, flags: 0, err_data 64
[ 76.506537] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 37, flags: 0, err_data 64
[ 76.539826] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 38, flags: 0, err_data 64
[ 76.573130] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 39, flags: 0, err_data 64
[ 76.606520] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 40, flags: 0, err_data 64
[ 76.639800] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 41, flags: 0, err_data 64
[ 76.673120] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 42, flags: 0, err_data 64
[ 76.706679] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 43, flags: 0, err_data 64
[ 76.739773] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 44, flags: 0, err_data 64
[ 76.773096] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 45, flags: 0, err_data 64
[ 76.806657] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 46, flags: 0, err_data 64
[ 76.839774] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 47, flags: 0, err_data 64
[ 76.873321] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 48, flags: 0, err_data 64
[ 76.906368] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 49, flags: 0, err_data 64
[ 76.939668] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 50, flags: 0, err_data 64
[ 76.973014] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 51, flags: 0, err_data 64
[ 77.006315] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 52, flags: 0, err_data 64
[ 77.039733] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 53, flags: 0, err_data 64
[ 77.072994] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 54, flags: 0, err_data 64
[ 77.073027] ox08b40 10-0036: sensor_stop_streaming:
[ 77.073825] ox08b40 10-0036: sensor_power_off: power off
I would like to ask how to make v4l2 get stream? Thank you very much for your help.