[v2,0/2] libcamera: camera_manager: Non-fatal duplicate id detection
mbox series

Message ID 20261028-kbingham-duplicate-id-v2-0-e82448998d88@ideasonboard.com
Headers show
Series
  • libcamera: camera_manager: Non-fatal duplicate id detection
Related show

Message

Kieran Bingham Oct. 28, 2026, 12:02 p.m. UTC
We face bug reports from users [0] where real life situations will currently
create a duplicate camera id, and we do not currently have a good
solution to identify a unique path for these devices.

[0] https://gitlab.freedesktop.org/camera/libcamera/-/work_items/303

We could look later to see if we create a sequential number to append to
these devices but for the moment lets make sure we don't crash users
systems with an assert.

Following a request from v1, I've now added a unit test which constucts
a test pipeline handler that can be instantiated multiple times to
validate the same code paths internally.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
Kieran Bingham (2):
      libcamera: camera_manager: Non-fatal duplicate id detection
      test: pipeline: Add a duplicate camera construction test

 src/libcamera/camera_manager.cpp      |   2 +-
 test/meson.build                      |   1 +
 test/pipeline/duplicate_camera_id.cpp | 202 ++++++++++++++++++++++++++++++++++
 test/pipeline/meson.build             |  14 +++
 4 files changed, 218 insertions(+), 1 deletion(-)
---
base-commit: 182307a772ebebf173ee84911906da707718485f
change-id: 20261028-kbingham-duplicate-id-cc835ed0846a

Best regards,