aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-mpeg.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-09-09 16:03:41 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:57:49 -0400
commite52e98a7eccfb0e7e91630d01690fb11d77db77d (patch)
treed910e743159977ee695c40b795a4b84d43a4dbcb /drivers/media/video/cx88/cx88-mpeg.c
parent24a70fdce872d70171b1f49dcd1a7c3a4e8396b2 (diff)
[PATCH] v4l: CX88 updates and card additions
- Remove $Id CVS logs for V4L files - add ioctl indirection via cx88_ioctl_hook and cx88_ioctl_translator to cx88-blackbird.c. - declare the indirection hooks from cx88-blackbird.c. - dcprintk macro which uses core instead of dev->core on cx88-video.c. - replace dev->core occurances with core on cx88-video.c. - CodingStyle fixes. - MaxInput replaced by a define. - cx8801 structures moved from cx88.h. - The output_mode needs to be set for the Hauppauge Nova-T DVB-T for versions after 2.6.12. - Corrected GPIO values for cx88 cards #28 & #31 for s-video and composite. - Updated DViCO FusionHDTV5 Gold & added DVB support. - Fixed DViCO FusionHDTV 3 Gold-Q GPIO. - Some clean up in cx88-tvaudio.c - replaced hex values when writing to AUD_CTL to EN_xx for better reading. - Allow select by hand between Mono, Lang1, Lang2 and Stereo for BTSC. - Support for stereo NICAM and BTSC improved. - Broken stereo check removed. - Added support for remote control to Cinergy DVBT-1400. - local var renamed from rc5 to a better name (ircode). - LGDT330X QAM lock bug fixes. - Some reorg: move some bits to struct cx88_core, factor out common ioctl's to cx88_do_ioctl. - Get rid of '//' comments, replace them with #if 0 and /**/. - Minor clean-ups: remove dcprintk and replace all instances of "dev->core" with "core". - Added some registers to control PCI controller at CX2388x chips. - New tuner standby API. - Small mpeg fixes and cleanups for blackbird. - fix mpeg packet size & count - add VIDIOC_QUERYCAP ioctl for the mpeg stream - return more information in struct v4l2_format - fix default window height - small cleanups Signed-off-by: Uli Luckas <luckas@musoft.de> Signed-off-by: Torsten Seeboth <Torsten.Seeboth@t-online.de> Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru> Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Patrick Boettcher <patrick.boettcher@desy.de> Signed-off-by: Catalin Climov <catalin@climov.com> 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.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 */