28 static u8 alps_bsbe1_inittab[] = {
56 if (srate < 1500000) { aclk = 0xb7; bclk = 0x47; }
57 else if (srate < 3000000) { aclk = 0xb7; bclk = 0x4b; }
58 else if (srate < 7000000) { aclk = 0xb7; bclk = 0x4f; }
59 else if (srate < 14000000) { aclk = 0xb7; bclk = 0x53; }
60 else if (srate < 30000000) { aclk = 0xb6; bclk = 0x53; }
61 else if (srate < 45000000) { aclk = 0xb4; bclk = 0x51; }
63 stv0299_writereg(fe, 0x13, aclk);
64 stv0299_writereg(fe, 0x14, bclk);
65 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff);
66 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff);
67 stv0299_writereg(fe, 0x21, (ratio ) & 0xf0);
72 static int alps_bsbe1_tuner_set_params(
struct dvb_frontend *fe)
85 data[0] = (div >> 8) & 0x7f;
87 data[2] = 0x80 | ((div & 0x18000) >> 10) | 0x1;
90 if (fe->
ops.i2c_gate_ctrl)
91 fe->
ops.i2c_gate_ctrl(fe, 1);
93 return (ret != 1) ? -
EIO : 0;
97 .demod_address = 0x68,
98 .inittab = alps_bsbe1_inittab,
103 .set_symbol_rate = alps_bsbe1_set_symbol_rate,