I use the camera (AR0144) and it supports two resolutions, 1280x800 and 1280x720. When I open the camera use the command:
gst-launch-1.0 v4l2src ! "video/x-raw, format=YUY2, width=1280, height=800" ! waylandsink sync=false
Firstly I open the camera and it can work and display on the screen. However, it cannot work when I run the same command again.
I tried to enable the debug message for imx8_mipi_csi, and I got the messages:
First open:
# gst-launch-1.0 v4l2src ! "video/x-raw, format=YUY2, width=1280, height=800" ! waylandsink sync=false --no-position
[ 1476.418575] mxc-mipi-csi2.1: unsupported csi-sam command -1068476902.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[ 1500.131243] bypass csc
[ 1500.134005] input fmt YUV4
[ 1500.136711] output fmt YUYV
Redistribute latency...
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:04.035551916
Setting pipeline to NULL ...
[ 1504.326200] mxc-mipi-csi2.1: Frame End events: 112
[ 1504.330995] mxc-mipi-csi2.1: Frame Start events: 113
[ 1504.335959] mxc-mipi-csi2.1: Non-image data after odd frame events: 0
[ 1504.342398] mxc-mipi-csi2.1: Non-image data before odd frame events: 0
[ 1504.348924] mxc-mipi-csi2.1: Non-image data after even frame events: 0
[ 1504.355451] mxc-mipi-csi2.1: Non-image data before even frame events: 0
[ 1504.362064] mxc-mipi-csi2.1: Unknown Error events: 0
[ 1504.367028] mxc-mipi-csi2.1: CRC Error events: 0
[ 1504.371644] mxc-mipi-csi2.1: ECC Error events: 0
[ 1504.376260] mxc-mipi-csi2.1: FIFO Overflow Error events: 2732
[ 1504.382007] mxc-mipi-csi2.1: Lost Frame End Error events: 0
[ 1504.387580] mxc-mipi-csi2.1: Lost Frame Start Error events: 0
[ 1504.393324] mxc-mipi-csi2.1: SOT Error events: 0
Total showed frames (111), playing for (0:00:04.035533792), fps (27.506).
Freeing pipeline ...
Then I open camera again:
# gst-launch-1.0 v4l2src ! "video/x-raw, format=YUY2, width=1280, height=800" ! waylandsink sync=false --no-position
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: Gst[ 1507.418234] bypass csc
SystemClock
[ 1507.421390] input fmt YUV4
[ 1507.425235] output fmt YUYV
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:01.810321782
Setting pipeline to NULL ...
[ 1509.390289] mxc-mipi-csi2.1: Frame End events: 0
[ 1509.394910] mxc-mipi-csi2.1: Frame Start events: 1
[ 1509.399700] mxc-mipi-csi2.1: Non-image data after odd frame events: 0
[ 1509.406140] mxc-mipi-csi2.1: Non-image data before odd frame events: 0
[ 1509.412667] mxc-mipi-csi2.1: Non-image data after even frame events: 0
[ 1509.419193] mxc-mipi-csi2.1: Non-image data before even frame events: 0
[ 1509.425806] mxc-mipi-csi2.1: Unknown Error events: 0
[ 1509.430770] mxc-mipi-csi2.1: CRC Error events: 0
[ 1509.435387] mxc-mipi-csi2.1: ECC Error events: 0
[ 1509.440003] mxc-mipi-csi2.1: FIFO Overflow Error events: 145787
[ 1509.445922] mxc-mipi-csi2.1: Lost Frame End Error events: 0
[ 1509.451492] mxc-mipi-csi2.1: Lost Frame Start Error events: 0
[ 1509.457235] mxc-mipi-csi2.1: SOT Error events: 0
Freeing pipeline ...
There are FIFO Overflow Error events.
If I open the camera with 1280x720. It always can work without any FIFO Overflow Error.
# gst-launch-1.0 v4l2src ! "video/x-raw, format=YUY2, width=1280, height=720" ! waylandsink sync=false --no-position
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSy[ 73.264703] bypass csc
stemClock
[ 73.268061] input fmt YUV4
[ 73.271726] output fmt YUYV
Redistribute latency...
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:02.606334875
Setting pipeline to NULL ...
[ 76.021912] mxc-mipi-csi2.1: Frame End events: 134
[ 76.026706] mxc-mipi-csi2.1: Frame Start events: 134
[ 76.031671] mxc-mipi-csi2.1: Non-image data after odd frame events: 0
[ 76.038111] mxc-mipi-csi2.1: Non-image data before odd frame events: 0
[ 76.044637] mxc-mipi-csi2.1: Non-image data after even frame events: 0
[ 76.051162] mxc-mipi-csi2.1: Non-image data before even frame events: 0
[ 76.057775] mxc-mipi-csi2.1: Unknown Error events: 0
[ 76.062738] mxc-mipi-csi2.1: CRC Error events: 0
[ 76.067354] mxc-mipi-csi2.1: ECC Error events: 0
[ 76.071969] mxc-mipi-csi2.1: FIFO Overflow Error events: 0
[ 76.077453] mxc-mipi-csi2.1: Lost Frame End Error events: 0
[ 76.083023] mxc-mipi-csi2.1: Lost Frame Start Error events: 0
[ 76.088768] mxc-mipi-csi2.1: SOT Error events: 0
Total showed frames (132), playing for (0:00:02.606324125), fps (50.646).
Freeing pipeline ...
WHY it occurred FIFO Overflow Error when I open the camera with 1280x800?
How can I solve the problem?