@@ -1479,9 +1479,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)
if (controls.find(RKISP1_CID_SUPPORTED_PARAMS_BLOCKS) != controls.end()) {
auto list = param_->getControls({ { RKISP1_CID_SUPPORTED_PARAMS_BLOCKS } });
if (!list.empty())
- supportedBlocks = static_cast<uint32_t>(
- list.get(RKISP1_CID_SUPPORTED_PARAMS_BLOCKS)
- .get<int32_t>());
+ supportedBlocks = list.get(RKISP1_CID_SUPPORTED_PARAMS_BLOCKS).get<uint32_t>();
} else {
LOG(RkISP1, Error)
<< "Failed to query supported params blocks. Falling back to defaults.";
@@ -572,6 +572,7 @@ ControlType V4L2Device::v4l2CtrlType(uint32_t ctrlType)
return ControlTypeUnsigned16;
case V4L2_CTRL_TYPE_U32:
+ case V4L2_CTRL_TYPE_BITMASK:
return ControlTypeUnsigned32;
case V4L2_CTRL_TYPE_INTEGER:
@@ -582,7 +583,6 @@ ControlType V4L2Device::v4l2CtrlType(uint32_t ctrlType)
case V4L2_CTRL_TYPE_MENU:
case V4L2_CTRL_TYPE_BUTTON:
- case V4L2_CTRL_TYPE_BITMASK:
case V4L2_CTRL_TYPE_INTEGER_MENU:
/*
* More precise types may be needed, for now use a 32-bit
@@ -636,6 +636,7 @@ std::optional<ControlInfo> V4L2Device::v4l2ControlInfo(const v4l2_query_ext_ctrl
static_cast<uint16_t>(ctrl.default_value));
case V4L2_CTRL_TYPE_U32:
+ case V4L2_CTRL_TYPE_BITMASK:
return ControlInfo(static_cast<uint32_t>(ctrl.minimum),
static_cast<uint32_t>(ctrl.maximum),
static_cast<uint32_t>(ctrl.default_value));
A bitmask is conceptually an unsigned integer, as implied by the documentation: The maximum value is interpreted as a __u32, allowing the use of bit 31 in the bitmask. so map it to a 32-bit unsigned integer. Adjust the rkisp1 pipeline handler accordingly. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 4 +--- src/libcamera/v4l2_device.cpp | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-)