32 u8 bw_params1[][5] = {
33 { 0x17, 0xea, 0xaa, 0xaa, 0xaa },
34 { 0x14, 0x80, 0x00, 0x00, 0x00 },
35 { 0x11, 0xf0, 0x00, 0x00, 0x00 },
37 u8 bw_params2[][2] = {
43 { 0x00080, 0x00, 0xff },
44 { 0x00081, 0x03, 0xff },
45 { 0x00085, 0x07, 0xff },
46 { 0x00088, 0x01, 0xff },
48 { 0x00070, priv->
cfg.ts_mode, 0xff },
49 { 0x000cb, priv->
cfg.if_agc_polarity << 6, 0x40 },
50 { 0x000a5, 0x00, 0x01 },
51 { 0x00082, 0x20, 0x60 },
52 { 0x000c2, 0xc3, 0xff },
53 { 0x0016a, 0x50, 0xff },
54 { 0x00427, 0x41, 0xff },
57 dev_dbg(&priv->
i2c->dev,
"%s: frequency=%d bandwidth_hz=%d\n", __func__,
78 if (fe->
ops.tuner_ops.set_params)
79 fe->
ops.tuner_ops.set_params(fe);
94 if (fe->
ops.tuner_ops.get_if_frequency) {
95 ret = fe->
ops.tuner_ops.get_if_frequency(fe, &if_freq);
101 dev_dbg(&priv->
i2c->dev,
"%s: if_freq=%d\n", __func__, if_freq);
103 num = if_freq / 1000;
106 buf[0] = ((if_ctl >> 16) & 0xff);
107 buf[1] = ((if_ctl >> 8) & 0xff);
108 buf[2] = ((if_ctl >> 0) & 0xff);
136 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
151 switch ((buf[0] >> 6) & 0x03) {
163 switch ((buf[1] >> 1) & 0x03) {
172 switch ((buf[1] >> 3) & 0x03) {
187 switch ((buf[0] >> 3) & 0x07) {
202 switch ((buf[0] >> 0) & 0x07) {
220 switch ((buf[1] >> 5) & 0x07) {
242 switch ((buf[0] >> 0) & 0x01) {
253 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
261 u8 buf[3], start_ber = 0;
269 if ((buf[2] >> 7) & 0x01 || (buf[2] >> 4) & 0x01) {
270 *ber = (buf[2] & 0x0f) << 16 | buf[1] << 8 | buf[0];
287 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
303 tmp = (buf[0] & 0x0f) << 8 | buf[1];
307 *strength = tmp * 0xffff / 0x0fff;
311 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
327 tmp = (buf[0] & 0x1f) << 8 | buf[1];
328 #define CXD2820R_LOG10_8_24 15151336
335 dev_dbg(&priv->
i2c->dev,
"%s: dBx10=%d val=%04x\n", __func__, *snr,
340 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
362 if ((buf[0] & 0x07) == 6) {
367 if (((buf[1] >> 3) & 0x01) == 1) {
379 if ((buf[2] & 0x0f) >= 4) {
384 if (((buf[3] >> 4) & 0x01) == 1)
389 dev_dbg(&priv->
i2c->dev,
"%s: lock=%*ph\n", __func__, 4, buf);
393 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
408 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
417 { 0x000ff, 0x1f, 0xff },
418 { 0x00085, 0x00, 0xff },
419 { 0x00088, 0x01, 0xff },
420 { 0x00081, 0x00, 0xff },
421 { 0x00080, 0x00, 0xff },
437 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
446 s->
max_drift = (fe->
ops.info.frequency_stepsize * 2) + 1;