summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-07-30 11:14:05 +0000
committerGerd Knorr <devnull@localhost>2004-07-30 11:14:05 +0000
commitbc8eeb034d24fe27a013559c33c496c2fd4a678b (patch)
tree82f3f83ac89b2469abb64bcd332533b7d2b18818 /linux
parent93b2339c38d21f324ed5945efa4712385601341c (diff)
downloadmediapointer-dvb-s2-bc8eeb034d24fe27a013559c33c496c2fd4a678b.tar.gz
mediapointer-dvb-s2-bc8eeb034d24fe27a013559c33c496c2fd4a678b.tar.bz2
- cx88: more reorganization stuff.
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/cx88/cx88-alsa.c5
-rw-r--r--linux/drivers/media/video/cx88/cx88-cards.c25
-rw-r--r--linux/drivers/media/video/cx88/cx88-core.c127
-rw-r--r--linux/drivers/media/video/cx88/cx88-mpeg.c58
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c133
-rw-r--r--linux/drivers/media/video/cx88/cx88.h42
6 files changed, 219 insertions, 171 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c
index e54fd1f23..b8e85aadd 100644
--- a/linux/drivers/media/video/cx88/cx88-alsa.c
+++ b/linux/drivers/media/video/cx88/cx88-alsa.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-alsa.c,v 1.1 2004/07/29 21:35:48 kraxel Exp $
+ * $Id: cx88-alsa.c,v 1.2 2004/07/30 11:14:05 kraxel Exp $
*
* Support for audio capture
* PCI function #1 of the cx2388x.
@@ -77,7 +77,8 @@ static int __devinit cx8801_initdev(struct pci_dev *pci_dev,
goto fail_core;
}
- printk("%s/1: alsa dummy module loaded\n",core->name);
+ printk("%s/1: no alsa support yet, this is just a dummy module\n",
+ core->name);
pci_set_drvdata(pci_dev,dev);
return 0;
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c
index 84d7a6a29..9bca7ea75 100644
--- a/linux/drivers/media/video/cx88/cx88-cards.c
+++ b/linux/drivers/media/video/cx88/cx88-cards.c
@@ -318,6 +318,27 @@ struct cx88_board cx88_boards[] = {
.type = CX88_VMUX_SVIDEO,
.vmux = 2,
}},
+ .dvb = 1,
+ },
+ [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
+ .name = "DVICO FusionHDTV DVB-T1",
+ .tuner_type = TUNER_ABSENT, /* No analog tuner */
+ .input = {{
+ .type = CX88_VMUX_COMPOSITE1,
+ .vmux = 0,
+ .gpio0 = 0x000027df,
+ },{
+ .type = CX88_VMUX_SVIDEO,
+ .vmux = 1,
+ .gpio0 = 0x000027df,
+ }},
+ .dvb = 1,
+#if 0
+ .ts = {
+ .type = CX88_TS,
+ .gpio0 = 0x00000101, /* Hooked to tuner reset bit */
+ }
+#endif
},
};
const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards);
@@ -386,6 +407,10 @@ struct cx88_subid cx88_subids[] = {
.subvendor = 0x17de,
.subdevice = 0x08a6,
.card = CX88_BOARD_KWORLD_DVB_T,
+ },{
+ .subvendor = 0x18AC,
+ .subdevice = 0xDB00,
+ .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
}
};
const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c
index 31ad10653..b0d80a681 100644
--- a/linux/drivers/media/video/cx88/cx88-core.c
+++ b/linux/drivers/media/video/cx88/cx88-core.c
@@ -29,6 +29,7 @@
#include <linux/sound.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
+#include <linux/delay.h>
#include <linux/videodev.h>
#include "cx88.h"
@@ -55,7 +56,7 @@ static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
MODULE_PARM(card,"1-" __stringify(CX88_MAXBOARDS) "i");
MODULE_PARM_DESC(card,"card type");
-#define dprintk(fmt, arg...) if (core_debug) \
+#define dprintk(level,fmt, arg...) if (core_debug >= level) \
printk(KERN_DEBUG "%s: " fmt, core->name , ## arg)
static unsigned int cx88_devcount;
@@ -382,7 +383,7 @@ int cx88_sram_channel_setup(struct cx88_core *core,
cx_write(ch->cnt1_reg, (bpl >> 3) -1);
cx_write(ch->cnt2_reg, (lines*16) >> 3);
- dprintk("sram setup %s: bpl=%d lines=%d\n", ch->name, bpl, lines);
+ dprintk(1,"sram setup %s: bpl=%d lines=%d\n", ch->name, bpl, lines);
return 0;
}
@@ -513,6 +514,14 @@ char *cx88_vid_irqs[32] = {
"y_sync", "u_sync", "v_sync", "vbi_sync",
"opc_err", "par_err", "rip_err", "pci_abort",
};
+char *cx88_mpeg_irqs[32] = {
+ "ts_risci1", NULL, NULL, NULL,
+ "ts_risci2", NULL, NULL, NULL,
+ "ts_oflow", NULL, NULL, NULL,
+ "ts_sync", NULL, NULL, NULL,
+ "opc_err", "par_err", "rip_err", "pci_abort",
+ "ts_err?",
+};
void cx88_print_irqbits(char *name, char *tag, char **strings,
u32 bits, u32 mask)
@@ -533,6 +542,113 @@ void cx88_print_irqbits(char *name, char *tag, char **strings,
/* ------------------------------------------------------------------ */
+void cx88_irq(struct cx88_core *core, u32 status, u32 mask)
+{
+ cx88_print_irqbits(core->name, "irq pci",
+ cx88_pci_irqs, status, mask);
+}
+
+void cx88_wakeup(struct cx88_core *core,
+ struct cx88_dmaqueue *q, u32 count)
+{
+ struct cx88_buffer *buf;
+
+ for (;;) {
+ if (list_empty(&q->active))
+ break;
+ buf = list_entry(q->active.next,
+ struct cx88_buffer, vb.queue);
+ if (buf->count > count)
+ break;
+ do_gettimeofday(&buf->vb.ts);
+ dprintk(2,"[%p/%d] wakeup reg=%d buf=%d\n",buf,buf->vb.i,
+ count, buf->count);
+ buf->vb.state = STATE_DONE;
+ list_del(&buf->vb.queue);
+ wake_up(&buf->vb.done);
+ }
+ if (list_empty(&q->active)) {
+ del_timer(&q->timeout);
+ } else {
+ mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT);
+ }
+}
+
+void cx88_shutdown(struct cx88_core *core)
+{
+ /* disable RISC controller + IRQs */
+ cx_write(MO_DEV_CNTRL2, 0);
+
+ /* stop dma transfers */
+ cx_write(MO_VID_DMACNTRL, 0x0);
+ cx_write(MO_AUD_DMACNTRL, 0x0);
+ cx_write(MO_TS_DMACNTRL, 0x0);
+ cx_write(MO_VIP_DMACNTRL, 0x0);
+ cx_write(MO_GPHST_DMACNTRL, 0x0);
+
+ /* stop interupts */
+ cx_write(MO_PCI_INTMSK, 0x0);
+ cx_write(MO_VID_INTMSK, 0x0);
+ cx_write(MO_AUD_INTMSK, 0x0);
+ cx_write(MO_TS_INTMSK, 0x0);
+ cx_write(MO_VIP_INTMSK, 0x0);
+ cx_write(MO_GPHST_INTMSK, 0x0);
+
+ /* stop capturing */
+ cx_write(VID_CAPTURE_CONTROL, 0);
+}
+
+int cx88_reset(struct cx88_core *core)
+{
+ dprintk(1,"%s\n",__FUNCTION__);
+ cx88_shutdown(core);
+
+ /* clear irq status */
+ cx_write(MO_VID_INTSTAT, 0xFFFFFFFF); // Clear PIV int
+ cx_write(MO_PCI_INTSTAT, 0xFFFFFFFF); // Clear PCI int
+ cx_write(MO_INT1_STAT, 0xFFFFFFFF); // Clear RISC int
+
+ /* wait a bit */
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(HZ/10);
+
+ /* init sram */
+ cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH21], 720*4, 0);
+ cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH22], 128, 0);
+ cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH23], 128, 0);
+ cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH24], 128, 0);
+ cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH25], 128, 0);
+ cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH26], 128, 0);
+ cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH28], 512, 0);
+
+ /* misc init ... */
+ cx_write(MO_INPUT_FORMAT, ((1 << 13) | // agc enable
+ (1 << 12) | // agc gain
+ (1 << 11) | // adaptibe agc
+ (0 << 10) | // chroma agc
+ (0 << 9) | // ckillen
+ (7)));
+
+ /* setup image format */
+ cx_andor(MO_COLOR_CTRL, 0x4000, 0x4000);
+
+ /* setup FIFO Threshholds */
+ cx_write(MO_PDMA_STHRSH, 0x0807);
+ cx_write(MO_PDMA_DTHRSH, 0x0807);
+
+ /* fixes flashing of image */
+ cx_write(MO_AGC_SYNC_TIP1, 0x0380000F);
+ cx_write(MO_AGC_BACK_VBI, 0x00E00555);
+
+ cx_write(MO_VID_INTSTAT, 0xFFFFFFFF); // Clear PIV int
+ cx_write(MO_PCI_INTSTAT, 0xFFFFFFFF); // Clear PCI int
+ cx_write(MO_INT1_STAT, 0xFFFFFFFF); // Clear RISC int
+
+ return 0;
+}
+
+/* ------------------------------------------------------------------ */
+
static int cx88_pci_quirks(char *name, struct pci_dev *pci)
{
unsigned int lat = UNSET;
@@ -687,7 +803,9 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci)
core->tda9887_conf = cx88_boards[core->board].tda9887_conf;
/* init hardware */
+ cx88_reset(core);
cx88_i2c_init(core,pci);
+ cx88_card_setup(core);
up(&devlist);
return core;
@@ -724,6 +842,11 @@ EXPORT_SYMBOL(cx88_pci_irqs);
EXPORT_SYMBOL(cx88_vid_irqs);
EXPORT_SYMBOL(cx88_print_irqbits);
+EXPORT_SYMBOL(cx88_irq);
+EXPORT_SYMBOL(cx88_wakeup);
+EXPORT_SYMBOL(cx88_reset);
+EXPORT_SYMBOL(cx88_shutdown);
+
EXPORT_SYMBOL(cx88_risc_buffer);
EXPORT_SYMBOL(cx88_risc_stopper);
EXPORT_SYMBOL(cx88_free_buffer);
diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c
index f5fb18ee8..eca7b012a 100644
--- a/linux/drivers/media/video/cx88/cx88-mpeg.c
+++ b/linux/drivers/media/video/cx88/cx88-mpeg.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-mpeg.c,v 1.1 2004/07/29 21:35:48 kraxel Exp $
+ * $Id: cx88-mpeg.c,v 1.2 2004/07/30 11:14:05 kraxel Exp $
*
* Support for the mpeg transport stream transfers
* PCI function #2 of the cx2388x.
@@ -426,9 +426,9 @@ static void cx8802_timeout(unsigned long data)
spin_unlock_irqrestore(&dev->slock,flags);
}
-#if 0
static void cx8802_mpeg_irq(struct cx8802_dev *dev)
{
+ struct cx88_core *core = dev->core;
u32 status, mask, count;
status = cx_read(MO_TS_INTSTAT);
@@ -437,34 +437,32 @@ static void cx8802_mpeg_irq(struct cx8802_dev *dev)
return;
cx_write(MO_TS_INTSTAT, status);
- //if (irq_debug || (status & mask & ~0xff))
- cx88_print_irqbits(dev->name, "irq mpegport ",
+ if (mpeg_debug || (status & mask & ~0xff))
+ cx88_print_irqbits(core->name, "irq mpeg ",
cx88_vid_irqs, status, mask);
/* risc op code error */
if (status & (1 << 16)) {
- printk(KERN_WARNING "%s: mpegport risc op code error\n",dev->name);
+ printk(KERN_WARNING "%s: mpeg risc op code error\n",core->name);
cx_clear(MO_TS_DMACNTRL, 0x11);
- //cx_clear(VID_CAPTURE_CONTROL, 0x06);
- cx88_sram_channel_dump(dev, &cx88_sram_channels[SRAM_CH28]);
+ cx88_sram_channel_dump(dev->core, &cx88_sram_channels[SRAM_CH28]);
}
/* risc1 y */
if (status & 0x01) {
spin_lock(&dev->slock);
count = cx_read(MO_TS_GPCNT);
- cx8802_wakeup(dev, &dev->mpegq, count);
+ cx88_wakeup(dev->core, &dev->mpegq, count);
spin_unlock(&dev->slock);
}
/* risc2 y */
if (status & 0x10) { /* I don't know what this does/when it's needed */
spin_lock(&dev->slock);
- cx8802_restart_mpegport_queue(dev,&dev->mpegq);
+ cx8802_restart_queue(dev,&dev->mpegq);
spin_unlock(&dev->slock);
}
}
-#endif
static irqreturn_t cx8802_irq(int irq, void *dev_id, struct pt_regs *regs)
{
@@ -474,17 +472,17 @@ static irqreturn_t cx8802_irq(int irq, void *dev_id, struct pt_regs *regs)
int loop, handled = 0;
for (loop = 0; loop < 10; loop++) {
- status = cx_read(MO_PCI_INTSTAT);
+ status = cx_read(MO_PCI_INTSTAT) & (~0x1f | 0x04);
mask = cx_read(MO_PCI_INTMSK);
if (0 == (status & mask))
goto out;
handled = 1;
cx_write(MO_PCI_INTSTAT, status);
-#if 0 /* FIXME */
- if (status & 1)
- cx8800_mpeg_irq(dev);
-#endif
+ if (status & mask & ~0x1f)
+ cx88_irq(core,status,mask);
+ if (status & 0x04)
+ cx8802_mpeg_irq(dev);
};
if (10 == loop) {
printk(KERN_WARNING "%s/0: irq loop -- clearing mask\n",
@@ -534,19 +532,6 @@ static int __devinit cx8802_initdev(struct pci_dev *pci_dev,
}
dev->core = core;
- /* look what exactly we have ... */
- if (cx88_boards[core->board].blackbird) {
- printk("%s/2: cx23416 based mpeg encoder (blackbird design)\n",
- core->name);
- /* todo */
- } else {
- printk("%s/2: don't what the mpeg port on this card is used for\n"
- "%s/2: going to ignore it, sorry\n",
- core->name, core->name);
- err = -EINVAL;
- goto fail_core;
- }
-
/* print pci info */
pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, &dev->pci_rev);
pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &dev->pci_lat);
@@ -562,6 +547,23 @@ static int __devinit cx8802_initdev(struct pci_dev *pci_dev,
goto fail_core;
}
+ /* look what exactly we have ... */
+ if (cx88_boards[core->board].blackbird) {
+ printk("%s/2: cx23416 based mpeg encoder (blackbird design)\n",
+ core->name);
+ /* todo */
+ } else if (cx88_boards[core->board].dvb) {
+ printk("%s/2: has DVB support\n",
+ core->name);
+ /* todo */
+ } else {
+ printk("%s/2: don't what the mpeg port on this card is used for\n"
+ "%s/2: going to ignore it, sorry\n",
+ core->name, core->name);
+ err = -EINVAL;
+ goto fail_core;
+ }
+
/* initialize driver struct */
init_MUTEX(&dev->lock);
dev->slock = SPIN_LOCK_UNLOCKED;
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 79ccb4989..120f0db62 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-video.c,v 1.29 2004/07/29 21:35:48 kraxel Exp $
+ * $Id: cx88-video.c,v 1.30 2004/07/30 11:14:05 kraxel Exp $
*
* device driver for Conexant 2388x based TV cards
* video4linux video interface
@@ -2061,32 +2061,6 @@ static void cx8800_vid_timeout(unsigned long data)
spin_unlock_irqrestore(&dev->slock,flags);
}
-static void cx8800_wakeup(struct cx8800_dev *dev,
- struct cx88_dmaqueue *q, u32 count)
-{
- struct cx88_buffer *buf;
-
- for (;;) {
- if (list_empty(&q->active))
- break;
- buf = list_entry(q->active.next,
- struct cx88_buffer, vb.queue);
- if (buf->count > count)
- break;
- do_gettimeofday(&buf->vb.ts);
- dprintk(2,"[%p/%d] wakeup reg=%d buf=%d\n",buf,buf->vb.i,
- count, buf->count);
- buf->vb.state = STATE_DONE;
- list_del(&buf->vb.queue);
- wake_up(&buf->vb.done);
- }
- if (list_empty(&q->active)) {
- del_timer(&q->timeout);
- } else {
- mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT);
- }
-}
-
static void cx8800_vid_irq(struct cx8800_dev *dev)
{
struct cx88_core *core = dev->core;
@@ -2113,7 +2087,7 @@ static void cx8800_vid_irq(struct cx8800_dev *dev)
if (status & 0x01) {
spin_lock(&dev->slock);
count = cx_read(MO_VIDY_GPCNT);
- cx8800_wakeup(dev, &dev->vidq, count);
+ cx88_wakeup(dev->core, &dev->vidq, count);
spin_unlock(&dev->slock);
}
@@ -2121,7 +2095,7 @@ static void cx8800_vid_irq(struct cx8800_dev *dev)
if (status & 0x08) {
spin_lock(&dev->slock);
count = cx_read(MO_VBI_GPCNT);
- cx8800_wakeup(dev, &dev->vbiq, count);
+ cx88_wakeup(dev->core, &dev->vbiq, count);
spin_unlock(&dev->slock);
}
@@ -2150,17 +2124,16 @@ static irqreturn_t cx8800_irq(int irq, void *dev_id, struct pt_regs *regs)
int loop, handled = 0;
for (loop = 0; loop < 10; loop++) {
- status = cx_read(MO_PCI_INTSTAT);
+ status = cx_read(MO_PCI_INTSTAT) & (~0x1f | 0x01);
mask = cx_read(MO_PCI_INTMSK);
if (0 == (status & mask))
goto out;
- handled = 1;
cx_write(MO_PCI_INTSTAT, status);
- if (irq_debug || (status & mask & ~0x1f))
- cx88_print_irqbits(core->name, "irq pci",
- cx88_pci_irqs, status, mask);
+ handled = 1;
- if (status & 1)
+ if (status & mask & ~0x1f)
+ cx88_irq(core,status,mask);
+ if (status & 0x01)
cx8800_vid_irq(dev);
};
if (10 == loop) {
@@ -2226,84 +2199,6 @@ struct video_device cx8800_radio_template =
/* ----------------------------------------------------------- */
-static void cx8800_shutdown(struct cx8800_dev *dev)
-{
- struct cx88_core *core = dev->core;
-
- /* disable RISC controller + IRQs */
- cx_write(MO_DEV_CNTRL2, 0);
-
- /* stop dma transfers */
- cx_write(MO_VID_DMACNTRL, 0x0);
- cx_write(MO_AUD_DMACNTRL, 0x0);
- cx_write(MO_TS_DMACNTRL, 0x0);
- cx_write(MO_VIP_DMACNTRL, 0x0);
- cx_write(MO_GPHST_DMACNTRL, 0x0);
-
- /* stop interupts */
- cx_write(MO_PCI_INTMSK, 0x0);
- cx_write(MO_VID_INTMSK, 0x0);
- cx_write(MO_AUD_INTMSK, 0x0);
- cx_write(MO_TS_INTMSK, 0x0);
- cx_write(MO_VIP_INTMSK, 0x0);
- cx_write(MO_GPHST_INTMSK, 0x0);
-
- /* stop capturing */
- cx_write(VID_CAPTURE_CONTROL, 0);
-}
-
-static int cx8800_reset(struct cx8800_dev *dev)
-{
- struct cx88_core *core = dev->core;
-
- dprintk(1,"cx8800_reset\n");
-
- cx8800_shutdown(dev);
-
- /* clear irq status */
- cx_write(MO_VID_INTSTAT, 0xFFFFFFFF); // Clear PIV int
- cx_write(MO_PCI_INTSTAT, 0xFFFFFFFF); // Clear PCI int
- cx_write(MO_INT1_STAT, 0xFFFFFFFF); // Clear RISC int
-
- /* wait a bit */
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ/10);
-
- /* init sram */
- cx88_sram_channel_setup(dev->core, &cx88_sram_channels[SRAM_CH21], 720*4, 0);
- cx88_sram_channel_setup(dev->core, &cx88_sram_channels[SRAM_CH22], 128, 0);
- cx88_sram_channel_setup(dev->core, &cx88_sram_channels[SRAM_CH23], 128, 0);
- cx88_sram_channel_setup(dev->core, &cx88_sram_channels[SRAM_CH24], 128, 0);
- cx88_sram_channel_setup(dev->core, &cx88_sram_channels[SRAM_CH25], 128, 0);
- cx88_sram_channel_setup(dev->core, &cx88_sram_channels[SRAM_CH26], 128, 0);
- // cx88_sram_channel_setup(dev->core, &cx88_sram_channels[SRAM_CH28], 512, 0);
-
- /* misc init ... */
- cx_write(MO_INPUT_FORMAT, ((1 << 13) | // agc enable
- (1 << 12) | // agc gain
- (1 << 11) | // adaptibe agc
- (0 << 10) | // chroma agc
- (0 << 9) | // ckillen
- (7)));
-
- /* setup image format */
- cx_andor(MO_COLOR_CTRL, 0x4000, 0x4000);
-
- /* setup FIFO Threshholds */
- cx_write(MO_PDMA_STHRSH, 0x0807);
- cx_write(MO_PDMA_DTHRSH, 0x0807);
-
- /* fixes flashing of image */
- cx_write(MO_AGC_SYNC_TIP1, 0x0380000F);
- cx_write(MO_AGC_BACK_VBI, 0x00E00555);
-
- cx_write(MO_VID_INTSTAT, 0xFFFFFFFF); // Clear PIV int
- cx_write(MO_PCI_INTSTAT, 0xFFFFFFFF); // Clear PCI int
- cx_write(MO_INT1_STAT, 0xFFFFFFFF); // Clear RISC int
-
- return 0;
-}
-
static void cx8800_unregister_video(struct cx8800_dev *dev)
{
if (dev->radio_dev) {
@@ -2392,9 +2287,6 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
cx88_risc_stopper(dev->pci,&dev->vbiq.stopper,
MO_VID_DMACNTRL,0x88,0x00);
- /* initialize hardware */
- cx8800_reset(dev);
-
/* get irq */
err = request_irq(pci_dev->irq, cx8800_irq,
SA_SHIRQ | SA_INTERRUPT, core->name, dev);
@@ -2404,9 +2296,6 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
goto fail_core;
}
- /* register i2c bus + load i2c helpers */
- cx88_card_setup(dev->core);
-
/* load and configure helper modules */
if (TUNER_ABSENT != core->tuner_type)
request_module("tuner");
@@ -2490,7 +2379,7 @@ static void __devexit cx8800_finidev(struct pci_dev *pci_dev)
if (dev->tpid >= 0)
wait_for_completion(&dev->texit);
- cx8800_shutdown(dev);
+ cx88_shutdown(dev->core); /* FIXME */
pci_disable_device(pci_dev);
/* unregister stuff */
@@ -2513,7 +2402,7 @@ static int cx8800_suspend(struct pci_dev *pci_dev, u32 state)
printk("%s: suspend %d\n", core->name, state);
- cx8800_shutdown(dev);
+ cx88_shutdown(dev->core); /* FIXME */
del_timer(&dev->vidq.timeout);
pci_save_state(pci_dev, dev->state.pci_cfg);
@@ -2539,7 +2428,7 @@ static int cx8800_resume(struct pci_dev *pci_dev)
pci_restore_state(pci_dev, dev->state.pci_cfg);
/* re-initialize hardware */
- cx8800_reset(dev);
+ cx88_reset(dev->core); /* FIXME */
/* restart video capture */
spin_lock(&dev->slock);
diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h
index a4b508ffa..36a9edacf 100644
--- a/linux/drivers/media/video/cx88/cx88.h
+++ b/linux/drivers/media/video/cx88/cx88.h
@@ -1,5 +1,5 @@
/*
- * $Id: cx88.h,v 1.21 2004/07/29 21:35:48 kraxel Exp $
+ * $Id: cx88.h,v 1.22 2004/07/30 11:14:05 kraxel Exp $
*
* v4l2 device driver for cx2388x based TV cards
*
@@ -133,22 +133,23 @@ extern struct sram_channel cx88_sram_channels[];
/* ----------------------------------------------------------- */
/* card configuration */
-#define CX88_BOARD_NOAUTO UNSET
-#define CX88_BOARD_UNKNOWN 0
-#define CX88_BOARD_HAUPPAUGE 1
-#define CX88_BOARD_GDI 2
-#define CX88_BOARD_PIXELVIEW 3
-#define CX88_BOARD_ATI_WONDER_PRO 4
-#define CX88_BOARD_WINFAST2000XP 5
-#define CX88_BOARD_AVERTV_303 6
-#define CX88_BOARD_MSI_TVANYWHERE_MASTER 7
-#define CX88_BOARD_WINFAST_DV2000 8
-#define CX88_BOARD_LEADTEK_PVR2000 9
-#define CX88_BOARD_IODATA_GVVCP3PCI 10
-#define CX88_BOARD_PROLINK_PLAYTVPVR 11
-#define CX88_BOARD_ASUS_PVR_416 12
-#define CX88_BOARD_MSI_TVANYWHERE 13
-#define CX88_BOARD_KWORLD_DVB_T 14
+#define CX88_BOARD_NOAUTO UNSET
+#define CX88_BOARD_UNKNOWN 0
+#define CX88_BOARD_HAUPPAUGE 1
+#define CX88_BOARD_GDI 2
+#define CX88_BOARD_PIXELVIEW 3
+#define CX88_BOARD_ATI_WONDER_PRO 4
+#define CX88_BOARD_WINFAST2000XP 5
+#define CX88_BOARD_AVERTV_303 6
+#define CX88_BOARD_MSI_TVANYWHERE_MASTER 7
+#define CX88_BOARD_WINFAST_DV2000 8
+#define CX88_BOARD_LEADTEK_PVR2000 9
+#define CX88_BOARD_IODATA_GVVCP3PCI 10
+#define CX88_BOARD_PROLINK_PLAYTVPVR 11
+#define CX88_BOARD_ASUS_PVR_416 12
+#define CX88_BOARD_MSI_TVANYWHERE 13
+#define CX88_BOARD_KWORLD_DVB_T 14
+#define CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1 15
enum cx88_itype {
CX88_VMUX_COMPOSITE1 = 1,
@@ -175,6 +176,7 @@ struct cx88_board {
struct cx88_input input[8];
struct cx88_input radio;
int blackbird:1;
+ int dvb:1;
};
struct cx88_subid {
@@ -380,6 +382,12 @@ extern void cx88_print_irqbits(char *name, char *tag, char **strings,
u32 bits, u32 mask);
extern void cx88_print_ioctl(char *name, unsigned int cmd);
+extern void cx88_irq(struct cx88_core *core, u32 status, u32 mask);
+extern void cx88_wakeup(struct cx88_core *core,
+ struct cx88_dmaqueue *q, u32 count);
+extern void cx88_shutdown(struct cx88_core *core);
+extern int cx88_reset(struct cx88_core *core);
+
extern int
cx88_risc_buffer(struct pci_dev *pci, struct btcx_riscmem *risc,
struct scatterlist *sglist,