diff options
-rw-r--r-- | Documentation/video4linux/CARDLIST.cx23885 | 1 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-cards.c | 24 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-dvb.c | 65 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885.h | 1 |
4 files changed, 90 insertions, 1 deletions
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885 index 54d06e4ff743..698971d23f4e 100644 --- a/Documentation/video4linux/CARDLIST.cx23885 +++ b/Documentation/video4linux/CARDLIST.cx23885 | |||
@@ -4,3 +4,4 @@ | |||
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] | 6 | 5 -> Hauppauge WinTV-HVR1500Q [0070:7797] |
7 | 6 -> Hauppauge WinTV-HVR1500 [0070:7717] | ||
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index d40232cda462..e11fa10a13a6 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c | |||
@@ -117,7 +117,10 @@ struct cx23885_board cx23885_boards[] = { | |||
117 | .name = "Hauppauge WinTV-HVR1500Q", | 117 | .name = "Hauppauge WinTV-HVR1500Q", |
118 | .portc = CX23885_MPEG_DVB, | 118 | .portc = CX23885_MPEG_DVB, |
119 | }, | 119 | }, |
120 | 120 | [CX23885_BOARD_HAUPPAUGE_HVR1500] = { | |
121 | .name = "Hauppauge WinTV-HVR1500", | ||
122 | .portc = CX23885_MPEG_DVB, | ||
123 | }, | ||
121 | }; | 124 | }; |
122 | const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); | 125 | const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); |
123 | 126 | ||
@@ -153,6 +156,10 @@ struct cx23885_subid cx23885_subids[] = { | |||
153 | .subvendor = 0x0070, | 156 | .subvendor = 0x0070, |
154 | .subdevice = 0x7797, | 157 | .subdevice = 0x7797, |
155 | .card = CX23885_BOARD_HAUPPAUGE_HVR1500Q, | 158 | .card = CX23885_BOARD_HAUPPAUGE_HVR1500Q, |
159 | },{ | ||
160 | .subvendor = 0x0070, | ||
161 | .subdevice = 0x7717, | ||
162 | .card = CX23885_BOARD_HAUPPAUGE_HVR1500, | ||
156 | }, | 163 | }, |
157 | }; | 164 | }; |
158 | const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); | 165 | const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); |
@@ -214,6 +221,18 @@ void cx23885_gpio_setup(struct cx23885_dev *dev) | |||
214 | /* GPIO-0 cx24227 demodulator reset */ | 221 | /* GPIO-0 cx24227 demodulator reset */ |
215 | cx_set(GP0_IO, 0x00010001); /* Bring the part out of reset */ | 222 | cx_set(GP0_IO, 0x00010001); /* Bring the part out of reset */ |
216 | break; | 223 | break; |
224 | case CX23885_BOARD_HAUPPAUGE_HVR1500: | ||
225 | /* GPIO-0 cx24227 demodulator */ | ||
226 | /* GPIO-2 xc3028 tuner */ | ||
227 | |||
228 | /* Put the parts into reset */ | ||
229 | cx_set(GP0_IO, 0x00050000); | ||
230 | cx_clear(GP0_IO, 0x00000005); | ||
231 | msleep(5); | ||
232 | |||
233 | /* Bring the parts out of reset */ | ||
234 | cx_set(GP0_IO, 0x00050005); | ||
235 | break; | ||
217 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: | 236 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: |
218 | /* GPIO-0 cx24227 demodulator reset */ | 237 | /* GPIO-0 cx24227 demodulator reset */ |
219 | /* GPIO-2 xc5000 tuner reset */ | 238 | /* GPIO-2 xc5000 tuner reset */ |
@@ -236,6 +255,7 @@ int cx23885_ir_init(struct cx23885_dev *dev) | |||
236 | { | 255 | { |
237 | switch (dev->board) { | 256 | switch (dev->board) { |
238 | case CX23885_BOARD_HAUPPAUGE_HVR1250: | 257 | case CX23885_BOARD_HAUPPAUGE_HVR1250: |
258 | case CX23885_BOARD_HAUPPAUGE_HVR1500: | ||
239 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: | 259 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: |
240 | case CX23885_BOARD_HAUPPAUGE_HVR1800: | 260 | case CX23885_BOARD_HAUPPAUGE_HVR1800: |
241 | /* FIXME: Implement me */ | 261 | /* FIXME: Implement me */ |
@@ -260,6 +280,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) | |||
260 | 280 | ||
261 | switch (dev->board) { | 281 | switch (dev->board) { |
262 | case CX23885_BOARD_HAUPPAUGE_HVR1250: | 282 | case CX23885_BOARD_HAUPPAUGE_HVR1250: |
283 | case CX23885_BOARD_HAUPPAUGE_HVR1500: | ||
263 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: | 284 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: |
264 | case CX23885_BOARD_HAUPPAUGE_HVR1800: | 285 | case CX23885_BOARD_HAUPPAUGE_HVR1800: |
265 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: | 286 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: |
@@ -275,6 +296,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) | |||
275 | ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; | 296 | ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
276 | break; | 297 | break; |
277 | case CX23885_BOARD_HAUPPAUGE_HVR1250: | 298 | case CX23885_BOARD_HAUPPAUGE_HVR1250: |
299 | case CX23885_BOARD_HAUPPAUGE_HVR1500: | ||
278 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: | 300 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: |
279 | case CX23885_BOARD_HAUPPAUGE_HVR1800: | 301 | case CX23885_BOARD_HAUPPAUGE_HVR1800: |
280 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: | 302 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: |
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c index f0882dd30d3f..c1309118ea87 100644 --- a/drivers/media/video/cx23885/cx23885-dvb.c +++ b/drivers/media/video/cx23885/cx23885-dvb.c | |||
@@ -35,6 +35,8 @@ | |||
35 | #include "lgdt330x.h" | 35 | #include "lgdt330x.h" |
36 | #include "xc5000.h" | 36 | #include "xc5000.h" |
37 | #include "dvb-pll.h" | 37 | #include "dvb-pll.h" |
38 | #include "tuner-xc2028.h" | ||
39 | #include "tuner-xc2028-types.h" | ||
38 | 40 | ||
39 | static unsigned int debug = 0; | 41 | static unsigned int debug = 0; |
40 | 42 | ||
@@ -126,6 +128,14 @@ static struct s5h1409_config hauppauge_hvr1800lp_config = { | |||
126 | .status_mode = S5H1409_DEMODLOCKING | 128 | .status_mode = S5H1409_DEMODLOCKING |
127 | }; | 129 | }; |
128 | 130 | ||
131 | static struct s5h1409_config hauppauge_hvr1500_config = { | ||
132 | .demod_address = 0x32 >> 1, | ||
133 | .output_mode = S5H1409_SERIAL_OUTPUT, | ||
134 | .gpio = S5H1409_GPIO_OFF, | ||
135 | .inversion = S5H1409_INVERSION_OFF, | ||
136 | .status_mode = S5H1409_DEMODLOCKING | ||
137 | }; | ||
138 | |||
129 | static struct mt2131_config hauppauge_generic_tunerconfig = { | 139 | static struct mt2131_config hauppauge_generic_tunerconfig = { |
130 | 0x61 | 140 | 0x61 |
131 | }; | 141 | }; |
@@ -152,6 +162,36 @@ static struct xc5000_config hauppauge_hvr1500q_tunerconfig = { | |||
152 | .tuner_reset = hauppauge_hvr1500q_tuner_reset | 162 | .tuner_reset = hauppauge_hvr1500q_tuner_reset |
153 | }; | 163 | }; |
154 | 164 | ||
165 | static int cx23885_hvr1500_xc3028_callback(void *ptr, int command, int arg) | ||
166 | { | ||
167 | struct cx23885_tsport *port = ptr; | ||
168 | struct cx23885_dev *dev = port->dev; | ||
169 | |||
170 | switch (command) { | ||
171 | case XC2028_TUNER_RESET: | ||
172 | /* Send the tuner in then out of reset */ | ||
173 | /* GPIO-2 xc3028 tuner */ | ||
174 | dprintk(1, "%s: XC2028_TUNER_RESET %d\n", __FUNCTION__, arg); | ||
175 | |||
176 | cx_set(GP0_IO, 0x00040000); | ||
177 | cx_clear(GP0_IO, 0x00000004); | ||
178 | msleep(5); | ||
179 | |||
180 | cx_set(GP0_IO, 0x00040004); | ||
181 | msleep(5); | ||
182 | break; | ||
183 | case XC2028_RESET_CLK: | ||
184 | dprintk(1, "%s: XC2028_RESET_CLK %d\n", __FUNCTION__, arg); | ||
185 | break; | ||
186 | default: | ||
187 | dprintk(1, "%s: unknown command %d, arg %d\n", __FUNCTION__, | ||
188 | command, arg); | ||
189 | return -EINVAL; | ||
190 | } | ||
191 | |||
192 | return 0; | ||
193 | } | ||
194 | |||
155 | static int dvb_register(struct cx23885_tsport *port) | 195 | static int dvb_register(struct cx23885_tsport *port) |
156 | { | 196 | { |
157 | struct cx23885_dev *dev = port->dev; | 197 | struct cx23885_dev *dev = port->dev; |
@@ -206,6 +246,31 @@ static int dvb_register(struct cx23885_tsport *port) | |||
206 | &hauppauge_hvr1500q_tunerconfig); | 246 | &hauppauge_hvr1500q_tunerconfig); |
207 | } | 247 | } |
208 | break; | 248 | break; |
249 | case CX23885_BOARD_HAUPPAUGE_HVR1500: | ||
250 | i2c_bus = &dev->i2c_bus[1]; | ||
251 | port->dvb.frontend = dvb_attach(s5h1409_attach, | ||
252 | &hauppauge_hvr1500_config, | ||
253 | &dev->i2c_bus[0].i2c_adap); | ||
254 | if (port->dvb.frontend != NULL) { | ||
255 | struct dvb_frontend *fe; | ||
256 | struct xc2028_config cfg = { | ||
257 | .i2c_adap = &i2c_bus->i2c_adap, | ||
258 | .i2c_addr = 0x61, | ||
259 | .video_dev = port, | ||
260 | .callback = cx23885_hvr1500_xc3028_callback, | ||
261 | }; | ||
262 | static struct xc2028_ctrl ctl = { | ||
263 | .fname = "xc3028-v27.fw", | ||
264 | .max_len = 64, | ||
265 | .scode_table = OREN538, | ||
266 | }; | ||
267 | |||
268 | fe = dvb_attach(xc2028_attach, | ||
269 | port->dvb.frontend, &cfg); | ||
270 | if (fe != NULL && fe->ops.tuner_ops.set_config != NULL) | ||
271 | fe->ops.tuner_ops.set_config(fe, &ctl); | ||
272 | } | ||
273 | break; | ||
209 | default: | 274 | default: |
210 | printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", | 275 | printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", |
211 | dev->name); | 276 | dev->name); |
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h index 3f019f3cb292..974ec14782d7 100644 --- a/drivers/media/video/cx23885/cx23885.h +++ b/drivers/media/video/cx23885/cx23885.h | |||
@@ -54,6 +54,7 @@ | |||
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 | #define CX23885_BOARD_HAUPPAUGE_HVR1500Q 5 |
57 | #define CX23885_BOARD_HAUPPAUGE_HVR1500 6 | ||
57 | 58 | ||
58 | enum cx23885_itype { | 59 | enum cx23885_itype { |
59 | CX23885_VMUX_COMPOSITE1 = 1, | 60 | CX23885_VMUX_COMPOSITE1 = 1, |