Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76778
b: refs/heads/master
c: 3cb2c39
h: refs/heads/master
v: v3
  • Loading branch information
Patrick Boettcher authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent a665afc commit 0680db7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c52344fdc49665a4eeef24236750b49637d6982f
refs/heads/master: 3cb2c39ded029b8572cf7625b8042e9984d63c2c
6 changes: 6 additions & 0 deletions trunk/drivers/media/dvb/dvb-usb/dib0700_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,8 @@ static struct dib7000p_config dib7070p_dib7000p_config = {
.agc_config_count = 1,
.agc = &dib7070_agc_config,
.bw = &dib7070_bw_config_12_mhz,
.tuner_is_baseband = 1,
.spur_protect = 1,

.gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS,
.gpio_val = DIB7000P_GPIO_DEFAULT_VALUES,
Expand Down Expand Up @@ -820,6 +822,8 @@ static struct dib7000p_config stk7070pd_dib7000p_config[2] = {
.agc_config_count = 1,
.agc = &dib7070_agc_config,
.bw = &dib7070_bw_config_12_mhz,
.tuner_is_baseband = 1,
.spur_protect = 1,

.gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS,
.gpio_val = DIB7000P_GPIO_DEFAULT_VALUES,
Expand All @@ -832,6 +836,8 @@ static struct dib7000p_config stk7070pd_dib7000p_config[2] = {
.agc_config_count = 1,
.agc = &dib7070_agc_config,
.bw = &dib7070_bw_config_12_mhz,
.tuner_is_baseband = 1,
.spur_protect = 1,

.gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS,
.gpio_val = DIB7000P_GPIO_DEFAULT_VALUES,
Expand Down
13 changes: 11 additions & 2 deletions trunk/drivers/media/dvb/frontends/dib0070.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,16 +434,25 @@ static u16 dib0070_p1f_defaults[] =
0,
};

static void dib0070_wbd_calibration(struct dib0070_state *state)
static void dib0070_wbd_calibration(struct dvb_frontend *fe)
{
u16 wbd_offs;
struct dib0070_state *state = fe->tuner_priv;

if (state->cfg->sleep)
state->cfg->sleep(fe, 0);

dib0070_write_reg(state, 0x0f, 0x6d81);
dib0070_write_reg(state, 0x20, 0x0040 | 0x0020 | 0x0010 | 0x0008 | 0x0002 | 0x0001);
msleep(9);
wbd_offs = dib0070_read_reg(state, 0x19);
dib0070_write_reg(state, 0x20, 0);
state->wbd_ff_offset = ((wbd_offs * 8 * 18 / 33 + 1) / 2);
dprintk( "WBDStart = %d (Vargen) - FF = %hd", (u32) wbd_offs * 1800/1024, state->wbd_ff_offset);

if (state->cfg->sleep)
state->cfg->sleep(fe, 1);

}

u16 dib0070_wbd_offset(struct dvb_frontend *fe)
Expand Down Expand Up @@ -560,7 +569,7 @@ struct dvb_frontend * dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter
if (dib0070_reset(state) != 0)
goto free_mem;

dib0070_wbd_calibration(state);
dib0070_wbd_calibration(fe);

printk(KERN_INFO "DiB0070: successfully identified\n");
memcpy(&fe->ops.tuner_ops, &dib0070_ops, sizeof(struct dvb_tuner_ops));
Expand Down

0 comments on commit 0680db7

Please sign in to comment.