summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-11-09 11:34:59 +0000
committerGerd Knorr <devnull@localhost>2004-11-09 11:34:59 +0000
commit8fefc4d0918a1a9a7af142725963dc3c93cdab2a (patch)
treea25f3ebaceb27166d25fab47abbb9d2b91ecd5d0
parent6a9fd7b88d365d8686adb88e32cf2bf056d63a08 (diff)
downloadmediapointer-dvb-s2-8fefc4d0918a1a9a7af142725963dc3c93cdab2a.tar.gz
mediapointer-dvb-s2-8fefc4d0918a1a9a7af142725963dc3c93cdab2a.tar.bz2
- avermedia fixes (by Nickolay V. Shmyrev).
- make it build on non-cutting edge kernels (i.e. 2.6.9 ;) - convert remaining modules to new-style insmod options.
-rw-r--r--linux/drivers/media/video/bttv-cards.c12
-rw-r--r--linux/drivers/media/video/bttv-driver.c8
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-cards.c26
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-core.c13
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-empress.c7
-rw-r--r--linux/drivers/media/video/tda9887.c15
-rw-r--r--linux/drivers/media/video/tvaudio.c28
-rw-r--r--linux/drivers/media/video/tvmixer.c2
-rw-r--r--linux/include/media/tuner.h1
9 files changed, 88 insertions, 24 deletions
diff --git a/linux/drivers/media/video/bttv-cards.c b/linux/drivers/media/video/bttv-cards.c
index 8aa672e4d..4df326b56 100644
--- a/linux/drivers/media/video/bttv-cards.c
+++ b/linux/drivers/media/video/bttv-cards.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-cards.c,v 1.32 2004/11/07 13:17:14 kraxel Exp $
+ $Id: bttv-cards.c,v 1.33 2004/11/09 11:34:59 kraxel Exp $
bttv-cards.c
@@ -114,12 +114,22 @@ module_param(gpiomask, int, 0444);
module_param(audioall, int, 0444);
module_param(autoload, int, 0444);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
+static int dummy;
+module_param_array(card, int, dummy, 0444);
+module_param_array(pll, int, dummy, 0444);
+module_param_array(tuner, int, dummy, 0444);
+module_param_array(svhs, int, dummy, 0444);
+module_param_array(remote, int, dummy, 0444);
+module_param_array(audiomux, int, dummy, 0444);
+#else
module_param_array(card, int, NULL, 0444);
module_param_array(pll, int, NULL, 0444);
module_param_array(tuner, int, NULL, 0444);
module_param_array(svhs, int, NULL, 0444);
module_param_array(remote, int, NULL, 0444);
module_param_array(audiomux, int, NULL, 0444);
+#endif
MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
"[enable bug compatibility for triton1 + others]");
diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c
index 1864129b3..feb564ed4 100644
--- a/linux/drivers/media/video/bttv-driver.c
+++ b/linux/drivers/media/video/bttv-driver.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-driver.c,v 1.27 2004/11/07 14:44:59 kraxel Exp $
+ $Id: bttv-driver.c,v 1.28 2004/11/09 11:34:59 kraxel Exp $
bttv - Bt848 frame grabber driver
@@ -105,7 +105,13 @@ module_param(adc_crush, int, 0444);
module_param(whitecrush_upper, int, 0444);
module_param(whitecrush_lower, int, 0444);
module_param(vcr_hack, int, 0444);
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
+static int dummy;
+module_param_array(radio, int, dummy, 0444);
+#else
module_param_array(radio, int, NULL, 0444);
+#endif
MODULE_PARM_DESC(radio,"The TV card supports radio, default is 0 (no)");
MODULE_PARM_DESC(bigendian,"byte order of the framebuffer, default is native endian");
diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c
index c9a15ccbd..a7ad005c3 100644
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-cards.c,v 1.36 2004/11/08 10:57:32 kraxel Exp $
+ * $Id: saa7134-cards.c,v 1.37 2004/11/09 11:34:59 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* card-specific stuff.
@@ -998,29 +998,35 @@ struct saa7134_board saa7134_boards[] = {
[SAA7134_BOARD_AVERMEDIA_305] = {
.name = "AverMedia 305",
.audio_clock = 0x00187de7,
- .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
+ .tuner_type = TUNER_PHILIPS_FM1256_IH3,
.tda9887_conf = TDA9887_PRESENT,
+ .gpiomask = 0x3,
.inputs = {{
.name = name_tv,
.vmux = 1,
.amux = LINE2,
.tv = 1,
+ .gpio = 0x0,
},{
.name = name_comp1,
.vmux = 0,
.amux = LINE2,
+ .gpio = 0x0,
},{
.name = name_comp2,
.vmux = 3,
.amux = LINE2,
+ .gpio = 0x0,
},{
.name = name_svideo,
.vmux = 8,
.amux = LINE2,
+ .gpio = 0x0,
}},
.radio = {
.name = name_radio,
.amux = LINE2,
+ .gpio = 0x1,
},
.mute = {
.name = name_mute,
@@ -1207,32 +1213,41 @@ struct saa7134_board saa7134_boards[] = {
}
},
[SAA7134_BOARD_AVERMEDIA_307] = {
- /* Nickolay V. Shmyrev <nshmyrev@yandex.ru> */
+ /*
+ Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+ Lots of thanks to Andrey Zolotarev <zolotarev_andrey@mail.ru>
+ */
.name = "Avermedia AVerTV Studio 307",
.audio_clock = 0x00187de7,
- .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
+ .tuner_type = TUNER_PHILIPS_FM1256_IH3,
.tda9887_conf = TDA9887_PRESENT,
+ .gpiomask = 0x03,
.inputs = {{
.name = name_tv,
.vmux = 1,
.amux = TV,
.tv = 1,
+ .gpio = 0x00,
},{
.name = name_comp1,
.vmux = 0,
.amux = LINE2,
+ .gpio = 0x00,
},{
.name = name_comp2,
.vmux = 3,
.amux = LINE2,
+ .gpio = 0x00,
},{
.name = name_svideo,
.vmux = 8,
.amux = LINE2,
+ .gpio = 0x00,
}},
.radio = {
.name = name_radio,
- .amux = TV,
+ .amux = LINE1,
+ .gpio = 0x01,
},
},
[SAA7134_BOARD_AVERMEDIA_CARDBUS] = {
@@ -1645,6 +1660,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
case SAA7134_BOARD_ECS_TVP3XP:
case SAA7134_BOARD_ECS_TVP3XP_4CB5:
case SAA7134_BOARD_MD2819:
+ case SAA7134_BOARD_AVERMEDIA_305:
case SAA7134_BOARD_AVERMEDIA_307:
// case SAA7134_BOARD_SABRENT_SBTTVFM: /* not finished yet */
dev->has_remote = 1;
diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c
index 05b63cbed..d3c79cd35 100644
--- a/linux/drivers/media/video/saa7134/saa7134-core.c
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-core.c,v 1.15 2004/11/07 14:44:59 kraxel Exp $
+ * $Id: saa7134-core.c,v 1.16 2004/11/09 11:34:59 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* driver core
@@ -68,6 +68,16 @@ static unsigned int mixer_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET };
static unsigned int tuner[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET };
static unsigned int card[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET };
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
+static int dummy;
+module_param_array(video_nr, int, dummy, 0444);
+module_param_array(vbi_nr, int, dummy, 0444);
+module_param_array(radio_nr, int, dummy, 0444);
+module_param_array(dsp_nr, int, dummy, 0444);
+module_param_array(mixer_nr, int, dummy, 0444);
+module_param_array(tuner, int, dummy, 0444);
+module_param_array(card, int, dummy, 0444);
+#else
module_param_array(video_nr, int, NULL, 0444);
module_param_array(vbi_nr, int, NULL, 0444);
module_param_array(radio_nr, int, NULL, 0444);
@@ -75,6 +85,7 @@ module_param_array(dsp_nr, int, NULL, 0444);
module_param_array(mixer_nr, int, NULL, 0444);
module_param_array(tuner, int, NULL, 0444);
module_param_array(card, int, NULL, 0444);
+#endif
MODULE_PARM_DESC(video_nr, "video device number");
MODULE_PARM_DESC(vbi_nr, "vbi device number");
diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c
index d921af8a1..4decb992b 100644
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-empress.c,v 1.3 2004/11/07 13:17:15 kraxel Exp $
+ * $Id: saa7134-empress.c,v 1.4 2004/11/09 11:34:59 kraxel Exp $
*
* (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
*
@@ -40,7 +40,12 @@ MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
MODULE_LICENSE("GPL");
static unsigned int empress_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET };
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
+static int dummy;
+module_param_array(empress_nr, int, dummy, 0444);
+#else
module_param_array(empress_nr, int, NULL, 0444);
+#endif
MODULE_PARM_DESC(empress_nr,"ts device number");
static unsigned int debug = 0;
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c
index 9c23709e8..90d210c2c 100644
--- a/linux/drivers/media/video/tda9887.c
+++ b/linux/drivers/media/video/tda9887.c
@@ -228,6 +228,20 @@ static struct tvnorm radio = {
cRadioIF_38_90 ),
};
+#if 0 /* do we really need this ? */
+static struct tvnorm ih3_radio = {
+ .name = "radio",
+ .b = ( cFmRadio |
+ cQSS |
+ cAutoMuteFmActive),
+ .c = 0x10, /* ??? */
+ .e = (cAudioIF_6_5 |
+ cVideoIF_38_90 |
+ cGating_36 |
+ cTunerGainLow),
+};
+#endif
+
/* ---------------------------------------------------------------------- */
static void dump_read_message(unsigned char *buf)
@@ -253,6 +267,7 @@ static void dump_read_message(unsigned char *buf)
printk(PREFIX "read: 0x%2x\n", buf[0]);
printk(" after power on : %s\n", (buf[0] & 0x01) ? "yes" : "no");
printk(" afc : %s\n", afc[(buf[0] >> 1) & 0x0f]);
+ printk(" fmif level : %s\n", (buf[0] & 0x20) ? "high" : "low");
printk(" afc window : %s\n", (buf[0] & 0x40) ? "in" : "out");
printk(" vfi level : %s\n", (buf[0] & 0x80) ? "high" : "low");
}
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c
index 5261cb844..949ae0b00 100644
--- a/linux/drivers/media/video/tvaudio.c
+++ b/linux/drivers/media/video/tvaudio.c
@@ -43,8 +43,8 @@
/* ---------------------------------------------------------------------- */
/* insmod args */
-MODULE_PARM(debug,"i");
static int debug = 0; /* insmod parameter */
+module_param(debug, int, 0644);
MODULE_DESCRIPTION("device driver for various i2c TV sound decoder / audiomux chips");
MODULE_AUTHOR("Eric Sandeen, Steve VanDeBogart, Greg Alexander, Gerd Knorr");
@@ -778,9 +778,9 @@ static int tda9874a_dic = -1; /* device id. code */
static unsigned int tda9874a_SIF = UNSET;
static unsigned int tda9874a_AMSEL = UNSET;
static unsigned int tda9874a_STD = UNSET;
-MODULE_PARM(tda9874a_SIF,"i");
-MODULE_PARM(tda9874a_AMSEL,"i");
-MODULE_PARM(tda9874a_STD,"i");
+module_param(tda9874a_SIF, int, 0444);
+module_param(tda9874a_AMSEL, int, 0444);
+module_param(tda9874a_STD, int, 0444);
/*
* initialization table for tda9874 decoder:
@@ -1232,16 +1232,16 @@ int tea6420 = 1;
int pic16c54 = 1;
int ta8874z = 0; // address clash with tda9840
-MODULE_PARM(tda8425,"i");
-MODULE_PARM(tda9840,"i");
-MODULE_PARM(tda9850,"i");
-MODULE_PARM(tda9855,"i");
-MODULE_PARM(tda9873,"i");
-MODULE_PARM(tda9874a,"i");
-MODULE_PARM(tea6300,"i");
-MODULE_PARM(tea6420,"i");
-MODULE_PARM(pic16c54,"i");
-MODULE_PARM(ta8874z,"i");
+module_param(tda8425, int, 0444);
+module_param(tda9840, int, 0444);
+module_param(tda9850, int, 0444);
+module_param(tda9855, int, 0444);
+module_param(tda9873, int, 0444);
+module_param(tda9874a, int, 0444);
+module_param(tea6300, int, 0444);
+module_param(tea6420, int, 0444);
+module_param(pic16c54, int, 0444);
+module_param(ta8874z, int, 0444);
static struct CHIPDESC chiplist[] = {
{
diff --git a/linux/drivers/media/video/tvmixer.c b/linux/drivers/media/video/tvmixer.c
index 1d082d5be..18e7811b8 100644
--- a/linux/drivers/media/video/tvmixer.c
+++ b/linux/drivers/media/video/tvmixer.c
@@ -30,7 +30,7 @@
#define DEV_MAX 4
static int devnr = -1;
-MODULE_PARM(devnr,"i");
+module_param(devnr, int, 0644);
MODULE_AUTHOR("Gerd Knorr");
MODULE_LICENSE("GPL");
diff --git a/linux/include/media/tuner.h b/linux/include/media/tuner.h
index 5534d484b..3b91bb6bd 100644
--- a/linux/include/media/tuner.h
+++ b/linux/include/media/tuner.h
@@ -76,6 +76,7 @@
#define TUNER_TNF_8831BGFF 48
#define TUNER_MICROTUNE_4042FI5 49 /* FusionHDTV 3 Gold - 4042 FI5 (3X 8147) */
#define TUNER_TCL_2002N 50
+#define TUNER_PHILIPS_FM1256_IH3 51
#define NOTUNER 0
#define PAL 1 /* PAL_BG */