summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Konovalov <andrey.konovalov@linaro.org>2020-04-21 23:39:54 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-07-27 22:04:50 +0300
commit565f95d64ff92e8712e8090988180c343dd3bcb5 (patch)
treea0853850c4eab2ec3ae96bb552420121a191bee1
parent68e65da0ccc8308ba3d87b1522d77b36c54efae7 (diff)
libcamera: pipeline: simple: Try next mbus code if setupFormats() fails
Now SimpleCameraData::setupFormats() can fail if the camera sensor supports media bus code which some entities down the pipeline don't. When this happens continue with the next media bus code instead of aborting the enumeration of the possible pipeline configurations. Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--src/libcamera/pipeline/simple/simple.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index c2498d4e..0bab5af8 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -269,10 +269,11 @@ int SimpleCameraData::init()
ret = setupFormats(&format, V4L2Subdevice::TryFormat);
if (ret < 0) {
- LOG(SimplePipeline, Error)
- << "Failed to setup pipeline for media bus code "
- << utils::hex(code, 4);
- return ret;
+ LOG(SimplePipeline, Debug)
+ << "Media bus code " << utils::hex(code, 4)
+ << " not supported for this pipeline";
+ /* Try next mbus_code supported by the sensor */
+ continue;
}
V4L2VideoDevice::Formats videoFormats =