Unable to make camera works

I’m using a TX2 with JetPack 3.1. The tx2 is installed on the Auvidea J140 board.
I’m trying to connect a raspberry pi camera v2.1 (imx219)

As other posts said, Auvidea hasn’t make the development. So I try by myself.

I’m using kernel sources, J106 for TX1 patches to make camera works and J140 TX2 patches.

Thinks I have made :

  • Updated imx219 driver in kernel to manage correctly raspberry pi cam (based on J106 patches)
  • Applied all kernel updatesfor J140 (based on J140 patches)
  • Updated device tree to remove camera plugin manager and added my own camera file based on tegra186-quill-camera-imx219.dtsi and J106 device tree

After many days, the system show me a /dev/video0 and the behavior with and with camera is different.

To test my camera I use following command :

nvidia@tegra-ubuntu:~$  v4l2-compliance -d /dev/video0
v4l2-compliance SHA   : not available

Driver Info:
        Driver name   : tegra-video
        Card type     : vi-output, imx219 0-0010
        Bus info      : platform:15700000.vi:0
        Driver version: 4.4.38
        Capabilities  : 0x84200001
                Video Capture
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x04200001
                Video Capture
                Streaming
                Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
        test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
        test second video open: OK
        test VIDIOC_QUERYCAP: OK
        test VIDIOC_G/S_PRIORITY: OK
        test for unlimited opens: OK

Debug ioctls:
        test VIDIOC_DBG_G/S_REGISTER: OK
        test VIDIOC_LOG_STATUS: OK

Input ioctls:
        test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
        test VIDIOC_ENUMAUDIO: OK (Not Supported)
        test VIDIOC_G/S/ENUMINPUT: OK
        test VIDIOC_G/S_AUDIO: OK (Not Supported)
        Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
        test VIDIOC_G/S_MODULATOR: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_ENUMAUDOUT: OK (Not Supported)
        test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
        test VIDIOC_G/S_AUDOUT: OK (Not Supported)
        Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
        test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
        test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
        test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
        test VIDIOC_G/S_EDID: OK (Not Supported)

Test input 0:

        Control ioctls:
                test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
                test VIDIOC_QUERYCTRL: OK
                test VIDIOC_G/S_CTRL: OK
                test VIDIOC_G/S/TRY_EXT_CTRLS: OK
                test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
                test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
                Standard Controls: 1 Private Controls: 11

        Format ioctls:
                test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
                fail: v4l2-test-formats.cpp(1184): ret && node->has_frmintervals
                test VIDIOC_G/S_PARM: FAIL
                test VIDIOC_G_FBUF: OK (Not Supported)
                test VIDIOC_G_FMT: OK
                test VIDIOC_TRY_FMT: OK
                test VIDIOC_S_FMT: OK
                test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
                test Cropping: OK (Not Supported)
                test Composing: OK (Not Supported)
                test Scaling: OK (Not Supported)

        Codec ioctls:
                test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
                test VIDIOC_G_ENC_INDEX: OK (Not Supported)
                test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

        Buffer ioctls:
                test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
                test VIDIOC_EXPBUF: OK

Test input 0:


Total: 43, Succeeded: 42, Failed: 1, Warnings: 0

And when I ask for a capture I got no errors :

nvidia@tegra-ubuntu:~$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
        Width/Height      : 1280/720
        Pixel Format      : 'RG10'
        Field             : None
        Bytes per Line    : 2560
        Size Image        : 1843200
        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: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_STREAMON: ok
        Index    : 0
        Type     : Video Capture
        Flags    : mapped, done
        Field    : None
        Sequence : 0
        Length   : 1843200
        Bytesused: 1843200
        Timestamp: 0.18446744073442383036s (Monotonic, End-of-Frame)

VIDIOC_STREAMOFF: ok

The raw image is fully black but with a size which changes when I change resolution.

The dmesg output show me these errors :

[  689.110113] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  690.114218] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  691.118312] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  692.122418] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  693.126510] tegra-vi4 15700000.vi: ATOMP_FE syncpt timeout!

I googled it but all answers don’t works for me.
Any clue ?

What gives ?

v4l2-ctl --list-formats
nvidia@tegra-ubuntu:~/v4l-utils-1.14.2$ v4l2-ctl --list-formats
ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'RGGB'
	Name        : 8-bit Bayer RGRG/GBGB

	Index       : 1
	Type        : Video Capture
	Pixel Format: 'RG10'
	Name        : 10-bit Bayer RGRG/GBGB

	Index       : 2
	Type        : Video Capture
	Pixel Format: 'BG10'
	Name        : 10-bit Bayer BGBG/GRGR

	Index       : 3
	Type        : Video Capture
	Pixel Format: 'RG12'
	Name        : 12-bit Bayer RGRG/GBGB

If it can help here the advanced log when I run command :

root@tegra-ubuntu:~# v4l2-ctl -d /dev/video0 -w --verbose --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
VIDIOC_REQBUFS: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_STREAMON: ok
	Index    : 0
	Type     : Video Capture
	Flags    : mapped, done
	Field    : None
	Sequence : 0
	Length   : 8200192
	Bytesused: 8200192
	Timestamp: 0.18446744073441910161s (Monotonic, End-of-Frame)

VIDIOC_STREAMOFF: ok
root@tegra-ubuntu:~# cat /sys/kernel/debug/tracing/trace 
# tracer: nop
#
# entries-in-buffer/entries-written: 34/34   #P:4
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
     kworker/0:1-113   [000] ...1   780.457574: rtos_queue_peek_from_isr_failed: tstamp:24686623049 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   780.457578: rtcpu_start: tstamp:24686623941
     kworker/0:1-113   [000] ...1   780.613584: rtos_queue_peek_from_isr_failed: tstamp:24691623937 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   780.769598: rtos_queue_peek_from_isr_failed: tstamp:24696624445 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   780.925596: rtos_queue_peek_from_isr_failed: tstamp:24701624968 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   781.081588: rtos_queue_peek_from_isr_failed: tstamp:24706625456 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   781.237582: rtos_queue_peek_from_isr_failed: tstamp:24711625960 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   781.393590: rtos_queue_peek_from_isr_failed: tstamp:24716626478 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   781.549583: rtos_queue_peek_from_isr_failed: tstamp:24721626978 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   781.705564: rtos_queue_peek_from_isr_failed: tstamp:24726627482 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   781.861574: rtos_queue_peek_from_isr_failed: tstamp:24731627991 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   782.017567: rtos_queue_peek_from_isr_failed: tstamp:24736628495 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   782.173574: rtos_queue_peek_from_isr_failed: tstamp:24741629012 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   782.329563: rtos_queue_peek_from_isr_failed: tstamp:24746629516 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   782.537576: rtos_queue_peek_from_isr_failed: tstamp:24751630024 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   782.693532: rtos_queue_peek_from_isr_failed: tstamp:24756630524 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   782.849574: rtos_queue_peek_from_isr_failed: tstamp:24761631030 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   783.005552: rtos_queue_peek_from_isr_failed: tstamp:24766631537 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   783.161549: rtos_queue_peek_from_isr_failed: tstamp:24771632046 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   783.317559: rtos_queue_peek_from_isr_failed: tstamp:24776632559 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   783.473562: rtos_queue_peek_from_isr_failed: tstamp:24781633047 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   783.629550: rtos_queue_peek_from_isr_failed: tstamp:24786633563 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   783.785517: rtos_queue_peek_from_isr_failed: tstamp:24791634078 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   783.941533: rtos_queue_peek_from_isr_failed: tstamp:24796634580 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   784.097544: rtos_queue_peek_from_isr_failed: tstamp:24801635085 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   784.253537: rtos_queue_peek_from_isr_failed: tstamp:24806635591 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   784.409526: rtos_queue_peek_from_isr_failed: tstamp:24811636099 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   784.617532: rtos_queue_peek_from_isr_failed: tstamp:24816636613 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   784.773529: rtos_queue_peek_from_isr_failed: tstamp:24821637112 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   784.929526: rtos_queue_peek_from_isr_failed: tstamp:24826637629 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   785.085516: rtos_queue_peek_from_isr_failed: tstamp:24831638125 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   785.241516: rtos_queue_peek_from_isr_failed: tstamp:24836638634 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   785.397511: rtos_queue_peek_from_isr_failed: tstamp:24841639139 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1   785.449751: rtos_queue_peek_from_isr_failed: tstamp:24844118700 queue:0x0b4a3c58

After many investigations, I had an error in the device tree.

Here my device tree that’s working with gst launch 1.0 command :

/*
 * Copyright (c) 2015-2016, NVIDIA CORPORATION.  All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "dt-bindings/clock/tegra186-clock.h"

#define CAM0_RST_L     TEGRA_MAIN_GPIO(R, 5)
#define CAM0_PWDN	TEGRA_MAIN_GPIO(R, 0)
#define CAM1_RST_L	TEGRA_MAIN_GPIO(O, 1) /*F8*/
#define CAM1_PWDN	TEGRA_MAIN_GPIO(N, 2) /*F7*/

/* camera control gpio definitions */
/ {
	host1x {
		vi@15700000 {
			num-channels = <1>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				vi_port0: port@0 { //CSI A
					status = "okay";
					reg = <0>;
					imx219_vi_in0: endpoint {
						status = "okay";
						csi-port = <0>;
						bus-width=<2>;
						remote-endpoint = <&e3322_csi_out0>;
					};
				};
			};
		};

		nvcsi@150c0000 {
			num-channels = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
			channel@0 {
				status = "okay";
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						status = "okay";
						reg = <0>;
						e3322_csi_in0: endpoint@0 {
							csi-port = <0>;
							bus-width = <2>;
							remote-endpoint = <&imx219_o0>;
						};
					};
					port@1 {
						status = "okay";
						reg = <1>;
						e3322_csi_out0: endpoint@1 {
							remote-endpoint = <&imx219_vi_in0>;
						};
					};
				};
			};
		};
	};

	i2c@3160000 {
		rpicam0: imx219_a@10 {
			status = "okay";
			compatible = "nvidia,imx219";
			reg = <0x10>;
			devnode = "video0";
			sensor_model ="imx219";

			clocks = <&tegra_car TEGRA186_CLK_EXTPERIPH1>;
			clock-names = "extperiph1";
			mclk = "extperiph1";
			reset-gpios = <&tegra_main_gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
			vana-supply = <&en_vdd_cam_hv_2v8>;
			vdig-supply = <&en_vdd_sys>;
			dovdd-supply = <&en_vdd_cam>;
			avdd-reg = "vana";
			dvdd-reg = "vdig";
			iovdd-reg = "dovdd";		
	
			physical_w = "5.095";
			physical_h = "4.930";
			post_crop_frame_drop = "0";			

			mode0 { // MODE_3280X2464
				mclk_khz = "24000";
				num_lanes = "2";
				tegra_sinterface = "serial_a";
				discontinuous_clk = "yes";
				cil_settletime = "0";

				active_w = "3280";
				active_h = "2464";
				pixel_t = "bayer_rggb";
				readout_orientation = "0";
				line_length = "3446";
				inherent_gain = "1";
				mclk_multiplier = "25";
				pix_clk_hz = "170000000";

				min_gain_val = "1.0";
				max_gain_val = "16.0";
				min_hdr_ratio = "1";
				max_hdr_ratio = "64";
				min_framerate = "1.462526";
				max_framerate = "30";
				min_exp_time = "13";
				max_exp_time = "683709";
				embedded_metadata_height = "1";
			};
			
			ports {
				#address-cells = <1>;
				#size-cells = <0>;

				port@0 {
					reg = <0>;
					imx219_o0: endpoint {
						csi-port = <0>;
						bus-width = <2>;
						remote-endpoint = <&e3322_csi_in0>;
					};
				};
			};
		};
	};

	gpio@2200000 {
		camera-control-output-high {
			gpio-hog;
			output-high;
			gpios = <CAM0_RST_L 0 CAM0_PWDN 0
				 CAM1_RST_L 0 CAM1_PWDN 0>;
			label = "j140-cam0-rst", "j140-cam0-pwdn",
				"j140-cam1-rst", "j140-cam1-pwdn";
		};

		camera-control-output-low {
			status = "disabled";
		};

		camera-control-input {
			status = "disabled";
		};
	};

	tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";

		num_csi_lanes = <2>;
		max_lane_speed = <1500000>;
		min_bits_per_pixel = <10>;
		vi_peak_byte_per_pixel = <2>;
		vi_bw_margin_pct = <25>;
		isp_peak_byte_per_pixel = <5>;
		isp_bw_margin_pct = <25>;

		/**
		* tpg_max_iso = <>;
		* Max iso bw for 6 streams of tpg
		* streams * nvcsi_freq * PG_bitrate / RG10 * BPP
		* 6 * 102Mhz * 32 bits/ 10 bits * 2 Bps
		* = 3916.8 MBps
		*/
		tpg_max_iso = <3916800>;

		/**
		 * The general guideline for naming badge_info contains 3 parts, and is as follows,
		 * The first part is the camera_board_id for the module; if the module is in a FFD
		 * platform, then use the platform name for this part.
		 * The second part contains the position of the module, ex. “rear” or “front”.
		 * The third part contains the last 6 characters of a part number which is found
		 * in the module's specsheet from the vender.
		 */
		modules {
			cam_module0: module0 {
				badge = "rpi_bottomleft_imx219";
				position = "bottomleft";
				orientation = "1";
				cam_module0_drivernode0: drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "imx219 0-0010";
					proc-device-tree = "/proc/device-tree/i2c@3160000/imx219_a@10";
				};
				drivernode1 {
					status = "disabled";
					pcl_id = "v4l2_lens";
				};
			};
			cam_module1: module1 {
				status = "disabled";
				cam_module1_drivernode0: drivernode0 {
					status = "disabled";
				};
				cam_module1_drivernode1: drivernode1 {
					status = "disabled";
					pcl_id = "v4l2_lens";
				};
			};
			cam_module2: module2 {
				status = "disabled";
				cam_module2_drivernode0: drivernode0 {
					status = "disabled";
				};
				cam_module2_drivernode1: drivernode1 {
					status = "disabled";
					pcl_id = "v4l2_lens";
				};
			};
			cam_module3: module3 {
				status = "disabled";
				cam_module3_drivernode0: drivernode0 {
					status = "disabled";
				};
				cam_module3_drivernode1: drivernode1 {
					status = "disabled";
					pcl_id = "v4l2_lens";
				};
			};
			cam_module4: module4 {
				status = "disabled";
				cam_module4_drivernode0: drivernode0 {
					status = "disabled";
				};
				cam_module4_drivernode1: drivernode1 {
					status = "disabled";
					pcl_id = "v4l2_lens";
				};
			};
			cam_module5: module5 {
				status = "disabled";
				cam_module5_drivernode0: drivernode0 {
					status = "disabled";
				};
				cam_module5_drivernode1: drivernode1 {
					status = "disabled";
					pcl_id = "v4l2_lens";
				};
			};
		};
	};
};

I can manage to capture a video with that command :

nvidia@tegra-ubuntu:~$ gst-launch-1.0 nvcamerasrc num-buffers=200 sensor-id=0 ! 'video/x-raw(memory:NVMM),width=3280, height=2464, framerate=5/1, format=NV12' ! omxh264enc ! qtmux ! filesink location=test.mp4 -ev

But I can’t with v4l2 ctl command :

nvidia@tegra-ubuntu:~$ sudo v4l2-ctl -d /dev/video0 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw --verbose
[sudo] password for nvidia: 
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
VIDIOC_REQBUFS: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_STREAMON: ok
VIDIOC_DQBUF: failed: Input/output error
VIDIOC_STREAMOFF: ok

Here dmesg output

[ 4030.304223] tegra-vi4 15700000.vi: Status:  2 channel:00 frame:0001
[ 4030.310554] tegra-vi4 15700000.vi:          timestamp sof 4041294978080 eof 4041356721312 data 0x00800060
[ 4030.320255] tegra-vi4 15700000.vi:          capture_id 99 stream  0 vchan  0
[ 4031.241915] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 4032.245907] tegra-vi4 15700000.vi: ATOMP_FE syncpt timeout!
[ 4032.252784] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) INTR_STATUS 0x00000008
[ 4032.260799] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERR_INTR_STATUS 0x00000008

Any idea ?

hello nicolas.hilaire,

would like to have your confirmation as below,

  1. according to your comment #5, your sensor driver works with gst-launch but not v4l2-ctrl, right?
  2. since there are several fixes included in release-28.2, are you able to port your driver to JetPack-3.2 for a try

besides,
here are some general Q&A for camera bringup on JetPack-3.1 for your reference,
hope this works for you, [url]https://elinux.org/Jetson_TX2/28.1_Camera_BringUp[/url]
thanks

Hello and thanks for your answer.

  1. Yes it’s right Ican’t start it with v4l2-ctrl. I still don’t know why.

  2. I’m using a J140 auvidea board that havn’t make migration for that version. So it will be hard to test.

I have already seen the link you have provide me but it doesn’t help me.

Hi @nicolas.hilaire :)

embedded_metadata_height = “2”; should fix your PXL_SOF syncpt timeout! err = -11,
at least that worked for me…

but do you really need the:

vana-supply = <&en_vdd_cam_hv_2v8>;
			vdig-supply = <&en_vdd_sys>;
			dovdd-supply = <&en_vdd_cam>;
			avdd-reg = "vana";
			dvdd-reg = "vdig";
			iovdd-reg = "dovdd";

The Rpi Imx219 camera has 3 on-board volt regulators that are enabled by your cam-reset, so you shouldn’t use them, or am i missing something ? :)

Thanks for your help.

Due to missing information about onboard regulators on j140 (schematics are not available).
I must comment the regulator checks in the driver :

@@ -321,18 +327,9 @@ static int imx219_power_get(struct imx219 *priv)
 		return PTR_ERR(pw->mclk);
 	}
 
-	/* ananlog 2.7v */
-	err |= camera_common_regulator_get(priv->i2c_client,
-			&pw->avdd, pdata->regulators.avdd);
-	/* digital 1.2v */
-	err |= camera_common_regulator_get(priv->i2c_client,
-			&pw->dvdd, pdata->regulators.dvdd);
-	/* IO 1.8v */
-	err |= camera_common_regulator_get(priv->i2c_client,
-			&pw->iovdd, pdata->regulators.iovdd);
-

I’ve tried your solution you proposed but it doesn’t work for me.

I continue my tries and I had a look to argus api.

I took the api multimedia example. The OneShot example works.

But the api is not very stable

nvidia@tegra-ubuntu:~/tegra_multimedia_api/argus/samples/oneShot$ ./argus_oneshot -d 0
Executing Argus Sample: argus_oneshot
Argus Version: 0.96.2 (multi-process)
nvidia@tegra-ubuntu:~/tegra_multimedia_api/argus/samples/oneShot$ ./argus_oneshot -d 0
Executing Argus Sample: argus_oneshot
Argus Version: 0.96.2 (multi-process)
(Argus) Error InvalidState: Error returned from streamConsumerUpdateFrame (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 283)
Failed to get IFrame interface
^C
nvidia@tegra-ubuntu:~/tegra_multimedia_api/argus/samples/oneShot$

When the oneShot software return me an error, I must reboot the board to make the camera work again.

So I look gstreamer side.

The command

gst-launch-1.0 -vv nvcamerasrc sensor-id=0 fpsRange="10.0 15.0" ! autovideosink

works very well !

There is two main problems:

  • When I run command

nvidia@tegra-ubuntu:~$ gst-launch-1.0 -vv nvcamerasrc sensor-id=2 fpsRange=“10.0 15.0” ! autovideosink

I got image from camera 1 not the 0 !

and when I run the command

nvidia@tegra-ubuntu:~$ gst-launch-1.0 -vv nvcamerasrc sensor-id=0 fpsRange=“10.0 15.0” ! autovideosink

I got the image from the camera 0 !

The other problem is that I have tried many other sensor-id and I never succeed to find the third camera

My third camera finally works !!!

I change the tegra_sinterface to serial_a, serial_c and serial_e and it’s working.

Hello Nicolas !

Can you explain how you did that ?