aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-mpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx88/cx88-mpeg.c')
-rw-r--r--drivers/media/video/cx88/cx88-mpeg.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c
index fe2767c0ff94..6d0d15c3a1c6 100644
--- a/drivers/media/video/cx88/cx88-mpeg.c
+++ b/drivers/media/video/cx88/cx88-mpeg.c
@@ -1,5 +1,4 @@
1/* 1/*
2 * $Id: cx88-mpeg.c,v 1.31 2005/07/07 14:17:47 mchehab Exp $
3 * 2 *
4 * Support for the mpeg transport stream transfers 3 * Support for the mpeg transport stream transfers
5 * PCI function #2 of the cx2388x. 4 * PCI function #2 of the cx2388x.
@@ -73,11 +72,15 @@ static int cx8802_start_dma(struct cx8802_dev *dev,
73 udelay(100); 72 udelay(100);
74 cx_write(MO_PINMUX_IO, 0x00); 73 cx_write(MO_PINMUX_IO, 0x00);
75 cx_write(TS_HW_SOP_CNTRL,0x47<<16|188<<4|0x01); 74 cx_write(TS_HW_SOP_CNTRL,0x47<<16|188<<4|0x01);
76 if ((core->board == CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q) || 75 switch (core->board) {
77 (core->board == CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T)) { 76 case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q:
77 case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T:
78 case CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD:
78 cx_write(TS_SOP_STAT, 1<<13); 79 cx_write(TS_SOP_STAT, 1<<13);
79 } else { 80 break;
81 default:
80 cx_write(TS_SOP_STAT, 0x00); 82 cx_write(TS_SOP_STAT, 0x00);
83 break;
81 } 84 }
82 cx_write(TS_GEN_CNTRL, dev->ts_gen_cntrl); 85 cx_write(TS_GEN_CNTRL, dev->ts_gen_cntrl);
83 udelay(100); 86 udelay(100);
@@ -86,12 +89,10 @@ static int cx8802_start_dma(struct cx8802_dev *dev,
86 if (cx88_boards[core->board].blackbird) { 89 if (cx88_boards[core->board].blackbird) {
87 cx_write(MO_PINMUX_IO, 0x88); /* enable MPEG parallel IO */ 90 cx_write(MO_PINMUX_IO, 0x88); /* enable MPEG parallel IO */
88 91
89 // cx_write(TS_F2_CMD_STAT_MM, 0x2900106); /* F2_CMD_STAT_MM defaults + master + memory space */
90 cx_write(TS_GEN_CNTRL, 0x46); /* punctured clock TS & posedge driven & software reset */ 92 cx_write(TS_GEN_CNTRL, 0x46); /* punctured clock TS & posedge driven & software reset */
91 udelay(100); 93 udelay(100);
92 94
93 cx_write(TS_HW_SOP_CNTRL, 0x408); /* mpeg start byte */ 95 cx_write(TS_HW_SOP_CNTRL, 0x408); /* mpeg start byte */
94 //cx_write(TS_HW_SOP_CNTRL, 0x2F0BC0); /* mpeg start byte ts: 0x2F0BC0 ? */
95 cx_write(TS_VALERR_CNTRL, 0x2000); 96 cx_write(TS_VALERR_CNTRL, 0x2000);
96 97
97 cx_write(TS_GEN_CNTRL, 0x06); /* punctured clock TS & posedge driven */ 98 cx_write(TS_GEN_CNTRL, 0x06); /* punctured clock TS & posedge driven */
@@ -106,7 +107,6 @@ static int cx8802_start_dma(struct cx8802_dev *dev,
106 dprintk( 0, "setting the interrupt mask\n" ); 107 dprintk( 0, "setting the interrupt mask\n" );
107 cx_set(MO_PCI_INTMSK, core->pci_irqmask | 0x04); 108 cx_set(MO_PCI_INTMSK, core->pci_irqmask | 0x04);
108 cx_set(MO_TS_INTMSK, 0x1f0011); 109 cx_set(MO_TS_INTMSK, 0x1f0011);
109 //cx_write(MO_TS_INTMSK, 0x0f0011);
110 110
111 /* start dma */ 111 /* start dma */
112 cx_set(MO_DEV_CNTRL2, (1<<5)); 112 cx_set(MO_DEV_CNTRL2, (1<<5));
@@ -206,7 +206,6 @@ void cx8802_buf_queue(struct cx8802_dev *dev, struct cx88_buffer *buf)
206 mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT); 206 mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT);
207 dprintk(0,"[%p/%d] %s - first active\n", 207 dprintk(0,"[%p/%d] %s - first active\n",
208 buf, buf->vb.i, __FUNCTION__); 208 buf, buf->vb.i, __FUNCTION__);
209 //udelay(100);
210 209
211 } else { 210 } else {
212 dprintk( 1, "queue is not empty - append to active\n" ); 211 dprintk( 1, "queue is not empty - append to active\n" );
@@ -217,7 +216,6 @@ void cx8802_buf_queue(struct cx8802_dev *dev, struct cx88_buffer *buf)
217 prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma); 216 prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma);
218 dprintk( 1, "[%p/%d] %s - append to active\n", 217 dprintk( 1, "[%p/%d] %s - append to active\n",
219 buf, buf->vb.i, __FUNCTION__); 218 buf, buf->vb.i, __FUNCTION__);
220 //udelay(100);
221 } 219 }
222} 220}
223 221
@@ -387,7 +385,6 @@ int cx8802_init_common(struct cx8802_dev *dev)
387 dev->pci_lat,pci_resource_start(dev->pci,0)); 385 dev->pci_lat,pci_resource_start(dev->pci,0));
388 386
389 /* initialize driver struct */ 387 /* initialize driver struct */
390 init_MUTEX(&dev->lock);
391 spin_lock_init(&dev->slock); 388 spin_lock_init(&dev->slock);
392 389
393 /* init dma queue */ 390 /* init dma queue */