Re: [PATCH 02/30] media: atomisp: Remove Continuous capture and SDV run-modes

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

 



On Sat, May 13, 2023 at 3:32 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> Since we no longer support Continuous mode, setting the run_mode to
> ATOMISP_RUN_MODE_CONTINUOUS_CAPTURE no longer make sense, so remove
> this.
>
> While at it also remove ATOMISP_RUN_MODE_SDV, which was never exposed

it, also

> to userspace in the first place.

...

>  #define V4L2_CID_RUN_MODE                      (V4L2_CID_CAMERA_LASTP1 + 20)
>  #define ATOMISP_RUN_MODE_VIDEO                 1
>  #define ATOMISP_RUN_MODE_STILL_CAPTURE         2
> -#define ATOMISP_RUN_MODE_CONTINUOUS_CAPTURE    3
> -#define ATOMISP_RUN_MODE_PREVIEW               4
> -#define ATOMISP_RUN_MODE_SDV                   5
> +#define ATOMISP_RUN_MODE_PREVIEW               3

Wouldn't it be better to add here a _MODE_MIN and _MODE_MAX and...
(see at the end of this message)

...

> @@ -758,7 +758,6 @@ static const char *const ctrl_run_mode_menu[] = {
>         NULL,
>         "Video",
>         "Still capture",
> -       "Continuous capture",
>         "Preview",

Wouldn't be more robust to use indices like

  [_MODE_PREVIEW] = "Preview",

?

...

>         .type = V4L2_CTRL_TYPE_MENU,
>         .min = 1,
>         .def = 1,
> -       .max = 4,
> +       .max = 3,

...use it here? Or did I miss these min and max meanings?

>         .qmenu = ctrl_run_mode_menu,

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux