summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <devnull@localhost>2005-06-22 22:31:38 +0000
committerNickolay V. Shmyrev <devnull@localhost>2005-06-22 22:31:38 +0000
commit44d8b9bf4cc9a4680bda3d2e797edb7c9f7f0363 (patch)
treeb43657dae4734c4f82afa6f23083b4c8b086989f /linux/drivers
parent038f4c24539b60a930858b7e326f7220a40beade (diff)
downloadmediapointer-dvb-s2-44d8b9bf4cc9a4680bda3d2e797edb7c9f7f0363.tar.gz
mediapointer-dvb-s2-44d8b9bf4cc9a4680bda3d2e797edb7c9f7f0363.tar.bz2
* bttv-driver.h:
- use DMA_32BIT_MASK. Thanks to domen@coderock.org. * tuner.h: - Remove unneeded set_tuner from tuner structure. * saa7134-cards.c, saa7134-tvaudio.c: patch to switch external mux on mute on some cards. * tuner-simple: - unify tuner list
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/bttv-driver.c7
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-cards.c38
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-tvaudio.c24
-rw-r--r--linux/drivers/media/video/tuner-simple.c13
4 files changed, 65 insertions, 17 deletions
diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c
index 1fa396465..014d61398 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.40 2005/06/16 21:38:45 nsh Exp $
+ $Id: bttv-driver.c,v 1.41 2005/06/22 22:31:38 nsh Exp $
bttv - Bt848 frame grabber driver
@@ -35,6 +35,7 @@
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/kdev_t.h>
+#include <linux/dma-mapping.h>
#include <asm/io.h>
#include <asm/byteorder.h>
@@ -3878,7 +3879,11 @@ static int __devinit bttv_probe(struct pci_dev *dev,
btv->c.nr);
return -EIO;
}
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,7)
if (pci_set_dma_mask(dev, 0xffffffff)) {
+#else
+ if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) {
+#endif
printk(KERN_WARNING "bttv%d: No suitable DMA available.\n",
btv->c.nr);
return -EIO;
diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c
index dfb68222a..be6862af7 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.71 2005/06/21 14:58:08 mkrufky Exp $
+ * $Id: saa7134-cards.c,v 1.72 2005/06/22 22:31:38 nsh Exp $
*
* device driver for philips saa7134 based TV cards
* card-specific stuff.
@@ -128,6 +128,11 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE2,
.gpio = 0x2000,
},
+ .mute = {
+ .name = name_mute,
+ .amux = LINE2,
+ .gpio = 0x8000,
+ },
},
[SAA7134_BOARD_FLYVIDEO2000] = {
/* "TC Wan" <tcwan@cs.usm.my> */
@@ -240,6 +245,11 @@ struct saa7134_board saa7134_boards[] = {
.amux = TV,
.gpio = 0x00000, /* GP16=0 selects FM radio antenna */
},
+ .mute = {
+ .name = name_mute,
+ .amux = LINE2,
+ .gpio = 0x10000,
+ },
},
[SAA7134_BOARD_EMPRESS] = {
/* "Gert Vervoort" <gert.vervoort@philips.com> */
@@ -683,6 +693,12 @@ struct saa7134_board saa7134_boards[] = {
.amux = TV,
.gpio = 0x200000,
},
+ .mute = {
+ .name = name_mute,
+ .amux = LINE2,
+ .gpio = 0x0000,
+ },
+
},
[SAA7134_BOARD_VA1000POWER] = {
.name = "AOPEN VA1000 POWER",
@@ -1475,6 +1491,11 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE1,
.gpio = 0x01,
},
+ .mute = {
+ .name = name_mute,
+ .amux = LINE1,
+ .gpio = 0x00,
+ },
},
[SAA7134_BOARD_AVERMEDIA_GO_007_FM] = {
.name = "Avermedia AVerTV GO 007 FM",
@@ -1507,6 +1528,11 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE1,
.gpio = 0x00300001,
},
+ .mute = {
+ .name = name_mute,
+ .amux = LINE1,
+ .gpio = 0x01,
+ },
},
[SAA7134_BOARD_AVERMEDIA_CARDBUS] = {
/* Kees.Blom@cwi.nl */
@@ -1850,6 +1876,11 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE1,
.gpio = 0x100,
},
+ .mute = {
+ .name = name_mute,
+ .amux = LINE1,
+ .gpio = 0x000,
+ },
},
[SAA7134_BOARD_THYPHOON_DVBT_DUO_CARDBUS] = {
.name = "Typhoon DVB-T Duo Digital/Analog Cardbus",
@@ -1966,6 +1997,11 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE1,
.gpio = 0x100,
},
+ .mute = {
+ .name = name_mute,
+ .amux = LINE1,
+ .gpio = 0x000,
+ },
},
};
diff --git a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
index 88a132edd..692190e25 100644
--- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
+++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-tvaudio.c,v 1.28 2005/06/17 19:41:34 nsh Exp $
+ * $Id: saa7134-tvaudio.c,v 1.29 2005/06/22 22:31:38 nsh Exp $
*
* device driver for philips saa7134 based TV cards
* tv audio decoder (fm stereo, nicam, ...)
@@ -219,12 +219,15 @@ static void mute_input_7134(struct saa7134_dev *dev)
in = dev->input;
mute = (dev->ctl_mute ||
(dev->automute && (&card(dev).radio) != in));
- if (PCI_DEVICE_ID_PHILIPS_SAA7130 == dev->pci->device &&
- card(dev).mute.name) {
- /* 7130 - we'll mute using some unconnected audio input */
+ if (card(dev).mute.name) {
+ /*
+ * 7130 - we'll mute using some unconnected audio input
+ * 7134 - we'll probably should switch external mux with gpio
+ */
if (mute)
in = &card(dev).mute;
}
+
if (dev->hw_mute == mute &&
dev->hw_input == in) {
dprintk("mute/input: nothing to do [mute=%d,input=%s]\n",
@@ -260,6 +263,7 @@ static void mute_input_7134(struct saa7134_dev *dev)
/* switch gpio-connected external audio mux */
if (0 == card(dev).gpiomask)
return;
+
mask = card(dev).gpiomask;
saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, mask, mask);
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, mask, in->gpio);
@@ -769,6 +773,7 @@ static int mute_input_7133(struct saa7134_dev *dev)
u32 reg = 0;
u32 xbarin, xbarout;
int mask;
+ struct saa7134_input *in;
/* Hac 0506 route OSS sound simultanously */
xbarin = 0x03;
@@ -799,10 +804,17 @@ static int mute_input_7133(struct saa7134_dev *dev)
/* switch gpio-connected external audio mux */
if (0 != card(dev).gpiomask) {
mask = card(dev).gpiomask;
+
+ if (card(dev).mute.name && dev->ctl_mute)
+ in = &card(dev).mute;
+ else
+ in = dev->input;
+
saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, mask, mask);
- saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, mask, dev->input->gpio);
- saa7134_track_gpio(dev,dev->input->name);
+ saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, mask, in->gpio);
+ saa7134_track_gpio(dev,in->name);
}
+
return 0;
}
diff --git a/linux/drivers/media/video/tuner-simple.c b/linux/drivers/media/video/tuner-simple.c
index 164c0b2e4..a0c5d471f 100644
--- a/linux/drivers/media/video/tuner-simple.c
+++ b/linux/drivers/media/video/tuner-simple.c
@@ -1,5 +1,5 @@
/*
- * $Id: tuner-simple.c,v 1.31 2005/06/21 16:02:25 mkrufky Exp $
+ * $Id: tuner-simple.c,v 1.32 2005/06/22 22:31:38 nsh Exp $
*
* i2c tv tuner chip device driver
* controls all those simple 4-control-bytes style tuners.
@@ -212,21 +212,16 @@ static struct tunertype tuners[] = {
16*160.00,16*442.00,0x01,0x02,0x04,0xce,623 },
{ "Philips FQ1236A MK4", Philips, NTSC,
16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732 },
-
- /* Should work for TVF8531MF, TVF8831MF, TVF8731MF */
- { "Ymec TVision TVF-8531MF", Philips, NTSC,
+ { "Ymec TVision TVF-8531MF/8831MF/8731MF", Philips, NTSC,
16*160.00,16*454.00,0xa0,0x90,0x30,0x8e,732},
{ "Ymec TVision TVF-5533MF", Philips, NTSC,
16*160.00,16*454.00,0x01,0x02,0x04,0x8e,732},
{ "Thomson DDT 7611 (ATSC/NTSC)", THOMSON, ATSC,
16*157.25,16*454.00,0x39,0x3a,0x3c,0x8e,732},
- /* Should work for TNF9533-D/IF, TNF9533-B/DF */
- { "Tena TNF9533-D/IF", Philips, PAL,
+ { "Tena TNF9533-D/IF/TNF9533-B/DF", Philips, PAL,
16*160.25,16*464.25,0x01,0x02,0x04,0x8e,623},
-
- /* This entry is for TEA5767 FM radio only chip used on several boards w/TV tuner */
{ TEA5767_TUNER_NAME, Philips, RADIO,
- -1, -1, 0, 0, 0, TEA5767_LOW_LO_32768,0},
+ /* see tea5767.c for details */},
{ "Philips FMD1216ME MK3 Hybrid Tuner", Philips, PAL,
16*160.00,16*442.00,0x51,0x52,0x54,0x86,623 },
};