diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-10-03 11:22:28 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-10-08 07:00:26 -0400 |
commit | 7383a47395fd5c5ae564b754ca14f6ae25dedecd (patch) | |
tree | f07fd35f04f3310dbc47299f3a73677d6a125879 /drivers/media | |
parent | b728666ba5244505a80d1e395194e4b90386d504 (diff) |
[media] pvrusb2: implement VIDIOC_QUERYSTD
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 7 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.h | 3 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 7 |
3 files changed, 17 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index e98d3821279..5a6f24d1246 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -2993,6 +2993,13 @@ static void pvr2_subdev_set_control(struct pvr2_hdw *hdw, int id, | |||
2993 | pvr2_subdev_set_control(hdw, id, #lab, (hdw)->lab##_val); \ | 2993 | pvr2_subdev_set_control(hdw, id, #lab, (hdw)->lab##_val); \ |
2994 | } | 2994 | } |
2995 | 2995 | ||
2996 | int pvr2_hdw_get_detected_std(struct pvr2_hdw *hdw, v4l2_std_id *std) | ||
2997 | { | ||
2998 | v4l2_device_call_all(&hdw->v4l2_dev, 0, | ||
2999 | video, querystd, std); | ||
3000 | return 0; | ||
3001 | } | ||
3002 | |||
2996 | /* Execute whatever commands are required to update the state of all the | 3003 | /* Execute whatever commands are required to update the state of all the |
2997 | sub-devices so that they match our current control values. */ | 3004 | sub-devices so that they match our current control values. */ |
2998 | static void pvr2_subdev_update(struct pvr2_hdw *hdw) | 3005 | static void pvr2_subdev_update(struct pvr2_hdw *hdw) |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.h b/drivers/media/video/pvrusb2/pvrusb2-hdw.h index d7753ae9ff4..66546580b17 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.h +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.h | |||
@@ -214,6 +214,9 @@ struct pvr2_stream *pvr2_hdw_get_video_stream(struct pvr2_hdw *); | |||
214 | int pvr2_hdw_get_stdenum_value(struct pvr2_hdw *hdw,struct v4l2_standard *std, | 214 | int pvr2_hdw_get_stdenum_value(struct pvr2_hdw *hdw,struct v4l2_standard *std, |
215 | unsigned int idx); | 215 | unsigned int idx); |
216 | 216 | ||
217 | /* Get the detected video standard */ | ||
218 | int pvr2_hdw_get_detected_std(struct pvr2_hdw *hdw, v4l2_std_id *std); | ||
219 | |||
217 | /* Enable / disable retrieval of CPU firmware or prom contents. This must | 220 | /* Enable / disable retrieval of CPU firmware or prom contents. This must |
218 | be enabled before pvr2_hdw_cpufw_get() will function. Note that doing | 221 | be enabled before pvr2_hdw_cpufw_get() will function. Note that doing |
219 | this may prevent the device from running (and leaving this mode may | 222 | this may prevent the device from running (and leaving this mode may |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index e27f8ab7696..0d029da07e6 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |||
@@ -227,6 +227,13 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
227 | break; | 227 | break; |
228 | } | 228 | } |
229 | 229 | ||
230 | case VIDIOC_QUERYSTD: | ||
231 | { | ||
232 | v4l2_std_id *std = arg; | ||
233 | ret = pvr2_hdw_get_detected_std(hdw, std); | ||
234 | break; | ||
235 | } | ||
236 | |||
230 | case VIDIOC_G_STD: | 237 | case VIDIOC_G_STD: |
231 | { | 238 | { |
232 | int val = 0; | 239 | int val = 0; |