The init-script only works for 8-bit in 1920x1080. If you want to use other formats, you have to use media-ctl to set up the camera-subdevice. You don’t have to use it for all devices in the pipeline as I mentioned in my first post. I can’t edit my first post anymore, but I forgot to format the commands as code and there was an autocorrect error in the quotation marks:
It should have looked like that:
media-ctl -d 0 --set-v4l2 '"imx219 6-0010":0[fmt:SRGGB10_1X10/3280x2464]'
media-ctl -d 0 --set-v4l2 '"cdns_csi2rx.4504000.csi-bridge":0[fmt:SRGGB10_1X10/3280x2464]'
media-ctl -d 0 --set-v4l2 '"4500000.ticsi2rx":0[fmt:SRGGB10_1X10/3280x2464]'
v4l2-ctl -d /dev/video2 --set-fmt-video width=3280,height=2464,pixelformat=RG10
But you only need the first line!
For example for configuring the CSI0-camera to full resolution in 8-bit, you need this:
media-ctl -d 0 --set-v4l2 '"imx219 6-0010":0[fmt:SRGGB8_1X8/3280x2464]'
And for the output with GStreamer:
sudo gst-launch-1.0 v4l2src device=/dev/video2 ! video/x-bayer, width=3280, height=2464, format=rggb ! tiovxisp sink_0::device=/dev/v4l-subdev2 sensor-name=SENSOR_SONY_IMX219_RPI dcc-isp-file=/opt/imaging-REL.PSDK.JACINTO.08.06.00.14/sensor_drv/src/imx219/dcc_bins/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging-REL.PSDK.JACINTO.08.06.00.14/sensor_drv/src/imx219/dcc_bins/dcc_2a.bin format-msb=7 ! kmssink driver-name=tidss
To configuring the CSI1-camera to full resolution in 8-bit, you need this:
media-ctl -d 1 --set-v4l2 '"imx219 4-0010":0[fmt:SRGGB8_1X8/3280x2464]'
Output with GStreamer:
sudo gst-launch-1.0 v4l2src device=/dev/video18 ! video/x-bayer, width=3280, height=2464, format=rggb ! tiovxisp sink_0::device=/dev/v4l-subdev5 sensor-name=SENSOR_SONY_IMX219_RPI dcc-isp-file=/opt/imaging-REL.PSDK.JACINTO.08.06.00.14/sensor_drv/src/imx219/dcc_bins/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging-REL.PSDK.JACINTO.08.06.00.14/sensor_drv/src/imx219/dcc_bins/dcc_2a.bin format-msb=7 ! kmssink driver-name=tidss
And of course, If you want to use a different format, you have to configure the camera again with media-ctl. You can always have only one format configured.
These following commands cover all MBus-Codes of the imx219.
CSI0, 8-bit:
media-ctl -d 0 --set-v4l2 '"imx219 6-0010":0[fmt:SRGGB8_1X8/640x480]'
media-ctl -d 0 --set-v4l2 '"imx219 6-0010":0[fmt:SRGGB8_1X8/1640x1232]'
media-ctl -d 0 --set-v4l2 '"imx219 6-0010":0[fmt:SRGGB8_1X8/1920x1080]'
media-ctl -d 0 --set-v4l2 '"imx219 6-0010":0[fmt:SRGGB8_1X8/3280x2464]'
CSI0, 10-bit:
media-ctl -d 0 --set-v4l2 '"imx219 6-0010":0[fmt:SRGGB10_1X10/640x480]'
media-ctl -d 0 --set-v4l2 '"imx219 6-0010":0[fmt:SRGGB10_1X10/1640x1232]'
media-ctl -d 0 --set-v4l2 '"imx219 6-0010":0[fmt:SRGGB10_1X10/1920x1080]'
media-ctl -d 0 --set-v4l2 '"imx219 6-0010":0[fmt:SRGGB10_1X10/3280x2464]'
CSI1, 8-bit:
media-ctl -d 1 --set-v4l2 '"imx219 4-0010":0[fmt:SRGGB8_1X8/640x480]'
media-ctl -d 1 --set-v4l2 '"imx219 4-0010":0[fmt:SRGGB8_1X8/1640x1232]'
media-ctl -d 1 --set-v4l2 '"imx219 4-0010":0[fmt:SRGGB8_1X8/1920x1080]'
media-ctl -d 1 --set-v4l2 '"imx219 4-0010":0[fmt:SRGGB8_1X8/3280x2464]'
CSI1, 10-bit:
media-ctl -d 1 --set-v4l2 '"imx219 4-0010":0[fmt:SRGGB10_1X10/640x480]'
media-ctl -d 1 --set-v4l2 '"imx219 4-0010":0[fmt:SRGGB10_1X10/1640x1232]'
media-ctl -d 1 --set-v4l2 '"imx219 4-0010":0[fmt:SRGGB10_1X10/1920x1080]'
media-ctl -d 1 --set-v4l2 '"imx219 4-0010":0[fmt:SRGGB10_1X10/3280x2464]'
But I’m still not able to get an output in 10-bit with the ISP from the camera.
This example is not working:
debian@BeagleBone:~$ media-ctl -d 0 --set-v4l2 '"imx219 6-0010":0[fmt:SRGGB10_1X10/3280x2464]'
debian@BeagleBone:~$ sudo gst-launch-1.0 v4l2src device=/dev/video2 ! video/x-bayer, width=3280, height=2464, format=rggb10 ! tiovxisp sink_0::device=/dev/v4l-subdev2 sensor-name=SENSOR_SONY_IMX219_RPI dcc-isp-file=/opt/imaging-REL.PSDK.JACINTO.08.06.00.14/sensor_drv/src/imx219/dcc_bins/dcc_viss_10b.bin sink_0::dcc-2a-file=/opt/imaging-REL.PSDK.JACINTO.08.06.00.14/sensor_drv/src/imx219/dcc_bins/dcc_2a_10b.bin format-msb=9 ! autovideosink
APP: Init ... !!!
MEM: Init ... !!!
MEM: Initialized DMA HEAP (fd=5) !!!
MEM: Init ... Done !!!
IPC: Init ... !!!
IPC: Init ... Done !!!
REMOTE_SERVICE: Init ... !!!
REMOTE_SERVICE: Init ... Done !!!
12846.902032 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
12846.902146 s: VX_ZONE_INIT:Enabled
12846.902158 s: VX_ZONE_ERROR:Enabled
12846.902164 s: VX_ZONE_WARNING:Enabled
12846.902829 s: VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
12846.903008 s: VX_ZONE_INIT:[tivxHostInitLocal:86] Initialization Done for HOST !!!
WARNING: erroneous pipeline: could not link v4l2src0 to tiovxisp0, v4l2src0 can't handle caps video/x-bayer, width=(int)3280, height=(int)2464, format=(string)rggb10
One thing I have to say about the fps-rate of the autovideosink. It is really low. The picture is much more fluid with the kmssink.