[libcamera-devel,v4,0/5] libcamera: Generate unique and stable camera names
mbox series

Message ID 20200729092122.3765539-1-niklas.soderlund@ragnatech.se
Headers show
Series
  • libcamera: Generate unique and stable camera names
Related show

Message

Niklas Söderlund July 29, 2020, 9:21 a.m. UTC
Hello,

This series aims to make and enforce unique camera names that are static
between system resets. This v3 is a complete rewrite of v1 and v2 of
this series that centered around bus information and location informat
instead of this v3 that focus on firmware descriptions.

Before this series camera names on different systems looked like this (I
do not have access to a simple pipeline device):

- ipu3
    ov13858 8-0010
    ov5670 10-0036
- raspberrypi
    imx219
- rkisp1
    ov5695 7-0036
    ov2685 7-003c
- uvcvideo
    Venus USB2.0 Camera: Venus USB2
    Logitech Webcam C930e
- vimc
    VIMC Sensor B

With this series applied camera names on the same systems:

- ipu3
    \_SB_.PCI0.I2C2.CAM0
    \_SB_.PCI0.I2C4.CAM1
- raspberrypi
    base/soc/i2c0mux/i2c@1/imx219@10
- rkisp1
    base/i2c@ff160000/camera@36
    base/i2c@ff160000/camera@3c
- uvcvideo
    0ac8:3420:3:10
    046d:0843:3:4
- vimc
    VIMC Sensor B

Niklas Söderlund (5):
  libcamera: v4l2_device: Add method to lookup device path
  libcamera: camera_sensor: Generate a sensor ID
  libcamera: camera: Generate camera name from a CameraSensor
  libcamera: pipeline: uvcvideo: Generate unique camera names
  libcamera: camera_manager: Enforce unique camera names

 include/libcamera/camera.h                    |  5 +
 include/libcamera/internal/camera_sensor.h    |  4 +
 include/libcamera/internal/v4l2_device.h      |  1 +
 src/libcamera/camera.cpp                      | 18 ++++
 src/libcamera/camera_manager.cpp              |  6 +-
 src/libcamera/camera_sensor.cpp               | 94 +++++++++++++++++++
 src/libcamera/pipeline/ipu3/ipu3.cpp          | 12 +--
 .../pipeline/raspberrypi/raspberrypi.cpp      |  3 +-
 src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  2 +-
 src/libcamera/pipeline/simple/simple.cpp      |  2 +-
 src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  | 35 ++++++-
 src/libcamera/pipeline/vimc/vimc.cpp          |  4 +-
 src/libcamera/v4l2_device.cpp                 | 24 +++++
 13 files changed, 194 insertions(+), 16 deletions(-)

Comments

Nicolas Dufresne Aug. 10, 2020, 4:01 p.m. UTC | #1
Hi there,

thanks for working on this.

Le mercredi 29 juillet 2020 à 11:21 +0200, Niklas Söderlund a écrit :
> Hello,
> 
> This series aims to make and enforce unique camera names that are static
> between system resets. This v3 is a complete rewrite of v1 and v2 of
> this series that centered around bus information and location informat
> instead of this v3 that focus on firmware descriptions.
> 
> Before this series camera names on different systems looked like this (I
> do not have access to a simple pipeline device):

I haven't looked at the code, but is that saying that instead of adding
a new API for the unique ID the human readable name was replaced and
removed ?

> 
> - ipu3
>     ov13858 8-0010
>     ov5670 10-0036
> - raspberrypi
>     imx219
> - rkisp1
>     ov5695 7-0036
>     ov2685 7-003c
> - uvcvideo
>     Venus USB2.0 Camera: Venus USB2
>     Logitech Webcam C930e
> - vimc
>     VIMC Sensor B
> 
> With this series applied camera names on the same systems:
> 
> - ipu3
>     \_SB_.PCI0.I2C2.CAM0
>     \_SB_.PCI0.I2C4.CAM1
> - raspberrypi
>     base/soc/i2c0mux/i2c@1/imx219@10
> - rkisp1
>     base/i2c@ff160000/camera@36
>     base/i2c@ff160000/camera@3c
> - uvcvideo
>     0ac8:3420:3:10
>     046d:0843:3:4
> - vimc
>     VIMC Sensor B
> 
> Niklas Söderlund (5):
>   libcamera: v4l2_device: Add method to lookup device path
>   libcamera: camera_sensor: Generate a sensor ID
>   libcamera: camera: Generate camera name from a CameraSensor
>   libcamera: pipeline: uvcvideo: Generate unique camera names
>   libcamera: camera_manager: Enforce unique camera names
> 
>  include/libcamera/camera.h                    |  5 +
>  include/libcamera/internal/camera_sensor.h    |  4 +
>  include/libcamera/internal/v4l2_device.h      |  1 +
>  src/libcamera/camera.cpp                      | 18 ++++
>  src/libcamera/camera_manager.cpp              |  6 +-
>  src/libcamera/camera_sensor.cpp               | 94 +++++++++++++++++++
>  src/libcamera/pipeline/ipu3/ipu3.cpp          | 12 +--
>  .../pipeline/raspberrypi/raspberrypi.cpp      |  3 +-
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  2 +-
>  src/libcamera/pipeline/simple/simple.cpp      |  2 +-
>  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  | 35 ++++++-
>  src/libcamera/pipeline/vimc/vimc.cpp          |  4 +-
>  src/libcamera/v4l2_device.cpp                 | 24 +++++
>  13 files changed, 194 insertions(+), 16 deletions(-)
>
Laurent Pinchart Aug. 10, 2020, 4:20 p.m. UTC | #2
Hi Nicolas,

On Mon, Aug 10, 2020 at 12:01:51PM -0400, Nicolas Dufresne wrote:
> Hi there,
> 
> thanks for working on this.
> 
> Le mercredi 29 juillet 2020 à 11:21 +0200, Niklas Söderlund a écrit :
> > Hello,
> > 
> > This series aims to make and enforce unique camera names that are static
> > between system resets. This v3 is a complete rewrite of v1 and v2 of
> > this series that centered around bus information and location informat
> > instead of this v3 that focus on firmware descriptions.
> > 
> > Before this series camera names on different systems looked like this (I
> > do not have access to a simple pipeline device):
> 
> I haven't looked at the code, but is that saying that instead of adding
> a new API for the unique ID the human readable name was replaced and
> removed ?

The human-readable name was never fully designed. This series replaces
it with a unique ID, and Niklas has posted a second series that
introduces support to create human-readable names.

> > - ipu3
> >     ov13858 8-0010
> >     ov5670 10-0036
> > - raspberrypi
> >     imx219
> > - rkisp1
> >     ov5695 7-0036
> >     ov2685 7-003c
> > - uvcvideo
> >     Venus USB2.0 Camera: Venus USB2
> >     Logitech Webcam C930e
> > - vimc
> >     VIMC Sensor B
> > 
> > With this series applied camera names on the same systems:
> > 
> > - ipu3
> >     \_SB_.PCI0.I2C2.CAM0
> >     \_SB_.PCI0.I2C4.CAM1
> > - raspberrypi
> >     base/soc/i2c0mux/i2c@1/imx219@10
> > - rkisp1
> >     base/i2c@ff160000/camera@36
> >     base/i2c@ff160000/camera@3c
> > - uvcvideo
> >     0ac8:3420:3:10
> >     046d:0843:3:4
> > - vimc
> >     VIMC Sensor B
> > 
> > Niklas Söderlund (5):
> >   libcamera: v4l2_device: Add method to lookup device path
> >   libcamera: camera_sensor: Generate a sensor ID
> >   libcamera: camera: Generate camera name from a CameraSensor
> >   libcamera: pipeline: uvcvideo: Generate unique camera names
> >   libcamera: camera_manager: Enforce unique camera names
> > 
> >  include/libcamera/camera.h                    |  5 +
> >  include/libcamera/internal/camera_sensor.h    |  4 +
> >  include/libcamera/internal/v4l2_device.h      |  1 +
> >  src/libcamera/camera.cpp                      | 18 ++++
> >  src/libcamera/camera_manager.cpp              |  6 +-
> >  src/libcamera/camera_sensor.cpp               | 94 +++++++++++++++++++
> >  src/libcamera/pipeline/ipu3/ipu3.cpp          | 12 +--
> >  .../pipeline/raspberrypi/raspberrypi.cpp      |  3 +-
> >  src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  2 +-
> >  src/libcamera/pipeline/simple/simple.cpp      |  2 +-
> >  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  | 35 ++++++-
> >  src/libcamera/pipeline/vimc/vimc.cpp          |  4 +-
> >  src/libcamera/v4l2_device.cpp                 | 24 +++++
> >  13 files changed, 194 insertions(+), 16 deletions(-)