summaryrefslogtreecommitdiff
path: root/drivers/media/pci/saa7134/saa7134.h
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-12-14 11:28:27 (GMT)
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-07 09:37:10 (GMT)
commitce791139ec7f0e5878221dba8d5773e27bf057d3 (patch)
treec8f0054888ed2256cdc798ed736ce66b99017c61 /drivers/media/pci/saa7134/saa7134.h
parentb9f63b25954495b5b3089f89918771e52c1605d8 (diff)
downloadlinux-ce791139ec7f0e5878221dba8d5773e27bf057d3.tar.xz
[media] saa7134: share resource management between normal and empress nodes
The empress video node can share resource management with the normal video nodes, thus allowing for code sharing and making the empress node non-exclusive. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/pci/saa7134/saa7134.h')
-rw-r--r--drivers/media/pci/saa7134/saa7134.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/media/pci/saa7134/saa7134.h b/drivers/media/pci/saa7134/saa7134.h
index d7bef5e..2474e84 100644
--- a/drivers/media/pci/saa7134/saa7134.h
+++ b/drivers/media/pci/saa7134/saa7134.h
@@ -422,6 +422,7 @@ struct saa7134_board {
#define RESOURCE_OVERLAY 1
#define RESOURCE_VIDEO 2
#define RESOURCE_VBI 4
+#define RESOURCE_EMPRESS 8
#define INTERLACE_AUTO 0
#define INTERLACE_ON 1
@@ -644,7 +645,6 @@ struct saa7134_dev {
struct video_device *empress_dev;
struct v4l2_subdev *empress_sd;
struct videobuf_queue empress_tsq;
- atomic_t empress_users;
struct work_struct empress_workqueue;
int empress_started;
struct v4l2_ctrl_handler empress_ctrl_handler;
@@ -705,6 +705,16 @@ struct saa7134_dev {
_rc; \
})
+static inline int res_check(struct saa7134_fh *fh, unsigned int bit)
+{
+ return fh->resources & bit;
+}
+
+static inline int res_locked(struct saa7134_dev *dev, unsigned int bit)
+{
+ return dev->resources & bit;
+}
+
/* ----------------------------------------------------------- */
/* saa7134-core.c */
@@ -782,6 +792,16 @@ int saa7134_g_frequency(struct file *file, void *priv,
struct v4l2_frequency *f);
int saa7134_s_frequency(struct file *file, void *priv,
const struct v4l2_frequency *f);
+int saa7134_reqbufs(struct file *file, void *priv,
+ struct v4l2_requestbuffers *p);
+int saa7134_querybuf(struct file *file, void *priv,
+ struct v4l2_buffer *b);
+int saa7134_qbuf(struct file *file, void *priv, struct v4l2_buffer *b);
+int saa7134_dqbuf(struct file *file, void *priv, struct v4l2_buffer *b);
+int saa7134_streamon(struct file *file, void *priv,
+ enum v4l2_buf_type type);
+int saa7134_streamoff(struct file *file, void *priv,
+ enum v4l2_buf_type type);
int saa7134_videoport_init(struct saa7134_dev *dev);
void saa7134_set_tvnorm_hw(struct saa7134_dev *dev);