diff options
-rw-r--r-- | drivers/media/dvb/dvb-usb/dib0700_devices.c | 6 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/dib0070.c | 13 |
2 files changed, 17 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index ffecb6ed8190..1c6843c631e1 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c | |||
@@ -781,6 +781,8 @@ static struct dib7000p_config dib7070p_dib7000p_config = { | |||
781 | .agc_config_count = 1, | 781 | .agc_config_count = 1, |
782 | .agc = &dib7070_agc_config, | 782 | .agc = &dib7070_agc_config, |
783 | .bw = &dib7070_bw_config_12_mhz, | 783 | .bw = &dib7070_bw_config_12_mhz, |
784 | .tuner_is_baseband = 1, | ||
785 | .spur_protect = 1, | ||
784 | 786 | ||
785 | .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS, | 787 | .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS, |
786 | .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES, | 788 | .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES, |
@@ -820,6 +822,8 @@ static struct dib7000p_config stk7070pd_dib7000p_config[2] = { | |||
820 | .agc_config_count = 1, | 822 | .agc_config_count = 1, |
821 | .agc = &dib7070_agc_config, | 823 | .agc = &dib7070_agc_config, |
822 | .bw = &dib7070_bw_config_12_mhz, | 824 | .bw = &dib7070_bw_config_12_mhz, |
825 | .tuner_is_baseband = 1, | ||
826 | .spur_protect = 1, | ||
823 | 827 | ||
824 | .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS, | 828 | .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS, |
825 | .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES, | 829 | .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES, |
@@ -832,6 +836,8 @@ static struct dib7000p_config stk7070pd_dib7000p_config[2] = { | |||
832 | .agc_config_count = 1, | 836 | .agc_config_count = 1, |
833 | .agc = &dib7070_agc_config, | 837 | .agc = &dib7070_agc_config, |
834 | .bw = &dib7070_bw_config_12_mhz, | 838 | .bw = &dib7070_bw_config_12_mhz, |
839 | .tuner_is_baseband = 1, | ||
840 | .spur_protect = 1, | ||
835 | 841 | ||
836 | .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS, | 842 | .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS, |
837 | .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES, | 843 | .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES, |
diff --git a/drivers/media/dvb/frontends/dib0070.c b/drivers/media/dvb/frontends/dib0070.c index 481eaa684157..fe895bf7b18f 100644 --- a/drivers/media/dvb/frontends/dib0070.c +++ b/drivers/media/dvb/frontends/dib0070.c | |||
@@ -434,9 +434,14 @@ static u16 dib0070_p1f_defaults[] = | |||
434 | 0, | 434 | 0, |
435 | }; | 435 | }; |
436 | 436 | ||
437 | static void dib0070_wbd_calibration(struct dib0070_state *state) | 437 | static void dib0070_wbd_calibration(struct dvb_frontend *fe) |
438 | { | 438 | { |
439 | u16 wbd_offs; | 439 | u16 wbd_offs; |
440 | struct dib0070_state *state = fe->tuner_priv; | ||
441 | |||
442 | if (state->cfg->sleep) | ||
443 | state->cfg->sleep(fe, 0); | ||
444 | |||
440 | dib0070_write_reg(state, 0x0f, 0x6d81); | 445 | dib0070_write_reg(state, 0x0f, 0x6d81); |
441 | dib0070_write_reg(state, 0x20, 0x0040 | 0x0020 | 0x0010 | 0x0008 | 0x0002 | 0x0001); | 446 | dib0070_write_reg(state, 0x20, 0x0040 | 0x0020 | 0x0010 | 0x0008 | 0x0002 | 0x0001); |
442 | msleep(9); | 447 | msleep(9); |
@@ -444,6 +449,10 @@ static void dib0070_wbd_calibration(struct dib0070_state *state) | |||
444 | dib0070_write_reg(state, 0x20, 0); | 449 | dib0070_write_reg(state, 0x20, 0); |
445 | state->wbd_ff_offset = ((wbd_offs * 8 * 18 / 33 + 1) / 2); | 450 | state->wbd_ff_offset = ((wbd_offs * 8 * 18 / 33 + 1) / 2); |
446 | dprintk( "WBDStart = %d (Vargen) - FF = %hd", (u32) wbd_offs * 1800/1024, state->wbd_ff_offset); | 451 | dprintk( "WBDStart = %d (Vargen) - FF = %hd", (u32) wbd_offs * 1800/1024, state->wbd_ff_offset); |
452 | |||
453 | if (state->cfg->sleep) | ||
454 | state->cfg->sleep(fe, 1); | ||
455 | |||
447 | } | 456 | } |
448 | 457 | ||
449 | u16 dib0070_wbd_offset(struct dvb_frontend *fe) | 458 | u16 dib0070_wbd_offset(struct dvb_frontend *fe) |
@@ -560,7 +569,7 @@ struct dvb_frontend * dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter | |||
560 | if (dib0070_reset(state) != 0) | 569 | if (dib0070_reset(state) != 0) |
561 | goto free_mem; | 570 | goto free_mem; |
562 | 571 | ||
563 | dib0070_wbd_calibration(state); | 572 | dib0070_wbd_calibration(fe); |
564 | 573 | ||
565 | printk(KERN_INFO "DiB0070: successfully identified\n"); | 574 | printk(KERN_INFO "DiB0070: successfully identified\n"); |
566 | memcpy(&fe->ops.tuner_ops, &dib0070_ops, sizeof(struct dvb_tuner_ops)); | 575 | memcpy(&fe->ops.tuner_ops, &dib0070_ops, sizeof(struct dvb_tuner_ops)); |