diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-12-06 23:40:36 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:04:16 -0500 |
commit | 3ba71d2194500d1a9fef1b8491b9e0c168e7d46e (patch) | |
tree | 8399dcce77527d6e6ca2228027d6f9768ca84e9c /drivers/media | |
parent | 4cd8a7bd65a29c5b7833de177622cb2534d5e868 (diff) |
V4L/DVB (6900): cx23885: enable EZ-QAM mode for Hauppauge WinTV HVR-1800
Add module option 'alt_tuner' disabled by default.
When set to one, the dvb_frontend of HVR1800 will consist of:
s5h1409 demod + tda18271 tuner
When set zero (default), the dvb_frontend of HVR1800 will consist of:
s5h1409 demod + mt2131 tuner
If the tda18271 is used in digital mode, you will not be able to
tune an analog channel at the same time.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-cards.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-dvb.c | 47 |
2 files changed, 48 insertions, 2 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index e11fa10a13a6..fbf93c63dcaa 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c | |||
@@ -246,7 +246,8 @@ void cx23885_gpio_setup(struct cx23885_dev *dev) | |||
246 | /* GPIO-11-14 cx23417 addr0-3 */ | 246 | /* GPIO-11-14 cx23417 addr0-3 */ |
247 | /* GPIO-15-18 cx23417 READY, CS, RD, WR */ | 247 | /* GPIO-15-18 cx23417 READY, CS, RD, WR */ |
248 | /* GPIO-19 IR_RX */ | 248 | /* GPIO-19 IR_RX */ |
249 | // FIXME: Analog requires the tuner is brought out of reset | 249 | |
250 | cx_set(GP0_IO, 0x00040004); /* Bring the tuner out of reset */ | ||
250 | break; | 251 | break; |
251 | } | 252 | } |
252 | } | 253 | } |
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c index c1309118ea87..0f7e9dfcd73f 100644 --- a/drivers/media/video/cx23885/cx23885-dvb.c +++ b/drivers/media/video/cx23885/cx23885-dvb.c | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include "s5h1409.h" | 33 | #include "s5h1409.h" |
34 | #include "mt2131.h" | 34 | #include "mt2131.h" |
35 | #include "tda8290.h" | ||
35 | #include "lgdt330x.h" | 36 | #include "lgdt330x.h" |
36 | #include "xc5000.h" | 37 | #include "xc5000.h" |
37 | #include "dvb-pll.h" | 38 | #include "dvb-pll.h" |
@@ -45,6 +46,12 @@ static unsigned int debug = 0; | |||
45 | 46 | ||
46 | /* ------------------------------------------------------------------ */ | 47 | /* ------------------------------------------------------------------ */ |
47 | 48 | ||
49 | static unsigned int alt_tuner; | ||
50 | module_param(alt_tuner, int, 0644); | ||
51 | MODULE_PARM_DESC(alt_tuner, "Enable alternate tuner configuration"); | ||
52 | |||
53 | /* ------------------------------------------------------------------ */ | ||
54 | |||
48 | static int dvb_buf_setup(struct videobuf_queue *q, | 55 | static int dvb_buf_setup(struct videobuf_queue *q, |
49 | unsigned int *count, unsigned int *size) | 56 | unsigned int *count, unsigned int *size) |
50 | { | 57 | { |
@@ -119,6 +126,15 @@ static struct s5h1409_config hauppauge_generic_config = { | |||
119 | .status_mode = S5H1409_DEMODLOCKING | 126 | .status_mode = S5H1409_DEMODLOCKING |
120 | }; | 127 | }; |
121 | 128 | ||
129 | static struct s5h1409_config hauppauge_ezqam_config = { | ||
130 | .demod_address = 0x32 >> 1, | ||
131 | .output_mode = S5H1409_SERIAL_OUTPUT, | ||
132 | .gpio = S5H1409_GPIO_OFF, | ||
133 | .qam_if = 4000, | ||
134 | .inversion = S5H1409_INVERSION_ON, | ||
135 | .status_mode = S5H1409_DEMODLOCKING | ||
136 | }; | ||
137 | |||
122 | static struct s5h1409_config hauppauge_hvr1800lp_config = { | 138 | static struct s5h1409_config hauppauge_hvr1800lp_config = { |
123 | .demod_address = 0x32 >> 1, | 139 | .demod_address = 0x32 >> 1, |
124 | .output_mode = S5H1409_SERIAL_OUTPUT, | 140 | .output_mode = S5H1409_SERIAL_OUTPUT, |
@@ -203,7 +219,6 @@ static int dvb_register(struct cx23885_tsport *port) | |||
203 | /* init frontend */ | 219 | /* init frontend */ |
204 | switch (dev->board) { | 220 | switch (dev->board) { |
205 | case CX23885_BOARD_HAUPPAUGE_HVR1250: | 221 | case CX23885_BOARD_HAUPPAUGE_HVR1250: |
206 | case CX23885_BOARD_HAUPPAUGE_HVR1800: | ||
207 | i2c_bus = &dev->i2c_bus[0]; | 222 | i2c_bus = &dev->i2c_bus[0]; |
208 | port->dvb.frontend = dvb_attach(s5h1409_attach, | 223 | port->dvb.frontend = dvb_attach(s5h1409_attach, |
209 | &hauppauge_generic_config, | 224 | &hauppauge_generic_config, |
@@ -214,6 +229,33 @@ static int dvb_register(struct cx23885_tsport *port) | |||
214 | &hauppauge_generic_tunerconfig, 0); | 229 | &hauppauge_generic_tunerconfig, 0); |
215 | } | 230 | } |
216 | break; | 231 | break; |
232 | case CX23885_BOARD_HAUPPAUGE_HVR1800: | ||
233 | i2c_bus = &dev->i2c_bus[0]; | ||
234 | switch (alt_tuner) { | ||
235 | case 1: | ||
236 | port->dvb.frontend = | ||
237 | dvb_attach(s5h1409_attach, | ||
238 | &hauppauge_ezqam_config, | ||
239 | &i2c_bus->i2c_adap); | ||
240 | if (port->dvb.frontend != NULL) { | ||
241 | dvb_attach(tda829x_attach, port->dvb.frontend, | ||
242 | &dev->i2c_bus[1].i2c_adap, 0x42, | ||
243 | NULL); | ||
244 | } | ||
245 | break; | ||
246 | case 0: | ||
247 | default: | ||
248 | port->dvb.frontend = | ||
249 | dvb_attach(s5h1409_attach, | ||
250 | &hauppauge_generic_config, | ||
251 | &i2c_bus->i2c_adap); | ||
252 | if (port->dvb.frontend != NULL) | ||
253 | dvb_attach(mt2131_attach, port->dvb.frontend, | ||
254 | &i2c_bus->i2c_adap, | ||
255 | &hauppauge_generic_tunerconfig, 0); | ||
256 | break; | ||
257 | } | ||
258 | break; | ||
217 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: | 259 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: |
218 | i2c_bus = &dev->i2c_bus[0]; | 260 | i2c_bus = &dev->i2c_bus[0]; |
219 | port->dvb.frontend = dvb_attach(s5h1409_attach, | 261 | port->dvb.frontend = dvb_attach(s5h1409_attach, |
@@ -284,6 +326,9 @@ static int dvb_register(struct cx23885_tsport *port) | |||
284 | /* Put the analog decoder in standby to keep it quiet */ | 326 | /* Put the analog decoder in standby to keep it quiet */ |
285 | cx23885_call_i2c_clients(i2c_bus, TUNER_SET_STANDBY, NULL); | 327 | cx23885_call_i2c_clients(i2c_bus, TUNER_SET_STANDBY, NULL); |
286 | 328 | ||
329 | if (port->dvb.frontend->ops.analog_ops.standby) | ||
330 | port->dvb.frontend->ops.analog_ops.standby(port->dvb.frontend); | ||
331 | |||
287 | /* register everything */ | 332 | /* register everything */ |
288 | return videobuf_dvb_register(&port->dvb, THIS_MODULE, port, | 333 | return videobuf_dvb_register(&port->dvb, THIS_MODULE, port, |
289 | &dev->pci->dev); | 334 | &dev->pci->dev); |