Supporting two video modes

Hi,

I am trying to support simultaneously PAL and NTSC with the same TX2 on the same channel /dev/video0, that is without modifying the device tree.
I have added two modes to the mode0 and mode1.
Expecting that automatically running the following lines will activate the correct standard within the driver:
gst-launch-1.0 v4l2src device=/dev/video0 ! ‘video/x-raw, format=(string)UYVY,width=720,height=576,framerate=(fraction)25/1’ ! xvimagesink
gst-launch-1.0 v4l2src device=/dev/video0 ! ‘video/x-raw, format=(string)UYVY,width=720,height=480,framerate=(fraction)30000/1001’ ! xvimagesink
Goes without saying that the input standard is changed per the gstreamer activation.
The first option runs OK while for the second option states: “Internal data flow error”

What am I doing wrong?

Hi,
It looks like the mode is not supported by source. Please check steps of launching v4l2 sources:
Jetson Nano FAQ
Q: I have a USB camera. How can I launch it on Jetson Nano?

Your source may not support 720x480p29.97.

@DaneLLL, hi,

I am using the ADV7280A-m as the video source which is a very NTSC supportive.

any suggestions?

Hi,
Usually we see framerate in integers like:

nvidia@nvidia-desktop:~$ v4l2-ctl -d/dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
        Index       : 0
        Type        : Video Capture
        Pixel Format: 'UYVY'
        Name        : UYVY 4:2:2
                Size: Discrete 1280x720
                        Interval: Discrete 0.017s (60.000 fps)
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 1920x1080
                        Interval: Discrete 0.017s (60.000 fps)
                        Interval: Discrete 0.033s (30.000 fps)
                Size: Discrete 3840x2160
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.133s (7.500 fps)
                Size: Discrete 4208x3120
                        Interval: Discrete 0.111s (9.000 fps)
                        Interval: Discrete 0.222s (4.500 fps)
                Size: Discrete 4096x2160
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.133s (7.500 fps)
                Size: Discrete 640x480
                        Interval: Discrete 0.008s (120.000 fps)
                        Interval: Discrete 0.017s (60.000 fps)

Don’t try the case with 29.97fps. Could you try this pipeline:

gst-launch-1.0 v4l2src device=/dev/video0 ! ‘video/x-raw, format=(string)UYVY,width=720,height=480,framerate=(fraction)30000/1001’ ! videoconvert ! xvimagesink

See if it works with videoconvert plugin. And we would suggest go to gstreamer forum to get help.

@DaneLLL,

I never mentioned 29.97 (though it is the result of 30000/1001).

My original question was releated to the fact that I’m trying to set the device tree with two modes (mode0[PAL] and mode1[NTSC]), and select one of them from user space.

any suggestions?

Hi,
So the sensor input supports 720x480p29.97 and 720x576p25. After adding the two modes into device tree, 720x480p29.97 don’t show up in v4l2-ctl. Is this the issue?

Yes you are correct. Only the PAL can be show up in v4l2-ctl as it is mode0 (I guess).

Hi,
Please attach your device tree. Are you on r32.4.4 or r32.5?

@DaneLLL,

the TX2 is with L4T 28.2.1 (JP3.2.1), DT: DeviceTree_2modes.txt (323.1 KB)

hello igal.kroyter,

could you please also share the messages after your gst pipeline?
it’ll also report all available modes before streaming.
thanks

@JerryChang, hi,

following is a terminal print out upon invocation of the gst pipelines:

The video input is PAL to video0:

gst-launch-1.0 v4l2src device=/dev/video0 ! ‘video/x-raw, format=(string)UYVY,width=720,height=576,framerate=(fraction)25’ ! xvimagesink
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
^Chandling interrupt. I have CTRL-C to stop the video which was displaying
Interrupt: Stopping pipeline …
Execution ended after 0:00:34.255460319
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

The video input is PAL to video0:

gst-launch-1.0 v4l2src device=/dev/video0 ! ‘video/x-raw, format=(string)UYVY,width=720,height=480,framerate=(fraction)30000/1001’ ! xvimagesink
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:02.548097002
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

The video input is NTSC to video0:

gst-launch-1.0 v4l2src device=/dev/video0 ! ‘video/x-raw, format=(string)UYVY,width=720,height=480,framerate=(fraction)30000/1001’ ! xvimagesink
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:01.626733233
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

I can configure within the driver to any standard (NTSC or PAL) - it is actually now in autodetection mode - but I do not what the layers above (i.e. v4l2 ) require.
I found no “all available modes before streaming”…

hello igal.kroyter,

oh, sorry, v4l2src did not report all available sensor modes while streaming.

you may use $ v4l2-ctl -d /dev/video0 --list-formats-ext, to check those available modes.
since only the PAL can be show up, you cannot choose NTSC with v4l2src plugin.

could you please review the sensor mode table. had you populate all modes to camera_common_frmfmt[] struct?
thanks

@JerryChang, hi,
following is the list of all formats though I think that I need the list of all supported standards (i.e., PAL, NTSC).

v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘UYVY’
Name : UYVY 4:2:2

Index : 1
Type : Video Capture
Pixel Format: ‘RGB3’ (emulated)
Name : RGB3

Index : 2
Type : Video Capture
Pixel Format: ‘BGR3’ (emulated)
Name : BGR3

Index : 3
Type : Video Capture
Pixel Format: ‘YU12’ (emulated)
Name : YU12

Index : 4
Type : Video Capture
Pixel Format: ‘YV12’ (emulated)
Name : YV12

Per the attached adv7180.c adv7180.c (78.3 KB) that I’ve modified you may find on line 1696-1708 the camera_common_frmfmt[] struct

static const int frameratePAL[1] = {
25,
};

static const int framerateNTSC[1] = {
30,
};

static const struct camera_common_frmfmt adv7280fmt[2] =
{
{{720, 576}, frameratePAL, 1, 0, ADV7280_MODE_720x576},
{{720, 480}, framerateNTSC, 1, 0, ADV7280_MODE_720x480}
};
As I understand it the mode is an item in the common_data->frmfmt array.
The frmfmt is utlized in the following functions:

  1. camera_common.c: select_mode (invoked only by camera_common_try_fmt)
  2. camera_common.c: camera_common_try_fmt (does not configure unless the TEGRA_CAMERA_CID_HDR_EN control is supported)
  3. camera_common.c: camera_common_enum_framesizes
  4. camera_common.c: camera_common_enum_frameintervals (supports only fie->interval.numerator=1, but not 1001 as per the NTSC standard)

So I don’t see any way to set the mode.

Please advise.

hello igal.kroyter,

the default mode selection logic picks-up a sensor-mode based on resolution, color format, and frame rate;
there’s a boolean variable, use_sensor_mode_id you may include into device tree, then you’re able to enable CID control, TEGRA_CAMERA_CID_SENSOR_MODE_ID, to select a specific sensor mode.

in addition,
could you please also follow below steps to enable the debug flags for camera_common.c to gather more details?
it’ll enable dev_dbg(), and print the messages to kernel logs.
for example,

# cd /sys/kernel/debug/dynamic_debug/
# echo file camera_common.c +p > control

@JerryChang, hi

I have added the use_sensor_mode_id flag per your suggestion, in the following dtsi file: camera-dummy.dtsi (5.4 KB)

I have enabled the debugging display with the following lines as I did not have permission to apply the commands per your request:

sudo su
echo file camera_sensor.c +p |sudo tee /sys/kernel/debug/dynamic_debug/control
exit
but I saw no logs on the teminals:

gst-launch-1.0 v4l2src device=/dev/video0 ! ‘video/x-raw, format=(string)UYVY,width=720,height=480,framerate=(fraction)30000/1001’ ! xvimagesink
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not read from resource.
Additional debug info:
gstv4l2bufferpool.c(1054): gst_v4l2_buffer_pool_poll (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
poll error 1: Invalid argument (22)
Execution ended after 0:00:02.130841314
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

[ 2431.647893] *********************adv7180_s_power 1
[ 2431.653368] *********************adv7180_set_power 1
[ 2431.663401] nvcsi 150c0000.nvcsi: csi port:0
[ 2431.668881] *********************adv7180_g_input_status 0x0 0
[ 2431.676123] *********************adv7180_g_input_status 0x0 0
[ 2431.682821] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2431.691915] *********************adv7180_set_pad_format height:1 width:1 quantization:0x0
[ 2431.700147] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2431.706683] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2431.715672] *********************adv7180_set_pad_format height:32768 width:32768 quantization:0x0
[ 2431.724613] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2431.731113] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x1
[ 2431.740141] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2431.748665] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2431.755161] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x4
[ 2431.764135] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2431.772689] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2431.779156] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2431.788139] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2431.796657] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2431.803119] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2431.812119] *********************adv7180_set_pad_format height:1 width:1 quantization:0x0
[ 2431.820299] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2431.826768] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2431.835718] *********************adv7180_set_pad_format height:2 width:8 quantization:0x0
[ 2431.843915] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2431.850357] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2431.859345] *********************adv7180_set_pad_format height:32768 width:32768 quantization:0x0
[ 2431.868209] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2431.874680] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2431.883635] *********************adv7180_set_pad_format height:32769 width:32775 quantization:0x0
[ 2431.892523] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2431.898984] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x1
[ 2431.907970] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2431.916490] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2431.922965] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x4
[ 2431.931925] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2431.940470] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2431.946921] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2431.955901] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2431.964420] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2431.970907] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2431.979859] *********************adv7180_set_pad_format height:1 width:1 quantization:0x0
[ 2431.988060] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2431.994503] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2432.003454] *********************adv7180_set_pad_format height:2 width:8 quantization:0x0
[ 2432.011661] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.018096] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2432.027076] *********************adv7180_set_pad_format height:32768 width:32768 quantization:0x0
[ 2432.035940] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.042410] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2432.051361] *********************adv7180_set_pad_format height:32769 width:32775 quantization:0x0
[ 2432.060262] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.066712] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x1
[ 2432.075701] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2432.084219] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.090692] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x4
[ 2432.099653] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2432.108199] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.114655] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2432.123647] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2432.132158] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.138642] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2432.147594] *********************adv7180_set_pad_format height:1 width:1 quantization:0x0
[ 2432.155788] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.162232] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2432.171195] *********************adv7180_set_pad_format height:2 width:8 quantization:0x0
[ 2432.179375] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.185833] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2432.194787] *********************adv7180_set_pad_format height:32768 width:32768 quantization:0x0
[ 2432.203652] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.210107] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2432.219058] *********************adv7180_set_pad_format height:32769 width:32775 quantization:0x0
[ 2432.227920] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.234385] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x1
[ 2432.243336] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2432.251851] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.258295] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x4
[ 2432.267257] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2432.275776] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.282227] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2432.291180] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2432.299695] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.306160] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2432.315112] *********************adv7180_set_pad_format height:1 width:1 quantization:0x0
[ 2432.323291] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.329731] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2432.338692] *********************adv7180_set_pad_format height:2 width:8 quantization:0x0
[ 2432.346863] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.353307] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2432.362258] *********************adv7180_set_pad_format height:32768 width:32768 quantization:0x0
[ 2432.371121] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.377568] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2432.386520] *********************adv7180_set_pad_format height:32769 width:32775 quantization:0x0
[ 2432.395382] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.401832] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x1
[ 2432.410784] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2432.419300] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.425744] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x4
[ 2432.434702] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2432.443219] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.449671] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x0
[ 2432.458622] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2432.467137] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.473688] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:0 field:0x1
[ 2432.482643] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2432.491169] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.497613] *********************adv7180_set_pad_format pad0 which:0 code:0x200f color:1 field:0x1
[ 2432.506562] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2432.515080] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.521516] *********************adv7180_set_pad_format pad0 which:1 code:0x200f color:1 field:0x1
[ 2432.530465] *********************adv7180_set_pad_format height:480 width:720 quantization:0x0
[ 2432.538979] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.547349] *********************adv7180_mbus_fmt:e 1 b000 height:480
[ 2432.555031] tegra-vi4 15700000.vi: Create Surface with imgW=720, imgH=480, memFmt=203
[ 2432.563355] *********************adv7180_g_frame_interval 30000
[ 2432.569930] misc tegra_camera_ctrl: vi_v4l2_update_isobw: requested iso bw is larger than max 0 23846400 1000000
[ 2432.580772] nvcsi 150c0000.nvcsi: csi4_start_streaming ports index=0, lanes=1
[ 2432.587989] nvcsi 150c0000.nvcsi: csi4_stream_init
[ 2432.592837] nvcsi 150c0000.nvcsi: csi4_stream_config
[ 2432.597884] nvcsi 150c0000.nvcsi: csi4_stream_config (0) read VC0_DPCM_CTRL = 00000000
[ 2432.605868] nvcsi 150c0000.nvcsi: csi4_phy_config
[ 2432.610597] nvcsi 150c0000.nvcsi: NVCSI_CIL_CONFIG = 00000000
[ 2432.616360] nvcsi 150c0000.nvcsi: cil_settingtime is pulled from device
[ 2432.622985] nvcsi 150c0000.nvcsi: cil core clock: 204, csi clock: 102
[ 2432.629435] nvcsi 150c0000.nvcsi: cil_settingtime was autocalculated
[ 2432.635810] nvcsi 150c0000.nvcsi: csi settle time: 33, cil settle time: 25
[ 2432.642710] *********************adv1782_Autodetect_CVBS_Single_Ended_In_Ain1_Progressive_Out
[ 2432.651904] tegra-i2c 31c0000.i2c: no acknowledge from address 0x21
[ 2433.733326] *********************reg 0x10: 0x4f
[ 2433.738753] *********************reg 0x11: 0x43
[ 2433.744199] *********************reg 0x12: 0x0
[ 2433.749517] *********************reg 0x13: 0xed
[ 2433.754061] *********************adv1782_Autodetect_CVBS_Single_Ended_In_Ain1_Progressive_Out 50 35
[ 2433.763107] video4linux video0: vi_notify_wait In
[ 2433.778747] video4linux video0: vi_notify_wait Out
[ 2433.783562] video4linux video0: tegra_channel_capture_frame: vi4 got SOF syncpt buf[ffffffc06bff9400]
[ 2433.792810] video4linux video0: vi_notify_wait In
[ 2433.797548] tegra-vi4 15700000.vi: Status: 4 channel:00 frame:0002
[ 2433.803826] tegra-vi4 15700000.vi: timestamp sof 2459311124544 eof 2459326485312 data 0x01e00040
[ 2433.813400] tegra-vi4 15700000.vi: capture_id 1040 stream 0 vchan 0
[ 2433.991816] video4linux video0: MW_ACK_DONE syncpoint time out! err -11 0 1040
[ 2433.999108] video4linux video0: tegra_channel_release_frame: vi4 got EOF syncpt buf[ffffffc06bff9400]
[ 2434.795771] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 2434.802207] video4linux video0: vi_notify_wait Out
[ 2434.807218] video4linux video0: tegra_channel_capture_frame: vi4 got SOF syncpt buf[ffffffc06bff8800]
[ 2435.815845] tegra-vi4 15700000.vi: ATOMP_FE syncpt timeout!
[ 2435.821757] nvcsi 150c0000.nvcsi: csi4_stop_streaming ports index=0, lanes=1
[ 2435.828915] nvcsi 150c0000.nvcsi: csi4_phy_config
[ 2435.833795] nvcsi 150c0000.nvcsi: NVCSI_CIL_CONFIG = 00000001
[ 2435.839832] nvcsi 150c0000.nvcsi: csi4_stream_check_status
[ 2435.845500] nvcsi 150c0000.nvcsi: csi4_cil_check_status 374
[ 2435.851151] *********************adv7180_g_frame_interval 30000
[ 2435.911912] *********************adv7180_s_power 0
[ 2435.917572] *********************adv7180_set_power 0

When I provide NTSC source a window opens and then closes, If I have “luck” after multiple repeatitions the window displays a constant frame from the video source which alternatively displayed with green frame repeatedly.
PAL source is not displayed at all anymore.
Please advise.

hello igal.kroyter,

it seems there’s i2c no acknowledge while you enable the sensor stream,

besides, there’s also an issue cannot wait for sensor signaling correctly.

Hi JerryChang,

just prior to activating the streaming I configure full script as advised by Analog Devices. The first command there is power off the device upon this command the A2D does not reply, but immediatly afterwards all other registers are configure OK.

what should I do about the sensor signaling? the status from the A2D is that it is in sync and samples the analog video.

hello igal.kroyter,

please also request a longer delay for the capture engine to prevent timeouts.
you may add the device tree property, set_mode_delay_ms.
please check Sensor Software Driver Programming Guide for reference,
thanks

hi @JerryChang,

the good news are that PAL works OK, but NTSC does not. fails immediatly without opening a window.

Should I do anything to change the mode? or is somehow done “automatically” by reading the requested resolution?
Or should I invoke an ioctl TEGRA_CAMERA_CID_SENSOR_MODE_ID from user mode?

hello igal.kroyter,

are those NTSC sensor modes populate to v4l2 standard controls?
i.e. $ v4l2-ctl -d /dev/video0 --list-formats-ext