From f1883ef19f33045c8c559b1a94912773946f0cfa Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 18 Mar 2006 07:14:33 -0300 Subject: Fix Compilation after moving bttv code From: Mauro Carvalho Chehab - Missing a Makefile for bt8xx - rds.h were at wrong directory, since it is a global header for an internal interface - tda7432 and tda9875 were dependent from bttv.h - bttv.h were holding i2c addresses Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/bt8xx/Makefile | 12 +++++++ linux/drivers/media/video/bt8xx/bttv-driver.c | 2 +- linux/drivers/media/video/bt8xx/bttv.h | 20 +---------- linux/drivers/media/video/rds.h | 48 --------------------------- linux/drivers/media/video/saa6588.c | 2 +- linux/drivers/media/video/tda7432.c | 2 +- linux/drivers/media/video/tda9875.c | 4 +-- linux/include/media/i2c-addr.h | 30 +++++++++++++++++ linux/include/media/rds.h | 44 ++++++++++++++++++++++++ 9 files changed, 92 insertions(+), 72 deletions(-) create mode 100644 linux/drivers/media/video/bt8xx/Makefile delete mode 100644 linux/drivers/media/video/rds.h create mode 100644 linux/include/media/i2c-addr.h create mode 100644 linux/include/media/rds.h (limited to 'linux') diff --git a/linux/drivers/media/video/bt8xx/Makefile b/linux/drivers/media/video/bt8xx/Makefile new file mode 100644 index 000000000..94350f21c --- /dev/null +++ b/linux/drivers/media/video/bt8xx/Makefile @@ -0,0 +1,12 @@ +# +# Makefile for the video capture/playback device drivers. +# + +bttv-objs := bttv-driver.o bttv-cards.o bttv-if.o \ + bttv-risc.o bttv-vbi.o bttv-i2c.o bttv-gpio.o \ + bttv-input.o + +obj-$(CONFIG_VIDEO_BT848) += bttv.o + +EXTRA_CFLAGS += -I$(src)/.. +EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index 0b321480b..83458f993 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -45,7 +45,7 @@ #include #include -#include "rds.h" +#include unsigned int bttv_num; /* number of Bt848s in use */ diff --git a/linux/drivers/media/video/bt8xx/bttv.h b/linux/drivers/media/video/bt8xx/bttv.h index bdc3a19e3..4d86607f2 100644 --- a/linux/drivers/media/video/bt8xx/bttv.h +++ b/linux/drivers/media/video/bt8xx/bttv.h @@ -20,6 +20,7 @@ #include #include #include +#include /* ---------------------------------------------------------- */ /* exported by bttv-cards.c */ @@ -170,25 +171,6 @@ #define BTTV_BOARD_HAUPPAUGE_IMPACTVCB 0x8f #define BTTV_BOARD_MACHTV_MAGICTV 0x90 -/* i2c address list */ -#define I2C_TSA5522 0xc2 -#define I2C_TDA7432 0x8a -#define I2C_BT832_ALT1 0x88 -#define I2C_BT832_ALT2 0x8a // alternate setting -#define I2C_TDA8425 0x82 -#define I2C_TDA9840 0x84 -#define I2C_TDA9850 0xb6 /* also used by 9855,9873 */ -#define I2C_TDA9874 0xb0 /* also used by 9875 */ -#define I2C_TDA9875 0xb0 -#define I2C_HAUPEE 0xa0 -#define I2C_STBEE 0xae -#define I2C_VHX 0xc0 -#define I2C_MSP3400 0x80 -#define I2C_MSP3400_ALT 0x88 -#define I2C_TEA6300 0x80 /* also used by 6320 */ -#define I2C_DPL3518 0x84 -#define I2C_TDA9887 0x86 - /* more card-specific defines */ #define PT2254_L_CHANNEL 0x10 #define PT2254_R_CHANNEL 0x08 diff --git a/linux/drivers/media/video/rds.h b/linux/drivers/media/video/rds.h deleted file mode 100644 index 0d30eb744..000000000 --- a/linux/drivers/media/video/rds.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - - Types and defines needed for RDS. This is included by - saa6588.c and every driver (e.g. bttv-driver.c) that wants - to use the saa6588 module. - - Instead of having a seperate rds.h, I'd prefer to include - this stuff in one of the already existing files like tuner.h - - (c) 2005 by Hans J. Koch - - 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 _RDS_H -#define _RDS_H - -struct rds_command { - unsigned int block_count; - int result; - unsigned char __user *buffer; - struct file *instance; - poll_table *event_list; -}; - -#define RDS_CMD_OPEN _IOW('R',1,int) -#define RDS_CMD_CLOSE _IOW('R',2,int) -#define RDS_CMD_READ _IOR('R',3,int) -#define RDS_CMD_POLL _IOR('R',4,int) - -#endif - - - - diff --git a/linux/drivers/media/video/saa6588.c b/linux/drivers/media/video/saa6588.c index f009567b3..02709340b 100644 --- a/linux/drivers/media/video/saa6588.c +++ b/linux/drivers/media/video/saa6588.c @@ -36,7 +36,7 @@ #include "i2c-compat.h" #endif -#include "rds.h" +#include /* Addresses to scan */ static unsigned short normal_i2c[] = { diff --git a/linux/drivers/media/video/tda7432.c b/linux/drivers/media/video/tda7432.c index 4dc86710d..37f482c07 100644 --- a/linux/drivers/media/video/tda7432.c +++ b/linux/drivers/media/video/tda7432.c @@ -49,13 +49,13 @@ #include #include -#include "bttv.h" #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #include "i2c-compat.h" #else #endif #include #include +#include #ifndef VIDEO_AUDIO_BALANCE # define VIDEO_AUDIO_BALANCE 32 diff --git a/linux/drivers/media/video/tda9875.c b/linux/drivers/media/video/tda9875.c index 8a566026d..54386cacc 100644 --- a/linux/drivers/media/video/tda9875.c +++ b/linux/drivers/media/video/tda9875.c @@ -31,7 +31,6 @@ #include #include -#include "bttv.h" #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #include "audiochip.h" #include "id.h" @@ -40,11 +39,12 @@ #include #endif +#include + static int debug; /* insmod parameter */ module_param(debug, int, S_IRUGO | S_IWUSR); MODULE_LICENSE("GPL"); - /* Addresses to scan */ static unsigned short normal_i2c[] = { I2C_TDA9875 >> 1, diff --git a/linux/include/media/i2c-addr.h b/linux/include/media/i2c-addr.h new file mode 100644 index 000000000..4212832d4 --- /dev/null +++ b/linux/include/media/i2c-addr.h @@ -0,0 +1,30 @@ +/* + * V4L I2C address list + * + * + * Copyright (C) 2006 Mauro Carvalho Chehab + * Based on a previous mapping by + * Ralph Metzler (rjkm@thp.uni-koeln.de) + * Gerd Knorr + * + */ + +/* bttv address list */ +#define I2C_TSA5522 0xc2 +#define I2C_TDA7432 0x8a +#define I2C_BT832_ALT1 0x88 +#define I2C_BT832_ALT2 0x8a // alternate setting +#define I2C_TDA8425 0x82 +#define I2C_TDA9840 0x84 +#define I2C_TDA9850 0xb6 /* also used by 9855,9873 */ +#define I2C_TDA9874 0xb0 /* also used by 9875 */ +#define I2C_TDA9875 0xb0 +#define I2C_HAUPEE 0xa0 +#define I2C_STBEE 0xae +#define I2C_VHX 0xc0 +#define I2C_MSP3400 0x80 +#define I2C_MSP3400_ALT 0x88 +#define I2C_TEA6300 0x80 /* also used by 6320 */ +#define I2C_DPL3518 0x84 +#define I2C_TDA9887 0x86 + diff --git a/linux/include/media/rds.h b/linux/include/media/rds.h new file mode 100644 index 000000000..951c1ae0b --- /dev/null +++ b/linux/include/media/rds.h @@ -0,0 +1,44 @@ +/* + + Types and defines needed for RDS. This is included by + saa6588.c and every driver (e.g. bttv-driver.c) that wants + to use the saa6588 module. + + Instead of having a seperate rds.h, I'd prefer to include + this stuff in one of the already existing files like tuner.h + + (c) 2005 by Hans J. Koch + + 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 _RDS_H +#define _RDS_H + +struct rds_command { + unsigned int block_count; + int result; + unsigned char __user *buffer; + struct file *instance; + poll_table *event_list; +}; + +#define RDS_CMD_OPEN _IOW('R',1,int) +#define RDS_CMD_CLOSE _IOW('R',2,int) +#define RDS_CMD_READ _IOR('R',3,int) +#define RDS_CMD_POLL _IOR('R',4,int) + +#endif -- cgit v1.2.3