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");
struct em28xx_fh *fh = priv;
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)
v4l2_disable_ioctl(dev->vdev, VIDIOC_G_FREQUENCY);
v4l2_disable_ioctl(dev->vdev, VIDIOC_S_FREQUENCY);
}
+ if (!dev->audio_mode.has_audio) {
+ v4l2_disable_ioctl(dev->vdev, VIDIOC_G_AUDIO);
+ v4l2_disable_ioctl(dev->vdev, VIDIOC_S_AUDIO);
+ }
/* register v4l2 video video_device */
ret = video_register_device(dev->vdev, VFL_TYPE_GRABBER,
v4l2_disable_ioctl(dev->vbi_dev, VIDIOC_G_FREQUENCY);
v4l2_disable_ioctl(dev->vbi_dev, VIDIOC_S_FREQUENCY);
}
+ if (!dev->audio_mode.has_audio) {
+ v4l2_disable_ioctl(dev->vbi_dev, VIDIOC_G_AUDIO);
+ v4l2_disable_ioctl(dev->vbi_dev, VIDIOC_S_AUDIO);
+ }
/* register v4l2 vbi video_device */
ret = video_register_device(dev->vbi_dev, VFL_TYPE_VBI,