summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-03-31 11:16:51 +0000
committerGerd Knorr <devnull@localhost>2004-03-31 11:16:51 +0000
commit3bf8c8eecd3ab551d20971918bcf4afa4386f852 (patch)
tree6ec87b657d243741c4df1d7f4bfbdabaf3482f09 /linux/drivers/media
parent36d7cde6dadca8d39ecdc9deb9ba6df3e95a1125 (diff)
downloadmediapointer-dvb-s2-3bf8c8eecd3ab551d20971918bcf4afa4386f852.tar.gz
mediapointer-dvb-s2-3bf8c8eecd3ab551d20971918bcf4afa4386f852.tar.bz2
- make bttv hw i2c configurable per card, enable for twinhan dst.
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/bttv-cards.c4
-rw-r--r--linux/drivers/media/video/bttv-driver.c2
-rw-r--r--linux/drivers/media/video/bttv-i2c.c15
-rw-r--r--linux/drivers/media/video/bttvp.h1
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-cards.c2
5 files changed, 14 insertions, 10 deletions
diff --git a/linux/drivers/media/video/bttv-cards.c b/linux/drivers/media/video/bttv-cards.c
index 538a8c437..eff9a759e 100644
--- a/linux/drivers/media/video/bttv-cards.c
+++ b/linux/drivers/media/video/bttv-cards.c
@@ -2380,6 +2380,9 @@ void __devinit bttv_init_card1(struct bttv *btv)
case BTTV_HAUPPAUGEPVR:
pvr_boot(btv);
break;
+ case BTTV_TWINHAN_DST:
+ btv->use_i2c_hw = 1;
+ break;
}
}
@@ -3960,7 +3963,6 @@ int __devinit bttv_handle_chipset(struct bttv *btv)
static void PXC200_muxsel(struct bttv *btv, unsigned int input)
{
int rc;
- unsigned int tmp;
long mux;
int bitmask;
unsigned char buf[2];
diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c
index e91096618..476f0d096 100644
--- a/linux/drivers/media/video/bttv-driver.c
+++ b/linux/drivers/media/video/bttv-driver.c
@@ -799,7 +799,7 @@ static void bt848_bright(struct bttv *btv, int bright)
{
int value;
- printk("bttv: set bright: %d\n",bright);
+ // printk("bttv: set bright: %d\n",bright); // DEBUG
btv->bright = bright;
/* We want -128 to 127 we get 0-65535 */
diff --git a/linux/drivers/media/video/bttv-i2c.c b/linux/drivers/media/video/bttv-i2c.c
index a405e5124..742ce8eaa 100644
--- a/linux/drivers/media/video/bttv-i2c.c
+++ b/linux/drivers/media/video/bttv-i2c.c
@@ -414,12 +414,12 @@ void __devinit bttv_readee(struct bttv *btv, unsigned char *eedata, int addr)
/* init + register i2c algo-bit adapter */
int __devinit init_bttv_i2c(struct bttv *btv)
{
- int use_hw = (btv->id == 878) && i2c_hw;
-
memcpy(&btv->i2c_client, &bttv_i2c_client_template,
sizeof(bttv_i2c_client_template));
- if (use_hw) {
+ if (i2c_hw)
+ btv->use_i2c_hw = 1;
+ if (btv->use_i2c_hw) {
/* bt878 */
memcpy(&btv->c.i2c_adap, &bttv_i2c_adap_hw_template,
sizeof(bttv_i2c_adap_hw_template));
@@ -437,12 +437,13 @@ int __devinit init_bttv_i2c(struct bttv *btv)
btv->c.i2c_adap.dev.parent = &btv->c.pci->dev;
#endif
snprintf(btv->c.i2c_adap.name, sizeof(btv->c.i2c_adap.name),
- "bt%d #%d [%s]", btv->id, btv->c.nr, use_hw ? "hw" : "sw");
+ "bt%d #%d [%s]", btv->id, btv->c.nr,
+ btv->use_i2c_hw ? "hw" : "sw");
i2c_set_adapdata(&btv->c.i2c_adap, btv);
btv->i2c_client.adapter = &btv->c.i2c_adap;
- if (use_hw) {
+ if (btv->use_i2c_hw) {
btv->i2c_rc = i2c_add_adapter(&btv->c.i2c_adap);
} else {
bttv_bit_setscl(btv,1);
@@ -454,12 +455,10 @@ int __devinit init_bttv_i2c(struct bttv *btv)
int __devexit fini_bttv_i2c(struct bttv *btv)
{
- int use_hw = (btv->id == 878) && i2c_hw;
-
if (0 != btv->i2c_rc)
return 0;
- if (use_hw) {
+ if (btv->use_i2c_hw) {
return i2c_del_adapter(&btv->c.i2c_adap);
} else {
return i2c_bit_del_bus(&btv->c.i2c_adap);
diff --git a/linux/drivers/media/video/bttvp.h b/linux/drivers/media/video/bttvp.h
index 392b20170..1268db128 100644
--- a/linux/drivers/media/video/bttvp.h
+++ b/linux/drivers/media/video/bttvp.h
@@ -316,6 +316,7 @@ struct bttv {
struct bttv_pll_info pll;
int triton1;
int gpioirq;
+ int use_i2c_hw;
/* old gpio interface */
wait_queue_head_t gpioq;
diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c
index f60777a6e..afee20b3c 100644
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -506,6 +506,8 @@ struct saa7134_board saa7134_boards[] = {
}},
},
[SAA7134_BOARD_ASUSTeK_TVFM7134] = {
+ // NTSC versions of the card seem to have
+ // TUNER_LG_NTSC_NEW_TAPC (39)
.name = "ASUS TV-FM 7134",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,