Commit b8c2870b authored by Michael Hunold's avatar Michael Hunold Committed by Linus Torvalds

[PATCH] DVB: misc. updates to the dvb-core

- [DVB] ttusb_dec: add new 2000T type model number
- [DVB] dvb_ca_en50221: properly zero out private pointer
- [DVB] dvb-bt8xx: properly use a mutex when starting/stopping the dma engine, remove card list, it's not need anymore
- [DVB] bt878: fix hex <=> dec typo (missing 0x prefix), mark remove bt878_remove() function __devexit_p
- [DVB] dvb-core: add dvb_net_debug module parameter, remove some dead code
Signed-off-by: default avatarMichael Hunold <hunold@linuxtv.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a8ce6c87
......@@ -41,9 +41,9 @@ contains detailed installation instructions for the
various bt8xx based "budget" DVB cards
(Nebula, Pinnacle PCTV, Twinhan DST)
"vp7041.txt"
contains detailed informations about the
Visionplus VisionDTV USB-Ter DVB-T adapter.
"README.dibusb"
contains detailed information about adapters
based on DiBcom reference design.
"udev.txt"
how to get DVB and udev up and running.
......
......@@ -511,7 +511,7 @@ static void __devexit bt878_remove(struct pci_dev *pci_dev)
printk("bt878(%d): unloading\n", bt->nr);
/* turn off all capturing, DMA and IRQs */
btand(~13, BT878_AGPIO_DMA_CTL);
btand(~0x13, BT878_AGPIO_DMA_CTL);
/* first disable interrupts before unmapping the memory! */
btwrite(0, BT878_AINT_MASK);
......@@ -554,7 +554,7 @@ static struct pci_driver bt878_pci_driver = {
.name = "bt878",
.id_table = bt878_pci_tbl,
.probe = bt878_probe,
.remove = __devexit_p(bt878_remove),
.remove = bt878_remove,
};
static int bt878_pci_driver_registered = 0;
......
......@@ -68,20 +68,21 @@ static int dvb_bt8xx_start_feed(struct dvb_demux_feed *dvbdmxfeed)
{
struct dvb_demux *dvbdmx = dvbdmxfeed->demux;
struct dvb_bt8xx_card *card = dvbdmx->priv;
int rc;
dprintk("dvb_bt8xx: start_feed\n");
if (!dvbdmx->dmx.frontend)
return -EINVAL;
if (card->active)
return 0;
card->active = 1;
// bt878_start(card->bt, card->gpio_mode);
return 0;
down(&card->lock);
card->nfeeds++;
rc = card->nfeeds;
if (card->nfeeds == 1)
bt878_start(card->bt, card->gpio_mode,
card->op_sync_orin, card->irq_err_ignore);
up(&card->lock);
return rc;
}
static int dvb_bt8xx_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
......@@ -94,12 +95,11 @@ static int dvb_bt8xx_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
if (!dvbdmx->dmx.frontend)
return -EINVAL;
if (!card->active)
return 0;
// bt878_stop(card->bt);
card->active = 0;
down(&card->lock);
card->nfeeds--;
if (card->nfeeds == 0)
bt878_stop(card->bt);
up(&card->lock);
return 0;
}
......@@ -207,8 +207,6 @@ static int __init dvb_bt8xx_load_card( struct dvb_bt8xx_card *card)
tasklet_init(&card->bt->tasklet, dvb_bt8xx_task, (unsigned long) card);
bt878_start(card->bt, card->gpio_mode, card->op_sync_orin, card->irq_err_ignore);
return 0;
}
......@@ -223,6 +221,7 @@ static int dvb_bt8xx_probe(struct device *dev)
return -ENOMEM;
memset(card, 0, sizeof(*card));
init_MUTEX(&card->lock);
card->bttv_nr = sub->core->nr;
strncpy(card->card_name, sub->core->name, sizeof(sub->core->name));
card->i2c_adapter = &sub->core->i2c_adap;
......@@ -230,6 +229,9 @@ static int dvb_bt8xx_probe(struct device *dev)
switch(sub->core->type)
{
case BTTV_PINNACLESAT:
#ifdef BTTV_DVICO_DVBT_LITE
case BTTV_DVICO_DVBT_LITE:
#endif
card->gpio_mode = 0x0400C060;
card->op_sync_orin = 0;
card->irq_err_ignore = 0;
......@@ -287,7 +289,10 @@ static int dvb_bt8xx_probe(struct device *dev)
}
if (!(card->bt = dvb_bt8xx_878_match(card->bttv_nr, bttv_pci_dev))) {
printk("dvb_bt8xx: unable to determine DMA core of card %d\n", card->bttv_nr);
printk("dvb_bt8xx: unable to determine DMA core of card %d,\n",
card->bttv_nr);
printk("dvb_bt8xx: if you have the ALSA bt87x audio driver "
"installed, try removing it.\n");
kfree(card);
return -EFAULT;
......@@ -321,7 +326,6 @@ static int dvb_bt8xx_remove(struct device *dev)
dvb_dmx_release(&card->demux);
dvb_unregister_adapter(card->dvb_adapter);
list_del(&card->list);
kfree(card);
return 0;
......
......@@ -28,8 +28,8 @@
#include "bttv.h"
struct dvb_bt8xx_card {
struct list_head list;
u8 active;
struct semaphore lock;
int nfeeds;
char card_name[32];
struct dvb_adapter *dvb_adapter;
struct bt878 *bt;
......
......@@ -1500,6 +1500,7 @@ static struct file_operations dvb_ca_fops = {
};
static struct dvb_device dvbdev_ca = {
.priv = NULL,
.users = 1,
.readers= 1,
.writers= 1,
......
......@@ -37,10 +37,18 @@
#include <linux/uio.h>
#include <asm/uaccess.h>
#include <linux/crc32.h>
#include <linux/version.h>
#include "dvb_demux.h"
#include "dvb_net.h"
static int dvb_net_debug;
module_param(dvb_net_debug, int, 0444);
MODULE_PARM_DESC(dvb_net_debug, "enable debug messages");
#define dprintk(x...) do { if (dvb_net_debug) printk(x); } while (0)
static inline __u32 iov_crc32( __u32 c, struct kvec *iov, unsigned int cnt )
{
unsigned int j;
......@@ -50,13 +58,6 @@ static inline __u32 iov_crc32( __u32 c, struct kvec *iov, unsigned int cnt )
}
#if 1
#define dprintk(x...) printk(x)
#else
#define dprintk(x...)
#endif
#define DVB_NET_MULTICAST_MAX 10
#define isprint(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'))
......
......@@ -4,7 +4,7 @@
Copyright (C) 2001 Holger Waechtler <holger@convergence.de>
for Convergence Integrated Media GmbH
Marko Kohtala <marko.kohtala@nokia.com>
Marko Kohtala <marko.kohtala@luukku.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
......
......@@ -1293,6 +1293,7 @@ static int ttusb_dec_init_stb(struct ttusb_dec *dec)
ttusb_dec_set_model(dec, TTUSB_DEC3000S);
break;
case 0x00070009:
case 0x00070013:
ttusb_dec_set_model(dec, TTUSB_DEC2000T);
break;
case 0x00070011:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment