Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cd2cd0aad0c8d5d29492335307b371f247b7a60f
Commit:     cd2cd0aad0c8d5d29492335307b371f247b7a60f
Parent:     f1b24397e86c4c5b6984e2e67c17a53cdab14b35
Author:     Michael Krufky <[EMAIL PROTECTED]>
AuthorDate: Sun Jun 24 18:14:52 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Wed Jul 18 14:24:24 2007 -0300

    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 <[EMAIL PROTECTED]> for testing this change.
    
    Signed-off-by: Michael Krufky <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/dvb/bt8xx/dvb-bt8xx.c   |    3 +++
 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 5120af4..67613eb 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)
 
        case BTTV_BOARD_PC_HDTV:
                card->fe = dvb_attach(or51211_attach, &or51211_config, 
card->i2c_adapter);
+               if (card->fe != NULL)
+                       dvb_attach(dvb_pll_attach, card->fe, 0x61,
+                                  card->i2c_adapter, DVB_PLL_FCV1236D);
                break;
        }
 
diff --git a/drivers/media/dvb/frontends/or51211.c 
b/drivers/media/dvb/frontends/or51211.c
index 048d7cf..f46d5a4 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,
                                  struct dvb_frontend_parameters *param)
 {
        struct or51211_state* state = fe->demodulator_priv;
-       u32 freq = 0;
-       u16 tunerfreq = 0;
-       u8 buf[4];
 
        /* Change only if we are actually changing the channel */
        if (state->current_frequency != param->frequency) {
-               freq = 44000 + (param->frequency/1000);
-               tunerfreq = freq * 16/1000;
-
-               dprintk("set_parameters frequency = %d (tunerfreq = %d)\n",
-                       param->frequency,tunerfreq);
-
-               buf[0] = (tunerfreq >> 8) & 0x7F;
-               buf[1] = (tunerfreq & 0xFF);
-               buf[2] = 0x8E;
-
-               if (param->frequency < 157250000) {
-                       buf[3] = 0xA0;
-                       dprintk("set_parameters VHF low range\n");
-               } else if (param->frequency < 454000000) {
-                       buf[3] = 0x90;
-                       dprintk("set_parameters VHF high range\n");
-               } else {
-                       buf[3] = 0x30;
-                       dprintk("set_parameters UHF range\n");
+               if (fe->ops.tuner_ops.set_params) {
+                       fe->ops.tuner_ops.set_params(fe, param);
+                       if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
                }
-               dprintk("set_parameters tuner bytes: 0x%02x 0x%02x "
-                       "0x%02x 0x%02x\n",buf[0],buf[1],buf[2],buf[3]);
-
-               if (i2c_writebytes(state,0xC2>>1,buf,4))
-                       printk(KERN_WARNING "or51211:set_parameters error "
-                              "writing to tuner\n");
 
                /* Set to ATSC mode */
                or51211_setmode(fe,0);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to