Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161500
b: refs/heads/master
c: 6c428b5
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Sep 12, 2009
1 parent e9b3c35 commit 3c34f55
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 00c1e2167e3163d2e193644b7d768f06d2a8c279
refs/heads/master: 6c428b578b15a1dbf40832d3aeed43761940b81f
10 changes: 9 additions & 1 deletion trunk/drivers/media/video/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,9 @@ static int vidioc_g_audio(struct file *file, void *priv, struct v4l2_audio *a)
struct em28xx_fh *fh = priv;
struct em28xx *dev = fh->dev;

if (!dev->audio_mode.has_audio)
return -EINVAL;

switch (a->index) {
case EM28XX_AMUX_VIDEO:
strcpy(a->name, "Television");
Expand Down Expand Up @@ -1046,6 +1049,9 @@ static int vidioc_s_audio(struct file *file, void *priv, struct v4l2_audio *a)
struct em28xx *dev = fh->dev;


if (!dev->audio_mode.has_audio)
return -EINVAL;

if (a->index >= MAX_EM28XX_INPUT)
return -EINVAL;
if (0 == INPUT(a->index)->type)
Expand Down Expand Up @@ -1464,9 +1470,11 @@ static int vidioc_querycap(struct file *file, void *priv,
cap->capabilities =
V4L2_CAP_SLICED_VBI_CAPTURE |
V4L2_CAP_VIDEO_CAPTURE |
V4L2_CAP_AUDIO |
V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;

if (dev->audio_mode.has_audio)
cap->capabilities |= V4L2_CAP_AUDIO;

if (dev->tuner_type != TUNER_ABSENT)
cap->capabilities |= V4L2_CAP_TUNER;

Expand Down

0 comments on commit 3c34f55

Please sign in to comment.