Commit 5a5a4e16 authored by Devin Heitmueller's avatar Devin Heitmueller Committed by Mauro Carvalho Chehab

V4L/DVB (11073): au0828: disable VBI code since it doesn't yet work

Since the VBI support is not yet working for the au0828, don't advertise the
capability or create the /dev/vbi device.
Signed-off-by: default avatarDevin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 0ef21071
...@@ -701,8 +701,10 @@ void au0828_analog_unregister(struct au0828_dev *dev) ...@@ -701,8 +701,10 @@ void au0828_analog_unregister(struct au0828_dev *dev)
mutex_lock(&au0828_sysfs_lock); mutex_lock(&au0828_sysfs_lock);
list_del(&dev->au0828list); list_del(&dev->au0828list);
video_unregister_device(dev->vdev); if (dev->vdev)
video_unregister_device(dev->vbi_dev); video_unregister_device(dev->vdev);
if (dev->vbi_dev)
video_unregister_device(dev->vbi_dev);
mutex_unlock(&au0828_sysfs_lock); mutex_unlock(&au0828_sysfs_lock);
} }
...@@ -754,10 +756,12 @@ static int au0828_v4l2_open(struct file *filp) ...@@ -754,10 +756,12 @@ static int au0828_v4l2_open(struct file *filp)
dev = h; dev = h;
type = V4L2_BUF_TYPE_VIDEO_CAPTURE; type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
} }
#ifdef VBI_NOT_YET_WORKING
if(h->vbi_dev->minor == minor) { if(h->vbi_dev->minor == minor) {
dev = h; dev = h;
type = V4L2_BUF_TYPE_VBI_CAPTURE; type = V4L2_BUF_TYPE_VBI_CAPTURE;
} }
#endif
} }
if(NULL == dev) if(NULL == dev)
...@@ -931,6 +935,7 @@ static int au0828_set_format(struct au0828_dev *dev, unsigned int cmd, ...@@ -931,6 +935,7 @@ static int au0828_set_format(struct au0828_dev *dev, unsigned int cmd,
maxwidth = 720; maxwidth = 720;
maxheight = 480; maxheight = 480;
#ifdef VBI_NOT_YET_WORKING
if(format->type == V4L2_BUF_TYPE_SLICED_VBI_CAPTURE) { if(format->type == V4L2_BUF_TYPE_SLICED_VBI_CAPTURE) {
dprintk(1, "VBI format set: to be supported!\n"); dprintk(1, "VBI format set: to be supported!\n");
return 0; return 0;
...@@ -938,6 +943,7 @@ static int au0828_set_format(struct au0828_dev *dev, unsigned int cmd, ...@@ -938,6 +943,7 @@ static int au0828_set_format(struct au0828_dev *dev, unsigned int cmd,
if(format->type == V4L2_BUF_TYPE_VBI_CAPTURE) { if(format->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
return 0; return 0;
} }
#endif
if(format->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { if(format->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) {
return -EINVAL; return -EINVAL;
} }
...@@ -1019,8 +1025,10 @@ static int vidioc_querycap(struct file *file, void *priv, ...@@ -1019,8 +1025,10 @@ static int vidioc_querycap(struct file *file, void *priv,
cap->version = AU0828_VERSION_CODE; cap->version = AU0828_VERSION_CODE;
/*set the device capabilities */ /*set the device capabilities */
cap->capabilities = V4L2_CAP_VBI_CAPTURE | cap->capabilities = V4L2_CAP_VIDEO_CAPTURE |
V4L2_CAP_VIDEO_CAPTURE | #ifdef VBI_NOT_YET_WORKING
V4L2_CAP_VBI_CAPTURE |
#endif
V4L2_CAP_AUDIO | V4L2_CAP_AUDIO |
V4L2_CAP_READWRITE | V4L2_CAP_READWRITE |
V4L2_CAP_STREAMING | V4L2_CAP_STREAMING |
...@@ -1551,10 +1559,15 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = { ...@@ -1551,10 +1559,15 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
.vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap, .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
.vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap, .vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap,
.vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap, .vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap,
#ifdef VBI_NOT_YET_WORKING
.vidioc_g_fmt_vbi_cap = vidioc_g_fmt_vbi_cap,
.vidioc_try_fmt_vbi_cap = vidioc_s_fmt_vbi_cap,
.vidioc_s_fmt_vbi_cap = vidioc_s_fmt_vbi_cap,
#endif
.vidioc_g_audio = vidioc_g_audio, .vidioc_g_audio = vidioc_g_audio,
.vidioc_s_audio = vidioc_s_audio, .vidioc_s_audio = vidioc_s_audio,
.vidioc_cropcap = vidioc_cropcap, .vidioc_cropcap = vidioc_cropcap,
#ifdef AAA #ifdef VBI_NOT_YET_WORKING
.vidioc_g_fmt_sliced_vbi_cap = vidioc_g_fmt_sliced_vbi_cap, .vidioc_g_fmt_sliced_vbi_cap = vidioc_g_fmt_sliced_vbi_cap,
.vidioc_try_fmt_sliced_vbi_cap = vidioc_try_set_sliced_vbi_cap, .vidioc_try_fmt_sliced_vbi_cap = vidioc_try_set_sliced_vbi_cap,
.vidioc_s_fmt_sliced_vbi_cap = vidioc_try_set_sliced_vbi_cap, .vidioc_s_fmt_sliced_vbi_cap = vidioc_try_set_sliced_vbi_cap,
...@@ -1624,12 +1637,14 @@ int au0828_analog_register(struct au0828_dev *dev) ...@@ -1624,12 +1637,14 @@ int au0828_analog_register(struct au0828_dev *dev)
return -ENOMEM; return -ENOMEM;
} }
#ifdef VBI_NOT_YET_WORKING
dev->vbi_dev = video_device_alloc(); dev->vbi_dev = video_device_alloc();
if(NULL == dev->vbi_dev) { if(NULL == dev->vbi_dev) {
dprintk(1, "Can't allocate vbi_device.\n"); dprintk(1, "Can't allocate vbi_device.\n");
kfree(dev->vdev); kfree(dev->vdev);
return -ENOMEM; return -ENOMEM;
} }
#endif
/* Fill the video capture device struct */ /* Fill the video capture device struct */
*dev->vdev = au0828_video_template; *dev->vdev = au0828_video_template;
...@@ -1637,11 +1652,13 @@ int au0828_analog_register(struct au0828_dev *dev) ...@@ -1637,11 +1652,13 @@ int au0828_analog_register(struct au0828_dev *dev)
dev->vdev->parent = &dev->usbdev->dev; dev->vdev->parent = &dev->usbdev->dev;
strcpy(dev->vdev->name, "au0828a video"); strcpy(dev->vdev->name, "au0828a video");
#ifdef VBI_NOT_YET_WORKING
/* Setup the VBI device */ /* Setup the VBI device */
*dev->vbi_dev = au0828_video_template; *dev->vbi_dev = au0828_video_template;
dev->vbi_dev->vfl_type = VFL_TYPE_VBI; dev->vbi_dev->vfl_type = VFL_TYPE_VBI;
dev->vbi_dev->parent = &dev->usbdev->dev; dev->vbi_dev->parent = &dev->usbdev->dev;
strcpy(dev->vbi_dev->name, "au0828a vbi"); strcpy(dev->vbi_dev->name, "au0828a vbi");
#endif
list_add_tail(&dev->au0828list, &au0828_devlist); list_add_tail(&dev->au0828list, &au0828_devlist);
...@@ -1653,6 +1670,7 @@ int au0828_analog_register(struct au0828_dev *dev) ...@@ -1653,6 +1670,7 @@ int au0828_analog_register(struct au0828_dev *dev)
return -ENODEV; return -ENODEV;
} }
#ifdef VBI_NOT_YET_WORKING
/* Register the vbi device */ /* Register the vbi device */
if((retval = video_register_device(dev->vbi_dev, VFL_TYPE_VBI, -1)) != 0) { if((retval = video_register_device(dev->vbi_dev, VFL_TYPE_VBI, -1)) != 0) {
dprintk(1, "unable to register vbi device (error = %d).\n", retval); dprintk(1, "unable to register vbi device (error = %d).\n", retval);
...@@ -1661,6 +1679,7 @@ int au0828_analog_register(struct au0828_dev *dev) ...@@ -1661,6 +1679,7 @@ int au0828_analog_register(struct au0828_dev *dev)
video_device_release(dev->vdev); video_device_release(dev->vdev);
return -ENODEV; return -ENODEV;
} }
#endif
dprintk(1, "%s completed!\n", __FUNCTION__); dprintk(1, "%s completed!\n", __FUNCTION__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment