Age | Commit message (Collapse) | Author |
|
Add a method to retrieve the CameraSensorInfo to the CameraSensor class.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Define a map of static information associated with a media bus code.
Start by reporting the bits-per-pixel for each media bus code defined by
the V4L2 kernel API, to later expand it when necessary.
Add to the V4L2SubdeviceFormat class a method to return the bits per
pixel, retrieved by inspecting the static map of format information.
While at it, remove a rogue map inclusion from header file.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Define the CameraSensorInfo structure that reports the current image sensor
configuration.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Implement V4L2Subdevice::getSelection() to support retrieving selection
rectangles from the V4L2 subdevice.
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Expose V4L2Videodevice::setSelection() method and drop
V4L2Videodevice::setCrop() and V4L2Videodevice::setComopse() as wrapping
each target with a single function does not provide any benefit.
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Expose V4L2Subdevice::setSelection() method and drop
V4L2Subdevice::setCrop() and V4L2Subdevice::setComopse() as wrapping
each target with a single function does not provide any benefit.
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Use the sensor model to create the camera name. The resulting name
should still be "VIMC Sensor B", but prepares for support of Sensor A.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Verify that the sensor model matches the expected value. The whole model
extraction heuristic isn't fully tested as that would require being able
to inject different entity names. It is still useful as an initial step.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Add a new model() function to the CameraSensor class to report the
camera sensor model.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
The V4L2Device::getControls() function takes a ControlList that needs to
be pre-populated with dummy entries for the controls that need to be
read. This is a cumbersome API, especially when reading a single
control. Make it nicer by passing the list of V4L2 controls as a vector
of control IDs, and returning a ControlList.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|
|
Add two control types to store rectangles and sizes. These will be
useful for the properties related to the pixel array.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Make sure we can open the configuration file passed to the init()
function, and return an error otherwise.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Pass the vimc IPA dummy configuration file to the IPA init() function.
This will be used by the IPA to validate the init() call.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Pass the vimc IPA dummy configuration file to the IPA init() function.
This will be used by the IPA to validate the init() call.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The file will be used to test the corresponding APIs.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add a new IPASettings class to pass IPA initialization settings through
the IPAInterface::init() method. The settings currently only contain the
name of a configuration file, and are expected to be extended later.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
In order to provide pipeline handlers with IPA-related helpers on top of
IPAInterface, return the IPAProxy instance from IPAManager::createIPA().
No change is required in the pipeline handlers as the IPAInterface that
was previously returned is implemented by an IPAProxy instance already.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
IPA modules may require configuration files, which may be stored in
different locations in the file system. To standardize file locations
between all IPAs and pipeline handlers, provide a helper function to
locate a configuration file by searching in the following directories:
- All directories specified in the LIBCAMERA_IPA_CONFIG_PATH environment
variable ; or
- In the source tree if libcamera is not installed ; otherwise
- In standard system locations (etc and share directories).
When stored in the source tree, configuration files shall be located in
a 'data' subdirectory of their respective IPA directory.
More locations, or extensions to the mechanism, may be implemented
later.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The iostream header isn't needed. Drop it.
Fixes: c2a8217df54c ("libcamera: add IPA proxy")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The message printed when loading a proxy worker from the build directory
is missing a space. Add it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Similarly to libcameraBuildPath(), there's a need to locate resources
within the source tree when running libcamera without installing it.
Support this use case with a new utils::libcameraSourcePath() function.
The implementation uses a symlink from the build root to the source root
in order to avoid hardcoding the path to the source root in the
libcamera.so binary.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The IPAModuleInfo::name field is currently a free-formed string that has
little use. Tighten its usage rules to make it suitable for building
file system paths to IPA-specific resources by matching the directory
name of the IPA module.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Two tests use the brightness, contrast and saturation controls with
integer failures. They were not updated by commit eff4b1aa01c1 which
turned those controls into floats. This doesn't cause test failures as
the control API converts the value types. For correctness, update the
tests to use float values.
Fixes: eff4b1aa01c1 ("libcamera: controls: Reorder and update description of existing controls")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
If the camera specified on the command line can't be opened, the
MainWindow constructor still proceeds to check the startStopAction_,
which results in MainWindow::startCapture() being called and trying to
use a null camera_ object. Fix this by returning from the constructor as
soon as the error is detected.
This also fixes a similar crash if the camera selection dialog box is
closed without selecting a camera.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
|
|
AwbMode is a new enum type to specify operating mode of the AWB
algorithm. All modes may not be supported by all platforms.
ColourGains is a new float array type used to specify manual red
and blue (in that order) colour channel gains when AWB is disabled.
ColourTemperature is a new control to return the current estimate of the
colour temperature.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
AeMeteringMode, AeConstraintMode, and AeExposureMode are new enum type
controls used to specify operating modes in the AE algorithm. All modes
may not be supported by all platforms.
ExposureValue is a new control used to set the log2 exposure adjustment
for the AE algorithm.
Lux is a new control that returns the current lux estimate.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Group AE, AWB, etc. controls together for accessibility.
Update descriptions for Contrast, Brightness, and Saturation controls.
Update the uvcvideo and vimc pipeline handlers to use the new
brightness, contrast and saturation units. UVC has no explicit units for
those controls, so map them with a best effort heuristic. For VIMC,
hardcode the control range based on knowledge of the driver
implementation for simplicity.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Rename:
ManualExposure -> ExposureTime
ManualGain -> AnalogueGain
Use micro-seconds units for ExposureTime. This is changed from milli-
seconds. The latter would not allow very low exposure times.
AnalogueGain switch to use a float to allow fractional gain adjustments.
Update the uvcvideo pipeline handler to use the new exposure and gain
units. For ExposureTime, UVC uses units of 100 micro-seconds, so map
the values before setting V4L2_CID_EXPOSURE_ABSOLUTE. For AnalogueGain,
UVC has no explicit gain units, so map the default gain value to 1.0
and linearly scale to the requested value.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Document that controls are bi-directional by default. If a control
is only returned in metadata, this must be specified in the control's
description.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
UVC devices support auto-exposure, expose the feature through the
AeEnable control.
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Move addition and processing of individual controls to separate
functions, to prepare for more complex mappings of control values.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Add a new --list-controls option to print information about all the
controls supported by a camera.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
The name OptProps is not very clear, spell it out fully. The command
line options are not changed.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Extend the V4L2VideoDevice to support notifying of frame start events.
The events are received from the device through the V4L2 event API, and
passed to users of the class through a signal.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Compound controls are now supported, but they're still listed as
unsupported in some parts of the V4L2Device class documentation.
Fix this by removing those parts.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
The Rectangle class members that represents the rectangle horizontal and
vertical sizes are named 'w' and 'h', in contrast with the Size and
SizeRange classes which use 'width' and 'height', resulting in having to
look at class definition every time to know which names to use.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
To prepare for the addition of a second notifier for V4L2 events, rename
the current fdEvent_ member to fdBufferNotifier_ to better reflect its
usage.
While at it, simplify allocation of the fdEvent_ notifier.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Since commit e75ef59e028e ("libcamera: device_enumerator_udev: Update
pending list in addUdevDevice") the populateMediaDevice() function
returns 0 on success instead of the number of missing dependencies,
resulting in a wrong number being logged. Fix it.
Fixes: e75ef59e028e ("libcamera: device_enumerator_udev: Update pending list in addUdevDevice")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
|
|
When setting format on a metadata video device, the returned format
isn't updated with the actual set format due to a typo. Fix it.
Reported-by: Coverity CID=279098
Fixes: 629e9301c518 ("libcamera: v4l2_device: Add META support in g/s_fmt")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
To make the output more readable, break the publicKeyData_ array at 8
bytes boundaries.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
IPA module signing is optional, but when not available due to missing
dependencies, we hit failures due to a non fully implemented IPA
isolation. Make module signing mandatory until isolation is functional.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Document the dependency on libgnutls28-dev and openssl for IPA module
signing int he README.rst file. While at it, sort the entries
alphabetically.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The IPA module signing mechanism relies on openssl to generate keys and
sign the module. If openssl is not found on the system, the build will
fail. Make the dependency optional by detecting openssl, and skip
generation of signatures if openssl isn't found.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The documentation files are licensed under CC-BY-SA-4.0, but this has
never been specified explicitly. Add corresponding SPDX headers.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The developer's certificate of origin isn't a license, move it from
LICENSES/ to Documentation/ by incorporating it in contributing.rst.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The GPL-2.0 SPDX identifier is deprecated, replace it with GPL-2.0-only.
The files in include/linux/ are not touched as they're copied verbatim
from the kernel sources.
Rename the GPL-2.0.txt license file to GPL-2.0-only.txt, and add a
GPL-2.0.txt symlink to support the include/linux/ headers.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
No source is licensed under the LGPL-2.1, we only use LGPL-2.1-or-later.
Remove the corresponding license file.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|