summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-dvb.c
diff options
context:
space:
mode:
authorSteven Toth2007-12-18 05:57:06 +0100
committerMauro Carvalho Chehab2008-01-25 22:04:12 +0100
commitd1987d55a1eda774dfbab240a432607c17241d07 (patch)
tree7b45520cfd2496d15c47b1bac641c42c1964c9aa /drivers/media/video/cx23885/cx23885-dvb.c
parentV4L/DVB (6884): Add support for the Xceive xc5000 silicon tuner (diff)
downloadkernel-qcow2-linux-d1987d55a1eda774dfbab240a432607c17241d07.tar.gz
kernel-qcow2-linux-d1987d55a1eda774dfbab240a432607c17241d07.tar.xz
kernel-qcow2-linux-d1987d55a1eda774dfbab240a432607c17241d07.zip
V4L/DVB (6885): Add support for the Hauppauge HVR1500Q
The express card ATSC/QAM tuner. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-dvb.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-dvb.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c
index 96d732098a0d..5fa65ef08bfd 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -33,6 +33,7 @@
#include "s5h1409.h"
#include "mt2131.h"
#include "lgdt330x.h"
+#include "xc5000.h"
#include "dvb-pll.h"
static unsigned int debug = 0;
@@ -74,6 +75,32 @@ static void dvb_buf_release(struct videobuf_queue *q,
cx23885_free_buffer(q, (struct cx23885_buffer*)vb);
}
+static int cx23885_request_firmware(struct dvb_frontend *fe,
+ const struct firmware **fw, char *name)
+{
+ struct cx23885_tsport *port = fe->dvb->priv;
+ struct cx23885_dev *dev = port->dev;
+
+ dprintk(1, "%s(?,?,%s)\n", __FUNCTION__, name);
+
+ return request_firmware(fw, name, &dev->pci->dev);
+}
+
+static int hauppauge_hvr1500q_tuner_reset(struct dvb_frontend *fe)
+{
+ struct cx23885_tsport *port = fe->dvb->priv;
+ struct cx23885_dev *dev = port->dev;
+
+ dprintk(1, "%s()\n", __FUNCTION__);
+
+ /* Drive the tuner into reset back back */
+ cx_clear(GP0_IO, 0x00000004);
+ mdelay(200);
+ cx_set(GP0_IO, 0x00000004);
+
+ return 0;
+}
+
static struct videobuf_queue_ops dvb_qops = {
.buf_setup = dvb_buf_setup,
.buf_prepare = dvb_buf_prepare,
@@ -109,6 +136,22 @@ static struct lgdt330x_config fusionhdtv_5_express = {
.serial_mpeg = 0x40,
};
+static struct s5h1409_config hauppauge_hvr1500q_config = {
+ .demod_address = 0x32 >> 1,
+ .output_mode = S5H1409_SERIAL_OUTPUT,
+ .gpio = S5H1409_GPIO_ON,
+ .qam_if = 44000,
+ .inversion = S5H1409_INVERSION_OFF,
+ .status_mode = S5H1409_DEMODLOCKING
+};
+
+static struct xc5000_config hauppauge_hvr1500q_tunerconfig = {
+ .i2c_address = 0x61,
+ .if_frequency = 4570000,
+ .request_firmware = cx23885_request_firmware,
+ .tuner_reset = hauppauge_hvr1500q_tuner_reset
+};
+
static int dvb_register(struct cx23885_tsport *port)
{
struct cx23885_dev *dev = port->dev;
@@ -152,6 +195,17 @@ static int dvb_register(struct cx23885_tsport *port)
&i2c_bus->i2c_adap, DVB_PLL_LG_TDVS_H06XF);
}
break;
+ case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
+ i2c_bus = &dev->i2c_bus[1];
+ port->dvb.frontend = dvb_attach(s5h1409_attach,
+ &hauppauge_hvr1500q_config,
+ &dev->i2c_bus[0].i2c_adap);
+ if (port->dvb.frontend != NULL) {
+ dvb_attach(xc5000_attach, port->dvb.frontend,
+ &i2c_bus->i2c_adap,
+ &hauppauge_hvr1500q_tunerconfig);
+ }
+ break;
default:
printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
dev->name);