PINE64
GStreamer Camera Issue (Unsupported pixformat: 0x56595559 with mbus code: 0x3001) - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139)
+---- Thread: GStreamer Camera Issue (Unsupported pixformat: 0x56595559 with mbus code: 0x3001) (/showthread.php?tid=17519)



GStreamer Camera Issue (Unsupported pixformat: 0x56595559 with mbus code: 0x3001) - sog8b - 10-26-2022

Hey Everyone,

I've been trying to use gstreamer to access the camera on my pinephone.
I am running the mobian image mobian-pinephone-phosh-20221016.img.gz with all updates applied.

I first ran into the issue "does not support 2:0:0:0 colorimetry" as detailed on the following thread.
https://gitlab.com/mobian1/issues/-/issues/439

I first applied the patch to not bother checking the colorspace and rebuilt libgstvideo4linux2.so.
Code:
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
index 9851ffc83..72a5eb33b 100644
--- a/sys/v4l2/gstv4l2object.c
+++ b/sys/v4l2/gstv4l2object.c
@@ -3840,7 +3840,9 @@ gst_v4l2_object_set_format_full (GstV4l2Object * v4l2object, GstCaps\
* caps,
      gst_structure_remove_field (s, "interlace-mode");
  }

-  if (gst_v4l2_object_get_colorspace (v4l2object, &format, &info.colorimetry)) {
+  GST_DEBUG_OBJECT (v4l2object->dbg_obj, "Processing colorimetry");
+
+  if (0 && gst_v4l2_object_get_colorspace (v4l2object, &format, &info.colorimetry)) {
    if (gst_structure_has_field (s, "colorimetry")) {
      if (!gst_v4l2_video_colorimetry_matches (&info.colorimetry, caps))
        goto invalid_colorimetry;



With this change however I now get a different error.
Code:
[81273.661098] sun6i-csi 1cb0000.csi: Unsupported pixformat: 0x56595559 with mbus code: 0x3001!
[81388.258465] ov5640 3-004c: firmware upload success
[81388.562323] ov5640 3-004c: uploaded firmware didn't start, got to 0x7f, retrying...
[81388.878315] ov5640 3-004c: uploaded firmware didn't start, got to 0x7f
[81388.884938] ov5640 3-004c: ov5640_set_ctrl_focus: no autofocus firmware loaded
[81391.636730] ov5640 3-004c: firmware upload success
[81391.934322] ov5640 3-004c: uploaded firmware didn't start, got to 0x7f, retrying...
[81392.246315] ov5640 3-004c: uploaded firmware didn't start, got to 0x7f
[81392.252947] ov5640 3-004c: ov5640_set_ctrl_focus: no autofocus firmware loaded
[81392.297694] sun6i-csi 1cb0000.csi: Unsupported pixformat: 0x56595559 with mbus code: 0x3001!


Looking online I found references to this same error in the error log on the following post.

https://forum.pine64.org/showthread.php?tid=10578&pid=71121#pid71121

I assume the user was getting this error when attempting to use megapixels.
In my case megapixels works perfectly fine I only get this kernel error when I attempt to use gstreamer.

Does anyone know the nature of the "sun6i-csi 1cb0000.csi: Unsupported pixformat: 0x56595559 with mbus code: 0x3001!" error?
The other user didn't get this error after applying their patch so I am wondering if something else changed in mobian since they made there patch.

Also is it possible this pixformat error is related to the patch I made to gstreamer related to not obtaining the colorspace?
To my unfamiliar eyes it looks like it might be related by the author of the patch didn't seem to think it was.

Has anyone else successfully been able to use the pinephone camera with gstreamer under mobian?

Thanks!


RE: GStreamer Camera Issue (Unsupported pixformat: 0x56595559 with mbus code: 0x3001) - junelung - 07-17-2023

You can try checking kernel logs. The error message you're seeing in the kernel log indicates that the camera is using an unsupported pixformat territorial io. This could be related to the camera driver or the way gstreamer is interacting with the camera. Check the kernel logs (dmesg) for any additional error messages or clues that might help you diagnose the issue.