summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/common/saa7146.h20
-rw-r--r--linux/drivers/media/common/saa7146_core.c10
-rw-r--r--linux/drivers/media/common/saa7146_i2c.c2
-rw-r--r--linux/drivers/media/dvb/ttpci-budget/budget-core.c3
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c25
-rw-r--r--linux/drivers/media/video/mxb.c19
-rw-r--r--linux/drivers/media/video/mxb.h38
-rw-r--r--linux/drivers/media/video/tda9840.c26
-rw-r--r--linux/drivers/media/video/tda9840.h44
-rw-r--r--linux/drivers/media/video/tea6415c.c30
-rw-r--r--linux/drivers/media/video/tea6415c.h33
-rw-r--r--linux/drivers/media/video/tea6420.c30
-rw-r--r--linux/drivers/media/video/tea6420.h33
13 files changed, 166 insertions, 147 deletions
diff --git a/linux/drivers/media/common/saa7146.h b/linux/drivers/media/common/saa7146.h
index d9354a5d2..ece57408c 100644
--- a/linux/drivers/media/common/saa7146.h
+++ b/linux/drivers/media/common/saa7146.h
@@ -28,15 +28,19 @@
extern unsigned int saa7146_debug;
//#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),__stringify(KBUILD_MODNAME),__FUNCTION__)
-#define DEBUG_PROLOG printk("%s: %s(): ",__stringify(KBUILD_MODNAME),__FUNCTION__)
-#define DEB_S(x) if (0!=(saa7146_debug&0x01)) { DEBUG_PROLOG; printk x; } /* simple debug messages */
-#define DEB_D(x) if (0!=(saa7146_debug&0x02)) { DEBUG_PROLOG; printk x; } /* more detailed debug messages */
-#define DEB_EE(x) if (0!=(saa7146_debug&0x04)) { DEBUG_PROLOG; printk x; } /* print enter and exit of functions */
-#define DEB_I2C(x) if (0!=(saa7146_debug&0x08)) { DEBUG_PROLOG; printk x; } /* i2c debug messages */
-#define DEB_VBI(x) if (0!=(saa7146_debug&0x10)) { DEBUG_PROLOG; printk x; } /* vbi debug messages */
-#define DEB_INT(x) if (0!=(saa7146_debug&0x20)) { DEBUG_PROLOG; printk x; } /* interrupt debug messages */
-#define DEB_CAP(x) if (0!=(saa7146_debug&0x40)) { DEBUG_PROLOG; printk x; } /* capture debug messages */
+#ifndef DEBUG_VARIABLE
+ #define DEBUG_VARIABLE saa7146_debug
+#endif
+
+#define DEBUG_PROLOG printk("%s: %s(): ",__stringify(KBUILD_MODNAME),__FUNCTION__)
+#define DEB_S(x) if (0!=(DEBUG_VARIABLE&0x01)) { DEBUG_PROLOG; printk x; } /* simple debug messages */
+#define DEB_D(x) if (0!=(DEBUG_VARIABLE&0x02)) { DEBUG_PROLOG; printk x; } /* more detailed debug messages */
+#define DEB_EE(x) if (0!=(DEBUG_VARIABLE&0x04)) { DEBUG_PROLOG; printk x; } /* print enter and exit of functions */
+#define DEB_I2C(x) if (0!=(DEBUG_VARIABLE&0x08)) { DEBUG_PROLOG; printk x; } /* i2c debug messages */
+#define DEB_VBI(x) if (0!=(DEBUG_VARIABLE&0x10)) { DEBUG_PROLOG; printk x; } /* vbi debug messages */
+#define DEB_INT(x) if (0!=(DEBUG_VARIABLE&0x20)) { DEBUG_PROLOG; printk x; } /* interrupt debug messages */
+#define DEB_CAP(x) if (0!=(DEBUG_VARIABLE&0x40)) { DEBUG_PROLOG; printk x; } /* capture debug messages */
#define ERR(x) { DEBUG_PROLOG; printk x; }
#define INFO(x) { printk("%s: ",__stringify(KBUILD_MODNAME)); printk x; }
diff --git a/linux/drivers/media/common/saa7146_core.c b/linux/drivers/media/common/saa7146_core.c
index 67f2d3734..247e1c859 100644
--- a/linux/drivers/media/common/saa7146_core.c
+++ b/linux/drivers/media/common/saa7146_core.c
@@ -27,7 +27,6 @@
struct list_head saa7146_devices;
struct semaphore saa7146_devices_lock;
-static struct list_head extensions;
static int initialized = 0;
static int saa7146_num = 0;
@@ -394,21 +393,22 @@ int saa7146_register_extension(struct saa7146_extension* ext)
if( 0 == initialized ) {
INIT_LIST_HEAD(&saa7146_devices);
init_MUTEX(&saa7146_devices_lock);
- INIT_LIST_HEAD(&extensions);
initialized = 1;
}
- ext->driver.name = "saa7146";
+ ext->driver.name = ext->name;
ext->driver.id_table = ext->pci_tbl;
ext->driver.probe = saa7146_init_one;
ext->driver.remove = saa7146_remove_one;
-
+
+ printk("saa7146: register extension '%s'.\n",ext->name);
return pci_module_init(&ext->driver);
}
int saa7146_unregister_extension(struct saa7146_extension* ext)
{
DEB_EE(("ext:%p\n",ext));
+ printk("saa7146: unregister extension '%s'.\n",ext->name);
pci_unregister_driver(&ext->driver);
return 0;
}
@@ -416,11 +416,9 @@ int saa7146_unregister_extension(struct saa7146_extension* ext)
static
int saa7146_init_module(void)
{
- printk("saa7146_init_module()\n");
if( 0 == initialized ) {
INIT_LIST_HEAD(&saa7146_devices);
init_MUTEX(&saa7146_devices_lock);
- INIT_LIST_HEAD(&extensions);
initialized = 1;
}
return 0;
diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c
index 12d4ad655..adbf61aa6 100644
--- a/linux/drivers/media/common/saa7146_i2c.c
+++ b/linux/drivers/media/common/saa7146_i2c.c
@@ -299,7 +299,7 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg msgs[], i
err = saa7146_i2c_writeout(dev, &buffer[i] );
if ( 0 != err) {
/* if address-error occured, donīt retry */
- if ( -2 == err ) {
+ if ( -EREMOTEIO == err ) {
goto out;
}
DEB_I2C(("error while sending message(s). starting again.\n"));
diff --git a/linux/drivers/media/dvb/ttpci-budget/budget-core.c b/linux/drivers/media/dvb/ttpci-budget/budget-core.c
index 0d9225d39..47ec3a8fe 100644
--- a/linux/drivers/media/dvb/ttpci-budget/budget-core.c
+++ b/linux/drivers/media/dvb/ttpci-budget/budget-core.c
@@ -507,5 +507,8 @@ EXPORT_SYMBOL_GPL(budget_register);
EXPORT_SYMBOL_GPL(budget_irq);
EXPORT_SYMBOL_GPL(budget_attach);
EXPORT_SYMBOL_GPL(budget_detach);
+EXPORT_SYMBOL_GPL(budget_debug);
MODULE_PARM(budget_debug,"i");
+MODULE_LICENSE("GPL");
+
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index fbc0606e9..24ff9d7ba 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -73,6 +73,14 @@
#include "dvb_i2c.h"
#include "dvb_frontend.h"
+#if 1
+ #define DEBUG_VARIABLE av7110_debug
+#else
+ #define DEB_S(x)
+ #define DEB_D(x)
+ #define DEB_EE(x)
+#endif
+
#include "av7110.h"
#include "av7110_ipack.h"
@@ -88,19 +96,6 @@ void pes_to_ts(u8 const *buf, long int length, u16 pid, p2t_t *p);
void p_to_t(u8 const *buf, long int length, u16 pid, u8 *counter, struct dvb_demux_feed *feed);
static int av7110_debug = 0;
-#if 1
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51)
- #define KBUILD_MODNAME av7110
-#endif
-#define DEBUG_PROLOG printk("%s: %s(): ",__stringify(KBUILD_MODNAME),__FUNCTION__)
-#define DEB_S(x) if (0!=(av7110_debug&0x01)) { DEBUG_PROLOG; printk x; } /* simple debug messages */
-#define DEB_D(x) if (0!=(av7110_debug&0x02)) { DEBUG_PROLOG; printk x; } /* more detailed debug messages */
-#define DEB_EE(x) if (0!=(av7110_debug&0x04)) { DEBUG_PROLOG; printk x; } /* print enter and exit of functions */
-#else
-#define DEB_S(x)
-#define DEB_D(x)
-#define DEB_EE(x)
-#endif
static int vidmode=CVBS_RGB_OUT;
static int pids_off;
@@ -108,6 +103,10 @@ static int adac=DVB_ADAC_TI;
int av7110_num = 0;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51)
+ #define KBUILD_MODNAME av7110
+#endif
+
/****************************************************************************
* General helper functions
****************************************************************************/
diff --git a/linux/drivers/media/video/mxb.c b/linux/drivers/media/video/mxb.c
index 29be50726..b12daa05d 100644
--- a/linux/drivers/media/video/mxb.c
+++ b/linux/drivers/media/video/mxb.c
@@ -18,7 +18,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <saa7146_vv.h>
+#define DEBUG_VARIABLE debug
+#include "saa7146_vv.h"
#include "mxb.h"
#include "tea6415c.h"
@@ -69,10 +70,13 @@ static int mxb_num = 0;
in verden (lower saxony, germany) 4148 is a
channel called "phoenix" */
static int freq = 4148;
-
MODULE_PARM(freq,"i");
MODULE_PARM_DESC(freq, "initial frequency the tuner will be tuned to while setup");
+static int debug = 0;
+MODULE_PARM(debug,"i");
+MODULE_PARM_DESC(debug, "debug verbosity");
+
#define MXB_INPUTS 4
enum { TUNER, AUX1, AUX3, AUX3_YC };
@@ -102,7 +106,7 @@ static int video_audio_connect[MXB_AUDIOS] =
/* these are the necessary input-output-pins for bringing one audio source
(see above) to the CD-output */
-static struct audio_multiplex TEA6420_cd[MXB_AUDIOS+1][2] =
+static struct tea6420_multiplex TEA6420_cd[MXB_AUDIOS+1][2] =
{
{{1,1,0},{1,1,0}}, /* Tuner */
{{5,1,0},{6,1,0}}, /* AUX 1 */
@@ -115,7 +119,7 @@ static struct audio_multiplex TEA6420_cd[MXB_AUDIOS+1][2] =
/* these are the necessary input-output-pins for bringing one audio source
(see above) to the line-output */
-static struct audio_multiplex TEA6420_line[MXB_AUDIOS+1][2] =
+static struct tea6420_multiplex TEA6420_line[MXB_AUDIOS+1][2] =
{
{{2,3,0},{1,2,0}},
{{5,3,0},{6,2,0}},
@@ -237,7 +241,8 @@ static int mxb_probe(struct saa7146_dev* dev)
/* check if all devices are present */
if( 0 == mxb->tea6420_1 || 0 == mxb->tea6420_2 || 0 == mxb->tea6415c
|| 0 == mxb->tda9840 || 0 == mxb->saa7111a || 0 == mxb->tuner ) {
- DEB_D(("this saa7146 is not on an mxb.\n"));
+ printk("mxb: did not find all i2c devices. are you sure you\n");
+ printk("mxb: insmod'ed tea6420, tea6415c, saa7111, tea6415c and tuner?\n");
i2c_del_adapter(&mxb->i2c_adapter);
kfree(mxb);
return -ENODEV;
@@ -349,7 +354,7 @@ static int mxb_init_done(struct saa7146_dev* dev)
struct i2c_msg msg;
int i = 0, err = 0;
- struct tea6415c_video_multiplex vm;
+ struct tea6415c_multiplex vm;
/* write configuration to saa7111a */
i = i2c_master_send(mxb->saa7111a, init, sizeof(init));
@@ -648,7 +653,7 @@ static int mxb_ioctl(struct saa7146_dev *dev, unsigned int cmd, void *arg)
case VIDIOC_S_INPUT:
{
int input = *(int *)arg;
- struct tea6415c_video_multiplex vm;
+ struct tea6415c_multiplex vm;
int i = 0;
DEB_EE(("VIDIOC_S_INPUT %d.\n",input));
diff --git a/linux/drivers/media/video/mxb.h b/linux/drivers/media/video/mxb.h
index 3f73ea7ca..755e7927b 100644
--- a/linux/drivers/media/video/mxb.h
+++ b/linux/drivers/media/video/mxb.h
@@ -3,8 +3,8 @@
#define BASE_VIDIOC_MXB 10
-#define MXB_S_AUDIO_CD _IOW ('V', BASE_VIDIOC_PRIVATE+BASE_VIDIOC_MXB+00, int)
-#define MXB_S_AUDIO_LINE _IOW ('V', BASE_VIDIOC_PRIVATE+BASE_VIDIOC_MXB+01, int)
+#define MXB_S_AUDIO_CD _IOW ('V', BASE_VIDIOC_PRIVATE+BASE_VIDIOC_MXB+0, int)
+#define MXB_S_AUDIO_LINE _IOW ('V', BASE_VIDIOC_PRIVATE+BASE_VIDIOC_MXB+1, int)
#define MXB_IDENTIFIER "Multimedia eXtension Board"
@@ -12,11 +12,31 @@
/* these are the available audio sources, which can switched
to the line- and cd-output individually */
-struct v4l2_audio mxb_audios[MXB_AUDIOS] =
- { { 0, "Tuner", 0},
- { 1, "AUX1", 0},
- { 2, "AUX2", 0},
- { 3, "AUX3", 0},
- { 4, "Radio (X9)", 0},
- { 5, "CD-ROM (X10)", 0} };
+struct v4l2_audio mxb_audios[MXB_AUDIOS] = {
+ {
+ .index = 0,
+ .name = "Tuner",
+ .capability = V4L2_AUDCAP_STEREO,
+ } , {
+ .index = 1,
+ .name = "AUX1",
+ .capability = V4L2_AUDCAP_STEREO,
+ } , {
+ .index = 2,
+ .name = "AUX2",
+ .capability = V4L2_AUDCAP_STEREO,
+ } , {
+ .index = 3,
+ .name = "AUX3",
+ .capability = V4L2_AUDCAP_STEREO,
+ } , {
+ .index = 4,
+ .name = "Radio (X9)",
+ .capability = V4L2_AUDCAP_STEREO,
+ } , {
+ .index = 5,
+ .name = "CD-ROM (X10)",
+ .capability = V4L2_AUDCAP_STEREO,
+ }
+};
#endif
diff --git a/linux/drivers/media/video/tda9840.c b/linux/drivers/media/video/tda9840.c
index dfdf04968..6da68d762 100644
--- a/linux/drivers/media/video/tda9840.c
+++ b/linux/drivers/media/video/tda9840.c
@@ -1,3 +1,29 @@
+ /*
+ tda9840.h - i2c-driver for the tda9840 by SGS Thomson
+
+ Copyright (C) 1998-2003 Michael Hunold <michael@mihu.de>
+
+ The tda9840 is a stereo/dual sound processor with digital
+ identification. It can be found at address 0x84 on the i2c-bus.
+
+ For detailed informations download the specifications directly
+ from SGS Thomson at http://www.st.com
+
+ 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.
+ */
+
#include <linux/version.h>
#include <linux/module.h>
#include <linux/kernel.h>
diff --git a/linux/drivers/media/video/tda9840.h b/linux/drivers/media/video/tda9840.h
index 54e4a77e4..28021053b 100644
--- a/linux/drivers/media/video/tda9840.h
+++ b/linux/drivers/media/video/tda9840.h
@@ -1,50 +1,16 @@
- /*
- tda9840.h - definitions for the i2c-driver
- for the tda9840 by SGS Thomson
-
- Copyright (C) 1998,1999,2000 Michael Hunold <michael@mihu.de>
-
- The tda9840 is a stereo/dual sound processor with digital
- identification. It can be found at address 0x84 on the i2c-bus.
-
- For detailed informations download the specifications directly
- from SGS Thomson at http://www.st.com
-
- 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 __INCLUDED_TDA9840__
#define __INCLUDED_TDA9840__
#define I2C_TDA9840 0x42
-/* I'm using the currently unused letter 'd' for
- identifying. perhaps this will be changed in the
- future.
-
- (see /usr/src/linux/Documentation/ioctl-number.txt
- for further details.) */
-
-#define TDA9840_DETECT _IOR('d',1,int)
+#define TDA9840_DETECT _IOR('v',1,int)
/* return values for TDA9840_DETCT */
#define TDA9840_MONO_DETECT 0x0
#define TDA9840_DUAL_DETECT 0x1
#define TDA9840_STEREO_DETECT 0x2
#define TDA9840_INCORRECT_DETECT 0x3
-#define TDA9840_SWITCH _IOW('d',2,int)
+#define TDA9840_SWITCH _IOW('v',2,int)
/* modes than can be set with TDA9840_SWITCH */
#define TDA9840_SET_MUTE 0x00
#define TDA9840_SET_MONO 0x10
@@ -57,13 +23,13 @@
/* values may range between +2.5 and -2.0;
the value has to be multiplied with 10 */
-#define TDA9840_LEVEL_ADJUST _IOW('d',3,int)
+#define TDA9840_LEVEL_ADJUST _IOW('v',3,int)
/* values may range between +2.5 and -2.4;
the value has to be multiplied with 10 */
-#define TDA9840_STEREO_ADJUST _IOW('d',4,int)
+#define TDA9840_STEREO_ADJUST _IOW('v',4,int)
/* currently not implemented */
-#define TDA9840_TEST _IOW('d',5,int)
+#define TDA9840_TEST _IOW('v',5,int)
#endif
diff --git a/linux/drivers/media/video/tea6415c.c b/linux/drivers/media/video/tea6415c.c
index dd65664d4..7cbc580de 100644
--- a/linux/drivers/media/video/tea6415c.c
+++ b/linux/drivers/media/video/tea6415c.c
@@ -1,3 +1,31 @@
+ /*
+ tea6415c.h - i2c-driver for the tea6415c by SGS Thomson
+
+ Copyright (C) 1998-2003 Michael Hunold <michael@mihu.de>
+
+ The tea6415c is a bus controlled video-matrix-switch
+ with 8 inputs and 6 outputs.
+ It is cascadable, i.e. it can be found at the addresses
+ 0x86 and 0x06 on the i2c-bus.
+
+ For detailed informations download the specifications directly
+ from SGS Thomson at http://www.st.com
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License vs 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 Mvss Ave, Cambridge, MA 02139, USA.
+ */
+
#include <linux/version.h>
#include <linux/module.h>
#include <linux/kernel.h>
@@ -153,7 +181,7 @@ static int tea6415c_switch(struct i2c_client *client, int i, int o)
static int tea6415c_command(struct i2c_client *client, unsigned int cmd, void* arg)
{
- struct tea6415c_video_multiplex *v = (struct tea6415c_video_multiplex*)arg;
+ struct tea6415c_multiplex *v = (struct tea6415c_multiplex*)arg;
int result = 0;
switch (cmd) {
diff --git a/linux/drivers/media/video/tea6415c.h b/linux/drivers/media/video/tea6415c.h
index 775fb6fe8..f84ed8005 100644
--- a/linux/drivers/media/video/tea6415c.h
+++ b/linux/drivers/media/video/tea6415c.h
@@ -1,32 +1,3 @@
- /*
- tea6415c.h - definitions for the i2c-driver
- for the tea6415c by SGS Thomson
-
- Copyright (C) 1998,1999,2000 Michael Hunold <michael@mihu.de>
-
- The tea6415c is a bus controlled video-matrix-switch
- with 8 inputs and 6 outputs.
- It is cascadable, i.e. it can be found at the addresses
- 0x86 and 0x06 on the i2c-bus.
-
- For detailed informations download the specifications directly
- from SGS Thomson at http://www.st.com
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License vs 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 Mvss Ave, Cambridge, MA 02139, USA.
- */
-
#ifndef __INCLUDED_TEA6415C__
#define __INCLUDED_TEA6415C__
@@ -57,12 +28,12 @@
#define TEA6415C_INPUT7 1
#define TEA6415C_INPUT8 11
-struct tea6415c_video_multiplex
+struct tea6415c_multiplex
{
int in; /* input-pin */
int out; /* output-pin */
};
-#define TEA6415C_SWITCH _IOW('t',1,struct tea6415c_video_multiplex)
+#define TEA6415C_SWITCH _IOW('v',1,struct tea6415c_multiplex)
#endif
diff --git a/linux/drivers/media/video/tea6420.c b/linux/drivers/media/video/tea6420.c
index 38bd85b6a..d860d1002 100644
--- a/linux/drivers/media/video/tea6420.c
+++ b/linux/drivers/media/video/tea6420.c
@@ -1,3 +1,31 @@
+ /*
+ tea6420.h - i2c-driver for the tea6420 by SGS Thomson
+
+ Copyright (C) 1998-2003 Michael Hunold <michael@mihu.de>
+
+ The tea6420 is a bus controlled audio-matrix with 5 stereo inputs,
+ 4 stereo outputs and gain control for each output.
+ It is cascadable, i.e. it can be found at the adresses 0x98
+ and 0x9a on the i2c-bus.
+
+ For detailed informations download the specifications directly
+ from SGS Thomson at http://www.st.com
+
+ 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.
+ */
+
#include <linux/version.h>
#include <linux/module.h>
#include <linux/kernel.h>
@@ -133,7 +161,7 @@ static int tea6420_detach(struct i2c_client *client)
static int tea6420_command(struct i2c_client *client, unsigned int cmd, void* arg)
{
- struct audio_multiplex *a = (struct audio_multiplex*)arg;
+ struct tea6420_multiplex *a = (struct tea6420_multiplex*)arg;
int result = 0;
switch (cmd) {
diff --git a/linux/drivers/media/video/tea6420.h b/linux/drivers/media/video/tea6420.h
index 5cda0c408..ea664df15 100644
--- a/linux/drivers/media/video/tea6420.h
+++ b/linux/drivers/media/video/tea6420.h
@@ -1,32 +1,3 @@
- /*
- tea6420.h - definitions for the i2c-driver
- for the tea6420 by SGS Thomson
-
- Copyright (C) 1998,1999,2000 Michael Hunold <michael@mihu.de>
-
- The tea6420 is a bus controlled audio-matrix with 5 stereo inputs,
- 4 stereo outputs and gain control for each output.
- It is cascadable, i.e. it can be found at the adresses 0x98
- and 0x9a on the i2c-bus.
-
- For detailed informations download the specifications directly
- from SGS Thomson at http://www.st.com
-
- 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 __INCLUDED_TEA6420__
#define __INCLUDED_TEA6420__
@@ -34,13 +5,13 @@
#define I2C_TEA6420_1 0x4c
#define I2C_TEA6420_2 0x4d
-struct audio_multiplex
+struct tea6420_multiplex
{
int in; /* input of audio switch */
int out; /* output of audio switch */
int gain; /* gain of connection */
};
-#define TEA6420_SWITCH _IOW('t',1,struct audio_multiplex)
+#define TEA6420_SWITCH _IOW('v',1,struct tea6420_multiplex)
#endif