[libcamera-devel] [PATCH 3/3] libcamera: pipeline: Register device numbers with camera

Kieran Bingham kieran.bingham at ideasonboard.com
Wed May 3 18:41:41 CEST 2023


Quoting Barnabás Pőcze (2023-05-03 16:12:30)
> Hi
> 
> 
> 2023. május 3., szerda 16:02 keltezéssel, Kieran Bingham <kieran.bingham at ideasonboard.com> írta:
> 
> > [...]
> > > > +     /*
> > > > +      * Store the associated devices as a property of the camera to allow
> > > > +      * systems to identify which devices are managed by libcamera.
> > > > +      */
> > > > +     Camera::Private *data = camera->_d();
> > > > +     data->properties_.set(properties::Devices, devnums);
> > >
> > > I am getting an assertion failure while testing https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1611
> > >
> > >   ASSERT(elementSize == ControlValueSize[type]);
> > >
> > > in `controls.cpp:ControlValue::set()` fails because `sizeof(dev_t) != 4`.
> > 
> > Yes, this is fixed ready for a V2 ... but the first patch needs to use a
> > 64 bit integer, not a 32 bit.
> 
> I see, thanks for the clarification. These patches were linked in the pipewire MR
> and I couldn't find a newer version. I presume it is not posted yet? As far as I
> am aware `dev_t` is 64-bit on most(?) Linux platforms, so I don't understand
> the remark regarding the first patch.

Correct, I have a new version here but haven't posted yet. It's on my
todo as soon as I can get to it!

I was referring to "libcamera: controls: Support dev_t in an Integer32 type."

When I looked up dev_t 'man makedev' I think I was confused by the
references to unsigned int on the parameters of makedev, and return
types of major() and minor() ... but dev_t is separate. Anyway, I
clearly have sent untested patches which I'm sorry for.

I wish we had a system where automated tests ran as soon as things are
pushed/posted that would have highlighted it immediately!

V2 will resolve it.

> 
> 
> > [...]
> 
> 
> Regards,
> Barnabás Pőcze


More information about the libcamera-devel mailing list