forked from Minki/linux
V4L/DVB (8482): videodev: move all ioctl callbacks to a new v4l2_ioctl_ops struct
All ioctl callbacks are now stored in a new v4l2_ioctl_ops struct. Drivers fill in a const struct v4l2_ioctl_ops and video_device just contains a const pointer to it. This ensures a clean separation between the const ops struct and the non-const video_device struct. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
b654fcdc0e
commit
a399810ca6
@ -445,14 +445,7 @@ static const struct file_operations usb_dsbr100_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
/* V4L2 interface */
|
||||
static struct video_device dsbr100_videodev_template =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.name = "D-Link DSB-R 100",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &usb_dsbr100_fops,
|
||||
.release = video_device_release,
|
||||
static const struct v4l2_ioctl_ops usb_dsbr100_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@ -467,6 +460,16 @@ static struct video_device dsbr100_videodev_template =
|
||||
.vidioc_s_input = vidioc_s_input,
|
||||
};
|
||||
|
||||
/* V4L2 interface */
|
||||
static struct video_device dsbr100_videodev_template = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "D-Link DSB-R 100",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &usb_dsbr100_fops,
|
||||
.ioctl_ops = &usb_dsbr100_ioctl_ops,
|
||||
.release = video_device_release,
|
||||
};
|
||||
|
||||
/* check if the device is present and register with v4l and
|
||||
usb if it is */
|
||||
static int usb_dsbr100_probe(struct usb_interface *intf,
|
||||
|
@ -389,12 +389,7 @@ static const struct file_operations rtrack_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device rtrack_radio=
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.name = "RadioTrack radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &rtrack_fops,
|
||||
static const struct v4l2_ioctl_ops rtrack_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@ -409,6 +404,14 @@ static struct video_device rtrack_radio=
|
||||
.vidioc_s_ctrl = vidioc_s_ctrl,
|
||||
};
|
||||
|
||||
static struct video_device rtrack_radio = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "RadioTrack radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &rtrack_fops,
|
||||
.ioctl_ops = &rtrack_ioctl_ops,
|
||||
};
|
||||
|
||||
static int __init rtrack_init(void)
|
||||
{
|
||||
if(io==-1)
|
||||
|
@ -353,12 +353,7 @@ static const struct file_operations aztech_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device aztech_radio=
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.name = "Aztech radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &aztech_fops,
|
||||
static const struct v4l2_ioctl_ops aztech_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@ -373,6 +368,14 @@ static struct video_device aztech_radio=
|
||||
.vidioc_s_ctrl = vidioc_s_ctrl,
|
||||
};
|
||||
|
||||
static struct video_device aztech_radio = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "Aztech radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &aztech_fops,
|
||||
.ioctl_ops = &aztech_ioctl_ops,
|
||||
};
|
||||
|
||||
module_param_named(debug,aztech_radio.debug, int, 0644);
|
||||
MODULE_PARM_DESC(debug,"activates debug info");
|
||||
|
||||
|
@ -570,12 +570,7 @@ static const struct file_operations cadet_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device cadet_radio=
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.name = "Cadet radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &cadet_fops,
|
||||
static const struct v4l2_ioctl_ops cadet_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@ -590,6 +585,14 @@ static struct video_device cadet_radio=
|
||||
.vidioc_s_input = vidioc_s_input,
|
||||
};
|
||||
|
||||
static struct video_device cadet_radio = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "Cadet radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &cadet_fops,
|
||||
.ioctl_ops = &cadet_ioctl_ops,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PNP
|
||||
|
||||
static struct pnp_device_id cadet_pnp_devices[] = {
|
||||
|
@ -375,11 +375,7 @@ static const struct file_operations gemtek_pci_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device vdev_template = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "Gemtek PCI Radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &gemtek_pci_fops,
|
||||
static const struct v4l2_ioctl_ops gemtek_pci_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@ -394,6 +390,14 @@ static struct video_device vdev_template = {
|
||||
.vidioc_s_ctrl = vidioc_s_ctrl,
|
||||
};
|
||||
|
||||
static struct video_device vdev_template = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "Gemtek PCI Radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &gemtek_pci_fops,
|
||||
.ioctl_ops = &gemtek_pci_ioctl_ops,
|
||||
};
|
||||
|
||||
static int __devinit gemtek_pci_probe( struct pci_dev *pci_dev, const struct pci_device_id *pci_id )
|
||||
{
|
||||
struct gemtek_pci_card *card;
|
||||
|
@ -553,11 +553,7 @@ static int vidioc_s_audio(struct file *file, void *priv, struct v4l2_audio *a)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct video_device gemtek_radio = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "GemTek Radio card",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &gemtek_fops,
|
||||
static const struct v4l2_ioctl_ops gemtek_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@ -572,6 +568,14 @@ static struct video_device gemtek_radio = {
|
||||
.vidioc_s_ctrl = vidioc_s_ctrl
|
||||
};
|
||||
|
||||
static struct video_device gemtek_radio = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "GemTek Radio card",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &gemtek_fops,
|
||||
.ioctl_ops = &gemtek_ioctl_ops,
|
||||
};
|
||||
|
||||
/*
|
||||
* Initialization / cleanup related stuff.
|
||||
*/
|
||||
|
@ -355,10 +355,7 @@ static u16 __devinit radio_power_on(struct radio_device *dev)
|
||||
return (ofreq == radio_bits_get(dev));
|
||||
}
|
||||
|
||||
static struct video_device maestro_radio = {
|
||||
.name = "Maestro radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &maestro_fops,
|
||||
static const struct v4l2_ioctl_ops maestro_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@ -373,6 +370,13 @@ static struct video_device maestro_radio = {
|
||||
.vidioc_s_ctrl = vidioc_s_ctrl,
|
||||
};
|
||||
|
||||
static struct video_device maestro_radio = {
|
||||
.name = "Maestro radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &maestro_fops,
|
||||
.ioctl_ops = &maestro_ioctl_ops,
|
||||
};
|
||||
|
||||
static int __devinit maestro_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *ent)
|
||||
{
|
||||
|
@ -374,13 +374,7 @@ static int vidioc_s_ctrl (struct file *file, void *priv,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static struct video_device maxiradio_radio =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.name = "Maxi Radio FM2000 radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &maxiradio_fops,
|
||||
|
||||
static const struct v4l2_ioctl_ops maxiradio_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@ -395,6 +389,14 @@ static struct video_device maxiradio_radio =
|
||||
.vidioc_s_ctrl = vidioc_s_ctrl,
|
||||
};
|
||||
|
||||
static struct video_device maxiradio_radio = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "Maxi Radio FM2000 radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &maxiradio_fops,
|
||||
.ioctl_ops = &maxiradio_ioctl_ops,
|
||||
};
|
||||
|
||||
static int __devinit maxiradio_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
{
|
||||
if(!request_region(pci_resource_start(pdev, 0),
|
||||
|
@ -295,12 +295,7 @@ static const struct file_operations rtrack2_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device rtrack2_radio=
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.name = "RadioTrack II radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &rtrack2_fops,
|
||||
static const struct v4l2_ioctl_ops rtrack2_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@ -315,6 +310,14 @@ static struct video_device rtrack2_radio=
|
||||
.vidioc_s_input = vidioc_s_input,
|
||||
};
|
||||
|
||||
static struct video_device rtrack2_radio = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "RadioTrack II radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &rtrack2_fops,
|
||||
.ioctl_ops = &rtrack2_ioctl_ops,
|
||||
};
|
||||
|
||||
static int __init rtrack2_init(void)
|
||||
{
|
||||
if(io==-1)
|
||||
|
@ -295,12 +295,7 @@ static const struct file_operations fmi_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device fmi_radio=
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.name = "SF16FMx radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &fmi_fops,
|
||||
static const struct v4l2_ioctl_ops fmi_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@ -315,6 +310,14 @@ static struct video_device fmi_radio=
|
||||
.vidioc_s_ctrl = vidioc_s_ctrl,
|
||||
};
|
||||
|
||||
static struct video_device fmi_radio = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "SF16FMx radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &fmi_fops,
|
||||
.ioctl_ops = &fmi_ioctl_ops,
|
||||
};
|
||||
|
||||
/* ladis: this is my card. does any other types exist? */
|
||||
static struct isapnp_device_id id_table[] __devinitdata = {
|
||||
{ ISAPNP_ANY_ID, ISAPNP_ANY_ID,
|
||||
|
@ -411,12 +411,7 @@ static const struct file_operations fmr2_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device fmr2_radio=
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.name = "SF16FMR2 radio",
|
||||
. type = VID_TYPE_TUNER,
|
||||
.fops = &fmr2_fops,
|
||||
static const struct v4l2_ioctl_ops fmr2_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@ -431,6 +426,14 @@ static struct video_device fmr2_radio=
|
||||
.vidioc_s_ctrl = vidioc_s_ctrl,
|
||||
};
|
||||
|
||||
static struct video_device fmr2_radio = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "SF16FMR2 radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &fmr2_fops,
|
||||
.ioctl_ops = &fmr2_ioctl_ops,
|
||||
};
|
||||
|
||||
static int __init fmr2_init(void)
|
||||
{
|
||||
fmr2_unit.port = io;
|
||||
|
@ -1586,15 +1586,7 @@ done:
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* si470x_viddev_tamples - video device interface
|
||||
*/
|
||||
static struct video_device si470x_viddev_template = {
|
||||
.fops = &si470x_fops,
|
||||
.name = DRIVER_NAME,
|
||||
.type = VID_TYPE_TUNER,
|
||||
.release = video_device_release,
|
||||
static const struct v4l2_ioctl_ops si470x_ioctl_ops = {
|
||||
.vidioc_querycap = si470x_vidioc_querycap,
|
||||
.vidioc_g_input = si470x_vidioc_g_input,
|
||||
.vidioc_s_input = si470x_vidioc_s_input,
|
||||
@ -1608,6 +1600,17 @@ static struct video_device si470x_viddev_template = {
|
||||
.vidioc_g_frequency = si470x_vidioc_g_frequency,
|
||||
.vidioc_s_frequency = si470x_vidioc_s_frequency,
|
||||
.vidioc_s_hw_freq_seek = si470x_vidioc_s_hw_freq_seek,
|
||||
};
|
||||
|
||||
/*
|
||||
* si470x_viddev_tamples - video device interface
|
||||
*/
|
||||
static struct video_device si470x_viddev_template = {
|
||||
.fops = &si470x_fops,
|
||||
.ioctl_ops = &si470x_ioctl_ops,
|
||||
.name = DRIVER_NAME,
|
||||
.type = VID_TYPE_TUNER,
|
||||
.release = video_device_release,
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
|
@ -367,12 +367,7 @@ static const struct file_operations terratec_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device terratec_radio=
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.name = "TerraTec ActiveRadio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &terratec_fops,
|
||||
static const struct v4l2_ioctl_ops terratec_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@ -387,6 +382,14 @@ static struct video_device terratec_radio=
|
||||
.vidioc_s_input = vidioc_s_input,
|
||||
};
|
||||
|
||||
static struct video_device terratec_radio = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "TerraTec ActiveRadio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &terratec_fops,
|
||||
.ioctl_ops = &terratec_ioctl_ops,
|
||||
};
|
||||
|
||||
static int __init terratec_init(void)
|
||||
{
|
||||
if(io==-1)
|
||||
|
@ -347,12 +347,7 @@ static const struct file_operations trust_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device trust_radio=
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.name = "Trust FM Radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &trust_fops,
|
||||
static const struct v4l2_ioctl_ops trust_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@ -367,6 +362,14 @@ static struct video_device trust_radio=
|
||||
.vidioc_s_input = vidioc_s_input,
|
||||
};
|
||||
|
||||
static struct video_device trust_radio = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "Trust FM Radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &trust_fops,
|
||||
.ioctl_ops = &trust_ioctl_ops,
|
||||
};
|
||||
|
||||
static int __init trust_init(void)
|
||||
{
|
||||
if(io == -1) {
|
||||
|
@ -345,12 +345,7 @@ static const struct file_operations typhoon_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device typhoon_radio =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.name = "Typhoon Radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &typhoon_fops,
|
||||
static const struct v4l2_ioctl_ops typhoon_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@ -365,6 +360,14 @@ static struct video_device typhoon_radio =
|
||||
.vidioc_s_ctrl = vidioc_s_ctrl,
|
||||
};
|
||||
|
||||
static struct video_device typhoon_radio = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "Typhoon Radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &typhoon_fops,
|
||||
.ioctl_ops = &typhoon_ioctl_ops,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_RADIO_TYPHOON_PROC_FS
|
||||
|
||||
static int typhoon_proc_show(struct seq_file *m, void *v)
|
||||
|
@ -408,12 +408,7 @@ static const struct file_operations zoltrix_fops =
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device zoltrix_radio =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.name = "Zoltrix Radio Plus",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &zoltrix_fops,
|
||||
static const struct v4l2_ioctl_ops zoltrix_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
@ -428,6 +423,14 @@ static struct video_device zoltrix_radio =
|
||||
.vidioc_s_ctrl = vidioc_s_ctrl,
|
||||
};
|
||||
|
||||
static struct video_device zoltrix_radio = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "Zoltrix Radio Plus",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &zoltrix_fops,
|
||||
.ioctl_ops = &zoltrix_ioctl_ops,
|
||||
};
|
||||
|
||||
static int __init zoltrix_init(void)
|
||||
{
|
||||
if (io == -1) {
|
||||
|
@ -3358,10 +3358,7 @@ static const struct file_operations bttv_fops =
|
||||
.poll = bttv_poll,
|
||||
};
|
||||
|
||||
static struct video_device bttv_video_template =
|
||||
{
|
||||
.fops = &bttv_fops,
|
||||
.minor = -1,
|
||||
static const struct v4l2_ioctl_ops bttv_ioctl_ops = {
|
||||
.vidioc_querycap = bttv_querycap,
|
||||
.vidioc_enum_fmt_vid_cap = bttv_enum_fmt_vid_cap,
|
||||
.vidioc_g_fmt_vid_cap = bttv_g_fmt_vid_cap,
|
||||
@ -3412,8 +3409,14 @@ static struct video_device bttv_video_template =
|
||||
.vidioc_g_register = bttv_g_register,
|
||||
.vidioc_s_register = bttv_s_register,
|
||||
#endif
|
||||
.tvnorms = BTTV_NORMS,
|
||||
.current_norm = V4L2_STD_PAL,
|
||||
};
|
||||
|
||||
static struct video_device bttv_video_template = {
|
||||
.fops = &bttv_fops,
|
||||
.minor = -1,
|
||||
.ioctl_ops = &bttv_ioctl_ops,
|
||||
.tvnorms = BTTV_NORMS,
|
||||
.current_norm = V4L2_STD_PAL,
|
||||
};
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
@ -3636,10 +3639,7 @@ static const struct file_operations radio_fops =
|
||||
.poll = radio_poll,
|
||||
};
|
||||
|
||||
static struct video_device radio_template =
|
||||
{
|
||||
.fops = &radio_fops,
|
||||
.minor = -1,
|
||||
static const struct v4l2_ioctl_ops radio_ioctl_ops = {
|
||||
.vidioc_querycap = radio_querycap,
|
||||
.vidioc_g_tuner = radio_g_tuner,
|
||||
.vidioc_enum_input = radio_enum_input,
|
||||
@ -3656,6 +3656,12 @@ static struct video_device radio_template =
|
||||
.vidioc_s_frequency = bttv_s_frequency,
|
||||
};
|
||||
|
||||
static struct video_device radio_template = {
|
||||
.fops = &radio_fops,
|
||||
.minor = -1,
|
||||
.ioctl_ops = &radio_ioctl_ops,
|
||||
};
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
/* some debug code */
|
||||
|
||||
|
@ -1769,17 +1769,7 @@ static const struct file_operations cafe_v4l_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device cafe_v4l_template = {
|
||||
.name = "cafe",
|
||||
.type = VFL_TYPE_GRABBER,
|
||||
.type2 = VID_TYPE_CAPTURE,
|
||||
.minor = -1, /* Get one dynamically */
|
||||
.tvnorms = V4L2_STD_NTSC_M,
|
||||
.current_norm = V4L2_STD_NTSC_M, /* make mplayer happy */
|
||||
|
||||
.fops = &cafe_v4l_fops,
|
||||
.release = cafe_v4l_dev_release,
|
||||
|
||||
static const struct v4l2_ioctl_ops cafe_v4l_ioctl_ops = {
|
||||
.vidioc_querycap = cafe_vidioc_querycap,
|
||||
.vidioc_enum_fmt_vid_cap = cafe_vidioc_enum_fmt_vid_cap,
|
||||
.vidioc_try_fmt_vid_cap = cafe_vidioc_try_fmt_vid_cap,
|
||||
@ -1802,6 +1792,19 @@ static struct video_device cafe_v4l_template = {
|
||||
.vidioc_s_parm = cafe_vidioc_s_parm,
|
||||
};
|
||||
|
||||
static struct video_device cafe_v4l_template = {
|
||||
.name = "cafe",
|
||||
.type = VFL_TYPE_GRABBER,
|
||||
.type2 = VID_TYPE_CAPTURE,
|
||||
.minor = -1, /* Get one dynamically */
|
||||
.tvnorms = V4L2_STD_NTSC_M,
|
||||
.current_norm = V4L2_STD_NTSC_M, /* make mplayer happy */
|
||||
|
||||
.fops = &cafe_v4l_fops,
|
||||
.ioctl_ops = &cafe_v4l_ioctl_ops,
|
||||
.release = cafe_v4l_dev_release,
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -787,50 +787,54 @@ int cx18_v4l2_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
|
||||
return res;
|
||||
}
|
||||
|
||||
static const struct v4l2_ioctl_ops cx18_ioctl_ops = {
|
||||
.vidioc_querycap = cx18_querycap,
|
||||
.vidioc_g_priority = cx18_g_priority,
|
||||
.vidioc_s_priority = cx18_s_priority,
|
||||
.vidioc_s_audio = cx18_s_audio,
|
||||
.vidioc_g_audio = cx18_g_audio,
|
||||
.vidioc_enumaudio = cx18_enumaudio,
|
||||
.vidioc_enum_input = cx18_enum_input,
|
||||
.vidioc_cropcap = cx18_cropcap,
|
||||
.vidioc_s_crop = cx18_s_crop,
|
||||
.vidioc_g_crop = cx18_g_crop,
|
||||
.vidioc_g_input = cx18_g_input,
|
||||
.vidioc_s_input = cx18_s_input,
|
||||
.vidioc_g_frequency = cx18_g_frequency,
|
||||
.vidioc_s_frequency = cx18_s_frequency,
|
||||
.vidioc_s_tuner = cx18_s_tuner,
|
||||
.vidioc_g_tuner = cx18_g_tuner,
|
||||
.vidioc_g_enc_index = cx18_g_enc_index,
|
||||
.vidioc_g_std = cx18_g_std,
|
||||
.vidioc_s_std = cx18_s_std,
|
||||
.vidioc_log_status = cx18_log_status,
|
||||
.vidioc_enum_fmt_vid_cap = cx18_enum_fmt_vid_cap,
|
||||
.vidioc_encoder_cmd = cx18_encoder_cmd,
|
||||
.vidioc_try_encoder_cmd = cx18_try_encoder_cmd,
|
||||
.vidioc_g_fmt_vid_cap = cx18_g_fmt_vid_cap,
|
||||
.vidioc_g_fmt_vbi_cap = cx18_g_fmt_vbi_cap,
|
||||
.vidioc_g_fmt_sliced_vbi_cap = cx18_g_fmt_sliced_vbi_cap,
|
||||
.vidioc_s_fmt_vid_cap = cx18_s_fmt_vid_cap,
|
||||
.vidioc_s_fmt_vbi_cap = cx18_s_fmt_vbi_cap,
|
||||
.vidioc_s_fmt_sliced_vbi_cap = cx18_s_fmt_sliced_vbi_cap,
|
||||
.vidioc_try_fmt_vid_cap = cx18_try_fmt_vid_cap,
|
||||
.vidioc_try_fmt_vbi_cap = cx18_try_fmt_vbi_cap,
|
||||
.vidioc_try_fmt_sliced_vbi_cap = cx18_try_fmt_sliced_vbi_cap,
|
||||
.vidioc_g_sliced_vbi_cap = cx18_g_sliced_vbi_cap,
|
||||
.vidioc_g_chip_ident = cx18_g_chip_ident,
|
||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
||||
.vidioc_g_register = cx18_g_register,
|
||||
.vidioc_s_register = cx18_s_register,
|
||||
#endif
|
||||
.vidioc_default = cx18_default,
|
||||
.vidioc_queryctrl = cx18_queryctrl,
|
||||
.vidioc_querymenu = cx18_querymenu,
|
||||
.vidioc_g_ext_ctrls = cx18_g_ext_ctrls,
|
||||
.vidioc_s_ext_ctrls = cx18_s_ext_ctrls,
|
||||
.vidioc_try_ext_ctrls = cx18_try_ext_ctrls,
|
||||
};
|
||||
|
||||
void cx18_set_funcs(struct video_device *vdev)
|
||||
{
|
||||
vdev->vidioc_querycap = cx18_querycap;
|
||||
vdev->vidioc_g_priority = cx18_g_priority;
|
||||
vdev->vidioc_s_priority = cx18_s_priority;
|
||||
vdev->vidioc_s_audio = cx18_s_audio;
|
||||
vdev->vidioc_g_audio = cx18_g_audio;
|
||||
vdev->vidioc_enumaudio = cx18_enumaudio;
|
||||
vdev->vidioc_enum_input = cx18_enum_input;
|
||||
vdev->vidioc_cropcap = cx18_cropcap;
|
||||
vdev->vidioc_s_crop = cx18_s_crop;
|
||||
vdev->vidioc_g_crop = cx18_g_crop;
|
||||
vdev->vidioc_g_input = cx18_g_input;
|
||||
vdev->vidioc_s_input = cx18_s_input;
|
||||
vdev->vidioc_g_frequency = cx18_g_frequency;
|
||||
vdev->vidioc_s_frequency = cx18_s_frequency;
|
||||
vdev->vidioc_s_tuner = cx18_s_tuner;
|
||||
vdev->vidioc_g_tuner = cx18_g_tuner;
|
||||
vdev->vidioc_g_enc_index = cx18_g_enc_index;
|
||||
vdev->vidioc_g_std = cx18_g_std;
|
||||
vdev->vidioc_s_std = cx18_s_std;
|
||||
vdev->vidioc_log_status = cx18_log_status;
|
||||
vdev->vidioc_enum_fmt_vid_cap = cx18_enum_fmt_vid_cap;
|
||||
vdev->vidioc_encoder_cmd = cx18_encoder_cmd;
|
||||
vdev->vidioc_try_encoder_cmd = cx18_try_encoder_cmd;
|
||||
vdev->vidioc_g_fmt_vid_cap = cx18_g_fmt_vid_cap;
|
||||
vdev->vidioc_g_fmt_vbi_cap = cx18_g_fmt_vbi_cap;
|
||||
vdev->vidioc_g_fmt_sliced_vbi_cap = cx18_g_fmt_sliced_vbi_cap;
|
||||
vdev->vidioc_s_fmt_vid_cap = cx18_s_fmt_vid_cap;
|
||||
vdev->vidioc_s_fmt_vbi_cap = cx18_s_fmt_vbi_cap;
|
||||
vdev->vidioc_s_fmt_sliced_vbi_cap = cx18_s_fmt_sliced_vbi_cap;
|
||||
vdev->vidioc_try_fmt_vid_cap = cx18_try_fmt_vid_cap;
|
||||
vdev->vidioc_try_fmt_vbi_cap = cx18_try_fmt_vbi_cap;
|
||||
vdev->vidioc_try_fmt_sliced_vbi_cap = cx18_try_fmt_sliced_vbi_cap;
|
||||
vdev->vidioc_g_sliced_vbi_cap = cx18_g_sliced_vbi_cap;
|
||||
vdev->vidioc_g_chip_ident = cx18_g_chip_ident;
|
||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
||||
vdev->vidioc_g_register = cx18_g_register;
|
||||
vdev->vidioc_s_register = cx18_s_register;
|
||||
#endif
|
||||
vdev->vidioc_default = cx18_default;
|
||||
vdev->vidioc_queryctrl = cx18_queryctrl;
|
||||
vdev->vidioc_querymenu = cx18_querymenu;
|
||||
vdev->vidioc_g_ext_ctrls = cx18_g_ext_ctrls;
|
||||
vdev->vidioc_s_ext_ctrls = cx18_s_ext_ctrls;
|
||||
vdev->vidioc_try_ext_ctrls = cx18_try_ext_ctrls;
|
||||
vdev->ioctl_ops = &cx18_ioctl_ops;
|
||||
}
|
||||
|
@ -1700,14 +1700,7 @@ static struct file_operations mpeg_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device cx23885_mpeg_template = {
|
||||
.name = "cx23885",
|
||||
.type = VID_TYPE_CAPTURE |
|
||||
VID_TYPE_TUNER |
|
||||
VID_TYPE_SCALES |
|
||||
VID_TYPE_MPEG_ENCODER,
|
||||
.fops = &mpeg_fops,
|
||||
.minor = -1,
|
||||
static const struct v4l2_ioctl_ops mpeg_ioctl_ops = {
|
||||
.vidioc_s_std = vidioc_s_std,
|
||||
.vidioc_enum_input = vidioc_enum_input,
|
||||
.vidioc_g_input = vidioc_g_input,
|
||||
@ -1736,6 +1729,17 @@ static struct video_device cx23885_mpeg_template = {
|
||||
.vidioc_queryctrl = vidioc_queryctrl,
|
||||
};
|
||||
|
||||
static struct video_device cx23885_mpeg_template = {
|
||||
.name = "cx23885",
|
||||
.type = VID_TYPE_CAPTURE |
|
||||
VID_TYPE_TUNER |
|
||||
VID_TYPE_SCALES |
|
||||
VID_TYPE_MPEG_ENCODER,
|
||||
.fops = &mpeg_fops,
|
||||
.ioctl_ops = &mpeg_ioctl_ops,
|
||||
.minor = -1,
|
||||
};
|
||||
|
||||
void cx23885_417_unregister(struct cx23885_dev *dev)
|
||||
{
|
||||
dprintk(1, "%s()\n", __func__);
|
||||
|
@ -1434,12 +1434,7 @@ static const struct file_operations video_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device cx23885_vbi_template;
|
||||
static struct video_device cx23885_video_template = {
|
||||
.name = "cx23885-video",
|
||||
.type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_SCALES,
|
||||
.fops = &video_fops,
|
||||
.minor = -1,
|
||||
static const struct v4l2_ioctl_ops video_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
|
||||
.vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
|
||||
@ -1472,6 +1467,15 @@ static struct video_device cx23885_video_template = {
|
||||
.vidioc_g_register = vidioc_g_register,
|
||||
.vidioc_s_register = vidioc_s_register,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct video_device cx23885_vbi_template;
|
||||
static struct video_device cx23885_video_template = {
|
||||
.name = "cx23885-video",
|
||||
.type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_SCALES,
|
||||
.fops = &video_fops,
|
||||
.minor = -1,
|
||||
.ioctl_ops = &video_ioctl_ops,
|
||||
.tvnorms = CX23885_NORMS,
|
||||
.current_norm = V4L2_STD_NTSC_M,
|
||||
};
|
||||
|
@ -1175,12 +1175,7 @@ static const struct file_operations mpeg_fops =
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device cx8802_mpeg_template =
|
||||
{
|
||||
.name = "cx8802",
|
||||
.type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_SCALES|VID_TYPE_MPEG_ENCODER,
|
||||
.fops = &mpeg_fops,
|
||||
.minor = -1,
|
||||
static const struct v4l2_ioctl_ops mpeg_ioctl_ops = {
|
||||
.vidioc_querymenu = vidioc_querymenu,
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
|
||||
@ -1208,6 +1203,15 @@ static struct video_device cx8802_mpeg_template =
|
||||
.vidioc_g_tuner = vidioc_g_tuner,
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
.vidioc_s_std = vidioc_s_std,
|
||||
};
|
||||
|
||||
static struct video_device cx8802_mpeg_template = {
|
||||
.name = "cx8802",
|
||||
.type = VID_TYPE_CAPTURE | VID_TYPE_TUNER |
|
||||
VID_TYPE_SCALES | VID_TYPE_MPEG_ENCODER,
|
||||
.fops = &mpeg_fops,
|
||||
.ioctl_ops = &mpeg_ioctl_ops,
|
||||
.minor = -1,
|
||||
.tvnorms = CX88_NORMS,
|
||||
.current_norm = V4L2_STD_NTSC_M,
|
||||
};
|
||||
|
@ -1683,13 +1683,7 @@ static const struct file_operations video_fops =
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device cx8800_vbi_template;
|
||||
static struct video_device cx8800_video_template =
|
||||
{
|
||||
.name = "cx8800-video",
|
||||
.type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_SCALES,
|
||||
.fops = &video_fops,
|
||||
.minor = -1,
|
||||
static const struct v4l2_ioctl_ops video_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
|
||||
.vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
|
||||
@ -1722,6 +1716,16 @@ static struct video_device cx8800_video_template =
|
||||
.vidioc_g_register = vidioc_g_register,
|
||||
.vidioc_s_register = vidioc_s_register,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct video_device cx8800_vbi_template;
|
||||
|
||||
static struct video_device cx8800_video_template = {
|
||||
.name = "cx8800-video",
|
||||
.type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_SCALES,
|
||||
.fops = &video_fops,
|
||||
.minor = -1,
|
||||
.ioctl_ops = &video_ioctl_ops,
|
||||
.tvnorms = CX88_NORMS,
|
||||
.current_norm = V4L2_STD_NTSC_M,
|
||||
};
|
||||
@ -1736,12 +1740,7 @@ static const struct file_operations radio_fops =
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device cx8800_radio_template =
|
||||
{
|
||||
.name = "cx8800-radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &radio_fops,
|
||||
.minor = -1,
|
||||
static const struct v4l2_ioctl_ops radio_ioctl_ops = {
|
||||
.vidioc_querycap = radio_querycap,
|
||||
.vidioc_g_tuner = radio_g_tuner,
|
||||
.vidioc_enum_input = radio_enum_input,
|
||||
@ -1760,6 +1759,14 @@ static struct video_device cx8800_radio_template =
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct video_device cx8800_radio_template = {
|
||||
.name = "cx8800-radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &radio_fops,
|
||||
.minor = -1,
|
||||
.ioctl_ops = &radio_ioctl_ops,
|
||||
};
|
||||
|
||||
/* ----------------------------------------------------------- */
|
||||
|
||||
static void cx8800_unregister_video(struct cx8800_dev *dev)
|
||||
|
@ -1764,20 +1764,7 @@ static const struct file_operations em28xx_v4l_fops = {
|
||||
.compat_ioctl = v4l_compat_ioctl32,
|
||||
};
|
||||
|
||||
static const struct file_operations radio_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = em28xx_v4l2_open,
|
||||
.release = em28xx_v4l2_close,
|
||||
.ioctl = video_ioctl2,
|
||||
.compat_ioctl = v4l_compat_ioctl32,
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static const struct video_device em28xx_video_template = {
|
||||
.fops = &em28xx_v4l_fops,
|
||||
.release = video_device_release,
|
||||
|
||||
.minor = -1,
|
||||
static const struct v4l2_ioctl_ops video_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
|
||||
.vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
|
||||
@ -1815,16 +1802,29 @@ static const struct video_device em28xx_video_template = {
|
||||
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
||||
.vidiocgmbuf = vidiocgmbuf,
|
||||
#endif
|
||||
};
|
||||
|
||||
static const struct video_device em28xx_video_template = {
|
||||
.fops = &em28xx_v4l_fops,
|
||||
.release = video_device_release,
|
||||
.ioctl_ops = &video_ioctl_ops,
|
||||
|
||||
.minor = -1,
|
||||
|
||||
.tvnorms = V4L2_STD_ALL,
|
||||
.current_norm = V4L2_STD_PAL,
|
||||
};
|
||||
|
||||
static struct video_device em28xx_radio_template = {
|
||||
.name = "em28xx-radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &radio_fops,
|
||||
.minor = -1,
|
||||
static const struct file_operations radio_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = em28xx_v4l2_open,
|
||||
.release = em28xx_v4l2_close,
|
||||
.ioctl = video_ioctl2,
|
||||
.compat_ioctl = v4l_compat_ioctl32,
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static const struct v4l2_ioctl_ops radio_ioctl_ops = {
|
||||
.vidioc_querycap = radio_querycap,
|
||||
.vidioc_g_tuner = radio_g_tuner,
|
||||
.vidioc_enum_input = radio_enum_input,
|
||||
@ -1843,6 +1843,14 @@ static struct video_device em28xx_radio_template = {
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct video_device em28xx_radio_template = {
|
||||
.name = "em28xx-radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &radio_fops,
|
||||
.ioctl_ops = &radio_ioctl_ops,
|
||||
.minor = -1,
|
||||
};
|
||||
|
||||
/******************************** usb interface ******************************/
|
||||
|
||||
|
||||
|
@ -1651,12 +1651,7 @@ static struct file_operations dev_fops = {
|
||||
.poll = dev_poll,
|
||||
};
|
||||
|
||||
static struct video_device gspca_template = {
|
||||
.name = "gspca main driver",
|
||||
.type = VID_TYPE_CAPTURE,
|
||||
.fops = &dev_fops,
|
||||
.release = dev_release, /* mandatory */
|
||||
.minor = -1,
|
||||
static const struct v4l2_ioctl_ops dev_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_dqbuf = vidioc_dqbuf,
|
||||
.vidioc_qbuf = vidioc_qbuf,
|
||||
@ -1685,6 +1680,15 @@ static struct video_device gspca_template = {
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct video_device gspca_template = {
|
||||
.name = "gspca main driver",
|
||||
.type = VID_TYPE_CAPTURE,
|
||||
.fops = &dev_fops,
|
||||
.ioctl_ops = &dev_ioctl_ops,
|
||||
.release = dev_release, /* mandatory */
|
||||
.minor = -1,
|
||||
};
|
||||
|
||||
/*
|
||||
* probe and create a new gspca device
|
||||
*
|
||||
|
@ -1842,69 +1842,73 @@ int ivtv_v4l2_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
|
||||
return res;
|
||||
}
|
||||
|
||||
static const struct v4l2_ioctl_ops ivtv_ioctl_ops = {
|
||||
.vidioc_querycap = ivtv_querycap,
|
||||
.vidioc_g_priority = ivtv_g_priority,
|
||||
.vidioc_s_priority = ivtv_s_priority,
|
||||
.vidioc_s_audio = ivtv_s_audio,
|
||||
.vidioc_g_audio = ivtv_g_audio,
|
||||
.vidioc_enumaudio = ivtv_enumaudio,
|
||||
.vidioc_s_audout = ivtv_s_audout,
|
||||
.vidioc_g_audout = ivtv_g_audout,
|
||||
.vidioc_enum_input = ivtv_enum_input,
|
||||
.vidioc_enum_output = ivtv_enum_output,
|
||||
.vidioc_enumaudout = ivtv_enumaudout,
|
||||
.vidioc_cropcap = ivtv_cropcap,
|
||||
.vidioc_s_crop = ivtv_s_crop,
|
||||
.vidioc_g_crop = ivtv_g_crop,
|
||||
.vidioc_g_input = ivtv_g_input,
|
||||
.vidioc_s_input = ivtv_s_input,
|
||||
.vidioc_g_output = ivtv_g_output,
|
||||
.vidioc_s_output = ivtv_s_output,
|
||||
.vidioc_g_frequency = ivtv_g_frequency,
|
||||
.vidioc_s_frequency = ivtv_s_frequency,
|
||||
.vidioc_s_tuner = ivtv_s_tuner,
|
||||
.vidioc_g_tuner = ivtv_g_tuner,
|
||||
.vidioc_g_enc_index = ivtv_g_enc_index,
|
||||
.vidioc_g_fbuf = ivtv_g_fbuf,
|
||||
.vidioc_s_fbuf = ivtv_s_fbuf,
|
||||
.vidioc_g_std = ivtv_g_std,
|
||||
.vidioc_s_std = ivtv_s_std,
|
||||
.vidioc_overlay = ivtv_overlay,
|
||||
.vidioc_log_status = ivtv_log_status,
|
||||
.vidioc_enum_fmt_vid_cap = ivtv_enum_fmt_vid_cap,
|
||||
.vidioc_encoder_cmd = ivtv_encoder_cmd,
|
||||
.vidioc_try_encoder_cmd = ivtv_try_encoder_cmd,
|
||||
.vidioc_enum_fmt_vid_out = ivtv_enum_fmt_vid_out,
|
||||
.vidioc_g_fmt_vid_cap = ivtv_g_fmt_vid_cap,
|
||||
.vidioc_g_fmt_vbi_cap = ivtv_g_fmt_vbi_cap,
|
||||
.vidioc_g_fmt_sliced_vbi_cap = ivtv_g_fmt_sliced_vbi_cap,
|
||||
.vidioc_g_fmt_vid_out = ivtv_g_fmt_vid_out,
|
||||
.vidioc_g_fmt_vid_out_overlay = ivtv_g_fmt_vid_out_overlay,
|
||||
.vidioc_g_fmt_sliced_vbi_out = ivtv_g_fmt_sliced_vbi_out,
|
||||
.vidioc_s_fmt_vid_cap = ivtv_s_fmt_vid_cap,
|
||||
.vidioc_s_fmt_vbi_cap = ivtv_s_fmt_vbi_cap,
|
||||
.vidioc_s_fmt_sliced_vbi_cap = ivtv_s_fmt_sliced_vbi_cap,
|
||||
.vidioc_s_fmt_vid_out = ivtv_s_fmt_vid_out,
|
||||
.vidioc_s_fmt_vid_out_overlay = ivtv_s_fmt_vid_out_overlay,
|
||||
.vidioc_s_fmt_sliced_vbi_out = ivtv_s_fmt_sliced_vbi_out,
|
||||
.vidioc_try_fmt_vid_cap = ivtv_try_fmt_vid_cap,
|
||||
.vidioc_try_fmt_vbi_cap = ivtv_try_fmt_vbi_cap,
|
||||
.vidioc_try_fmt_sliced_vbi_cap = ivtv_try_fmt_sliced_vbi_cap,
|
||||
.vidioc_try_fmt_vid_out = ivtv_try_fmt_vid_out,
|
||||
.vidioc_try_fmt_vid_out_overlay = ivtv_try_fmt_vid_out_overlay,
|
||||
.vidioc_try_fmt_sliced_vbi_out = ivtv_try_fmt_sliced_vbi_out,
|
||||
.vidioc_g_sliced_vbi_cap = ivtv_g_sliced_vbi_cap,
|
||||
.vidioc_g_chip_ident = ivtv_g_chip_ident,
|
||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
||||
.vidioc_g_register = ivtv_g_register,
|
||||
.vidioc_s_register = ivtv_s_register,
|
||||
#endif
|
||||
.vidioc_default = ivtv_default,
|
||||
.vidioc_queryctrl = ivtv_queryctrl,
|
||||
.vidioc_querymenu = ivtv_querymenu,
|
||||
.vidioc_g_ext_ctrls = ivtv_g_ext_ctrls,
|
||||
.vidioc_s_ext_ctrls = ivtv_s_ext_ctrls,
|
||||
.vidioc_try_ext_ctrls = ivtv_try_ext_ctrls,
|
||||
};
|
||||
|
||||
void ivtv_set_funcs(struct video_device *vdev)
|
||||
{
|
||||
vdev->vidioc_querycap = ivtv_querycap;
|
||||
vdev->vidioc_g_priority = ivtv_g_priority;
|
||||
vdev->vidioc_s_priority = ivtv_s_priority;
|
||||
vdev->vidioc_s_audio = ivtv_s_audio;
|
||||
vdev->vidioc_g_audio = ivtv_g_audio;
|
||||
vdev->vidioc_enumaudio = ivtv_enumaudio;
|
||||
vdev->vidioc_s_audout = ivtv_s_audout;
|
||||
vdev->vidioc_g_audout = ivtv_g_audout;
|
||||
vdev->vidioc_enum_input = ivtv_enum_input;
|
||||
vdev->vidioc_enum_output = ivtv_enum_output;
|
||||
vdev->vidioc_enumaudout = ivtv_enumaudout;
|
||||
vdev->vidioc_cropcap = ivtv_cropcap;
|
||||
vdev->vidioc_s_crop = ivtv_s_crop;
|
||||
vdev->vidioc_g_crop = ivtv_g_crop;
|
||||
vdev->vidioc_g_input = ivtv_g_input;
|
||||
vdev->vidioc_s_input = ivtv_s_input;
|
||||
vdev->vidioc_g_output = ivtv_g_output;
|
||||
vdev->vidioc_s_output = ivtv_s_output;
|
||||
vdev->vidioc_g_frequency = ivtv_g_frequency;
|
||||
vdev->vidioc_s_frequency = ivtv_s_frequency;
|
||||
vdev->vidioc_s_tuner = ivtv_s_tuner;
|
||||
vdev->vidioc_g_tuner = ivtv_g_tuner;
|
||||
vdev->vidioc_g_enc_index = ivtv_g_enc_index;
|
||||
vdev->vidioc_g_fbuf = ivtv_g_fbuf;
|
||||
vdev->vidioc_s_fbuf = ivtv_s_fbuf;
|
||||
vdev->vidioc_g_std = ivtv_g_std;
|
||||
vdev->vidioc_s_std = ivtv_s_std;
|
||||
vdev->vidioc_overlay = ivtv_overlay;
|
||||
vdev->vidioc_log_status = ivtv_log_status;
|
||||
vdev->vidioc_enum_fmt_vid_cap = ivtv_enum_fmt_vid_cap;
|
||||
vdev->vidioc_encoder_cmd = ivtv_encoder_cmd;
|
||||
vdev->vidioc_try_encoder_cmd = ivtv_try_encoder_cmd;
|
||||
vdev->vidioc_enum_fmt_vid_out = ivtv_enum_fmt_vid_out;
|
||||
vdev->vidioc_g_fmt_vid_cap = ivtv_g_fmt_vid_cap;
|
||||
vdev->vidioc_g_fmt_vbi_cap = ivtv_g_fmt_vbi_cap;
|
||||
vdev->vidioc_g_fmt_sliced_vbi_cap = ivtv_g_fmt_sliced_vbi_cap;
|
||||
vdev->vidioc_g_fmt_vid_out = ivtv_g_fmt_vid_out;
|
||||
vdev->vidioc_g_fmt_vid_out_overlay = ivtv_g_fmt_vid_out_overlay;
|
||||
vdev->vidioc_g_fmt_sliced_vbi_out = ivtv_g_fmt_sliced_vbi_out;
|
||||
vdev->vidioc_s_fmt_vid_cap = ivtv_s_fmt_vid_cap;
|
||||
vdev->vidioc_s_fmt_vbi_cap = ivtv_s_fmt_vbi_cap;
|
||||
vdev->vidioc_s_fmt_sliced_vbi_cap = ivtv_s_fmt_sliced_vbi_cap;
|
||||
vdev->vidioc_s_fmt_vid_out = ivtv_s_fmt_vid_out;
|
||||
vdev->vidioc_s_fmt_vid_out_overlay = ivtv_s_fmt_vid_out_overlay;
|
||||
vdev->vidioc_s_fmt_sliced_vbi_out = ivtv_s_fmt_sliced_vbi_out;
|
||||
vdev->vidioc_try_fmt_vid_cap = ivtv_try_fmt_vid_cap;
|
||||
vdev->vidioc_try_fmt_vbi_cap = ivtv_try_fmt_vbi_cap;
|
||||
vdev->vidioc_try_fmt_sliced_vbi_cap = ivtv_try_fmt_sliced_vbi_cap;
|
||||
vdev->vidioc_try_fmt_vid_out = ivtv_try_fmt_vid_out;
|
||||
vdev->vidioc_try_fmt_vid_out_overlay = ivtv_try_fmt_vid_out_overlay;
|
||||
vdev->vidioc_try_fmt_sliced_vbi_out = ivtv_try_fmt_sliced_vbi_out;
|
||||
vdev->vidioc_g_sliced_vbi_cap = ivtv_g_sliced_vbi_cap;
|
||||
vdev->vidioc_g_chip_ident = ivtv_g_chip_ident;
|
||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
||||
vdev->vidioc_g_register = ivtv_g_register;
|
||||
vdev->vidioc_s_register = ivtv_s_register;
|
||||
#endif
|
||||
vdev->vidioc_default = ivtv_default;
|
||||
vdev->vidioc_queryctrl = ivtv_queryctrl;
|
||||
vdev->vidioc_querymenu = ivtv_querymenu;
|
||||
vdev->vidioc_g_ext_ctrls = ivtv_g_ext_ctrls;
|
||||
vdev->vidioc_s_ext_ctrls = ivtv_s_ext_ctrls;
|
||||
vdev->vidioc_try_ext_ctrls = ivtv_try_ext_ctrls;
|
||||
vdev->ioctl_ops = &ivtv_ioctl_ops;
|
||||
}
|
||||
|
@ -1698,13 +1698,7 @@ static const struct file_operations meye_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device meye_template = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "meye",
|
||||
.type = VID_TYPE_CAPTURE,
|
||||
.fops = &meye_fops,
|
||||
.release = video_device_release,
|
||||
.minor = -1,
|
||||
static const struct v4l2_ioctl_ops meye_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_enum_input = vidioc_enum_input,
|
||||
.vidioc_g_input = vidioc_g_input,
|
||||
@ -1725,6 +1719,16 @@ static struct video_device meye_template = {
|
||||
.vidioc_default = vidioc_default,
|
||||
};
|
||||
|
||||
static struct video_device meye_template = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "meye",
|
||||
.type = VID_TYPE_CAPTURE,
|
||||
.fops = &meye_fops,
|
||||
.ioctl_ops = &meye_ioctl_ops,
|
||||
.release = video_device_release,
|
||||
.minor = -1,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int meye_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
{
|
||||
|
@ -1659,12 +1659,7 @@ static const struct file_operations s2255_fops_v4l = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device template = {
|
||||
.name = "s2255v",
|
||||
.type = VID_TYPE_CAPTURE,
|
||||
.fops = &s2255_fops_v4l,
|
||||
.minor = -1,
|
||||
.release = video_device_release,
|
||||
static const struct v4l2_ioctl_ops s2255_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
|
||||
.vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
|
||||
@ -1686,6 +1681,15 @@ static struct video_device template = {
|
||||
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
||||
.vidiocgmbuf = vidioc_cgmbuf,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct video_device template = {
|
||||
.name = "s2255v",
|
||||
.type = VID_TYPE_CAPTURE,
|
||||
.fops = &s2255_fops_v4l,
|
||||
.ioctl_ops = &s2255_ioctl_ops,
|
||||
.minor = -1,
|
||||
.release = video_device_release,
|
||||
.tvnorms = S2255_NORMS,
|
||||
.current_norm = V4L2_STD_NTSC_M,
|
||||
};
|
||||
|
@ -400,16 +400,7 @@ static const struct file_operations ts_fops =
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
/* ----------------------------------------------------------- */
|
||||
|
||||
static struct video_device saa7134_empress_template =
|
||||
{
|
||||
.name = "saa7134-empress",
|
||||
.type = 0 /* FIXME */,
|
||||
.type2 = 0 /* FIXME */,
|
||||
.fops = &ts_fops,
|
||||
.minor = -1,
|
||||
|
||||
static const struct v4l2_ioctl_ops ts_ioctl_ops = {
|
||||
.vidioc_querycap = empress_querycap,
|
||||
.vidioc_enum_fmt_vid_cap = empress_enum_fmt_vid_cap,
|
||||
.vidioc_s_fmt_vid_cap = empress_s_fmt_vid_cap,
|
||||
@ -430,6 +421,17 @@ static struct video_device saa7134_empress_template =
|
||||
.vidioc_querymenu = empress_querymenu,
|
||||
.vidioc_g_ctrl = saa7134_g_ctrl,
|
||||
.vidioc_s_ctrl = saa7134_s_ctrl,
|
||||
};
|
||||
|
||||
/* ----------------------------------------------------------- */
|
||||
|
||||
static struct video_device saa7134_empress_template = {
|
||||
.name = "saa7134-empress",
|
||||
.type = 0 /* FIXME */,
|
||||
.type2 = 0 /* FIXME */,
|
||||
.fops = &ts_fops,
|
||||
.minor = -1,
|
||||
.ioctl_ops = &ts_ioctl_ops,
|
||||
|
||||
.tvnorms = SAA7134_NORMS,
|
||||
.current_norm = V4L2_STD_PAL,
|
||||
|
@ -2353,26 +2353,7 @@ static const struct file_operations video_fops =
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static const struct file_operations radio_fops =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.open = video_open,
|
||||
.release = video_release,
|
||||
.ioctl = video_ioctl2,
|
||||
.compat_ioctl = v4l_compat_ioctl32,
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
/* ----------------------------------------------------------- */
|
||||
/* exported stuff */
|
||||
|
||||
struct video_device saa7134_video_template =
|
||||
{
|
||||
.name = "saa7134-video",
|
||||
.type = VID_TYPE_CAPTURE|VID_TYPE_TUNER |
|
||||
VID_TYPE_CLIPPING|VID_TYPE_SCALES,
|
||||
.fops = &video_fops,
|
||||
.minor = -1,
|
||||
static const struct v4l2_ioctl_ops video_ioctl_ops = {
|
||||
.vidioc_querycap = saa7134_querycap,
|
||||
.vidioc_enum_fmt_vid_cap = saa7134_enum_fmt_vid_cap,
|
||||
.vidioc_g_fmt_vid_cap = saa7134_g_fmt_vid_cap,
|
||||
@ -2421,16 +2402,18 @@ struct video_device saa7134_video_template =
|
||||
.vidioc_g_register = vidioc_g_register,
|
||||
.vidioc_s_register = vidioc_s_register,
|
||||
#endif
|
||||
.tvnorms = SAA7134_NORMS,
|
||||
.current_norm = V4L2_STD_PAL,
|
||||
};
|
||||
|
||||
struct video_device saa7134_radio_template =
|
||||
{
|
||||
.name = "saa7134-radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &radio_fops,
|
||||
.minor = -1,
|
||||
static const struct file_operations radio_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = video_open,
|
||||
.release = video_release,
|
||||
.ioctl = video_ioctl2,
|
||||
.compat_ioctl = v4l_compat_ioctl32,
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static const struct v4l2_ioctl_ops radio_ioctl_ops = {
|
||||
.vidioc_querycap = radio_querycap,
|
||||
.vidioc_g_tuner = radio_g_tuner,
|
||||
.vidioc_enum_input = radio_enum_input,
|
||||
@ -2447,6 +2430,28 @@ struct video_device saa7134_radio_template =
|
||||
.vidioc_s_frequency = saa7134_s_frequency,
|
||||
};
|
||||
|
||||
/* ----------------------------------------------------------- */
|
||||
/* exported stuff */
|
||||
|
||||
struct video_device saa7134_video_template = {
|
||||
.name = "saa7134-video",
|
||||
.type = VID_TYPE_CAPTURE|VID_TYPE_TUNER |
|
||||
VID_TYPE_CLIPPING|VID_TYPE_SCALES,
|
||||
.fops = &video_fops,
|
||||
.ioctl_ops = &video_ioctl_ops,
|
||||
.minor = -1,
|
||||
.tvnorms = SAA7134_NORMS,
|
||||
.current_norm = V4L2_STD_PAL,
|
||||
};
|
||||
|
||||
struct video_device saa7134_radio_template = {
|
||||
.name = "saa7134-radio",
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &radio_fops,
|
||||
.ioctl_ops = &radio_ioctl_ops,
|
||||
.minor = -1,
|
||||
};
|
||||
|
||||
int saa7134_video_init1(struct saa7134_dev *dev)
|
||||
{
|
||||
/* sanitycheck insmod options */
|
||||
|
@ -862,6 +862,35 @@ void soc_camera_device_unregister(struct soc_camera_device *icd)
|
||||
}
|
||||
EXPORT_SYMBOL(soc_camera_device_unregister);
|
||||
|
||||
static const struct v4l2_ioctl_ops soc_camera_ioctl_ops = {
|
||||
.vidioc_querycap = soc_camera_querycap,
|
||||
.vidioc_g_fmt_vid_cap = soc_camera_g_fmt_vid_cap,
|
||||
.vidioc_enum_fmt_vid_cap = soc_camera_enum_fmt_vid_cap,
|
||||
.vidioc_s_fmt_vid_cap = soc_camera_s_fmt_vid_cap,
|
||||
.vidioc_enum_input = soc_camera_enum_input,
|
||||
.vidioc_g_input = soc_camera_g_input,
|
||||
.vidioc_s_input = soc_camera_s_input,
|
||||
.vidioc_s_std = soc_camera_s_std,
|
||||
.vidioc_reqbufs = soc_camera_reqbufs,
|
||||
.vidioc_try_fmt_vid_cap = soc_camera_try_fmt_vid_cap,
|
||||
.vidioc_querybuf = soc_camera_querybuf,
|
||||
.vidioc_qbuf = soc_camera_qbuf,
|
||||
.vidioc_dqbuf = soc_camera_dqbuf,
|
||||
.vidioc_streamon = soc_camera_streamon,
|
||||
.vidioc_streamoff = soc_camera_streamoff,
|
||||
.vidioc_queryctrl = soc_camera_queryctrl,
|
||||
.vidioc_g_ctrl = soc_camera_g_ctrl,
|
||||
.vidioc_s_ctrl = soc_camera_s_ctrl,
|
||||
.vidioc_cropcap = soc_camera_cropcap,
|
||||
.vidioc_g_crop = soc_camera_g_crop,
|
||||
.vidioc_s_crop = soc_camera_s_crop,
|
||||
.vidioc_g_chip_ident = soc_camera_g_chip_ident,
|
||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
||||
.vidioc_g_register = soc_camera_g_register,
|
||||
.vidioc_s_register = soc_camera_s_register,
|
||||
#endif
|
||||
};
|
||||
|
||||
int soc_camera_video_start(struct soc_camera_device *icd)
|
||||
{
|
||||
struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
|
||||
@ -882,35 +911,10 @@ int soc_camera_video_start(struct soc_camera_device *icd)
|
||||
vdev->type = VID_TYPE_CAPTURE;
|
||||
vdev->current_norm = V4L2_STD_UNKNOWN;
|
||||
vdev->fops = &soc_camera_fops;
|
||||
vdev->ioctl_ops = &soc_camera_ioctl_ops;
|
||||
vdev->release = video_device_release;
|
||||
vdev->minor = -1;
|
||||
vdev->tvnorms = V4L2_STD_UNKNOWN,
|
||||
vdev->vidioc_querycap = soc_camera_querycap;
|
||||
vdev->vidioc_g_fmt_vid_cap = soc_camera_g_fmt_vid_cap;
|
||||
vdev->vidioc_enum_fmt_vid_cap = soc_camera_enum_fmt_vid_cap;
|
||||
vdev->vidioc_s_fmt_vid_cap = soc_camera_s_fmt_vid_cap;
|
||||
vdev->vidioc_enum_input = soc_camera_enum_input;
|
||||
vdev->vidioc_g_input = soc_camera_g_input;
|
||||
vdev->vidioc_s_input = soc_camera_s_input;
|
||||
vdev->vidioc_s_std = soc_camera_s_std;
|
||||
vdev->vidioc_reqbufs = soc_camera_reqbufs;
|
||||
vdev->vidioc_try_fmt_vid_cap = soc_camera_try_fmt_vid_cap;
|
||||
vdev->vidioc_querybuf = soc_camera_querybuf;
|
||||
vdev->vidioc_qbuf = soc_camera_qbuf;
|
||||
vdev->vidioc_dqbuf = soc_camera_dqbuf;
|
||||
vdev->vidioc_streamon = soc_camera_streamon;
|
||||
vdev->vidioc_streamoff = soc_camera_streamoff;
|
||||
vdev->vidioc_queryctrl = soc_camera_queryctrl;
|
||||
vdev->vidioc_g_ctrl = soc_camera_g_ctrl;
|
||||
vdev->vidioc_s_ctrl = soc_camera_s_ctrl;
|
||||
vdev->vidioc_cropcap = soc_camera_cropcap;
|
||||
vdev->vidioc_g_crop = soc_camera_g_crop;
|
||||
vdev->vidioc_s_crop = soc_camera_s_crop;
|
||||
vdev->vidioc_g_chip_ident = soc_camera_g_chip_ident;
|
||||
#ifdef CONFIG_VIDEO_ADV_DEBUG
|
||||
vdev->vidioc_g_register = soc_camera_g_register;
|
||||
vdev->vidioc_s_register = soc_camera_s_register;
|
||||
#endif
|
||||
|
||||
icd->current_fmt = &icd->formats[0];
|
||||
|
||||
|
@ -1328,20 +1328,7 @@ static struct file_operations v4l_stk_fops = {
|
||||
.llseek = no_llseek
|
||||
};
|
||||
|
||||
static void stk_v4l_dev_release(struct video_device *vd)
|
||||
{
|
||||
}
|
||||
|
||||
static struct video_device stk_v4l_data = {
|
||||
.name = "stkwebcam",
|
||||
.type = VFL_TYPE_GRABBER,
|
||||
.type2 = VID_TYPE_CAPTURE,
|
||||
.minor = -1,
|
||||
.tvnorms = V4L2_STD_UNKNOWN,
|
||||
.current_norm = V4L2_STD_UNKNOWN,
|
||||
.fops = &v4l_stk_fops,
|
||||
.release = stk_v4l_dev_release,
|
||||
|
||||
static const struct v4l2_ioctl_ops v4l_stk_ioctl_ops = {
|
||||
.vidioc_querycap = stk_vidioc_querycap,
|
||||
.vidioc_enum_fmt_vid_cap = stk_vidioc_enum_fmt_vid_cap,
|
||||
.vidioc_try_fmt_vid_cap = stk_vidioc_try_fmt_vid_cap,
|
||||
@ -1363,6 +1350,22 @@ static struct video_device stk_v4l_data = {
|
||||
.vidioc_g_parm = stk_vidioc_g_parm,
|
||||
};
|
||||
|
||||
static void stk_v4l_dev_release(struct video_device *vd)
|
||||
{
|
||||
}
|
||||
|
||||
static struct video_device stk_v4l_data = {
|
||||
.name = "stkwebcam",
|
||||
.type = VFL_TYPE_GRABBER,
|
||||
.type2 = VID_TYPE_CAPTURE,
|
||||
.minor = -1,
|
||||
.tvnorms = V4L2_STD_UNKNOWN,
|
||||
.current_norm = V4L2_STD_UNKNOWN,
|
||||
.fops = &v4l_stk_fops,
|
||||
.ioctl_ops = &v4l_stk_ioctl_ops,
|
||||
.release = stk_v4l_dev_release,
|
||||
};
|
||||
|
||||
|
||||
static int stk_register_video_device(struct stk_camera *dev)
|
||||
{
|
||||
|
@ -1370,13 +1370,8 @@ static const struct file_operations usbvision_fops = {
|
||||
/* .poll = video_poll, */
|
||||
.compat_ioctl = v4l_compat_ioctl32,
|
||||
};
|
||||
static struct video_device usbvision_video_template = {
|
||||
.owner = THIS_MODULE,
|
||||
.type = VID_TYPE_TUNER | VID_TYPE_CAPTURE,
|
||||
.fops = &usbvision_fops,
|
||||
.name = "usbvision-video",
|
||||
.release = video_device_release,
|
||||
.minor = -1,
|
||||
|
||||
static const struct v4l2_ioctl_ops usbvision_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
|
||||
.vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
|
||||
@ -1408,6 +1403,16 @@ static struct video_device usbvision_video_template = {
|
||||
.vidioc_g_register = vidioc_g_register,
|
||||
.vidioc_s_register = vidioc_s_register,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct video_device usbvision_video_template = {
|
||||
.owner = THIS_MODULE,
|
||||
.type = VID_TYPE_TUNER | VID_TYPE_CAPTURE,
|
||||
.fops = &usbvision_fops,
|
||||
.ioctl_ops = &usbvision_ioctl_ops,
|
||||
.name = "usbvision-video",
|
||||
.release = video_device_release,
|
||||
.minor = -1,
|
||||
.tvnorms = USBVISION_NORMS,
|
||||
.current_norm = V4L2_STD_PAL
|
||||
};
|
||||
@ -1423,14 +1428,7 @@ static const struct file_operations usbvision_radio_fops = {
|
||||
.compat_ioctl = v4l_compat_ioctl32,
|
||||
};
|
||||
|
||||
static struct video_device usbvision_radio_template=
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &usbvision_radio_fops,
|
||||
.name = "usbvision-radio",
|
||||
.release = video_device_release,
|
||||
.minor = -1,
|
||||
static const struct v4l2_ioctl_ops usbvision_radio_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_enum_input = vidioc_enum_input,
|
||||
.vidioc_g_input = vidioc_g_input,
|
||||
@ -1444,6 +1442,16 @@ static struct video_device usbvision_radio_template=
|
||||
.vidioc_s_tuner = vidioc_s_tuner,
|
||||
.vidioc_g_frequency = vidioc_g_frequency,
|
||||
.vidioc_s_frequency = vidioc_s_frequency,
|
||||
};
|
||||
|
||||
static struct video_device usbvision_radio_template = {
|
||||
.owner = THIS_MODULE,
|
||||
.type = VID_TYPE_TUNER,
|
||||
.fops = &usbvision_radio_fops,
|
||||
.name = "usbvision-radio",
|
||||
.release = video_device_release,
|
||||
.minor = -1,
|
||||
.ioctl_ops = &usbvision_radio_ioctl_ops,
|
||||
|
||||
.tvnorms = USBVISION_NORMS,
|
||||
.current_norm = V4L2_STD_PAL
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1066,13 +1066,7 @@ static const struct file_operations vivi_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device vivi_template = {
|
||||
.name = "vivi",
|
||||
.type = VID_TYPE_CAPTURE,
|
||||
.fops = &vivi_fops,
|
||||
.minor = -1,
|
||||
.release = video_device_release,
|
||||
|
||||
static const struct v4l2_ioctl_ops vivi_ioctl_ops = {
|
||||
.vidioc_querycap = vidioc_querycap,
|
||||
.vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
|
||||
.vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
|
||||
@ -1094,6 +1088,16 @@ static struct video_device vivi_template = {
|
||||
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
||||
.vidiocgmbuf = vidiocgmbuf,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct video_device vivi_template = {
|
||||
.name = "vivi",
|
||||
.type = VID_TYPE_CAPTURE,
|
||||
.fops = &vivi_fops,
|
||||
.ioctl_ops = &vivi_ioctl_ops,
|
||||
.minor = -1,
|
||||
.release = video_device_release,
|
||||
|
||||
.tvnorms = V4L2_STD_525_60,
|
||||
.current_norm = V4L2_STD_NTSC_M,
|
||||
};
|
||||
|
@ -762,14 +762,7 @@ static const struct file_operations zr364xx_fops = {
|
||||
.llseek = no_llseek,
|
||||
};
|
||||
|
||||
static struct video_device zr364xx_template = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = DRIVER_DESC,
|
||||
.type = VID_TYPE_CAPTURE,
|
||||
.fops = &zr364xx_fops,
|
||||
.release = video_device_release,
|
||||
.minor = -1,
|
||||
|
||||
static const struct v4l2_ioctl_ops zr364xx_ioctl_ops = {
|
||||
.vidioc_querycap = zr364xx_vidioc_querycap,
|
||||
.vidioc_enum_fmt_vid_cap = zr364xx_vidioc_enum_fmt_vid_cap,
|
||||
.vidioc_try_fmt_vid_cap = zr364xx_vidioc_try_fmt_vid_cap,
|
||||
@ -785,6 +778,16 @@ static struct video_device zr364xx_template = {
|
||||
.vidioc_s_ctrl = zr364xx_vidioc_s_ctrl,
|
||||
};
|
||||
|
||||
static struct video_device zr364xx_template = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = DRIVER_DESC,
|
||||
.type = VID_TYPE_CAPTURE,
|
||||
.fops = &zr364xx_fops,
|
||||
.ioctl_ops = &zr364xx_ioctl_ops,
|
||||
.release = video_device_release,
|
||||
.minor = -1,
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*******************/
|
||||
|
@ -39,6 +39,8 @@
|
||||
#define VFL_TYPE_RADIO 2
|
||||
#define VFL_TYPE_VTX 3
|
||||
|
||||
struct v4l2_ioctl_callbacks;
|
||||
|
||||
/*
|
||||
* Newer version of video_device, handled by videodev2.c
|
||||
* This version moves redundant code from video device code to
|
||||
@ -72,225 +74,7 @@ struct video_device
|
||||
void (*release)(struct video_device *vfd);
|
||||
|
||||
/* ioctl callbacks */
|
||||
|
||||
/* VIDIOC_QUERYCAP handler */
|
||||
int (*vidioc_querycap)(struct file *file, void *fh, struct v4l2_capability *cap);
|
||||
|
||||
/* Priority handling */
|
||||
int (*vidioc_g_priority) (struct file *file, void *fh,
|
||||
enum v4l2_priority *p);
|
||||
int (*vidioc_s_priority) (struct file *file, void *fh,
|
||||
enum v4l2_priority p);
|
||||
|
||||
/* VIDIOC_ENUM_FMT handlers */
|
||||
int (*vidioc_enum_fmt_vid_cap) (struct file *file, void *fh,
|
||||
struct v4l2_fmtdesc *f);
|
||||
int (*vidioc_enum_fmt_vid_overlay) (struct file *file, void *fh,
|
||||
struct v4l2_fmtdesc *f);
|
||||
int (*vidioc_enum_fmt_vid_out) (struct file *file, void *fh,
|
||||
struct v4l2_fmtdesc *f);
|
||||
#if 1
|
||||
/* deprecated, will be removed in 2.6.28 */
|
||||
int (*vidioc_enum_fmt_vbi_cap) (struct file *file, void *fh,
|
||||
struct v4l2_fmtdesc *f);
|
||||
#endif
|
||||
int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh,
|
||||
struct v4l2_fmtdesc *f);
|
||||
|
||||
/* VIDIOC_G_FMT handlers */
|
||||
int (*vidioc_g_fmt_vid_cap) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_vid_overlay)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_vid_out) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_vid_out_overlay)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_vbi_cap) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_vbi_out) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_sliced_vbi_cap)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_sliced_vbi_out)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_type_private)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
|
||||
/* VIDIOC_S_FMT handlers */
|
||||
int (*vidioc_s_fmt_vid_cap) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_vid_overlay)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_vid_out) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_vid_out_overlay)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_vbi_cap) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_vbi_out) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_sliced_vbi_cap)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_sliced_vbi_out)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_type_private)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
|
||||
/* VIDIOC_TRY_FMT handlers */
|
||||
int (*vidioc_try_fmt_vid_cap) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_vid_overlay)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_vid_out) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_vid_out_overlay)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_vbi_cap) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_vbi_out) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_sliced_vbi_cap)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_sliced_vbi_out)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_type_private)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
|
||||
/* Buffer handlers */
|
||||
int (*vidioc_reqbufs) (struct file *file, void *fh, struct v4l2_requestbuffers *b);
|
||||
int (*vidioc_querybuf)(struct file *file, void *fh, struct v4l2_buffer *b);
|
||||
int (*vidioc_qbuf) (struct file *file, void *fh, struct v4l2_buffer *b);
|
||||
int (*vidioc_dqbuf) (struct file *file, void *fh, struct v4l2_buffer *b);
|
||||
|
||||
|
||||
int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i);
|
||||
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
||||
/* buffer type is struct vidio_mbuf * */
|
||||
int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p);
|
||||
#endif
|
||||
int (*vidioc_g_fbuf) (struct file *file, void *fh,
|
||||
struct v4l2_framebuffer *a);
|
||||
int (*vidioc_s_fbuf) (struct file *file, void *fh,
|
||||
struct v4l2_framebuffer *a);
|
||||
|
||||
/* Stream on/off */
|
||||
int (*vidioc_streamon) (struct file *file, void *fh, enum v4l2_buf_type i);
|
||||
int (*vidioc_streamoff)(struct file *file, void *fh, enum v4l2_buf_type i);
|
||||
|
||||
/* Standard handling
|
||||
ENUMSTD is handled by videodev.c
|
||||
*/
|
||||
int (*vidioc_g_std) (struct file *file, void *fh, v4l2_std_id *norm);
|
||||
int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id *norm);
|
||||
int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a);
|
||||
|
||||
/* Input handling */
|
||||
int (*vidioc_enum_input)(struct file *file, void *fh,
|
||||
struct v4l2_input *inp);
|
||||
int (*vidioc_g_input) (struct file *file, void *fh, unsigned int *i);
|
||||
int (*vidioc_s_input) (struct file *file, void *fh, unsigned int i);
|
||||
|
||||
/* Output handling */
|
||||
int (*vidioc_enum_output) (struct file *file, void *fh,
|
||||
struct v4l2_output *a);
|
||||
int (*vidioc_g_output) (struct file *file, void *fh, unsigned int *i);
|
||||
int (*vidioc_s_output) (struct file *file, void *fh, unsigned int i);
|
||||
|
||||
/* Control handling */
|
||||
int (*vidioc_queryctrl) (struct file *file, void *fh,
|
||||
struct v4l2_queryctrl *a);
|
||||
int (*vidioc_g_ctrl) (struct file *file, void *fh,
|
||||
struct v4l2_control *a);
|
||||
int (*vidioc_s_ctrl) (struct file *file, void *fh,
|
||||
struct v4l2_control *a);
|
||||
int (*vidioc_g_ext_ctrls) (struct file *file, void *fh,
|
||||
struct v4l2_ext_controls *a);
|
||||
int (*vidioc_s_ext_ctrls) (struct file *file, void *fh,
|
||||
struct v4l2_ext_controls *a);
|
||||
int (*vidioc_try_ext_ctrls) (struct file *file, void *fh,
|
||||
struct v4l2_ext_controls *a);
|
||||
int (*vidioc_querymenu) (struct file *file, void *fh,
|
||||
struct v4l2_querymenu *a);
|
||||
|
||||
/* Audio ioctls */
|
||||
int (*vidioc_enumaudio) (struct file *file, void *fh,
|
||||
struct v4l2_audio *a);
|
||||
int (*vidioc_g_audio) (struct file *file, void *fh,
|
||||
struct v4l2_audio *a);
|
||||
int (*vidioc_s_audio) (struct file *file, void *fh,
|
||||
struct v4l2_audio *a);
|
||||
|
||||
/* Audio out ioctls */
|
||||
int (*vidioc_enumaudout) (struct file *file, void *fh,
|
||||
struct v4l2_audioout *a);
|
||||
int (*vidioc_g_audout) (struct file *file, void *fh,
|
||||
struct v4l2_audioout *a);
|
||||
int (*vidioc_s_audout) (struct file *file, void *fh,
|
||||
struct v4l2_audioout *a);
|
||||
int (*vidioc_g_modulator) (struct file *file, void *fh,
|
||||
struct v4l2_modulator *a);
|
||||
int (*vidioc_s_modulator) (struct file *file, void *fh,
|
||||
struct v4l2_modulator *a);
|
||||
/* Crop ioctls */
|
||||
int (*vidioc_cropcap) (struct file *file, void *fh,
|
||||
struct v4l2_cropcap *a);
|
||||
int (*vidioc_g_crop) (struct file *file, void *fh,
|
||||
struct v4l2_crop *a);
|
||||
int (*vidioc_s_crop) (struct file *file, void *fh,
|
||||
struct v4l2_crop *a);
|
||||
/* Compression ioctls */
|
||||
int (*vidioc_g_jpegcomp) (struct file *file, void *fh,
|
||||
struct v4l2_jpegcompression *a);
|
||||
int (*vidioc_s_jpegcomp) (struct file *file, void *fh,
|
||||
struct v4l2_jpegcompression *a);
|
||||
int (*vidioc_g_enc_index) (struct file *file, void *fh,
|
||||
struct v4l2_enc_idx *a);
|
||||
int (*vidioc_encoder_cmd) (struct file *file, void *fh,
|
||||
struct v4l2_encoder_cmd *a);
|
||||
int (*vidioc_try_encoder_cmd) (struct file *file, void *fh,
|
||||
struct v4l2_encoder_cmd *a);
|
||||
|
||||
/* Stream type-dependent parameter ioctls */
|
||||
int (*vidioc_g_parm) (struct file *file, void *fh,
|
||||
struct v4l2_streamparm *a);
|
||||
int (*vidioc_s_parm) (struct file *file, void *fh,
|
||||
struct v4l2_streamparm *a);
|
||||
|
||||
/* Tuner ioctls */
|
||||
int (*vidioc_g_tuner) (struct file *file, void *fh,
|
||||
struct v4l2_tuner *a);
|
||||
int (*vidioc_s_tuner) (struct file *file, void *fh,
|
||||
struct v4l2_tuner *a);
|
||||
int (*vidioc_g_frequency) (struct file *file, void *fh,
|
||||
struct v4l2_frequency *a);
|
||||
int (*vidioc_s_frequency) (struct file *file, void *fh,
|
||||
struct v4l2_frequency *a);
|
||||
|
||||
/* Sliced VBI cap */
|
||||
int (*vidioc_g_sliced_vbi_cap) (struct file *file, void *fh,
|
||||
struct v4l2_sliced_vbi_cap *a);
|
||||
|
||||
/* 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
|
||||
int (*vidioc_g_register) (struct file *file, void *fh,
|
||||
struct v4l2_register *reg);
|
||||
int (*vidioc_s_register) (struct file *file, void *fh,
|
||||
struct v4l2_register *reg);
|
||||
#endif
|
||||
int (*vidioc_g_chip_ident) (struct file *file, void *fh,
|
||||
struct v4l2_chip_ident *chip);
|
||||
|
||||
/* For other private ioctls */
|
||||
int (*vidioc_default) (struct file *file, void *fh,
|
||||
int cmd, void *arg);
|
||||
|
||||
const struct v4l2_ioctl_ops *ioctl_ops;
|
||||
|
||||
#ifdef OBSOLETE_OWNER /* to be removed soon */
|
||||
/* obsolete -- fops->owner is used instead */
|
||||
|
@ -20,6 +20,229 @@
|
||||
#include <linux/videodev2.h>
|
||||
#endif
|
||||
|
||||
struct v4l2_ioctl_ops {
|
||||
/* ioctl callbacks */
|
||||
|
||||
/* VIDIOC_QUERYCAP handler */
|
||||
int (*vidioc_querycap)(struct file *file, void *fh, struct v4l2_capability *cap);
|
||||
|
||||
/* Priority handling */
|
||||
int (*vidioc_g_priority) (struct file *file, void *fh,
|
||||
enum v4l2_priority *p);
|
||||
int (*vidioc_s_priority) (struct file *file, void *fh,
|
||||
enum v4l2_priority p);
|
||||
|
||||
/* VIDIOC_ENUM_FMT handlers */
|
||||
int (*vidioc_enum_fmt_vid_cap) (struct file *file, void *fh,
|
||||
struct v4l2_fmtdesc *f);
|
||||
int (*vidioc_enum_fmt_vid_overlay) (struct file *file, void *fh,
|
||||
struct v4l2_fmtdesc *f);
|
||||
int (*vidioc_enum_fmt_vid_out) (struct file *file, void *fh,
|
||||
struct v4l2_fmtdesc *f);
|
||||
#if 1
|
||||
/* deprecated, will be removed in 2.6.28 */
|
||||
int (*vidioc_enum_fmt_vbi_cap) (struct file *file, void *fh,
|
||||
struct v4l2_fmtdesc *f);
|
||||
#endif
|
||||
int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh,
|
||||
struct v4l2_fmtdesc *f);
|
||||
|
||||
/* VIDIOC_G_FMT handlers */
|
||||
int (*vidioc_g_fmt_vid_cap) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_vid_overlay)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_vid_out) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_vid_out_overlay)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_vbi_cap) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_vbi_out) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_sliced_vbi_cap)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_sliced_vbi_out)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_g_fmt_type_private)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
|
||||
/* VIDIOC_S_FMT handlers */
|
||||
int (*vidioc_s_fmt_vid_cap) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_vid_overlay)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_vid_out) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_vid_out_overlay)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_vbi_cap) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_vbi_out) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_sliced_vbi_cap)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_sliced_vbi_out)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_s_fmt_type_private)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
|
||||
/* VIDIOC_TRY_FMT handlers */
|
||||
int (*vidioc_try_fmt_vid_cap) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_vid_overlay)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_vid_out) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_vid_out_overlay)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_vbi_cap) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_vbi_out) (struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_sliced_vbi_cap)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_sliced_vbi_out)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
int (*vidioc_try_fmt_type_private)(struct file *file, void *fh,
|
||||
struct v4l2_format *f);
|
||||
|
||||
/* Buffer handlers */
|
||||
int (*vidioc_reqbufs) (struct file *file, void *fh, struct v4l2_requestbuffers *b);
|
||||
int (*vidioc_querybuf)(struct file *file, void *fh, struct v4l2_buffer *b);
|
||||
int (*vidioc_qbuf) (struct file *file, void *fh, struct v4l2_buffer *b);
|
||||
int (*vidioc_dqbuf) (struct file *file, void *fh, struct v4l2_buffer *b);
|
||||
|
||||
|
||||
int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i);
|
||||
#ifdef CONFIG_VIDEO_V4L1_COMPAT
|
||||
/* buffer type is struct vidio_mbuf * */
|
||||
int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p);
|
||||
#endif
|
||||
int (*vidioc_g_fbuf) (struct file *file, void *fh,
|
||||
struct v4l2_framebuffer *a);
|
||||
int (*vidioc_s_fbuf) (struct file *file, void *fh,
|
||||
struct v4l2_framebuffer *a);
|
||||
|
||||
/* Stream on/off */
|
||||
int (*vidioc_streamon) (struct file *file, void *fh, enum v4l2_buf_type i);
|
||||
int (*vidioc_streamoff)(struct file *file, void *fh, enum v4l2_buf_type i);
|
||||
|
||||
/* Standard handling
|
||||
ENUMSTD is handled by videodev.c
|
||||
*/
|
||||
int (*vidioc_g_std) (struct file *file, void *fh, v4l2_std_id *norm);
|
||||
int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id *norm);
|
||||
int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a);
|
||||
|
||||
/* Input handling */
|
||||
int (*vidioc_enum_input)(struct file *file, void *fh,
|
||||
struct v4l2_input *inp);
|
||||
int (*vidioc_g_input) (struct file *file, void *fh, unsigned int *i);
|
||||
int (*vidioc_s_input) (struct file *file, void *fh, unsigned int i);
|
||||
|
||||
/* Output handling */
|
||||
int (*vidioc_enum_output) (struct file *file, void *fh,
|
||||
struct v4l2_output *a);
|
||||
int (*vidioc_g_output) (struct file *file, void *fh, unsigned int *i);
|
||||
int (*vidioc_s_output) (struct file *file, void *fh, unsigned int i);
|
||||
|
||||
/* Control handling */
|
||||
int (*vidioc_queryctrl) (struct file *file, void *fh,
|
||||
struct v4l2_queryctrl *a);
|
||||
int (*vidioc_g_ctrl) (struct file *file, void *fh,
|
||||
struct v4l2_control *a);
|
||||
int (*vidioc_s_ctrl) (struct file *file, void *fh,
|
||||
struct v4l2_control *a);
|
||||
int (*vidioc_g_ext_ctrls) (struct file *file, void *fh,
|
||||
struct v4l2_ext_controls *a);
|
||||
int (*vidioc_s_ext_ctrls) (struct file *file, void *fh,
|
||||
struct v4l2_ext_controls *a);
|
||||
int (*vidioc_try_ext_ctrls) (struct file *file, void *fh,
|
||||
struct v4l2_ext_controls *a);
|
||||
int (*vidioc_querymenu) (struct file *file, void *fh,
|
||||
struct v4l2_querymenu *a);
|
||||
|
||||
/* Audio ioctls */
|
||||
int (*vidioc_enumaudio) (struct file *file, void *fh,
|
||||
struct v4l2_audio *a);
|
||||
int (*vidioc_g_audio) (struct file *file, void *fh,
|
||||
struct v4l2_audio *a);
|
||||
int (*vidioc_s_audio) (struct file *file, void *fh,
|
||||
struct v4l2_audio *a);
|
||||
|
||||
/* Audio out ioctls */
|
||||
int (*vidioc_enumaudout) (struct file *file, void *fh,
|
||||
struct v4l2_audioout *a);
|
||||
int (*vidioc_g_audout) (struct file *file, void *fh,
|
||||
struct v4l2_audioout *a);
|
||||
int (*vidioc_s_audout) (struct file *file, void *fh,
|
||||
struct v4l2_audioout *a);
|
||||
int (*vidioc_g_modulator) (struct file *file, void *fh,
|
||||
struct v4l2_modulator *a);
|
||||
int (*vidioc_s_modulator) (struct file *file, void *fh,
|
||||
struct v4l2_modulator *a);
|
||||
/* Crop ioctls */
|
||||
int (*vidioc_cropcap) (struct file *file, void *fh,
|
||||
struct v4l2_cropcap *a);
|
||||
int (*vidioc_g_crop) (struct file *file, void *fh,
|
||||
struct v4l2_crop *a);
|
||||
int (*vidioc_s_crop) (struct file *file, void *fh,
|
||||
struct v4l2_crop *a);
|
||||
/* Compression ioctls */
|
||||
int (*vidioc_g_jpegcomp) (struct file *file, void *fh,
|
||||
struct v4l2_jpegcompression *a);
|
||||
int (*vidioc_s_jpegcomp) (struct file *file, void *fh,
|
||||
struct v4l2_jpegcompression *a);
|
||||
int (*vidioc_g_enc_index) (struct file *file, void *fh,
|
||||
struct v4l2_enc_idx *a);
|
||||
int (*vidioc_encoder_cmd) (struct file *file, void *fh,
|
||||
struct v4l2_encoder_cmd *a);
|
||||
int (*vidioc_try_encoder_cmd) (struct file *file, void *fh,
|
||||
struct v4l2_encoder_cmd *a);
|
||||
|
||||
/* Stream type-dependent parameter ioctls */
|
||||
int (*vidioc_g_parm) (struct file *file, void *fh,
|
||||
struct v4l2_streamparm *a);
|
||||
int (*vidioc_s_parm) (struct file *file, void *fh,
|
||||
struct v4l2_streamparm *a);
|
||||
|
||||
/* Tuner ioctls */
|
||||
int (*vidioc_g_tuner) (struct file *file, void *fh,
|
||||
struct v4l2_tuner *a);
|
||||
int (*vidioc_s_tuner) (struct file *file, void *fh,
|
||||
struct v4l2_tuner *a);
|
||||
int (*vidioc_g_frequency) (struct file *file, void *fh,
|
||||
struct v4l2_frequency *a);
|
||||
int (*vidioc_s_frequency) (struct file *file, void *fh,
|
||||
struct v4l2_frequency *a);
|
||||
|
||||
/* Sliced VBI cap */
|
||||
int (*vidioc_g_sliced_vbi_cap) (struct file *file, void *fh,
|
||||
struct v4l2_sliced_vbi_cap *a);
|
||||
|
||||
/* 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
|
||||
int (*vidioc_g_register) (struct file *file, void *fh,
|
||||
struct v4l2_register *reg);
|
||||
int (*vidioc_s_register) (struct file *file, void *fh,
|
||||
struct v4l2_register *reg);
|
||||
#endif
|
||||
int (*vidioc_g_chip_ident) (struct file *file, void *fh,
|
||||
struct v4l2_chip_ident *chip);
|
||||
|
||||
/* For other private ioctls */
|
||||
int (*vidioc_default) (struct file *file, void *fh,
|
||||
int cmd, void *arg);
|
||||
};
|
||||
|
||||
|
||||
/* v4l debugging and diagnostics */
|
||||
|
||||
/* Debug bitmask flags to be used on V4L2 */
|
||||
|
Loading…
Reference in New Issue
Block a user