Commit 0ad17864 authored by Niklas Söderlund's avatar Niklas Söderlund Committed by Mauro Carvalho Chehab

[media] rcar-vin: fix standard in input enumeration

The driver supports a single input only, which can be either analog or
digital. If the subdevice supports dv_timings_cap the input is digital
and the driver should not fill in the standard.
Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 83108162
...@@ -483,10 +483,14 @@ static int rvin_enum_input(struct file *file, void *priv, ...@@ -483,10 +483,14 @@ static int rvin_enum_input(struct file *file, void *priv,
return ret; return ret;
i->type = V4L2_INPUT_TYPE_CAMERA; i->type = V4L2_INPUT_TYPE_CAMERA;
i->std = vin->vdev.tvnorms;
if (v4l2_subdev_has_op(sd, pad, dv_timings_cap)) if (v4l2_subdev_has_op(sd, pad, dv_timings_cap)) {
i->capabilities = V4L2_IN_CAP_DV_TIMINGS; i->capabilities = V4L2_IN_CAP_DV_TIMINGS;
i->std = 0;
} else {
i->capabilities = V4L2_IN_CAP_STD;
i->std = vin->vdev.tvnorms;
}
strlcpy(i->name, "Camera", sizeof(i->name)); strlcpy(i->name, "Camera", sizeof(i->name));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment