diff options
author | Mats Randgaard <mats.randgaard@tandberg.com> | 2010-05-05 04:21:24 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 11:59:02 -0400 |
commit | 37eb446499fe447c4b827ff7ba87106ced3782dd (patch) | |
tree | bac534989d9299d0e4483f53e167a3fcdc120016 /drivers/media/video/tvp7002.c | |
parent | 6003b5c7e6dd60b18e48d8cef513228fadaabf7a (diff) |
V4L/DVB: tvp7002.c: Add support for enum_dv_presets
Implement enum_dv_presets in tvp7002.
Signed-off-by: Mats Randgaard <mats.randgaard@tandberg.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tvp7002.c')
-rw-r--r-- | drivers/media/video/tvp7002.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/media/video/tvp7002.c b/drivers/media/video/tvp7002.c index f650f0d125eb..6ebbf1759187 100644 --- a/drivers/media/video/tvp7002.c +++ b/drivers/media/video/tvp7002.c | |||
@@ -991,6 +991,23 @@ static int tvp7002_log_status(struct v4l2_subdev *sd) | |||
991 | return 0; | 991 | return 0; |
992 | } | 992 | } |
993 | 993 | ||
994 | /* | ||
995 | * tvp7002_enum_dv_presets() - Enum supported digital video formats | ||
996 | * @sd: pointer to standard V4L2 sub-device structure | ||
997 | * @preset: pointer to format struct | ||
998 | * | ||
999 | * Enumerate supported digital video formats. | ||
1000 | */ | ||
1001 | static int tvp7002_enum_dv_presets(struct v4l2_subdev *sd, | ||
1002 | struct v4l2_dv_enum_preset *preset) | ||
1003 | { | ||
1004 | /* Check requested format index is within range */ | ||
1005 | if (preset->index >= NUM_PRESETS) | ||
1006 | return -EINVAL; | ||
1007 | |||
1008 | return v4l_fill_dv_preset_info(tvp7002_presets[preset->index].preset, preset); | ||
1009 | } | ||
1010 | |||
994 | /* V4L2 core operation handlers */ | 1011 | /* V4L2 core operation handlers */ |
995 | static const struct v4l2_subdev_core_ops tvp7002_core_ops = { | 1012 | static const struct v4l2_subdev_core_ops tvp7002_core_ops = { |
996 | .g_chip_ident = tvp7002_g_chip_ident, | 1013 | .g_chip_ident = tvp7002_g_chip_ident, |
@@ -1006,6 +1023,7 @@ static const struct v4l2_subdev_core_ops tvp7002_core_ops = { | |||
1006 | 1023 | ||
1007 | /* Specific video subsystem operation handlers */ | 1024 | /* Specific video subsystem operation handlers */ |
1008 | static const struct v4l2_subdev_video_ops tvp7002_video_ops = { | 1025 | static const struct v4l2_subdev_video_ops tvp7002_video_ops = { |
1026 | .enum_dv_presets = tvp7002_enum_dv_presets, | ||
1009 | .s_dv_preset = tvp7002_s_dv_preset, | 1027 | .s_dv_preset = tvp7002_s_dv_preset, |
1010 | .query_dv_preset = tvp7002_query_dv_preset, | 1028 | .query_dv_preset = tvp7002_query_dv_preset, |
1011 | .s_stream = tvp7002_s_stream, | 1029 | .s_stream = tvp7002_s_stream, |