Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271933
b: refs/heads/master
c: 7383a47
h: refs/heads/master
i:
  271931: 29acbce
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Oct 8, 2011
1 parent 13e9a83 commit 771989b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b728666ba5244505a80d1e395194e4b90386d504
refs/heads/master: 7383a47395fd5c5ae564b754ca14f6ae25dedecd
7 changes: 7 additions & 0 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2993,6 +2993,13 @@ static void pvr2_subdev_set_control(struct pvr2_hdw *hdw, int id,
pvr2_subdev_set_control(hdw, id, #lab, (hdw)->lab##_val); \
}

int pvr2_hdw_get_detected_std(struct pvr2_hdw *hdw, v4l2_std_id *std)
{
v4l2_device_call_all(&hdw->v4l2_dev, 0,
video, querystd, std);
return 0;
}

/* Execute whatever commands are required to update the state of all the
sub-devices so that they match our current control values. */
static void pvr2_subdev_update(struct pvr2_hdw *hdw)
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ struct pvr2_stream *pvr2_hdw_get_video_stream(struct pvr2_hdw *);
int pvr2_hdw_get_stdenum_value(struct pvr2_hdw *hdw,struct v4l2_standard *std,
unsigned int idx);

/* Get the detected video standard */
int pvr2_hdw_get_detected_std(struct pvr2_hdw *hdw, v4l2_std_id *std);

/* Enable / disable retrieval of CPU firmware or prom contents. This must
be enabled before pvr2_hdw_cpufw_get() will function. Note that doing
this may prevent the device from running (and leaving this mode may
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,13 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
break;
}

case VIDIOC_QUERYSTD:
{
v4l2_std_id *std = arg;
ret = pvr2_hdw_get_detected_std(hdw, std);
break;
}

case VIDIOC_G_STD:
{
int val = 0;
Expand Down

0 comments on commit 771989b

Please sign in to comment.