[libcamera-devel] Constraints on the sensor subdevice

Naushir Patuck naush at raspberrypi.com
Thu Feb 6 11:21:06 CET 2020


Hi all,

I just wanted to query a couple of constraints on the sensor subdevice
that we have come across (in camera._sensor.cpp -
CameraSensor::init()):

1) Sensor subdevice must have only one pad.
As you know, right now we are overloading the subdevice pad to
advertise sensor embedded data is available.  Eventually, we intend to
add a "stream" property to the subdevice that can be used instead, but
that may be some time before that's ready.  Would it be possible to
remove this constraint?

3) Sensor subdevices must advertise the same frame sizes for all MBUS codes.
There are sensors that we currently use (e.g. ov5647) that advertise a
number of 10-bit modes (preferred) as well as a single 8-bit more
(legacy use).  Other sensors may require lower bit depth formats for
fast frame rate modes as another example.  With these configurations,
this constraint seems too restrictive.

>From the code in camera_sensor.cpp, I can see why this is needed
(mbusCodes_ and sizes_ are associated std::vectors.  Switching to
using something like class ImageFormats (std::map with MBUS code as a
key) would seem to solve this problem.  What do you think?

Regards,
Naush


More information about the libcamera-devel mailing list