summaryrefslogtreecommitdiff
path: root/linux/include
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-03-13 20:17:47 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-13 20:17:47 -0300
commit675d7080a5676f235b39a78a0af9d6a32b589133 (patch)
treefff786e9e33cd9c182e22f8bb8c67a92fb3ad63e /linux/include
parent3e0273a7209d6a20bd422beec8b46dd6b79a00a7 (diff)
parenteb97af7a1c842f6958f57fe8f9dbd93471d17948 (diff)
downloadmediapointer-dvb-s2-675d7080a5676f235b39a78a0af9d6a32b589133.tar.gz
mediapointer-dvb-s2-675d7080a5676f235b39a78a0af9d6a32b589133.tar.bz2
merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb
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