summaryrefslogtreecommitdiff
path: root/linux/include
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-03-13 20:00:50 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-13 20:00:50 -0300
commiteb97af7a1c842f6958f57fe8f9dbd93471d17948 (patch)
treeaab8522fdbd5a23c8fc7b0a8a27d2354b4258022 /linux/include
parentbd5114e836d5c39563589881b3d9da0cf06624f1 (diff)
parent70e434a0770289c85c4cf61a2956160e24d76bcf (diff)
downloadmediapointer-dvb-s2-eb97af7a1c842f6958f57fe8f9dbd93471d17948.tar.gz
mediapointer-dvb-s2-eb97af7a1c842f6958f57fe8f9dbd93471d17948.tar.bz2
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-notify
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/include')
-rw-r--r--linux/include/media/bt819.h33
-rw-r--r--linux/include/media/v4l2-device.h3
-rw-r--r--linux/include/media/v4l2-subdev.h5
3 files changed, 41 insertions, 0 deletions
diff --git a/linux/include/media/bt819.h b/linux/include/media/bt819.h
new file mode 100644
index 000000000..38f666bde
--- /dev/null
+++ b/linux/include/media/bt819.h
@@ -0,0 +1,33 @@
+/*
+ bt819.h - bt819 notifications
+
+ Copyright (C) 2009 Hans Verkuil (hverkuil@xs4all.nl)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef _BT819_H_
+#define _BT819_H_
+
+#include <linux/ioctl.h>
+
+/* v4l2_device notifications. */
+
+/* Needed to reset the FIFO buffer when changing the input
+ or the video standard. */
+#define BT819_FIFO_RESET_LOW _IO('b', 0)
+#define BT819_FIFO_RESET_HIGH _IO('b', 1)
+
+#endif
diff --git a/linux/include/media/v4l2-device.h b/linux/include/media/v4l2-device.h
index 5d7146dc2..3d8e96f6c 100644
--- a/linux/include/media/v4l2-device.h
+++ b/linux/include/media/v4l2-device.h
@@ -44,6 +44,9 @@ struct v4l2_device {
spinlock_t lock;
/* unique device name, by default the driver name + bus ID */
char name[V4L2_DEVICE_NAME_SIZE];
+ /* notify callback called by some sub-devices. */
+ void (*notify)(struct v4l2_subdev *sd,
+ unsigned int notification, void *arg);
};
/* Initialize v4l2_dev and make dev->driver_data point to v4l2_dev.
diff --git a/linux/include/media/v4l2-subdev.h b/linux/include/media/v4l2-subdev.h
index 05b69652e..1b97a2c33 100644
--- a/linux/include/media/v4l2-subdev.h
+++ b/linux/include/media/v4l2-subdev.h
@@ -191,4 +191,9 @@ static inline void v4l2_subdev_init(struct v4l2_subdev *sd,
(!(sd) ? -ENODEV : (((sd) && (sd)->ops->o && (sd)->ops->o->f) ? \
(sd)->ops->o->f((sd) , ##args) : -ENOIOCTLCMD))
+/* Send a notification to v4l2_device. */
+#define v4l2_subdev_notify(sd, notification, arg) \
+ ((!(sd) || !(sd)->v4l2_dev || !(sd)->v4l2_dev->notify) ? -ENODEV : \
+ (sd)->v4l2_dev->notify((sd), (notification), (arg)))
+
#endif