--- /dev/null
+From mkrufky@linuxtv.org Wed Jul 30 12:32:17 2008
+From: Steven Toth <stoth@hauppauge.com>
+Date: Mon, 28 Jul 2008 22:01:37 -0400
+Subject: DVB: cx23885: DVB Transport cards using DVB port VIDB/TS1 did not stream
+To: stable@kernel.org
+Cc: v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>, Steven Toth <stoth@hauppauge.com>, Mauro Carvalho Chehab <mchehab@infradead.org>
+Message-ID: <488E7A01.809@linuxtv.org>
+
+
+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);
+
--- /dev/null
+From mkrufky@linuxtv.org Wed Jul 30 12:31:49 2008
+From: Steven Toth <stoth@hauppauge.com>
+Date: Mon, 28 Jul 2008 22:01:35 -0400
+Subject: DVB: cx23885: Ensure PAD_CTRL is always reset to a sensible default
+To: stable@kernel.org
+Cc: v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>, Steven Toth <stoth@hauppauge.com>, Mauro Carvalho Chehab <mchehab@infradead.org>
+Message-ID: <488E79FF.8030608@linuxtv.org>
+
+
+From: Steven Toth <stoth@hauppauge.com>
+
+(cherry picked from commit ecda5966c90746a044ff68e78b1062adcddd9664)
+
+DVB: cx23885: Ensure PAD_CTRL is always reset to a sensible default
+
+PAD_CTRL controls TS1 and TS2 input and output states, if the
+register became corrupt the driver was never able to recover.
+
+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 | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/media/video/cx23885/cx23885-core.c
++++ b/drivers/media/video/cx23885/cx23885-core.c
+@@ -460,6 +460,7 @@ static void cx23885_reset(struct cx23885
+ cx_write(AUDIO_INT_INT_STAT, 0xffffffff);
+ cx_write(AUDIO_EXT_INT_STAT, 0xffffffff);
+ cx_write(CLK_DELAY, cx_read(CLK_DELAY) & 0x80000000);
++ cx_write(PAD_CTRL, 0x00500300);
+
+ mdelay(100);
+
--- /dev/null
+From mkrufky@linuxtv.org Wed Jul 30 12:32:38 2008
+From: Steven Toth <stoth@hauppauge.com>
+Date: Mon, 28 Jul 2008 22:01:38 -0400
+Subject: DVB: cx23885: Reallocated the sram to avoid concurrent VIDB/C issues
+To: stable@kernel.org
+Cc: v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>, Steven Toth <stoth@hauppauge.com>, Mauro Carvalho Chehab <mchehab@infradead.org>
+Message-ID: <488E7A02.6060808@linuxtv.org>
+
+
+From: Steven Toth <stoth@hauppauge.com>
+
+(cherry picked from commit d8d12b4367e2e759f65c5f9dcb94d21ec237bbc5)
+
+DVB: cx23885: Reallocated the sram to avoid concurrent VIDB/C issues
+
+This may be cx23885 chip specific and may not work on the cx23887.
+Analog and mpeg encoder streaming are still to be tested.
+
+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 | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+--- a/drivers/media/video/cx23885/cx23885-core.c
++++ b/drivers/media/video/cx23885/cx23885-core.c
+@@ -80,8 +80,8 @@ static struct sram_channel cx23887_sram_
+ [SRAM_CH01] = {
+ .name = "VID A",
+ .cmds_start = 0x10000,
+- .ctrl_start = 0x105b0,
+- .cdt = 0x107b0,
++ .ctrl_start = 0x10380,
++ .cdt = 0x104c0,
+ .fifo_start = 0x40,
+ .fifo_size = 0x2800,
+ .ptr1_reg = DMA1_PTR1,
+@@ -104,8 +104,8 @@ static struct sram_channel cx23887_sram_
+ [SRAM_CH03] = {
+ .name = "TS1 B",
+ .cmds_start = 0x100A0,
+- .ctrl_start = 0x10670,
+- .cdt = 0x10810,
++ .ctrl_start = 0x10400,
++ .cdt = 0x10580,
+ .fifo_start = 0x5000,
+ .fifo_size = 0x1000,
+ .ptr1_reg = DMA3_PTR1,
+@@ -140,8 +140,8 @@ static struct sram_channel cx23887_sram_
+ [SRAM_CH06] = {
+ .name = "TS2 C",
+ .cmds_start = 0x10140,
+- .ctrl_start = 0x10680,
+- .cdt = 0x108d0,
++ .ctrl_start = 0x10440,
++ .cdt = 0x105e0,
+ .fifo_start = 0x6000,
+ .fifo_size = 0x1000,
+ .ptr1_reg = DMA5_PTR1,
+@@ -1043,6 +1043,9 @@ static int cx23885_start_dma(struct cx23
+ dprintk(1, "%s() w: %d, h: %d, f: %d\n", __func__,
+ buf->vb.width, buf->vb.height, buf->vb.field);
+
++ /* Stop the fifo and risc engine for this port */
++ cx_clear(port->reg_dma_ctl, port->dma_ctl_val);
++
+ /* setup fifo + format */
+ cx23885_sram_channel_setup(dev,
+ &dev->sram_channels[ port->sram_chno ],
--- /dev/null
+From mkrufky@linuxtv.org Wed Jul 30 12:33:01 2008
+From: Steven Toth <stoth@hauppauge.com>
+Date: Mon, 28 Jul 2008 22:01:40 -0400
+Subject: DVB: cx23885: SRAM changes for the 885 and 887 silicon parts
+To: stable@kernel.org
+Cc: v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>, Steven Toth <stoth@hauppauge.com>, Mauro Carvalho Chehab <mchehab@infradead.org>
+Message-ID: <488E7A04.1060608@linuxtv.org>
+
+
+From: Steven Toth <stoth@hauppauge.com>
+
+(cherry picked from commit 7e994302ed3fc6d209ce247ad5b6d9c2499bf7c2)
+
+DVB: cx23885: SRAM changes for the 885 and 887 silicon parts
+
+In a previous patch I merged both memory maps into a single struct,
+believing that they could be combined. We've since found problems
+with streaming multiple channels on the 885. I'm restoring the
+multiple memory map structs - in line with the windows driver.
+
+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 | 116 ++++++++++++++++++++++++++++-
+ 1 file changed, 114 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/video/cx23885/cx23885-core.c
++++ b/drivers/media/video/cx23885/cx23885-core.c
+@@ -76,7 +76,7 @@ LIST_HEAD(cx23885_devlist);
+ * 0x00010ea0 0x00010xxx Free
+ */
+
+-static struct sram_channel cx23887_sram_channels[] = {
++static struct sram_channel cx23885_sram_channels[] = {
+ [SRAM_CH01] = {
+ .name = "VID A",
+ .cmds_start = 0x10000,
+@@ -187,6 +187,117 @@ static struct sram_channel cx23887_sram_
+ },
+ };
+
++static struct sram_channel cx23887_sram_channels[] = {
++ [SRAM_CH01] = {
++ .name = "VID A",
++ .cmds_start = 0x10000,
++ .ctrl_start = 0x105b0,
++ .cdt = 0x107b0,
++ .fifo_start = 0x40,
++ .fifo_size = 0x2800,
++ .ptr1_reg = DMA1_PTR1,
++ .ptr2_reg = DMA1_PTR2,
++ .cnt1_reg = DMA1_CNT1,
++ .cnt2_reg = DMA1_CNT2,
++ },
++ [SRAM_CH02] = {
++ .name = "ch2",
++ .cmds_start = 0x0,
++ .ctrl_start = 0x0,
++ .cdt = 0x0,
++ .fifo_start = 0x0,
++ .fifo_size = 0x0,
++ .ptr1_reg = DMA2_PTR1,
++ .ptr2_reg = DMA2_PTR2,
++ .cnt1_reg = DMA2_CNT1,
++ .cnt2_reg = DMA2_CNT2,
++ },
++ [SRAM_CH03] = {
++ .name = "TS1 B",
++ .cmds_start = 0x100A0,
++ .ctrl_start = 0x10630,
++ .cdt = 0x10870,
++ .fifo_start = 0x5000,
++ .fifo_size = 0x1000,
++ .ptr1_reg = DMA3_PTR1,
++ .ptr2_reg = DMA3_PTR2,
++ .cnt1_reg = DMA3_CNT1,
++ .cnt2_reg = DMA3_CNT2,
++ },
++ [SRAM_CH04] = {
++ .name = "ch4",
++ .cmds_start = 0x0,
++ .ctrl_start = 0x0,
++ .cdt = 0x0,
++ .fifo_start = 0x0,
++ .fifo_size = 0x0,
++ .ptr1_reg = DMA4_PTR1,
++ .ptr2_reg = DMA4_PTR2,
++ .cnt1_reg = DMA4_CNT1,
++ .cnt2_reg = DMA4_CNT2,
++ },
++ [SRAM_CH05] = {
++ .name = "ch5",
++ .cmds_start = 0x0,
++ .ctrl_start = 0x0,
++ .cdt = 0x0,
++ .fifo_start = 0x0,
++ .fifo_size = 0x0,
++ .ptr1_reg = DMA5_PTR1,
++ .ptr2_reg = DMA5_PTR2,
++ .cnt1_reg = DMA5_CNT1,
++ .cnt2_reg = DMA5_CNT2,
++ },
++ [SRAM_CH06] = {
++ .name = "TS2 C",
++ .cmds_start = 0x10140,
++ .ctrl_start = 0x10670,
++ .cdt = 0x108d0,
++ .fifo_start = 0x6000,
++ .fifo_size = 0x1000,
++ .ptr1_reg = DMA5_PTR1,
++ .ptr2_reg = DMA5_PTR2,
++ .cnt1_reg = DMA5_CNT1,
++ .cnt2_reg = DMA5_CNT2,
++ },
++ [SRAM_CH07] = {
++ .name = "ch7",
++ .cmds_start = 0x0,
++ .ctrl_start = 0x0,
++ .cdt = 0x0,
++ .fifo_start = 0x0,
++ .fifo_size = 0x0,
++ .ptr1_reg = DMA6_PTR1,
++ .ptr2_reg = DMA6_PTR2,
++ .cnt1_reg = DMA6_CNT1,
++ .cnt2_reg = DMA6_CNT2,
++ },
++ [SRAM_CH08] = {
++ .name = "ch8",
++ .cmds_start = 0x0,
++ .ctrl_start = 0x0,
++ .cdt = 0x0,
++ .fifo_start = 0x0,
++ .fifo_size = 0x0,
++ .ptr1_reg = DMA7_PTR1,
++ .ptr2_reg = DMA7_PTR2,
++ .cnt1_reg = DMA7_CNT1,
++ .cnt2_reg = DMA7_CNT2,
++ },
++ [SRAM_CH09] = {
++ .name = "ch9",
++ .cmds_start = 0x0,
++ .ctrl_start = 0x0,
++ .cdt = 0x0,
++ .fifo_start = 0x0,
++ .fifo_size = 0x0,
++ .ptr1_reg = DMA8_PTR1,
++ .ptr2_reg = DMA8_PTR2,
++ .cnt1_reg = DMA8_CNT1,
++ .cnt2_reg = DMA8_CNT2,
++ },
++};
++
+ static int cx23885_risc_decode(u32 risc)
+ {
+ static char *instr[16] = {
+@@ -626,7 +737,6 @@ static int cx23885_dev_setup(struct cx23
+ atomic_inc(&dev->refcount);
+
+ dev->nr = cx23885_devcount++;
+- dev->sram_channels = cx23887_sram_channels;
+ sprintf(dev->name, "cx23885[%d]", dev->nr);
+
+ mutex_lock(&devlist);
+@@ -638,11 +748,13 @@ static int cx23885_dev_setup(struct cx23
+ dev->bridge = CX23885_BRIDGE_887;
+ /* Apply a sensible clock frequency for the PCIe bridge */
+ dev->clk_freq = 25000000;
++ dev->sram_channels = cx23887_sram_channels;
+ } else
+ if(dev->pci->device == 0x8852) {
+ dev->bridge = CX23885_BRIDGE_885;
+ /* Apply a sensible clock frequency for the PCIe bridge */
+ dev->clk_freq = 28000000;
++ dev->sram_channels = cx23885_sram_channels;
+ } else
+ BUG();
+
v4l-uvcvideo-don-t-free-urb-buffers-on-suspend.patch
v4l-uvcvideo-make-input-device-support-optional.patch
v4l-uvcvideo-add-support-for-medion-akoya-mini-e1210-integrated-webcam.patch
+v4l-saa7134-copy-tuner-data-earlier-to-avoid-overwriting-manual-tuner-type.patch
+v4l-cx23885-bugfix-for-concurrent-use-of-dev-video0-and-dev-video1.patch
+dvb-cx23885-ensure-pad_ctrl-is-always-reset-to-a-sensible-default.patch
+dvb-cx23885-dvb-transport-cards-using-dvb-port-vidb-ts1-did-not-stream.patch
+dvb-cx23885-reallocated-the-sram-to-avoid-concurrent-vidb-c-issues.patch
+dvb-cx23885-sram-changes-for-the-885-and-887-silicon-parts.patch
--- /dev/null
+From mkrufky@linuxtv.org Wed Jul 30 12:31:29 2008
+From: Steven Toth <stoth@hauppauge.com>
+Date: Mon, 28 Jul 2008 22:01:33 -0400
+Subject: V4L: cx23885: Bugfix for concurrent use of /dev/video0 and /dev/video1
+To: stable@kernel.org
+Cc: v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>, Steven Toth <stoth@hauppauge.com>, Mauro Carvalho Chehab <mchehab@infradead.org>
+Message-ID: <488E79FD.7060601@linuxtv.org>
+
+
+From: Steven Toth <stoth@hauppauge.com>
+
+(cherry picked from commit 28901ab621bb56cd2aa9670dc7ce016ba80ec45c)
+
+V4L: cx23885: Bugfix for concurrent use of /dev/video0 and /dev/video1
+
+With the HVR1800, trying to use video0 and video1 simultaneously
+caused buffer corruption in the PCIe bridge. This fix reallocates
+video1 buffer locations to avoid the issue.
+
+Signed-off-by: Steven Toth <stoth@hauppauge.com>
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/cx23885/cx23885-core.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/video/cx23885/cx23885-core.c
++++ b/drivers/media/video/cx23885/cx23885-core.c
+@@ -104,8 +104,8 @@ static struct sram_channel cx23887_sram_
+ [SRAM_CH03] = {
+ .name = "TS1 B",
+ .cmds_start = 0x100A0,
+- .ctrl_start = 0x10780,
+- .cdt = 0x10400,
++ .ctrl_start = 0x10670,
++ .cdt = 0x10810,
+ .fifo_start = 0x5000,
+ .fifo_size = 0x1000,
+ .ptr1_reg = DMA3_PTR1,
--- /dev/null
+From mkrufky@linuxtv.org Wed Jul 30 12:30:20 2008
+From: Simon Arlott <simon@fire.lp0.eu>
+Date: Mon, 28 Jul 2008 22:01:31 -0400
+Subject: V4L: saa7134: Copy tuner data earlier to avoid overwriting manual tuner type
+To: stable@kernel.org
+Cc: Simon Arlott <simon@fire.lp0.eu>, v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>, Hermann Pitton <hermann-pitton@arcor.de>, Brian Marete <bgmarete@gmail.com>, Mauro Carvalho Chehab <mchehab@infradead.org>
+Message-ID: <488E79FB.9010901@linuxtv.org>
+
+
+From: Simon Arlott <simon@fire.lp0.eu>
+
+V4L: saa7134: Copy tuner data earlier to avoid overwriting manual tuner type
+
+(cherry picked from commit d53687d1d22c3204394658a31654de2f1efb0e8f)
+
+Copy tuner data earlier in init to avoid overwriting manual tuner type
+
+When saa7134_board_init2 runs, it immediately overwrites the
+current value (set earlier from module parameter) of tuner_type
+with the static values, and then does autodetection. This patch
+moves the tuner_addr copy to earlier in saa7134_initdev and
+removes the tuner_type copy from saa7134_board_init2.
+
+Autodetection could still potentially change to the wrong tuner
+type, but it is now possible to override the default type for
+the card again.
+
+My card's tuner is configured with autodetection from eeprom,
+so I don't need to manually set the tuner. I've checked that
+the autodetection still works for my card.
+
+Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
+Reviewed-by: Hermann Pitton <hermann-pitton@arcor.de>
+Cc: Brian Marete <bgmarete@gmail.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/saa7134/saa7134-cards.c | 3 ---
+ drivers/media/video/saa7134/saa7134-core.c | 5 +++--
+ 2 files changed, 3 insertions(+), 5 deletions(-)
+
+--- a/drivers/media/video/saa7134/saa7134-cards.c
++++ b/drivers/media/video/saa7134/saa7134-cards.c
+@@ -5703,9 +5703,6 @@ int saa7134_board_init2(struct saa7134_d
+ unsigned char buf;
+ int board;
+
+- dev->tuner_type = saa7134_boards[dev->board].tuner_type;
+- dev->tuner_addr = saa7134_boards[dev->board].tuner_addr;
+-
+ switch (dev->board) {
+ case SAA7134_BOARD_BMK_MPEX_NOTUNER:
+ case SAA7134_BOARD_BMK_MPEX_TUNER:
+--- a/drivers/media/video/saa7134/saa7134-core.c
++++ b/drivers/media/video/saa7134/saa7134-core.c
+@@ -946,11 +946,12 @@ static int __devinit saa7134_initdev(str
+ dev->board = SAA7134_BOARD_UNKNOWN;
+ }
+ dev->autodetected = card[dev->nr] != dev->board;
+- dev->tuner_type = saa7134_boards[dev->board].tuner_type;
++ dev->tuner_type = saa7134_boards[dev->board].tuner_type;
++ dev->tuner_addr = saa7134_boards[dev->board].tuner_addr;
+ dev->tda9887_conf = saa7134_boards[dev->board].tda9887_conf;
+ if (UNSET != tuner[dev->nr])
+ dev->tuner_type = tuner[dev->nr];
+- printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
++ printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
+ dev->name,pci_dev->subsystem_vendor,
+ pci_dev->subsystem_device,saa7134_boards[dev->board].name,
+ dev->board, dev->autodetected ?