aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2007-12-17 23:57:06 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:04:12 -0500
commitd1987d55a1eda774dfbab240a432607c17241d07 (patch)
tree7b45520cfd2496d15c47b1bac641c42c1964c9aa
parentaacb9d31ee65c0685745ca4dfc7cdd24f8b7d92b (diff)
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>
-rw-r--r--Documentation/video4linux/CARDLIST.cx238851
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c17
-rw-r--r--drivers/media/video/cx23885/cx23885-dvb.c54
-rw-r--r--drivers/media/video/cx23885/cx23885-i2c.c2
-rw-r--r--drivers/media/video/cx23885/cx23885.h1
5 files changed, 74 insertions, 1 deletions
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885
index 00cb646a4bde..54d06e4ff743 100644
--- a/Documentation/video4linux/CARDLIST.cx23885
+++ b/Documentation/video4linux/CARDLIST.cx23885
@@ -3,3 +3,4 @@
3 2 -> Hauppauge WinTV-HVR1800 [0070:7800,0070:7801] 3 2 -> Hauppauge WinTV-HVR1800 [0070:7800,0070:7801]
4 3 -> Hauppauge WinTV-HVR1250 [0070:7911] 4 3 -> Hauppauge WinTV-HVR1250 [0070:7911]
5 4 -> DViCO FusionHDTV5 Express [18ac:d500] 5 4 -> DViCO FusionHDTV5 Express [18ac:d500]
6 5 -> Hauppauge WinTV-HVR1500Q [0070:7797]
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index 134b931b160e..515f415564d5 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -113,6 +113,11 @@ struct cx23885_board cx23885_boards[] = {
113 .name = "DViCO FusionHDTV5 Express", 113 .name = "DViCO FusionHDTV5 Express",
114 .portb = CX23885_MPEG_DVB, 114 .portb = CX23885_MPEG_DVB,
115 }, 115 },
116 [CX23885_BOARD_HAUPPAUGE_HVR1500Q] = {
117 .name = "Hauppauge WinTV-HVR1500Q",
118 .portc = CX23885_MPEG_DVB,
119 },
120
116}; 121};
117const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); 122const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
118 123
@@ -144,6 +149,10 @@ struct cx23885_subid cx23885_subids[] = {
144 .subvendor = 0x18ac, 149 .subvendor = 0x18ac,
145 .subdevice = 0xd500, 150 .subdevice = 0xd500,
146 .card = CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP, 151 .card = CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP,
152 },{
153 .subvendor = 0x0070,
154 .subdevice = 0x7797,
155 .card = CX23885_BOARD_HAUPPAUGE_HVR1500Q,
147 }, 156 },
148}; 157};
149const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); 158const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -204,6 +213,11 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
204 /* GPIO-0 cx24227 demodulator reset */ 213 /* GPIO-0 cx24227 demodulator reset */
205 cx_set(GP0_IO, 0x00010001); /* Bring the part out of reset */ 214 cx_set(GP0_IO, 0x00010001); /* Bring the part out of reset */
206 break; 215 break;
216 case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
217 /* GPIO-0 cx24227 demodulator reset */
218 /* GPIO-2 xc5000 tuner reset */
219 cx_set(GP0_IO, 0x00050005); /* Bring the part out of reset */
220 break;
207 case CX23885_BOARD_HAUPPAUGE_HVR1800: 221 case CX23885_BOARD_HAUPPAUGE_HVR1800:
208 /* GPIO-0 656_CLK */ 222 /* GPIO-0 656_CLK */
209 /* GPIO-1 656_D0 */ 223 /* GPIO-1 656_D0 */
@@ -221,6 +235,7 @@ int cx23885_ir_init(struct cx23885_dev *dev)
221{ 235{
222 switch (dev->board) { 236 switch (dev->board) {
223 case CX23885_BOARD_HAUPPAUGE_HVR1250: 237 case CX23885_BOARD_HAUPPAUGE_HVR1250:
238 case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
224 case CX23885_BOARD_HAUPPAUGE_HVR1800: 239 case CX23885_BOARD_HAUPPAUGE_HVR1800:
225 /* FIXME: Implement me */ 240 /* FIXME: Implement me */
226 break; 241 break;
@@ -244,6 +259,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
244 259
245 switch (dev->board) { 260 switch (dev->board) {
246 case CX23885_BOARD_HAUPPAUGE_HVR1250: 261 case CX23885_BOARD_HAUPPAUGE_HVR1250:
262 case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
247 case CX23885_BOARD_HAUPPAUGE_HVR1800: 263 case CX23885_BOARD_HAUPPAUGE_HVR1800:
248 case CX23885_BOARD_HAUPPAUGE_HVR1800lp: 264 case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
249 if (dev->i2c_bus[0].i2c_rc == 0) 265 if (dev->i2c_bus[0].i2c_rc == 0)
@@ -258,6 +274,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
258 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; 274 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
259 break; 275 break;
260 case CX23885_BOARD_HAUPPAUGE_HVR1250: 276 case CX23885_BOARD_HAUPPAUGE_HVR1250:
277 case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
261 case CX23885_BOARD_HAUPPAUGE_HVR1800: 278 case CX23885_BOARD_HAUPPAUGE_HVR1800:
262 case CX23885_BOARD_HAUPPAUGE_HVR1800lp: 279 case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
263 default: 280 default:
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 @@
33#include "s5h1409.h" 33#include "s5h1409.h"
34#include "mt2131.h" 34#include "mt2131.h"
35#include "lgdt330x.h" 35#include "lgdt330x.h"
36#include "xc5000.h"
36#include "dvb-pll.h" 37#include "dvb-pll.h"
37 38
38static unsigned int debug = 0; 39static unsigned int debug = 0;
@@ -74,6 +75,32 @@ static void dvb_buf_release(struct videobuf_queue *q,
74 cx23885_free_buffer(q, (struct cx23885_buffer*)vb); 75 cx23885_free_buffer(q, (struct cx23885_buffer*)vb);
75} 76}
76 77
78static int cx23885_request_firmware(struct dvb_frontend *fe,
79 const struct firmware **fw, char *name)
80{
81 struct cx23885_tsport *port = fe->dvb->priv;
82 struct cx23885_dev *dev = port->dev;
83
84 dprintk(1, "%s(?,?,%s)\n", __FUNCTION__, name);
85
86 return request_firmware(fw, name, &dev->pci->dev);
87}
88
89static int hauppauge_hvr1500q_tuner_reset(struct dvb_frontend *fe)
90{
91 struct cx23885_tsport *port = fe->dvb->priv;
92 struct cx23885_dev *dev = port->dev;
93
94 dprintk(1, "%s()\n", __FUNCTION__);
95
96 /* Drive the tuner into reset back back */
97 cx_clear(GP0_IO, 0x00000004);
98 mdelay(200);
99 cx_set(GP0_IO, 0x00000004);
100
101 return 0;
102}
103
77static struct videobuf_queue_ops dvb_qops = { 104static struct videobuf_queue_ops dvb_qops = {
78 .buf_setup = dvb_buf_setup, 105 .buf_setup = dvb_buf_setup,
79 .buf_prepare = dvb_buf_prepare, 106 .buf_prepare = dvb_buf_prepare,
@@ -109,6 +136,22 @@ static struct lgdt330x_config fusionhdtv_5_express = {
109 .serial_mpeg = 0x40, 136 .serial_mpeg = 0x40,
110}; 137};
111 138
139static struct s5h1409_config hauppauge_hvr1500q_config = {
140 .demod_address = 0x32 >> 1,
141 .output_mode = S5H1409_SERIAL_OUTPUT,
142 .gpio = S5H1409_GPIO_ON,
143 .qam_if = 44000,
144 .inversion = S5H1409_INVERSION_OFF,
145 .status_mode = S5H1409_DEMODLOCKING
146};
147
148static struct xc5000_config hauppauge_hvr1500q_tunerconfig = {
149 .i2c_address = 0x61,
150 .if_frequency = 4570000,
151 .request_firmware = cx23885_request_firmware,
152 .tuner_reset = hauppauge_hvr1500q_tuner_reset
153};
154
112static int dvb_register(struct cx23885_tsport *port) 155static int dvb_register(struct cx23885_tsport *port)
113{ 156{
114 struct cx23885_dev *dev = port->dev; 157 struct cx23885_dev *dev = port->dev;
@@ -152,6 +195,17 @@ static int dvb_register(struct cx23885_tsport *port)
152 &i2c_bus->i2c_adap, DVB_PLL_LG_TDVS_H06XF); 195 &i2c_bus->i2c_adap, DVB_PLL_LG_TDVS_H06XF);
153 } 196 }
154 break; 197 break;
198 case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
199 i2c_bus = &dev->i2c_bus[1];
200 port->dvb.frontend = dvb_attach(s5h1409_attach,
201 &hauppauge_hvr1500q_config,
202 &dev->i2c_bus[0].i2c_adap);
203 if (port->dvb.frontend != NULL) {
204 dvb_attach(xc5000_attach, port->dvb.frontend,
205 &i2c_bus->i2c_adap,
206 &hauppauge_hvr1500q_tunerconfig);
207 }
208 break;
155 default: 209 default:
156 printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", 210 printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
157 dev->name); 211 dev->name);
diff --git a/drivers/media/video/cx23885/cx23885-i2c.c b/drivers/media/video/cx23885/cx23885-i2c.c
index 20f3fb450f88..b2ffbf04ef2c 100644
--- a/drivers/media/video/cx23885/cx23885-i2c.c
+++ b/drivers/media/video/cx23885/cx23885-i2c.c
@@ -332,7 +332,7 @@ static char *i2c_devs[128] = {
332 [ 0x84 >> 1 ] = "tda8295", 332 [ 0x84 >> 1 ] = "tda8295",
333 [ 0xa0 >> 1 ] = "eeprom", 333 [ 0xa0 >> 1 ] = "eeprom",
334 [ 0xc0 >> 1 ] = "tuner/mt2131/tda8275", 334 [ 0xc0 >> 1 ] = "tuner/mt2131/tda8275",
335 [ 0xc2 >> 1 ] = "tuner/mt2131/tda8275", 335 [ 0xc2 >> 1 ] = "tuner/mt2131/tda8275/xc5000",
336}; 336};
337 337
338static void do_i2c_scan(char *name, struct i2c_client *c) 338static void do_i2c_scan(char *name, struct i2c_client *c)
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h
index 205640cc48f7..3f019f3cb292 100644
--- a/drivers/media/video/cx23885/cx23885.h
+++ b/drivers/media/video/cx23885/cx23885.h
@@ -53,6 +53,7 @@
53#define CX23885_BOARD_HAUPPAUGE_HVR1800 2 53#define CX23885_BOARD_HAUPPAUGE_HVR1800 2
54#define CX23885_BOARD_HAUPPAUGE_HVR1250 3 54#define CX23885_BOARD_HAUPPAUGE_HVR1250 3
55#define CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP 4 55#define CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP 4
56#define CX23885_BOARD_HAUPPAUGE_HVR1500Q 5
56 57
57enum cx23885_itype { 58enum cx23885_itype {
58 CX23885_VMUX_COMPOSITE1 = 1, 59 CX23885_VMUX_COMPOSITE1 = 1,