aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2010-08-17 13:29:51 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:06:18 -0400
commit57bee29d6e8cf721864fa47a18366bee5ff24f21 (patch)
treeeec0e9a15386db2bbe041f9e39d60075614c5adc /include
parent79c6ff93c74e793ccceb464ee3698478c812ce79 (diff)
V4L/DVB: soc-camera: allow only one video queue per device
Multiple user-space application instances can open the same video device, but it only makes sense for one of them to manage the videobuffer queue and set video format of the device. Restrict soc-camera respectively. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/media/soc_camera.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index 2ce957301f77..86e3631764ef 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -21,6 +21,8 @@
21 21
22extern struct bus_type soc_camera_bus_type; 22extern struct bus_type soc_camera_bus_type;
23 23
24struct file;
25
24struct soc_camera_device { 26struct soc_camera_device {
25 struct list_head list; 27 struct list_head list;
26 struct device dev; 28 struct device dev;
@@ -41,10 +43,7 @@ struct soc_camera_device {
41 /* soc_camera.c private count. Only accessed with .video_lock held */ 43 /* soc_camera.c private count. Only accessed with .video_lock held */
42 int use_count; 44 int use_count;
43 struct mutex video_lock; /* Protects device data */ 45 struct mutex video_lock; /* Protects device data */
44}; 46 struct file *streamer; /* stream owner */
45
46struct soc_camera_file {
47 struct soc_camera_device *icd;
48 struct videobuf_queue vb_vidq; 47 struct videobuf_queue vb_vidq;
49}; 48};
50 49
@@ -79,7 +78,7 @@ struct soc_camera_host_ops {
79 int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *); 78 int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *);
80 void (*init_videobuf)(struct videobuf_queue *, 79 void (*init_videobuf)(struct videobuf_queue *,
81 struct soc_camera_device *); 80 struct soc_camera_device *);
82 int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *); 81 int (*reqbufs)(struct soc_camera_device *, struct v4l2_requestbuffers *);
83 int (*querycap)(struct soc_camera_host *, struct v4l2_capability *); 82 int (*querycap)(struct soc_camera_host *, struct v4l2_capability *);
84 int (*set_bus_param)(struct soc_camera_device *, __u32); 83 int (*set_bus_param)(struct soc_camera_device *, __u32);
85 int (*get_ctrl)(struct soc_camera_device *, struct v4l2_control *); 84 int (*get_ctrl)(struct soc_camera_device *, struct v4l2_control *);