diff options
Diffstat (limited to 'drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 690477a67917..8db68f2d1351 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.39 2005/07/02 20:00:46 mkrufky Exp $ | 2 | * $Id: cx88-dvb.c,v 1.41 2005/07/04 19:35:05 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,22 +30,25 @@ | |||
30 | #include <linux/file.h> | 30 | #include <linux/file.h> |
31 | #include <linux/suspend.h> | 31 | #include <linux/suspend.h> |
32 | 32 | ||
33 | /* these three frontends need merging via linuxtv cvs ... */ | 33 | #define CONFIG_DVB_MT352 1 |
34 | #define HAVE_CX22702 1 | 34 | #define CONFIG_DVB_CX22702 1 |
35 | #define HAVE_OR51132 1 | 35 | #define CONFIG_DVB_OR51132 1 |
36 | #define HAVE_LGDT3302 1 | 36 | #define CONFIG_DVB_LGDT3302 1 |
37 | 37 | ||
38 | #include "cx88.h" | 38 | #include "cx88.h" |
39 | #include "dvb-pll.h" | 39 | #include "dvb-pll.h" |
40 | #include "mt352.h" | 40 | |
41 | #include "mt352_priv.h" | 41 | #if CONFIG_DVB_MT352 |
42 | #if HAVE_CX22702 | 42 | # include "mt352.h" |
43 | # include "mt352_priv.h" | ||
44 | #endif | ||
45 | #if CONFIG_DVB_CX22702 | ||
43 | # include "cx22702.h" | 46 | # include "cx22702.h" |
44 | #endif | 47 | #endif |
45 | #if HAVE_OR51132 | 48 | #if CONFIG_DVB_OR51132 |
46 | # include "or51132.h" | 49 | # include "or51132.h" |
47 | #endif | 50 | #endif |
48 | #if HAVE_LGDT3302 | 51 | #if CONFIG_DVB_LGDT3302 |
49 | # include "lgdt3302.h" | 52 | # include "lgdt3302.h" |
50 | #endif | 53 | #endif |
51 | 54 | ||
@@ -104,6 +107,7 @@ static struct videobuf_queue_ops dvb_qops = { | |||
104 | 107 | ||
105 | /* ------------------------------------------------------------------ */ | 108 | /* ------------------------------------------------------------------ */ |
106 | 109 | ||
110 | #if CONFIG_DVB_MT352 | ||
107 | static int dvico_fusionhdtv_demod_init(struct dvb_frontend* fe) | 111 | static int dvico_fusionhdtv_demod_init(struct dvb_frontend* fe) |
108 | { | 112 | { |
109 | static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x39 }; | 113 | static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x39 }; |
@@ -171,8 +175,9 @@ static struct mt352_config dntv_live_dvbt_config = { | |||
171 | .demod_init = dntv_live_dvbt_demod_init, | 175 | .demod_init = dntv_live_dvbt_demod_init, |
172 | .pll_set = mt352_pll_set, | 176 | .pll_set = mt352_pll_set, |
173 | }; | 177 | }; |
178 | #endif | ||
174 | 179 | ||
175 | #if HAVE_CX22702 | 180 | #if CONFIG_DVB_CX22702 |
176 | static struct cx22702_config connexant_refboard_config = { | 181 | static struct cx22702_config connexant_refboard_config = { |
177 | .demod_address = 0x43, | 182 | .demod_address = 0x43, |
178 | .pll_address = 0x60, | 183 | .pll_address = 0x60, |
@@ -186,7 +191,7 @@ static struct cx22702_config hauppauge_novat_config = { | |||
186 | }; | 191 | }; |
187 | #endif | 192 | #endif |
188 | 193 | ||
189 | #if HAVE_OR51132 | 194 | #if CONFIG_DVB_OR51132 |
190 | static int or51132_set_ts_param(struct dvb_frontend* fe, | 195 | static int or51132_set_ts_param(struct dvb_frontend* fe, |
191 | int is_punctured) | 196 | int is_punctured) |
192 | { | 197 | { |
@@ -203,7 +208,7 @@ static struct or51132_config pchdtv_hd3000 = { | |||
203 | }; | 208 | }; |
204 | #endif | 209 | #endif |
205 | 210 | ||
206 | #if HAVE_LGDT3302 | 211 | #if CONFIG_DVB_LGDT3302 |
207 | static int lgdt3302_set_ts_param(struct dvb_frontend* fe, int is_punctured) | 212 | static int lgdt3302_set_ts_param(struct dvb_frontend* fe, int is_punctured) |
208 | { | 213 | { |
209 | struct cx8802_dev *dev= fe->dvb->priv; | 214 | struct cx8802_dev *dev= fe->dvb->priv; |
@@ -237,7 +242,7 @@ static int dvb_register(struct cx8802_dev *dev) | |||
237 | 242 | ||
238 | /* init frontend */ | 243 | /* init frontend */ |
239 | switch (dev->core->board) { | 244 | switch (dev->core->board) { |
240 | #if HAVE_CX22702 | 245 | #if CONFIG_DVB_CX22702 |
241 | case CX88_BOARD_HAUPPAUGE_DVB_T1: | 246 | case CX88_BOARD_HAUPPAUGE_DVB_T1: |
242 | dev->dvb.frontend = cx22702_attach(&hauppauge_novat_config, | 247 | dev->dvb.frontend = cx22702_attach(&hauppauge_novat_config, |
243 | &dev->core->i2c_adap); | 248 | &dev->core->i2c_adap); |
@@ -248,6 +253,7 @@ static int dvb_register(struct cx8802_dev *dev) | |||
248 | &dev->core->i2c_adap); | 253 | &dev->core->i2c_adap); |
249 | break; | 254 | break; |
250 | #endif | 255 | #endif |
256 | #if CONFIG_DVB_MT352 | ||
251 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: | 257 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: |
252 | dev->core->pll_addr = 0x61; | 258 | dev->core->pll_addr = 0x61; |
253 | dev->core->pll_desc = &dvb_pll_lg_z201; | 259 | dev->core->pll_desc = &dvb_pll_lg_z201; |
@@ -268,13 +274,14 @@ static int dvb_register(struct cx8802_dev *dev) | |||
268 | dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_config, | 274 | dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_config, |
269 | &dev->core->i2c_adap); | 275 | &dev->core->i2c_adap); |
270 | break; | 276 | break; |
271 | #if HAVE_OR51132 | 277 | #endif |
278 | #if CONFIG_DVB_OR51132 | ||
272 | case CX88_BOARD_PCHDTV_HD3000: | 279 | case CX88_BOARD_PCHDTV_HD3000: |
273 | dev->dvb.frontend = or51132_attach(&pchdtv_hd3000, | 280 | dev->dvb.frontend = or51132_attach(&pchdtv_hd3000, |
274 | &dev->core->i2c_adap); | 281 | &dev->core->i2c_adap); |
275 | break; | 282 | break; |
276 | #endif | 283 | #endif |
277 | #if HAVE_LGDT3302 | 284 | #if CONFIG_DVB_LGDT3302 |
278 | case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q: | 285 | case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q: |
279 | dev->ts_gen_cntrl = 0x08; | 286 | dev->ts_gen_cntrl = 0x08; |
280 | { | 287 | { |