* [PATCH] [uvcvideo] Add "Auto" to power line frequency control
@ 2019-03-17 17:01 dorodnic
2019-03-17 17:01 ` [PATCH] media: Add missing "Auto" option to the " dorodnic
2019-04-01 8:04 ` [PATCH] [uvcvideo] Add "Auto" to " Sergey Dorodnic
0 siblings, 2 replies; 5+ messages in thread
From: dorodnic @ 2019-03-17 17:01 UTC (permalink / raw)
To: linux-media; +Cc: laurent.pinchart, evgeni.raikhel, Sergey Dorodnicov
From: Sergey Dorodnicov <sergey.dorodnicov@intel.com>
Based on section 4.2.2.3.6 of the USB Device Class Definition for Video Devices
and inline with v4l2-ctrls.c, this patch is adding "Auto" to the list of valid
values of the power line frequency control.
Tested on 5.0.0-rc7 using Intel D415 and D435 USB cameras.
Sergey Dorodnicov (1):
media: Add missing "Auto" option to the power line frequency control
drivers/media/usb/uvc/uvc_ctrl.c | 1 +
1 file changed, 1 insertion(+)
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] media: Add missing "Auto" option to the power line frequency control
2019-03-17 17:01 [PATCH] [uvcvideo] Add "Auto" to power line frequency control dorodnic
@ 2019-03-17 17:01 ` dorodnic
2019-04-02 10:13 ` Sakari Ailus
2019-04-01 8:04 ` [PATCH] [uvcvideo] Add "Auto" to " Sergey Dorodnic
1 sibling, 1 reply; 5+ messages in thread
From: dorodnic @ 2019-03-17 17:01 UTC (permalink / raw)
To: linux-media; +Cc: laurent.pinchart, evgeni.raikhel, Sergey Dorodnicov
From: Sergey Dorodnicov <sergey.dorodnicov@intel.com>
Section 4.2.2.3.6 of the USB Device Class Definition for Video Devices,
specifies "Auto" as a valid value for the power line frequency control.
This makes uvcvideo module consistent with control definition inside
/drivers/media/v4l2-core/v4l2-ctrls.c:
camera_power_line_frequency[] = {
"Disabled",
"50 Hz",
"60 Hz",
"Auto",
Signed-off-by: Sergey Dorodnicov <sergey.dorodnicov@intel.com>
Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
---
drivers/media/usb/uvc/uvc_ctrl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index 14cff91..a85910a 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -358,6 +358,7 @@ static const struct uvc_menu_info power_line_frequency_controls[] = {
{ 0, "Disabled" },
{ 1, "50 Hz" },
{ 2, "60 Hz" },
+ { 3, "Auto" },
};
static const struct uvc_menu_info exposure_auto_controls[] = {
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] [uvcvideo] Add "Auto" to power line frequency control
2019-03-17 17:01 [PATCH] [uvcvideo] Add "Auto" to power line frequency control dorodnic
2019-03-17 17:01 ` [PATCH] media: Add missing "Auto" option to the " dorodnic
@ 2019-04-01 8:04 ` Sergey Dorodnic
1 sibling, 0 replies; 5+ messages in thread
From: Sergey Dorodnic @ 2019-04-01 8:04 UTC (permalink / raw)
To: linux-media; +Cc: laurent.pinchart, Evgeni Raikhel, Sergey Dorodnicov
Hello,
Any feedback on the patch?
Thank you,
Sergey
On Sun, Mar 17, 2019 at 9:51 AM <dorodnic@gmail.com> wrote:
>
> From: Sergey Dorodnicov <sergey.dorodnicov@intel.com>
>
> Based on section 4.2.2.3.6 of the USB Device Class Definition for Video Devices
> and inline with v4l2-ctrls.c, this patch is adding "Auto" to the list of valid
> values of the power line frequency control.
>
> Tested on 5.0.0-rc7 using Intel D415 and D435 USB cameras.
>
> Sergey Dorodnicov (1):
> media: Add missing "Auto" option to the power line frequency control
>
> drivers/media/usb/uvc/uvc_ctrl.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] media: Add missing "Auto" option to the power line frequency control
2019-03-17 17:01 ` [PATCH] media: Add missing "Auto" option to the " dorodnic
@ 2019-04-02 10:13 ` Sakari Ailus
2019-04-02 11:31 ` Laurent Pinchart
0 siblings, 1 reply; 5+ messages in thread
From: Sakari Ailus @ 2019-04-02 10:13 UTC (permalink / raw)
To: dorodnic; +Cc: linux-media, laurent.pinchart, evgeni.raikhel, Sergey Dorodnicov
Hi Sergey,
Thanks for the patch.
On Sun, Mar 17, 2019 at 01:01:25PM -0400, dorodnic@gmail.com wrote:
> From: Sergey Dorodnicov <sergey.dorodnicov@intel.com>
>
> Section 4.2.2.3.6 of the USB Device Class Definition for Video Devices,
> specifies "Auto" as a valid value for the power line frequency control.
> This makes uvcvideo module consistent with control definition inside
> /drivers/media/v4l2-core/v4l2-ctrls.c:
> camera_power_line_frequency[] = {
> "Disabled",
> "50 Hz",
> "60 Hz",
> "Auto",
>
> Signed-off-by: Sergey Dorodnicov <sergey.dorodnicov@intel.com>
> Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
> ---
> drivers/media/usb/uvc/uvc_ctrl.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
> index 14cff91..a85910a 100644
> --- a/drivers/media/usb/uvc/uvc_ctrl.c
> +++ b/drivers/media/usb/uvc/uvc_ctrl.c
> @@ -358,6 +358,7 @@ static const struct uvc_menu_info power_line_frequency_controls[] = {
> { 0, "Disabled" },
> { 1, "50 Hz" },
> { 2, "60 Hz" },
> + { 3, "Auto" },
The auto option appears to have been added by UVC 1.5, so the menu entry
may only be available for such devices.
> };
>
> static const struct uvc_menu_info exposure_auto_controls[] = {
--
Kind regards,
Sakari Ailus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] media: Add missing "Auto" option to the power line frequency control
2019-04-02 10:13 ` Sakari Ailus
@ 2019-04-02 11:31 ` Laurent Pinchart
0 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2019-04-02 11:31 UTC (permalink / raw)
To: Sakari Ailus; +Cc: dorodnic, linux-media, evgeni.raikhel, Sergey Dorodnicov
Hello,
On Tue, Apr 02, 2019 at 01:13:16PM +0300, Sakari Ailus wrote:
> On Sun, Mar 17, 2019 at 01:01:25PM -0400, dorodnic@gmail.com wrote:
> > From: Sergey Dorodnicov <sergey.dorodnicov@intel.com>
> >
> > Section 4.2.2.3.6 of the USB Device Class Definition for Video Devices,
> > specifies "Auto" as a valid value for the power line frequency control.
> > This makes uvcvideo module consistent with control definition inside
> > /drivers/media/v4l2-core/v4l2-ctrls.c:
> > camera_power_line_frequency[] = {
> > "Disabled",
> > "50 Hz",
> > "60 Hz",
> > "Auto",
> >
> > Signed-off-by: Sergey Dorodnicov <sergey.dorodnicov@intel.com>
> > Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
> > ---
> > drivers/media/usb/uvc/uvc_ctrl.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
> > index 14cff91..a85910a 100644
> > --- a/drivers/media/usb/uvc/uvc_ctrl.c
> > +++ b/drivers/media/usb/uvc/uvc_ctrl.c
> > @@ -358,6 +358,7 @@ static const struct uvc_menu_info power_line_frequency_controls[] = {
> > { 0, "Disabled" },
> > { 1, "50 Hz" },
> > { 2, "60 Hz" },
> > + { 3, "Auto" },
>
> The auto option appears to have been added by UVC 1.5, so the menu entry
> may only be available for such devices.
That's correct. The power_line_frequency_controls array can always
contain the auto entry, but its availability should be conditioned on
the UVC protocol version. The PU_POWER_LINE_FREQUENCY_CONTROL control
unfortunately doesn't support GET_MAX, so we can't get the information
in a generic way by querying the control.
One option to keep the code generic would be to add protocol version
information to the uvc_control_mapping structure, to condition control
information on the protocol version. It could take the form of a [min,
max] version range for instance. Entries that don't set the min and max
versions would be applicable to all versions.
>
> > };
> >
> > static const struct uvc_menu_info exposure_auto_controls[] = {
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-04-02 11:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-17 17:01 [PATCH] [uvcvideo] Add "Auto" to power line frequency control dorodnic
2019-03-17 17:01 ` [PATCH] media: Add missing "Auto" option to the " dorodnic
2019-04-02 10:13 ` Sakari Ailus
2019-04-02 11:31 ` Laurent Pinchart
2019-04-01 8:04 ` [PATCH] [uvcvideo] Add "Auto" to " Sergey Dorodnic
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.