From c3bf1b32148a59bc0a8e58c126d642236c7febc1 Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Mon, 10 Apr 2006 09:27:37 -0300 Subject: Add sysfs device links to dvb devices From: Andrew de Quincey Currently in /sys/class/dvb/dvbX.demuxY/ we have: dev uevent With the patch, we have (for a PCI DVB device): dev device -> ../../../devices/pci0000:00/0000:00:1e.0/0000:03:0d.0 uevent So userspace tools can (finally) work out which physical device a DVB adapter refers to. Previously you had to kinda look through dmesg and hope that it hadn't been dumped out of the buffer. This makes debugging a lot easier if the system has been up for a long time! This is done by adding an extra 'struct device *' parameter to dvb_register_adapter(). It will work with any kind of standard linux 'device'. Additionally, if someone has an embedded system which does things differently, they can simply supply 'NULL' and the behaviour will be as before - the link will simply not appear. Signed-off-by: Andrew de Quincey Ack'd-by: Manu Abraham Acked-by: Michael Krufky --- linux/include/media/video-buf-dvb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linux/include') diff --git a/linux/include/media/video-buf-dvb.h b/linux/include/media/video-buf-dvb.h index 8dcaad6a1..b581aa73c 100644 --- a/linux/include/media/video-buf-dvb.h +++ b/linux/include/media/video-buf-dvb.h @@ -35,7 +35,8 @@ struct videobuf_dvb { int videobuf_dvb_register(struct videobuf_dvb *dvb, struct module *module, - void *adapter_priv); + void *adapter_priv, + struct device *device); void videobuf_dvb_unregister(struct videobuf_dvb *dvb); /* -- cgit v1.2.3 From 8a12d77dcb14376f2521bfc9ff2244a17c113dd3 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 11 Apr 2006 17:36:49 -0300 Subject: Since we are not using CVS, $Id makes no sense anymore From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/audiochip.h | 1 - linux/include/media/ir-common.h | 1 - linux/include/media/tuner.h | 1 - linux/include/media/tveeprom.h | 1 - linux/include/media/video-buf-dvb.h | 1 - linux/include/media/video-buf.h | 1 - 6 files changed, 6 deletions(-) (limited to 'linux/include') diff --git a/linux/include/media/audiochip.h b/linux/include/media/audiochip.h index 41db54b17..1fd4a2207 100644 --- a/linux/include/media/audiochip.h +++ b/linux/include/media/audiochip.h @@ -1,5 +1,4 @@ /* - * $Id: audiochip.h,v 1.9 2006/01/01 17:17:39 mchehab Exp $ */ #ifndef AUDIOCHIP_H diff --git a/linux/include/media/ir-common.h b/linux/include/media/ir-common.h index 8a2e4c640..302d5b394 100644 --- a/linux/include/media/ir-common.h +++ b/linux/include/media/ir-common.h @@ -1,5 +1,4 @@ /* - * $Id: ir-common.h,v 1.19 2006/01/18 20:41:55 nsh Exp $ * * some common structs and functions to handle infrared remotes via * input layer ... diff --git a/linux/include/media/tuner.h b/linux/include/media/tuner.h index a5471fa67..515680247 100644 --- a/linux/include/media/tuner.h +++ b/linux/include/media/tuner.h @@ -1,5 +1,4 @@ /* - $Id: tuner.h,v 1.76 2006/01/15 17:04:52 hverkuil Exp $ tuner.h - definition for different tuners Copyright (C) 1997 Markus Schroeder (schroedm@uni-duesseldorf.de) diff --git a/linux/include/media/tveeprom.h b/linux/include/media/tveeprom.h index b9c8f7e14..e9fc1a785 100644 --- a/linux/include/media/tveeprom.h +++ b/linux/include/media/tveeprom.h @@ -1,5 +1,4 @@ /* - * $Id: tveeprom.h,v 1.6 2005/11/26 14:43:46 hverkuil Exp $ */ struct tveeprom { diff --git a/linux/include/media/video-buf-dvb.h b/linux/include/media/video-buf-dvb.h index b581aa73c..92545a0a2 100644 --- a/linux/include/media/video-buf-dvb.h +++ b/linux/include/media/video-buf-dvb.h @@ -1,4 +1,3 @@ -/* $Id: video-buf-dvb.h,v 1.8 2005/09/04 11:45:19 mchehab Exp $ */ #include #include #include diff --git a/linux/include/media/video-buf.h b/linux/include/media/video-buf.h index c6be316ce..7f8f6ca81 100644 --- a/linux/include/media/video-buf.h +++ b/linux/include/media/video-buf.h @@ -1,5 +1,4 @@ /* - * $Id: video-buf.h,v 1.11 2005/10/17 21:18:42 mchehab Exp $ * * generic helper functions for video4linux capture buffers, to handle * memory management and PCI DMA. -- cgit v1.2.3 From 24bda047c0558518cdd4845894af9a62fe0cfe36 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 11 Apr 2006 17:55:53 -0300 Subject: Merge: from V4L1 tree From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- linux/include/linux/videodev2.h | 5 +++ linux/include/media/ovcamchip.h | 91 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 linux/include/media/ovcamchip.h (limited to 'linux/include') diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index 54b8aca85..5d46a8d2a 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -1245,8 +1245,13 @@ extern char *v4l2_type_names[]; /* Compatibility layer interface -- v4l1-compat module */ typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, unsigned int cmd, void *arg); + +#ifdef CONFIG_VIDEO_V4L1_COMPAT int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, int cmd, void *arg, v4l2_kioctl driver_ioctl); +#else +#define v4l_compat_translate_ioctl(inode,file,cmd,arg,ioctl) -EINVAL +#endif /* 32 Bits compatibility layer for 64 bits processors */ extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, diff --git a/linux/include/media/ovcamchip.h b/linux/include/media/ovcamchip.h new file mode 100644 index 000000000..773fb09c6 --- /dev/null +++ b/linux/include/media/ovcamchip.h @@ -0,0 +1,91 @@ +/* OmniVision* camera chip driver API + * + * Copyright (c) 1999-2004 Mark McClelland + * + * 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. NO WARRANTY OF ANY KIND is expressed or implied. + * + * * OmniVision is a trademark of OmniVision Technologies, Inc. This driver + * is not sponsored or developed by them. + */ + +#ifndef __LINUX_OVCAMCHIP_H +#define __LINUX_OVCAMCHIP_H + +#include "compat.h" +#include +#include + +/* --------------------------------- */ +/* ENUMERATIONS */ +/* --------------------------------- */ + +/* Controls */ +enum { + OVCAMCHIP_CID_CONT, /* Contrast */ + OVCAMCHIP_CID_BRIGHT, /* Brightness */ + OVCAMCHIP_CID_SAT, /* Saturation */ + OVCAMCHIP_CID_HUE, /* Hue */ + OVCAMCHIP_CID_EXP, /* Exposure */ + OVCAMCHIP_CID_FREQ, /* Light frequency */ + OVCAMCHIP_CID_BANDFILT, /* Banding filter */ + OVCAMCHIP_CID_AUTOBRIGHT, /* Auto brightness */ + OVCAMCHIP_CID_AUTOEXP, /* Auto exposure */ + OVCAMCHIP_CID_BACKLIGHT, /* Back light compensation */ + OVCAMCHIP_CID_MIRROR, /* Mirror horizontally */ +}; + +/* Chip types */ +#define NUM_CC_TYPES 9 +enum { + CC_UNKNOWN, + CC_OV76BE, + CC_OV7610, + CC_OV7620, + CC_OV7620AE, + CC_OV6620, + CC_OV6630, + CC_OV6630AE, + CC_OV6630AF, +}; + +/* --------------------------------- */ +/* I2C ADDRESSES */ +/* --------------------------------- */ + +#define OV7xx0_SID (0x42 >> 1) +#define OV6xx0_SID (0xC0 >> 1) + +/* --------------------------------- */ +/* API */ +/* --------------------------------- */ + +struct ovcamchip_control { + __u32 id; + __s32 value; +}; + +struct ovcamchip_window { + int x; + int y; + int width; + int height; + int format; + int quarter; /* Scale width and height down 2x */ + + /* This stuff will be removed eventually */ + int clockdiv; /* Clock divisor setting */ +}; + +/* Commands */ +#define OVCAMCHIP_CMD_Q_SUBTYPE _IOR (0x88, 0x00, int) +#define OVCAMCHIP_CMD_INITIALIZE _IOW (0x88, 0x01, int) +/* You must call OVCAMCHIP_CMD_INITIALIZE before any of commands below! */ +#define OVCAMCHIP_CMD_S_CTRL _IOW (0x88, 0x02, struct ovcamchip_control) +#define OVCAMCHIP_CMD_G_CTRL _IOWR (0x88, 0x03, struct ovcamchip_control) +#define OVCAMCHIP_CMD_S_MODE _IOW (0x88, 0x04, struct ovcamchip_window) +#define OVCAMCHIP_MAX_CMD _IO (0x88, 0x3f) + +#endif -- cgit v1.2.3