diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-06-24 17:14:52 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:24:24 -0400 |
commit | cd2cd0aad0c8d5d29492335307b371f247b7a60f (patch) | |
tree | 2fe21541a7a73d245f859597ff5d137a33410dca /drivers | |
parent | f1b24397e86c4c5b6984e2e67c17a53cdab14b35 (diff) |
V4L/DVB (5799): Or51211: remove hardcoded fcv1236d tuner programming
- Remove hardcoded fcv1236d tuner programmming from or51211.c
- Alter dvb-bt8xx for the pcHDTV-2000 to use dvb-pll for fcv1236d support.
Thanks to Jarom Hatch <jshatch@gmail.com> for testing this change.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/bt8xx/dvb-bt8xx.c | 3 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/or51211.c | 31 |
2 files changed, 6 insertions, 28 deletions
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c index 5120af41a818..67613eb6fa3d 100644 --- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c +++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c | |||
@@ -692,6 +692,9 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) | |||
692 | 692 | ||
693 | case BTTV_BOARD_PC_HDTV: | 693 | case BTTV_BOARD_PC_HDTV: |
694 | card->fe = dvb_attach(or51211_attach, &or51211_config, card->i2c_adapter); | 694 | card->fe = dvb_attach(or51211_attach, &or51211_config, card->i2c_adapter); |
695 | if (card->fe != NULL) | ||
696 | dvb_attach(dvb_pll_attach, card->fe, 0x61, | ||
697 | card->i2c_adapter, DVB_PLL_FCV1236D); | ||
695 | break; | 698 | break; |
696 | } | 699 | } |
697 | 700 | ||
diff --git a/drivers/media/dvb/frontends/or51211.c b/drivers/media/dvb/frontends/or51211.c index 048d7cfe12d3..f46d5a46683a 100644 --- a/drivers/media/dvb/frontends/or51211.c +++ b/drivers/media/dvb/frontends/or51211.c | |||
@@ -223,38 +223,13 @@ static int or51211_set_parameters(struct dvb_frontend* fe, | |||
223 | struct dvb_frontend_parameters *param) | 223 | struct dvb_frontend_parameters *param) |
224 | { | 224 | { |
225 | struct or51211_state* state = fe->demodulator_priv; | 225 | struct or51211_state* state = fe->demodulator_priv; |
226 | u32 freq = 0; | ||
227 | u16 tunerfreq = 0; | ||
228 | u8 buf[4]; | ||
229 | 226 | ||
230 | /* Change only if we are actually changing the channel */ | 227 | /* Change only if we are actually changing the channel */ |
231 | if (state->current_frequency != param->frequency) { | 228 | if (state->current_frequency != param->frequency) { |
232 | freq = 44000 + (param->frequency/1000); | 229 | if (fe->ops.tuner_ops.set_params) { |
233 | tunerfreq = freq * 16/1000; | 230 | fe->ops.tuner_ops.set_params(fe, param); |
234 | 231 | if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); | |
235 | dprintk("set_parameters frequency = %d (tunerfreq = %d)\n", | ||
236 | param->frequency,tunerfreq); | ||
237 | |||
238 | buf[0] = (tunerfreq >> 8) & 0x7F; | ||
239 | buf[1] = (tunerfreq & 0xFF); | ||
240 | buf[2] = 0x8E; | ||
241 | |||
242 | if (param->frequency < 157250000) { | ||
243 | buf[3] = 0xA0; | ||
244 | dprintk("set_parameters VHF low range\n"); | ||
245 | } else if (param->frequency < 454000000) { | ||
246 | buf[3] = 0x90; | ||
247 | dprintk("set_parameters VHF high range\n"); | ||
248 | } else { | ||
249 | buf[3] = 0x30; | ||
250 | dprintk("set_parameters UHF range\n"); | ||
251 | } | 232 | } |
252 | dprintk("set_parameters tuner bytes: 0x%02x 0x%02x " | ||
253 | "0x%02x 0x%02x\n",buf[0],buf[1],buf[2],buf[3]); | ||
254 | |||
255 | if (i2c_writebytes(state,0xC2>>1,buf,4)) | ||
256 | printk(KERN_WARNING "or51211:set_parameters error " | ||
257 | "writing to tuner\n"); | ||
258 | 233 | ||
259 | /* Set to ATSC mode */ | 234 | /* Set to ATSC mode */ |
260 | or51211_setmode(fe,0); | 235 | or51211_setmode(fe,0); |