<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 16, 2021 at 4:05 AM Laurent Pinchart <<a href="mailto:laurent.pinchart@ideasonboard.com">laurent.pinchart@ideasonboard.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Tomasz,<br>
<br>
On Fri, Apr 16, 2021 at 01:08:47AM +0900, Tomasz Figa wrote:<br>
> On Thu, Apr 15, 2021 at 10:56 PM Jacopo Mondi <<a href="mailto:jacopo@jmondi.org" target="_blank">jacopo@jmondi.org</a>> wrote:<br>
> > On Thu, Apr 15, 2021 at 03:52:13PM +0200, Jacopo Mondi wrote:<br>
> > > Add camera HAL configuration file for IPU3 Soraka.<br>
> ><br>
> > I've sent this patch for discussion, but I'm wondering if libcamera is<br>
> > the right place where to store the HAL configuration file.<br>
> ><br>
> > In my opinion they would be better placed in the device overlay, like<br>
> > it happens today, in example, with the Intel HAL .xml configuration<br>
> > files.<br>
> ><br>
> > What do you think ?<br>
> <br>
> How about non-Chrome OS users of the device? I think we should have a<br>
> repository of default configuration files for supported devices, which<br>
> would be used if there is no custom configuration provided.<br>
<br>
I don't really foresee system integrators actively contributing to such<br>
a repository, so this effort may be doomed from the very beginning :-S<br></blockquote><div><br></div><div>Well, pulseaudio does have similar files for audio mixer configuration [1] and libinput for device quirks [2].</div><div><br></div><div>[1] <a href="https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/profile-sets">https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/profile-sets</a></div><div>[2] <a href="https://gitlab.freedesktop.org/libinput/libinput/-/tree/master/quirks">https://gitlab.freedesktop.org/libinput/libinput/-/tree/master/quirks</a></div><div><br></div><div>And this doesn't really differ from hardcoding those settings in respective pipeline handlers as is done today for many aspects.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
We could have some sort of community-driven repository, but even in that<br>
case, how would we get the right configuration file installed<br>
automatically ?<br>
<br></blockquote><div><br></div><div>I think we could just install everything, as the projects I mentioned above and choose the right one by some IDs.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Distributing the configuration files as part of the system integration<br>
seems better for Chrome OS. It may be a bit painful until the<br>
configuration file format stabilizes though, so I'm not completely<br>
opposed to carrying those files in the libcamera tree in the short term,<br>
but we need to figure out a long term solution.<br>
<br>
Even if we carry those files in the libcamera source tree for now, how<br>
do we ensure that the correct file gets installed in Chrome OS ?<br>
<br></blockquote><div><br></div><div>I think we need some runtime detection.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> > We should find a way to install this file in<br>
> > /etc/libcamera/ before merging the series, otherwise we'll break the<br>
> > HAL support in ChromiumOS.<br>
> ><br>
> > > Reviewed-by: Laurent Pinchart <<a href="mailto:laurent.pinchart@ideasonboard.com" target="_blank">laurent.pinchart@ideasonboard.com</a>><br>
> > > Reviewed-by: Hirokazu Honda <<a href="mailto:hiroh@chromium.org" target="_blank">hiroh@chromium.org</a>><br>
> > > Signed-off-by: Jacopo Mondi <<a href="mailto:jacopo@jmondi.org" target="_blank">jacopo@jmondi.org</a>><br>
> > > ---<br>
> > > src/android/data/soraka/camera_hal.yaml | 8 ++++++++<br>
> > > 1 file changed, 8 insertions(+)<br>
> > > create mode 100644 src/android/data/soraka/camera_hal.yaml<br>
> > ><br>
> > > diff --git a/src/android/data/soraka/camera_hal.yaml b/src/android/data/soraka/camera_hal.yaml<br>
> > > new file mode 100644<br>
> > > index 000000000000..2e9964035098<br>
> > > --- /dev/null<br>
> > > +++ b/src/android/data/soraka/camera_hal.yaml<br>
> > > @@ -0,0 +1,8 @@<br>
> > > +cameras:<br>
> > > + "\\_SB_.PCI0.I2C4.CAM1":<br>
> > > + location: front<br>
> > > + rotation: 0<br>
> > > +<br>
> > > + "\\_SB_.PCI0.I2C2.CAM0":<br>
> > > + location: back<br>
> > > + rotation: 0<br>
<br>
-- <br>
Regards,<br>
<br>
Laurent Pinchart<br>
</blockquote></div></div>