Hello,
I have a Sony IMX219 camera that I am trying to integrate with the IMX8M Mini. I have modeled my driver on the OV5640 driver provided the linux-imx repo. However, I cannot seem the camera to stream video. I run the following command:
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! autovideosink sync=false
and get the following error:
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:../../../../git/libs/gst/base/gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
I have tried variation on the above command but always get the same output.
When I query the camera via the v4l2-ctl tools I get the following responses:
v4l2-ctl --list-devices
i.MX6S_CSI (platform:32e20000.csi1_bridge):
/dev/video0
v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'BA81' (8-bit Bayer BGBG/GRGR)
Size: Discrete 3280x2464
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1640x1232
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
v4l2-ctl --all
Driver Info:
Driver name : mx6s-csi
Card type : i.MX6S_CSI
Bus info : platform:32e20000.csi1_bridge
Driver version : 5.4.3
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 0
Video input : 0 (Camera: ok)
Format Unknown (00000000): <= Not sure why this is 'Unknown'
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 0, Height 0
Default : Left 0, Top 0, Width 0, Height 0
Pixel Aspect: 1/1
Crop: Left 0, Top 0, Width 0, Height 0
Selection: crop, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: crop_default, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: crop_bounds, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: compose, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: compose_default, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: compose_bounds, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: compose_padded, Left 0, Top 0, Width 0, Height 0, Flags:
Selection: native_size, Left 0, Top 0, Width 0, Height 0, Flags:
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 30.000 (30/1)
Read buffers : 0
Below is what my DTS file looks like:
/* IMX219 Camera */
imx219@10 {
status = "okay";
compatible = "sony,imx219";
reg = <0x10>;
port {
imx219_ep: endpoint {
remote-endpoint = <&mipi1_sensor_ep>;
clock-lanes = <0>;
data-lanes = <1 2>;
clock-noncontinuous;
link-frequencies = /bits/ 64 <456000000>;
};
};
};
&csi1_bridge {
fsl,mipi-mode;
status = "okay";
port {
csi1_ep: endpoint {
remote-endpoint = <&csi1_mipi_ep>;
};
};
};
&mipi_csi_1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port {
mipi1_sensor_ep: endpoint@1 {
remote-endpoint = <&imx219_ep>;
data-lanes = <2>;
csis-hs-settle = <13>; <= Not sure what this field does
csis-clk-settle = <2>; <= Not sure what this field does
csis-wclk; <= Not sure what this field does
};
csi1_mipi_ep: endpoint@2 {
remote-endpoint = <&csi1_ep>;
};
};
};