@@ -1344,8 +1344,19 @@ static int vidioc_enum_frameintervals(struct file *file, void *priv,
if (ret)
return ret;
- fival->type = V4L2_FRMIVAL_TYPE_DISCRETE;
- fival->discrete = fie.interval;
+ if (fie.max_interval.numerator == 0) {
+ fival->type = V4L2_FRMIVAL_TYPE_DISCRETE;
+ fival->discrete = fie.interval;
+ } else if (fie.step_interval.numerator == 0) {
+ fival->type = V4L2_FRMIVAL_TYPE_CONTINUOUS;
+ fival->stepwise.min = fie.interval;
+ fival->stepwise.max = fie.max_interval;
+ } else {
+ fival->type = V4L2_FRMIVAL_TYPE_STEPWISE;
+ fival->stepwise.min = fie.interval;
+ fival->stepwise.max = fie.max_interval;
+ fival->stepwise.step = fie.step_interval;
+ }
return 0;
}
Signed-off-by: Philippe De Muyter <phdm@macqel.be> --- drivers/staging/media/imx6/capture/mx6-camif.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)