[patch 48/62] DVB: cx23885: DVB Transport cards using DVB port VIDB/TS1 did not stream

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Wednesday, July 30, 2008 - 4:59 pm

2.6.26 -stable review patch.  If anyone has any objections, please let
us know.

------------------
From: Steven Toth <stoth@hauppauge.com>

(cherry picked from commit 52ce27bfc4d302a3e28267a5820a8b031ceccee9)

DVB: cx23885: DVB Transport cards using DVB port VIDB/TS1 did not stream

Certain DVB cards that have demodulators on TS1/VIDB were not
streaming packets.

This ensure the pin directions on PAD_CTRL are set correctly,
solving the issue.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/media/video/cx23885/cx23885-core.c |   18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

--- a/drivers/media/video/cx23885/cx23885-core.c
+++ b/drivers/media/video/cx23885/cx23885-core.c
@@ -1084,7 +1084,21 @@ static int cx23885_start_dma(struct cx23
 	cx_write(port->reg_gpcnt_ctl, 3);
 	q->count = 1;
 
-	if (cx23885_boards[dev->board].portb & CX23885_MPEG_ENCODER) {
+	/* Set VIDB pins to input */
+	if (cx23885_boards[dev->board].portb == CX23885_MPEG_DVB) {
+		reg = cx_read(PAD_CTRL);
+		reg &= ~0x3; /* Clear TS1_OE & TS1_SOP_OE */
+		cx_write(PAD_CTRL, reg);
+	}
+
+	/* Set VIDC pins to input */
+	if (cx23885_boards[dev->board].portc == CX23885_MPEG_DVB) {
+		reg = cx_read(PAD_CTRL);
+		reg &= ~0x4; /* Clear TS2_SOP_OE */
+		cx_write(PAD_CTRL, reg);
+	}
+
+	if (cx23885_boards[dev->board].portb == CX23885_MPEG_ENCODER) {
 
 		reg = cx_read(PAD_CTRL);
 		reg = reg & ~0x1;    /* Clear TS1_OE */
@@ -1134,7 +1148,7 @@ static int cx23885_stop_dma(struct cx238
 	cx_clear(port->reg_ts_int_msk, port->ts_int_msk_val);
 	cx_clear(port->reg_dma_ctl, port->dma_ctl_val);
 
-	if (cx23885_boards[dev->board].portb & CX23885_MPEG_ENCODER) {
+	if (cx23885_boards[dev->board].portb == CX23885_MPEG_ENCODER) {
 
 		reg = cx_read(PAD_CTRL);
 

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/62] 2.6.26-stable review, Greg KH, (Wed Jul 30, 4:49 pm)
[patch 03/62] ipv6: use timer pending, Greg KH, (Wed Jul 30, 4:57 pm)
[patch 05/62] hdlcdrv: Fix CRC calculation., Greg KH, (Wed Jul 30, 4:57 pm)
[patch 23/62] proc: fix /proc/*/pagemap, Greg KH, (Wed Jul 30, 4:58 pm)
[patch 48/62] DVB: cx23885: DVB Transport cards using DVB ..., Greg KH, (Wed Jul 30, 4:59 pm)
[patch 53/62] UML - Fix boot crash, Greg KH, (Wed Jul 30, 4:59 pm)