The patch number 7942 was added via Mauro Carvalho Chehab <[EMAIL PROTECTED]> to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward compatible with older kernels. Compatibility modifications will be removed before inclusion into the mainstream Kernel If anyone has any objections, please let us know by sending a message to: [EMAIL PROTECTED] ------ From: Tobias Lorenz <[EMAIL PROTECTED]> Hardware frequency seek ioctl interface Signed-off-by: Tobias Lorenz <[EMAIL PROTECTED]> Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]> --- linux/drivers/media/video/compat_ioctl32.c | 1 + linux/drivers/media/video/videodev.c | 12 ++++++++++++ linux/include/linux/videodev2.h | 10 ++++++++++ linux/include/media/v4l2-dev.h | 2 ++ 4 files changed, 25 insertions(+) diff -r 8dd0febf8241 -r 99dbdf02c707 linux/drivers/media/video/compat_ioctl32.c --- a/linux/drivers/media/video/compat_ioctl32.c Mon May 26 12:18:09 2008 -0300 +++ b/linux/drivers/media/video/compat_ioctl32.c Mon May 26 18:40:46 2008 +0000 @@ -950,6 +950,7 @@ long v4l_compat_ioctl32(struct file *fil case VIDIOC_G_INPUT32: case VIDIOC_S_INPUT32: case VIDIOC_TRY_FMT32: + case VIDIOC_S_HW_FREQ_SEEK: ret = do_video_ioctl(file, cmd, arg); break; diff -r 8dd0febf8241 -r 99dbdf02c707 linux/drivers/media/video/videodev.c --- a/linux/drivers/media/video/videodev.c Mon May 26 12:18:09 2008 -0300 +++ b/linux/drivers/media/video/videodev.c Mon May 26 18:40:46 2008 +0000 @@ -335,6 +335,7 @@ static const char *v4l2_ioctls[] = { [_IOC_NR(VIDIOC_DBG_G_REGISTER)] = "VIDIOC_DBG_G_REGISTER", [_IOC_NR(VIDIOC_G_CHIP_IDENT)] = "VIDIOC_G_CHIP_IDENT", + [_IOC_NR(VIDIOC_S_HW_FREQ_SEEK)] = "VIDIOC_S_HW_FREQ_SEEK", #endif }; #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls) @@ -1905,6 +1906,17 @@ static int __video_do_ioctl(struct inode ret = vfd->vidioc_default(file, fh, cmd, arg); break; } + case VIDIOC_S_HW_FREQ_SEEK: + { + struct v4l2_hw_freq_seek *p = arg; + if (!vfd->vidioc_s_hw_freq_seek) + break; + dbgarg(cmd, + "tuner=%d, type=%d, seek_upward=%d, wrap_around=%d\n", + p->tuner, p->type, p->seek_upward, p->wrap_around); + ret = vfd->vidioc_s_hw_freq_seek(file, fh, p); + break; + } } /* switch */ if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) { diff -r 8dd0febf8241 -r 99dbdf02c707 linux/include/linux/videodev2.h --- a/linux/include/linux/videodev2.h Mon May 26 12:18:09 2008 -0300 +++ b/linux/include/linux/videodev2.h Mon May 26 18:40:46 2008 +0000 @@ -246,6 +246,7 @@ struct v4l2_capability #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ #define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200 /* Can do video output overlay */ +#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */ #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ @@ -1153,6 +1154,14 @@ struct v4l2_frequency __u32 tuner; enum v4l2_tuner_type type; __u32 frequency; + __u32 reserved[8]; +}; + +struct v4l2_hw_freq_seek { + __u32 tuner; + enum v4l2_tuner_type type; + __u32 seek_upward; + __u32 wrap_around; __u32 reserved[8]; }; @@ -1441,6 +1450,7 @@ struct v4l2_chip_ident { #define VIDIOC_G_CHIP_IDENT _IOWR ('V', 81, struct v4l2_chip_ident) #endif +#define VIDIOC_S_HW_FREQ_SEEK _IOW ('V', 82, struct v4l2_hw_freq_seek) #ifdef __OLD_VIDIOC_ /* for compatibility, will go away some day */ diff -r 8dd0febf8241 -r 99dbdf02c707 linux/include/media/v4l2-dev.h --- a/linux/include/media/v4l2-dev.h Mon May 26 12:18:09 2008 -0300 +++ b/linux/include/media/v4l2-dev.h Mon May 26 18:40:46 2008 +0000 @@ -322,6 +322,8 @@ struct video_device /* Log status ioctl */ int (*vidioc_log_status) (struct file *file, void *fh); + int (*vidioc_s_hw_freq_seek) (struct file *file, void *fh, + struct v4l2_hw_freq_seek *a); /* Debugging ioctls */ #ifdef CONFIG_VIDEO_ADV_DEBUG --- Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/99dbdf02c7074057467081acdcc36de11e64f76c _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits