[v3,5/5] libcamera: sensor: Add Mira220 sensor properties
diff mbox series

Message ID 20260825-mira220-v3-5-7dad83521699@ideasonboard.com
State New
Headers show
Series
  • ipa: Add support for Mira220 RGB version
Related show

Commit Message

Jacopo Mondi Aug. 25, 2026, 4:44 p.m. UTC
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(+)

Comments

Laurent Pinchart Aug. 27, 2026, 8:41 a.m. UTC | #1
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 = {
Jacopo Mondi Aug. 27, 2026, 1:44 p.m. UTC | #2
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
Barnabás Pőcze Aug. 27, 2026, 2:07 p.m. UTC | #3
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
Laurent Pinchart Aug. 27, 2026, 3:24 p.m. UTC | #4
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 = {

Patch
diff mbox series

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 = {