summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2009-09-10 23:08:44 -0400
committerDevin Heitmueller <dheitmueller@kernellabs.com>2009-09-10 23:08:44 -0400
commit60e9021e45939ad296d3688928ddca19e0ebe65d (patch)
tree6466814c0c110815ae409a1454d3758f39883f7c
parent833b98d6daa6dfc535249b87dbc021704cdf08e4 (diff)
downloadmediapointer-dvb-s2-60e9021e45939ad296d3688928ddca19e0ebe65d.tar.gz
mediapointer-dvb-s2-60e9021e45939ad296d3688928ddca19e0ebe65d.tar.bz2
em28xx: only advertise VBI capability if supported
From: Devin Heitmueller <dheitmueller@kernellabs.com> Change the code so we only claim to support VBI if the underlying chipset actually has the support. This work was sponsored by EyeMagnet Limited. Priority: normal Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c
index 920712ae6..a4f09dff3 100644
--- a/linux/drivers/media/video/em28xx/em28xx-video.c
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c
@@ -1794,11 +1794,13 @@ static int vidioc_querycap(struct file *file, void *priv,
cap->version = EM28XX_VERSION_CODE;
cap->capabilities =
- V4L2_CAP_VBI_CAPTURE |
V4L2_CAP_SLICED_VBI_CAPTURE |
V4L2_CAP_VIDEO_CAPTURE |
V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
+ if (dev->vbi_dev)
+ cap->capabilities |= V4L2_CAP_VBI_CAPTURE;
+
if (dev->audio_mode.has_audio)
cap->capabilities |= V4L2_CAP_AUDIO;