From owner-freebsd-multimedia@freebsd.org Fri Jan 1 14:14:48 2021 Return-Path: Delivered-To: freebsd-multimedia@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56FC14C98E1 for ; Fri, 1 Jan 2021 14:14:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4D6n8m1r1Zz4rvr for ; Fri, 1 Jan 2021 14:14:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 3D65C4C98DF; Fri, 1 Jan 2021 14:14:48 +0000 (UTC) Delivered-To: multimedia@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D3444C99B6 for ; Fri, 1 Jan 2021 14:14:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6n8m1CLWz4sFX for ; Fri, 1 Jan 2021 14:14:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1BE9C24388 for ; Fri, 1 Jan 2021 14:14:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 101EElL8032157 for ; Fri, 1 Jan 2021 14:14:47 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 101EEl09032156 for multimedia@FreeBSD.org; Fri, 1 Jan 2021 14:14:47 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: multimedia@FreeBSD.org Subject: [Bug 252327] multimedia/v4l-utils: v4l2-ctl can't determine the device type Date: Fri, 01 Jan 2021 14:14:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: trueos@norwegianrockcat.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: multimedia@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 14:14:48 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252327 Bug ID: 252327 Summary: multimedia/v4l-utils: v4l2-ctl can't determine the device type Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: multimedia@FreeBSD.org Reporter: trueos@norwegianrockcat.com Assignee: multimedia@FreeBSD.org Flags: maintainer-feedback?(multimedia@FreeBSD.org) v4l2-ctl allows you to set options on a web camera. For example, changing t= he power line frequency to 50 Hz to get rid of flicker with lights in Europe. Unfortunately, it seems that v4l2-ctl can't determine the device type. Runn= ing it with any sort of webcam produces the following: v4l2-ctl -L Unable to detect what device /dev/video0 is, exiting. Looking at the source code it seems that mi_media_detect_type() in media-info.cpp is using the Linux sysfs and uevent to get information about= the device type. This information doesn't exist on FreeBSD (at least not in that form). If one hardcodes(!) the type to MEDIA_TYPE_VIDEO, the information does show= up: ./v4l2-ctl -L brightness 0x00980900 (int) : min=3D0 max=3D255 ste= p=3D1 default=3D128 value=3D128 contrast 0x00980901 (int) : min=3D0 max=3D255 ste= p=3D1 default=3D128 value=3D128 saturation 0x00980902 (int) : min=3D0 max=3D255 ste= p=3D1 default=3D128 value=3D128 white_balance_temperature_auto 0x0098090c (bool) : default=3D1 value=3D1 gain 0x00980913 (int) : min=3D0 max=3D255 ste= p=3D1 default=3D0 value=3D136 power_line_frequency 0x00980918 (menu) : min=3D0 max=3D2 defau= lt=3D2 value=3D1 0: Disabled 1: 50 Hz 2: 60 Hz white_balance_temperature 0x0098091a (int) : min=3D2000 max=3D6500= step=3D1 default=3D4000 value=3D3385 flags=3Dinactive sharpness 0x0098091b (int) : min=3D0 max=3D255 ste= p=3D1 default=3D128 value=3D128 backlight_compensation 0x0098091c (int) : min=3D0 max=3D1 step= =3D1 default=3D0 value=3D0 exposure_auto 0x009a0901 (menu) : min=3D0 max=3D3 defau= lt=3D3 value=3D3 1: Manual Mode 3: Aperture Priority Mode exposure_absolute 0x009a0902 (int) : min=3D3 max=3D2047 st= ep=3D1 default=3D250 value=3D299 flags=3Dinactive exposure_auto_priority 0x009a0903 (bool) : default=3D0 value=3D1 pan_absolute 0x009a0908 (int) : min=3D-36000 max=3D36= 000 step=3D3600 default=3D0 value=3D0 tilt_absolute 0x009a0909 (int) : min=3D-36000 max=3D36= 000 step=3D3600 default=3D0 value=3D0 focus_absolute 0x009a090a (int) : min=3D0 max=3D250 ste= p=3D5 default=3D0 value=3D50 flags=3Dinactive focus_auto 0x009a090c (bool) : default=3D1 value=3D1 zoom_absolute 0x009a090d (int) : min=3D100 max=3D500 s= tep=3D1 default=3D100 value=3D100 Naturally, hard coding this value is not a permanent solution, but it does = show that things work afterwards. There are still issues in setting values (getsubopt returns differently), but the first step is to get the items to recognize correctly. --=20 You are receiving this mail because: You are the assignee for the bug.=