Re: [PATCH] media: uvcvideo: uvc_ctrl_get_rel_speed: use 0 as default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Now in plain text mode]

Hi Gergo

Doesn't your patch affect pan and tilt for all the cameras, not only the BCC950?

Also it seems that 1 means that device does not support programmable
speed. Is that correct?

```
The bPanSpeed field is used to specify the speed of the movement for
the Pan direction. A low
number indicates a slow speed and a high number indicates a higher
speed. The GET_MIN,
GET_MAX and GET_RES requests are used to retrieve the range and
resolution for this field.
The GET_DEF request is used to retrieve the default value for this
field. If the control does not
support speed control for the Pan control, it will return the value 1
in this field for all these
requests.
```

When you program that value do you see any difference on the device?
What is max, min and res?

Thanks!

Regards!


On Wed, 14 Jun 2023 at 15:13, Gergo Koteles <soyer@xxxxxx> wrote:
>
> The Logitech BCC950 incorrectly reports 1 (the max value)
> for the default values of V4L2_CID_PAN_SPEED,
> V4L2_CID_TILT_SPEED.
>
> This patch sets them to 0, which is the stop value.
>
> Previous discussion
> Link: https://lore.kernel.org/all/CAP_ceTy6XVmvTTAmvCp1YU2wxHwXqnarm69Yaz8K4FmpJqYxAg@xxxxxxxxxxxxxx/
>
> Signed-off-by: Gergo Koteles <soyer@xxxxxx>
> ---
>  drivers/media/usb/uvc/uvc_ctrl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
> index 5e9d3da862dd..e131958c0930 100644
> --- a/drivers/media/usb/uvc/uvc_ctrl.c
> +++ b/drivers/media/usb/uvc/uvc_ctrl.c
> @@ -444,9 +444,10 @@ static s32 uvc_ctrl_get_rel_speed(struct uvc_control_mapping *mapping,
>                 return -data[first+1];
>         case UVC_GET_MAX:
>         case UVC_GET_RES:
> +               return data[first+1];
>         case UVC_GET_DEF:
>         default:
> -               return data[first+1];
> +               return 0;
>         }
>  }
>
>
> base-commit: be9aac187433af6abba5fcc2e73d91d0794ba360
> --
> 2.40.1
>


-- 
Ricardo Ribalda



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux