| Message ID | 20260825-mira220-v3-5-7dad83521699@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
On Tue, Aug 25, 2026 at 06:44:48PM +0200, Jacopo Mondi wrote: > Add sensor properties for the AMS-OSRAM Mira220 camera sensor. > > The sensor has a 1 frame delay for exposure. > The vblank delay is not characterized in the datasheet. > > Hblank and analogue gain are fixed and not programmable, so fix their > delays to 1. > > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > --- > src/libcamera/sensor/camera_sensor_properties.cpp | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp > index 819f07bbb1f6..20cfd0bc11a6 100644 > --- a/src/libcamera/sensor/camera_sensor_properties.cpp > +++ b/src/libcamera/sensor/camera_sensor_properties.cpp > @@ -389,6 +389,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen > .hblankDelay = 2 > }, > } }, > + { "mira220", { > + .unitCellSize = { 2790, 2790 }, > + .testPatternModes = { > + { controls::draft::TestPatternModeOff, 0 }, > + { controls::draft::TestPatternModeColorBars, 1 }, > + }, > + .sensorDelays = { > + /* Gain and hblank are read-only. */ > + .exposureDelay = 1, > + .gainDelay = 1, > + .vblankDelay = 1, > + .hblankDelay = 1 My comment in the previous version was related to leaving out the gain and hblank values only. .sensorDelays = { .exposureDelay = 1, .vblankDelay = 1, }, The commit message also needs to be updated, something like Horizontal blanking and analogue gain are not programmable, so don't set their delay. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > + }, > + } }, > { "ov2685", { > .unitCellSize = { 1750, 1750 }, > .testPatternModes = {
Hi Laurent On Thu, Aug 27, 2026 at 10:41:37AM +0200, Laurent Pinchart wrote: > On Tue, Aug 25, 2026 at 06:44:48PM +0200, Jacopo Mondi wrote: > > Add sensor properties for the AMS-OSRAM Mira220 camera sensor. > > > > The sensor has a 1 frame delay for exposure. > > The vblank delay is not characterized in the datasheet. > > > > Hblank and analogue gain are fixed and not programmable, so fix their > > delays to 1. > > > > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > --- > > src/libcamera/sensor/camera_sensor_properties.cpp | 14 ++++++++++++++ > > 1 file changed, 14 insertions(+) > > > > diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp > > index 819f07bbb1f6..20cfd0bc11a6 100644 > > --- a/src/libcamera/sensor/camera_sensor_properties.cpp > > +++ b/src/libcamera/sensor/camera_sensor_properties.cpp > > @@ -389,6 +389,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen > > .hblankDelay = 2 > > }, > > } }, > > + { "mira220", { > > + .unitCellSize = { 2790, 2790 }, > > + .testPatternModes = { > > + { controls::draft::TestPatternModeOff, 0 }, > > + { controls::draft::TestPatternModeColorBars, 1 }, > > + }, > > + .sensorDelays = { > > + /* Gain and hblank are read-only. */ > > + .exposureDelay = 1, > > + .gainDelay = 1, > > + .vblankDelay = 1, > > + .hblankDelay = 1 > > My comment in the previous version was related to leaving out the gain > and hblank values only. > > .sensorDelays = { > .exposureDelay = 1, > .vblankDelay = 1, > }, > > The commit message also needs to be updated, something like > > Horizontal blanking and analogue gain are not programmable, so don't set > their delay. > Partially initializing structures at declaration time is forbidden in C++ if I'm not mistaken. In facts ../src/libcamera/sensor/camera_sensor_properties.cpp: In static member function ‘static const libcamera::CameraSensorProperties* libcamera::CameraSensorProperties::get(const std::string&)’: ../src/libcamera/sensor/camera_sensor_properties.cpp:658:9: error: missing initializer for member ‘libcamera::CameraSensorProperties::SensorDelays::gainDelay’ [-Werror=missing-field-initializers] 658 | }; | ^ ../src/libcamera/sensor/camera_sensor_properties.cpp:658:9: error: missing initializer for member ‘libcamera::CameraSensorProperties::SensorDelays::hblankDelay’ [-Werror=missing-field-initializers] > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> I'll keep it as it is then > > > + }, > > + } }, > > { "ov2685", { > > .unitCellSize = { 1750, 1750 }, > > .testPatternModes = { > > -- > Regards, > > Laurent Pinchart
2026. 08. 27. 15:44 keltezéssel, Jacopo Mondi írta: > Hi Laurent > > On Thu, Aug 27, 2026 at 10:41:37AM +0200, Laurent Pinchart wrote: >> On Tue, Aug 25, 2026 at 06:44:48PM +0200, Jacopo Mondi wrote: >>> Add sensor properties for the AMS-OSRAM Mira220 camera sensor. >>> >>> The sensor has a 1 frame delay for exposure. >>> The vblank delay is not characterized in the datasheet. >>> >>> Hblank and analogue gain are fixed and not programmable, so fix their >>> delays to 1. >>> >>> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> >>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> >>> --- >>> src/libcamera/sensor/camera_sensor_properties.cpp | 14 ++++++++++++++ >>> 1 file changed, 14 insertions(+) >>> >>> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp >>> index 819f07bbb1f6..20cfd0bc11a6 100644 >>> --- a/src/libcamera/sensor/camera_sensor_properties.cpp >>> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp >>> @@ -389,6 +389,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen >>> .hblankDelay = 2 >>> }, >>> } }, >>> + { "mira220", { >>> + .unitCellSize = { 2790, 2790 }, >>> + .testPatternModes = { >>> + { controls::draft::TestPatternModeOff, 0 }, >>> + { controls::draft::TestPatternModeColorBars, 1 }, >>> + }, >>> + .sensorDelays = { >>> + /* Gain and hblank are read-only. */ >>> + .exposureDelay = 1, >>> + .gainDelay = 1, >>> + .vblankDelay = 1, >>> + .hblankDelay = 1 >> >> My comment in the previous version was related to leaving out the gain >> and hblank values only. >> >> .sensorDelays = { >> .exposureDelay = 1, >> .vblankDelay = 1, >> }, >> >> The commit message also needs to be updated, something like >> >> Horizontal blanking and analogue gain are not programmable, so don't set >> their delay. >> > > Partially initializing structures at declaration time is forbidden in > C++ if I'm not mistaken. > > In facts > ../src/libcamera/sensor/camera_sensor_properties.cpp: In static member function ‘static const libcamera::CameraSensorProperties* libcamera::CameraSensorProperties::get(const std::string&)’: > ../src/libcamera/sensor/camera_sensor_properties.cpp:658:9: error: missing initializer for member ‘libcamera::CameraSensorProperties::SensorDelays::gainDelay’ [-Werror=missing-field-initializers] > 658 | }; > | ^ > ../src/libcamera/sensor/camera_sensor_properties.cpp:658:9: error: missing initializer for member ‘libcamera::CameraSensorProperties::SensorDelays::hblankDelay’ [-Werror=missing-field-initializers] > (Sidenote: if the `SensorDelays` type had initializers (e.g. ` = 0` seem logical), then you could omit any of them.) >> >> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > I'll keep it as it is then > >> >>> + }, >>> + } }, >>> { "ov2685", { >>> .unitCellSize = { 1750, 1750 }, >>> .testPatternModes = { >> >> -- >> Regards, >> >> Laurent Pinchart
On Thu, Aug 27, 2026 at 04:07:08PM +0200, Barnabás Pőcze wrote: > 2026. 08. 27. 15:44 keltezéssel, Jacopo Mondi írta: > > On Thu, Aug 27, 2026 at 10:41:37AM +0200, Laurent Pinchart wrote: > >> On Tue, Aug 25, 2026 at 06:44:48PM +0200, Jacopo Mondi wrote: > >>> Add sensor properties for the AMS-OSRAM Mira220 camera sensor. > >>> > >>> The sensor has a 1 frame delay for exposure. > >>> The vblank delay is not characterized in the datasheet. > >>> > >>> Hblank and analogue gain are fixed and not programmable, so fix their > >>> delays to 1. > >>> > >>> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> > >>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > >>> --- > >>> src/libcamera/sensor/camera_sensor_properties.cpp | 14 ++++++++++++++ > >>> 1 file changed, 14 insertions(+) > >>> > >>> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp > >>> index 819f07bbb1f6..20cfd0bc11a6 100644 > >>> --- a/src/libcamera/sensor/camera_sensor_properties.cpp > >>> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp > >>> @@ -389,6 +389,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen > >>> .hblankDelay = 2 > >>> }, > >>> } }, > >>> + { "mira220", { > >>> + .unitCellSize = { 2790, 2790 }, > >>> + .testPatternModes = { > >>> + { controls::draft::TestPatternModeOff, 0 }, > >>> + { controls::draft::TestPatternModeColorBars, 1 }, > >>> + }, > >>> + .sensorDelays = { > >>> + /* Gain and hblank are read-only. */ > >>> + .exposureDelay = 1, > >>> + .gainDelay = 1, > >>> + .vblankDelay = 1, > >>> + .hblankDelay = 1 > >> > >> My comment in the previous version was related to leaving out the gain > >> and hblank values only. > >> > >> .sensorDelays = { > >> .exposureDelay = 1, > >> .vblankDelay = 1, > >> }, > >> > >> The commit message also needs to be updated, something like > >> > >> Horizontal blanking and analogue gain are not programmable, so don't set > >> their delay. > > > > Partially initializing structures at declaration time is forbidden in > > C++ if I'm not mistaken. Good point. > > In facts > > ../src/libcamera/sensor/camera_sensor_properties.cpp: In static member function ‘static const libcamera::CameraSensorProperties* libcamera::CameraSensorProperties::get(const std::string&)’: > > ../src/libcamera/sensor/camera_sensor_properties.cpp:658:9: error: missing initializer for member ‘libcamera::CameraSensorProperties::SensorDelays::gainDelay’ [-Werror=missing-field-initializers] > > 658 | }; > > | ^ > > ../src/libcamera/sensor/camera_sensor_properties.cpp:658:9: error: missing initializer for member ‘libcamera::CameraSensorProperties::SensorDelays::hblankDelay’ [-Werror=missing-field-initializers] > > > > (Sidenote: if the `SensorDelays` type had initializers (e.g. ` = 0` seem logical), > then you could omit any of them.) That could be nice. > >> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > > > I'll keep it as it is then > > > >>> + }, > >>> + } }, > >>> { "ov2685", { > >>> .unitCellSize = { 1750, 1750 }, > >>> .testPatternModes = {
diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index 819f07bbb1f6..20cfd0bc11a6 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -389,6 +389,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen .hblankDelay = 2 }, } }, + { "mira220", { + .unitCellSize = { 2790, 2790 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 1 }, + }, + .sensorDelays = { + /* Gain and hblank are read-only. */ + .exposureDelay = 1, + .gainDelay = 1, + .vblankDelay = 1, + .hblankDelay = 1 + }, + } }, { "ov2685", { .unitCellSize = { 1750, 1750 }, .testPatternModes = {