diff options
author | Mike Isely <isely@pobox.com> | 2012-02-20 00:33:06 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-07 15:56:10 -0400 |
commit | d8329f8e17af85c568768fb268e0695dd1fc8148 (patch) | |
tree | 8c4c1e71e0b5893e87eff1af3b4900c6ed82493f /drivers | |
parent | 99ba1514ae3aded098138d08c6165caf71bb3017 (diff) |
[media] pvrusb2: Base available video standards on what hardware supports
With the transition to ioctl2, the pvrusb2 driver's own standards
enumeration is no longer used. Instead a generic algorithm internal
to v4l is used (which is a great idea - since the pvrusb2
implementation itself was generic anyway). This change ensures that
the v4l algorithm works with the correct set of hardware supported
standards. This resolves a FIXME left behind from the videodev_ioctl2
transition.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index ed497bbf539b..4c1a47470d39 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |||
@@ -1348,10 +1348,13 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip, | |||
1348 | memcpy(&dip->devbase,&vdev_template,sizeof(vdev_template)); | 1348 | memcpy(&dip->devbase,&vdev_template,sizeof(vdev_template)); |
1349 | dip->devbase.release = pvr2_video_device_release; | 1349 | dip->devbase.release = pvr2_video_device_release; |
1350 | dip->devbase.ioctl_ops = &pvr2_ioctl_ops; | 1350 | dip->devbase.ioctl_ops = &pvr2_ioctl_ops; |
1351 | /* FIXME: tvnorms should be set to the set of supported standards | 1351 | { |
1352 | by this device. Then video_ioctl2 will implement VIDIOC_ENUMSTD | 1352 | int val; |
1353 | based on this field. */ | 1353 | pvr2_ctrl_get_value( |
1354 | dip->devbase.tvnorms = V4L2_STD_ALL; | 1354 | pvr2_hdw_get_ctrl_by_id(vp->channel.mc_head->hdw, |
1355 | PVR2_CID_STDAVAIL), &val); | ||
1356 | dip->devbase.tvnorms = (v4l2_std_id)val; | ||
1357 | } | ||
1355 | 1358 | ||
1356 | mindevnum = -1; | 1359 | mindevnum = -1; |
1357 | unit_number = pvr2_hdw_get_unit_number(vp->channel.mc_head->hdw); | 1360 | unit_number = pvr2_hdw_get_unit_number(vp->channel.mc_head->hdw); |