diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-11-20 11:19:20 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-12-10 06:05:01 -0500 |
commit | e75f9cee32827853fc2f9d1ceb6352e3edc33e9d (patch) | |
tree | e1f1db30c237a08773fcf155a771545f3b6aa54f /drivers/media/video/cafe_ccic.c | |
parent | 207705cd7f82b9f160c6ed552d5788a823701fd1 (diff) |
V4L/DVB (4861): Remove the need of a STD array for drivers using video_ioctl2
video_ioctl2 will auto-generate standard entries at ENUM_FMT.
Also, now, a driver may return a subset of the video array at
the return, to be stored as the current_norm.
For example, a driver may ask for V4L2_STD_PAL. At return,
driver may change it to V4L2_STD_PAL_B. This way, a futher call
to G_STD will return the exact detected video std.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cafe_ccic.c')
-rw-r--r-- | drivers/media/video/cafe_ccic.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c index dc6e16c2b83b..30864dac26a3 100644 --- a/drivers/media/video/cafe_ccic.c +++ b/drivers/media/video/cafe_ccic.c | |||
@@ -1679,24 +1679,11 @@ static int cafe_vidioc_s_input(struct file *filp, void *priv, unsigned int i) | |||
1679 | } | 1679 | } |
1680 | 1680 | ||
1681 | /* from vivi.c */ | 1681 | /* from vivi.c */ |
1682 | static int cafe_vidioc_s_std(struct file *filp, void *priv, v4l2_std_id a) | 1682 | static int cafe_vidioc_s_std(struct file *filp, void *priv, v4l2_std_id *a) |
1683 | { | 1683 | { |
1684 | return 0; | 1684 | return 0; |
1685 | } | 1685 | } |
1686 | 1686 | ||
1687 | |||
1688 | /* | ||
1689 | * The TV Norm stuff is weird - we're a camera with little to do with TV, | ||
1690 | * really. The following is what vivi does. | ||
1691 | */ | ||
1692 | static struct v4l2_tvnorm cafe_tvnorm[] = { | ||
1693 | { | ||
1694 | .name = "NTSC-M", | ||
1695 | .id = V4L2_STD_NTSC_M, | ||
1696 | } | ||
1697 | }; | ||
1698 | |||
1699 | |||
1700 | static void cafe_v4l_dev_release(struct video_device *vd) | 1687 | static void cafe_v4l_dev_release(struct video_device *vd) |
1701 | { | 1688 | { |
1702 | struct cafe_camera *cam = container_of(vd, struct cafe_camera, v4ldev); | 1689 | struct cafe_camera *cam = container_of(vd, struct cafe_camera, v4ldev); |
@@ -1726,8 +1713,7 @@ static struct video_device cafe_v4l_template = { | |||
1726 | .type = VFL_TYPE_GRABBER, | 1713 | .type = VFL_TYPE_GRABBER, |
1727 | .type2 = VID_TYPE_CAPTURE, | 1714 | .type2 = VID_TYPE_CAPTURE, |
1728 | .minor = -1, /* Get one dynamically */ | 1715 | .minor = -1, /* Get one dynamically */ |
1729 | .tvnorms = cafe_tvnorm, | 1716 | .tvnorms = V4L2_STD_NTSC_M, |
1730 | .tvnormsize = 1, | ||
1731 | .current_norm = V4L2_STD_NTSC_M, /* make mplayer happy */ | 1717 | .current_norm = V4L2_STD_NTSC_M, /* make mplayer happy */ |
1732 | 1718 | ||
1733 | .fops = &cafe_v4l_fops, | 1719 | .fops = &cafe_v4l_fops, |