[libcamera-devel] Pinephone 1.2 and libcamera
Jacopo Mondi
jacopo at jmondi.org
Fri Jul 1 10:52:07 CEST 2022
Hi Rafael,
On Fri, Jul 01, 2022 at 11:34:37AM +0300, Rafael Diniz wrote:
> Hi Jacopo,
>
> Tried with "cam" app. Rear camera (ov5640) is taking really nice pics
> already. Front camera (gc2145) is a bit greenish. But I'd say it is a
> initial success!
>
Yeah!
> I'm converting the ".bin" with (libcamera says to me SBGGR8 color space):
>
> ffmpeg -f image2 -vcodec rawvideo -s $size -pix_fmt bayer_bggr8 -i $input
> $output.jpeg
>
> Some samples already converted to jpg (poor light, a bit shacky... just for
> poc):
> https://www.abradig.org.br/maemo-crazyness/back_camera.jpg
> https://www.abradig.org.br/maemo-crazyness/front_camera.jpg
>
> btw, sometimes it takes some frames for the image to "stabilize" - it is
> normal, right?
I think it is. It really depends on the sensor, but I recall, in
example for OV5640, that the first few frames where usually badly
exposed.
>
> I'll take a look in this V4L2_PIX_FMT_JPEG versus V4L2_PIX_FMT_MJPEG. Should
> I look at the ov5640 / gc2145 or sun6i-csi driver?
>
It's the sun6i-csi driver that exposes pixel formats.
Now, you and Pavel captured RAW frames, that's great but to get a
'camera' application working you should now poke with processed
formats like YUV/RGB. Looking forward for progresses there!
> Cheers,
> Rafael
>
> On 7/1/22 04:56, Jacopo Mondi wrote:
> > Hi Rafael,
> >
> > On Fri, Jul 01, 2022 at 08:24:40AM +0300, Rafael Diniz via libcamera-devel wrote:
> > > Hi all,
> > >
> > > I have now both cameras in the PP listed by libcamera!
> > >
> > > Here what I used:
> > > https://github.com/rafael2k/pine64-kernel/blob/maemo/beowulf-devel/debian/patches/maemo/0245-sun6i-csi-Implement-framesize-and-frameinterva.patch
> > >
> > > https://github.com/rafael2k/pine64-kernel/blob/maemo/beowulf-devel/debian/patches/maemo/0246-sun6i-csi-Limit-formats-to-those-compatible-wi.patch
> > >
> >
> > I haven't checked how the sun6i driver looks like in mainline, but any
> > chance these patches can be upstreamed ?
> >
> > > https://github.com/rafael2k/pine64-kernel/blob/maemo/beowulf-devel/debian/patches/maemo/0247-gc2145-Add-PIXEL_RATE-HBLANK-and-VBLANK-contro.patch
> > >
> > > OV5640 driver from Jacopo branch.
> > >
> > > ./lc-compliance
> > > [0:06:52.833992694] [4053] INFO Camera camera_manager.cpp:293 libcamera
> > > v0.0.0+3665-bb84fc6a
> > > [0:06:52.869182944] [4054] WARN CameraSensor camera_sensor.cpp:212 'gc2145
> > > 3-003c': Recommended V4L2 control 0x009a0922 not supported
> > > [0:06:52.869387444] [4054] ERROR V4L2 v4l2_subdevice.cpp:318 'gc2145
> > > 3-003c': Unable to get rectangle 2 on pad 0: Inappropriate ioctl for device
> > > [0:06:52.869499444] [4054] WARN CameraSensor camera_sensor.cpp:239 'gc2145
> > > 3-003c': The PixelArraySize property has been defaulted to 1600x1200
> > > [0:06:52.869568777] [4054] ERROR V4L2 v4l2_subdevice.cpp:318 'gc2145
> > > 3-003c': Unable to get rectangle 1 on pad 0: Inappropriate ioctl for device
> > > [0:06:52.869635736] [4054] WARN CameraSensor camera_sensor.cpp:250 'gc2145
> > > 3-003c': The PixelArrayActiveAreas property has been defaulted to (0,
> > > 0)/1600x1200
> > > [0:06:52.869722027] [4054] ERROR V4L2 v4l2_subdevice.cpp:318 'gc2145
> > > 3-003c': Unable to get rectangle 0 on pad 0: Inappropriate ioctl for device
> > > [0:06:52.869798902] [4054] WARN CameraSensor camera_sensor.cpp:258 'gc2145
> > > 3-003c': Failed to retrieve the sensor crop rectangle
> > > [0:06:52.869853194] [4054] WARN CameraSensor camera_sensor.cpp:264 'gc2145
> > > 3-003c': The sensor kernel driver needs to be fixed
> > > [0:06:52.869935277] [4054] WARN CameraSensor camera_sensor.cpp:266 'gc2145
> > > 3-003c': See Documentation/sensor_driver_requirements.rst in the libcamera
> > > sources for more information
> > > [0:06:52.884873194] [4054] WARN CameraSensorProperties
> > > camera_sensor_properties.cpp:174 No static properties available for 'gc2145'
> > > [0:06:52.885049069] [4054] WARN CameraSensorProperties
> > > camera_sensor_properties.cpp:176 Please consider updating the camera sensor
> > > properties database
> > > [0:06:52.885128986] [4054] WARN CameraSensor camera_sensor.cpp:411 'gc2145
> > > 3-003c': Failed to retrieve the camera location
> >
> > The gc2145 driver still need some love
> > Although this should not be fatal
> >
> > > [0:06:52.889349486] [4054] WARN CameraSensor camera_sensor.cpp:212 'ov5640
> > > 3-004c': Recommended V4L2 control 0x009a0922 not supported
> > > [0:06:52.889535069] [4054] WARN CameraSensor camera_sensor.cpp:264 'ov5640
> > > 3-004c': The sensor kernel driver needs to be fixed
> > > [0:06:52.889602486] [4054] WARN CameraSensor camera_sensor.cpp:266 'ov5640
> > > 3-004c': See Documentation/sensor_driver_requirements.rst in the libcamera
> > > sources for more information
> > > [0:06:52.895027736] [4054] WARN CameraSensor camera_sensor.cpp:411 'ov5640
> > > 3-004c': Failed to retrieve the camera location
> >
> > This can be solved by updating DTS to add the 'orientation' property
> > to the camera device nodes.
> >
> > > [0:06:53.832240361] [4054] WARN V4L2 v4l2_pixelformat.cpp:295 Unsupported
> > > V4L2 pixel format JPEG
> > > [0:06:53.833094028] [4054] WARN V4L2 v4l2_pixelformat.cpp:295 Unsupported
> > > V4L2 pixel format JPEG
> > > [0:06:53.833898945] [4054] WARN V4L2 v4l2_pixelformat.cpp:295 Unsupported
> > > V4L2 pixel format JPEG
> > > [0:06:53.834654320] [4054] WARN V4L2 v4l2_pixelformat.cpp:295 Unsupported
> > > V4L2 pixel format JPEG
> > > [0:06:53.835394570] [4054] WARN V4L2 v4l2_pixelformat.cpp:295 Unsupported
> > > V4L2 pixel format JPEG
> > > [0:06:53.836180445] [4054] WARN V4L2 v4l2_pixelformat.cpp:295 Unsupported
> > > V4L2 pixel format JPEG
> > > [0:06:53.836926570] [4054] WARN V4L2 v4l2_pixelformat.cpp:295 Unsupported
> > > V4L2 pixel format JPEG
> > > [0:06:53.837657403] [4054] WARN V4L2 v4l2_pixelformat.cpp:295 Unsupported
> > > V4L2 pixel format JPEG
> > > [0:06:53.838386653] [4054] WARN V4L2 v4l2_pixelformat.cpp:295 Unsupported
> > > V4L2 pixel format JPEG
> > > [0:06:53.839121486] [4054] WARN V4L2 v4l2_pixelformat.cpp:295 Unsupported
> > > V4L2 pixel format JPEG
> >
> > Does your driver register
> >
> > #define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G') /* JFIF JPEG */
> >
> > As a format for JPEG ?
> >
> > Libcamera only supports:
> >
> > #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* Motion-JPEG */
> >
> > I admit I know nothing about JPEG related standards but looking at the
> > media drivers, it seems FMT_JPEG is used more often than MJPEG.
> >
> > However libcamera only seems to support MJPEG. You might have noticed
> > libcamera uses the DRM pixelformat identifiers, and it seems that in
> > the drm_fourcc.h header we ship there's no JPEG format at all, but
> > only MJPEG. If my understanding is correct this makes sense, as the
> > MJPEG standard defines a video container format for streaming
> > JPEG-compressed frames while JFIF JPEG defines a file-encoding scheme
> > for exchanging single images. Being DRM about video output devices
> > only MJPEG applies there, so there's no "JIF/JFIF JPEG" format in
> > there.
> >
> > Now, I would not be surprised if the multiple users of FMT_JPEG in
> > drivers/media/ are actually sending MJPEG but driver developers pick
> > FMT_JPEG because of some form of cargo-cult.
> >
> > Laurent do you know more about this maybe ?
> >
> > When it comes to libcamera, for the reasons explained above, as a
> > streaming format it seems only MJPEG would make sense, while JFIF JPEG
> > could rather be used as the container when saving still images,
> > something for which we use DNG in qcam, in example.
> >
> > To remove the above error I would change your driver to report
> > FMT_MJPEG for the time being until the above doesn't get clarified.
> >
> >
> > > No camera specified, available cameras:
> > > - /base/i2c-csi/front-camera at 3c
> > > - /base/i2c-csi/rear-camera at 4c
> > >
> >
> > Good, I think you should now try to capture frames, you can try with
> > cam (which supports a DRM/KMS and an SDL output) or qcam if you have
> > Qt in your setup. Pavel was successful in this, maybe have a look at
> > the thread he started a few days before your first email.
> >
> > Cheers!
> >
> > >
> > > Cheers,
> > > Rafael
> > >
> > > On 6/30/22 05:42, Rafael Diniz via libcamera-devel wrote:
> > > > So, indeed, patches posted here are being very useful:
> > > > https://github.com/kbingham/libcamera/issues/28
> > > >
> > > > I ported the sun6i-csi patch pointed in this issue to my 5.15 branch here:
> > > > https://github.com/rafael2k/pine64-kernel/blob/maemo/beowulf-devel/debian/patches/maemo/0245-sun6i_v4l2.patch
> > > >
> > > >
> > > > Still doing some tests, but I think I'm getting closer.
> > > >
> > > > Rafael
> > > >
> > > > On 6/29/22 05:40, Laurent Pinchart wrote:
> > > > > Hi Rafael,
> > > > >
> > > > > On Wed, Jun 29, 2022 at 04:14:26AM -0300, Rafael Diniz wrote:
> > > > > > Thanks Laurent.
> > > > > >
> > > > > > I'm not sure if I have all the information about the PinePhone hardware
> > > > > > to really implement this.
> > > > >
> > > > > It should be doable with hardware documentation. The kernel driver
> > > > > already contains information about how media bus codes map to pixel
> > > > > formats (see sun6i_csi_is_format_supported()), needed to implement
> > > > > support for IO_MC, and about the supported sizes (see the
> > > > > {MIN,MAX}_{WIDTH,HEIGHT} macros), needed to implement
> > > > > .vidioc_enum_framesizes().
> > > > >
> > > > > > On 6/28/22 17:10, Laurent Pinchart wrote:
> > > > > > > On Tue, Jun 28, 2022 at 04:22:06PM -0300, Rafael Diniz via
> > > > > > > libcamera-devel wrote:
> > > > > > > > Just adding V4L2_CAP_IO_MC to device_caps of the sun6i-csi driver
> > > > > > > > without really implementing it
> > > > > > >
> > > > > > > It can help moving one step forward, but will come to bite you back
> > > > > > > pretty soon :-)
> > > > > > >
> > > > > > > > now gives me this error (as expected I think):
> > > > > > > >
> > > > > > > > ERROR V4L2 v4l2_videodevice.cpp:1153 /dev/video2[10:cap]: Unable to
> > > > > > > > enumerate frame sizes: Inappropriate ioctl for device
> > > > > > >
> > > > > > > I've just checked, and the sun6i-csi driver is also missing support for
> > > > > > > the VIDIOC_ENUM_FRAMESIZES ioctl (.vidioc_enum_framesizes()
> > > > > > > operation in
> > > > > > > struct v4l2_ioctl_ops) :-S A bit more work seems to be needed in the
> > > > > > > driver.
> > > > > > >
> > > > > > > It makes me wonder why we list sun6i-csi as supported in the pipeline
> > > > > > > handler. Maybe libcamera has evolved to require the above since then ?
> > > > > > > We don't test on that platform internally.
> > > > > > >
> > > > > > > > On 6/28/22 07:54, Rafael Diniz via libcamera-devel wrote:
> > > > > > > > > Hi Jacopo, sorry I was not clear.
> > > > > > > > >
> > > > > > > > > I mean, support in:
> > > > > > > > > drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
> > > > > > > > > V4L2_CAP_IO_MC is not there.
> > > > > > > > >
> > > > > > > > > Rafael
> > > > > > > > >
> > > > > > > > > On 6/28/22 07:40, Jacopo Mondi wrote:
> > > > > > > > > > Hi Rafael,
> > > > > > > > > >
> > > > > > > > > > On Tue, Jun 28, 2022 at 07:26:42AM -0300, Rafael Diniz wrote:
> > > > > > > > > > > Thanks Laurent and Jacopo.
> > > > > > > > > > >
> > > > > > > > > > > This is the commit to be used as reference, right?
> > > > > > > > > > >
> > > > > > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fc929ae516537720d61139df92fa89ac4989c7b
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > I took a look in different PP kernel
> > > > > > > > > > > branches, and it seems such v4l
> > > > > > > > > > > V4L2_CAP_IO_MC is not present nowhere.
> > > > > > > > > >
> > > > > > > > > > I'm not sure I got wha you mean here...
> > > > > > > > > >
> > > > > > > > > > V4L2_CAP_IO_MC has been introduced by
> > > > > > > > > > f645e6256bd1 ("media: v4l2-dev/ioctl: Add V4L2_CAP_IO_MC")
> > > > > > > > > > and it seems to be in since v5.8 ?
> > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Rafael
> > > > > > > > > > >
> > > > > > > > > > > On 6/28/22 07:04, Laurent Pinchart wrote:
> > > > > > > > > > > > On Tue, Jun 28, 2022 at 12:02:52PM +0200, Jacopo Mondi wrote:
> > > > > > > > > > > > > Hi Rafael,
> > > > > > > > > > > > >
> > > > > > > > > > > > > On Tue, Jun 28, 2022 at 06:02:28AM -0300, Rafael Diniz wrote:
> > > > > > > > > > > > > > I tried to first just copy the
> > > > > > > > > > > > > > ov5640.c to my 5.15 branch, and
> > > > > > > > > > > > > > the
> > > > > > > > > > > > > > error
> > > > > > > > > > > > > > message from libcamera changed. Now I get:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > WARN CameraSensor camera_sensor.cpp:212 'ov5640 3-004c':
> > > > > > > > > > > > > > Recommended V4L2
> > > > > > > > > > > > > > control 0x009a0922 not supported
> > > > > > > > > > > > > > WARN CameraSensor camera_sensor.cpp:264 'ov5640 3-004c': The
> > > > > > > > > > > > > > sensor kernel
> > > > > > > > > > > > > > driver needs to be fixed
> > > > > > > > > > > > > > WARN CameraSensor camera_sensor.cpp:266 'ov5640 3-004c': See
> > > > > > > > > > > > > > Documentation/sensor_driver_requirements.rst in the libcamera
> > > > > > > > > > > > > > sources for
> > > > > > > > > > > > > > more information
> > > > > > > > > > > > > > WARN CameraSensor
> > > > > > > > > > > > > > camera_sensor.cpp:411 'ov5640
> > > > > > > > > > > > > > 3-004c': Failed to
> > > > > > > > > > > > > > retrieve
> > > > > > > > > > > > > > the camera location
> > > > > > > > > > > > >
> > > > > > > > > > > > > You're missing V4L2_CID_CAMERA_ORIENTATION, don't worry it's not
> > > > > > > > > > > > > anything fatal, simply your camera won't report it's orientation.
> > > > > > > > > > > > >
> > > > > > > > > > > > > The ov5640 driver is already
> > > > > > > > > > > > > instrumented to register such
> > > > > > > > > > > > > control if
> > > > > > > > > > > > > the corresponding DT property is in your DTS
> > > > > > > > > > > > >
> > > > > > > > > > > > > References:
> > > > > > > > > > > > > Documentation/devicetree/bindings/media/video-interface-devices.yaml
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > TL;DR your DTS does not register any "orientation" property.
> > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > ERROR V4L2 v4l2_videodevice.cpp:1076 /dev/video2[10:cap]: Media
> > > > > > > > > > > > > > bus code
> > > > > > > > > > > > > > filtering not supported by the device
> > > > > > > > > > > > > > (this last error repeats more than 50 times ^^^^)
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > ERROR SimplePipeline simple.cpp:490 No valid configuration found
> > > > > > > > > > > > >
> > > > > > > > > > > > > This is not related to the sensor
> > > > > > > > > > > > > driver but rather to your receiver
> > > > > > > > > > > > > driver that does not support media bus code filtering.
> > > > > > > > > > > > >
> > > > > > > > > > > > > https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/vidioc-enum-fmt.html
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > -------------------------------------------------------------------------------
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > V4L2_CAP_IO_MC is set (also known as an ‘MC-centric’ driver)
> > > > > > > > > > > > >
> > > > > > > > > > > > > If the mbus_code field is
> > > > > > > > > > > > > initialized to a valid (non-zero)
> > > > > > > > > > > > > media bus
> > > > > > > > > > > > > format code, then drivers shall
> > > > > > > > > > > > > restrict enumeration to only the
> > > > > > > > > > > > > image
> > > > > > > > > > > > > formats that can produce (for video
> > > > > > > > > > > > > output devices) or be produced
> > > > > > > > > > > > > from (for video capture devices)
> > > > > > > > > > > > > that media bus code. If the
> > > > > > > > > > > > > mbus_code
> > > > > > > > > > > > > is unsupported by the driver, then EINVAL shall be returned.
> > > > > > > > > > > > > -------------------------------------------------------------------------------
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > libcamera requires driver to support CAP_IO_MC and implement the
> > > > > > > > > > > > > media-controller API for topology
> > > > > > > > > > > > > enumeration and device discovery.
> > > > > > > > > > > > >
> > > > > > > > > > > > > I asked Pavel a reference to the
> > > > > > > > > > > > > Pinephone BSP kernel to check what
> > > > > > > > > > > > > is
> > > > > > > > > > > > > the status, but looking at the error there it seems some work is
> > > > > > > > > > > > > required.
> > > > > > > > > > > >
> > > > > > > > > > > > It looks like thse sun6i-csi driver doesn't support CAP_IO_MC in
> > > > > > > > > > > > mainline either.
> > > > > > > > > > > >
> > > > > > > > > > > > > > May be I'm missing something in order to backport the ov5640
> > > > > > > > > > > > > > driver to the
> > > > > > > > > > > > > > 5.15 branch?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Thanks,
> > > > > > > > > > > > > > Rafael Diniz
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > On 6/27/22 05:05, Jacopo Mondi wrote:
> > > > > > > > > > > > > > > Hi Rafael,
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > On Mon, Jun 27, 2022 at 03:46:02AM -0300, Rafael Diniz wrote:
> > > > > > > > > > > > > > > > That is wonderful. Thanks for pointing me the OV5640 patches.
> > > > > > > > > > > > > > > > And before I
> > > > > > > > > > > > > > > > start back-porting these
> > > > > > > > > > > > > > > > patches to my 5.15
> > > > > > > > > > > > > > > > branch, is there any
> > > > > > > > > > > > > > > > git repo I
> > > > > > > > > > > > > > > > can clone just to give a first try (with these modifications
> > > > > > > > > > > > > > > > already
> > > > > > > > > > > > > > > > inside)?
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > I just pushed
> > > > > > > > > > > > > > > https://git.sr.ht/~jmondi_/linux/tree/jmondi/media-master/ov5640-v7
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > which contains the last version of the 5640 patches on top of
> > > > > > > > > > > > > > > linux-media master.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Thanks
> > > > > > > > > > > > > > > j
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Rafael
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > On 6/26/22 20:29, Laurent Pinchart wrote:
> > > > > > > > > > > > > > > > > Hi Rafael,
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > On Fri, Jun 24, 2022 at 05:24:06AM -0300, Rafael Diniz via
> > > > > > > > > > > > > > > > > libcamera-devel wrote:
> > > > > > > > > > > > > > > > > > Hi Jocopo,
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Thanks. I'm interested to know which kernel version / source
> > > > > > > > > > > > > > > > > > people are
> > > > > > > > > > > > > > > > > > using to test libcamera on the PinePhone. Indeed, I read all
> > > > > > > > > > > > > > > > > > the thread
> > > > > > > > > > > > > > > > > > about libcamera in PinePhone in the e-maill archives.
> > > > > > > > > > > > > > > > > > "lc-compliance"
> > > > > > > > > > > > > > > > > > says drivers I'm
> > > > > > > > > > > > > > > > > > using have no
> > > > > > > > > > > > > > > > > > proper support
> > > > > > > > > > > > > > > > > > for the features
> > > > > > > > > > > > > > > > > > needed by
> > > > > > > > > > > > > > > > > > libcamera.
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Those issues are
> > > > > > > > > > > > > > > > > actually not
> > > > > > > > > > > > > > > > > reported by
> > > > > > > > > > > > > > > > > lc-compliance, but
> > > > > > > > > > > > > > > > > by
> > > > > > > > > > > > > > > > > libcamera itself.
> > > > > > > > > > > > > > > > > For the OV5640
> > > > > > > > > > > > > > > > > camera sensor, the
> > > > > > > > > > > > > > > > > fixes have
> > > > > > > > > > > > > > > > > been
> > > > > > > > > > > > > > > > > posted to the
> > > > > > > > > > > > > > > > > linux-media mailing
> > > > > > > > > > > > > > > > > list (see [3], and
> > > > > > > > > > > > > > > > > in particular
> > > > > > > > > > > > > > > > > patches 15/28, 16/28 and 21/28), but not merged yet.
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > The gc2145 driver will need more work.
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > [3]
> > > > > > > > > > > > > > > > > https://lore.kernel.org/linux-media/20220513141548.6344-1-sakari.ailus@linux.intel.com
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > On 6/24/22 04:46, Jacopo Mondi wrote:
> > > > > > > > > > > > > > > > > > > Hello Rafael
> > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > No
> > > > > > > > > > > > > > > > > > > longer than
> > > > > > > > > > > > > > > > > > > a few days
> > > > > > > > > > > > > > > > > > > ago Pavel
> > > > > > > > > > > > > > > > > > > sent this
> > > > > > > > > > > > > > > > > > > message
> > > > > > > > > > > > > > > > > > > https://lists.libcamera.org/pipermail/libcamera-devel/2022-June/031340.html
> > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > Hope the two of you can synch
> > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > On Thu, Jun 23, 2022 at 04:37:32PM -0300, Rafael Diniz via
> > > > > > > > > > > > > > > > > > > libcamera-devel wrote:
> > > > > > > > > > > > > > > > > > > > Hi everybody,
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > I'm working on bringing PinePhone cameras support to
> > > > > > > > > > > > > > > > > > > > Maemo-Leste system
> > > > > > > > > > > > > > > > > > > > applications, and I opted for libcamera.
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > I posted some messages here:
> > > > > > > > > > > > > > > > > > > > https://github.com/kbingham/libcamera/issues/28
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > With the kernel 5.15 with pinephone patches [1] imported
> > > > > > > > > > > > > > > > > > > > from Mobian, I get
> > > > > > > > > > > > > > > > > > > > some
> > > > > > > > > > > > > > > > > > > > missing
> > > > > > > > > > > > > > > > > > > > features
> > > > > > > > > > > > > > > > > > > > in both
> > > > > > > > > > > > > > > > > > > > cameras
> > > > > > > > > > > > > > > > > > > > drivers
> > > > > > > > > > > > > > > > > > > > [2].
> > > > > > > > > > > > > > > > > > > > Before I
> > > > > > > > > > > > > > > > > > > > duplicate
> > > > > > > > > > > > > > > > > > > > someone's work - did anyone manage to get a kernel which
> > > > > > > > > > > > > > > > > > > > works with current
> > > > > > > > > > > > > > > > > > > > libcamera for Pinephone 1 (not the Pro)?
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > Cheers,
> > > > > > > > > > > > > > > > > > > > Rafael
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > [1]
> > > > > > > > > > > > > > > > > > > > https://github.com/maemo-leste/pine64-kernel/tree/maemo/beowulf-devel
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > [2] ./lc-compliance
> > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > [6:03:22.948763728] [16718] INFO Camera
> > > > > > > > > > > > > > > > > > > > camera_manager.cpp:293 libcamera v0.0.0+3665-bb84fc6a
> > > > > > > > > > > > > > > > > > > > [6:03:22.976465603] [16719] WARN CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:212 'gc2145 3-003c': Recommended V4L2
> > > > > > > > > > > > > > > > > > > > control 0x009a0922 not supported
> > > > > > > > > > > > > > > > > > > > [6:03:22.978480561] [16719] ERROR V4L2
> > > > > > > > > > > > > > > > > > > > v4l2_subdevice.cpp:318 'gc2145 3-003c': Unable to get
> > > > > > > > > > > > > > > > > > > > rectangle 2 on pad 0: Inappropriate ioctl for device
> > > > > > > > > > > > > > > > > > > > [6:03:22.979363603] [16719] WARN CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:239 'gc2145 3-003c': The PixelArraySize
> > > > > > > > > > > > > > > > > > > > property has been defaulted to 1600x1200
> > > > > > > > > > > > > > > > > > > > [6:03:22.979433394] [16719] ERROR V4L2
> > > > > > > > > > > > > > > > > > > > v4l2_subdevice.cpp:318 'gc2145 3-003c': Unable to get
> > > > > > > > > > > > > > > > > > > > rectangle 1 on pad 0: Inappropriate ioctl for device
> > > > > > > > > > > > > > > > > > > > [6:03:22.979499686] [16719] WARN CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:250 'gc2145 3-003c': The
> > > > > > > > > > > > > > > > > > > > PixelArrayActiveAreas property has been defaulted to (0,
> > > > > > > > > > > > > > > > > > > > 0)/1600x1200
> > > > > > > > > > > > > > > > > > > > [6:03:22.979599769] [16719] ERROR V4L2
> > > > > > > > > > > > > > > > > > > > v4l2_subdevice.cpp:318 'gc2145 3-003c': Unable to get
> > > > > > > > > > > > > > > > > > > > rectangle 0 on pad 0: Inappropriate ioctl for device
> > > > > > > > > > > > > > > > > > > > [6:03:22.979663478] [16719] WARN CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:258 'gc2145 3-003c': Failed to retrieve
> > > > > > > > > > > > > > > > > > > > the sensor crop rectangle
> > > > > > > > > > > > > > > > > > > > [6:03:22.979719186] [16719] WARN CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:264 'gc2145 3-003c': The sensor kernel
> > > > > > > > > > > > > > > > > > > > driver needs to be fixed
> > > > > > > > > > > > > > > > > > > > [6:03:22.979773644] [16719] WARN CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:266 'gc2145 3-003c': See
> > > > > > > > > > > > > > > > > > > > Documentation/sensor_driver_requirements.rst in the
> > > > > > > > > > > > > > > > > > > > libcamera sources for more information
> > > > > > > > > > > > > > > > > > > > [6:03:22.979853436] [16719] ERROR CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:287 'gc2145 3-003c': Mandatory V4L2
> > > > > > > > > > > > > > > > > > > > control 0x009e0902 not available
> > > > > > > > > > > > > > > > > > > > [6:03:22.979915686] [16719] ERROR CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:287 'gc2145 3-003c': Mandatory V4L2
> > > > > > > > > > > > > > > > > > > > control 0x009f0902 not available
> > > > > > > > > > > > > > > > > > > > [6:03:22.979973686] [16719] ERROR CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:287 'gc2145 3-003c': Mandatory V4L2
> > > > > > > > > > > > > > > > > > > > control 0x009e0901 not available
> > > > > > > > > > > > > > > > > > > > [6:03:22.980280644] [16719] ERROR CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:295 'gc2145 3-003c': The sensor kernel
> > > > > > > > > > > > > > > > > > > > driver needs to be fixed
> > > > > > > > > > > > > > > > > > > > [6:03:22.980343811] [16719] ERROR CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:297 'gc2145 3-003c': See
> > > > > > > > > > > > > > > > > > > > Documentation/sensor_driver_requirements.rst in the
> > > > > > > > > > > > > > > > > > > > libcamera sources for more information
> > > > > > > > > > > > > > > > > > > > [6:03:22.981451561] [16719] ERROR SimplePipeline
> > > > > > > > > > > > > > > > > > > > simple.cpp:1309 No valid pipeline for sensor 'gc2145
> > > > > > > > > > > > > > > > > > > > 3-003c', skipping
> > > > > > > > > > > > > > > > > > > > [6:03:22.986176478] [16719] WARN CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:212 'ov5640 3-004c': Recommended V4L2
> > > > > > > > > > > > > > > > > > > > control 0x009a0922 not supported
> > > > > > > > > > > > > > > > > > > > [6:03:22.986392019] [16719] ERROR V4L2
> > > > > > > > > > > > > > > > > > > > v4l2_subdevice.cpp:318 'ov5640 3-004c': Unable to get
> > > > > > > > > > > > > > > > > > > > rectangle 2 on pad 0: Inappropriate ioctl for device
> > > > > > > > > > > > > > > > > > > > [6:03:22.986487478] [16719] WARN CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:239 'ov5640 3-004c': The PixelArraySize
> > > > > > > > > > > > > > > > > > > > property has been defaulted to 2592x1944
> > > > > > > > > > > > > > > > > > > > [6:03:22.986555228] [16719] ERROR V4L2
> > > > > > > > > > > > > > > > > > > > v4l2_subdevice.cpp:318 'ov5640 3-004c': Unable to get
> > > > > > > > > > > > > > > > > > > > rectangle 1 on pad 0: Inappropriate ioctl for device
> > > > > > > > > > > > > > > > > > > > [6:03:22.986618769] [16719] WARN CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:250 'ov5640 3-004c': The
> > > > > > > > > > > > > > > > > > > > PixelArrayActiveAreas property has been defaulted to (0,
> > > > > > > > > > > > > > > > > > > > 0)/2592x1944
> > > > > > > > > > > > > > > > > > > > [6:03:22.986690769] [16719] ERROR V4L2
> > > > > > > > > > > > > > > > > > > > v4l2_subdevice.cpp:318 'ov5640 3-004c': Unable to get
> > > > > > > > > > > > > > > > > > > > rectangle 0 on pad 0: Inappropriate ioctl for device
> > > > > > > > > > > > > > > > > > > > [6:03:22.986751686] [16719] WARN CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:258 'ov5640 3-004c': Failed to retrieve
> > > > > > > > > > > > > > > > > > > > the sensor crop rectangle
> > > > > > > > > > > > > > > > > > > > [6:03:22.986807353] [16719] WARN CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:264 'ov5640 3-004c': The sensor kernel
> > > > > > > > > > > > > > > > > > > > driver needs to be fixed
> > > > > > > > > > > > > > > > > > > > [6:03:22.988926894] [16719] WARN CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:266 'ov5640 3-004c': See
> > > > > > > > > > > > > > > > > > > > Documentation/sensor_driver_requirements.rst in the
> > > > > > > > > > > > > > > > > > > > libcamera sources for more information
> > > > > > > > > > > > > > > > > > > > [6:03:22.990680353] [16719] ERROR CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:287 'ov5640 3-004c': Mandatory V4L2
> > > > > > > > > > > > > > > > > > > > control 0x009e0902 not available
> > > > > > > > > > > > > > > > > > > > [6:03:22.990761353] [16719] ERROR CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:287 'ov5640 3-004c': Mandatory V4L2
> > > > > > > > > > > > > > > > > > > > control 0x009e0901 not available
> > > > > > > > > > > > > > > > > > > > [6:03:22.990816561] [16719] ERROR CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:295 'ov5640 3-004c': The sensor kernel
> > > > > > > > > > > > > > > > > > > > driver needs to be fixed
> > > > > > > > > > > > > > > > > > > > [6:03:22.990869519] [16719] ERROR CameraSensor
> > > > > > > > > > > > > > > > > > > > camera_sensor.cpp:297 'ov5640 3-004c': See
> > > > > > > > > > > > > > > > > > > > Documentation/sensor_driver_requirements.rst in the
> > > > > > > > > > > > > > > > > > > > libcamera sources for more information
> > > > > > > > > > > > > > > > > > > > [6:03:22.991348436] [16719] ERROR SimplePipeline
> > > > > > > > > > > > > > > > > > > > simple.cpp:1309 No valid pipeline for sensor 'ov5640
> > > > > > > > > > > > > > > > > > > > 3-004c', skipping
> > > > >
> >
> >
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20220701/3a4a3ec5/attachment.sig>
More information about the libcamera-devel
mailing list