aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/em28xx/em28xx-video.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-09-07 07:45:10 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-01-04 21:57:50 -0500
commit1d179eeedc8cb48712bc236ec82ec6c63af42008 (patch)
treef072c8ba07d2a8126ada878de8fe5e46e091ad23 /drivers/media/usb/em28xx/em28xx-video.c
parentd8c95c08ef1127c8777dc3a1177143cf8a5b86ef (diff)
[media] em28xx: remove sliced VBI support
The sliced VBI support in the tvp5150 is completely broken. And there is no support for the saa7115 sliced VBI implementation in the em28xx driver. So we remove the sliced VBI support completely. It should be possible to get it to work with the tvp5150, but that will require someone to really dig into that driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-video.c')
-rw-r--r--drivers/media/usb/em28xx/em28xx-video.c49
1 files changed, 2 insertions, 47 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
index 7000e22e11a8..971046861f7f 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -1438,8 +1438,7 @@ static int vidioc_querycap(struct file *file, void *priv,
1438 else if (vdev->vfl_type == VFL_TYPE_RADIO) 1438 else if (vdev->vfl_type == VFL_TYPE_RADIO)
1439 cap->device_caps = V4L2_CAP_RADIO; 1439 cap->device_caps = V4L2_CAP_RADIO;
1440 else 1440 else
1441 cap->device_caps = V4L2_CAP_READWRITE | 1441 cap->device_caps = V4L2_CAP_READWRITE | V4L2_CAP_VBI_CAPTURE;
1442 V4L2_CAP_VBI_CAPTURE | V4L2_CAP_SLICED_VBI_CAPTURE;
1443 1442
1444 if (dev->audio_mode.has_audio) 1443 if (dev->audio_mode.has_audio)
1445 cap->device_caps |= V4L2_CAP_AUDIO; 1444 cap->device_caps |= V4L2_CAP_AUDIO;
@@ -1450,8 +1449,7 @@ static int vidioc_querycap(struct file *file, void *priv,
1450 cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS | 1449 cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS |
1451 V4L2_CAP_READWRITE | V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; 1450 V4L2_CAP_READWRITE | V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
1452 if (dev->vbi_dev) 1451 if (dev->vbi_dev)
1453 cap->capabilities |= 1452 cap->capabilities |= V4L2_CAP_VBI_CAPTURE;
1454 V4L2_CAP_VBI_CAPTURE | V4L2_CAP_SLICED_VBI_CAPTURE;
1455 if (dev->radio_dev) 1453 if (dev->radio_dev)
1456 cap->capabilities |= V4L2_CAP_RADIO; 1454 cap->capabilities |= V4L2_CAP_RADIO;
1457 return 0; 1455 return 0;
@@ -1508,46 +1506,6 @@ static int vidioc_enum_framesizes(struct file *file, void *priv,
1508 return 0; 1506 return 0;
1509} 1507}
1510 1508
1511/* Sliced VBI ioctls */
1512static int vidioc_g_fmt_sliced_vbi_cap(struct file *file, void *priv,
1513 struct v4l2_format *f)
1514{
1515 struct em28xx_fh *fh = priv;
1516 struct em28xx *dev = fh->dev;
1517 int rc;
1518
1519 rc = check_dev(dev);
1520 if (rc < 0)
1521 return rc;
1522
1523 f->fmt.sliced.service_set = 0;
1524 v4l2_device_call_all(&dev->v4l2_dev, 0, vbi, g_sliced_fmt, &f->fmt.sliced);
1525
1526 if (f->fmt.sliced.service_set == 0)
1527 rc = -EINVAL;
1528
1529 return rc;
1530}
1531
1532static int vidioc_try_set_sliced_vbi_cap(struct file *file, void *priv,
1533 struct v4l2_format *f)
1534{
1535 struct em28xx_fh *fh = priv;
1536 struct em28xx *dev = fh->dev;
1537 int rc;
1538
1539 rc = check_dev(dev);
1540 if (rc < 0)
1541 return rc;
1542
1543 v4l2_device_call_all(&dev->v4l2_dev, 0, vbi, g_sliced_fmt, &f->fmt.sliced);
1544
1545 if (f->fmt.sliced.service_set == 0)
1546 return -EINVAL;
1547
1548 return 0;
1549}
1550
1551/* RAW VBI ioctls */ 1509/* RAW VBI ioctls */
1552 1510
1553static int vidioc_g_fmt_vbi_cap(struct file *file, void *priv, 1511static int vidioc_g_fmt_vbi_cap(struct file *file, void *priv,
@@ -2038,9 +1996,6 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
2038 .vidioc_g_audio = vidioc_g_audio, 1996 .vidioc_g_audio = vidioc_g_audio,
2039 .vidioc_s_audio = vidioc_s_audio, 1997 .vidioc_s_audio = vidioc_s_audio,
2040 .vidioc_cropcap = vidioc_cropcap, 1998 .vidioc_cropcap = vidioc_cropcap,
2041 .vidioc_g_fmt_sliced_vbi_cap = vidioc_g_fmt_sliced_vbi_cap,
2042 .vidioc_try_fmt_sliced_vbi_cap = vidioc_try_set_sliced_vbi_cap,
2043 .vidioc_s_fmt_sliced_vbi_cap = vidioc_try_set_sliced_vbi_cap,
2044 1999
2045 .vidioc_reqbufs = vidioc_reqbufs, 2000 .vidioc_reqbufs = vidioc_reqbufs,
2046 .vidioc_querybuf = vidioc_querybuf, 2001 .vidioc_querybuf = vidioc_querybuf,