summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/cx18/cx18-streams.c
diff options
context:
space:
mode:
authorHans Verkuil2015-04-02 13:34:30 +0200
committerMauro Carvalho Chehab2015-04-08 11:42:14 +0200
commit3a29a4f177e99af0d80b5c4396a7aa1e9418742c (patch)
tree9413a1b0e929e42db0d6eda5e20f387bdc3f4584 /drivers/media/pci/cx18/cx18-streams.c
parent[media] cx18: add support for control events (diff)
downloadkernel-qcow2-linux-3a29a4f177e99af0d80b5c4396a7aa1e9418742c.tar.gz
kernel-qcow2-linux-3a29a4f177e99af0d80b5c4396a7aa1e9418742c.tar.xz
kernel-qcow2-linux-3a29a4f177e99af0d80b5c4396a7aa1e9418742c.zip
[media] cx18: fix VIDIOC_ENUMINPUT: wrong std value
The std field of v4l2_input is always V4L2_STD_ALL. For tuner inputs this should be cx->tuner_std. This fixes a v4l2-compliance failure. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/cx18/cx18-streams.c')
-rw-r--r--drivers/media/pci/cx18/cx18-streams.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/pci/cx18/cx18-streams.c b/drivers/media/pci/cx18/cx18-streams.c
index cf7ddaf0a704..c82d25d53341 100644
--- a/drivers/media/pci/cx18/cx18-streams.c
+++ b/drivers/media/pci/cx18/cx18-streams.c
@@ -304,6 +304,7 @@ static void cx18_stream_init(struct cx18 *cx, int type)
/* Assume the previous pixel default */
s->pixelformat = V4L2_PIX_FMT_HM12;
s->vb_bytes_per_frame = cx->cxhdl.height * 720 * 3 / 2;
+ s->vb_bytes_per_line = 720;
}
}
@@ -372,7 +373,10 @@ static int cx18_prep_dev(struct cx18 *cx, int type)
s->video_dev.v4l2_dev = &cx->v4l2_dev;
s->video_dev.fops = &cx18_v4l2_enc_fops;
s->video_dev.release = video_device_release_empty;
- s->video_dev.tvnorms = V4L2_STD_ALL;
+ if (cx->card->video_inputs->video_type == CX18_CARD_INPUT_VID_TUNER)
+ s->video_dev.tvnorms = cx->tuner_std;
+ else
+ s->video_dev.tvnorms = V4L2_STD_ALL;
s->video_dev.lock = &cx->serialize_lock;
cx18_set_funcs(&s->video_dev);
return 0;