diff options
author | Michael Krufky <mkrufky@m1k.net> | 2005-07-27 14:45:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-27 19:26:16 -0400 |
commit | 0ccef6dbb08770bf21ffc82094c2117bd7977ff8 (patch) | |
tree | 9c3ce535dd9fbe22d922b8f48b0e3c285b73327f /drivers/media | |
parent | b6aef071bdef0cd9f69113bb3575aa45fafdbbbf (diff) |
[PATCH] dvb/4vl: RF input selection fir
Select the RF input connector based upon the type of demodulation selected.
ANT RF connector is selected for 8-VSB and CABLE RF connector is selected
for QAM64/QAM256. This only affects the cards that use the Microtune 4042
tuner.
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')
-rw-r--r-- | drivers/media/dvb/frontends/lgdt3302.c | 12 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/lgdt3302.h | 1 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 20 |
3 files changed, 31 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/lgdt3302.c b/drivers/media/dvb/frontends/lgdt3302.c index 136563606fb1..c803c05002ad 100644 --- a/drivers/media/dvb/frontends/lgdt3302.c +++ b/drivers/media/dvb/frontends/lgdt3302.c | |||
@@ -214,6 +214,10 @@ static int lgdt3302_set_parameters(struct dvb_frontend* fe, | |||
214 | 214 | ||
215 | /* Select VSB mode and serial MPEG interface */ | 215 | /* Select VSB mode and serial MPEG interface */ |
216 | top_ctrl_cfg[1] = 0x07; | 216 | top_ctrl_cfg[1] = 0x07; |
217 | |||
218 | /* Select ANT connector if supported by card */ | ||
219 | if (state->config->pll_rf_set) | ||
220 | state->config->pll_rf_set(fe, 1); | ||
217 | break; | 221 | break; |
218 | 222 | ||
219 | case QAM_64: | 223 | case QAM_64: |
@@ -221,6 +225,10 @@ static int lgdt3302_set_parameters(struct dvb_frontend* fe, | |||
221 | 225 | ||
222 | /* Select QAM_64 mode and serial MPEG interface */ | 226 | /* Select QAM_64 mode and serial MPEG interface */ |
223 | top_ctrl_cfg[1] = 0x04; | 227 | top_ctrl_cfg[1] = 0x04; |
228 | |||
229 | /* Select CABLE connector if supported by card */ | ||
230 | if (state->config->pll_rf_set) | ||
231 | state->config->pll_rf_set(fe, 0); | ||
224 | break; | 232 | break; |
225 | 233 | ||
226 | case QAM_256: | 234 | case QAM_256: |
@@ -228,6 +236,10 @@ static int lgdt3302_set_parameters(struct dvb_frontend* fe, | |||
228 | 236 | ||
229 | /* Select QAM_256 mode and serial MPEG interface */ | 237 | /* Select QAM_256 mode and serial MPEG interface */ |
230 | top_ctrl_cfg[1] = 0x05; | 238 | top_ctrl_cfg[1] = 0x05; |
239 | |||
240 | /* Select CABLE connector if supported by card */ | ||
241 | if (state->config->pll_rf_set) | ||
242 | state->config->pll_rf_set(fe, 0); | ||
231 | break; | 243 | break; |
232 | default: | 244 | default: |
233 | printk(KERN_WARNING "lgdt3302: %s: Modulation type(%d) UNSUPPORTED\n", __FUNCTION__, param->u.vsb.modulation); | 245 | printk(KERN_WARNING "lgdt3302: %s: Modulation type(%d) UNSUPPORTED\n", __FUNCTION__, param->u.vsb.modulation); |
diff --git a/drivers/media/dvb/frontends/lgdt3302.h b/drivers/media/dvb/frontends/lgdt3302.h index 327c47e598a2..6bf6f985e080 100644 --- a/drivers/media/dvb/frontends/lgdt3302.h +++ b/drivers/media/dvb/frontends/lgdt3302.h | |||
@@ -30,6 +30,7 @@ struct lgdt3302_config | |||
30 | u8 demod_address; | 30 | u8 demod_address; |
31 | 31 | ||
32 | /* PLL interface */ | 32 | /* PLL interface */ |
33 | int (*pll_rf_set) (struct dvb_frontend* fe, int index); | ||
33 | int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pll_address); | 34 | int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pll_address); |
34 | 35 | ||
35 | /* Need to set device param for start_dma */ | 36 | /* Need to set device param for start_dma */ |
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 3a8551a02d0c..492f8afe6b96 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.47 2005/07/20 05:20:37 mkrufky Exp $ | 2 | * $Id: cx88-dvb.c,v 1.48 2005/07/20 05:33:33 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 |
@@ -223,6 +223,19 @@ static int lgdt3302_pll_set(struct dvb_frontend* fe, | |||
223 | return 0; | 223 | return 0; |
224 | } | 224 | } |
225 | 225 | ||
226 | static int lgdt3302_pll_rf_set(struct dvb_frontend* fe, int index) | ||
227 | { | ||
228 | struct cx8802_dev *dev= fe->dvb->priv; | ||
229 | struct cx88_core *core = dev->core; | ||
230 | |||
231 | dprintk(1, "%s: index = %d\n", __FUNCTION__, index); | ||
232 | if (index == 0) | ||
233 | cx_clear(MO_GP0_IO, 8); | ||
234 | else | ||
235 | cx_set(MO_GP0_IO, 8); | ||
236 | return 0; | ||
237 | } | ||
238 | |||
226 | static int lgdt3302_set_ts_param(struct dvb_frontend* fe, int is_punctured) | 239 | static int lgdt3302_set_ts_param(struct dvb_frontend* fe, int is_punctured) |
227 | { | 240 | { |
228 | struct cx8802_dev *dev= fe->dvb->priv; | 241 | struct cx8802_dev *dev= fe->dvb->priv; |
@@ -296,8 +309,11 @@ static int dvb_register(struct cx8802_dev *dev) | |||
296 | 309 | ||
297 | cx_clear(MO_GP0_IO, 1); | 310 | cx_clear(MO_GP0_IO, 1); |
298 | mdelay(100); | 311 | mdelay(100); |
299 | cx_set(MO_GP0_IO, 9); // ANT connector too FIXME | 312 | cx_set(MO_GP0_IO, 1); |
300 | mdelay(200); | 313 | mdelay(200); |
314 | |||
315 | /* Select RF connector callback */ | ||
316 | fusionhdtv_3_gold.pll_rf_set = lgdt3302_pll_rf_set; | ||
301 | dev->core->pll_addr = 0x61; | 317 | dev->core->pll_addr = 0x61; |
302 | dev->core->pll_desc = &dvb_pll_microtune_4042; | 318 | dev->core->pll_desc = &dvb_pll_microtune_4042; |
303 | dev->dvb.frontend = lgdt3302_attach(&fusionhdtv_3_gold, | 319 | dev->dvb.frontend = lgdt3302_attach(&fusionhdtv_3_gold, |