Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
Re: sys/uvideo: fill v4l2_capability the right way
To:
Marcus Glocker <marcus@nazgul.ch>
Cc:
tech@openbsd.org
Date:
Sat, 28 Dec 2024 23:14:44 +0100

Download raw body.

Thread
  • Marcus Glocker:

    sys/uvideo: fill v4l2_capability the right way

    • Kirill A. Korinsky:

      sys/uvideo: fill v4l2_capability the right way

  • On Sat, 28 Dec 2024 22:39:08 +0100,
    Marcus Glocker <marcus@nazgul.ch> wrote:
    > 
    > On Sat, Dec 28, 2024 at 04:18:57PM GMT, Kirill A. Korinsky wrote:
    > 
    > > tech@,
    > > 
    > > Some V4L consumers, for example libwebrtc which is used by firefox, uses
    > > bus_info to find the desired webcam.
    > > 
    > > Our logic with hardcoded string leads that firefox uses /dev/video0, and
    > > switch to another webcam simple doesn't work.
    > > 
    > > This behaviour of Linux uvc_meta_v4l2_querycap which uses constant as
    > > driver name, and device as bus_info.
    > > 
    > > Ok?
    > 
    > As discussed over the other mails, I'm OK with that after understanding
    > the requirement.  I also did run the patch quickly against
    > /usr/src/regress/sys/dev/video.
    > 
    > ok mglocker@
    >
    
    Thanks.
    
    Just for context: vidioc-querycap.rst states:
    
          - ``bus_info``\ [32]
          - Location of the device in the system, a NUL-terminated ASCII
            string. For example: "PCI:0000:05:06.0". This information is
            intended for users, to distinguish multiple identical devices. If
            no such information is available the field must simply count the
            devices controlled by the driver ("platform:vivid-000"). The
            bus_info must start with "PCI:" for PCI boards, "PCIe:" for PCI
            Express boards, "usb-" for USB devices, "I2C:" for i2c devices,
            "ISA:" for ISA devices, "parport" for parallel port devices and
            "platform:" for platform devices.
    
    Probably, we may use platform:uvideo0 to be alligned with this. But I can't
    find any software which parses such field. So, just uvideo0 should be safe.
    
    -- 
    wbr, Kirill
    
    
    
  • Marcus Glocker:

    sys/uvideo: fill v4l2_capability the right way