Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103803
b: refs/heads/master
c: 1d0ba5f
h: refs/heads/master
i:
  103801: d93f49d
  103799: 2efa21d
v: v3
  • Loading branch information
Tobias Lorenz authored and Mauro Carvalho Chehab committed Jul 20, 2008
1 parent fbe6c0b commit 7002848
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f90fe7a3f7fcba0abd89ce0978628ef1d86ecbf9
refs/heads/master: 1d0ba5f3784612fe6e91a12e0dec37c797d4f07c
1 change: 1 addition & 0 deletions trunk/drivers/media/video/compat_ioctl32.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,7 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg)
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;

Expand Down
12 changes: 12 additions & 0 deletions trunk/drivers/media/video/videodev.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,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)
Expand Down Expand Up @@ -1763,6 +1764,17 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
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) {
Expand Down
10 changes: 10 additions & 0 deletions trunk/include/linux/videodev2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -1156,6 +1157,14 @@ struct v4l2_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];
};

/*
* A U D I O
*/
Expand Down Expand Up @@ -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 */
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/media/v4l2-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,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
Expand Down

0 comments on commit 7002848

Please sign in to comment.