From 1e1a3cc37b6383635b37bd40a0c6ed5c834af053 Mon Sep 17 00:00:00 2001 From: Anatolij Gustschin Date: Wed, 22 Dec 2010 17:31:59 -0300 Subject: [PATCH] --- yaml --- r: 226369 b: refs/heads/master c: 50155c25bf346b65fec8e215131df397b0a5ee6e h: refs/heads/master i: 226367: 6bb6b77debfa82ce8bcace6f572244e3762fe93a v: v3 --- [refs] | 2 +- trunk/drivers/media/video/fsl-viu.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 65f0e4298ce1..275b1ac69ddb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f9d7d787842e92bc768d282f37fc3056c5441ddb +refs/heads/master: 50155c25bf346b65fec8e215131df397b0a5ee6e diff --git a/trunk/drivers/media/video/fsl-viu.c b/trunk/drivers/media/video/fsl-viu.c index 693e9c07e3f4..e4bba88254c7 100644 --- a/trunk/drivers/media/video/fsl-viu.c +++ b/trunk/drivers/media/video/fsl-viu.c @@ -194,6 +194,8 @@ struct viu_dev { /* decoder */ struct v4l2_subdev *decoder; + + v4l2_std_id std; }; struct viu_fh { @@ -937,14 +939,31 @@ static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i) #define decoder_call(viu, o, f, args...) \ v4l2_subdev_call(viu->decoder, o, f, ##args) +static int vidioc_querystd(struct file *file, void *priv, v4l2_std_id *std_id) +{ + struct viu_fh *fh = priv; + + decoder_call(fh->dev, video, querystd, std_id); + return 0; +} + static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *id) { struct viu_fh *fh = priv; + fh->dev->std = *id; decoder_call(fh->dev, core, s_std, *id); return 0; } +static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *std_id) +{ + struct viu_fh *fh = priv; + + *std_id = fh->dev->std; + return 0; +} + /* only one input in this driver */ static int vidioc_enum_input(struct file *file, void *priv, struct v4l2_input *inp) @@ -1402,7 +1421,9 @@ static const struct v4l2_ioctl_ops viu_ioctl_ops = { .vidioc_querybuf = vidioc_querybuf, .vidioc_qbuf = vidioc_qbuf, .vidioc_dqbuf = vidioc_dqbuf, + .vidioc_g_std = vidioc_g_std, .vidioc_s_std = vidioc_s_std, + .vidioc_querystd = vidioc_querystd, .vidioc_enum_input = vidioc_enum_input, .vidioc_g_input = vidioc_g_input, .vidioc_s_input = vidioc_s_input,