summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
authorFlorian Schirmer <devnull@localhost>2003-01-21 19:41:44 +0000
committerFlorian Schirmer <devnull@localhost>2003-01-21 19:41:44 +0000
commitbbd7b7e9c3558684cbf1d1a0f7555cba0ca08f29 (patch)
treebf3a424c64368477bf0ebce1fca3c12633bf1798 /linux/drivers/media/dvb
parenta59dd5cb636e1e8e352f5693eb672315a67f592e (diff)
downloadmediapointer-dvb-s2-bbd7b7e9c3558684cbf1d1a0f7555cba0ca08f29.tar.gz
mediapointer-dvb-s2-bbd7b7e9c3558684cbf1d1a0f7555cba0ca08f29.tar.bz2
Make some things generic
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c18
-rw-r--r--linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h1
2 files changed, 11 insertions, 8 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
index 6eed67fc6..c0e037a84 100644
--- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -225,7 +225,7 @@ static int dvb_bt8xx_start_feed(struct dvb_demux_feed *dvbdmxfeed)
card->active = 1;
- bt878_start(&bt878[0], (0 << 26) | (0 << 15) | (1 << 14) | (0 << 6) | (1 << 5));
+ bt878_start(&bt878[0], card->gpio_mode);
return 0;
@@ -246,22 +246,26 @@ static int dvb_bt8xx_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
return 0;
bt878_stop(&bt878[0]);
+
card->active = 0;
return 0;
}
-static int __init dvb_bt8xx_load(unsigned int bttv_nr)
+static int __init dvb_bt8xx_load(unsigned int bttv_nr, char *card_name, u32 gpio_mode)
{
struct dvb_bt8xx_card *card;
int result;
-
+
+ dprintk("dvb_bt8xx: identified card%d as Nebula DigiTV DVB-T card\n", bttv_nr);
+
if (!(card = kmalloc(sizeof(struct dvb_bt8xx_card), GFP_KERNEL)))
return -ENOMEM;
card->bttv_nr = bttv_nr;
+ card->gpio_mode = gpio_mode;
if (!(card->i2c_adap = bttv_get_i2c_adap(card->bttv_nr))) {
@@ -273,7 +277,7 @@ static int __init dvb_bt8xx_load(unsigned int bttv_nr)
}
- if ((result = dvb_register_adapter(&card->adapter, "Bt8xx based DVB adapter")) < 0) {
+ if ((result = dvb_register_adapter(&card->adapter, card_name)) < 0) {
printk("dvb_bt8xx: dvb_register_adapter failed (errno = %d)\n", result);
@@ -297,7 +301,7 @@ static int __init dvb_bt8xx_load(unsigned int bttv_nr)
memset(&card->demux, 0, sizeof(struct dvb_demux));
- card->demux.dmx.vendor = "Connexant";
+ card->demux.dmx.vendor = card_name;
card->demux.dmx.model = "Software";
card->demux.dmx.id = "demux0_0";
card->demux.dmx.capabilities = DMX_TS_FILTERING | DMX_SECTION_FILTERING | DMX_MEMORY_BASED_FILTERING;
@@ -440,9 +444,7 @@ static int __init dvb_bt8xx_init(void)
if (card_id == 0x01010071) {
- dprintk("dvb_bt8xx: identified card%d as Nebula DigiTV DVB-T card\n", card_nr);
-
- if ((result = dvb_bt8xx_load(card_nr)) < 0) {
+ if ((result = dvb_bt8xx_load(card_nr, "Nebula DigiTV DVB-T", (1 << 26) | (1 << 14) | (1 << 5))) < 0) {
dvb_bt8xx_close();
diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h
index cfae087e9..fe776a29c 100644
--- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h
+++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h
@@ -35,6 +35,7 @@ struct dvb_bt8xx_card {
dmxdev_t dmxdev;
dmx_frontend_t fe_hw;
dmx_frontend_t fe_mem;
+ u32 gpio_mode;
struct i2c_adapter *i2c_adap;
};