summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2007-08-22 20:01:20 -0400
committerSteven Toth <stoth@hauppauge.com>2007-08-22 20:01:20 -0400
commitd51e6775583dc69a5e4b9f566a571c36566a88d7 (patch)
tree669850e95e224959a0c5dc112900e871e0d91ee0 /linux/drivers/media
parent5818756e0a4b5b7a5c6c5c84dbce5dbe784fd8ae (diff)
downloadmediapointer-dvb-s2-d51e6775583dc69a5e4b9f566a571c36566a88d7.tar.gz
mediapointer-dvb-s2-d51e6775583dc69a5e4b9f566a571c36566a88d7.tar.bz2
cx23885: Added HVR1250 ATSC support.
From: Steven Toth <stoth@hauppauge.com> Adding support for the Hauppauge HVR1250 PCIe ATSC board. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/cx23885/cx23885-cards.c26
-rw-r--r--linux/drivers/media/video/cx23885/cx23885-core.c7
-rw-r--r--linux/drivers/media/video/cx23885/cx23885-dvb.c24
-rw-r--r--linux/drivers/media/video/cx23885/cx23885.h1
4 files changed, 58 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx23885/cx23885-cards.c b/linux/drivers/media/video/cx23885/cx23885-cards.c
index 971bbd78d..4a5db9075 100644
--- a/linux/drivers/media/video/cx23885/cx23885-cards.c
+++ b/linux/drivers/media/video/cx23885/cx23885-cards.c
@@ -89,6 +89,27 @@ struct cx23885_board cx23885_boards[] = {
.gpio0 = 0xff02,
}},
},
+ [CX23885_BOARD_HAUPPAUGE_HVR1250] = {
+ .name = "Hauppauge WinTV-HVR1250",
+ .portc = CX23885_MPEG_DVB,
+ .input = {{
+ .type = CX23885_VMUX_TELEVISION,
+ .vmux = 0,
+ .gpio0 = 0xff00,
+ },{
+ .type = CX23885_VMUX_DEBUG,
+ .vmux = 0,
+ .gpio0 = 0xff01,
+ },{
+ .type = CX23885_VMUX_COMPOSITE1,
+ .vmux = 1,
+ .gpio0 = 0xff02,
+ },{
+ .type = CX23885_VMUX_SVIDEO,
+ .vmux = 2,
+ .gpio0 = 0xff02,
+ }},
+ },
};
const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
@@ -112,6 +133,10 @@ struct cx23885_subid cx23885_subids[] = {
.subvendor = 0x0070,
.subdevice = 0x7801,
.card = CX23885_BOARD_HAUPPAUGE_HVR1800,
+ },{
+ .subvendor = 0x0070,
+ .subdevice = 0x7911,
+ .card = CX23885_BOARD_HAUPPAUGE_HVR1250,
},
};
const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -183,6 +208,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
}
switch (dev->board) {
+ case CX23885_BOARD_HAUPPAUGE_HVR1250:
case CX23885_BOARD_HAUPPAUGE_HVR1800:
case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
if (dev->i2c_bus[0].i2c_rc == 0)
diff --git a/linux/drivers/media/video/cx23885/cx23885-core.c b/linux/drivers/media/video/cx23885/cx23885-core.c
index 01f993869..654f5a185 100644
--- a/linux/drivers/media/video/cx23885/cx23885-core.c
+++ b/linux/drivers/media/video/cx23885/cx23885-core.c
@@ -613,6 +613,11 @@ void cx23885_reset(struct cx23885_dev *dev)
cx23885_sram_channel_setup(dev, &dev->sram_channels[ SRAM_CH09 ], 128, 0);
switch(dev->board) {
+ case CX23885_BOARD_HAUPPAUGE_HVR1250:
+ /* GPIO-0 cx24227 demodulator reset */
+ dprintk( 1, "%s() Configuring HVR1250 GPIO's\n", __FUNCTION__);
+ cx_set(GP0_IO, 0x00010001); /* Bring the part out of reset */
+ break;
case CX23885_BOARD_HAUPPAUGE_HVR1800:
/* GPIO-0 656_CLK */
/* GPIO-1 656_D0 */
@@ -660,6 +665,7 @@ static int cx23885_ir_init(struct cx23885_dev *dev)
dprintk(1, "%s()\n", __FUNCTION__);
switch (dev->board) {
+ case CX23885_BOARD_HAUPPAUGE_HVR1250:
case CX23885_BOARD_HAUPPAUGE_HVR1800:
dprintk(1, "%s() FIXME - Implement IR support\n", __FUNCTION__);
break;
@@ -1033,6 +1039,7 @@ static int cx23885_start_dma(struct cx23885_tsport *port,
cx_write(GPIO2, 0x00);
switch (dev->board) {
+ case CX23885_BOARD_HAUPPAUGE_HVR1250:
case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
case CX23885_BOARD_HAUPPAUGE_HVR1800:
cx_write(port->reg_vld_misc, 0x00);
diff --git a/linux/drivers/media/video/cx23885/cx23885-dvb.c b/linux/drivers/media/video/cx23885/cx23885-dvb.c
index e23c80082..a4dd46da8 100644
--- a/linux/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/linux/drivers/media/video/cx23885/cx23885-dvb.c
@@ -98,6 +98,16 @@ static struct s5h1409_config hauppauge_hvr1800_config = {
.status_mode = S5H1409_DEMODLOCKING
};
+static struct s5h1409_config hauppauge_hvr1250_config = {
+ .demod_address = 0x32 >> 1,
+ .output_mode = S5H1409_SERIAL_OUTPUT,
+ .gpio = S5H1409_GPIO_ON,
+ .if_freq = 44000,
+ .inversion = S5H1409_INVERSION_OFF,
+ .status_mode = S5H1409_DEMODLOCKING
+};
+
+
#if 0
/* FIXME: For older pre production samples */
static struct mt2131_config hauppauge_hvr1800lp_rev1_tunerconfig = {
@@ -113,6 +123,10 @@ static struct mt2131_config hauppauge_hvr1800_tunerconfig = {
0x61
};
+static struct mt2131_config hauppauge_hvr1250_tunerconfig = {
+ 0x61
+};
+
static int dvb_register(struct cx23885_tsport *port)
{
struct cx23885_dev *dev = port->dev;
@@ -122,6 +136,16 @@ static int dvb_register(struct cx23885_tsport *port)
/* init frontend */
switch (dev->board) {
+ case CX23885_BOARD_HAUPPAUGE_HVR1250:
+ port->dvb.frontend = dvb_attach(s5h1409_attach,
+ &hauppauge_hvr1250_config,
+ &dev->i2c_bus[0].i2c_adap);
+ if (port->dvb.frontend != NULL) {
+ dvb_attach(mt2131_attach, port->dvb.frontend,
+ &dev->i2c_bus[0].i2c_adap,
+ &hauppauge_hvr1250_tunerconfig, 0);
+ }
+ break;
case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
port->dvb.frontend = dvb_attach(s5h1409_attach,
&hauppauge_hvr1800lp_config,
diff --git a/linux/drivers/media/video/cx23885/cx23885.h b/linux/drivers/media/video/cx23885/cx23885.h
index 9f555f5b5..aa5b5b1eb 100644
--- a/linux/drivers/media/video/cx23885/cx23885.h
+++ b/linux/drivers/media/video/cx23885/cx23885.h
@@ -56,6 +56,7 @@
#define CX23885_BOARD_UNKNOWN 0
#define CX23885_BOARD_HAUPPAUGE_HVR1800lp 1
#define CX23885_BOARD_HAUPPAUGE_HVR1800 2
+#define CX23885_BOARD_HAUPPAUGE_HVR1250 3
enum cx23885_itype {
CX23885_VMUX_COMPOSITE1 = 1,