32 u8 bw_params1[][5] = {
33 { 0x1c, 0xb3, 0x33, 0x33, 0x33 },
34 { 0x17, 0xea, 0xaa, 0xaa, 0xaa },
35 { 0x14, 0x80, 0x00, 0x00, 0x00 },
36 { 0x11, 0xf0, 0x00, 0x00, 0x00 },
39 { 0x00080, 0x02, 0xff },
40 { 0x00081, 0x20, 0xff },
41 { 0x00085, 0x07, 0xff },
42 { 0x00088, 0x01, 0xff },
43 { 0x02069, 0x01, 0xff },
45 { 0x0207f, 0x2a, 0xff },
46 { 0x02082, 0x0a, 0xff },
47 { 0x02083, 0x0a, 0xff },
48 { 0x020cb, priv->
cfg.if_agc_polarity << 6, 0x40 },
49 { 0x02070, priv->
cfg.ts_mode, 0xff },
50 { 0x020b5, priv->
cfg.spec_inv << 4, 0x10 },
51 { 0x02567, 0x07, 0x0f },
52 { 0x02569, 0x03, 0x03 },
53 { 0x02595, 0x1a, 0xff },
54 { 0x02596, 0x50, 0xff },
55 { 0x02a8c, 0x00, 0xff },
56 { 0x02a8d, 0x34, 0xff },
57 { 0x02a45, 0x06, 0x07 },
58 { 0x03f10, 0x0d, 0xff },
59 { 0x03f11, 0x02, 0xff },
60 { 0x03f12, 0x01, 0xff },
61 { 0x03f23, 0x2c, 0xff },
62 { 0x03f51, 0x13, 0xff },
63 { 0x03f52, 0x01, 0xff },
64 { 0x03f53, 0x00, 0xff },
65 { 0x027e6, 0x14, 0xff },
66 { 0x02786, 0x02, 0x07 },
67 { 0x02787, 0x40, 0xe0 },
68 { 0x027ef, 0x10, 0x18 },
71 dev_dbg(&priv->
i2c->dev,
"%s: frequency=%d bandwidth_hz=%d\n", __func__,
96 if (fe->
ops.tuner_ops.set_params)
97 fe->
ops.tuner_ops.set_params(fe);
111 if (fe->
ops.tuner_ops.get_if_frequency) {
112 ret = fe->
ops.tuner_ops.get_if_frequency(fe, &if_freq);
118 dev_dbg(&priv->
i2c->dev,
"%s: if_freq=%d\n", __func__, if_freq);
120 num = if_freq / 1000;
123 buf[0] = ((if_ctl >> 16) & 0xff);
124 buf[1] = ((if_ctl >> 8) & 0xff);
125 buf[2] = ((if_ctl >> 0) & 0xff);
149 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
165 switch ((buf[0] >> 0) & 0x07) {
186 switch ((buf[1] >> 4) & 0x07) {
214 switch ((buf[0] >> 0) & 0x07) {
235 switch ((buf[1] >> 0) & 0x07) {
254 switch ((buf[0] >> 4) & 0x01) {
265 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
280 if ((buf[0] & 0x07) == 6) {
281 if (((buf[0] >> 5) & 0x01) == 1) {
290 dev_dbg(&priv->
i2c->dev,
"%s: lock=%02x\n", __func__, buf[0]);
294 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
303 unsigned int errbits;
311 if ((buf[0] >> 4) & 0x01) {
312 errbits = (buf[0] & 0x0f) << 24 | buf[1] << 16 |
313 buf[2] << 8 | buf[3];
316 *ber = errbits * 64 / 16588800;
321 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
337 tmp = (buf[0] & 0x0f) << 8 | buf[1];
341 *strength = tmp * 0xffff / 0x0fff;
345 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
361 tmp = (buf[0] & 0x0f) << 8 | buf[1];
362 #define CXD2820R_LOG10_8_24 15151336
369 dev_dbg(&priv->
i2c->dev,
"%s: dBx10=%d val=%04x\n", __func__, *snr,
374 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
390 { 0x000ff, 0x1f, 0xff },
391 { 0x00085, 0x00, 0xff },
392 { 0x00088, 0x01, 0xff },
393 { 0x02069, 0x00, 0xff },
394 { 0x00081, 0x00, 0xff },
395 { 0x00080, 0x00, 0xff },
411 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
420 s->
max_drift = (fe->
ops.info.frequency_stepsize * 2) + 1;