aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-01-30 03:54:33 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-05 15:13:27 -0500
commitf7c096f73561ba9754d4b13a6dc38e964194d784 (patch)
tree3dd560993d1b402b5298b979f1cd52149ac02e05 /drivers
parent7f51a6108382dcbf2d5e9a268e86255d72318737 (diff)
[media] radio-miropcm20: add prio and control event support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/radio/radio-miropcm20.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-miropcm20.c b/drivers/media/radio/radio-miropcm20.c
index 061ebcf4876d..4ac813c5af17 100644
--- a/drivers/media/radio/radio-miropcm20.c
+++ b/drivers/media/radio/radio-miropcm20.c
@@ -18,6 +18,8 @@
18#include <media/v4l2-device.h> 18#include <media/v4l2-device.h>
19#include <media/v4l2-ioctl.h> 19#include <media/v4l2-ioctl.h>
20#include <media/v4l2-ctrls.h> 20#include <media/v4l2-ctrls.h>
21#include <media/v4l2-fh.h>
22#include <media/v4l2-event.h>
21#include <sound/aci.h> 23#include <sound/aci.h>
22 24
23static int radio_nr = -1; 25static int radio_nr = -1;
@@ -75,6 +77,9 @@ static int pcm20_setfreq(struct pcm20 *dev, unsigned long freq)
75 77
76static const struct v4l2_file_operations pcm20_fops = { 78static const struct v4l2_file_operations pcm20_fops = {
77 .owner = THIS_MODULE, 79 .owner = THIS_MODULE,
80 .open = v4l2_fh_open,
81 .poll = v4l2_ctrl_poll,
82 .release = v4l2_fh_release,
78 .unlocked_ioctl = video_ioctl2, 83 .unlocked_ioctl = video_ioctl2,
79}; 84};
80 85
@@ -158,6 +163,9 @@ static const struct v4l2_ioctl_ops pcm20_ioctl_ops = {
158 .vidioc_s_tuner = vidioc_s_tuner, 163 .vidioc_s_tuner = vidioc_s_tuner,
159 .vidioc_g_frequency = vidioc_g_frequency, 164 .vidioc_g_frequency = vidioc_g_frequency,
160 .vidioc_s_frequency = vidioc_s_frequency, 165 .vidioc_s_frequency = vidioc_s_frequency,
166 .vidioc_log_status = v4l2_ctrl_log_status,
167 .vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
168 .vidioc_unsubscribe_event = v4l2_event_unsubscribe,
161}; 169};
162 170
163static const struct v4l2_ctrl_ops pcm20_ctrl_ops = { 171static const struct v4l2_ctrl_ops pcm20_ctrl_ops = {
@@ -202,6 +210,7 @@ static int __init pcm20_init(void)
202 dev->vdev.ioctl_ops = &pcm20_ioctl_ops; 210 dev->vdev.ioctl_ops = &pcm20_ioctl_ops;
203 dev->vdev.release = video_device_release_empty; 211 dev->vdev.release = video_device_release_empty;
204 dev->vdev.lock = &dev->lock; 212 dev->vdev.lock = &dev->lock;
213 set_bit(V4L2_FL_USE_FH_PRIO, &dev->vdev.flags);
205 video_set_drvdata(&dev->vdev, dev); 214 video_set_drvdata(&dev->vdev, dev);
206 215
207 if (video_register_device(&dev->vdev, VFL_TYPE_RADIO, radio_nr) < 0) 216 if (video_register_device(&dev->vdev, VFL_TYPE_RADIO, radio_nr) < 0)