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

Tomasz Figa tfiga at google.com
Wed Apr 28 13:35:28 CEST 2021


On Fri, Apr 16, 2021 at 4:05 AM Laurent Pinchart <
laurent.pinchart at ideasonboard.com> 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.
>
> I don't really foresee system integrators actively contributing to such
> a repository, so this effort may be doomed from the very beginning :-S
>

Well, pulseaudio does have similar files for audio mixer configuration [1]
and libinput for device quirks [2].

[1]
https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/profile-sets
[2] https://gitlab.freedesktop.org/libinput/libinput/-/tree/master/quirks

And this doesn't really differ from hardcoding those settings in respective
pipeline handlers as is done today for many aspects.


> 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 we could just install everything, as the projects I mentioned above
and choose the right one by some IDs.


> 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 ?
>
>
I think we need some runtime detection.


> > > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20210428/fea464ad/attachment-0001.htm>


More information about the libcamera-devel mailing list