| Message ID | 20261026165640.3755874-1-kieran.bingham@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
2026. 10. 26. 17:56 keltezéssel, Kieran Bingham írta: > There are some hardware configurations which currently generate a > duplicate camera ID when the camera is on a shared but multiplexed bus. > > At present this is somewhat difficult to adapt to ensure a consistent > and unique id. > > While this case is undesired, it presently causes libcamera to hit a > Fatal asssertion on real world hardware which then causes pipewire to > close. > > This behaviour is even less desirable, and we can easily continue to > operate libcamera without a potentially duplicate camera. > > Reduce the Fatal log level to an Error allowing the code to continue > without constructing this duplicate camera. > > Closes: https://gitlab.freedesktop.org/camera/libcamera/-/work_items/303 Could this be "downgraded" to "Link" or similar? I would like to keep the issue open. Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > --- > src/libcamera/camera_manager.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp > index 0dd4e0c590a1..9c9073053710 100644 > --- a/src/libcamera/camera_manager.cpp > +++ b/src/libcamera/camera_manager.cpp > @@ -210,7 +210,7 @@ void CameraManager::Private::addCamera(std::shared_ptr<Camera> camera) > > for (const std::shared_ptr<Camera> &c : cameras_) { > if (c->id() == camera->id()) { > - LOG(Camera, Fatal) > + LOG(Camera, Error) > << "Trying to register a camera with a duplicated ID '" > << camera->id() << "'"; > return;
diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp index 0dd4e0c590a1..9c9073053710 100644 --- a/src/libcamera/camera_manager.cpp +++ b/src/libcamera/camera_manager.cpp @@ -210,7 +210,7 @@ void CameraManager::Private::addCamera(std::shared_ptr<Camera> camera) for (const std::shared_ptr<Camera> &c : cameras_) { if (c->id() == camera->id()) { - LOG(Camera, Fatal) + LOG(Camera, Error) << "Trying to register a camera with a duplicated ID '" << camera->id() << "'"; return;
There are some hardware configurations which currently generate a duplicate camera ID when the camera is on a shared but multiplexed bus. At present this is somewhat difficult to adapt to ensure a consistent and unique id. While this case is undesired, it presently causes libcamera to hit a Fatal asssertion on real world hardware which then causes pipewire to close. This behaviour is even less desirable, and we can easily continue to operate libcamera without a potentially duplicate camera. Reduce the Fatal log level to an Error allowing the code to continue without constructing this duplicate camera. Closes: https://gitlab.freedesktop.org/camera/libcamera/-/work_items/303 Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> --- src/libcamera/camera_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)