[libcamera-devel] Compatibility with cameras
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Thu Feb 24 16:12:25 CET 2022
Hi Guido,
On Thu, Feb 24, 2022 at 04:02:58PM +0100, Guido Körber wrote:
> We can see a device on the I2C. (Took a bit more testing to get the
> hardware to really respond…)
>
> So will we need a specific kernel driver for that camera, or is there
> some way to handle it via a generic driver?
It needs a kernel driver. Have you checked in drivers/media/i2c/ (in the
kernel) if the sensor you're using is already supported ? If so, some
work may still be needed to support all the features required by
libcamera (see Documentation/sensor_driver_requirements.rst), but it
would be much easier than writing a new driver from scratch.
> > Am 17.02.2022 um 17:43 schrieb Laurent Pinchart:
> > On Thu, Feb 17, 2022 at 05:00:23PM +0100, Guido Körber wrote:
> >> Is there a simple way to check if the hardware is present even if
> >> the camera is not detected by software?
> >>
> >> I have set up a prototype with a hand soldered connector and would
> >> like to know if I did all the wiring correct.
> >
> > You can use i2cdetect and i2cget ([1]) to talk to the sensor. You may
> > need to first enable power by toggling the corresponding GPIO, which can
> > also be done from userspace ([2]). Checking video transmission is more
> > difficult, you will need to get at least the kernel driver for the
> > sensor and Unicam up and running.
> >
> > [1] https://manpages.debian.org/unstable/i2c-tools/i2cdetect.8.en.html
> > [2] https://manpages.debian.org/experimental/gpiod/gpioset.1.en.html
> >
> >>> Am 17.02.2022 um 14:09 schrieb Kieran Bingham:
> >>> Quoting Guido Körber (2022-02-17 13:04:18)
> >>>>
> >>>> I want to use libcamera on Raspberry with a camera that is not
> >>>> explicitly supported by libcamera but does generic CSI-2. Will this
> >>>> work, or do I need a camera specific plugin or something else?
> >>>
> >>> You will likely need to make sure you have a relevant kernel driver, and
> >>> may likely need to do some updates to libcamera, to manage the
> >>> CameraSensorHelper classes.
> >>>
> >>> You might also then want to follow the Raspberry Pi ISP tuning
> >>> procedures.
> >>>
> >>> https://datasheets.raspberrypi.com/camera/raspberry-pi-camera-guide.pdf
> >>>
> >>> But yes, you should be able to get it to work.
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list