aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-mpeg.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-07-12 16:58:44 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-12 19:01:04 -0400
commit41ef7c1ed48cb273c7b7a9ffd48a262a22f84483 (patch)
treec3a2772ae4eb3ea34c5023921095b78d2acd352e /drivers/media/video/cx88/cx88-mpeg.c
parentfa9846a8c5965636fbade8655ae0ce1f9a655bd4 (diff)
[PATCH] v4l: CX88 Update
- Removed unused structures. - Removed BTTV version check. - Some debug structs moved to their own .c file and converted to static - Comment changed to express better when attach_inform is running - set_freq removed from set_mode at tuner-core.c. - I2C cleanups and converged to a basic reference structure. - Rename tuner structures fields. - It calls VIDIOC_G_FREQUENCY to get tuner freq from tuner. - added missing contrast offset value, set to 0. - Let Kconfig decide whether to include frontend-specific code. Signed-Off-By: Nickolay V. Shmyrev <nshmyrev@yandex.ru> Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-mpeg.c')
-rw-r--r--drivers/media/video/cx88/cx88-mpeg.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c
index 85da6dc8d0e0..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.30 2005/07/05 19:44:40 mkrufky 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,7 +64,6 @@ 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
@@ -76,9 +75,9 @@ static int cx8802_start_dma(struct cx8802_dev *dev,
76 cx_write(TS_HW_SOP_CNTRL,0x47<<16|188<<4|0x01); 75 cx_write(TS_HW_SOP_CNTRL,0x47<<16|188<<4|0x01);
77 if ((core->board == CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q) || 76 if ((core->board == CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q) ||
78 (core->board == CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T)) { 77 (core->board == CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T)) {
79 cx_write(TS_SOP_STAT, 0<<16 | 0<<14 | 1<<13 | 0<<12); 78 cx_write(TS_SOP_STAT, 1<<13);
80 } else { 79 } else {
81 cx_write(TS_SOP_STAT,0x00); 80 cx_write(TS_SOP_STAT, 0x00);
82 } 81 }
83 cx_write(TS_GEN_CNTRL, dev->ts_gen_cntrl); 82 cx_write(TS_GEN_CNTRL, dev->ts_gen_cntrl);
84 udelay(100); 83 udelay(100);
@@ -98,7 +97,6 @@ static int cx8802_start_dma(struct cx8802_dev *dev,
98 cx_write(TS_GEN_CNTRL, 0x06); /* punctured clock TS & posedge driven */ 97 cx_write(TS_GEN_CNTRL, 0x06); /* punctured clock TS & posedge driven */
99 udelay(100); 98 udelay(100);
100 } 99 }
101#endif
102 100
103 /* reset counter */ 101 /* reset counter */
104 cx_write(MO_TS_GPCNTRL, GP_COUNT_CONTROL_RESET); 102 cx_write(MO_TS_GPCNTRL, GP_COUNT_CONTROL_RESET);
@@ -270,6 +268,15 @@ static void cx8802_timeout(unsigned long data)
270 do_cancel_buffers(dev,"timeout",1); 268 do_cancel_buffers(dev,"timeout",1);
271} 269}
272 270
271static 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
273static void cx8802_mpeg_irq(struct cx8802_dev *dev) 280static void cx8802_mpeg_irq(struct cx8802_dev *dev)
274{ 281{
275 struct cx88_core *core = dev->core; 282 struct cx88_core *core = dev->core;
@@ -282,10 +289,7 @@ static void cx8802_mpeg_irq(struct cx8802_dev *dev)
282 return; 289 return;
283 290
284 cx_write(MO_TS_INTSTAT, status); 291 cx_write(MO_TS_INTSTAT, status);
285#if 0 292
286 cx88_print_irqbits(core->name, "irq mpeg ",
287 cx88_mpeg_irqs, status, mask);
288#endif
289 if (debug || (status & mask & ~0xff)) 293 if (debug || (status & mask & ~0xff))
290 cx88_print_irqbits(core->name, "irq mpeg ", 294 cx88_print_irqbits(core->name, "irq mpeg ",
291 cx88_mpeg_irqs, status, mask); 295 cx88_mpeg_irqs, status, mask);
@@ -441,10 +445,8 @@ int cx8802_suspend_common(struct pci_dev *pci_dev, pm_message_t state)
441 } 445 }
442 spin_unlock(&dev->slock); 446 spin_unlock(&dev->slock);
443 447
444#if 1
445 /* FIXME -- shutdown device */ 448 /* FIXME -- shutdown device */
446 cx88_shutdown(dev->core); 449 cx88_shutdown(dev->core);
447#endif
448 450
449 pci_save_state(pci_dev); 451 pci_save_state(pci_dev);
450 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))) {
@@ -466,10 +468,8 @@ int cx8802_resume_common(struct pci_dev *pci_dev)
466 pci_set_power_state(pci_dev, PCI_D0); 468 pci_set_power_state(pci_dev, PCI_D0);
467 pci_restore_state(pci_dev); 469 pci_restore_state(pci_dev);
468 470
469#if 1
470 /* FIXME: re-initialize hardware */ 471 /* FIXME: re-initialize hardware */
471 cx88_reset(dev->core); 472 cx88_reset(dev->core);
472#endif
473 473
474 /* restart video+vbi capture */ 474 /* restart video+vbi capture */
475 spin_lock(&dev->slock); 475 spin_lock(&dev->slock);