diff options
author | Mike Isely <isely@pobox.com> | 2012-02-20 02:28:56 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-07 16:54:15 -0300 |
commit | ac04d00ed1ee173c74bd5d55e80aed1f6e77a700 (patch) | |
tree | 59ea92f9dd6c97b98f84846df2025f786e344f78 /drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |
parent | 0927ee67dd59f715f2a6c796a86a0eda9ea2e7b2 (diff) | |
download | op-kernel-dev-ac04d00ed1ee173c74bd5d55e80aed1f6e77a700.zip op-kernel-dev-ac04d00ed1ee173c74bd5d55e80aed1f6e77a700.tar.gz |
[media] pvrusb2: Transform video standard detection result into read-only control ID
Other aspects of the pvrusb2 driver - including in particular those
dealing with video standards - all use internal control IDs for
uniform access by the interfaces. By exporting the querystd result as
another control ID, uniform access to it becomes available through the
sysfs interface.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-v4l2.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 3669090..ed497bb 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c @@ -209,8 +209,13 @@ static int pvr2_querystd(struct file *file, void *priv, v4l2_std_id *std) { struct pvr2_v4l2_fh *fh = file->private_data; struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; + int val = 0; + int ret; - return pvr2_hdw_get_detected_std(hdw, std); + ret = pvr2_ctrl_get_value( + pvr2_hdw_get_ctrl_by_id(hdw, PVR2_CID_STDDETECT), &val); + *std = val; + return ret; } static int pvr2_enum_input(struct file *file, void *priv, struct v4l2_input *vi) |