diff options
Diffstat (limited to 'drivers/media/video/cx88/cx88-mpeg.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-mpeg.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index 9ade2ae91e9b..fe2767c0ff94 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: cx88-mpeg.c,v 1.26 2005/06/03 13:31:51 mchehab Exp $ | 2 | * $Id: cx88-mpeg.c,v 1.31 2005/07/07 14:17:47 mchehab Exp $ |
3 | * | 3 | * |
4 | * Support for the mpeg transport stream transfers | 4 | * Support for the mpeg transport stream transfers |
5 | * PCI function #2 of the cx2388x. | 5 | * PCI function #2 of the cx2388x. |
@@ -64,17 +64,21 @@ static int cx8802_start_dma(struct cx8802_dev *dev, | |||
64 | /* write TS length to chip */ | 64 | /* write TS length to chip */ |
65 | cx_write(MO_TS_LNGTH, buf->vb.width); | 65 | cx_write(MO_TS_LNGTH, buf->vb.width); |
66 | 66 | ||
67 | #if 1 | ||
68 | /* FIXME: this needs a review. | 67 | /* FIXME: this needs a review. |
69 | * also: move to cx88-blackbird + cx88-dvb source files? */ | 68 | * also: move to cx88-blackbird + cx88-dvb source files? */ |
70 | 69 | ||
71 | if (cx88_boards[core->board].dvb) { | 70 | if (cx88_boards[core->board].dvb) { |
72 | /* negedge driven & software reset */ | 71 | /* negedge driven & software reset */ |
73 | cx_write(TS_GEN_CNTRL, 0x40); | 72 | cx_write(TS_GEN_CNTRL, 0x0040 | dev->ts_gen_cntrl); |
74 | udelay(100); | 73 | udelay(100); |
75 | cx_write(MO_PINMUX_IO, 0x00); | 74 | cx_write(MO_PINMUX_IO, 0x00); |
76 | cx_write(TS_HW_SOP_CNTRL,47<<16|188<<4|0x00); | 75 | cx_write(TS_HW_SOP_CNTRL,0x47<<16|188<<4|0x01); |
77 | cx_write(TS_SOP_STAT,0x00); | 76 | if ((core->board == CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q) || |
77 | (core->board == CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T)) { | ||
78 | cx_write(TS_SOP_STAT, 1<<13); | ||
79 | } else { | ||
80 | cx_write(TS_SOP_STAT, 0x00); | ||
81 | } | ||
78 | cx_write(TS_GEN_CNTRL, dev->ts_gen_cntrl); | 82 | cx_write(TS_GEN_CNTRL, dev->ts_gen_cntrl); |
79 | udelay(100); | 83 | udelay(100); |
80 | } | 84 | } |
@@ -93,7 +97,6 @@ static int cx8802_start_dma(struct cx8802_dev *dev, | |||
93 | cx_write(TS_GEN_CNTRL, 0x06); /* punctured clock TS & posedge driven */ | 97 | cx_write(TS_GEN_CNTRL, 0x06); /* punctured clock TS & posedge driven */ |
94 | udelay(100); | 98 | udelay(100); |
95 | } | 99 | } |
96 | #endif | ||
97 | 100 | ||
98 | /* reset counter */ | 101 | /* reset counter */ |
99 | cx_write(MO_TS_GPCNTRL, GP_COUNT_CONTROL_RESET); | 102 | cx_write(MO_TS_GPCNTRL, GP_COUNT_CONTROL_RESET); |
@@ -265,6 +268,15 @@ static void cx8802_timeout(unsigned long data) | |||
265 | do_cancel_buffers(dev,"timeout",1); | 268 | do_cancel_buffers(dev,"timeout",1); |
266 | } | 269 | } |
267 | 270 | ||
271 | static char *cx88_mpeg_irqs[32] = { | ||
272 | "ts_risci1", NULL, NULL, NULL, | ||
273 | "ts_risci2", NULL, NULL, NULL, | ||
274 | "ts_oflow", NULL, NULL, NULL, | ||
275 | "ts_sync", NULL, NULL, NULL, | ||
276 | "opc_err", "par_err", "rip_err", "pci_abort", | ||
277 | "ts_err?", | ||
278 | }; | ||
279 | |||
268 | static void cx8802_mpeg_irq(struct cx8802_dev *dev) | 280 | static void cx8802_mpeg_irq(struct cx8802_dev *dev) |
269 | { | 281 | { |
270 | struct cx88_core *core = dev->core; | 282 | struct cx88_core *core = dev->core; |
@@ -277,10 +289,7 @@ static void cx8802_mpeg_irq(struct cx8802_dev *dev) | |||
277 | return; | 289 | return; |
278 | 290 | ||
279 | cx_write(MO_TS_INTSTAT, status); | 291 | cx_write(MO_TS_INTSTAT, status); |
280 | #if 0 | 292 | |
281 | cx88_print_irqbits(core->name, "irq mpeg ", | ||
282 | cx88_mpeg_irqs, status, mask); | ||
283 | #endif | ||
284 | if (debug || (status & mask & ~0xff)) | 293 | if (debug || (status & mask & ~0xff)) |
285 | cx88_print_irqbits(core->name, "irq mpeg ", | 294 | cx88_print_irqbits(core->name, "irq mpeg ", |
286 | cx88_mpeg_irqs, status, mask); | 295 | cx88_mpeg_irqs, status, mask); |
@@ -436,10 +445,8 @@ int cx8802_suspend_common(struct pci_dev *pci_dev, pm_message_t state) | |||
436 | } | 445 | } |
437 | spin_unlock(&dev->slock); | 446 | spin_unlock(&dev->slock); |
438 | 447 | ||
439 | #if 1 | ||
440 | /* FIXME -- shutdown device */ | 448 | /* FIXME -- shutdown device */ |
441 | cx88_shutdown(dev->core); | 449 | cx88_shutdown(dev->core); |
442 | #endif | ||
443 | 450 | ||
444 | pci_save_state(pci_dev); | 451 | pci_save_state(pci_dev); |
445 | if (0 != pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state))) { | 452 | if (0 != pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state))) { |
@@ -461,10 +468,8 @@ int cx8802_resume_common(struct pci_dev *pci_dev) | |||
461 | pci_set_power_state(pci_dev, PCI_D0); | 468 | pci_set_power_state(pci_dev, PCI_D0); |
462 | pci_restore_state(pci_dev); | 469 | pci_restore_state(pci_dev); |
463 | 470 | ||
464 | #if 1 | ||
465 | /* FIXME: re-initialize hardware */ | 471 | /* FIXME: re-initialize hardware */ |
466 | cx88_reset(dev->core); | 472 | cx88_reset(dev->core); |
467 | #endif | ||
468 | 473 | ||
469 | /* restart video+vbi capture */ | 474 | /* restart video+vbi capture */ |
470 | spin_lock(&dev->slock); | 475 | spin_lock(&dev->slock); |