|
@@ -487,6 +487,11 @@ static int bcap_enum_dv_timings(struct file *file, void *priv,
|
|
|
struct v4l2_enum_dv_timings *timings)
|
|
|
{
|
|
|
struct bcap_device *bcap_dev = video_drvdata(file);
|
|
|
+ struct v4l2_input input;
|
|
|
+
|
|
|
+ input = bcap_dev->cfg->inputs[bcap_dev->cur_input];
|
|
|
+ if (!(input.capabilities & V4L2_IN_CAP_DV_TIMINGS))
|
|
|
+ return -ENODATA;
|
|
|
|
|
|
timings->pad = 0;
|
|
|
|
|
@@ -498,6 +503,11 @@ static int bcap_query_dv_timings(struct file *file, void *priv,
|
|
|
struct v4l2_dv_timings *timings)
|
|
|
{
|
|
|
struct bcap_device *bcap_dev = video_drvdata(file);
|
|
|
+ struct v4l2_input input;
|
|
|
+
|
|
|
+ input = bcap_dev->cfg->inputs[bcap_dev->cur_input];
|
|
|
+ if (!(input.capabilities & V4L2_IN_CAP_DV_TIMINGS))
|
|
|
+ return -ENODATA;
|
|
|
|
|
|
return v4l2_subdev_call(bcap_dev->sd, video,
|
|
|
query_dv_timings, timings);
|
|
@@ -507,6 +517,11 @@ static int bcap_g_dv_timings(struct file *file, void *priv,
|
|
|
struct v4l2_dv_timings *timings)
|
|
|
{
|
|
|
struct bcap_device *bcap_dev = video_drvdata(file);
|
|
|
+ struct v4l2_input input;
|
|
|
+
|
|
|
+ input = bcap_dev->cfg->inputs[bcap_dev->cur_input];
|
|
|
+ if (!(input.capabilities & V4L2_IN_CAP_DV_TIMINGS))
|
|
|
+ return -ENODATA;
|
|
|
|
|
|
*timings = bcap_dev->dv_timings;
|
|
|
return 0;
|
|
@@ -516,7 +531,13 @@ static int bcap_s_dv_timings(struct file *file, void *priv,
|
|
|
struct v4l2_dv_timings *timings)
|
|
|
{
|
|
|
struct bcap_device *bcap_dev = video_drvdata(file);
|
|
|
+ struct v4l2_input input;
|
|
|
int ret;
|
|
|
+
|
|
|
+ input = bcap_dev->cfg->inputs[bcap_dev->cur_input];
|
|
|
+ if (!(input.capabilities & V4L2_IN_CAP_DV_TIMINGS))
|
|
|
+ return -ENODATA;
|
|
|
+
|
|
|
if (vb2_is_busy(&bcap_dev->buffer_queue))
|
|
|
return -EBUSY;
|
|
|
|