diff options
author | Devin Heitmueller <dheitmueller@linuxtv.org> | 2009-03-11 02:00:55 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:26 -0400 |
commit | 5a5a4e16fa19fa3789398e8c707168b7da718b64 (patch) | |
tree | c8a00d52701dd8bb19ff15e64e156bd6e4912e87 | |
parent | 0ef21071d985cb9e33238210760810c71e100b20 (diff) |
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: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/au0828/au0828-video.c | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c index 7f6f9d998aa9..0dd138370b62 100644 --- a/drivers/media/video/au0828/au0828-video.c +++ b/drivers/media/video/au0828/au0828-video.c | |||
@@ -701,8 +701,10 @@ void au0828_analog_unregister(struct au0828_dev *dev) | |||
701 | mutex_lock(&au0828_sysfs_lock); | 701 | mutex_lock(&au0828_sysfs_lock); |
702 | 702 | ||
703 | list_del(&dev->au0828list); | 703 | list_del(&dev->au0828list); |
704 | video_unregister_device(dev->vdev); | 704 | if (dev->vdev) |
705 | video_unregister_device(dev->vbi_dev); | 705 | video_unregister_device(dev->vdev); |
706 | if (dev->vbi_dev) | ||
707 | video_unregister_device(dev->vbi_dev); | ||
706 | 708 | ||
707 | mutex_unlock(&au0828_sysfs_lock); | 709 | mutex_unlock(&au0828_sysfs_lock); |
708 | } | 710 | } |
@@ -754,10 +756,12 @@ static int au0828_v4l2_open(struct file *filp) | |||
754 | dev = h; | 756 | dev = h; |
755 | type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | 757 | type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
756 | } | 758 | } |
759 | #ifdef VBI_NOT_YET_WORKING | ||
757 | if(h->vbi_dev->minor == minor) { | 760 | if(h->vbi_dev->minor == minor) { |
758 | dev = h; | 761 | dev = h; |
759 | type = V4L2_BUF_TYPE_VBI_CAPTURE; | 762 | type = V4L2_BUF_TYPE_VBI_CAPTURE; |
760 | } | 763 | } |
764 | #endif | ||
761 | } | 765 | } |
762 | 766 | ||
763 | if(NULL == dev) | 767 | if(NULL == dev) |
@@ -931,6 +935,7 @@ static int au0828_set_format(struct au0828_dev *dev, unsigned int cmd, | |||
931 | maxwidth = 720; | 935 | maxwidth = 720; |
932 | maxheight = 480; | 936 | maxheight = 480; |
933 | 937 | ||
938 | #ifdef VBI_NOT_YET_WORKING | ||
934 | if(format->type == V4L2_BUF_TYPE_SLICED_VBI_CAPTURE) { | 939 | if(format->type == V4L2_BUF_TYPE_SLICED_VBI_CAPTURE) { |
935 | dprintk(1, "VBI format set: to be supported!\n"); | 940 | dprintk(1, "VBI format set: to be supported!\n"); |
936 | return 0; | 941 | return 0; |
@@ -938,6 +943,7 @@ static int au0828_set_format(struct au0828_dev *dev, unsigned int cmd, | |||
938 | if(format->type == V4L2_BUF_TYPE_VBI_CAPTURE) { | 943 | if(format->type == V4L2_BUF_TYPE_VBI_CAPTURE) { |
939 | return 0; | 944 | return 0; |
940 | } | 945 | } |
946 | #endif | ||
941 | if(format->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { | 947 | if(format->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { |
942 | return -EINVAL; | 948 | return -EINVAL; |
943 | } | 949 | } |
@@ -1019,8 +1025,10 @@ static int vidioc_querycap(struct file *file, void *priv, | |||
1019 | cap->version = AU0828_VERSION_CODE; | 1025 | cap->version = AU0828_VERSION_CODE; |
1020 | 1026 | ||
1021 | /*set the device capabilities */ | 1027 | /*set the device capabilities */ |
1022 | cap->capabilities = V4L2_CAP_VBI_CAPTURE | | 1028 | cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | |
1023 | V4L2_CAP_VIDEO_CAPTURE | | 1029 | #ifdef VBI_NOT_YET_WORKING |
1030 | V4L2_CAP_VBI_CAPTURE | | ||
1031 | #endif | ||
1024 | V4L2_CAP_AUDIO | | 1032 | V4L2_CAP_AUDIO | |
1025 | V4L2_CAP_READWRITE | | 1033 | V4L2_CAP_READWRITE | |
1026 | V4L2_CAP_STREAMING | | 1034 | V4L2_CAP_STREAMING | |
@@ -1551,10 +1559,15 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = { | |||
1551 | .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap, | 1559 | .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap, |
1552 | .vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap, | 1560 | .vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap, |
1553 | .vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap, | 1561 | .vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap, |
1562 | #ifdef VBI_NOT_YET_WORKING | ||
1563 | .vidioc_g_fmt_vbi_cap = vidioc_g_fmt_vbi_cap, | ||
1564 | .vidioc_try_fmt_vbi_cap = vidioc_s_fmt_vbi_cap, | ||
1565 | .vidioc_s_fmt_vbi_cap = vidioc_s_fmt_vbi_cap, | ||
1566 | #endif | ||
1554 | .vidioc_g_audio = vidioc_g_audio, | 1567 | .vidioc_g_audio = vidioc_g_audio, |
1555 | .vidioc_s_audio = vidioc_s_audio, | 1568 | .vidioc_s_audio = vidioc_s_audio, |
1556 | .vidioc_cropcap = vidioc_cropcap, | 1569 | .vidioc_cropcap = vidioc_cropcap, |
1557 | #ifdef AAA | 1570 | #ifdef VBI_NOT_YET_WORKING |
1558 | .vidioc_g_fmt_sliced_vbi_cap = vidioc_g_fmt_sliced_vbi_cap, | 1571 | .vidioc_g_fmt_sliced_vbi_cap = vidioc_g_fmt_sliced_vbi_cap, |
1559 | .vidioc_try_fmt_sliced_vbi_cap = vidioc_try_set_sliced_vbi_cap, | 1572 | .vidioc_try_fmt_sliced_vbi_cap = vidioc_try_set_sliced_vbi_cap, |
1560 | .vidioc_s_fmt_sliced_vbi_cap = vidioc_try_set_sliced_vbi_cap, | 1573 | .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 | return -ENOMEM; | 1637 | return -ENOMEM; |
1625 | } | 1638 | } |
1626 | 1639 | ||
1640 | #ifdef VBI_NOT_YET_WORKING | ||
1627 | dev->vbi_dev = video_device_alloc(); | 1641 | dev->vbi_dev = video_device_alloc(); |
1628 | if(NULL == dev->vbi_dev) { | 1642 | if(NULL == dev->vbi_dev) { |
1629 | dprintk(1, "Can't allocate vbi_device.\n"); | 1643 | dprintk(1, "Can't allocate vbi_device.\n"); |
1630 | kfree(dev->vdev); | 1644 | kfree(dev->vdev); |
1631 | return -ENOMEM; | 1645 | return -ENOMEM; |
1632 | } | 1646 | } |
1647 | #endif | ||
1633 | 1648 | ||
1634 | /* Fill the video capture device struct */ | 1649 | /* Fill the video capture device struct */ |
1635 | *dev->vdev = au0828_video_template; | 1650 | *dev->vdev = au0828_video_template; |
@@ -1637,11 +1652,13 @@ int au0828_analog_register(struct au0828_dev *dev) | |||
1637 | dev->vdev->parent = &dev->usbdev->dev; | 1652 | dev->vdev->parent = &dev->usbdev->dev; |
1638 | strcpy(dev->vdev->name, "au0828a video"); | 1653 | strcpy(dev->vdev->name, "au0828a video"); |
1639 | 1654 | ||
1655 | #ifdef VBI_NOT_YET_WORKING | ||
1640 | /* Setup the VBI device */ | 1656 | /* Setup the VBI device */ |
1641 | *dev->vbi_dev = au0828_video_template; | 1657 | *dev->vbi_dev = au0828_video_template; |
1642 | dev->vbi_dev->vfl_type = VFL_TYPE_VBI; | 1658 | dev->vbi_dev->vfl_type = VFL_TYPE_VBI; |
1643 | dev->vbi_dev->parent = &dev->usbdev->dev; | 1659 | dev->vbi_dev->parent = &dev->usbdev->dev; |
1644 | strcpy(dev->vbi_dev->name, "au0828a vbi"); | 1660 | strcpy(dev->vbi_dev->name, "au0828a vbi"); |
1661 | #endif | ||
1645 | 1662 | ||
1646 | list_add_tail(&dev->au0828list, &au0828_devlist); | 1663 | list_add_tail(&dev->au0828list, &au0828_devlist); |
1647 | 1664 | ||
@@ -1653,6 +1670,7 @@ int au0828_analog_register(struct au0828_dev *dev) | |||
1653 | return -ENODEV; | 1670 | return -ENODEV; |
1654 | } | 1671 | } |
1655 | 1672 | ||
1673 | #ifdef VBI_NOT_YET_WORKING | ||
1656 | /* Register the vbi device */ | 1674 | /* Register the vbi device */ |
1657 | if((retval = video_register_device(dev->vbi_dev, VFL_TYPE_VBI, -1)) != 0) { | 1675 | if((retval = video_register_device(dev->vbi_dev, VFL_TYPE_VBI, -1)) != 0) { |
1658 | dprintk(1, "unable to register vbi device (error = %d).\n", retval); | 1676 | dprintk(1, "unable to register vbi device (error = %d).\n", retval); |
@@ -1661,6 +1679,7 @@ int au0828_analog_register(struct au0828_dev *dev) | |||
1661 | video_device_release(dev->vdev); | 1679 | video_device_release(dev->vdev); |
1662 | return -ENODEV; | 1680 | return -ENODEV; |
1663 | } | 1681 | } |
1682 | #endif | ||
1664 | 1683 | ||
1665 | dprintk(1, "%s completed!\n", __FUNCTION__); | 1684 | dprintk(1, "%s completed!\n", __FUNCTION__); |
1666 | 1685 | ||