diff options
author | Michael Krufky <mkrufky@m1k.net> | 2005-07-07 20:58:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-07 21:24:04 -0400 |
commit | f1798495592c1bcd7871abdc1ef2985d65c34224 (patch) | |
tree | 3496ce6e2c6318fbd09b5d9cbfcb51e2ebd87cfa /drivers/media/video/cx88/cx88-dvb.c | |
parent | 9ac4c158b0090462bc356b934024cf0c5d7c8526 (diff) |
[PATCH] v4l: add DVB support for DViCO FusionHDTV3 Gold-Q
Add dvb support in v4l for DViCO FusionHDTV3 Gold-Q using lgdt3302 frontend.
Signed-off-by: Mac Michaels <wmichaels1@earthlink.net>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 82cc1538c105..206c6a0980e4 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: cx88-dvb.c,v 1.36 2005/06/21 06:08:12 mkrufky Exp $ | 2 | * $Id: cx88-dvb.c,v 1.37 2005/06/28 23:41:47 mkrufky Exp $ |
3 | * | 3 | * |
4 | * device driver for Conexant 2388x based TV cards | 4 | * device driver for Conexant 2388x based TV cards |
5 | * MPEG Transport Stream (DVB) routines | 5 | * MPEG Transport Stream (DVB) routines |
@@ -30,9 +30,10 @@ | |||
30 | #include <linux/file.h> | 30 | #include <linux/file.h> |
31 | #include <linux/suspend.h> | 31 | #include <linux/suspend.h> |
32 | 32 | ||
33 | /* those two frontends need merging via linuxtv cvs ... */ | 33 | /* these three frontends need merging via linuxtv cvs ... */ |
34 | #define HAVE_CX22702 1 | 34 | #define HAVE_CX22702 1 |
35 | #define HAVE_OR51132 1 | 35 | #define HAVE_OR51132 1 |
36 | #define HAVE_LGDT3302 1 | ||
36 | 37 | ||
37 | #include "cx88.h" | 38 | #include "cx88.h" |
38 | #include "dvb-pll.h" | 39 | #include "dvb-pll.h" |
@@ -44,6 +45,9 @@ | |||
44 | #if HAVE_OR51132 | 45 | #if HAVE_OR51132 |
45 | # include "or51132.h" | 46 | # include "or51132.h" |
46 | #endif | 47 | #endif |
48 | #if HAVE_LGDT3302 | ||
49 | # include "lgdt3302.h" | ||
50 | #endif | ||
47 | 51 | ||
48 | MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); | 52 | MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); |
49 | MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); | 53 | MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); |
@@ -199,6 +203,25 @@ static struct or51132_config pchdtv_hd3000 = { | |||
199 | }; | 203 | }; |
200 | #endif | 204 | #endif |
201 | 205 | ||
206 | #if HAVE_LGDT3302 | ||
207 | static int lgdt3302_set_ts_param(struct dvb_frontend* fe, int is_punctured) | ||
208 | { | ||
209 | struct cx8802_dev *dev= fe->dvb->priv; | ||
210 | if (is_punctured) | ||
211 | dev->ts_gen_cntrl |= 0x04; | ||
212 | else | ||
213 | dev->ts_gen_cntrl &= ~0x04; | ||
214 | return 0; | ||
215 | } | ||
216 | |||
217 | static struct lgdt3302_config fusionhdtv_3_gold_q = { | ||
218 | .demod_address = 0x0e, | ||
219 | .pll_address = 0x61, | ||
220 | .pll_desc = &dvb_pll_microtune_4042, | ||
221 | .set_ts_params = lgdt3302_set_ts_param, | ||
222 | }; | ||
223 | #endif | ||
224 | |||
202 | static int dvb_register(struct cx8802_dev *dev) | 225 | static int dvb_register(struct cx8802_dev *dev) |
203 | { | 226 | { |
204 | /* init struct videobuf_dvb */ | 227 | /* init struct videobuf_dvb */ |
@@ -243,6 +266,22 @@ static int dvb_register(struct cx8802_dev *dev) | |||
243 | &dev->core->i2c_adap); | 266 | &dev->core->i2c_adap); |
244 | break; | 267 | break; |
245 | #endif | 268 | #endif |
269 | #if HAVE_LGDT3302 | ||
270 | case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q: | ||
271 | dev->ts_gen_cntrl = 0x08; | ||
272 | { | ||
273 | /* Do a hardware reset of chip before using it. */ | ||
274 | struct cx88_core *core = dev->core; | ||
275 | |||
276 | cx_clear(MO_GP0_IO, 1); | ||
277 | mdelay(100); | ||
278 | cx_set(MO_GP0_IO, 9); // ANT connector too FIXME | ||
279 | mdelay(200); | ||
280 | dev->dvb.frontend = lgdt3302_attach(&fusionhdtv_3_gold_q, | ||
281 | &dev->core->i2c_adap); | ||
282 | } | ||
283 | break; | ||
284 | #endif | ||
246 | default: | 285 | default: |
247 | printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", | 286 | printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", |
248 | dev->core->name); | 287 | dev->core->name); |