summaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/wl128x
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-01-05 08:52:12 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-01-24 18:54:14 -0200
commitce4a3d52888a95473914bd54bcf6c566014fc03e (patch)
tree7f25c33cc3ec3b76886f021dfefe9a5ddabe1624 /drivers/media/radio/wl128x
parent68d6f84ba0c47e658beff3a4bf0c43acee4b4690 (diff)
downloadblackbird-obmc-linux-ce4a3d52888a95473914bd54bcf6c566014fc03e.tar.gz
blackbird-obmc-linux-ce4a3d52888a95473914bd54bcf6c566014fc03e.zip
[media] radio: set vfl_dir correctly to fix modulator regression
The vfl_dir field should be set to indicate whether a device can receive data, output data or can do both. This is used to let the v4l core know which ioctls should be accepted and which can be refused. Unfortunately, when this field was added the radio modulator drivers were not updated: radio modulators transmit and so vfl_dir should be set to VFL_DIR_TX (or VFL_DIR_M2M in the special case of wl128x). Because of this omission it is not possible to call g/s_modulator for these drivers, which effectively renders them useless. This patch sets the correct vfl_dir value for these drivers, correcting this bug. Thanks to Paul Grinberg for bringing this to my attention. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio/wl128x')
-rw-r--r--drivers/media/radio/wl128x/fmdrv_v4l2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/radio/wl128x/fmdrv_v4l2.c b/drivers/media/radio/wl128x/fmdrv_v4l2.c
index 048de4536036..0a8ee8fab924 100644
--- a/drivers/media/radio/wl128x/fmdrv_v4l2.c
+++ b/drivers/media/radio/wl128x/fmdrv_v4l2.c
@@ -518,6 +518,16 @@ static struct video_device fm_viddev_template = {
.ioctl_ops = &fm_drv_ioctl_ops,
.name = FM_DRV_NAME,
.release = video_device_release,
+ /*
+ * To ensure both the tuner and modulator ioctls are accessible we
+ * set the vfl_dir to M2M to indicate this.
+ *
+ * It is not really a mem2mem device of course, but it can both receive
+ * and transmit using the same radio device. It's the only radio driver
+ * that does this and it should really be split in two radio devices,
+ * but that would affect applications using this driver.
+ */
+ .vfl_dir = VFL_DIR_M2M,
};
int fm_v4l2_init_video_device(struct fmdev *fmdev, int radio_nr)
OpenPOWER on IntegriCloud