[libcamera-devel] [PATCH v6 5/5] android: soraka: Add camera HAL configuration

Jacopo Mondi jacopo at jmondi.org
Fri Apr 16 10:21:52 CEST 2021


Hello,

On Thu, Apr 15, 2021 at 10:05:40PM +0300, Laurent Pinchart wrote:
> Hi Tomasz,
>
> On Fri, Apr 16, 2021 at 01:08:47AM +0900, Tomasz Figa wrote:
> > On Thu, Apr 15, 2021 at 10:56 PM Jacopo Mondi <jacopo at jmondi.org> wrote:
> > > On Thu, Apr 15, 2021 at 03:52:13PM +0200, Jacopo Mondi wrote:
> > > > Add camera HAL configuration file for IPU3 Soraka.
> > >
> > > I've sent this patch for discussion, but I'm wondering if libcamera is
> > > the right place where to store the HAL configuration file.
> > >
> > > In my opinion they would be better placed in the device overlay, like
> > > it happens today, in example, with the Intel HAL .xml configuration
> > > files.
> > >
> > > What do you think ?
> >
> > How about non-Chrome OS users of the device? I think we should have a
> > repository of default configuration files for supported devices, which
> > would be used if there is no custom configuration provided.

Remember the configuration file is a requirement only for the
consumers of the Camera HAL. libcamera does not generically require
that.

>
> I don't really foresee system integrators actively contributing to such
> a repository, so this effort may be doomed from the very beginning :-S
> We could have some sort of community-driven repository, but even in that
> case, how would we get the right configuration file installed
> automatically ?
>

I think the last question is the most relevant one. We can keep a
repository somewhere of known configuration file, but which one has to
be selected and installed it's not something that should be handled
by the libcamera build system, as I assume we don't want to add
device-specific steps to the build process. I would rather expect that
system integrators that use libcamera have instead the target device
as a very well defined concept in their build infrastructure, and they
can easily support installing the right configuration file depending
on the target.

Although, I understand someone trying to integrate the camera HAL in
their device might find the configuration file presence being a hard
requirement a bit harsh, and might want some examples and a
documentation of the expected formats (or better a schema) in the code
base to build on top.

> Distributing the configuration files as part of the system integration
> seems better for Chrome OS. It may be a bit painful until the
> configuration file format stabilizes though, so I'm not completely
> opposed to carrying those files in the libcamera tree in the short term,
> but we need to figure out a long term solution.
>
> Even if we carry those files in the libcamera source tree for now, how
> do we ensure that the correct file gets installed in Chrome OS ?
>
> > > We should find a way to install this file in
> > > /etc/libcamera/ before merging the series, otherwise we'll break the
> > > HAL support in ChromiumOS.
> > >
> > > > Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > > > Reviewed-by: Hirokazu Honda <hiroh at chromium.org>
> > > > Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> > > > ---
> > > >  src/android/data/soraka/camera_hal.yaml | 8 ++++++++
> > > >  1 file changed, 8 insertions(+)
> > > >  create mode 100644 src/android/data/soraka/camera_hal.yaml
> > > >
> > > > diff --git a/src/android/data/soraka/camera_hal.yaml b/src/android/data/soraka/camera_hal.yaml
> > > > new file mode 100644
> > > > index 000000000000..2e9964035098
> > > > --- /dev/null
> > > > +++ b/src/android/data/soraka/camera_hal.yaml
> > > > @@ -0,0 +1,8 @@
> > > > +cameras:
> > > > +  "\\_SB_.PCI0.I2C4.CAM1":
> > > > +    location: front
> > > > +    rotation: 0
> > > > +
> > > > +  "\\_SB_.PCI0.I2C2.CAM0":
> > > > +    location: back
> > > > +    rotation: 0
>
> --
> Regards,
>
> Laurent Pinchart


More information about the libcamera-devel mailing list